@mastergo/magic-mcp 0.2.6 → 0.2.8
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/README.md +5 -1
- package/README.zh-CN.md +3 -1
- package/dist/index.js +141 -101
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var q$=Object.create;var _u=Object.defineProperty;var Z$=Object.getOwnPropertyDescriptor;var B$=Object.getOwnPropertyNames;var H$=Object.getPrototypeOf,V$=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Na=(t,e)=>{for(var n in e)_u(t,n,{get:e[n],enumerable:!0})},G$=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of B$(e))!V$.call(t,o)&&o!==n&&_u(t,o,{get:()=>e[o],enumerable:!(r=Z$(e,o))||r.enumerable});return t};var Ee=(t,e,n)=>(n=t!=null?q$(H$(t)):{},G$(e||!t||!t.__esModule?_u(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 As=class{};Ze._CodeOrName=As;Ze.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var So=class extends As{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 As{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 gb(t,...e){let n=[t[0]],r=0;for(;r<e.length;)rf(n,e[r]),n.push(t[++r]);return new $n(n)}Ze._=gb;var nf=new $n("+");function yb(t,...e){let n=[Cs(t[0])],r=0;for(;r<e.length;)n.push(nf),rf(n,e[r]),n.push(nf,Cs(t[++r]));return GP(n),new $n(n)}Ze.str=yb;function rf(t,e){e instanceof $n?t.push(...e._items):e instanceof So?t.push(e):t.push(JP(e))}Ze.addCodeArg=rf;function GP(t){let e=1;for(;e<t.length-1;){if(t[e]===nf){let n=WP(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function WP(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 KP(t,e){return e.emptyStr()?t:t.emptyStr()?e:yb`${t}${e}`}Ze.strConcat=KP;function JP(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Cs(Array.isArray(t)?t.join(","):t)}function YP(t){return new $n(Cs(t))}Ze.stringify=YP;function Cs(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ze.safeStringify=Cs;function XP(t){return typeof t=="string"&&Ze.IDENTIFIER.test(t)?new $n(`.${t}`):gb`[${t}]`}Ze.getProperty=XP;function QP(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=QP;function eO(t){return new $n(t.toString())}Ze.regexpCode=eO});var af=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ValueScope=ln.ValueScopeName=ln.Scope=ln.varKinds=ln.UsedValueState=void 0;var cn=Is(),of=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},jc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(jc||(ln.UsedValueState=jc={}));ln.varKinds={const:new cn.Name("const"),let:new cn.Name("let"),var:new cn.Name("var")};var Lc=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=Lc;var Dc=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=Dc;var tO=(0,cn._)`\n`,sf=class extends Lc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?tO:cn.nil}}get(){return this._scope}name(e){return new Dc(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,jc.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 of(l);c.set(l,jc.Completed)})}return i}};ln.ValueScope=sf});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=af(),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 qc=af();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return qc.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return qc.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return qc.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return qc.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}},cf=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:{}}},Mc=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 Uc(e,this.rhs)}},lf=class extends Mc{constructor(e,n,r,o){super(e,r,o),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},uf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},pf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},df=class extends mr{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ff=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:{}}},Ps=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)||(nO(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 Ps{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},mf=class extends Ps{},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(xb(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 Uc(e,this.condition),this.else&&Eo(e,this.else.names),e}};ko.kind="if";var To=class extends hr{};To.kind="for";var hf=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)}},gf=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=Uc(super.names,this.from);return Uc(e,this.to)}},Fc=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)}},Os=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)}};Os.kind="func";var zs=class extends Ps{render(e){return"return "+super.render(e)}};zs.kind="return";var yf=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}},Ns=class extends hr{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ns.kind="catch";var js=class extends hr{render(e){return"finally"+super.render(e)}};js.kind="finally";var xf=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 mf]}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 cf(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 Mc(e,n,r))}add(e,n){return this._leafNode(new lf(e,Se.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Le.nil&&this._leafNode(new ff(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 hf(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 gf(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 Fc("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 Fc("in",o,i,n),()=>r(i))}endFor(){return this._endBlockNode(To)}label(e){return this._leafNode(new uf(e))}break(e){return this._leafNode(new pf(e))}return(e){let n=new zs;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(zs)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new yf;if(this._blockNode(o),this.code(e),n){let i=this.name("e");this._currNode=o.catch=new Ns(i),n(i)}return r&&(this._currNode=o.finally=new js,this.code(r)),this._endBlockNode(Ns,js)}throw(e){return this._leafNode(new df(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 Os(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Os)}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=xf;function Eo(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Uc(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 nO(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function xb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Le._)`!${vf(t)}`}Se.not=xb;var rO=vb(Se.operators.AND);function oO(...t){return t.reduce(rO)}Se.and=oO;var iO=vb(Se.operators.OR);function sO(...t){return t.reduce(iO)}Se.or=sO;function vb(t){return(e,n)=>e===Le.nil?n:n===Le.nil?e:(0,Le._)`${vf(e)} ${t} ${vf(n)}`}function vf(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(),aO=Is();function cO(t){let e={};for(let n of t)e[n]=!0;return e}$e.toHash=cO;function lO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(wb(t,e),!Sb(e,t.self.RULES.all))}$e.alwaysValidSchema=lO;function wb(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]||Eb(t,`unknown keyword: "${i}"`)}$e.checkUnknownRules=wb;function Sb(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}$e.schemaHasRules=Sb;function uO(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=uO;function pO({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=pO;function dO(t){return kb(decodeURIComponent(t))}$e.unescapeFragment=dO;function fO(t){return encodeURIComponent(_f(t))}$e.escapeFragment=fO;function _f(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}$e.escapeJsonPointer=_f;function kb(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}$e.unescapeJsonPointer=kb;function mO(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}$e.eachItem=mO;function bb({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:bb({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} || {}`),wf(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Tb}),items:bb({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 Tb(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,Xe._)`{}`);return e!==void 0&&wf(t,n,e),n}$e.evaluatedPropsToName=Tb;function wf(t,e,n){Object.keys(n).forEach(r=>t.assign((0,Xe._)`${e}${(0,Xe.getProperty)(r)}`,!0))}$e.setEvaluated=wf;var _b={};function hO(t,e){return t.scopeValue("func",{ref:e,code:_b[e.code]||(_b[e.code]=new aO._Code(e.code))})}$e.useFunc=hO;var bf;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(bf||($e.Type=bf={}));function gO(t,e,n){if(t instanceof Xe.Name){let r=e===bf.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():"/"+_f(t)}$e.getErrorPath=gO;function Eb(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=Eb});var gr=$(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var Vt=we(),yO={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")};Sf.default=yO});var Ls=$(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(),Zc=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 xO(t,e=Gt.keywordError,n,r){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=Ab(t,e,n);r??(s||a)?$b(i,c):Rb(o,(0,Fe._)`[${c}]`)}Gt.reportError=xO;function vO(t,e=Gt.keywordError,n){let{it:r}=t,{gen:o,compositeRule:i,allErrors:s}=r,a=Ab(t,e,n);$b(o,a),i||s||Rb(r,en.default.vErrors)}Gt.reportExtraError=vO;function bO(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=bO;function _O({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=_O;function $b(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 Rb(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 Ab(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,Fe._)`{}`:wO(t,e,n)}function wO(t,e,n={}){let{gen:r,it:o}=t,i=[SO(o,n),kO(t,n)];return TO(t,e,i),r.object(...i)}function SO({errorPath:t},{instancePath:e}){let n=e?(0,Fe.str)`${t}${(0,Zc.getErrorPath)(e,Zc.Type.Str)}`:t;return[en.default.instancePath,(0,Fe.strConcat)(en.default.instancePath,n)]}function kO({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,Zc.getErrorPath)(n,Zc.Type.Str)}`),[$o.schemaPath,o]}function TO(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 Ib=$(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.boolOrEmptySchema=fi.topBoolOrEmptySchema=void 0;var EO=Ls(),$O=we(),RO=gr(),AO={message:"boolean schema is false"};function CO(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Cb(t,!1):typeof n=="object"&&n.$async===!0?e.return(RO.default.data):(e.assign((0,$O._)`${r}.errors`,null),e.return(!0))}fi.topBoolOrEmptySchema=CO;function IO(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Cb(t)):n.var(e,!0)}fi.boolOrEmptySchema=IO;function Cb(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,EO.reportError)(o,AO,void 0,e)}});var kf=$(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.getRules=mi.isJSONType=void 0;var PO=["string","number","integer","boolean","null","object","array"],OO=new Set(PO);function zO(t){return typeof t=="string"&&OO.has(t)}mi.isJSONType=zO;function NO(){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=NO});var Tf=$(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.shouldUseRule=Or.shouldUseGroup=Or.schemaHasRulesForType=void 0;function jO({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&Pb(t,r)}Or.schemaHasRulesForType=jO;function Pb(t,e){return e.rules.some(n=>Ob(t,n))}Or.shouldUseGroup=Pb;function Ob(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=Ob});var Ds=$(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 LO=kf(),DO=Tf(),MO=Ls(),ve=we(),zb=Me(),hi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(hi||(Wt.DataType=hi={}));function FO(t){let e=Nb(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=FO;function Nb(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(LO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Wt.getJSONTypes=Nb;function UO(t,e){let{gen:n,data:r,opts:o}=t,i=qO(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,DO.schemaHasRulesForType)(t,e[0]));if(s){let a=$f(e,r,o.strictNumbers,hi.Wrong);n.if(a,()=>{i.length?ZO(t,e,i):Rf(t)})}return s}Wt.coerceAndCheckDataType=UO;var jb=new Set(["string","number","integer","boolean","null"]);function qO(t,e){return e?t.filter(n=>jb.has(n)||e==="array"&&n==="array"):[]}function ZO(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($f(e,o,i.strictNumbers),()=>r.assign(a,o))),r.if((0,ve._)`${a} !== undefined`);for(let l of n)(jb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);r.else(),Rf(t),r.endIf(),r.if((0,ve._)`${a} !== undefined`,()=>{r.assign(o,a),BO(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":
|
|
5
|
-
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ve._)`+${o}`);return;case"boolean":
|
|
6
|
-
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,ve._)`[${o}]`)}}}function BO({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ve._)`${e} !== undefined`,()=>t.assign((0,ve._)`${e}[${n}]`,r))}function Ef(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=Ef;function $f(t,e,n,r){if(t.length===1)return Ef(t[0],e,n,r);let o,i=(0,zb.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,Ef(s,e,n,r));return o}Wt.checkDataTypes=$f;var HO={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ve._)`{type: ${t}}`:(0,ve._)`{type: ${e}}`};function Rf(t){let e=VO(t);(0,MO.reportError)(e,HO)}Wt.reportTypeError=Rf;function VO(t){let{gen:e,data:n,schema:r}=t,o=(0,zb.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:t}}});var Db=$(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.assignDefaults=void 0;var gi=we(),GO=Me();function WO(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let o in n)Lb(t,o,n[o].default);else e==="array"&&Array.isArray(r)&&r.forEach((o,i)=>Lb(t,i,o.default))}Bc.assignDefaults=WO;function Lb(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,GO.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(),Af=Me(),zr=gr(),KO=Me();function JO(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=JO;function YO({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=YO;function XO(t,e){t.setParams({missingProperty:e},!0),t.error()}Je.reportMissingProp=XO;function Mb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=Mb;function Cf(t,e,n){return(0,ct._)`${Mb(t)}.call(${e}, ${n})`}Je.isOwnProperty=Cf;function QO(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} !== undefined`;return r?(0,ct._)`${o} && ${Cf(t,e,n)}`:o}Je.propertyInData=QO;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)(Cf(t,e,n))):o}Je.noPropertyInData=If;function Fb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Je.allSchemaProperties=Fb;function e1(t,e){return Fb(e).filter(n=>!(0,Af.alwaysValidSchema)(t,e[n]))}Je.schemaProperties=e1;function t1({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=t1;var n1=(0,ct._)`new RegExp`;function r1({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"?n1:(0,KO.useFunc)(t,o)}(${n}, ${r})`})}Je.usePattern=r1;function o1(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:Af.Type.Num},i),e.if((0,ct.not)(i),a)})}}Je.validateArray=o1;function i1(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,Af.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=i1});var Zb=$(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.validateKeywordUsage=Yn.validSchemaType=Yn.funcKeywordCode=Yn.macroKeywordCode=void 0;var tn=we(),Ro=gr(),s1=Rn(),a1=Ls();function c1(t,e){let{gen:n,keyword:r,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=qb(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=c1;function l1(t,e){var n;let{gen:r,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;p1(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=qb(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&&Ub(t),x(()=>t.error());else{let m=e.async?h():y();e.modifying&&Ub(t),x(()=>u1(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,s1.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=l1;function Ub(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,tn._)`${r.parentData}[${r.parentDataProperty}]`))}function u1(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,a1.extendErrors)(t)},()=>t.error())}function p1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function qb(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 d1(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=d1;function f1({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=f1});var Hb=$(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.extendSubschemaMode=Nr.extendSubschemaData=Nr.getSubschema=void 0;var Xn=we(),Bb=Me();function m1(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,Bb.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=m1;function h1(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,Bb.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=h1;function g1(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=g1});var Pf=$((eH,Vb)=>{"use strict";Vb.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 Wb=$((tH,Gb)=>{"use strict";var jr=Gb.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(){};Hc(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 Hc(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++)Hc(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)Hc(t,e,n,d[h],o+"/"+p+"/"+y1(h),i,o,p,r,h)}else(p in jr.keywords||t.allKeys&&!(p in jr.skipKeywords))&&Hc(t,e,n,d,o+"/"+p,i,o,p,r)}n(r,o,i,s,a,c,l)}}function y1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ms=$(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.getSchemaRefs=un.resolveUrl=un.normalizeId=un._getFullPath=un.getFullPath=un.inlineRef=void 0;var x1=Me(),v1=Pf(),b1=Wb(),_1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function w1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Of(t):e?Kb(t)<=e:!1}un.inlineRef=w1;var S1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Of(t){for(let e in t){if(S1.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Of)||typeof n=="object"&&Of(n))return!0}return!1}function Kb(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!_1.has(n)&&(typeof t[n]=="object"&&(0,x1.eachItem)(t[n],r=>e+=Kb(r)),e===1/0))return 1/0}return e}function Jb(t,e="",n){n!==!1&&(e=yi(e));let r=t.parse(e);return Yb(t,r)}un.getFullPath=Jb;function Yb(t,e){return t.serialize(e).split("#")[0]+"#"}un._getFullPath=Yb;var k1=/#\/?$/;function yi(t){return t?t.replace(k1,""):""}un.normalizeId=yi;function T1(t,e,n){return n=yi(n),t.resolve(e,n)}un.resolveUrl=T1;var E1=/^[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=Jb(r,o,!1),a={},c=new Set;return b1(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(!E1.test(w))throw new Error(`invalid anchor "${w}"`);m.call(this,`#${w}`)}}}),a;function l(d,f,h){if(f!==void 0&&!v1(d,f))throw p(h)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}un.getSchemaRefs=$1});var qs=$(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getData=Lr.KeywordCxt=Lr.validateFunctionCode=void 0;var n_=Ib(),Xb=Ds(),Nf=Tf(),Vc=Ds(),R1=Db(),Us=Zb(),zf=Hb(),re=we(),he=gr(),A1=Ms(),yr=Me(),Fs=Ls();function C1(t){if(i_(t)&&(s_(t),o_(t))){O1(t);return}r_(t,()=>(0,n_.topBoolOrEmptySchema)(t))}Lr.validateFunctionCode=C1;function r_({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"; ${Qb(n,o)}`),P1(t,o),t.code(i)}):t.func(e,(0,re._)`${he.default.data}, ${I1(o)}`,r.$async,()=>t.code(Qb(n,o)).code(i))}function I1(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 P1(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 O1(t){let{schema:e,opts:n,gen:r}=t;r_(t,()=>{n.$comment&&e.$comment&&c_(t),D1(t),r.let(he.default.vErrors,null),r.let(he.default.errors,0),n.unevaluated&&z1(t),a_(t),U1(t)})}function z1(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 Qb(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 N1(t,e){if(i_(t)&&(s_(t),o_(t))){j1(t,e);return}(0,n_.boolOrEmptySchema)(t,e)}function o_({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 i_(t){return typeof t.schema!="boolean"}function j1(t,e){let{schema:n,gen:r,opts:o}=t;o.$comment&&n.$comment&&c_(t),M1(t),F1(t);let i=r.const("_errs",he.default.errors);a_(t,i),r.var(e,(0,re._)`${i} === ${he.default.errors}`)}function s_(t){(0,yr.checkUnknownRules)(t),L1(t)}function a_(t,e){if(t.opts.jtd)return e_(t,[],!1,e);let n=(0,Xb.getSchemaTypes)(t.schema),r=(0,Xb.coerceAndCheckDataType)(t,n);e_(t,n,!r,e)}function L1(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 D1(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 M1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,A1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function F1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function c_({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 U1(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&&q1(t),e.return((0,re._)`${he.default.errors} === 0`))}function q1({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 e_(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(()=>u_(t,"$ref",p.all.$ref.definition));return}c.jtd||Z1(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,Nf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Vc.checkDataType)(f.type,s,c.strictNumbers)),t_(t,f),e.length===1&&e[0]===f.type&&n&&(o.else(),(0,Vc.reportTypeError)(t)),o.endIf()):t_(t,f),a||o.if((0,re._)`${he.default.errors} === ${r||0}`))}}function t_(t,e){let{gen:n,schema:r,opts:{useDefaults:o}}=t;o&&(0,R1.assignDefaults)(t,e.type),n.block(()=>{for(let i of e.rules)(0,Nf.shouldUseRule)(r,i)&&u_(t,i.keyword,i.definition,e.type)})}function Z1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(B1(t,e),t.opts.allowUnionTypes||H1(t,e),V1(t,t.dataTypes))}function B1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{l_(t.dataTypes,n)||jf(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),W1(t,e)}}function H1(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&jf(t,"use allowUnionTypes to allow union type keyword")}function V1(t,e){let n=t.self.RULES.all;for(let r in n){let o=n[r];if(typeof o=="object"&&(0,Nf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>G1(e,s))&&jf(t,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function G1(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function l_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function W1(t,e){let n=[];for(let r of t.dataTypes)l_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function jf(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,yr.checkStrictMode)(t,e,t.opts.strictTypes)}var Gc=class{constructor(e,n,r){if((0,Us.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",p_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Us.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?Fs.reportExtraError:Fs.reportError)(this,this.def.error,n)}$dataError(){(0,Fs.reportError)(this,this.def.$dataError||Fs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Fs.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,Vc.checkDataTypes)(c,n,i.opts.strictNumbers,Vc.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,zf.getSubschema)(this.it,e);(0,zf.extendSubschemaData)(r,this.it,e),(0,zf.extendSubschemaMode)(r,e);let o={...this.it,...r,items:void 0,props:void 0};return N1(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=Gc;function u_(t,e,n,r){let o=new Gc(t,n,e);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Us.funcKeywordCode)(o,n):"macro"in n?(0,Us.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Us.funcKeywordCode)(o,n)}var K1=/^\/(?:[^~]|~0|~1)*$/,J1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function p_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let o,i;if(t==="")return he.default.rootData;if(t[0]==="/"){if(!K1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=he.default.rootData}else{let l=J1.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=p_});var Wc=$(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var Lf=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Df.default=Lf});var Zs=$(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var Mf=Ms(),Ff=class extends Error{constructor(e,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Mf.resolveUrl)(e,n,r),this.missingSchema=(0,Mf.normalizeId)((0,Mf.getFullPath)(e,this.missingRef))}};Uf.default=Ff});var Jc=$(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.resolveSchema=An.getCompilingSchema=An.resolveRef=An.compileSchema=An.SchemaEnv=void 0;var Mn=we(),Y1=Wc(),Ao=gr(),Fn=Ms(),d_=Me(),X1=qs(),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 Zf(t){let e=f_.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:Y1.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,X1.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=Zf;function Q1(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=nz.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]=ez.call(this,i)}An.resolveRef=Q1;function ez(t){return(0,Fn.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Zf.call(this,t)}function f_(t){for(let e of this._compilations)if(tz(e,t))return e}An.getCompilingSchema=f_;function tz(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function nz(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Kc.call(this,t,e)}function Kc(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 qf.call(this,n,t);let i=(0,Fn.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Kc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:qf.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Zf.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 qf.call(this,n,s)}}An.resolveSchema=Kc;var rz=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function qf(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,d_.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!rz.has(a)&&l&&(e=(0,Fn.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,d_.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Fn.resolveUrl)(this.opts.uriResolver,e,n.$ref);i=Kc.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 m_=$((aH,oz)=>{oz.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 Vf=$((cH,b_)=>{"use strict";var iz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),g_=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),Bf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),y_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),sz=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Hf(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 az=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function h_(t){return t.length=0,!0}function cz(t,e,n){if(t.length){let r=Hf(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function lz(t){let e=0,n={error:!1,address:"",zone:""},r=[],o=[],i=!1,s=!1,a=cz;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=h_}else{o.push(l);continue}}return o.length&&(a===h_?n.zone=o.join(""):s?r.push(o.join("")):r.push(Hf(o))),n.address=r.join(""),n}function x_(t){if(uz(t,":")<2)return{host:t,isIPV6:!1};let e=lz(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 uz(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function pz(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 dz={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},fz=/[@/?#:]/g,mz=/[@/?#]/g;function v_(t,e){let n=e?mz:fz;return n.lastIndex=0,t.replace(n,r=>dz[r])}function hz(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(Bf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&y_(s)?n+=s:n+="%"+i,r+=2;continue}}n+=t[r]}return n}function gz(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(Bf(r)){let o=r.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&y_(i)?e+=i:e+="%"+o,n+=2;continue}}sz(t[n])?e+=t[n]:e+=escape(t[n])}return e}function yz(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(Bf(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function xz(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!g_(n)){let r=x_(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=v_(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}b_.exports={nonSimpleDomain:az,recomposeAuthority:xz,reescapeHostDelimiters:v_,normalizePercentEncoding:hz,normalizePathEncoding:gz,escapePreservingEscapes:yz,removeDotSegments:pz,isIPv4:g_,isUUID:iz,normalizeIPv6:x_,stringArrayToHexStripped:Hf}});var T_=$((lH,k_)=>{"use strict";var{isUUID:vz}=Vf(),bz=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,_z=["http","https","ws","wss","urn","urn:uuid"];function wz(t){return _z.indexOf(t)!==-1}function Gf(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 __(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function w_(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 Sz(t){return t.secure=Gf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function kz(t){if((t.port===(Gf(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 Tz(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(bz);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=Wf(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Ez(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=Wf(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||!vz(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function Rz(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var S_={scheme:"http",domainHost:!0,parse:__,serialize:w_},Az={scheme:"https",domainHost:S_.domainHost,parse:__,serialize:w_},Yc={scheme:"ws",domainHost:!0,parse:Sz,serialize:kz},Cz={scheme:"wss",domainHost:Yc.domainHost,parse:Yc.parse,serialize:Yc.serialize},Iz={scheme:"urn",parse:Tz,serialize:Ez,skipNormalize:!0},Pz={scheme:"urn:uuid",parse:$z,serialize:Rz,skipNormalize:!0},Xc={http:S_,https:Az,ws:Yc,wss:Cz,urn:Iz,"urn:uuid":Pz};Object.setPrototypeOf(Xc,null);function Wf(t){return t&&(Xc[t]||Xc[t.toLowerCase()])||void 0}k_.exports={wsIsSecure:Gf,SCHEMES:Xc,isValidSchemeName:wz,getSchemeHandler:Wf}});var I_=$((uH,Qc)=>{"use strict";var{normalizeIPv6:Oz,removeDotSegments:Bs,recomposeAuthority:zz,normalizePercentEncoding:Nz,normalizePathEncoding:jz,escapePreservingEscapes:Lz,reescapeHostDelimiters:Dz,isIPv4:Mz,nonSimpleDomain:Fz}=Vf(),{SCHEMES:Uz,getSchemeHandler:$_}=T_();function qz(t,e){return typeof t=="string"?t=Wz(t,e):typeof t=="object"&&(t=vi(Co(t,e),e)),t}function Zz(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},o=R_(vi(t,r),vi(e,r),r,!0);return r.skipEscape=!0,Co(o,r)}function R_(t,e,n,r){let o={};return r||(t=vi(Co(t,n),n),e=vi(Co(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=Bs(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=Bs(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Bs(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=Bs(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 Bz(t,e,n){let r=E_(t,n),o=E_(e,n);return r!==void 0&&o!==void 0&&r.toLowerCase()===o.toLowerCase()}function Co(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=$_(r.scheme||n.scheme);i&&i.serialize&&i.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=Nz(n.path):(n.path=Lz(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");let s=zz(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=Bs(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 Hz=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Vz=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function Gz(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 A_(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(Vz);s!==null&&s[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",o=!0);let a=t.match(Hz);if(a){r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]);let c=Gz(r,a);if(c!==void 0&&(r.error=r.error||c,o=!0),r.host)if(Mz(r.host)===!1){let d=Oz(r.host);r.host=d.host.toLowerCase(),i=d.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 l=$_(n.scheme||r.scheme);if(!n.unicodeSupport&&(!l||!l.unicodeSupport)&&r.host&&(n.domainHost||l&&l.domainHost)&&i===!1&&Fz(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(p){r.error=r.error||"Host's domain name can not be converted to ASCII: "+p}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Dz(unescape(r.host),i))),r.path&&(r.path=jz(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}l&&l.parse&&l.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:o}}function vi(t,e){return A_(t,e).parsed}function Wz(t,e){return C_(t,e).normalized}function C_(t,e){let{parsed:n,malformedAuthorityOrPort:r}=A_(t,e);return{normalized:r?t:Co(n,e),malformedAuthorityOrPort:r}}function E_(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=C_(t,e);return r?void 0:n}if(typeof t=="object")return Co(t,e)}var Kf={SCHEMES:Uz,normalize:qz,resolve:Zz,resolveComponent:R_,equal:Bz,serialize:Co,parse:vi};Qc.exports=Kf;Qc.exports.default=Kf;Qc.exports.fastUri=Kf});var O_=$(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var P_=I_();P_.code='require("ajv/dist/runtime/uri").default';Jf.default=P_});var U_=$(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 Kz=qs();Object.defineProperty(Mt,"KeywordCxt",{enumerable:!0,get:function(){return Kz.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 Jz=Wc(),D_=Zs(),Yz=kf(),Hs=Jc(),Xz=we(),Vs=Ms(),el=Ds(),Xf=Me(),z_=m_(),Qz=O_(),M_=(t,e)=>new RegExp(t,e);M_.code="new RegExp";var eN=["removeAdditional","useDefaults","coerceTypes"],tN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),nN={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."},rN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},N_=200;function oN(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:M_,ae=(o=t.uriResolver)!==null&&o!==void 0?o:Qz.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:N_,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:N_,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 Gs=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,...oN(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new Xz.ValueScope({scope:{},prefixes:tN,es5:n,lines:r}),this.logger=uN(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Yz.getRules)(),j_.call(this,nN,e,"NOT SUPPORTED"),j_.call(this,rN,e,"DEPRECATED","warn"),this._metaOpts=cN.call(this),e.formats&&sN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&aN.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),iN.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,o=z_;r==="id"&&(o={...z_},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 D_.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,Vs.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=L_.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,o=new Hs.SchemaEnv({schema:{},schemaId:r});if(n=Hs.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=L_.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,Vs.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(dN.call(this,r,n),!n)return(0,Xf.eachItem)(r,i=>Yf.call(this,i)),this;mN.call(this,n);let o={...n,type:(0,el.getJSONTypes)(n.type),schemaType:(0,el.getJSONTypes)(n.schemaType)};return(0,Xf.eachItem)(r,o.type.length===0?i=>Yf.call(this,i,o):i=>o.type.forEach(s=>Yf.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]=F_(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,Vs.normalizeId)(s||r);let l=Vs.getSchemaRefs.call(this,e,r);return c=new Hs.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):Hs.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{Hs.compileSchema.call(this,e)}finally{this.opts=n}}};Gs.ValidationError=Jz.default;Gs.MissingRefError=D_.default;Mt.default=Gs;function j_(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 L_(t){return t=(0,Vs.normalizeId)(t),this.schemas[t]||this.refs[t]}function iN(){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 sN(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function aN(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 cN(){let t={...this.opts};for(let e of eN)delete t[e];return t}var lN={log(){},warn(){},error(){}};function uN(t){if(t===!1)return lN;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 pN=/^[a-z_$][a-z0-9_$:-]*$/i;function dN(t,e){let{RULES:n}=this;if((0,Xf.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!pN.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 Yf(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,el.getJSONTypes)(e.type),schemaType:(0,el.getJSONTypes)(e.schemaType)}};e.before?fN.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 fN(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 mN(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=F_(e)),t.validateSchema=this.compile(e,!0))}var hN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function F_(t){return{anyOf:[t,hN]}}});var q_=$(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var gN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Qf.default=gN});var V_=$(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.callRef=Io.getValidate=void 0;var yN=Zs(),Z_=Rn(),pn=we(),_i=gr(),B_=Jc(),tl=Me(),xN={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=B_.resolveRef.call(c,l,o,n);if(p===void 0)throw new yN.default(r.opts.uriResolver,o,n);if(p instanceof B_.SchemaEnv)return f(p);return h(p);function d(){if(i===l)return nl(t,s,i,i.$async);let y=e.scopeValue("root",{ref:l});return nl(t,(0,pn._)`${y}.validate`,l,l.$async)}function f(y){let v=H_(t,y);nl(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 H_(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,pn._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Io.getValidate=H_;function nl(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,Z_.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,Z_.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=tl.mergeEvaluated.props(o,x.props,i.props));else{let m=o.var("props",(0,pn._)`${y}.evaluated.props`);i.props=tl.mergeEvaluated.props(o,m,i.props,pn.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=tl.mergeEvaluated.items(o,x.items,i.items));else{let m=o.var("items",(0,pn._)`${y}.evaluated.items`);i.items=tl.mergeEvaluated.items(o,m,i.items,pn.Name)}}}Io.callRef=nl;Io.default=xN});var G_=$(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var vN=q_(),bN=V_(),_N=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",vN.default,bN.default];em.default=_N});var W_=$(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var rl=we(),Dr=rl.operators,ol={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}},wN={message:({keyword:t,schemaCode:e})=>(0,rl.str)`must be ${ol[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,rl._)`{comparison: ${ol[t].okStr}, limit: ${e}}`},SN={keyword:Object.keys(ol),type:"number",schemaType:"number",$data:!0,error:wN,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,rl._)`${n} ${ol[e].fail} ${r} || isNaN(${n})`)}};tm.default=SN});var K_=$(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Ws=we(),kN={message:({schemaCode:t})=>(0,Ws.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Ws._)`{multipleOf: ${t}}`},TN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:kN,code(t){let{gen:e,data:n,schemaCode:r,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Ws._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Ws._)`${s} !== parseInt(${s})`;t.fail$data((0,Ws._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};nm.default=TN});var Y_=$(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});function J_(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}rm.default=J_;J_.code='require("ajv/dist/runtime/ucs2length").default'});var X_=$(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Po=we(),EN=Me(),$N=Y_(),RN={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}}`},AN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:RN,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,EN.useFunc)(t.gen,$N.default)}(${n})`;t.fail$data((0,Po._)`${s} ${i} ${r}`)}};om.default=AN});var Q_=$(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var CN=Rn(),IN=Me(),wi=we(),PN={message:({schemaCode:t})=>(0,wi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,wi._)`{pattern: ${t}}`},ON={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:PN,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,IN.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,CN.usePattern)(t,o);t.fail$data((0,wi._)`!${c}.test(${n})`)}}};im.default=ON});var ew=$(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Ks=we(),zN={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Ks.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Ks._)`{limit: ${t}}`},NN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:zN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxProperties"?Ks.operators.GT:Ks.operators.LT;t.fail$data((0,Ks._)`Object.keys(${n}).length ${o} ${r}`)}};sm.default=NN});var tw=$(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var Js=Rn(),Ys=we(),jN=Me(),LN={message:({params:{missingProperty:t}})=>(0,Ys.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Ys._)`{missingProperty: ${t}}`},DN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:LN,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,jN.checkStrictMode)(s,m,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(Ys.nil,d);else for(let h of n)(0,Js.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,Js.checkMissingProp)(t,n,h)),(0,Js.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",r,h=>{t.setParams({missingProperty:h}),e.if((0,Js.noPropertyInData)(e,o,h,a.ownProperties),()=>t.error())})}function f(h,y){t.setParams({missingProperty:h}),e.forOf(h,r,()=>{e.assign(y,(0,Js.propertyInData)(e,o,h,a.ownProperties)),e.if((0,Ys.not)(y),()=>{t.error(),e.break()})},Ys.nil)}}};am.default=DN});var nw=$(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var Xs=we(),MN={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Xs.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Xs._)`{limit: ${t}}`},FN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:MN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxItems"?Xs.operators.GT:Xs.operators.LT;t.fail$data((0,Xs._)`${n}.length ${o} ${r}`)}};cm.default=FN});var il=$(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var rw=Pf();rw.code='require("ajv/dist/runtime/equal").default';lm.default=rw});var ow=$(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var um=Ds(),Ft=we(),UN=Me(),qN=il(),ZN={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}}`},BN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ZN,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,um.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,um.checkDataTypes)(l,x,a.opts.strictNumbers,um.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,UN.useFunc)(e,qN.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)})))}}};pm.default=BN});var iw=$(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var dm=we(),HN=Me(),VN=il(),GN={message:"must be equal to constant",params:({schemaCode:t})=>(0,dm._)`{allowedValue: ${t}}`},WN={keyword:"const",$data:!0,error:GN,code(t){let{gen:e,data:n,$data:r,schemaCode:o,schema:i}=t;r||i&&typeof i=="object"?t.fail$data((0,dm._)`!${(0,HN.useFunc)(e,VN.default)}(${n}, ${o})`):t.fail((0,dm._)`${i} !== ${n}`)}};fm.default=WN});var sw=$(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var Qs=we(),KN=Me(),JN=il(),YN={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Qs._)`{allowedValues: ${t}}`},XN={keyword:"enum",schemaType:"array",$data:!0,error:YN,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,KN.useFunc)(e,JN.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,Qs.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,Qs._)`${l()}(${n}, ${h})`,()=>e.assign(p,!0).break()))}function f(h,y){let v=o[y];return typeof v=="object"&&v!==null?(0,Qs._)`${l()}(${n}, ${h}[${y}])`:(0,Qs._)`${n} === ${v}`}}};mm.default=XN});var aw=$(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var QN=W_(),ej=K_(),tj=X_(),nj=Q_(),rj=ew(),oj=tw(),ij=nw(),sj=ow(),aj=iw(),cj=sw(),lj=[QN.default,ej.default,tj.default,nj.default,rj.default,oj.default,ij.default,sj.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},aj.default,cj.default];hm.default=lj});var ym=$(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.validateAdditionalItems=void 0;var Oo=we(),gm=Me(),uj={message:({params:{len:t}})=>(0,Oo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Oo._)`{limit: ${t}}`},pj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:uj,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,gm.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}cw(t,r)}};function cw(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,gm.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:gm.Type.Num},l),s.allErrors||n.if((0,Oo.not)(l),()=>n.break())})}}ea.validateAdditionalItems=cw;ea.default=pj});var xm=$(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.validateTuple=void 0;var lw=we(),sl=Me(),dj=Rn(),fj={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return uw(t,"additionalItems",e);n.items=!0,!(0,sl.alwaysValidSchema)(n,e)&&t.ok((0,dj.validateArray)(t))}};function uw(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=sl.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,lw._)`${i}.length`);n.forEach((d,f)=>{(0,sl.alwaysValidSchema)(a,d)||(r.if((0,lw._)`${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,sl.checkStrictMode)(a,x,f.strictTuples)}}}ta.validateTuple=uw;ta.default=fj});var pw=$(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var mj=xm(),hj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,mj.validateTuple)(t,"items")};vm.default=hj});var fw=$(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var dw=we(),gj=Me(),yj=Rn(),xj=ym(),vj={message:({params:{len:t}})=>(0,dw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dw._)`{limit: ${t}}`},bj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:vj,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,!(0,gj.alwaysValidSchema)(r,e)&&(o?(0,xj.validateAdditionalItems)(t,o):t.ok((0,yj.validateArray)(t)))}};bm.default=bj});var mw=$(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var Cn=we(),al=Me(),_j={message:({params:{min:t,max:e}})=>e===void 0?(0,Cn.str)`must contain at least ${t} valid item(s)`:(0,Cn.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Cn._)`{minContains: ${t}}`:(0,Cn._)`{minContains: ${t}, maxContains: ${e}}`},wj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:_j,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,Cn._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,al.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,al.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,al.alwaysValidSchema)(i,n)){let v=(0,Cn._)`${p} >= ${s}`;a!==void 0&&(v=(0,Cn._)`${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,Cn._)`${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:al.Type.Num,compositeRule:!0},v),x()})}function y(v){e.code((0,Cn._)`${v}++`),a===void 0?e.if((0,Cn._)`${v} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,Cn._)`${v} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,Cn._)`${v} >= ${s}`,()=>e.assign(d,!0)))}}};_m.default=wj});var yw=$(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateSchemaDeps=Qn.validatePropertyDeps=Qn.error=void 0;var wm=we(),Sj=Me(),na=Rn();Qn.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,wm.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,wm._)`{property: ${t},
|
|
7
|
-
missingProperty: ${
|
|
2
|
+
"use strict";var J$=Object.create;var $u=Object.defineProperty;var Y$=Object.getOwnPropertyDescriptor;var X$=Object.getOwnPropertyNames;var Q$=Object.getPrototypeOf,eR=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ma=(t,e)=>{for(var r in e)$u(t,r,{get:e[r],enumerable:!0})},tR=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of X$(e))!eR.call(t,o)&&o!==r&&$u(t,o,{get:()=>e[o],enumerable:!(n=Y$(e,o))||n.enumerable});return t};var Ee=(t,e,r)=>(r=t!=null?J$(Q$(t)):{},tR(e||!t||!t.__esModule?$u(r,"default",{value:t,enumerable:!0}):r,t));var zs=$(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 Cs=class{};Ze._CodeOrName=Cs;Ze.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Eo=class extends Cs{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=Eo;var $r=class extends Cs{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 Eo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Ze._Code=$r;Ze.nil=new $r("");function Sb(t,...e){let r=[t[0]],n=0;for(;n<e.length;)uf(r,e[n]),r.push(t[++n]);return new $r(r)}Ze._=Sb;var lf=new $r("+");function kb(t,...e){let r=[Os(t[0])],n=0;for(;n<e.length;)r.push(lf),uf(r,e[n]),r.push(lf,Os(t[++n]));return rO(r),new $r(r)}Ze.str=kb;function uf(t,e){e instanceof $r?t.push(...e._items):e instanceof Eo?t.push(e):t.push(iO(e))}Ze.addCodeArg=uf;function rO(t){let e=1;for(;e<t.length-1;){if(t[e]===lf){let r=nO(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function nO(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Eo||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 Eo))return`"${t}${e.slice(1)}`}function oO(t,e){return e.emptyStr()?t:t.emptyStr()?e:kb`${t}${e}`}Ze.strConcat=oO;function iO(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Os(Array.isArray(t)?t.join(","):t)}function sO(t){return new $r(Os(t))}Ze.stringify=sO;function Os(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ze.safeStringify=Os;function aO(t){return typeof t=="string"&&Ze.IDENTIFIER.test(t)?new $r(`.${t}`):Sb`[${t}]`}Ze.getProperty=aO;function cO(t){if(typeof t=="string"&&Ze.IDENTIFIER.test(t))return new $r(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Ze.getEsmExportName=cO;function lO(t){return new $r(t.toString())}Ze.regexpCode=lO});var ff=$(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.ValueScope=ur.ValueScopeName=ur.Scope=ur.varKinds=ur.UsedValueState=void 0;var lr=zs(),pf=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Mc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Mc||(ur.UsedValueState=Mc={}));ur.varKinds={const:new lr.Name("const"),let:new lr.Name("let"),var:new lr.Name("var")};var Fc=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof lr.Name?e:this.name(e)}name(e){return new lr.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}}};ur.Scope=Fc;var Uc=class extends lr.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,lr._)`.${new lr.Name(r)}[${n}]`}};ur.ValueScopeName=Uc;var uO=(0,lr._)`\n`,df=class extends Fc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?uO:lr.nil}}get(){return this._scope}name(e){return new Uc(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,lr._)`${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=lr.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,Mc.Started);let p=r(l);if(p){let d=this.opts.es5?ur.varKinds.var:ur.varKinds.const;i=(0,lr._)`${i}${d} ${l} = ${p};${this.opts._n}`}else if(p=o==null?void 0:o(l))i=(0,lr._)`${i}${p}${this.opts._n}`;else throw new pf(l);c.set(l,Mc.Completed)})}return i}};ur.ValueScope=df});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 je=zs(),Dr=ff(),Dn=zs();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Dn._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Dn.str}});Object.defineProperty(Se,"strConcat",{enumerable:!0,get:function(){return Dn.strConcat}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Dn.nil}});Object.defineProperty(Se,"getProperty",{enumerable:!0,get:function(){return Dn.getProperty}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Dn.stringify}});Object.defineProperty(Se,"regexpCode",{enumerable:!0,get:function(){return Dn.regexpCode}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Dn.Name}});var Hc=ff();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return Hc.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return Hc.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return Hc.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return Hc.varKinds}});Se.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 bn=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},mf=class extends bn{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Dr.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=gi(this.rhs,e,r)),this}get names(){return this.rhs instanceof je._CodeOrName?this.rhs.names:{}}},qc=class extends bn{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=gi(this.rhs,e,r),this}get names(){let e=this.lhs instanceof je.Name?{}:{...this.lhs.names};return Bc(e,this.rhs)}},hf=class extends qc{constructor(e,r,n,o){super(e,n,o),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},gf=class extends bn{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},yf=class extends bn{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},xf=class extends bn{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},vf=class extends bn{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=gi(this.code,e,r),this}get names(){return this.code instanceof je._CodeOrName?this.code.names:{}}},Ns=class extends bn{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)||(pO(e,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ao(e,r.names),{})}},_n=class extends Ns{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},bf=class extends Ns{},hi=class extends _n{};hi.kind="else";var $o=class t extends _n{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 hi(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Tb(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=gi(this.condition,e,r),this}get names(){let e=super.names;return Bc(e,this.condition),this.else&&Ao(e,this.else.names),e}};$o.kind="if";var Ro=class extends _n{};Ro.kind="for";var _f=class extends Ro{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=gi(this.iteration,e,r),this}get names(){return Ao(super.names,this.iteration.names)}},wf=class extends Ro{constructor(e,r,n,o){super(),this.varKind=e,this.name=r,this.from=n,this.to=o}render(e){let r=e.es5?Dr.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=Bc(super.names,this.from);return Bc(e,this.to)}},Zc=class extends Ro{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=gi(this.iterable,e,r),this}get names(){return Ao(super.names,this.iterable.names)}},Ls=class extends _n{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)}};Ls.kind="func";var js=class extends Ns{render(e){return"return "+super.render(e)}};js.kind="return";var Sf=class extends _n{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&&Ao(e,this.catch.names),this.finally&&Ao(e,this.finally.names),e}},Ds=class extends _n{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ds.kind="catch";var Ms=class extends _n{render(e){return"finally"+super.render(e)}};Ms.kind="finally";var kf=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
3
|
+
`:""},this._extScope=e,this._scope=new Dr.Scope({parent:e}),this._nodes=[new bf]}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 mf(e,i,n)),i}const(e,r,n){return this._def(Dr.varKinds.const,e,r,n)}let(e,r,n){return this._def(Dr.varKinds.let,e,r,n)}var(e,r,n){return this._def(Dr.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new qc(e,r,n))}add(e,r){return this._leafNode(new hf(e,Se.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==je.nil&&this._leafNode(new vf(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 hi)}endIf(){return this._endBlockNode($o,hi)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new _f(e),r)}forRange(e,r,n,o,i=this.opts.es5?Dr.varKinds.var:Dr.varKinds.let){let s=this._scope.toName(e);return this._for(new wf(i,s,r,n),()=>o(s))}forOf(e,r,n,o=Dr.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?Dr.varKinds.var:Dr.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(Ro)}label(e){return this._leafNode(new gf(e))}break(e){return this._leafNode(new yf(e))}return(e){let r=new js;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(js)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Sf;if(this._blockNode(o),this.code(e),r){let i=this.name("e");this._currNode=o.catch=new Ds(i),r(i)}return n&&(this._currNode=o.finally=new Ms,this.code(n)),this._endBlockNode(Ds,Ms)}throw(e){return this._leafNode(new xf(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 Ls(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Ls)}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}};Se.CodeGen=kf;function Ao(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Bc(t,e){return e instanceof je._CodeOrName?Ao(t,e.names):t}function gi(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 pO(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Tb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,je._)`!${Tf(t)}`}Se.not=Tb;var dO=Eb(Se.operators.AND);function fO(...t){return t.reduce(dO)}Se.and=fO;var mO=Eb(Se.operators.OR);function hO(...t){return t.reduce(mO)}Se.or=hO;function Eb(t){return(e,r)=>e===je.nil?r:r===je.nil?e:(0,je._)`${Tf(e)} ${t} ${Tf(r)}`}function Tf(t){return t instanceof je.Name?t:(0,je._)`(${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 Qe=we(),gO=zs();function yO(t){let e={};for(let r of t)e[r]=!0;return e}$e.toHash=yO;function xO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ab(t,e),!Ib(e,t.self.RULES.all))}$e.alwaysValidSchema=xO;function Ab(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]||Ob(t,`unknown keyword: "${i}"`)}$e.checkUnknownRules=Ab;function Ib(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}$e.schemaHasRules=Ib;function vO(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}$e.schemaHasRulesButRef=vO;function bO({topSchemaRef:t,schemaPath:e},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Qe._)`${r}`}return(0,Qe._)`${t}${e}${(0,Qe.getProperty)(n)}`}$e.schemaRefOrVal=bO;function _O(t){return Pb(decodeURIComponent(t))}$e.unescapeFragment=_O;function wO(t){return encodeURIComponent($f(t))}$e.escapeFragment=wO;function $f(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}$e.escapeJsonPointer=$f;function Pb(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}$e.unescapeJsonPointer=Pb;function SO(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}$e.eachItem=SO;function $b({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof Qe.Name?(i instanceof Qe.Name?t(o,i,s):e(o,i,s),s):i instanceof Qe.Name?(e(o,s,i),i):r(i,s);return a===Qe.Name&&!(c instanceof Qe.Name)?n(o,c):c}}$e.mergeEvaluated={props:$b({mergeNames:(t,e,r)=>t.if((0,Qe._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Qe._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Qe._)`${r} || {}`).code((0,Qe._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Qe._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Qe._)`${r} || {}`),Rf(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Cb}),items:$b({mergeNames:(t,e,r)=>t.if((0,Qe._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Qe._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Qe._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Qe._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Cb(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Qe._)`{}`);return e!==void 0&&Rf(t,r,e),r}$e.evaluatedPropsToName=Cb;function Rf(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Qe._)`${e}${(0,Qe.getProperty)(n)}`,!0))}$e.setEvaluated=Rf;var Rb={};function kO(t,e){return t.scopeValue("func",{ref:e,code:Rb[e.code]||(Rb[e.code]=new gO._Code(e.code))})}$e.useFunc=kO;var Ef;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Ef||($e.Type=Ef={}));function TO(t,e,r){if(t instanceof Qe.Name){let n=e===Ef.Num;return r?n?(0,Qe._)`"[" + ${t} + "]"`:(0,Qe._)`"['" + ${t} + "']"`:n?(0,Qe._)`"/" + ${t}`:(0,Qe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Qe.getProperty)(t).toString():"/"+$f(t)}$e.getErrorPath=TO;function Ob(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}$e.checkStrictMode=Ob});var wn=$(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var Gt=we(),EO={data:new Gt.Name("data"),valCxt:new Gt.Name("valCxt"),instancePath:new Gt.Name("instancePath"),parentData:new Gt.Name("parentData"),parentDataProperty:new Gt.Name("parentDataProperty"),rootData:new Gt.Name("rootData"),dynamicAnchors:new Gt.Name("dynamicAnchors"),vErrors:new Gt.Name("vErrors"),errors:new Gt.Name("errors"),this:new Gt.Name("this"),self:new Gt.Name("self"),scope:new Gt.Name("scope"),json:new Gt.Name("json"),jsonPos:new Gt.Name("jsonPos"),jsonLen:new Gt.Name("jsonLen"),jsonPart:new Gt.Name("jsonPart")};Af.default=EO});var Fs=$(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.extendErrors=Wt.resetErrorsCount=Wt.reportExtraError=Wt.reportError=Wt.keyword$DataError=Wt.keywordError=void 0;var Fe=we(),Vc=Me(),tr=wn();Wt.keywordError={message:({keyword:t})=>(0,Fe.str)`must pass "${t}" keyword validation`};Wt.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 $O(t,e=Wt.keywordError,r,n){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=Lb(t,e,r);n??(s||a)?zb(i,c):Nb(o,(0,Fe._)`[${c}]`)}Wt.reportError=$O;function RO(t,e=Wt.keywordError,r){let{it:n}=t,{gen:o,compositeRule:i,allErrors:s}=n,a=Lb(t,e,r);zb(o,a),i||s||Nb(n,tr.default.vErrors)}Wt.reportExtraError=RO;function AO(t,e){t.assign(tr.default.errors,e),t.if((0,Fe._)`${tr.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,Fe._)`${tr.default.vErrors}.length`,e),()=>t.assign(tr.default.vErrors,null)))}Wt.resetErrorsCount=AO;function IO({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,tr.default.errors,a=>{t.const(s,(0,Fe._)`${tr.default.vErrors}[${a}]`),t.if((0,Fe._)`${s}.instancePath === undefined`,()=>t.assign((0,Fe._)`${s}.instancePath`,(0,Fe.strConcat)(tr.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`,r),t.assign((0,Fe._)`${s}.data`,n))})}Wt.extendErrors=IO;function zb(t,e){let r=t.const("err",e);t.if((0,Fe._)`${tr.default.vErrors} === null`,()=>t.assign(tr.default.vErrors,(0,Fe._)`[${r}]`),(0,Fe._)`${tr.default.vErrors}.push(${r})`),t.code((0,Fe._)`${tr.default.errors}++`)}function Nb(t,e){let{gen:r,validateName:n,schemaEnv:o}=t;o.$async?r.throw((0,Fe._)`new ${t.ValidationError}(${e})`):(r.assign((0,Fe._)`${n}.errors`,e),r.return(!1))}var Io={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 Lb(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,Fe._)`{}`:PO(t,e,r)}function PO(t,e,r={}){let{gen:n,it:o}=t,i=[CO(o,r),OO(t,r)];return zO(t,e,i),n.object(...i)}function CO({errorPath:t},{instancePath:e}){let r=e?(0,Fe.str)`${t}${(0,Vc.getErrorPath)(e,Vc.Type.Str)}`:t;return[tr.default.instancePath,(0,Fe.strConcat)(tr.default.instancePath,r)]}function OO({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let o=n?e:(0,Fe.str)`${e}/${t}`;return r&&(o=(0,Fe.str)`${o}${(0,Vc.getErrorPath)(r,Vc.Type.Str)}`),[Io.schemaPath,o]}function zO(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([Io.keyword,o],[Io.params,typeof e=="function"?e(t):e||(0,Fe._)`{}`]),c.messages&&n.push([Io.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Io.schema,s],[Io.parentSchema,(0,Fe._)`${p}${d}`],[tr.default.data,i]),l&&n.push([Io.propertyName,l])}});var Db=$(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.boolOrEmptySchema=yi.topBoolOrEmptySchema=void 0;var NO=Fs(),LO=we(),jO=wn(),DO={message:"boolean schema is false"};function MO(t){let{gen:e,schema:r,validateName:n}=t;r===!1?jb(t,!1):typeof r=="object"&&r.$async===!0?e.return(jO.default.data):(e.assign((0,LO._)`${n}.errors`,null),e.return(!0))}yi.topBoolOrEmptySchema=MO;function FO(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),jb(t)):r.var(e,!0)}yi.boolOrEmptySchema=FO;function jb(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,NO.reportError)(o,DO,void 0,e)}});var If=$(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.getRules=xi.isJSONType=void 0;var UO=["string","number","integer","boolean","null","object","array"],qO=new Set(UO);function ZO(t){return typeof t=="string"&&qO.has(t)}xi.isJSONType=ZO;function BO(){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:{}}}xi.getRules=BO});var Pf=$(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.shouldUseRule=Mn.shouldUseGroup=Mn.schemaHasRulesForType=void 0;function HO({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Mb(t,n)}Mn.schemaHasRulesForType=HO;function Mb(t,e){return e.rules.some(r=>Fb(t,r))}Mn.shouldUseGroup=Mb;function Fb(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))}Mn.shouldUseRule=Fb});var Us=$(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.reportTypeError=Kt.checkDataTypes=Kt.checkDataType=Kt.coerceAndCheckDataType=Kt.getJSONTypes=Kt.getSchemaTypes=Kt.DataType=void 0;var VO=If(),GO=Pf(),WO=Fs(),ve=we(),Ub=Me(),vi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(vi||(Kt.DataType=vi={}));function KO(t){let e=qb(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}Kt.getSchemaTypes=KO;function qb(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(VO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Kt.getJSONTypes=qb;function JO(t,e){let{gen:r,data:n,opts:o}=t,i=YO(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,GO.schemaHasRulesForType)(t,e[0]));if(s){let a=Of(e,n,o.strictNumbers,vi.Wrong);r.if(a,()=>{i.length?XO(t,e,i):zf(t)})}return s}Kt.coerceAndCheckDataType=JO;var Zb=new Set(["string","number","integer","boolean","null"]);function YO(t,e){return e?t.filter(r=>Zb.has(r)||e==="array"&&r==="array"):[]}function XO(t,e,r){let{gen:n,data:o,opts:i}=t,s=n.let("dataType",(0,ve._)`typeof ${o}`),a=n.let("coerced",(0,ve._)`undefined`);i.coerceTypes==="array"&&n.if((0,ve._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,ve._)`${o}[0]`).assign(s,(0,ve._)`typeof ${o}`).if(Of(e,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,ve._)`${a} !== undefined`);for(let l of r)(Zb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);n.else(),zf(t),n.endIf(),n.if((0,ve._)`${a} !== undefined`,()=>{n.assign(o,a),QO(t,a)});function c(l){switch(l){case"string":n.elseIf((0,ve._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ve._)`"" + ${o}`).elseIf((0,ve._)`${o} === null`).assign(a,(0,ve._)`""`);return;case"number":n.elseIf((0,ve._)`${s} == "boolean" || ${o} === null
|
|
4
|
+
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,ve._)`+${o}`);return;case"integer":n.elseIf((0,ve._)`${s} === "boolean" || ${o} === null
|
|
5
|
+
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ve._)`+${o}`);return;case"boolean":n.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":n.elseIf((0,ve._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,ve._)`${s} === "string" || ${s} === "number"
|
|
6
|
+
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,ve._)`[${o}]`)}}}function QO({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ve._)`${e} !== undefined`,()=>t.assign((0,ve._)`${e}[${r}]`,n))}function Cf(t,e,r,n=vi.Correct){let o=n===vi.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 n===vi.Correct?i:(0,ve.not)(i);function s(a=ve.nil){return(0,ve.and)((0,ve._)`typeof ${e} == "number"`,a,r?(0,ve._)`isFinite(${e})`:ve.nil)}}Kt.checkDataType=Cf;function Of(t,e,r,n){if(t.length===1)return Cf(t[0],e,r,n);let o,i=(0,Ub.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,Cf(s,e,r,n));return o}Kt.checkDataTypes=Of;var e1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ve._)`{type: ${t}}`:(0,ve._)`{type: ${e}}`};function zf(t){let e=t1(t);(0,WO.reportError)(e,e1)}Kt.reportTypeError=zf;function t1(t){let{gen:e,data:r,schema:n}=t,o=(0,Ub.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:t}}});var Hb=$(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.assignDefaults=void 0;var bi=we(),r1=Me();function n1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let o in r)Bb(t,o,r[o].default);else e==="array"&&Array.isArray(n)&&n.forEach((o,i)=>Bb(t,i,o.default))}Gc.assignDefaults=n1;function Bb(t,e,r){let{gen:n,compositeRule:o,data:i,opts:s}=t;if(r===void 0)return;let a=(0,bi._)`${i}${(0,bi.getProperty)(e)}`;if(o){(0,r1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,bi._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,bi._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,bi._)`${a} = ${(0,bi.stringify)(r)}`)}});var Rr=$(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.validateUnion=Ye.validateArray=Ye.usePattern=Ye.callValidateCode=Ye.schemaProperties=Ye.allSchemaProperties=Ye.noPropertyInData=Ye.propertyInData=Ye.isOwnProperty=Ye.hasPropFunc=Ye.reportMissingProp=Ye.checkMissingProp=Ye.checkReportMissingProp=void 0;var ut=we(),Nf=Me(),Fn=wn(),o1=Me();function i1(t,e){let{gen:r,data:n,it:o}=t;r.if(jf(r,n,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ut._)`${e}`},!0),t.error()})}Ye.checkReportMissingProp=i1;function s1({gen:t,data:e,it:{opts:r}},n,o){return(0,ut.or)(...n.map(i=>(0,ut.and)(jf(t,e,i,r.ownProperties),(0,ut._)`${o} = ${i}`)))}Ye.checkMissingProp=s1;function a1(t,e){t.setParams({missingProperty:e},!0),t.error()}Ye.reportMissingProp=a1;function Vb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ut._)`Object.prototype.hasOwnProperty`})}Ye.hasPropFunc=Vb;function Lf(t,e,r){return(0,ut._)`${Vb(t)}.call(${e}, ${r})`}Ye.isOwnProperty=Lf;function c1(t,e,r,n){let o=(0,ut._)`${e}${(0,ut.getProperty)(r)} !== undefined`;return n?(0,ut._)`${o} && ${Lf(t,e,r)}`:o}Ye.propertyInData=c1;function jf(t,e,r,n){let o=(0,ut._)`${e}${(0,ut.getProperty)(r)} === undefined`;return n?(0,ut.or)(o,(0,ut.not)(Lf(t,e,r))):o}Ye.noPropertyInData=jf;function Gb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ye.allSchemaProperties=Gb;function l1(t,e){return Gb(e).filter(r=>!(0,Nf.alwaysValidSchema)(t,e[r]))}Ye.schemaProperties=l1;function u1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,l){let p=l?(0,ut._)`${t}, ${e}, ${n}${o}`:e,d=[[Fn.default.instancePath,(0,ut.strConcat)(Fn.default.instancePath,i)],[Fn.default.parentData,s.parentData],[Fn.default.parentDataProperty,s.parentDataProperty],[Fn.default.rootData,Fn.default.rootData]];s.opts.dynamicRef&&d.push([Fn.default.dynamicAnchors,Fn.default.dynamicAnchors]);let f=(0,ut._)`${p}, ${r.object(...d)}`;return c!==ut.nil?(0,ut._)`${a}.call(${c}, ${f})`:(0,ut._)`${a}(${f})`}Ye.callValidateCode=u1;var p1=(0,ut._)`new RegExp`;function d1({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,ut._)`${o.code==="new RegExp"?p1:(0,o1.useFunc)(t,o)}(${r}, ${n})`})}Ye.usePattern=d1;function f1(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,ut._)`${r}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:n,dataProp:l,dataPropType:Nf.Type.Num},i),e.if((0,ut.not)(i),a)})}}Ye.validateArray=f1;function m1(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,Nf.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,ut._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ut.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Ye.validateUnion=m1});var Jb=$(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.validateKeywordUsage=Qr.validSchemaType=Qr.funcKeywordCode=Qr.macroKeywordCode=void 0;var rr=we(),Po=wn(),h1=Rr(),g1=Fs();function y1(t,e){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=Kb(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");t.subschema({schema:a,schemaPath:rr.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Qr.macroKeywordCode=y1;function x1(t,e){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;b1(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=Kb(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)x(),e.modifying&&Wb(t),v(()=>t.error());else{let y=e.async?m():g();e.modifying&&Wb(t),v(()=>v1(t,y))}}function m(){let y=n.let("ruleErrs",null);return n.try(()=>x((0,rr._)`await `),b=>n.assign(d,!1).if((0,rr._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(y,(0,rr._)`${b}.errors`),()=>n.throw(b))),y}function g(){let y=(0,rr._)`${p}.errors`;return n.assign(y,null),x(rr.nil),y}function x(y=e.async?(0,rr._)`await `:rr.nil){let b=c.opts.passContext?Po.default.this:Po.default.self,w=!("compile"in e&&!a||e.schema===!1);n.assign(d,(0,rr._)`${y}${(0,h1.callValidateCode)(t,p,b,w)}`,e.modifying)}function v(y){var b;n.if((0,rr.not)((b=e.valid)!==null&&b!==void 0?b:d),y)}}Qr.funcKeywordCode=x1;function Wb(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,rr._)`${n.parentData}[${n.parentDataProperty}]`))}function v1(t,e){let{gen:r}=t;r.if((0,rr._)`Array.isArray(${e})`,()=>{r.assign(Po.default.vErrors,(0,rr._)`${Po.default.vErrors} === null ? ${e} : ${Po.default.vErrors}.concat(${e})`).assign(Po.default.errors,(0,rr._)`${Po.default.vErrors}.length`),(0,g1.extendErrors)(t)},()=>t.error())}function b1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Kb(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,rr.stringify)(r)})}function _1(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=_1;function w1({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=w1});var Xb=$(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.extendSubschemaMode=Un.extendSubschemaData=Un.getSubschema=void 0;var en=we(),Yb=Me();function S1(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,Yb.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')}Un.getSubschema=S1;function k1(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,Yb.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]}}Un.extendSubschemaData=k1;function T1(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}Un.extendSubschemaMode=T1});var Df=$((uH,Qb)=>{"use strict";Qb.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 t_=$((pH,e_)=>{"use strict";var qn=e_.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(){};Wc(e,n,o,t,"",t)};qn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};qn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};qn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};qn.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 Wc(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 qn.arrayKeywords)for(var f=0;f<d.length;f++)Wc(t,e,r,d[f],o+"/"+p+"/"+f,i,o,p,n,f)}else if(p in qn.propsKeywords){if(d&&typeof d=="object")for(var m in d)Wc(t,e,r,d[m],o+"/"+p+"/"+E1(m),i,o,p,n,m)}else(p in qn.keywords||t.allKeys&&!(p in qn.skipKeywords))&&Wc(t,e,r,d,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,l)}}function E1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var qs=$(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.getSchemaRefs=pr.resolveUrl=pr.normalizeId=pr._getFullPath=pr.getFullPath=pr.inlineRef=void 0;var $1=Me(),R1=Df(),A1=t_(),I1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Mf(t):e?r_(t)<=e:!1}pr.inlineRef=P1;var C1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Mf(t){for(let e in t){if(C1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Mf)||typeof r=="object"&&Mf(r))return!0}return!1}function r_(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!I1.has(r)&&(typeof t[r]=="object"&&(0,$1.eachItem)(t[r],n=>e+=r_(n)),e===1/0))return 1/0}return e}function n_(t,e="",r){r!==!1&&(e=_i(e));let n=t.parse(e);return o_(t,n)}pr.getFullPath=n_;function o_(t,e){return t.serialize(e).split("#")[0]+"#"}pr._getFullPath=o_;var O1=/#\/?$/;function _i(t){return t?t.replace(O1,""):""}pr.normalizeId=_i;function z1(t,e,r){return r=_i(r),t.resolve(e,r)}pr.resolveUrl=z1;var N1=/^[a-z_][-a-z0-9._]*$/i;function L1(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=_i(t[r]||e),i={"":o},s=n_(n,o,!1),a={},c=new Set;return A1(t,{allKeys:!0},(d,f,m,g)=>{if(g===void 0)return;let x=s+f,v=i[g];typeof d[r]=="string"&&(v=y.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),i[f]=v;function y(w){let k=this.opts.uriResolver.resolve;if(w=_i(v?k(v,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!==_i(x)&&(w[0]==="#"?(l(d,a[w],w),a[w]=d):this.refs[w]=x),w}function b(w){if(typeof w=="string"){if(!N1.test(w))throw new Error(`invalid anchor "${w}"`);y.call(this,`#${w}`)}}}),a;function l(d,f,m){if(f!==void 0&&!R1(d,f))throw p(m)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}pr.getSchemaRefs=L1});var Hs=$(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.getData=Zn.KeywordCxt=Zn.validateFunctionCode=void 0;var l_=Db(),i_=Us(),Uf=Pf(),Kc=Us(),j1=Hb(),Bs=Jb(),Ff=Xb(),oe=we(),he=wn(),D1=qs(),Sn=Me(),Zs=Fs();function M1(t){if(d_(t)&&(f_(t),p_(t))){q1(t);return}u_(t,()=>(0,l_.topBoolOrEmptySchema)(t))}Zn.validateFunctionCode=M1;function u_({gen:t,validateName:e,schema:r,schemaEnv:n,opts:o},i){o.code.es5?t.func(e,(0,oe._)`${he.default.data}, ${he.default.valCxt}`,n.$async,()=>{t.code((0,oe._)`"use strict"; ${s_(r,o)}`),U1(t,o),t.code(i)}):t.func(e,(0,oe._)`${he.default.data}, ${F1(o)}`,n.$async,()=>t.code(s_(r,o)).code(i))}function F1(t){return(0,oe._)`{${he.default.instancePath}="", ${he.default.parentData}, ${he.default.parentDataProperty}, ${he.default.rootData}=${he.default.data}${t.dynamicRef?(0,oe._)`, ${he.default.dynamicAnchors}={}`:oe.nil}}={}`}function U1(t,e){t.if(he.default.valCxt,()=>{t.var(he.default.instancePath,(0,oe._)`${he.default.valCxt}.${he.default.instancePath}`),t.var(he.default.parentData,(0,oe._)`${he.default.valCxt}.${he.default.parentData}`),t.var(he.default.parentDataProperty,(0,oe._)`${he.default.valCxt}.${he.default.parentDataProperty}`),t.var(he.default.rootData,(0,oe._)`${he.default.valCxt}.${he.default.rootData}`),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,oe._)`${he.default.valCxt}.${he.default.dynamicAnchors}`)},()=>{t.var(he.default.instancePath,(0,oe._)`""`),t.var(he.default.parentData,(0,oe._)`undefined`),t.var(he.default.parentDataProperty,(0,oe._)`undefined`),t.var(he.default.rootData,he.default.data),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,oe._)`{}`)})}function q1(t){let{schema:e,opts:r,gen:n}=t;u_(t,()=>{r.$comment&&e.$comment&&h_(t),G1(t),n.let(he.default.vErrors,null),n.let(he.default.errors,0),r.unevaluated&&Z1(t),m_(t),J1(t)})}function Z1(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,oe._)`${r}.evaluated`),e.if((0,oe._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,oe._)`${t.evaluated}.props`,(0,oe._)`undefined`)),e.if((0,oe._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,oe._)`${t.evaluated}.items`,(0,oe._)`undefined`))}function s_(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,oe._)`/*# sourceURL=${r} */`:oe.nil}function B1(t,e){if(d_(t)&&(f_(t),p_(t))){H1(t,e);return}(0,l_.boolOrEmptySchema)(t,e)}function p_({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 d_(t){return typeof t.schema!="boolean"}function H1(t,e){let{schema:r,gen:n,opts:o}=t;o.$comment&&r.$comment&&h_(t),W1(t),K1(t);let i=n.const("_errs",he.default.errors);m_(t,i),n.var(e,(0,oe._)`${i} === ${he.default.errors}`)}function f_(t){(0,Sn.checkUnknownRules)(t),V1(t)}function m_(t,e){if(t.opts.jtd)return a_(t,[],!1,e);let r=(0,i_.getSchemaTypes)(t.schema),n=(0,i_.coerceAndCheckDataType)(t,r);a_(t,r,!n,e)}function V1(t){let{schema:e,errSchemaPath:r,opts:n,self:o}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Sn.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function G1(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Sn.checkStrictMode)(t,"default is ignored in the schema root")}function W1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,D1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function K1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function h_({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)t.code((0,oe._)`${he.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,oe.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,oe._)`${he.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function J1(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=t;r.$async?e.if((0,oe._)`${he.default.errors} === 0`,()=>e.return(he.default.data),()=>e.throw((0,oe._)`new ${o}(${he.default.vErrors})`)):(e.assign((0,oe._)`${n}.errors`,he.default.vErrors),i.unevaluated&&Y1(t),e.return((0,oe._)`${he.default.errors} === 0`))}function Y1({gen:t,evaluated:e,props:r,items:n}){r instanceof oe.Name&&t.assign((0,oe._)`${e}.props`,r),n instanceof oe.Name&&t.assign((0,oe._)`${e}.items`,n)}function a_(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,Sn.schemaHasRulesButRef)(i,p))){o.block(()=>y_(t,"$ref",p.all.$ref.definition));return}c.jtd||X1(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,Uf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Kc.checkDataType)(f.type,s,c.strictNumbers)),c_(t,f),e.length===1&&e[0]===f.type&&r&&(o.else(),(0,Kc.reportTypeError)(t)),o.endIf()):c_(t,f),a||o.if((0,oe._)`${he.default.errors} === ${n||0}`))}}function c_(t,e){let{gen:r,schema:n,opts:{useDefaults:o}}=t;o&&(0,j1.assignDefaults)(t,e.type),r.block(()=>{for(let i of e.rules)(0,Uf.shouldUseRule)(n,i)&&y_(t,i.keyword,i.definition,e.type)})}function X1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Q1(t,e),t.opts.allowUnionTypes||ez(t,e),tz(t,t.dataTypes))}function Q1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{g_(t.dataTypes,r)||qf(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),nz(t,e)}}function ez(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&qf(t,"use allowUnionTypes to allow union type keyword")}function tz(t,e){let r=t.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,Uf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>rz(e,s))&&qf(t,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function rz(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function g_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function nz(t,e){let r=[];for(let n of t.dataTypes)g_(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function qf(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Sn.checkStrictMode)(t,e,t.opts.strictTypes)}var Jc=class{constructor(e,r,n){if((0,Bs.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,Sn.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",x_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Bs.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",he.default.errors))}result(e,r,n){this.failResult((0,oe.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,oe.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,oe._)`${r} !== undefined && (${(0,oe.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?Zs.reportExtraError:Zs.reportError)(this,this.def.error,r)}$dataError(){(0,Zs.reportError)(this,this.def.$dataError||Zs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Zs.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=oe.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=oe.nil,r=oe.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,oe.or)((0,oe._)`${o} === undefined`,r)),e!==oe.nil&&n.assign(e,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==oe.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,oe.or)(s(),a());function s(){if(n.length){if(!(r instanceof oe.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,oe._)`${(0,Kc.checkDataTypes)(c,r,i.opts.strictNumbers,Kc.DataType.Wrong)}`}return oe.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,oe._)`!${c}(${r})`}return oe.nil}}subschema(e,r){let n=(0,Ff.getSubschema)(this.it,e);(0,Ff.extendSubschemaData)(n,this.it,e),(0,Ff.extendSubschemaMode)(n,e);let o={...this.it,...n,items:void 0,props:void 0};return B1(o,r),o}mergeEvaluated(e,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Sn.mergeEvaluated.props(o,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Sn.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,oe.Name)),!0}};Zn.KeywordCxt=Jc;function y_(t,e,r,n){let o=new Jc(t,r,e);"code"in r?r.code(o,n):o.$data&&r.validate?(0,Bs.funcKeywordCode)(o,r):"macro"in r?(0,Bs.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,Bs.funcKeywordCode)(o,r)}var oz=/^\/(?:[^~]|~0|~1)*$/,iz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x_(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let o,i;if(t==="")return he.default.rootData;if(t[0]==="/"){if(!oz.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=he.default.rootData}else{let l=iz.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,oe._)`${i}${(0,oe.getProperty)((0,Sn.unescapeJsonPointer)(l))}`,s=(0,oe._)`${s} && ${i}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}Zn.getData=x_});var Yc=$(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});var Zf=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Bf.default=Zf});var Vs=$(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var Hf=qs(),Vf=class extends Error{constructor(e,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Hf.resolveUrl)(e,r,n),this.missingSchema=(0,Hf.normalizeId)((0,Hf.getFullPath)(e,this.missingRef))}};Gf.default=Vf});var Qc=$(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.resolveSchema=Ar.getCompilingSchema=Ar.resolveRef=Ar.compileSchema=Ar.SchemaEnv=void 0;var Mr=we(),sz=Yc(),Co=wn(),Fr=qs(),v_=Me(),az=Hs(),wi=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={}}};Ar.SchemaEnv=wi;function Kf(t){let e=b_.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 Mr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;t.$async&&(a=s.scopeValue("Error",{ref:sz.default,code:(0,Mr._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Co.default.data,parentData:Co.default.parentData,parentDataProperty:Co.default.parentDataProperty,dataNames:[Co.default.data],dataPathArr:[Mr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Mr.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Mr.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Mr._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,az.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Co.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${Co.default.self}`,`${Co.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:g,items:x}=l;m.evaluated={props:g instanceof Mr.Name?void 0:g,items:x instanceof Mr.Name?void 0:x,dynamicProps:g instanceof Mr.Name,dynamicItems:x instanceof Mr.Name},m.source&&(m.source.evaluated=(0,Mr.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)}}Ar.compileSchema=Kf;function cz(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=pz.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 wi({schema:s,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[r]=lz.call(this,i)}Ar.resolveRef=cz;function lz(t){return(0,Fr.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Kf.call(this,t)}function b_(t){for(let e of this._compilations)if(uz(e,t))return e}Ar.getCompilingSchema=b_;function uz(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function pz(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Xc.call(this,t,e)}function Xc(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 Wf.call(this,r,t);let i=(0,Fr.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Xc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:Wf.call(this,r,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Kf.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 wi({schema:a,schemaId:c,root:t,baseId:o})}return Wf.call(this,r,s)}}Ar.resolveSchema=Xc;var dz=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Wf(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,v_.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!dz.has(a)&&l&&(e=(0,Fr.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,v_.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Fr.resolveUrl)(this.opts.uriResolver,e,r.$ref);i=Xc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new wi({schema:r,schemaId:s,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var __=$((yH,fz)=>{fz.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 Xf=$((xH,$_)=>{"use strict";var mz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),S_=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),Jf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),k_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),hz=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Yf(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 gz=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function w_(t){return t.length=0,!0}function yz(t,e,r){if(t.length){let n=Yf(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function xz(t){let e=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=yz;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=w_}else{o.push(l);continue}}return o.length&&(a===w_?r.zone=o.join(""):s?n.push(o.join("")):n.push(Yf(o))),r.address=n.join(""),r}function T_(t){if(vz(t,":")<2)return{host:t,isIPV6:!1};let e=xz(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 vz(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function bz(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 _z={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},wz=/[@/?#:]/g,Sz=/[@/?#]/g;function E_(t,e){let r=e?Sz:wz;return r.lastIndex=0,t.replace(r,n=>_z[n])}function kz(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(Jf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&k_(s)?r+=s:r+="%"+i,n+=2;continue}}r+=t[n]}return r}function Tz(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(Jf(n)){let o=n.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&k_(i)?e+=i:e+="%"+o,r+=2;continue}}hz(t[r])?e+=t[r]:e+=escape(t[r])}return e}function Ez(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(Jf(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function $z(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!S_(r)){let n=T_(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=E_(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}$_.exports={nonSimpleDomain:gz,recomposeAuthority:$z,reescapeHostDelimiters:E_,normalizePercentEncoding:kz,normalizePathEncoding:Tz,escapePreservingEscapes:Ez,removeDotSegments:bz,isIPv4:S_,isUUID:mz,normalizeIPv6:T_,stringArrayToHexStripped:Yf}});var C_=$((vH,P_)=>{"use strict";var{isUUID:Rz}=Xf(),Az=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Iz=["http","https","ws","wss","urn","urn:uuid"];function Pz(t){return Iz.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 R_(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function A_(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 Cz(t){return t.secure=Qf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Oz(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 zz(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Az);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=em(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Nz(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=em(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 Lz(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Rz(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function jz(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var I_={scheme:"http",domainHost:!0,parse:R_,serialize:A_},Dz={scheme:"https",domainHost:I_.domainHost,parse:R_,serialize:A_},el={scheme:"ws",domainHost:!0,parse:Cz,serialize:Oz},Mz={scheme:"wss",domainHost:el.domainHost,parse:el.parse,serialize:el.serialize},Fz={scheme:"urn",parse:zz,serialize:Nz,skipNormalize:!0},Uz={scheme:"urn:uuid",parse:Lz,serialize:jz,skipNormalize:!0},tl={http:I_,https:Dz,ws:el,wss:Mz,urn:Fz,"urn:uuid":Uz};Object.setPrototypeOf(tl,null);function em(t){return t&&(tl[t]||tl[t.toLowerCase()])||void 0}P_.exports={wsIsSecure:Qf,SCHEMES:tl,isValidSchemeName:Pz,getSchemeHandler:em}});var j_=$((bH,ol)=>{"use strict";var{normalizeIPv6:qz,removeDotSegments:Gs,recomposeAuthority:Zz,normalizePercentEncoding:Bz,normalizePathEncoding:Hz,escapePreservingEscapes:Vz,reescapeHostDelimiters:Gz,isIPv4:Wz,nonSimpleDomain:Kz}=Xf(),{SCHEMES:Jz,getSchemeHandler:z_}=C_();function Yz(t,e){return typeof t=="string"?t=oN(t,e):typeof t=="object"&&(t=nl(Oo(t,e),e)),t}function Xz(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:o,malformedAuthorityOrPort:i}=rl(t,n),{parsed:s,malformedAuthorityOrPort:a}=rl(e,n);if(i||a)throw new Error(o.error||s.error||"URI is malformed.");let c=N_(o,s,n,!0);return n.skipEscape=!0,Oo(c,n)}function N_(t,e,r,n){let o={};return n||(t=nl(Oo(t,r),r),e=nl(Oo(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=Gs(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=Gs(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Gs(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=Gs(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 Qz(t,e,r){let n=O_(t,r),o=O_(e,r);return n!==void 0&&o!==void 0&&n.toLowerCase()===o.toLowerCase()}function Oo(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=z_(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=Bz(r.path):(r.path=Vz(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let s=Zz(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=Gs(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 eN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,tN=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,rN=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function nN(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 rl(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(tN);s!==null&&s[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",o=!0);let a=t.match(rN);if(a!==null){let l=a[1],p=l.replace(/[\t\n\r]/g,"");p.length>=2&&(p.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",o=!0):l.length!==p.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",o=!0))}let c=t.match(eN);if(c){n.scheme=c[1],n.userinfo=c[3],n.host=c[4],n.port=parseInt(c[5],10),n.path=c[6]||"",n.query=c[7],n.fragment=c[8],isNaN(n.port)&&(n.port=c[5]);let l=nN(n,c);if(l!==void 0&&(n.error=n.error||l,o=!0),n.host)if(Wz(n.host)===!1){let f=qz(n.host);n.host=f.host.toLowerCase(),i=f.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 p=z_(r.scheme||n.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&n.host&&(r.domainHost||p&&p.domainHost)&&i===!1&&Kz(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(d){n.error=n.error||"Host's domain name can not be converted to ASCII: "+d}if((!p||p&&!p.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=Gz(unescape(n.host),i))),n.path&&(n.path=Hz(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}p&&p.parse&&p.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:o}}function nl(t,e){return rl(t,e).parsed}function oN(t,e){return L_(t,e).normalized}function L_(t,e){let{parsed:r,malformedAuthorityOrPort:n}=rl(t,e);return{normalized:n?t:Oo(r,e),malformedAuthorityOrPort:n}}function O_(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=L_(t,e);return n?void 0:r}if(typeof t=="object")return Oo(t,e)}var tm={SCHEMES:Jz,normalize:Yz,resolve:Xz,resolveComponent:N_,equal:Qz,serialize:Oo,parse:nl};ol.exports=tm;ol.exports.default=tm;ol.exports.fastUri=tm});var M_=$(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var D_=j_();D_.code='require("ajv/dist/runtime/uri").default';rm.default=D_});var G_=$(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.CodeGen=Ft.Name=Ft.nil=Ft.stringify=Ft.str=Ft._=Ft.KeywordCxt=void 0;var iN=Hs();Object.defineProperty(Ft,"KeywordCxt",{enumerable:!0,get:function(){return iN.KeywordCxt}});var Si=we();Object.defineProperty(Ft,"_",{enumerable:!0,get:function(){return Si._}});Object.defineProperty(Ft,"str",{enumerable:!0,get:function(){return Si.str}});Object.defineProperty(Ft,"stringify",{enumerable:!0,get:function(){return Si.stringify}});Object.defineProperty(Ft,"nil",{enumerable:!0,get:function(){return Si.nil}});Object.defineProperty(Ft,"Name",{enumerable:!0,get:function(){return Si.Name}});Object.defineProperty(Ft,"CodeGen",{enumerable:!0,get:function(){return Si.CodeGen}});var sN=Yc(),B_=Vs(),aN=If(),Ws=Qc(),cN=we(),Ks=qs(),il=Us(),om=Me(),F_=__(),lN=M_(),H_=(t,e)=>new RegExp(t,e);H_.code="new RegExp";var uN=["removeAdditional","useDefaults","coerceTypes"],pN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),dN={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."},fN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},U_=200;function mN(t){var e,r,n,o,i,s,a,c,l,p,d,f,m,g,x,v,y,b,w,k,E,F,L,pe,me;let ee=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,bt=Re===!0||Re===void 0?1:Re||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:H_,de=(o=t.uriResolver)!==null&&o!==void 0?o:lN.default;return{strictSchema:(s=(i=t.strictSchema)!==null&&i!==void 0?i:ee)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:ee)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:ee)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:ee)!==null&&f!==void 0?f:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:ee)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:bt,regExp:Ge}:{optimize:bt,regExp:Ge},loopRequired:(x=t.loopRequired)!==null&&x!==void 0?x:U_,loopEnum:(v=t.loopEnum)!==null&&v!==void 0?v:U_,meta:(y=t.meta)!==null&&y!==void 0?y:!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:(L=t.validateFormats)!==null&&L!==void 0?L:!0,unicodeRegExp:(pe=t.unicodeRegExp)!==null&&pe!==void 0?pe:!0,int32range:(me=t.int32range)!==null&&me!==void 0?me:!0,uriResolver:de}}var Js=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,...mN(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new cN.ValueScope({scope:{},prefixes:pN,es5:r,lines:n}),this.logger=bN(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,aN.getRules)(),q_.call(this,dN,e,"NOT SUPPORTED"),q_.call(this,fN,e,"DEPRECATED","warn"),this._metaOpts=xN.call(this),e.formats&&gN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&yN.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),hN.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,o=F_;n==="id"&&(o={...F_},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 B_.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,Ks.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=Z_.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Ws.SchemaEnv({schema:{},schemaId:n});if(r=Ws.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=Z_.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,Ks.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(wN.call(this,n,r),!r)return(0,om.eachItem)(n,i=>nm.call(this,i)),this;kN.call(this,r);let o={...r,type:(0,il.getJSONTypes)(r.type),schemaType:(0,il.getJSONTypes)(r.schemaType)};return(0,om.eachItem)(n,o.type.length===0?i=>nm.call(this,i,o):i=>o.type.forEach(s=>nm.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]=V_(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,Ks.normalizeId)(s||n);let l=Ks.getSchemaRefs.call(this,e,n);return c=new Ws.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):Ws.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{Ws.compileSchema.call(this,e)}finally{this.opts=r}}};Js.ValidationError=sN.default;Js.MissingRefError=B_.default;Ft.default=Js;function q_(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 Z_(t){return t=(0,Ks.normalizeId)(t),this.schemas[t]||this.refs[t]}function hN(){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 gN(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function yN(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 xN(){let t={...this.opts};for(let e of uN)delete t[e];return t}var vN={log(){},warn(){},error(){}};function bN(t){if(t===!1)return vN;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 _N=/^[a-z_$][a-z0-9_$:-]*$/i;function wN(t,e){let{RULES:r}=this;if((0,om.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!_N.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 nm(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,il.getJSONTypes)(e.type),schemaType:(0,il.getJSONTypes)(e.schemaType)}};e.before?SN.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 SN(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 kN(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=V_(e)),t.validateSchema=this.compile(e,!0))}var TN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function V_(t){return{anyOf:[t,TN]}}});var W_=$(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var EN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};im.default=EN});var X_=$(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.callRef=zo.getValidate=void 0;var $N=Vs(),K_=Rr(),dr=we(),ki=wn(),J_=Qc(),sl=Me(),RN={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=J_.resolveRef.call(c,l,o,r);if(p===void 0)throw new $N.default(n.opts.uriResolver,o,r);if(p instanceof J_.SchemaEnv)return f(p);return m(p);function d(){if(i===l)return al(t,s,i,i.$async);let g=e.scopeValue("root",{ref:l});return al(t,(0,dr._)`${g}.validate`,l,l.$async)}function f(g){let x=Y_(t,g);al(t,x,g,g.$async)}function m(g){let x=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,dr.stringify)(g)}:{ref:g}),v=e.name("valid"),y=t.subschema({schema:g,dataTypes:[],schemaPath:dr.nil,topSchemaRef:x,errSchemaPath:r},v);t.mergeEvaluated(y),t.ok(v)}}};function Y_(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,dr._)`${r.scopeValue("wrapper",{ref:e})}.validate`}zo.getValidate=Y_;function al(t,e,r,n){let{gen:o,it:i}=t,{allErrors:s,schemaEnv:a,opts:c}=i,l=c.passContext?ki.default.this:dr.nil;n?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=o.let("valid");o.try(()=>{o.code((0,dr._)`await ${(0,K_.callValidateCode)(t,e,l)}`),m(e),s||o.assign(g,!0)},x=>{o.if((0,dr._)`!(${x} instanceof ${i.ValidationError})`,()=>o.throw(x)),f(x),s||o.assign(g,!1)}),t.ok(g)}function d(){t.result((0,K_.callValidateCode)(t,e,l),()=>m(e),()=>f(e))}function f(g){let x=(0,dr._)`${g}.errors`;o.assign(ki.default.vErrors,(0,dr._)`${ki.default.vErrors} === null ? ${x} : ${ki.default.vErrors}.concat(${x})`),o.assign(ki.default.errors,(0,dr._)`${ki.default.vErrors}.length`)}function m(g){var x;if(!i.opts.unevaluated)return;let v=(x=r==null?void 0:r.validate)===null||x===void 0?void 0:x.evaluated;if(i.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(i.props=sl.mergeEvaluated.props(o,v.props,i.props));else{let y=o.var("props",(0,dr._)`${g}.evaluated.props`);i.props=sl.mergeEvaluated.props(o,y,i.props,dr.Name)}if(i.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(i.items=sl.mergeEvaluated.items(o,v.items,i.items));else{let y=o.var("items",(0,dr._)`${g}.evaluated.items`);i.items=sl.mergeEvaluated.items(o,y,i.items,dr.Name)}}}zo.callRef=al;zo.default=RN});var Q_=$(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var AN=W_(),IN=X_(),PN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",AN.default,IN.default];sm.default=PN});var ew=$(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var cl=we(),Bn=cl.operators,ll={maximum:{okStr:"<=",ok:Bn.LTE,fail:Bn.GT},minimum:{okStr:">=",ok:Bn.GTE,fail:Bn.LT},exclusiveMaximum:{okStr:"<",ok:Bn.LT,fail:Bn.GTE},exclusiveMinimum:{okStr:">",ok:Bn.GT,fail:Bn.LTE}},CN={message:({keyword:t,schemaCode:e})=>(0,cl.str)`must be ${ll[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,cl._)`{comparison: ${ll[t].okStr}, limit: ${e}}`},ON={keyword:Object.keys(ll),type:"number",schemaType:"number",$data:!0,error:CN,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,cl._)`${r} ${ll[e].fail} ${n} || isNaN(${r})`)}};am.default=ON});var tw=$(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var Ys=we(),zN={message:({schemaCode:t})=>(0,Ys.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Ys._)`{multipleOf: ${t}}`},NN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:zN,code(t){let{gen:e,data:r,schemaCode:n,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Ys._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Ys._)`${s} !== parseInt(${s})`;t.fail$data((0,Ys._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};cm.default=NN});var nw=$(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});function rw(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}lm.default=rw;rw.code='require("ajv/dist/runtime/ucs2length").default'});var ow=$(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var No=we(),LN=Me(),jN=nw(),DN={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,No.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,No._)`{limit: ${t}}`},MN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:DN,code(t){let{keyword:e,data:r,schemaCode:n,it:o}=t,i=e==="maxLength"?No.operators.GT:No.operators.LT,s=o.opts.unicode===!1?(0,No._)`${r}.length`:(0,No._)`${(0,LN.useFunc)(t.gen,jN.default)}(${r})`;t.fail$data((0,No._)`${s} ${i} ${n}`)}};um.default=MN});var iw=$(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var FN=Rr(),UN=Me(),Ti=we(),qN={message:({schemaCode:t})=>(0,Ti.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ti._)`{pattern: ${t}}`},ZN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:qN,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,Ti._)`new RegExp`:(0,UN.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,Ti._)`${l}(${i}, ${a}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,Ti._)`!${p}`)}else{let c=(0,FN.usePattern)(t,o);t.fail$data((0,Ti._)`!${c}.test(${r})`)}}};pm.default=ZN});var sw=$(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var Xs=we(),BN={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Xs.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Xs._)`{limit: ${t}}`},HN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:BN,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxProperties"?Xs.operators.GT:Xs.operators.LT;t.fail$data((0,Xs._)`Object.keys(${r}).length ${o} ${n}`)}};dm.default=HN});var aw=$(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var Qs=Rr(),ea=we(),VN=Me(),GN={message:({params:{missingProperty:t}})=>(0,ea.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,ea._)`{missingProperty: ${t}}`},WN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:GN,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:g}=t.it;for(let x of r)if((m==null?void 0:m[x])===void 0&&!g.has(x)){let v=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${x}" is not defined at "${v}" (strictRequired)`;(0,VN.checkStrictMode)(s,y,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(ea.nil,d);else for(let m of r)(0,Qs.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(c||i){let g=e.let("valid",!0);t.block$data(g,()=>f(m,g)),t.ok(g)}else e.if((0,Qs.checkMissingProp)(t,r,m)),(0,Qs.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Qs.noPropertyInData)(e,o,m,a.ownProperties),()=>t.error())})}function f(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,Qs.propertyInData)(e,o,m,a.ownProperties)),e.if((0,ea.not)(g),()=>{t.error(),e.break()})},ea.nil)}}};fm.default=WN});var cw=$(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var ta=we(),KN={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ta.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ta._)`{limit: ${t}}`},JN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:KN,code(t){let{keyword:e,data:r,schemaCode:n}=t,o=e==="maxItems"?ta.operators.GT:ta.operators.LT;t.fail$data((0,ta._)`${r}.length ${o} ${n}`)}};mm.default=JN});var ul=$(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var lw=Df();lw.code='require("ajv/dist/runtime/equal").default';hm.default=lw});var uw=$(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var gm=Us(),Ut=we(),YN=Me(),XN=ul(),QN={message:({params:{i:t,j:e}})=>(0,Ut.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ut._)`{i: ${t}, j: ${e}}`},eL={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:QN,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,gm.getSchemaTypes)(i.items):[];t.block$data(c,p,(0,Ut._)`${s} === false`),t.ok(c);function p(){let g=e.let("i",(0,Ut._)`${r}.length`),x=e.let("j");t.setParams({i:g,j:x}),e.assign(c,!0),e.if((0,Ut._)`${g} > 1`,()=>(d()?f:m)(g,x))}function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function f(g,x){let v=e.name("item"),y=(0,gm.checkDataTypes)(l,v,a.opts.strictNumbers,gm.DataType.Wrong),b=e.const("indices",(0,Ut._)`{}`);e.for((0,Ut._)`;${g}--;`,()=>{e.let(v,(0,Ut._)`${r}[${g}]`),e.if(y,(0,Ut._)`continue`),l.length>1&&e.if((0,Ut._)`typeof ${v} == "string"`,(0,Ut._)`${v} += "_"`),e.if((0,Ut._)`typeof ${b}[${v}] == "number"`,()=>{e.assign(x,(0,Ut._)`${b}[${v}]`),t.error(),e.assign(c,!1).break()}).code((0,Ut._)`${b}[${v}] = ${g}`)})}function m(g,x){let v=(0,YN.useFunc)(e,XN.default),y=e.name("outer");e.label(y).for((0,Ut._)`;${g}--;`,()=>e.for((0,Ut._)`${x} = ${g}; ${x}--;`,()=>e.if((0,Ut._)`${v}(${r}[${g}], ${r}[${x}])`,()=>{t.error(),e.assign(c,!1).break(y)})))}}};ym.default=eL});var pw=$(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var xm=we(),tL=Me(),rL=ul(),nL={message:"must be equal to constant",params:({schemaCode:t})=>(0,xm._)`{allowedValue: ${t}}`},oL={keyword:"const",$data:!0,error:nL,code(t){let{gen:e,data:r,$data:n,schemaCode:o,schema:i}=t;n||i&&typeof i=="object"?t.fail$data((0,xm._)`!${(0,tL.useFunc)(e,rL.default)}(${r}, ${o})`):t.fail((0,xm._)`${i} !== ${r}`)}};vm.default=oL});var dw=$(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var ra=we(),iL=Me(),sL=ul(),aL={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ra._)`{allowedValues: ${t}}`},cL={keyword:"enum",schemaType:"array",$data:!0,error:aL,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,iL.useFunc)(e,sL.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,ra.or)(...o.map((g,x)=>f(m,x)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",i,m=>e.if((0,ra._)`${l()}(${r}, ${m})`,()=>e.assign(p,!0).break()))}function f(m,g){let x=o[g];return typeof x=="object"&&x!==null?(0,ra._)`${l()}(${r}, ${m}[${g}])`:(0,ra._)`${r} === ${x}`}}};bm.default=cL});var fw=$(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var lL=ew(),uL=tw(),pL=ow(),dL=iw(),fL=sw(),mL=aw(),hL=cw(),gL=uw(),yL=pw(),xL=dw(),vL=[lL.default,uL.default,pL.default,dL.default,fL.default,mL.default,hL.default,gL.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},yL.default,xL.default];_m.default=vL});var Sm=$(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.validateAdditionalItems=void 0;var Lo=we(),wm=Me(),bL={message:({params:{len:t}})=>(0,Lo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Lo._)`{limit: ${t}}`},_L={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:bL,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,wm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}mw(t,n)}};function mw(t,e){let{gen:r,schema:n,data:o,keyword:i,it:s}=t;s.items=!0;let a=r.const("len",(0,Lo._)`${o}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Lo._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,wm.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Lo._)`${a} <= ${e.length}`);r.if((0,Lo.not)(l),()=>c(l)),t.ok(l)}function c(l){r.forRange("i",e.length,a,p=>{t.subschema({keyword:i,dataProp:p,dataPropType:wm.Type.Num},l),s.allErrors||r.if((0,Lo.not)(l),()=>r.break())})}}na.validateAdditionalItems=mw;na.default=_L});var km=$(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.validateTuple=void 0;var hw=we(),pl=Me(),wL=Rr(),SL={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return gw(t,"additionalItems",e);r.items=!0,!(0,pl.alwaysValidSchema)(r,e)&&t.ok((0,wL.validateArray)(t))}};function gw(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=pl.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,hw._)`${i}.length`);r.forEach((d,f)=>{(0,pl.alwaysValidSchema)(a,d)||(n.if((0,hw._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:m}=a,g=r.length,x=g===d.minItems&&(g===d.maxItems||d[e]===!1);if(f.strictTuples&&!x){let v=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,pl.checkStrictMode)(a,v,f.strictTuples)}}}oa.validateTuple=gw;oa.default=SL});var yw=$(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var kL=km(),TL={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,kL.validateTuple)(t,"items")};Tm.default=TL});var vw=$(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var xw=we(),EL=Me(),$L=Rr(),RL=Sm(),AL={message:({params:{len:t}})=>(0,xw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,xw._)`{limit: ${t}}`},IL={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:AL,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:o}=r;n.items=!0,!(0,EL.alwaysValidSchema)(n,e)&&(o?(0,RL.validateAdditionalItems)(t,o):t.ok((0,$L.validateArray)(t)))}};Em.default=IL});var bw=$($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var Ir=we(),dl=Me(),PL={message:({params:{min:t,max:e}})=>e===void 0?(0,Ir.str)`must contain at least ${t} valid item(s)`:(0,Ir.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Ir._)`{minContains: ${t}}`:(0,Ir._)`{minContains: ${t}, maxContains: ${e}}`},CL={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:PL,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,Ir._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,dl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,dl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,dl.alwaysValidSchema)(i,r)){let x=(0,Ir._)`${p} >= ${s}`;a!==void 0&&(x=(0,Ir._)`${x} && ${p} <= ${a}`),t.pass(x);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,Ir._)`${o}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let x=e.name("_valid"),v=e.let("count",0);m(x,()=>e.if(x,()=>g(v)))}function m(x,v){e.forRange("i",0,p,y=>{t.subschema({keyword:"contains",dataProp:y,dataPropType:dl.Type.Num,compositeRule:!0},x),v()})}function g(x){e.code((0,Ir._)`${x}++`),a===void 0?e.if((0,Ir._)`${x} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,Ir._)`${x} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,Ir._)`${x} >= ${s}`,()=>e.assign(d,!0)))}}};$m.default=CL});var Sw=$(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.validateSchemaDeps=tn.validatePropertyDeps=tn.error=void 0;var Rm=we(),OL=Me(),ia=Rr();tn.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Rm.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Rm._)`{property: ${t},
|
|
7
|
+
missingProperty: ${n},
|
|
8
8
|
depsCount: ${e},
|
|
9
|
-
deps: ${n}}`};var kj={keyword:"dependencies",type:"object",schemaType:"object",error:Qn.error,code(t){let[e,n]=Tj(t);hw(t,e),gw(t,n)}};function Tj({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 hw(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,na.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,na.checkReportMissingProp)(t,l)}):(n.if((0,wm._)`${c} && (${(0,na.checkMissingProp)(t,a,i)})`),(0,na.reportMissingProp)(t,i),n.else())}}Qn.validatePropertyDeps=hw;function gw(t,e=t.schema){let{gen:n,data:r,keyword:o,it:i}=t,s=n.name("valid");for(let a in e)(0,Sj.alwaysValidSchema)(i,e[a])||(n.if((0,na.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=gw;Qn.default=kj});var vw=$(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var xw=we(),Ej=Me(),$j={message:"property name must be valid",params:({params:t})=>(0,xw._)`{propertyName: ${t.propertyName}}`},Rj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:$j,code(t){let{gen:e,schema:n,data:r,it:o}=t;if((0,Ej.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,xw.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};Sm.default=Rj});var Tm=$(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var cl=Rn(),Un=we(),Aj=gr(),ll=Me(),Cj={message:"must NOT have additional properties",params:({params:t})=>(0,Un._)`{additionalProperty: ${t.additionalProperty}}`},Ij={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Cj,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,ll.alwaysValidSchema)(s,n))return;let l=(0,cl.allSchemaProperties)(r.properties),p=(0,cl.allSchemaProperties)(r.patternProperties);d(),t.ok((0,Un._)`${i} === ${Aj.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,ll.schemaRefOrVal)(s,r.properties,"properties");m=(0,cl.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,cl.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,ll.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:ll.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,m)}}};km.default=Ij});var ww=$($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var Pj=qs(),bw=Rn(),Em=Me(),_w=Tm(),Oj={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&&_w.default.code(new Pj.KeywordCxt(i,_w.default,"additionalProperties"));let s=(0,bw.allSchemaProperties)(n);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Em.mergeEvaluated.props(e,(0,Em.toHash)(s),i.props));let a=s.filter(d=>!(0,Em.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,bw.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)}}};$m.default=Oj});var Ew=$(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Sw=Rn(),ul=we(),kw=Me(),Tw=Me(),zj={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,Sw.allSchemaProperties)(n),c=a.filter(v=>(0,kw.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 ul.Name)&&(i.props=(0,Tw.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,kw.checkStrictMode)(i,`property ${x} matches pattern ${v} (use allowMatchingProperties)`)}function y(v){e.forIn("key",r,x=>{e.if((0,ul._)`${(0,Sw.usePattern)(t,v)}.test(${x})`,()=>{let m=c.includes(v);m||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:x,dataPropType:Tw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,ul._)`${d}[${x}]`,!0):!m&&!i.allErrors&&e.if((0,ul.not)(p),()=>e.break())})})}}};Rm.default=zj});var $w=$(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var Nj=Me(),jj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Nj.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"}};Am.default=jj});var Rw=$(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Lj=Rn(),Dj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Lj.validateUnion,error:{message:"must match a schema in anyOf"}};Cm.default=Dj});var Aw=$(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var pl=we(),Mj=Me(),Fj={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,pl._)`{passingSchemas: ${t.passing}}`},Uj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Fj,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,Mj.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,pl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,pl._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,pl.Name)})})}}};Im.default=Uj});var Cw=$(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var qj=Me(),Zj={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,qj.alwaysValidSchema)(r,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};Pm.default=Zj});var Ow=$(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var dl=we(),Pw=Me(),Bj={message:({params:t})=>(0,dl.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,dl._)`{failingKeyword: ${t.ifClause}}`},Hj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Bj,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,Pw.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let o=Iw(r,"then"),i=Iw(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,dl.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,dl._)`${p}`):t.setParams({ifClause:p})}}}};function Iw(t,e){let n=t.schema[e];return n!==void 0&&!(0,Pw.alwaysValidSchema)(t,n)}Om.default=Hj});var zw=$(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Vj=Me(),Gj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Vj.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};zm.default=Gj});var Nw=$(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var Wj=ym(),Kj=pw(),Jj=xm(),Yj=fw(),Xj=mw(),Qj=yw(),eL=vw(),tL=Tm(),nL=ww(),rL=Ew(),oL=$w(),iL=Rw(),sL=Aw(),aL=Cw(),cL=Ow(),lL=zw();function uL(t=!1){let e=[oL.default,iL.default,sL.default,aL.default,cL.default,lL.default,eL.default,tL.default,Qj.default,nL.default,rL.default];return t?e.push(Kj.default,Yj.default):e.push(Wj.default,Jj.default),e.push(Xj.default),e}Nm.default=uL});var jw=$(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var wt=we(),pL={message:({schemaCode:t})=>(0,wt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wt._)`{format: ${t}}`},dL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:pL,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})`}}}};jm.default=dL});var Lw=$(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var fL=jw(),mL=[fL.default];Lm.default=mL});var Dw=$(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 Fw=$(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var hL=G_(),gL=aw(),yL=Nw(),xL=Lw(),Mw=Dw(),vL=[hL.default,gL.default,(0,yL.default)(),xL.default,Mw.metadataVocabulary,Mw.contentVocabulary];Dm.default=vL});var qw=$(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.DiscrError=void 0;var Uw;(function(t){t.Tag="tag",t.Mapping="mapping"})(Uw||(fl.DiscrError=Uw={}))});var Bw=$(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var ki=we(),Mm=qw(),Zw=Jc(),bL=Zs(),_L=Me(),wL={message:({params:{discrError:t,tagName:e}})=>t===Mm.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}}`},SL={keyword:"discriminator",type:"object",schemaType:"object",error:wL,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:Mm.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:Mm.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,_L.schemaHasRulesButRef)(E,i.self.RULES)){let j=E.$ref;if(E=Zw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,j),E instanceof Zw.SchemaEnv&&(E=E.schema),E===void 0)throw new bL.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}}}};Fm.default=SL});var Hw=$((XH,kL)=>{kL.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 qm=$((lt,Um)=>{"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 TL=U_(),EL=Fw(),$L=Bw(),Vw=Hw(),RL=["/properties"],ml="http://json-schema.org/draft-07/schema",Ti=class extends TL.default{_addVocabularies(){super._addVocabularies(),EL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword($L.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Vw,RL):Vw;this.addMetaSchema(e,ml,!1),this.refs["http://json-schema.org/schema"]=ml}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ml)?ml:void 0)}};lt.Ajv=Ti;Um.exports=lt=Ti;Um.exports.Ajv=Ti;Object.defineProperty(lt,"__esModule",{value:!0});lt.default=Ti;var AL=qs();Object.defineProperty(lt,"KeywordCxt",{enumerable:!0,get:function(){return AL.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 CL=Wc();Object.defineProperty(lt,"ValidationError",{enumerable:!0,get:function(){return CL.default}});var IL=Zs();Object.defineProperty(lt,"MissingRefError",{enumerable:!0,get:function(){return IL.default}})});var e0=$(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(Jw,Vm),time:er(Bm(!0),Gm),"date-time":er(Gw(!0),Xw),"iso-time":er(Bm(),Yw),"iso-date-time":er(Gw(),Qw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:LL,"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:BL,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:DL,int32:{type:"number",validate:UL},int64:{type:"number",validate:qL},float:{type:"number",validate:Kw},double:{type:"number",validate:Kw},password:!0,binary:!0};tr.fastFormats={...tr.fullFormats,date:er(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Vm),time:er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Gm),"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,Xw),"iso-time":er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Yw),"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,Qw),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 PL(t){return t%4===0&&(t%100!==0||t%400===0)}var OL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,zL=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Jw(t){let e=OL.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&&PL(n)?29:zL[r])}function Vm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Zm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Bm(t){return function(n){let r=Zm.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 Gm(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 Yw(t,e){if(!(t&&e))return;let n=Zm.exec(t),r=Zm.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 Hm=/t|\s/i;function Gw(t){let e=Bm(t);return function(r){let o=r.split(Hm);return o.length===2&&Jw(o[0])&&e(o[1])}}function Xw(t,e){if(!(t&&e))return;let n=new Date(t).valueOf(),r=new Date(e).valueOf();if(n&&r)return n-r}function Qw(t,e){if(!(t&&e))return;let[n,r]=t.split(Hm),[o,i]=e.split(Hm),s=Vm(n,o);if(s!==void 0)return s||Gm(r,i)}var NL=/\/|:/,jL=/^(?:[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 LL(t){return NL.test(t)&&jL.test(t)}var Ww=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DL(t){return Ww.lastIndex=0,Ww.test(t)}var ML=-(2**31),FL=2**31-1;function UL(t){return Number.isInteger(t)&&t<=FL&&t>=ML}function qL(t){return Number.isInteger(t)}function Kw(){return!0}var ZL=/[^\\]\\Z/;function BL(t){if(ZL.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var t0=$($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.formatLimitDefinition=void 0;var HL=qm(),qn=we(),Mr=qn.operators,hl={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}},VL={message:({keyword:t,schemaCode:e})=>(0,qn.str)`should be ${hl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,qn._)`{comparison: ${hl[t].okStr}, limit: ${e}}`};$i.formatLimitDefinition={keyword:Object.keys(hl),type:"string",schemaType:"string",$data:!0,error:VL,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 HL.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}) ${hl[o].fail} 0`}},dependencies:["format"]};var GL=t=>(t.addKeyword($i.formatLimitDefinition),t);$i.default=GL});var i0=$((ra,o0)=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var Ri=e0(),WL=t0(),Wm=we(),n0=new Wm.Name("fullFormats"),KL=new Wm.Name("fastFormats"),Km=(t,e={keywords:!0})=>{if(Array.isArray(e))return r0(t,e,Ri.fullFormats,n0),t;let[n,r]=e.mode==="fast"?[Ri.fastFormats,KL]:[Ri.fullFormats,n0],o=e.formats||Ri.formatNames;return r0(t,o,n,r),e.keywords&&(0,WL.default)(t),t};Km.get=(t,e="full")=>{let r=(e==="fast"?Ri.fastFormats:Ri.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r};function r0(t,e,n,r){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Wm._)`require("ajv-formats/dist/formats").${r}`);for(let s of e)t.addFormat(s,n[s])}o0.exports=ra=Km;Object.defineProperty(ra,"__esModule",{value:!0});ra.default=Km});var O0=$((WV,P0)=>{var I0=require("stream").Stream,iM=require("util");P0.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=[]}iM.inherits(Bn,I0);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=I0.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 L0=$((KV,j0)=>{var sM=require("util"),N0=require("stream").Stream,z0=O0();j0.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}sM.inherits(_t,N0);_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 z0)){var n=z0.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 N0.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 D0=$((JV,aM)=>{aM.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 F0=$((YV,M0)=>{M0.exports=D0()});var Z0=$(fn=>{"use strict";var $l=F0(),cM=require("path").extname,U0=/^\s*([^;\s]*)(?:;|\s|$)/,lM=/^text\//i;fn.charset=q0;fn.charsets={lookup:q0};fn.contentType=uM;fn.extension=pM;fn.extensions=Object.create(null);fn.lookup=dM;fn.types=Object.create(null);fM(fn.extensions,fn.types);function q0(t){if(!t||typeof t!="string")return!1;var e=U0.exec(t),n=e&&$l[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&lM.test(e[1])?"UTF-8":!1}function uM(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 pM(t){if(!t||typeof t!="string")return!1;var e=U0.exec(t),n=e&&fn.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}function dM(t){if(!t||typeof t!="string")return!1;var e=cM("x."+t).toLowerCase().substr(1);return e&&fn.types[e]||!1}function fM(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys($l).forEach(function(o){var i=$l[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($l[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 H0=$((QV,B0)=>{B0.exports=mM;function mM(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var oh=$((e5,G0)=>{var V0=H0();G0.exports=hM;function hM(t){var e=!1;return V0(function(){e=!0}),function(r,o){e?t(r,o):V0(function(){t(r,o)})}}});var ih=$((t5,W0)=>{W0.exports=gM;function gM(t){Object.keys(t.jobs).forEach(yM.bind(t)),t.jobs={}}function yM(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var sh=$((n5,J0)=>{var K0=oh(),xM=ih();J0.exports=vM;function vM(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=bM(e,o,t[o],function(i,s){o in n.jobs&&(delete n.jobs[o],i?xM(n):n.results[o]=s,r(i,n.results))})}function bM(t,e,n,r){var o;return t.length==2?o=t(n,K0(r)):o=t(n,e,K0(r)),o}});var ah=$((r5,Y0)=>{Y0.exports=_M;function _M(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 ch=$((o5,X0)=>{var wM=ih(),SM=oh();X0.exports=kM;function kM(t){Object.keys(this.jobs).length&&(this.index=this.size,wM(this),SM(t)(null,this.results))}});var eS=$((i5,Q0)=>{var TM=sh(),EM=ah(),$M=ch();Q0.exports=RM;function RM(t,e,n){for(var r=EM(t);r.index<(r.keyedList||t).length;)TM(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 $M.bind(r,n)}});var lh=$((s5,Rl)=>{var tS=sh(),AM=ah(),CM=ch();Rl.exports=IM;Rl.exports.ascending=nS;Rl.exports.descending=PM;function IM(t,e,n,r){var o=AM(t,n);return tS(t,e,o,function i(s,a){if(s){r(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){tS(t,e,o,i);return}r(null,o.results)}),CM.bind(o,r)}function nS(t,e){return t<e?-1:t>e?1:0}function PM(t,e){return-1*nS(t,e)}});var oS=$((a5,rS)=>{var OM=lh();rS.exports=zM;function zM(t,e,n){return OM(t,e,null,n)}});var sS=$((c5,iS)=>{iS.exports={parallel:eS(),serial:oS(),serialOrdered:lh()}});var uh=$((l5,aS)=>{"use strict";aS.exports=Object});var lS=$((u5,cS)=>{"use strict";cS.exports=Error});var pS=$((p5,uS)=>{"use strict";uS.exports=EvalError});var fS=$((d5,dS)=>{"use strict";dS.exports=RangeError});var hS=$((f5,mS)=>{"use strict";mS.exports=ReferenceError});var yS=$((m5,gS)=>{"use strict";gS.exports=SyntaxError});var Al=$((h5,xS)=>{"use strict";xS.exports=TypeError});var bS=$((g5,vS)=>{"use strict";vS.exports=URIError});var wS=$((y5,_S)=>{"use strict";_S.exports=Math.abs});var kS=$((x5,SS)=>{"use strict";SS.exports=Math.floor});var ES=$((v5,TS)=>{"use strict";TS.exports=Math.max});var RS=$((b5,$S)=>{"use strict";$S.exports=Math.min});var CS=$((_5,AS)=>{"use strict";AS.exports=Math.pow});var PS=$((w5,IS)=>{"use strict";IS.exports=Math.round});var zS=$((S5,OS)=>{"use strict";OS.exports=Number.isNaN||function(e){return e!==e}});var jS=$((k5,NS)=>{"use strict";var NM=zS();NS.exports=function(e){return NM(e)||e===0?e:e<0?-1:1}});var DS=$((T5,LS)=>{"use strict";LS.exports=Object.getOwnPropertyDescriptor});var ph=$((E5,MS)=>{"use strict";var Cl=DS();if(Cl)try{Cl([],"length")}catch{Cl=null}MS.exports=Cl});var US=$(($5,FS)=>{"use strict";var Il=Object.defineProperty||!1;if(Il)try{Il({},"a",{value:1})}catch{Il=!1}FS.exports=Il});var dh=$((R5,qS)=>{"use strict";qS.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 HS=$((A5,BS)=>{"use strict";var ZS=typeof Symbol<"u"&&Symbol,jM=dh();BS.exports=function(){return typeof ZS!="function"||typeof Symbol!="function"||typeof ZS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jM()}});var fh=$((C5,VS)=>{"use strict";VS.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var mh=$((I5,GS)=>{"use strict";var LM=uh();GS.exports=LM.getPrototypeOf||null});var JS=$((P5,KS)=>{"use strict";var DM="Function.prototype.bind called on incompatible ",MM=Object.prototype.toString,FM=Math.max,UM="[object Function]",WS=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},qM=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},ZM=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};KS.exports=function(e){var n=this;if(typeof n!="function"||MM.apply(n)!==UM)throw new TypeError(DM+n);for(var r=qM(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,WS(r,arguments));return Object(p)===p?p:this}return n.apply(e,WS(r,arguments))},s=FM(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+ZM(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 ua=$((O5,YS)=>{"use strict";var BM=JS();YS.exports=Function.prototype.bind||BM});var Pl=$((z5,XS)=>{"use strict";XS.exports=Function.prototype.call});var hh=$((N5,QS)=>{"use strict";QS.exports=Function.prototype.apply});var tk=$((j5,ek)=>{"use strict";ek.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var rk=$((L5,nk)=>{"use strict";var HM=ua(),VM=hh(),GM=Pl(),WM=tk();nk.exports=WM||HM.call(GM,VM)});var ik=$((D5,ok)=>{"use strict";var KM=ua(),JM=Al(),YM=Pl(),XM=rk();ok.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new JM("a function is required");return XM(KM,YM,e)}});var pk=$((M5,uk)=>{"use strict";var QM=ik(),sk=ph(),ck;try{ck=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var gh=!!ck&&sk&&sk(Object.prototype,"__proto__"),lk=Object,ak=lk.getPrototypeOf;uk.exports=gh&&typeof gh.get=="function"?QM([gh.get]):typeof ak=="function"?function(e){return ak(e==null?e:lk(e))}:!1});var gk=$((F5,hk)=>{"use strict";var dk=fh(),fk=mh(),mk=pk();hk.exports=dk?function(e){return dk(e)}:fk?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return fk(e)}:mk?function(e){return mk(e)}:null});var Ol=$((U5,yk)=>{"use strict";var e2=Function.prototype.call,t2=Object.prototype.hasOwnProperty,n2=ua();yk.exports=n2.call(e2,t2)});var kk=$((q5,Sk)=>{"use strict";var Ce,r2=uh(),o2=lS(),i2=pS(),s2=fS(),a2=hS(),Di=yS(),Li=Al(),c2=bS(),l2=wS(),u2=kS(),p2=ES(),d2=RS(),f2=CS(),m2=PS(),h2=jS(),_k=Function,yh=function(t){try{return _k('"use strict"; return ('+t+").constructor;")()}catch{}},pa=ph(),g2=US(),xh=function(){throw new Li},y2=pa?(function(){try{return arguments.callee,xh}catch{try{return pa(arguments,"callee").get}catch{return xh}}})():xh,Ni=HS()(),It=gk(),x2=mh(),v2=fh(),wk=hh(),da=Pl(),ji={},b2=typeof Uint8Array>"u"||!It?Ce:It(Uint8Array),jo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":Ni&&It?It([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":ji,"%AsyncGenerator%":ji,"%AsyncGeneratorFunction%":ji,"%AsyncIteratorPrototype%":ji,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o2,"%eval%":eval,"%EvalError%":i2,"%Float16Array%":typeof Float16Array>"u"?Ce:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":_k,"%GeneratorFunction%":ji,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ni&&It?It(It([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ni||!It?Ce:It(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r2,"%Object.getOwnPropertyDescriptor%":pa,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":s2,"%ReferenceError%":a2,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ni||!It?Ce:It(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ni&&It?It(""[Symbol.iterator]()):Ce,"%Symbol%":Ni?Symbol:Ce,"%SyntaxError%":Di,"%ThrowTypeError%":y2,"%TypedArray%":b2,"%TypeError%":Li,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":c2,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet,"%Function.prototype.call%":da,"%Function.prototype.apply%":wk,"%Object.defineProperty%":g2,"%Object.getPrototypeOf%":x2,"%Math.abs%":l2,"%Math.floor%":u2,"%Math.max%":p2,"%Math.min%":d2,"%Math.pow%":f2,"%Math.round%":m2,"%Math.sign%":h2,"%Reflect.getPrototypeOf%":v2};if(It)try{null.error}catch(t){xk=It(It(t)),jo["%Error.prototype%"]=xk}var xk,_2=function t(e){var n;if(e==="%AsyncFunction%")n=yh("async function () {}");else if(e==="%GeneratorFunction%")n=yh("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=yh("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&It&&(n=It(o.prototype))}return jo[e]=n,n},vk={__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"]},fa=ua(),zl=Ol(),w2=fa.call(da,Array.prototype.concat),S2=fa.call(wk,Array.prototype.splice),bk=fa.call(da,String.prototype.replace),Nl=fa.call(da,String.prototype.slice),k2=fa.call(da,RegExp.prototype.exec),T2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E2=/\\(\\)?/g,$2=function(e){var n=Nl(e,0,1),r=Nl(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 bk(e,T2,function(i,s,a,c){o[o.length]=a?bk(c,E2,"$1"):s||i}),o},R2=function(e,n){var r=e,o;if(zl(vk,r)&&(o=vk[r],r="%"+o[0]+"%"),zl(jo,r)){var i=jo[r];if(i===ji&&(i=_2(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!")};Sk.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(k2(/^%?[^%]*%?$/,e)===null)throw new Di("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=$2(e),o=r.length>0?r[0]:"",i=R2("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],S2(r,w2([0,1],l)));for(var p=1,d=!0;p<r.length;p+=1){var f=r[p],h=Nl(f,0,1),y=Nl(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+"%",zl(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(pa&&p+1>=r.length){var v=pa(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=zl(a,f),a=a[f];d&&!c&&(jo[s]=a)}}return a}});var Ek=$((Z5,Tk)=>{"use strict";var A2=dh();Tk.exports=function(){return A2()&&!!Symbol.toStringTag}});var Ak=$((B5,Rk)=>{"use strict";var C2=kk(),$k=C2("%Object.defineProperty%",!0),I2=Ek()(),P2=Ol(),O2=Al(),jl=I2?Symbol.toStringTag:null;Rk.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 O2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");jl&&(r||!P2(e,jl))&&($k?$k(e,jl,{configurable:!o,enumerable:!1,value:n,writable:!1}):e[jl]=n)}});var Ik=$((H5,Ck)=>{"use strict";Ck.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var zk=$((V5,Ok)=>{"use strict";var wh=L0(),z2=require("util"),vh=require("path"),N2=require("http"),j2=require("https"),L2=require("url").parse,D2=require("fs"),M2=require("stream").Stream,F2=require("crypto"),bh=Z0(),U2=sS(),q2=Ak(),Ur=Ol(),_h=Ik();function Pk(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=[],wh.call(this),t=t||{};for(var e in t)this[e]=t[e]}z2.inherits(Ue,wh);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=wh.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 M2))&&(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)):D2.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="'+Pk(t)+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&_h(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=vh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?n=vh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Ur(t,"httpVersion")&&(n=vh.basename(t.client._httpMessage.path||"")),n)return'filename="'+Pk(n)+'"'};Ue.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t&&t.name&&(n=bh.lookup(t.name)),!n&&t&&t.path&&(n=bh.lookup(t.path)),!n&&t&&t.readable&&Ur(t,"httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=bh.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="--------------------------"+F2.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}U2.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=L2(t),r=_h({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(r=_h(t,o),r.port||(r.port=r.protocol==="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol==="https:"?n=j2.request(r):n=N2.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]"};q2(Ue.prototype,"FormData");Ok.exports=Ue});var Xk=$((BG,Yk)=>{var Ui=1e3,qi=Ui*60,Zi=qi*60,Mo=Zi*24,cF=Mo*7,lF=Mo*365.25;Yk.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return uF(t);if(n==="number"&&isFinite(t))return e.long?dF(t):pF(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function uF(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*lF;case"weeks":case"week":case"w":return n*cF;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 pF(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 dF(t){var e=Math.abs(t);return e>=Mo?Ml(t,e,Mo,"day"):e>=Zi?Ml(t,e,Zi,"hour"):e>=qi?Ml(t,e,qi,"minute"):e>=Ui?Ml(t,e,Ui,"second"):t+" ms"}function Ml(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var Dh=$((HG,Qk)=>{function fF(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=o,n.enabled=a,n.humanize=Xk(),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}Qk.exports=fF});var eT=$((mn,Fl)=>{mn.formatArgs=hF;mn.save=gF;mn.load=yF;mn.useColors=mF;mn.storage=xF();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 mF(){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 hF(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Fl.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 gF(t){try{t?mn.storage.setItem("debug",t):mn.storage.removeItem("debug")}catch{}}function yF(){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 xF(){try{return localStorage}catch{}}Fl.exports=Dh()(mn);var{formatters:vF}=Fl.exports;vF.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var nT=$((VG,tT)=>{"use strict";tT.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 iT=$((GG,oT)=>{"use strict";var bF=require("os"),rT=require("tty"),In=nT(),{env:Pt}=process,Br;In("no-color")||In("no-colors")||In("color=false")||In("color=never")?Br=0:(In("color")||In("colors")||In("color=true")||In("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 Mh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Fh(t,e){if(Br===0)return 0;if(In("color=16m")||In("color=full")||In("color=truecolor"))return 3;if(In("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=bF.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 _F(t){let e=Fh(t,t&&t.isTTY);return Mh(e)}oT.exports={supportsColor:_F,stdout:Mh(Fh(!0,rT.isatty(1))),stderr:Mh(Fh(!0,rT.isatty(2)))}});var aT=$((Ot,ql)=>{var wF=require("tty"),Ul=require("util");Ot.init=AF;Ot.log=EF;Ot.formatArgs=kF;Ot.save=$F;Ot.load=RF;Ot.useColors=SF;Ot.destroy=Ul.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=iT();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 SF(){return"colors"in Ot.inspectOpts?!!Ot.inspectOpts.colors:wF.isatty(process.stderr.fd)}function kF(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(`
|
|
9
|
+
deps: ${r}}`};var zL={keyword:"dependencies",type:"object",schemaType:"object",error:tn.error,code(t){let[e,r]=NL(t);_w(t,e),ww(t,r)}};function NL({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 _w(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,ia.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,ia.checkReportMissingProp)(t,l)}):(r.if((0,Rm._)`${c} && (${(0,ia.checkMissingProp)(t,a,i)})`),(0,ia.reportMissingProp)(t,i),r.else())}}tn.validatePropertyDeps=_w;function ww(t,e=t.schema){let{gen:r,data:n,keyword:o,it:i}=t,s=r.name("valid");for(let a in e)(0,OL.alwaysValidSchema)(i,e[a])||(r.if((0,ia.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=ww;tn.default=zL});var Tw=$(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var kw=we(),LL=Me(),jL={message:"property name must be valid",params:({params:t})=>(0,kw._)`{propertyName: ${t.propertyName}}`},DL={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:jL,code(t){let{gen:e,schema:r,data:n,it:o}=t;if((0,LL.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,kw.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};Am.default=DL});var Pm=$(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var fl=Rr(),Ur=we(),ML=wn(),ml=Me(),FL={message:"must NOT have additional properties",params:({params:t})=>(0,Ur._)`{additionalProperty: ${t.additionalProperty}}`},UL={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:FL,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,ml.alwaysValidSchema)(s,r))return;let l=(0,fl.allSchemaProperties)(n.properties),p=(0,fl.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ur._)`${i} === ${ML.default.errors}`);function d(){e.forIn("key",o,v=>{!l.length&&!p.length?g(v):e.if(f(v),()=>g(v))})}function f(v){let y;if(l.length>8){let b=(0,ml.schemaRefOrVal)(s,n.properties,"properties");y=(0,fl.isOwnProperty)(e,b,v)}else l.length?y=(0,Ur.or)(...l.map(b=>(0,Ur._)`${v} === ${b}`)):y=Ur.nil;return p.length&&(y=(0,Ur.or)(y,...p.map(b=>(0,Ur._)`${(0,fl.usePattern)(t,b)}.test(${v})`))),(0,Ur.not)(y)}function m(v){e.code((0,Ur._)`delete ${o}[${v}]`)}function g(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,ml.alwaysValidSchema)(s,r)){let y=e.name("valid");c.removeAdditional==="failing"?(x(v,y,!1),e.if((0,Ur.not)(y),()=>{t.reset(),m(v)})):(x(v,y),a||e.if((0,Ur.not)(y),()=>e.break()))}}function x(v,y,b){let w={keyword:"additionalProperties",dataProp:v,dataPropType:ml.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,y)}}};Im.default=UL});var Rw=$(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var qL=Hs(),Ew=Rr(),Cm=Me(),$w=Pm(),ZL={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&&$w.default.code(new qL.KeywordCxt(i,$w.default,"additionalProperties"));let s=(0,Ew.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Cm.mergeEvaluated.props(e,(0,Cm.toHash)(s),i.props));let a=s.filter(d=>!(0,Cm.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,Ew.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)}}};Om.default=ZL});var Cw=$(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Aw=Rr(),hl=we(),Iw=Me(),Pw=Me(),BL={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,Aw.allSchemaProperties)(r),c=a.filter(x=>(0,Iw.alwaysValidSchema)(i,r[x]));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 hl.Name)&&(i.props=(0,Pw.evaluatedPropsToName)(e,i.props));let{props:d}=i;f();function f(){for(let x of a)l&&m(x),i.allErrors?g(x):(e.var(p,!0),g(x),e.if(p))}function m(x){for(let v in l)new RegExp(x).test(v)&&(0,Iw.checkStrictMode)(i,`property ${v} matches pattern ${x} (use allowMatchingProperties)`)}function g(x){e.forIn("key",n,v=>{e.if((0,hl._)`${(0,Aw.usePattern)(t,x)}.test(${v})`,()=>{let y=c.includes(x);y||t.subschema({keyword:"patternProperties",schemaProp:x,dataProp:v,dataPropType:Pw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,hl._)`${d}[${v}]`,!0):!y&&!i.allErrors&&e.if((0,hl.not)(p),()=>e.break())})})}}};zm.default=BL});var Ow=$(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var HL=Me(),VL={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,HL.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"}};Nm.default=VL});var zw=$(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var GL=Rr(),WL={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:GL.validateUnion,error:{message:"must match a schema in anyOf"}};Lm.default=WL});var Nw=$(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var gl=we(),KL=Me(),JL={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,gl._)`{passingSchemas: ${t.passing}}`},YL={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:JL,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,KL.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,gl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,gl._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,gl.Name)})})}}};jm.default=YL});var Lw=$(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var XL=Me(),QL={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,XL.alwaysValidSchema)(n,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};Dm.default=QL});var Mw=$(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var yl=we(),Dw=Me(),ej={message:({params:t})=>(0,yl.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,yl._)`{failingKeyword: ${t.ifClause}}`},tj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ej,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Dw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=jw(n,"then"),i=jw(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,yl.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,yl._)`${p}`):t.setParams({ifClause:p})}}}};function jw(t,e){let r=t.schema[e];return r!==void 0&&!(0,Dw.alwaysValidSchema)(t,r)}Mm.default=tj});var Fw=$(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var rj=Me(),nj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,rj.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Fm.default=nj});var Uw=$(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var oj=Sm(),ij=yw(),sj=km(),aj=vw(),cj=bw(),lj=Sw(),uj=Tw(),pj=Pm(),dj=Rw(),fj=Cw(),mj=Ow(),hj=zw(),gj=Nw(),yj=Lw(),xj=Mw(),vj=Fw();function bj(t=!1){let e=[mj.default,hj.default,gj.default,yj.default,xj.default,vj.default,uj.default,pj.default,lj.default,dj.default,fj.default];return t?e.push(ij.default,aj.default):e.push(oj.default,sj.default),e.push(cj.default),e}Um.default=bj});var qw=$(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});var wt=we(),_j={message:({schemaCode:t})=>(0,wt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wt._)`{format: ${t}}`},wj={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:_j,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 g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),x=r.const("fDef",(0,wt._)`${g}[${s}]`),v=r.let("fType"),y=r.let("format");r.if((0,wt._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>r.assign(v,(0,wt._)`${x}.type || "string"`).assign(y,(0,wt._)`${x}.validate`),()=>r.assign(v,(0,wt._)`"string"`).assign(y,x)),t.fail$data((0,wt.or)(b(),w()));function b(){return c.strictSchema===!1?wt.nil:(0,wt._)`${s} && !${y}`}function w(){let k=p.$async?(0,wt._)`(${x}.async ? await ${y}(${n}) : ${y}(${n}))`:(0,wt._)`${y}(${n})`,E=(0,wt._)`(typeof ${y} == "function" ? ${k} : ${y}.test(${n}))`;return(0,wt._)`${y} && ${y} !== true && ${v} === ${e} && !${E}`}}function m(){let g=d.formats[i];if(!g){b();return}if(g===!0)return;let[x,v,y]=w(g);x===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,L=r.scopeValue("formats",{key:i,ref:E,code:F});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,wt._)`${L}.validate`]:["string",E,L]}function k(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!p.$async)throw new Error("async format in sync schema");return(0,wt._)`await ${y}(${n})`}return typeof v=="function"?(0,wt._)`${y}(${n})`:(0,wt._)`${y}.test(${n})`}}}};qm.default=wj});var Zw=$(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});var Sj=qw(),kj=[Sj.default];Zm.default=kj});var Bw=$(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.contentVocabulary=Ei.metadataVocabulary=void 0;Ei.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ei.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Vw=$(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var Tj=Q_(),Ej=fw(),$j=Uw(),Rj=Zw(),Hw=Bw(),Aj=[Tj.default,Ej.default,(0,$j.default)(),Rj.default,Hw.metadataVocabulary,Hw.contentVocabulary];Bm.default=Aj});var Ww=$(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.DiscrError=void 0;var Gw;(function(t){t.Tag="tag",t.Mapping="mapping"})(Gw||(xl.DiscrError=Gw={}))});var Jw=$(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});var $i=we(),Hm=Ww(),Kw=Qc(),Ij=Vs(),Pj=Me(),Cj={message:({params:{discrError:t,tagName:e}})=>t===Hm.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,$i._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Oj={keyword:"discriminator",type:"object",schemaType:"object",error:Cj,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,$i._)`${r}${(0,$i.getProperty)(a)}`);e.if((0,$i._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:Hm.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let m=f();e.if(!1);for(let g in m)e.elseIf((0,$i._)`${l} === ${g}`),e.assign(c,d(m[g]));e.else(),t.error(!1,{discrError:Hm.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(m){let g=e.name("valid"),x=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(x,$i.Name),g}function f(){var m;let g={},x=y(o),v=!0;for(let k=0;k<s.length;k++){let E=s[k];if(E!=null&&E.$ref&&!(0,Pj.schemaHasRulesButRef)(E,i.self.RULES)){let L=E.$ref;if(E=Kw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,L),E instanceof Kw.SchemaEnv&&(E=E.schema),E===void 0)throw new Ij.default(i.opts.uriResolver,i.baseId,L)}let F=(m=E==null?void 0:E.properties)===null||m===void 0?void 0:m[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(x||y(E)),b(F,k)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return g;function y({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 g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[k]=E}}}};Vm.default=Oj});var Yw=$((cV,zj)=>{zj.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 Wm=$((pt,Gm)=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.MissingRefError=pt.ValidationError=pt.CodeGen=pt.Name=pt.nil=pt.stringify=pt.str=pt._=pt.KeywordCxt=pt.Ajv=void 0;var Nj=G_(),Lj=Vw(),jj=Jw(),Xw=Yw(),Dj=["/properties"],vl="http://json-schema.org/draft-07/schema",Ri=class extends Nj.default{_addVocabularies(){super._addVocabularies(),Lj.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(jj.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Xw,Dj):Xw;this.addMetaSchema(e,vl,!1),this.refs["http://json-schema.org/schema"]=vl}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(vl)?vl:void 0)}};pt.Ajv=Ri;Gm.exports=pt=Ri;Gm.exports.Ajv=Ri;Object.defineProperty(pt,"__esModule",{value:!0});pt.default=Ri;var Mj=Hs();Object.defineProperty(pt,"KeywordCxt",{enumerable:!0,get:function(){return Mj.KeywordCxt}});var Ai=we();Object.defineProperty(pt,"_",{enumerable:!0,get:function(){return Ai._}});Object.defineProperty(pt,"str",{enumerable:!0,get:function(){return Ai.str}});Object.defineProperty(pt,"stringify",{enumerable:!0,get:function(){return Ai.stringify}});Object.defineProperty(pt,"nil",{enumerable:!0,get:function(){return Ai.nil}});Object.defineProperty(pt,"Name",{enumerable:!0,get:function(){return Ai.Name}});Object.defineProperty(pt,"CodeGen",{enumerable:!0,get:function(){return Ai.CodeGen}});var Fj=Yc();Object.defineProperty(pt,"ValidationError",{enumerable:!0,get:function(){return Fj.default}});var Uj=Vs();Object.defineProperty(pt,"MissingRefError",{enumerable:!0,get:function(){return Uj.default}})});var s0=$(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(r0,Xm),time:rn(Jm(!0),Qm),"date-time":rn(Qw(!0),o0),"iso-time":rn(Jm(),n0),"iso-date-time":rn(Qw(),i0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Gj,"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:eD,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:Wj,int32:{type:"number",validate:Yj},int64:{type:"number",validate:Xj},float:{type:"number",validate:t0},double:{type:"number",validate:t0},password:!0,binary:!0};nn.fastFormats={...nn.fullFormats,date:rn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Xm),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,o0),"iso-time":rn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,n0),"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,i0),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 qj(t){return t%4===0&&(t%100!==0||t%400===0)}var Zj=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Bj=[0,31,28,31,30,31,30,31,31,30,31,30,31];function r0(t){let e=Zj.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&&qj(r)?29:Bj[n])}function Xm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Km=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Jm(t){return function(r){let n=Km.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 n0(t,e){if(!(t&&e))return;let r=Km.exec(t),n=Km.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 Ym=/t|\s/i;function Qw(t){let e=Jm(t);return function(n){let o=n.split(Ym);return o.length===2&&r0(o[0])&&e(o[1])}}function o0(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function i0(t,e){if(!(t&&e))return;let[r,n]=t.split(Ym),[o,i]=e.split(Ym),s=Xm(r,o);if(s!==void 0)return s||Qm(n,i)}var Hj=/\/|:/,Vj=/^(?:[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 Gj(t){return Hj.test(t)&&Vj.test(t)}var e0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wj(t){return e0.lastIndex=0,e0.test(t)}var Kj=-(2**31),Jj=2**31-1;function Yj(t){return Number.isInteger(t)&&t<=Jj&&t>=Kj}function Xj(t){return Number.isInteger(t)}function t0(){return!0}var Qj=/[^\\]\\Z/;function eD(t){if(Qj.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var a0=$(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.formatLimitDefinition=void 0;var tD=Wm(),qr=we(),Hn=qr.operators,bl={formatMaximum:{okStr:"<=",ok:Hn.LTE,fail:Hn.GT},formatMinimum:{okStr:">=",ok:Hn.GTE,fail:Hn.LT},formatExclusiveMaximum:{okStr:"<",ok:Hn.LT,fail:Hn.GTE},formatExclusiveMinimum:{okStr:">",ok:Hn.GT,fail:Hn.LTE}},rD={message:({keyword:t,schemaCode:e})=>(0,qr.str)`should be ${bl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,qr._)`{comparison: ${bl[t].okStr}, limit: ${e}}`};Ii.formatLimitDefinition={keyword:Object.keys(bl),type:"string",schemaType:"string",$data:!0,error:rD,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 tD.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,qr._)`${f}[${c.schemaCode}]`);t.fail$data((0,qr.or)((0,qr._)`typeof ${m} != "object"`,(0,qr._)`${m} instanceof RegExp`,(0,qr._)`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 g=e.scopeValue("formats",{key:f,ref:m,code:s.code.formats?(0,qr._)`${s.code.formats}${(0,qr.getProperty)(f)}`:void 0});t.fail$data(d(g))}function d(f){return(0,qr._)`${f}.compare(${r}, ${n}) ${bl[o].fail} 0`}},dependencies:["format"]};var nD=t=>(t.addKeyword(Ii.formatLimitDefinition),t);Ii.default=nD});var p0=$((sa,u0)=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});var Pi=s0(),oD=a0(),eh=we(),c0=new eh.Name("fullFormats"),iD=new eh.Name("fastFormats"),th=(t,e={keywords:!0})=>{if(Array.isArray(e))return l0(t,e,Pi.fullFormats,c0),t;let[r,n]=e.mode==="fast"?[Pi.fastFormats,iD]:[Pi.fullFormats,c0],o=e.formats||Pi.formatNames;return l0(t,o,r,n),e.keywords&&(0,oD.default)(t),t};th.get=(t,e="full")=>{let n=(e==="fast"?Pi.fastFormats:Pi.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function l0(t,e,r,n){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,eh._)`require("ajv-formats/dist/formats").${n}`);for(let s of e)t.addFormat(s,r[s])}u0.exports=sa=th;Object.defineProperty(sa,"__esModule",{value:!0});sa.default=th});var U0=$((s5,F0)=>{var M0=require("stream").Stream,xM=require("util");F0.exports=Br;function Br(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}xM.inherits(Br,M0);Br.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(Br.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Br.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Br.prototype.resume=function(){this._released||this.release(),this.source.resume()};Br.prototype.pause=function(){this.source.pause()};Br.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Br.prototype.pipe=function(){var t=M0.prototype.pipe.apply(this,arguments);return this.resume(),t};Br.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)};Br.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 H0=$((a5,B0)=>{var vM=require("util"),Z0=require("stream").Stream,q0=U0();B0.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}vM.inherits(_t,Z0);_t.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];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 q0)){var r=q0.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};_t.prototype.pipe=function(t,e){return Z0.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(r){var n=_t.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.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 r=t;this.write(r),this._getNext()};_t.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};_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 V0=$((c5,bM)=>{bM.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 W0=$((l5,G0)=>{G0.exports=V0()});var Y0=$(mr=>{"use strict";var Cl=W0(),_M=require("path").extname,K0=/^\s*([^;\s]*)(?:;|\s|$)/,wM=/^text\//i;mr.charset=J0;mr.charsets={lookup:J0};mr.contentType=SM;mr.extension=kM;mr.extensions=Object.create(null);mr.lookup=TM;mr.types=Object.create(null);EM(mr.extensions,mr.types);function J0(t){if(!t||typeof t!="string")return!1;var e=K0.exec(t),r=e&&Cl[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&wM.test(e[1])?"UTF-8":!1}function SM(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?mr.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=mr.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}function kM(t){if(!t||typeof t!="string")return!1;var e=K0.exec(t),r=e&&mr.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}function TM(t){if(!t||typeof t!="string")return!1;var e=_M("x."+t).toLowerCase().substr(1);return e&&mr.types[e]||!1}function EM(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(Cl).forEach(function(o){var i=Cl[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(Cl[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 Q0=$((p5,X0)=>{X0.exports=$M;function $M(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var ph=$((d5,tS)=>{var eS=Q0();tS.exports=RM;function RM(t){var e=!1;return eS(function(){e=!0}),function(n,o){e?t(n,o):eS(function(){t(n,o)})}}});var dh=$((f5,rS)=>{rS.exports=AM;function AM(t){Object.keys(t.jobs).forEach(IM.bind(t)),t.jobs={}}function IM(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var fh=$((m5,oS)=>{var nS=ph(),PM=dh();oS.exports=CM;function CM(t,e,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=OM(e,o,t[o],function(i,s){o in r.jobs&&(delete r.jobs[o],i?PM(r):r.results[o]=s,n(i,r.results))})}function OM(t,e,r,n){var o;return t.length==2?o=t(r,nS(n)):o=t(r,e,nS(n)),o}});var mh=$((h5,iS)=>{iS.exports=zM;function zM(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 hh=$((g5,sS)=>{var NM=dh(),LM=ph();sS.exports=jM;function jM(t){Object.keys(this.jobs).length&&(this.index=this.size,NM(this),LM(t)(null,this.results))}});var cS=$((y5,aS)=>{var DM=fh(),MM=mh(),FM=hh();aS.exports=UM;function UM(t,e,r){for(var n=MM(t);n.index<(n.keyedList||t).length;)DM(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 FM.bind(n,r)}});var gh=$((x5,Ol)=>{var lS=fh(),qM=mh(),ZM=hh();Ol.exports=BM;Ol.exports.ascending=uS;Ol.exports.descending=HM;function BM(t,e,r,n){var o=qM(t,r);return lS(t,e,o,function i(s,a){if(s){n(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){lS(t,e,o,i);return}n(null,o.results)}),ZM.bind(o,n)}function uS(t,e){return t<e?-1:t>e?1:0}function HM(t,e){return-1*uS(t,e)}});var dS=$((v5,pS)=>{var VM=gh();pS.exports=GM;function GM(t,e,r){return VM(t,e,null,r)}});var mS=$((b5,fS)=>{fS.exports={parallel:cS(),serial:dS(),serialOrdered:gh()}});var yh=$((_5,hS)=>{"use strict";hS.exports=Object});var yS=$((w5,gS)=>{"use strict";gS.exports=Error});var vS=$((S5,xS)=>{"use strict";xS.exports=EvalError});var _S=$((k5,bS)=>{"use strict";bS.exports=RangeError});var SS=$((T5,wS)=>{"use strict";wS.exports=ReferenceError});var TS=$((E5,kS)=>{"use strict";kS.exports=SyntaxError});var zl=$(($5,ES)=>{"use strict";ES.exports=TypeError});var RS=$((R5,$S)=>{"use strict";$S.exports=URIError});var IS=$((A5,AS)=>{"use strict";AS.exports=Math.abs});var CS=$((I5,PS)=>{"use strict";PS.exports=Math.floor});var zS=$((P5,OS)=>{"use strict";OS.exports=Math.max});var LS=$((C5,NS)=>{"use strict";NS.exports=Math.min});var DS=$((O5,jS)=>{"use strict";jS.exports=Math.pow});var FS=$((z5,MS)=>{"use strict";MS.exports=Math.round});var qS=$((N5,US)=>{"use strict";US.exports=Number.isNaN||function(e){return e!==e}});var BS=$((L5,ZS)=>{"use strict";var WM=qS();ZS.exports=function(e){return WM(e)||e===0?e:e<0?-1:1}});var VS=$((j5,HS)=>{"use strict";HS.exports=Object.getOwnPropertyDescriptor});var xh=$((D5,GS)=>{"use strict";var Nl=VS();if(Nl)try{Nl([],"length")}catch{Nl=null}GS.exports=Nl});var KS=$((M5,WS)=>{"use strict";var Ll=Object.defineProperty||!1;if(Ll)try{Ll({},"a",{value:1})}catch{Ll=!1}WS.exports=Ll});var vh=$((F5,JS)=>{"use strict";JS.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 QS=$((U5,XS)=>{"use strict";var YS=typeof Symbol<"u"&&Symbol,KM=vh();XS.exports=function(){return typeof YS!="function"||typeof Symbol!="function"||typeof YS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:KM()}});var bh=$((q5,ek)=>{"use strict";ek.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var _h=$((Z5,tk)=>{"use strict";var JM=yh();tk.exports=JM.getPrototypeOf||null});var ok=$((B5,nk)=>{"use strict";var YM="Function.prototype.bind called on incompatible ",XM=Object.prototype.toString,QM=Math.max,e2="[object Function]",rk=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},t2=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},r2=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};nk.exports=function(e){var r=this;if(typeof r!="function"||XM.apply(r)!==e2)throw new TypeError(YM+r);for(var n=t2(arguments,1),o,i=function(){if(this instanceof o){var p=r.apply(this,rk(n,arguments));return Object(p)===p?p:this}return r.apply(e,rk(n,arguments))},s=QM(0,r.length-n.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+r2(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 ma=$((H5,ik)=>{"use strict";var n2=ok();ik.exports=Function.prototype.bind||n2});var jl=$((V5,sk)=>{"use strict";sk.exports=Function.prototype.call});var wh=$((G5,ak)=>{"use strict";ak.exports=Function.prototype.apply});var lk=$((W5,ck)=>{"use strict";ck.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var pk=$((K5,uk)=>{"use strict";var o2=ma(),i2=wh(),s2=jl(),a2=lk();uk.exports=a2||o2.call(s2,i2)});var fk=$((J5,dk)=>{"use strict";var c2=ma(),l2=zl(),u2=jl(),p2=pk();dk.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new l2("a function is required");return p2(c2,u2,e)}});var vk=$((Y5,xk)=>{"use strict";var d2=fk(),mk=xh(),gk;try{gk=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Sh=!!gk&&mk&&mk(Object.prototype,"__proto__"),yk=Object,hk=yk.getPrototypeOf;xk.exports=Sh&&typeof Sh.get=="function"?d2([Sh.get]):typeof hk=="function"?function(e){return hk(e==null?e:yk(e))}:!1});var kk=$((X5,Sk)=>{"use strict";var bk=bh(),_k=_h(),wk=vk();Sk.exports=bk?function(e){return bk(e)}:_k?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return _k(e)}:wk?function(e){return wk(e)}:null});var Dl=$((Q5,Tk)=>{"use strict";var f2=Function.prototype.call,m2=Object.prototype.hasOwnProperty,h2=ma();Tk.exports=h2.call(f2,m2)});var Ck=$((eG,Pk)=>{"use strict";var Ie,g2=yh(),y2=yS(),x2=vS(),v2=_S(),b2=SS(),Ui=TS(),Fi=zl(),_2=RS(),w2=IS(),S2=CS(),k2=zS(),T2=LS(),E2=DS(),$2=FS(),R2=BS(),Ak=Function,kh=function(t){try{return Ak('"use strict"; return ('+t+").constructor;")()}catch{}},ha=xh(),A2=KS(),Th=function(){throw new Fi},I2=ha?(function(){try{return arguments.callee,Th}catch{try{return ha(arguments,"callee").get}catch{return Th}}})():Th,Di=QS()(),Ct=kk(),P2=_h(),C2=bh(),Ik=wh(),ga=jl(),Mi={},O2=typeof Uint8Array>"u"||!Ct?Ie:Ct(Uint8Array),Mo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ie:ArrayBuffer,"%ArrayIteratorPrototype%":Di&&Ct?Ct([][Symbol.iterator]()):Ie,"%AsyncFromSyncIteratorPrototype%":Ie,"%AsyncFunction%":Mi,"%AsyncGenerator%":Mi,"%AsyncGeneratorFunction%":Mi,"%AsyncIteratorPrototype%":Mi,"%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%":y2,"%eval%":eval,"%EvalError%":x2,"%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%":Ak,"%GeneratorFunction%":Mi,"%Int8Array%":typeof Int8Array>"u"?Ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Di&&Ct?Ct(Ct([][Symbol.iterator]())):Ie,"%JSON%":typeof JSON=="object"?JSON:Ie,"%Map%":typeof Map>"u"?Ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Di||!Ct?Ie:Ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g2,"%Object.getOwnPropertyDescriptor%":ha,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ie:Promise,"%Proxy%":typeof Proxy>"u"?Ie:Proxy,"%RangeError%":v2,"%ReferenceError%":b2,"%Reflect%":typeof Reflect>"u"?Ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Di||!Ct?Ie:Ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Di&&Ct?Ct(""[Symbol.iterator]()):Ie,"%Symbol%":Di?Symbol:Ie,"%SyntaxError%":Ui,"%ThrowTypeError%":I2,"%TypedArray%":O2,"%TypeError%":Fi,"%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%":_2,"%WeakMap%":typeof WeakMap>"u"?Ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ie:WeakSet,"%Function.prototype.call%":ga,"%Function.prototype.apply%":Ik,"%Object.defineProperty%":A2,"%Object.getPrototypeOf%":P2,"%Math.abs%":w2,"%Math.floor%":S2,"%Math.max%":k2,"%Math.min%":T2,"%Math.pow%":E2,"%Math.round%":$2,"%Math.sign%":R2,"%Reflect.getPrototypeOf%":C2};if(Ct)try{null.error}catch(t){Ek=Ct(Ct(t)),Mo["%Error.prototype%"]=Ek}var Ek,z2=function t(e){var r;if(e==="%AsyncFunction%")r=kh("async function () {}");else if(e==="%GeneratorFunction%")r=kh("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=kh("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Ct&&(r=Ct(o.prototype))}return Mo[e]=r,r},$k={__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"]},ya=ma(),Ml=Dl(),N2=ya.call(ga,Array.prototype.concat),L2=ya.call(Ik,Array.prototype.splice),Rk=ya.call(ga,String.prototype.replace),Fl=ya.call(ga,String.prototype.slice),j2=ya.call(ga,RegExp.prototype.exec),D2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M2=/\\(\\)?/g,F2=function(e){var r=Fl(e,0,1),n=Fl(e,-1);if(r==="%"&&n!=="%")throw new Ui("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ui("invalid intrinsic syntax, expected opening `%`");var o=[];return Rk(e,D2,function(i,s,a,c){o[o.length]=a?Rk(c,M2,"$1"):s||i}),o},U2=function(e,r){var n=e,o;if(Ml($k,n)&&(o=$k[n],n="%"+o[0]+"%"),Ml(Mo,n)){var i=Mo[n];if(i===Mi&&(i=z2(n)),typeof i>"u"&&!r)throw new Fi("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ui("intrinsic "+e+" does not exist!")};Pk.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Fi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Fi('"allowMissing" argument must be a boolean');if(j2(/^%?[^%]*%?$/,e)===null)throw new Ui("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=F2(e),o=n.length>0?n[0]:"",i=U2("%"+o+"%",r),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],L2(n,N2([0,1],l)));for(var p=1,d=!0;p<n.length;p+=1){var f=n[p],m=Fl(f,0,1),g=Fl(f,-1);if((m==='"'||m==="'"||m==="`"||g==='"'||g==="'"||g==="`")&&m!==g)throw new Ui("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),o+="."+f,s="%"+o+"%",Ml(Mo,s))a=Mo[s];else if(a!=null){if(!(f in a)){if(!r)throw new Fi("base intrinsic for "+e+" exists, but the property is not available.");return}if(ha&&p+1>=n.length){var x=ha(a,f);d=!!x,d&&"get"in x&&!("originalValue"in x.get)?a=x.get:a=a[f]}else d=Ml(a,f),a=a[f];d&&!c&&(Mo[s]=a)}}return a}});var zk=$((tG,Ok)=>{"use strict";var q2=vh();Ok.exports=function(){return q2()&&!!Symbol.toStringTag}});var jk=$((rG,Lk)=>{"use strict";var Z2=Ck(),Nk=Z2("%Object.defineProperty%",!0),B2=zk()(),H2=Dl(),V2=zl(),Ul=B2?Symbol.toStringTag:null;Lk.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 V2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ul&&(n||!H2(e,Ul))&&(Nk?Nk(e,Ul,{configurable:!o,enumerable:!1,value:r,writable:!1}):e[Ul]=r)}});var Mk=$((nG,Dk)=>{"use strict";Dk.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var qk=$((oG,Uk)=>{"use strict";var Ah=H0(),G2=require("util"),Eh=require("path"),W2=require("http"),K2=require("https"),J2=require("url").parse,Y2=require("fs"),X2=require("stream").Stream,Q2=require("crypto"),$h=Y0(),eF=mS(),tF=jk(),Gn=Dl(),Rh=Mk();function Fk(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=[],Ah.call(this),t=t||{};for(var e in t)this[e]=t[e]}G2.inherits(Ue,Ah);Ue.LINE_BREAK=`\r
|
|
10
|
+
`;Ue.DEFAULT_CONTENT_TYPE="application/octet-stream";Ue.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Ah.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)};Ue.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)+Ue.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Gn(e,"httpVersion"))&&!(e instanceof X2))&&(r.knownLength||this._valuesToMeasure.push(e))};Ue.prototype._lengthRetriever=function(t,e){Gn(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):Y2.stat(t.path,function(r,n){if(r){e(r);return}var o=n.size-(t.start?t.start:0);e(null,o)}):Gn(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Gn(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};Ue.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="'+Fk(t)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&Rh(s,r.header);var a;for(var c in s)if(Gn(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 r;if(typeof e.filepath=="string"?r=Eh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Eh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Gn(t,"httpVersion")&&(r=Eh.basename(t.client._httpMessage.path||"")),r)return'filename="'+Fk(r)+'"'};Ue.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=$h.lookup(t.name)),!r&&t&&t.path&&(r=$h.lookup(t.path)),!r&&t&&t.readable&&Gn(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=$h.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=Ue.DEFAULT_CONTENT_TYPE),r};Ue.prototype._multiPartFooter=function(){return function(t){var e=Ue.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ue.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ue.LINE_BREAK};Ue.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Gn(t,e)&&(r[e.toLowerCase()]=t[e]);return r};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(),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(Ue.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ue.prototype._generateBoundary=function(){this._boundary="--------------------------"+Q2.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}eF.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(o){e+=o}),t(null,e)})};Ue.prototype.submit=function(t,e){var r,n,o={method:"post"};return typeof t=="string"?(t=J2(t),n=Rh({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(n=Rh(t,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=K2.request(n):r=W2.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};Ue.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Ue.prototype.toString=function(){return"[object FormData]"};tF(Ue.prototype,"FormData");Uk.exports=Ue});var sT=$((rW,iT)=>{var Bi=1e3,Hi=Bi*60,Vi=Hi*60,qo=Vi*24,_F=qo*7,wF=qo*365.25;iT.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return SF(t);if(r==="number"&&isFinite(t))return e.long?TF(t):kF(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function SF(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*wF;case"weeks":case"week":case"w":return r*_F;case"days":case"day":case"d":return r*qo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Vi;case"minutes":case"minute":case"mins":case"min":case"m":return r*Hi;case"seconds":case"second":case"secs":case"sec":case"s":return r*Bi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function kF(t){var e=Math.abs(t);return e>=qo?Math.round(t/qo)+"d":e>=Vi?Math.round(t/Vi)+"h":e>=Hi?Math.round(t/Hi)+"m":e>=Bi?Math.round(t/Bi)+"s":t+"ms"}function TF(t){var e=Math.abs(t);return e>=qo?Bl(t,e,qo,"day"):e>=Vi?Bl(t,e,Vi,"hour"):e>=Hi?Bl(t,e,Hi,"minute"):e>=Bi?Bl(t,e,Bi,"second"):t+" ms"}function Bl(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var Hh=$((nW,aT)=>{function EF(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=sT(),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,g;function x(...v){if(!x.enabled)return;let y=x,b=Number(new Date),w=b-(d||b);y.diff=w,y.prev=d,y.curr=b,d=b,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let k=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(F,L)=>{if(F==="%%")return"%";k++;let pe=r.formatters[L];if(typeof pe=="function"){let me=v[k];F=pe.call(y,me),v.splice(k,1),k--}return F}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return x.namespace=p,x.useColors=r.useColors(),x.color=r.selectColor(p),x.extend=n,x.destroy=r.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(p)),g),set:v=>{f=v}}),typeof r.init=="function"&&r.init(x),x}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,g=-1,x=0;for(;f<p.length;)if(m<d.length&&(d[m]===p[f]||d[m]==="*"))d[m]==="*"?(g=m,x=f,m++):(f++,m++);else if(g!==-1)m=g+1,x++,f=x;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}aT.exports=EF});var cT=$((hr,Hl)=>{hr.formatArgs=RF;hr.save=AF;hr.load=IF;hr.useColors=$F;hr.storage=PF();hr.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`."))}})();hr.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 $F(){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 RF(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Hl.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)}hr.log=console.debug||console.log||(()=>{});function AF(t){try{t?hr.storage.setItem("debug",t):hr.storage.removeItem("debug")}catch{}}function IF(){let t;try{t=hr.storage.getItem("debug")||hr.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function PF(){try{return localStorage}catch{}}Hl.exports=Hh()(hr);var{formatters:CF}=Hl.exports;CF.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var uT=$((oW,lT)=>{"use strict";lT.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 fT=$((iW,dT)=>{"use strict";var OF=require("os"),pT=require("tty"),Pr=uT(),{env:Ot}=process,Jn;Pr("no-color")||Pr("no-colors")||Pr("color=false")||Pr("color=never")?Jn=0:(Pr("color")||Pr("colors")||Pr("color=true")||Pr("color=always"))&&(Jn=1);"FORCE_COLOR"in Ot&&(Ot.FORCE_COLOR==="true"?Jn=1:Ot.FORCE_COLOR==="false"?Jn=0:Jn=Ot.FORCE_COLOR.length===0?1:Math.min(parseInt(Ot.FORCE_COLOR,10),3));function Vh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Gh(t,e){if(Jn===0)return 0;if(Pr("color=16m")||Pr("color=full")||Pr("color=truecolor"))return 3;if(Pr("color=256"))return 2;if(t&&!e&&Jn===void 0)return 0;let r=Jn||0;if(Ot.TERM==="dumb")return r;if(process.platform==="win32"){let n=OF.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ot)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ot)||Ot.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ot)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ot.TEAMCITY_VERSION)?1:0;if(Ot.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ot){let n=parseInt((Ot.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ot.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ot.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ot.TERM)||"COLORTERM"in Ot?1:r}function zF(t){let e=Gh(t,t&&t.isTTY);return Vh(e)}dT.exports={supportsColor:zF,stdout:Vh(Gh(!0,pT.isatty(1))),stderr:Vh(Gh(!0,pT.isatty(2)))}});var hT=$((zt,Gl)=>{var NF=require("tty"),Vl=require("util");zt.init=qF;zt.log=MF;zt.formatArgs=jF;zt.save=FF;zt.load=UF;zt.useColors=LF;zt.destroy=Vl.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=fT();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 LF(){return"colors"in zt.inspectOpts?!!zt.inspectOpts.colors:NF.isatty(process.stderr.fd)}function jF(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(`
|
|
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+"+Gl.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=DF()+e+" "+t[0]}function DF(){return zt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function MF(...t){return process.stderr.write(Vl.formatWithOptions(zt.inspectOpts,...t)+`
|
|
13
|
+
`)}function FF(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function UF(){return process.env.DEBUG}function qF(t){t.inspectOpts={};let e=Object.keys(zt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=zt.inspectOpts[e[r]]}Gl.exports=Hh()(zt);var{formatters:mT}=Gl.exports;mT.o=function(t){return this.inspectOpts.colors=this.useColors,Vl.inspect(t,this.inspectOpts).split(`
|
|
14
|
+
`).map(e=>e.trim()).join(" ")};mT.O=function(t){return this.inspectOpts.colors=this.useColors,Vl.inspect(t,this.inspectOpts)}});var Zo=$((sW,Wh)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Wh.exports=cT():Wh.exports=hT()});var gT=$(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});function ZF(t){return function(e,r){return new Promise((n,o)=>{t.call(this,e,r,(i,s)=>{i?o(i):n(s)})})}}Kh.default=ZF});var vT=$((Yh,xT)=>{"use strict";var yT=Yh&&Yh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},BF=require("events"),HF=yT(Zo()),VF=yT(gT()),ba=HF.default("agent-base");function GF(t){return!!t&&typeof t.addRequest=="function"}function Jh(){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 Wl(t,e){return new Wl.Agent(t,e)}(function(t){class e extends BF.EventEmitter{constructor(n,o){super();let i=o;typeof n=="function"?this.callback=n:n&&(i=n),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:Jh()?443:80}set defaultPort(n){this.explicitDefaultPort=n}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:Jh()?"https:":"http:"}set protocol(n){this.explicitProtocol=n}callback(n,o,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(n,o){let i=Object.assign({},o);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=Jh()),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,n._last=!0,n.shouldKeepAlive=!1;let s=!1,a=null,c=i.timeout||this.timeout,l=m=>{n._hadError||(n.emit("error",m),n._hadError=!0)},p=()=>{a=null,s=!0;let m=new Error(`A "socket" was not created for HTTP request before ${c}ms`);m.code="ETIMEOUT",l(m)},d=m=>{s||(a!==null&&(clearTimeout(a),a=null),l(m))},f=m=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),GF(m)){ba("Callback returned another Agent instance %o",m.constructor.name),m.addRequest(n,i);return}if(m){m.once("free",()=>{this.freeSocket(m,i)}),n.onSocket(m);return}let g=new Error(`no Duplex stream was returned to agent-base for \`${n.method} ${n.path}\``);l(g)};if(typeof this.callback!="function"){l(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(ba("Converting legacy callback function to promise"),this.promisifiedCallback=VF.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{ba("Resolving socket for %o request: %o",i.protocol,`${n.method} ${n.path}`),Promise.resolve(this.promisifiedCallback(n,i)).then(f,d)}catch(m){Promise.reject(m).catch(d)}}freeSocket(n,o){ba("Freeing socket %o %o",n.constructor.name,o),n.destroy()}destroy(){ba("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(Wl||(Wl={}));xT.exports=Wl});var bT=$(wa=>{"use strict";var WF=wa&&wa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wa,"__esModule",{value:!0});var KF=WF(Zo()),_a=KF.default("https-proxy-agent:parse-proxy-response");function JF(t){return new Promise((e,r)=>{let n=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){_a("onclose had error %o",d)}function c(){_a("onend")}function l(d){s(),_a("onerror %o",d),r(d)}function p(d){o.push(d),n+=d.length;let f=Buffer.concat(o,n);if(f.indexOf(`\r
|
|
16
16
|
\r
|
|
17
|
-
`)===-1){
|
|
18
|
-
`)),
|
|
19
|
-
`;
|
|
20
|
-
`;let f=
|
|
21
|
-
`);let{statusCode:h,buffered:y}=yield f;if(h===200){if(e.once("socket",BF),n.secureEndpoint){va("Upgrading socket connection to TLS");let x=n.servername||n.host;return mT.default.connect(Object.assign(Object.assign({},GF(n,"host","hostname","path","port")),{socket:i,servername:x}))}return i}i.destroy();let v=new fT.default.Socket({writable:!1});return v.readable=!0,e.once("socket",x=>{va("replaying proxy buffer for failed request"),FF.default(x.listenerCount("data")>0),x.push(y),x.push(null)}),v})}};Uo.default=Hh;function BF(t){t.resume()}function HF(t,e){return!!(!e&&t===80||e&&t===443)}function VF(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function GF(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});var yT=$((Wh,gT)=>{"use strict";var WF=Wh&&Wh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Vh=WF(hT());function Gh(t){return new Vh.default(t)}(function(t){t.HttpsProxyAgent=Vh.default,t.prototype=Vh.default.prototype})(Gh||(Gh={}));gT.exports=Gh});var vT=$((XG,xT)=>{var ba;xT.exports=function(){if(!ba){try{ba=Fo()("follow-redirects")}catch{}typeof ba!="function"&&(ba=function(){})}ba.apply(null,arguments)}});var kT=$((QG,sg)=>{var wa=require("url"),_a=wa.URL,KF=require("http"),JF=require("https"),Qh=require("stream").Writable,eg=require("assert"),bT=vT();(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 tg=!1;try{eg(new _a(""))}catch(t){tg=t.code==="ERR_INVALID_URL"}var YF=["Authorization","Proxy-Authorization","Cookie"],XF=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ng=["abort","aborted","connect","error","socket","timeout"],rg=Object.create(null);ng.forEach(function(t){rg[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var Jh=Sa("ERR_INVALID_URL","Invalid URL",TypeError),Yh=Sa("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),QF=Sa("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Yh),eU=Sa("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),tU=Sa("ERR_STREAM_WRITE_AFTER_END","write after end"),nU=Qh.prototype.destroy||wT;function hn(t,e){Qh.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 Yh?o:new Yh({cause:o}))}},this._headerFilter=new RegExp("^(?:"+YF.concat(t.sensitiveHeaders).map(cU).join("|")+")$","i"),this._performRequest()}hn.prototype=Object.create(Qh.prototype);hn.prototype.abort=function(){ig(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};hn.prototype.destroy=function(t){return ig(this._currentRequest,t),nU.call(this,t),this};hn.prototype.write=function(t,e,n){if(this._ending)throw new tU;if(!qo(t)&&!sU(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 eU),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={}),iU(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 ng)r.on(o,rg[o]);if(this._currentUrl=/^\//.test(this._options.path)?wa.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(ig(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new QF;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=[],Kh(/^content-/i,this._options.headers));var s=Kh(/^host$/i,this._options.headers),a=og(this._currentUrl),c=s||a.host,l=/^\w+:/.test(n)?this._currentUrl:wa.format(Object.assign(a,{host:c})),p=rU(n,l);if(bT("redirecting to",p.href),this._isRedirect=!0,Xh(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!oU(p.host,c))&&Kh(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 _T(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 aU(l)?l=Xh(l):qo(l)?l=Xh(og(l)):(d=p,p=ST(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"),eg.equal(p.protocol,o,"protocol mismatch"),bT("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 wT(){}function og(t){var e;if(tg)e=new _a(t);else if(e=ST(wa.parse(t)),!qo(e.protocol))throw new Jh({input:t});return e}function rU(t,e){return tg?new _a(t,e):og(wa.resolve(e,t))}function ST(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Jh({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Jh({input:t.href||t});return t}function Xh(t,e){var n=e||{};for(var r of XF)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 Kh(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 Sa(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 ig(t,e){for(var n of ng)t.removeListener(n,rg[n]);t.on("error",wT),t.destroy(e)}function oU(t,e){eg(qo(t)&&qo(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}function iU(t){return t instanceof Array}function qo(t){return typeof t=="string"||t instanceof String}function Zo(t){return typeof t=="function"}function sU(t){return typeof t=="object"&&"length"in t}function aU(t){return _a&&t instanceof _a}function cU(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}sg.exports=_T({http:KF,https:JF});sg.exports.wrap=_T});var Y={};Na(Y,{BRAND:()=>vR,DIRTY:()=>Qr,EMPTY_PATH:()=>Y$,INVALID:()=>le,NEVER:()=>nA,OK:()=>Ht,ParseStatus:()=>Nt,Schema:()=>_e,ZodAny:()=>kr,ZodArray:()=>dr,ZodBigInt:()=>to,ZodBoolean:()=>no,ZodBranded:()=>ns,ZodCatch:()=>mo,ZodDate:()=>ro,ZodDefault:()=>fo,ZodDiscriminatedUnion:()=>Da,ZodEffects:()=>Sn,ZodEnum:()=>uo,ZodError:()=>rn,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>Fa,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:()=>rs,ZodPromise:()=>Tr,ZodReadonly:()=>ho,ZodRecord:()=>Ma,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:()=>RR,array:()=>PR,bigint:()=>SR,boolean:()=>Iy,coerce:()=>tA,custom:()=>Ry,date:()=>kR,datetimeRegex:()=>Ey,defaultErrorMap:()=>lr,discriminatedUnion:()=>NR,effect:()=>GR,enum:()=>BR,function:()=>UR,getErrorMap:()=>Wo,getParsedType:()=>Gn,instanceof:()=>_R,intersection:()=>jR,isAborted:()=>ja,isAsync:()=>Ko,isDirty:()=>La,isValid:()=>wr,late:()=>bR,lazy:()=>qR,literal:()=>ZR,makeIssue:()=>ts,map:()=>MR,nan:()=>wR,nativeEnum:()=>HR,never:()=>CR,null:()=>$R,nullable:()=>KR,number:()=>Cy,object:()=>Tu,objectUtil:()=>wu,oboolean:()=>eA,onumber:()=>QR,optional:()=>WR,ostring:()=>XR,pipeline:()=>YR,preprocess:()=>JR,promise:()=>VR,quotelessJson:()=>W$,record:()=>DR,set:()=>FR,setErrorMap:()=>J$,strictObject:()=>OR,string:()=>Ay,symbol:()=>TR,transformer:()=>GR,tuple:()=>LR,undefined:()=>ER,union:()=>zR,unknown:()=>AR,util:()=>Ae,void:()=>IR});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 wu;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(wu||(wu={}));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"]),W$=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 K$=(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=K$;var _y=lr;function J$(t){_y=t}function Wo(){return _y}var ts=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}},Y$=[];function H(t,e){let n=Wo(),r=ts({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}),ja=t=>t.status==="aborted",La=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}},wy=(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 wy(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 wy(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 ns({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 rs.create(this,e)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},X$=/^c[^\s-]{8,}$/i,Q$=/^[0-9a-z]+$/,eR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tR=/^[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,nR=/^[a-z0-9_-]{21}$/i,rR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,oR=/^[-+]?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)?)??$/,iR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Su,aR=/^(?:(?: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])$/,cR=/^(?:(?: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])$/,lR=/^(([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]))$/,uR=/^(([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])$/,pR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ky="((\\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])))",fR=new RegExp(`^${ky}$`);function Ty(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 mR(t){return new RegExp(`^${Ty(t)}$`)}function Ey(t){let e=`${ky}T${Ty(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 hR(t,e){return!!((e==="v4"||!e)&&aR.test(t)||(e==="v6"||!e)&&lR.test(t))}function gR(t,e){if(!rR.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 yR(t,e){return!!((e==="v4"||!e)&&cR.test(t)||(e==="v6"||!e)&&uR.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")iR.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")Su||(Su=new RegExp(sR,"u")),Su.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")tR.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")nR.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")X$.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")Q$.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")eR.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"?Ey(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"?fR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?mR(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"?oR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?hR(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"?gR(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"?yR(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"?pR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?dR.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 xR(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"?xR(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 $y(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 ns||t instanceof ho?ur(t.unwrap()):t instanceof mo?ur(t._def.innerType):[],Da=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 ku(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=ku(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=ku(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(ja(i)||ja(s))return le;let a=ku(i.value,s.value);return a.valid?((La(i)||La(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 Ma=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 Fa=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 ts({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 ts({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 $y(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=$y;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 vR=Symbol("zod_brand"),ns=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}},rs=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 Sy(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Ry(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=Sy(e,r),c=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Sy(e,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):kr.create()}var bR={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 _R=(t,e={message:`Input not instance of ${t.name}`})=>Ry(n=>n instanceof t,e),Ay=Sr.create,Cy=eo.create,wR=ti.create,SR=to.create,Iy=no.create,kR=ro.create,TR=Yo.create,ER=oo.create,$R=io.create,RR=kr.create,AR=pr.create,CR=zn.create,IR=Xo.create,PR=dr.create,Tu=sn.create,OR=sn.strictCreate,zR=so.create,NR=Da.create,jR=ao.create,LR=Wn.create,DR=Ma.create,MR=Qo.create,FR=ei.create,UR=Fa.create,qR=co.create,ZR=lo.create,BR=uo.create,HR=po.create,VR=Tr.create,GR=Sn.create,WR=on.create,KR=Kn.create,JR=Sn.createWithPreprocess,YR=rs.create,XR=()=>Ay().optional(),QR=()=>Cy().optional(),eA=()=>Iy().optional(),tA={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 nA=le;var rA=Object.freeze({status:"aborted"});function C(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 oA=Symbol("zod_brand"),fr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ua={};function gn(t){return t&&Object.assign(Ua,t),Ua}var Ie={};Na(Ie,{BIGINT_FORMAT_RANGES:()=>Oy,Class:()=>$u,NUMBER_FORMAT_RANGES:()=>zu,aborted:()=>yo,allowsEval:()=>Iu,assert:()=>lA,assertEqual:()=>iA,assertIs:()=>aA,assertNever:()=>cA,assertNotEqual:()=>sA,assignProp:()=>Cu,cached:()=>ss,captureStackTrace:()=>Za,cleanEnum:()=>wA,cleanRegex:()=>cs,clone:()=>yn,createTransparentProxy:()=>hA,defineLazy:()=>et,esc:()=>go,escapeRegex:()=>Er,extend:()=>xA,finalizeIssue:()=>Nn,floatSafeRemainder:()=>Au,getElementAtPath:()=>uA,getEnumValues:()=>is,getLengthableOrigin:()=>ls,getParsedType:()=>mA,getSizableOrigin:()=>zy,isObject:()=>ni,isPlainObject:()=>ri,issue:()=>Nu,joinValues:()=>qa,jsonStringifyReplacer:()=>Ru,merge:()=>vA,normalizeParams:()=>ue,nullish:()=>as,numKeys:()=>fA,omit:()=>yA,optionalKeys:()=>Ou,partial:()=>bA,pick:()=>gA,prefixIssues:()=>Jn,primitiveTypes:()=>Py,promiseAllObject:()=>pA,propertyKeyTypes:()=>Pu,randomString:()=>dA,required:()=>_A,stringifyPrimitive:()=>Ba,unwrapMessage:()=>os});function iA(t){return t}function sA(t){return t}function aA(t){}function cA(t){throw new Error}function lA(t){}function is(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 qa(t,e="|"){return t.map(n=>Ba(n)).join(e)}function Ru(t,e){return typeof e=="bigint"?e.toString():e}function ss(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function as(t){return t==null}function cs(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Au(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 Cu(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function uA(t,e){return e?e.reduce((n,r)=>n==null?void 0:n[r],t):t}function pA(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 dA(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 Za=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function ni(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Iu=ss(()=>{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 fA(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var mA=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}`)}},Pu=new Set(["string","number","symbol"]),Py=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 hA(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 Ba(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Ou(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var zu={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]},Oy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gA(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 yA(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 xA(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 Cu(this,"shape",r),r},checks:[]};return yn(t,n)}function vA(t,e){return yn(t,{...t._zod.def,get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Cu(this,"shape",n),n},catchall:e._zod.def.catchall,checks:[]})}function bA(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 _A(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 os(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=os((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??os((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??os((c=n.customError)==null?void 0:c.call(n,t))??os((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 zy(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ls(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Nu(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function wA(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var $u=class{constructor(...e){}};var Ny=(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,Ru,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Ha=C("$ZodError",Ny),us=C("$ZodError",Ny,{Parent:Error});function ju(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 Lu(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 Du=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 Za(a,o==null?void 0:o.callee),a}return s.value},Mu=Du(us),Fu=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 Za(a,o==null?void 0:o.callee),a}return s.value},Uu=Fu(us),qu=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??Ha)(i.issues.map(s=>Nn(s,o,gn())))}:{success:!0,data:i.value}},xo=qu(us),Zu=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=Zu(us);var jy=/^[cC][^\s-]{8,}$/,Ly=/^[0-9a-z]+$/,Dy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,My=/^[0-9a-vA-V]{20}$/,Fy=/^[A-Za-z0-9]{27}$/,Uy=/^[a-zA-Z0-9_-]{21}$/,qy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Zy=/^([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})$/,Bu=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 By=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var kA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Hy(){return new RegExp(kA,"u")}var Vy=/^(?:(?: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])$/,Gy=/^(([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})$/,Wy=/^((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])$/,Ky=/^(([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])$/,Jy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hu=/^[A-Za-z0-9_-]*$/,Yy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Xy=/^\+(?:[0-9]){6,14}[0-9]$/,Qy="(?:(?:\\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])))",ex=new RegExp(`^${Qy}$`);function tx(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 nx(t){return new RegExp(`^${tx(t)}$`)}function rx(t){let e=tx({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(`^${Qy}T(?:${r})$`)}var ox=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 ix=/^\d+$/,sx=/^-?\d+(?:\.\d+)?/i,ax=/true|false/i,cx=/null/i;var lx=/^[^A-Z]*$/,ux=/^[^a-z]*$/;var jt=C("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),px={number:"number",bigint:"bigint",object:"date"},Vu=C("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let n=px[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})}}),Gu=C("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let n=px[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})}}),dx=C("$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):Au(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})}}),fx=C("$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]=zu[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=ix)}),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 mx=C("$ZodCheckMaxLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!as(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=ls(o);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),hx=C("$ZodCheckMinLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!as(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=ls(o);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),gx=C("$ZodCheckLengthEquals",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!as(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=ls(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})}}),ps=C("$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=()=>{})}),yx=C("$ZodCheckRegex",(t,e)=>{ps.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})}}),xx=C("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=lx),ps.init(t,e)}),vx=C("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ux),ps.init(t,e)}),bx=C("$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})}}),_x=C("$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})}}),wx=C("$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 Sx=C("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var Ga=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(...
|
|
23
|
-
`))}};var
|
|
17
|
+
`)===-1){_a("have not received end of HTTP headers yet..."),i();return}let g=f.toString("ascii",0,f.indexOf(`\r
|
|
18
|
+
`)),x=+g.split(" ")[1];_a("got proxy server response: %o",g),e({statusCode:x,buffered:f})}t.on("error",l),t.on("close",a),t.on("end",c),i()})}wa.default=JF});var ST=$(Bo=>{"use strict";var YF=Bo&&Bo.__awaiter||function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(p){try{l(n.next(p))}catch(d){s(d)}}function c(p){try{l(n.throw(p))}catch(d){s(d)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},Gi=Bo&&Bo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bo,"__esModule",{value:!0});var _T=Gi(require("net")),wT=Gi(require("tls")),XF=Gi(require("url")),QF=Gi(require("assert")),eU=Gi(Zo()),tU=vT(),rU=Gi(bT()),Sa=eU.default("https-proxy-agent:agent"),Xh=class extends tU.Agent{constructor(e){let r;if(typeof e=="string"?r=XF.default.parse(e):r=e,!r)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Sa("creating new HttpsProxyAgent instance: %o",r),super(r);let n=Object.assign({},r);this.secureProxy=r.secureProxy||iU(n.protocol),n.host=n.hostname||n.host,typeof n.port=="string"&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,r){return YF(this,void 0,void 0,function*(){let{proxy:n,secureProxy:o}=this,i;o?(Sa("Creating `tls.Socket`: %o",n),i=wT.default.connect(n)):(Sa("Creating `net.Socket`: %o",n),i=_T.default.connect(n));let s=Object.assign({},n.headers),c=`CONNECT ${`${r.host}:${r.port}`} HTTP/1.1\r
|
|
19
|
+
`;n.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:p,secureEndpoint:d}=r;oU(p,d)||(l+=`:${p}`),s.Host=l,s.Connection="close";for(let v of Object.keys(s))c+=`${v}: ${s[v]}\r
|
|
20
|
+
`;let f=rU.default(i);i.write(`${c}\r
|
|
21
|
+
`);let{statusCode:m,buffered:g}=yield f;if(m===200){if(e.once("socket",nU),r.secureEndpoint){Sa("Upgrading socket connection to TLS");let v=r.servername||r.host;return wT.default.connect(Object.assign(Object.assign({},sU(r,"host","hostname","path","port")),{socket:i,servername:v}))}return i}i.destroy();let x=new _T.default.Socket({writable:!1});return x.readable=!0,e.once("socket",v=>{Sa("replaying proxy buffer for failed request"),QF.default(v.listenerCount("data")>0),v.push(g),v.push(null)}),x})}};Bo.default=Xh;function nU(t){t.resume()}function oU(t,e){return!!(!e&&t===80||e&&t===443)}function iU(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function sU(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var TT=$((tg,kT)=>{"use strict";var aU=tg&&tg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Qh=aU(ST());function eg(t){return new Qh.default(t)}(function(t){t.HttpsProxyAgent=Qh.default,t.prototype=Qh.default.prototype})(eg||(eg={}));kT.exports=eg});var $T=$((uW,ET)=>{var ka;ET.exports=function(){if(!ka){try{ka=Zo()("follow-redirects")}catch{}typeof ka!="function"&&(ka=function(){})}ka.apply(null,arguments)}});var CT=$((pW,fg)=>{var Ea=require("url"),Ta=Ea.URL,cU=require("http"),lU=require("https"),sg=require("stream").Writable,ag=require("assert"),RT=$T();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Vo(Error.captureStackTrace);!e&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var cg=!1;try{ag(new Ta(""))}catch(t){cg=t.code==="ERR_INVALID_URL"}var uU=["Authorization","Proxy-Authorization","Cookie"],pU=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],lg=["abort","aborted","connect","error","socket","timeout"],ug=Object.create(null);lg.forEach(function(t){ug[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var ng=$a("ERR_INVALID_URL","Invalid URL",TypeError),og=$a("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),dU=$a("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",og),fU=$a("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),mU=$a("ERR_STREAM_WRITE_AFTER_END","write after end"),hU=sg.prototype.destroy||IT;function gr(t,e){sg.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 og?o:new og({cause:o}))}},this._headerFilter=new RegExp("^(?:"+uU.concat(t.sensitiveHeaders).map(_U).join("|")+")$","i"),this._performRequest()}gr.prototype=Object.create(sg.prototype);gr.prototype.abort=function(){dg(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};gr.prototype.destroy=function(t){return dg(this._currentRequest,t),hU.call(this,t),this};gr.prototype.write=function(t,e,r){if(this._ending)throw new mU;if(!Ho(t)&&!vU(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Vo(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 fU),this.abort())};gr.prototype.end=function(t,e,r){if(Vo(t)?(r=t,t=e=null):Vo(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}};gr.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};gr.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};gr.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){gr.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(gr.prototype,t,{get:function(){return this._currentRequest[t]}})});gr.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),xU(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))}};gr.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 lg)n.on(o,ug[o]);if(this._currentUrl=/^\//.test(this._options.path)?Ea.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()})()}};gr.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(dg(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new dU;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=[],rg(/^content-/i,this._options.headers));var s=rg(/^host$/i,this._options.headers),a=pg(this._currentUrl),c=s||a.host,l=/^\w+:/.test(r)?this._currentUrl:Ea.format(Object.assign(a,{host:c})),p=gU(r,l);if(RT("redirecting to",p.href),this._isRedirect=!0,ig(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!yU(p.host,c))&&rg(this._headerFilter,this._options.headers),Vo(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 AT(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 bU(l)?l=ig(l):Ho(l)?l=ig(pg(l)):(d=p,p=PT(l),l={protocol:o}),Vo(p)&&(d=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=r,!Ho(p.host)&&!Ho(p.hostname)&&(p.hostname="::1"),ag.equal(p.protocol,o,"protocol mismatch"),RT("options",p),new gr(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 IT(){}function pg(t){var e;if(cg)e=new Ta(t);else if(e=PT(Ea.parse(t)),!Ho(e.protocol))throw new ng({input:t});return e}function gU(t,e){return cg?new Ta(t,e):pg(Ea.resolve(e,t))}function PT(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new ng({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new ng({input:t.href||t});return t}function ig(t,e){var r=e||{};for(var n of pU)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 rg(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 $a(t,e,r){function n(o){Vo(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 dg(t,e){for(var r of lg)t.removeListener(r,ug[r]);t.on("error",IT),t.destroy(e)}function yU(t,e){ag(Ho(t)&&Ho(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function xU(t){return t instanceof Array}function Ho(t){return typeof t=="string"||t instanceof String}function Vo(t){return typeof t=="function"}function vU(t){return typeof t=="object"&&"length"in t}function bU(t){return Ta&&t instanceof Ta}function _U(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}fg.exports=AT({http:cU,https:lU});fg.exports.wrap=AT});var G={};Ma(G,{BRAND:()=>$R,DIRTY:()=>ro,EMPTY_PATH:()=>iR,INVALID:()=>ce,NEVER:()=>uA,OK:()=>Vt,ParseStatus:()=>Lt,Schema:()=>_e,ZodAny:()=>In,ZodArray:()=>xn,ZodBigInt:()=>oo,ZodBoolean:()=>io,ZodBranded:()=>is,ZodCatch:()=>yo,ZodDate:()=>so,ZodDefault:()=>go,ZodDiscriminatedUnion:()=>qa,ZodEffects:()=>kr,ZodEnum:()=>mo,ZodError:()=>ir,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>Ba,ZodIntersection:()=>uo,ZodIssueCode:()=>U,ZodLazy:()=>po,ZodLiteral:()=>fo,ZodMap:()=>ri,ZodNaN:()=>oi,ZodNativeEnum:()=>ho,ZodNever:()=>zr,ZodNull:()=>co,ZodNullable:()=>Jr,ZodNumber:()=>no,ZodObject:()=>ar,ZodOptional:()=>sr,ZodParsedType:()=>J,ZodPipeline:()=>ss,ZodPromise:()=>Pn,ZodReadonly:()=>xo,ZodRecord:()=>Za,ZodSchema:()=>_e,ZodSet:()=>ni,ZodString:()=>An,ZodSymbol:()=>ei,ZodTransformer:()=>kr,ZodTuple:()=>Kr,ZodType:()=>_e,ZodUndefined:()=>ao,ZodUnion:()=>lo,ZodUnknown:()=>yn,ZodVoid:()=>ti,addIssueToContext:()=>V,any:()=>LR,array:()=>FR,bigint:()=>PR,boolean:()=>Dy,coerce:()=>lA,custom:()=>Ny,date:()=>CR,datetimeRegex:()=>Oy,defaultErrorMap:()=>hn,discriminatedUnion:()=>ZR,effect:()=>tA,enum:()=>XR,function:()=>KR,getErrorMap:()=>Yo,getParsedType:()=>Wr,instanceof:()=>AR,intersection:()=>BR,isAborted:()=>Fa,isAsync:()=>Xo,isDirty:()=>Ua,isValid:()=>Rn,late:()=>RR,lazy:()=>JR,literal:()=>YR,makeIssue:()=>os,map:()=>GR,nan:()=>IR,nativeEnum:()=>QR,never:()=>DR,null:()=>NR,nullable:()=>nA,number:()=>jy,object:()=>Pu,objectUtil:()=>Ru,oboolean:()=>cA,onumber:()=>aA,optional:()=>rA,ostring:()=>sA,pipeline:()=>iA,preprocess:()=>oA,promise:()=>eA,quotelessJson:()=>rR,record:()=>VR,set:()=>WR,setErrorMap:()=>oR,strictObject:()=>UR,string:()=>Ly,symbol:()=>OR,transformer:()=>tA,tuple:()=>HR,undefined:()=>zR,union:()=>qR,unknown:()=>jR,util:()=>Ae,void:()=>MR});var Ae;(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})(Ae||(Ae={}));var Ru;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ru||(Ru={}));var J=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wr=t=>{switch(typeof t){case"undefined":return J.undefined;case"string":return J.string;case"number":return Number.isNaN(t)?J.nan:J.number;case"boolean":return J.boolean;case"function":return J.function;case"bigint":return J.bigint;case"symbol":return J.symbol;case"object":return Array.isArray(t)?J.array:t===null?J.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?J.promise:typeof Map<"u"&&t instanceof Map?J.map:typeof Set<"u"&&t instanceof Set?J.set:typeof Date<"u"&&t instanceof Date?J.date:J.object;default:return J.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"]),rR=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),ir=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,Ae.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()}};ir.create=t=>new ir(t);var nR=(t,e)=>{let r;switch(t.code){case U.invalid_type:t.received===J.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case U.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ae.jsonStringifyReplacer)}`;break;case U.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ae.joinValues(t.keys,", ")}`;break;case U.invalid_union:r="Invalid input";break;case U.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ae.joinValues(t.options)}`;break;case U.invalid_enum_value:r=`Invalid enum value. Expected ${Ae.joinValues(t.options)}, received '${t.received}'`;break;case U.invalid_arguments:r="Invalid function arguments";break;case U.invalid_return_type:r="Invalid function return type";break;case U.invalid_date:r="Invalid date";break;case U.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}"`:Ae.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case U.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 U.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 U.custom:r="Invalid input";break;case U.invalid_intersection_types:r="Intersection results could not be merged";break;case U.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case U.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ae.assertNever(t)}return{message:r}},hn=nR;var Ry=hn;function oR(t){Ry=t}function Yo(){return Ry}var os=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}},iR=[];function V(t,e){let r=Yo(),n=os({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===hn?void 0:hn].filter(o=>!!o)});t.common.issues.push(n)}var Lt=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 ce;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 ce;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}}},ce=Object.freeze({status:"aborted"}),ro=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),Fa=t=>t.status==="aborted",Ua=t=>t.status==="dirty",Rn=t=>t.status==="valid",Xo=t=>typeof Promise<"u"&&t instanceof Promise;var te;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(te||(te={}));var Sr=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}},Ay=(t,e)=>{if(Rn(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 ir(t.common.issues);return this._error=r,this._error}}};function xe(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 _e=class{get description(){return this._def.description}_getType(e){return Wr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:Wr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Xo(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:Wr(e)},o=this._parseSync({data:e,path:n.path,parent:n});return Ay(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:Wr(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:r});return Rn(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=>Rn(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:Wr(e)},o=this._parse({data:e,path:n.path,parent:n}),i=await(Xo(o)?o:Promise.resolve(o));return Ay(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:U.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 kr({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:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Jr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xn.create(this)}promise(){return Pn.create(this,this._def)}or(e){return lo.create([this,e],this._def)}and(e){return uo.create(this,e,this._def)}transform(e){return new kr({...xe(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new go({...xe(this._def),innerType:this,defaultValue:r,typeName:q.ZodDefault})}brand(){return new is({typeName:q.ZodBranded,type:this,...xe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new yo({...xe(this._def),innerType:this,catchValue:r,typeName:q.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ss.create(this,e)}readonly(){return xo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},sR=/^c[^\s-]{8,}$/i,aR=/^[0-9a-z]+$/,cR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lR=/^[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,uR=/^[a-z0-9_-]{21}$/i,pR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dR=/^[-+]?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)?)??$/,fR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Au,hR=/^(?:(?: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])$/,gR=/^(?:(?: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])$/,yR=/^(([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]))$/,xR=/^(([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])$/,vR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Py="((\\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])))",_R=new RegExp(`^${Py}$`);function Cy(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 wR(t){return new RegExp(`^${Cy(t)}$`)}function Oy(t){let e=`${Py}T${Cy(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 SR(t,e){return!!((e==="v4"||!e)&&hR.test(t)||(e==="v6"||!e)&&yR.test(t))}function kR(t,e){if(!pR.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 TR(t,e){return!!((e==="v4"||!e)&&gR.test(t)||(e==="v6"||!e)&&xR.test(t))}var An=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==J.string){let i=this._getOrReturnCtx(e);return V(i,{code:U.invalid_type,expected:J.string,received:i.parsedType}),ce}let n=new Lt,o;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),V(o,{code:U.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),V(o,{code:U.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?V(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&V(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")fR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"email",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Au||(Au=new RegExp(mR,"u")),Au.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"emoji",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")lR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"uuid",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")uR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"nanoid",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")sR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"cuid",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")aR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"cuid2",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")cR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"ulid",code:U.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),V(o,{validation:"url",code:U.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),V(o,{validation:"regex",code:U.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),V(o,{code:U.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),V(o,{code:U.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),V(o,{code:U.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Oy(i).test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{code:U.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?_R.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{code:U.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?wR(i).test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{code:U.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?dR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"duration",code:U.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?SR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"ip",code:U.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?kR(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"jwt",code:U.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?TR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"cidr",code:U.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?vR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"base64",code:U.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?bR.test(e.data)||(o=this._getOrReturnCtx(e,o),V(o,{validation:"base64url",code:U.invalid_string,message:i.message}),n.dirty()):Ae.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:U.invalid_string,...te.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...te.errToObj(e)})}url(e){return this._addCheck({kind:"url",...te.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...te.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...te.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...te.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...te.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...te.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...te.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...te.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...te.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...te.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...te.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...te.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,...te.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,...te.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...te.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...te.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...te.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...te.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...te.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...te.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...te.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...te.errToObj(r)})}nonempty(e){return this.min(1,te.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}};An.create=t=>new An({checks:[],typeName:q.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});function ER(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 no=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)!==J.number){let i=this._getOrReturnCtx(e);return V(i,{code:U.invalid_type,expected:J.number,received:i.parsedType}),ce}let n,o=new Lt;for(let i of this._def.checks)i.kind==="int"?Ae.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),V(n,{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)&&(n=this._getOrReturnCtx(e,n),V(n,{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)&&(n=this._getOrReturnCtx(e,n),V(n,{code:U.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?ER(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),V(n,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),V(n,{code:U.not_finite,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:te.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:te.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:te.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:te.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:te.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"&&Ae.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)}};no.create=t=>new no({checks:[],typeName:q.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var oo=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)!==J.bigint)return this._getInvalidInput(e);let n,o=new Lt;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),V(n,{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)&&(n=this._getOrReturnCtx(e,n),V(n,{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)&&(n=this._getOrReturnCtx(e,n),V(n,{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 r=this._getOrReturnCtx(e);return V(r,{code:U.invalid_type,expected:J.bigint,received:r.parsedType}),ce}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:te.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:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.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}};oo.create=t=>new oo({checks:[],typeName:q.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});var io=class extends _e{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==J.boolean){let n=this._getOrReturnCtx(e);return V(n,{code:U.invalid_type,expected:J.boolean,received:n.parsedType}),ce}return Vt(e.data)}};io.create=t=>new io({typeName:q.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var so=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==J.date){let i=this._getOrReturnCtx(e);return V(i,{code:U.invalid_type,expected:J.date,received:i.parsedType}),ce}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return V(i,{code:U.invalid_date}),ce}let n=new Lt,o;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),V(o,{code:U.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),V(o,{code:U.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Ae.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:te.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:te.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}};so.create=t=>new so({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:q.ZodDate,...xe(t)});var ei=class extends _e{_parse(e){if(this._getType(e)!==J.symbol){let n=this._getOrReturnCtx(e);return V(n,{code:U.invalid_type,expected:J.symbol,received:n.parsedType}),ce}return Vt(e.data)}};ei.create=t=>new ei({typeName:q.ZodSymbol,...xe(t)});var ao=class extends _e{_parse(e){if(this._getType(e)!==J.undefined){let n=this._getOrReturnCtx(e);return V(n,{code:U.invalid_type,expected:J.undefined,received:n.parsedType}),ce}return Vt(e.data)}};ao.create=t=>new ao({typeName:q.ZodUndefined,...xe(t)});var co=class extends _e{_parse(e){if(this._getType(e)!==J.null){let n=this._getOrReturnCtx(e);return V(n,{code:U.invalid_type,expected:J.null,received:n.parsedType}),ce}return Vt(e.data)}};co.create=t=>new co({typeName:q.ZodNull,...xe(t)});var In=class extends _e{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}};In.create=t=>new In({typeName:q.ZodAny,...xe(t)});var yn=class extends _e{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}};yn.create=t=>new yn({typeName:q.ZodUnknown,...xe(t)});var zr=class extends _e{_parse(e){let r=this._getOrReturnCtx(e);return V(r,{code:U.invalid_type,expected:J.never,received:r.parsedType}),ce}};zr.create=t=>new zr({typeName:q.ZodNever,...xe(t)});var ti=class extends _e{_parse(e){if(this._getType(e)!==J.undefined){let n=this._getOrReturnCtx(e);return V(n,{code:U.invalid_type,expected:J.void,received:n.parsedType}),ce}return Vt(e.data)}};ti.create=t=>new ti({typeName:q.ZodVoid,...xe(t)});var xn=class t extends _e{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==J.array)return V(r,{code:U.invalid_type,expected:J.array,received:r.parsedType}),ce;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(V(r,{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}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(V(r,{code:U.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&&(V(r,{code:U.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 Sr(r,s,r.path,a)))).then(s=>Lt.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new Sr(r,s,r.path,a)));return Lt.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:te.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:te.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:te.toString(r)}})}nonempty(e){return this.min(1,e)}};xn.create=(t,e)=>new xn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...xe(e)});function Qo(t){if(t instanceof ar){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=sr.create(Qo(n))}return new ar({...t._def,shape:()=>e})}else return t instanceof xn?new xn({...t._def,type:Qo(t.element)}):t instanceof sr?sr.create(Qo(t.unwrap())):t instanceof Jr?Jr.create(Qo(t.unwrap())):t instanceof Kr?Kr.create(t.items.map(e=>Qo(e))):t}var ar=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(),r=Ae.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==J.object){let l=this._getOrReturnCtx(e);return V(l,{code:U.invalid_type,expected:J.object,received:l.parsedType}),ce}let{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof zr&&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 Sr(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof zr){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&&(V(o,{code:U.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 Sr(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=>Lt.mergeObjectSync(n,l)):Lt.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return te.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:te.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,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Ae.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 Ae.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Qo(this)}partial(e){let r={};for(let n of Ae.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 Ae.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof sr;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return zy(Ae.objectKeys(this.shape))}};ar.create=(t,e)=>new ar({shape:()=>t,unknownKeys:"strip",catchall:zr.create(),typeName:q.ZodObject,...xe(e)});ar.strictCreate=(t,e)=>new ar({shape:()=>t,unknownKeys:"strict",catchall:zr.create(),typeName:q.ZodObject,...xe(e)});ar.lazycreate=(t,e)=>new ar({shape:t,unknownKeys:"strip",catchall:zr.create(),typeName:q.ZodObject,...xe(e)});var lo=class extends _e{_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 ir(a.ctx.common.issues));return V(r,{code:U.invalid_union,unionErrors:s}),ce}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 ir(c));return V(r,{code:U.invalid_union,unionErrors:a}),ce}}get options(){return this._def.options}};lo.create=(t,e)=>new lo({options:t,typeName:q.ZodUnion,...xe(e)});var gn=t=>t instanceof po?gn(t.schema):t instanceof kr?gn(t.innerType()):t instanceof fo?[t.value]:t instanceof mo?t.options:t instanceof ho?Ae.objectValues(t.enum):t instanceof go?gn(t._def.innerType):t instanceof ao?[void 0]:t instanceof co?[null]:t instanceof sr?[void 0,...gn(t.unwrap())]:t instanceof Jr?[null,...gn(t.unwrap())]:t instanceof is||t instanceof xo?gn(t.unwrap()):t instanceof yo?gn(t._def.innerType):[],qa=class t extends _e{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==J.object)return V(r,{code:U.invalid_type,expected:J.object,received:r.parsedType}),ce;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}):(V(r,{code:U.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ce)}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=gn(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:r,optionsMap:o,...xe(n)})}};function Iu(t,e){let r=Wr(t),n=Wr(e);if(t===e)return{valid:!0,data:t};if(r===J.object&&n===J.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=Iu(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===J.array&&n===J.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=Iu(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===J.date&&n===J.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var uo=class extends _e{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(i,s)=>{if(Fa(i)||Fa(s))return ce;let a=Iu(i.value,s.value);return a.valid?((Ua(i)||Ua(s))&&r.dirty(),{status:r.value,value:a.data}):(V(n,{code:U.invalid_intersection_types}),ce)};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}))}};uo.create=(t,e,r)=>new uo({left:t,right:e,typeName:q.ZodIntersection,...xe(r)});var Kr=class t extends _e{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==J.array)return V(n,{code:U.invalid_type,expected:J.array,received:n.parsedType}),ce;if(n.data.length<this._def.items.length)return V(n,{code:U.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ce;!this._def.rest&&n.data.length>this._def.items.length&&(V(n,{code:U.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 Sr(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Lt.mergeArray(r,s)):Lt.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Kr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kr({items:t,typeName:q.ZodTuple,rest:null,...xe(e)})};var Za=class t extends _e{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!==J.object)return V(n,{code:U.invalid_type,expected:J.object,received:n.parsedType}),ce;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new Sr(n,a,n.path,a)),value:s._parse(new Sr(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Lt.mergeObjectAsync(r,o):Lt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof _e?new t({keyType:e,valueType:r,typeName:q.ZodRecord,...xe(n)}):new t({keyType:An.create(),valueType:e,typeName:q.ZodRecord,...xe(r)})}},ri=class extends _e{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!==J.map)return V(n,{code:U.invalid_type,expected:J.map,received:n.parsedType}),ce;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],l)=>({key:o._parse(new Sr(n,a,n.path,[l,"key"])),value:i._parse(new Sr(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 ce;(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 ce;(l.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(l.value,p.value)}return{status:r.value,value:a}}}};ri.create=(t,e,r)=>new ri({valueType:e,keyType:t,typeName:q.ZodMap,...xe(r)});var ni=class t extends _e{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==J.set)return V(n,{code:U.invalid_type,expected:J.set,received:n.parsedType}),ce;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(V(n,{code:U.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&&(V(n,{code:U.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 ce;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 Sr(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:te.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:te.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};ni.create=(t,e)=>new ni({valueType:t,minSize:null,maxSize:null,typeName:q.ZodSet,...xe(e)});var Ba=class t extends _e{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==J.function)return V(r,{code:U.invalid_type,expected:J.function,received:r.parsedType}),ce;function n(a,c){return os({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yo(),hn].filter(l=>!!l),issueData:{code:U.invalid_arguments,argumentsError:c}})}function o(a,c){return os({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Yo(),hn].filter(l=>!!l),issueData:{code:U.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Pn){let a=this;return Vt(async function(...c){let l=new ir([]),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 Vt(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new ir([n(c,l.error)]);let p=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(p,i);if(!d.success)throw new ir([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:Kr.create(e).rest(yn.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||Kr.create([]).rest(yn.create()),returns:r||yn.create(),typeName:q.ZodFunction,...xe(n)})}},po=class extends _e{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})}};po.create=(t,e)=>new po({getter:t,typeName:q.ZodLazy,...xe(e)});var fo=class extends _e{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return V(r,{received:r.data,code:U.invalid_literal,expected:this._def.value}),ce}return{status:"valid",value:e.data}}get value(){return this._def.value}};fo.create=(t,e)=>new fo({value:t,typeName:q.ZodLiteral,...xe(e)});function zy(t,e){return new mo({values:t,typeName:q.ZodEnum,...xe(e)})}var mo=class t extends _e{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return V(r,{expected:Ae.joinValues(n),received:r.parsedType,code:U.invalid_type}),ce}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 V(r,{received:r.data,code:U.invalid_enum_value,options:n}),ce}return Vt(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})}};mo.create=zy;var ho=class extends _e{_parse(e){let r=Ae.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==J.string&&n.parsedType!==J.number){let o=Ae.objectValues(r);return V(n,{expected:Ae.joinValues(o),received:n.parsedType,code:U.invalid_type}),ce}if(this._cache||(this._cache=new Set(Ae.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Ae.objectValues(r);return V(n,{received:n.data,code:U.invalid_enum_value,options:o}),ce}return Vt(e.data)}get enum(){return this._def.values}};ho.create=(t,e)=>new ho({values:t,typeName:q.ZodNativeEnum,...xe(e)});var Pn=class extends _e{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==J.promise&&r.common.async===!1)return V(r,{code:U.invalid_type,expected:J.promise,received:r.parsedType}),ce;let n=r.parsedType===J.promise?r.data:Promise.resolve(r.data);return Vt(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Pn.create=(t,e)=>new Pn({type:t,typeName:q.ZodPromise,...xe(e)});var kr=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:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{V(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 ce;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?ce:c.status==="dirty"?ro(c.value):r.value==="dirty"?ro(c.value):c});{if(r.value==="aborted")return ce;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?ce:a.status==="dirty"?ro(a.value):r.value==="dirty"?ro(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"?ce:(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"?ce:(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(!Rn(s))return ce;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=>Rn(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):ce);Ae.assertNever(o)}};kr.create=(t,e,r)=>new kr({schema:t,typeName:q.ZodEffects,effect:e,...xe(r)});kr.createWithPreprocess=(t,e,r)=>new kr({schema:e,effect:{type:"preprocess",transform:t},typeName:q.ZodEffects,...xe(r)});var sr=class extends _e{_parse(e){return this._getType(e)===J.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};sr.create=(t,e)=>new sr({innerType:t,typeName:q.ZodOptional,...xe(e)});var Jr=class extends _e{_parse(e){return this._getType(e)===J.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Jr.create=(t,e)=>new Jr({innerType:t,typeName:q.ZodNullable,...xe(e)});var go=class extends _e{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===J.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};go.create=(t,e)=>new go({innerType:t,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});var yo=class extends _e{_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 Xo(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ir(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ir(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};yo.create=(t,e)=>new yo({innerType:t,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});var oi=class extends _e{_parse(e){if(this._getType(e)!==J.nan){let n=this._getOrReturnCtx(e);return V(n,{code:U.invalid_type,expected:J.nan,received:n.parsedType}),ce}return{status:"valid",value:e.data}}};oi.create=t=>new oi({typeName:q.ZodNaN,...xe(t)});var $R=Symbol("zod_brand"),is=class extends _e{_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}},ss=class t extends _e{_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"?ce:i.status==="dirty"?(r.dirty(),ro(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"?ce: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:q.ZodPipeline})}},xo=class extends _e{_parse(e){let r=this._def.innerType._parse(e),n=o=>(Rn(o)&&(o.value=Object.freeze(o.value)),o);return Xo(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};xo.create=(t,e)=>new xo({innerType:t,typeName:q.ZodReadonly,...xe(e)});function Iy(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Ny(t,e={},r){return t?In.create().superRefine((n,o)=>{let i=t(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Iy(e,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Iy(e,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):In.create()}var RR={object:ar.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 AR=(t,e={message:`Input not instance of ${t.name}`})=>Ny(r=>r instanceof t,e),Ly=An.create,jy=no.create,IR=oi.create,PR=oo.create,Dy=io.create,CR=so.create,OR=ei.create,zR=ao.create,NR=co.create,LR=In.create,jR=yn.create,DR=zr.create,MR=ti.create,FR=xn.create,Pu=ar.create,UR=ar.strictCreate,qR=lo.create,ZR=qa.create,BR=uo.create,HR=Kr.create,VR=Za.create,GR=ri.create,WR=ni.create,KR=Ba.create,JR=po.create,YR=fo.create,XR=mo.create,QR=ho.create,eA=Pn.create,tA=kr.create,rA=sr.create,nA=Jr.create,oA=kr.createWithPreprocess,iA=ss.create,sA=()=>Ly().optional(),aA=()=>jy().optional(),cA=()=>Dy().optional(),lA={string:(t=>An.create({...t,coerce:!0})),number:(t=>no.create({...t,coerce:!0})),boolean:(t=>io.create({...t,coerce:!0})),bigint:(t=>oo.create({...t,coerce:!0})),date:(t=>so.create({...t,coerce:!0}))};var uA=ce;var pA=Object.freeze({status:"aborted"});function I(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 dA=Symbol("zod_brand"),vn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ha={};function yr(t){return t&&Object.assign(Ha,t),Ha}var Pe={};Ma(Pe,{BIGINT_FORMAT_RANGES:()=>Fy,Class:()=>Ou,NUMBER_FORMAT_RANGES:()=>Fu,aborted:()=>bo,allowsEval:()=>ju,assert:()=>yA,assertEqual:()=>fA,assertIs:()=>hA,assertNever:()=>gA,assertNotEqual:()=>mA,assignProp:()=>Lu,cached:()=>ls,captureStackTrace:()=>Ga,cleanEnum:()=>IA,cleanRegex:()=>ps,clone:()=>xr,createTransparentProxy:()=>SA,defineLazy:()=>rt,esc:()=>vo,escapeRegex:()=>Cn,extend:()=>EA,finalizeIssue:()=>Nr,floatSafeRemainder:()=>Nu,getElementAtPath:()=>xA,getEnumValues:()=>cs,getLengthableOrigin:()=>ds,getParsedType:()=>wA,getSizableOrigin:()=>Uy,isObject:()=>ii,isPlainObject:()=>si,issue:()=>Uu,joinValues:()=>Va,jsonStringifyReplacer:()=>zu,merge:()=>$A,normalizeParams:()=>le,nullish:()=>us,numKeys:()=>_A,omit:()=>TA,optionalKeys:()=>Mu,partial:()=>RA,pick:()=>kA,prefixIssues:()=>Yr,primitiveTypes:()=>My,promiseAllObject:()=>vA,propertyKeyTypes:()=>Du,randomString:()=>bA,required:()=>AA,stringifyPrimitive:()=>Wa,unwrapMessage:()=>as});function fA(t){return t}function mA(t){return t}function hA(t){}function gA(t){throw new Error}function yA(t){}function cs(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 Va(t,e="|"){return t.map(r=>Wa(r)).join(e)}function zu(t,e){return typeof e=="bigint"?e.toString():e}function ls(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function us(t){return t==null}function ps(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Nu(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 rt(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 Lu(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function xA(t,e){return e?e.reduce((r,n)=>r==null?void 0:r[n],t):t}function vA(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 bA(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function vo(t){return JSON.stringify(t)}var Ga=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function ii(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var ju=ls(()=>{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 si(t){if(ii(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(ii(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _A(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var wA=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}`)}},Du=new Set(["string","number","symbol"]),My=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Cn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xr(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 le(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 SA(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 Wa(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Mu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Fu={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]},Fy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kA(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 xr(t,{...t._zod.def,shape:r,checks:[]})}function TA(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 xr(t,{...t._zod.def,shape:r,checks:[]})}function EA(t,e){if(!si(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 Lu(this,"shape",n),n},checks:[]};return xr(t,r)}function $A(t,e){return xr(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return Lu(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function RA(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 xr(e,{...e._zod.def,shape:o,checks:[]})}function AA(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 xr(e,{...e._zod.def,shape:o,checks:[]})}function bo(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 Yr(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function as(t){return typeof t=="string"?t:t==null?void 0:t.message}function Nr(t,e,r){var o,i,s,a,c,l;let n={...t,path:t.path??[]};if(!t.message){let p=as((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??as((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??as((c=r.customError)==null?void 0:c.call(r,t))??as((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 Uy(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ds(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Uu(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function IA(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var Ou=class{constructor(...e){}};var qy=(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,zu,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Ka=I("$ZodError",qy),fs=I("$ZodError",qy,{Parent:Error});function qu(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 Zu(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 Bu=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 vn;if(s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>Nr(c,i,yr())));throw Ga(a,o==null?void 0:o.callee),a}return s.value},Hu=Bu(fs),Vu=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=>Nr(c,i,yr())));throw Ga(a,o==null?void 0:o.callee),a}return s.value},Gu=Vu(fs),Wu=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 vn;return i.issues.length?{success:!1,error:new(t??Ka)(i.issues.map(s=>Nr(s,o,yr())))}:{success:!0,data:i.value}},_o=Wu(fs),Ku=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=>Nr(s,o,yr())))}:{success:!0,data:i.value}},wo=Ku(fs);var Zy=/^[cC][^\s-]{8,}$/,By=/^[0-9a-z]+$/,Hy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vy=/^[0-9a-vA-V]{20}$/,Gy=/^[A-Za-z0-9]{27}$/,Wy=/^[a-zA-Z0-9_-]{21}$/,Ky=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Jy=/^([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})$/,Ju=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 Yy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var CA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Xy(){return new RegExp(CA,"u")}var Qy=/^(?:(?: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])$/,ex=/^(([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})$/,tx=/^((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])$/,rx=/^(([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])$/,nx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yu=/^[A-Za-z0-9_-]*$/,ox=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var ix=/^\+(?:[0-9]){6,14}[0-9]$/,sx="(?:(?:\\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])))",ax=new RegExp(`^${sx}$`);function cx(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 lx(t){return new RegExp(`^${cx(t)}$`)}function ux(t){let e=cx({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(`^${sx}T(?:${n})$`)}var px=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 dx=/^\d+$/,fx=/^-?\d+(?:\.\d+)?/i,mx=/true|false/i,hx=/null/i;var gx=/^[^A-Z]*$/,yx=/^[^a-z]*$/;var jt=I("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),xx={number:"number",bigint:"bigint",object:"date"},Xu=I("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let r=xx[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=I("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let r=xx[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})}}),vx=I("$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):Nu(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})}}),bx=I("$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]=Fu[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=dx)}),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 _x=I("$ZodCheckMaxLength",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!us(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=ds(o);n.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),wx=I("$ZodCheckMinLength",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!us(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=ds(o);n.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),Sx=I("$ZodCheckLengthEquals",(t,e)=>{var r;jt.init(t,e),(r=t._zod.def).when??(r.when=n=>{let o=n.value;return!us(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=ds(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})}}),ms=I("$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=()=>{})}),kx=I("$ZodCheckRegex",(t,e)=>{ms.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})}}),Tx=I("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=gx),ms.init(t,e)}),Ex=I("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=yx),ms.init(t,e)}),$x=I("$ZodCheckIncludes",(t,e)=>{jt.init(t,e);let r=Cn(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})}}),Rx=I("$ZodCheckStartsWith",(t,e)=>{jt.init(t,e);let r=new RegExp(`^${Cn(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})}}),Ax=I("$ZodCheckEndsWith",(t,e)=>{jt.init(t,e);let r=new RegExp(`.*${Cn(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 Ix=I("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var Ya=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(...n.map(s=>s.length-s.trimStart().length)),i=n.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,r=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new e(...r,o.join(`
|
|
23
|
+
`))}};var Cx={major:4,minor:0,patch:0};var Je=I("$ZodType",(t,e)=>{var o;var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Cx;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),(o=t._zod.deferred)==null||o.push(()=>{t._zod.run=t._zod.parse});else{let i=(s,a,c)=>{let l=bo(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,m=d._zod.check(s);if(m instanceof Promise&&(c==null?void 0:c.async)===!1)throw new vn;if(p||m instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(l||(l=bo(s,f)))});else{if(s.issues.length===f)continue;l||(l=bo(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 vn;return c.then(l=>i(l,n,a))}return i(c,n,a)}}t["~standard"]={validate:i=>{var s;try{let a=_o(t,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return wo(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}}),hs=I("$ZodString",(t,e)=>{var r;Je.init(t,e),t._zod.pattern=[...((r=t==null?void 0:t._zod.bag)==null?void 0:r.patterns)??[]].pop()??px(t._zod.bag),t._zod.parse=(n,o)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),nt=I("$ZodStringFormat",(t,e)=>{ms.init(t,e),hs.init(t,e)}),tp=I("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Jy),nt.init(t,e)}),rp=I("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ju(n))}else e.pattern??(e.pattern=Ju());nt.init(t,e)}),np=I("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Yy),nt.init(t,e)}),op=I("$ZodURL",(t,e)=>{nt.init(t,e),t._zod.check=r=>{try{let n=r.value,o=new URL(n),i=o.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ox.source,input:r.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)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!n.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),ip=I("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Xy()),nt.init(t,e)}),sp=I("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Wy),nt.init(t,e)}),ap=I("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Zy),nt.init(t,e)}),cp=I("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=By),nt.init(t,e)}),lp=I("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Hy),nt.init(t,e)}),up=I("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Vy),nt.init(t,e)}),pp=I("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Gy),nt.init(t,e)}),qx=I("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=ux(e)),nt.init(t,e)}),Zx=I("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=ax),nt.init(t,e)}),Bx=I("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=lx(e)),nt.init(t,e)}),Hx=I("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ky),nt.init(t,e)}),dp=I("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Qy),nt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),fp=I("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ex),nt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),mp=I("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=tx),nt.init(t,e)}),hp=I("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=rx),nt.init(t,e),t._zod.check=r=>{let[n,o]=r.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://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function Vx(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var gp=I("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=nx),nt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{Vx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function OA(t){if(!Yu.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Vx(r)}var yp=I("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Yu),nt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{OA(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),xp=I("$ZodE164",(t,e)=>{e.pattern??(e.pattern=ix),nt.init(t,e)});function zA(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}var vp=I("$ZodJWT",(t,e)=>{nt.init(t,e),t._zod.check=r=>{zA(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}});var Qa=I("$ZodNumber",(t,e)=>{Je.init(t,e),t._zod.pattern=t._zod.bag.pattern??fx,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...i?{received:i}:{}}),r}}),bp=I("$ZodNumber",(t,e)=>{bx.init(t,e),Qa.init(t,e)}),_p=I("$ZodBoolean",(t,e)=>{Je.init(t,e),t._zod.pattern=mx,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),r}});var wp=I("$ZodNull",(t,e)=>{Je.init(t,e),t._zod.pattern=hx,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:t}),r}});var Sp=I("$ZodUnknown",(t,e)=>{Je.init(t,e),t._zod.parse=r=>r}),kp=I("$ZodNever",(t,e)=>{Je.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)});function Ox(t,e,r){t.issues.length&&e.issues.push(...Yr(r,t.issues)),e.value[r]=t.value}var Tp=I("$ZodArray",(t,e)=>{Je.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),r;r.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:[]},n);c instanceof Promise?i.push(c.then(l=>Ox(l,r,s))):Ox(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function Xa(t,e,r){t.issues.length&&e.issues.push(...Yr(r,t.issues)),e.value[r]=t.value}function zx(t,e,r,n){t.issues.length?n[r]===void 0?r in n?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...Yr(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}var ec=I("$ZodObject",(t,e)=>{Je.init(t,e);let r=ls(()=>{let d=Object.keys(e.shape);for(let m of d)if(!(e.shape[m]instanceof Je))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);let f=Mu(e.shape);return{shape:e.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});rt(t._zod,"propValues",()=>{let d=e.shape,f={};for(let m in d){let g=d[m]._zod;if(g.values){f[m]??(f[m]=new Set);for(let x of g.values)f[m].add(x)}}return f});let n=d=>{let f=new Ya(["shape","payload","ctx"]),m=r.value,g=b=>{let w=vo(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let x=Object.create(null),v=0;for(let b of m.keys)x[b]=`key_${v++}`;f.write("const newResult = {}");for(let b of m.keys)if(m.optionalKeys.has(b)){let w=x[b];f.write(`const ${w} = ${g(b)};`);let k=vo(b);f.write(`
|
|
24
24
|
if (${w}.issues.length) {
|
|
25
25
|
if (input[${k}] === undefined) {
|
|
26
26
|
if (${k} in input) {
|
|
@@ -39,82 +39,83 @@
|
|
|
39
39
|
} else {
|
|
40
40
|
newResult[${k}] = ${w}.value;
|
|
41
41
|
}
|
|
42
|
-
`)}else{let w=
|
|
42
|
+
`)}else{let w=x[b];f.write(`const ${w} = ${g(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[${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=!Ua.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?$x(me,d,k,h):Wa(me,d,k))):j?$x(F,d,k,h):Wa(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=>Wa(E,d,w))):Wa(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 Rx(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 Ya=C("$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=>cs(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=>Rx(s,n,t,r)):Rx(i,n,t,r)}}),bp=C("$ZodDiscriminatedUnion",(t,e)=>{Ya.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=ss(()=>{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)}}),_p=C("$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])=>Ax(n,c,l)):Ax(n,i,s)}});function Wu(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=Wu(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=Wu(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 Ax(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=Wu(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 wp=C("$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 Sp=C("$ZodEnum",(t,e)=>{Ke.init(t,e);let n=is(e.entries);t._zod.values=new Set(n),t._zod.pattern=new RegExp(`^(${n.filter(r=>Pu.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}}),kp=C("$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 Tp=C("$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}}),Ep=C("$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(`^(${cs(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)}),$p=C("$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(`^(${cs(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)}),Rp=C("$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=>Cx(i,e)):Cx(o,e)}});function Cx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Ap=C("$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))}),Cp=C("$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=>Ix(i,t)):Ix(o,t)}});function Ix(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=C("$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 Pp=C("$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=>Px(i,e,r)):Px(o,e,r)}});function Px(t,e,n){return yo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},n)}var Op=C("$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(Ox):Ox(o)}});function Ox(t){return t.value=Object.freeze(t.value),t}var zp=C("$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=>zx(i,n,r,t));zx(o,n,r,t)}});function zx(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(Nu(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},RA=()=>{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 ${Ba(r.values[0])}`:`Invalid option: expected one of ${qa(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":""}: ${qa(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 Fx(){return{localeError:RA()}}var AA=Symbol("ZodOutput"),CA=Symbol("ZodInput"),fs=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 Ux(){return new fs}var $r=Ux();function Np(t,e){return new t({type:"string",...ue(e)})}function jp(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(e)})}function Xa(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(e)})}function Lp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(e)})}function Dp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(e)})}function Mp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(e)})}function Fp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(e)})}function Up(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(e)})}function qp(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(e)})}function Zp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(e)})}function Bp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(e)})}function Hp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(e)})}function Vp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(e)})}function Gp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(e)})}function Wp(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(e)})}function Kp(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(e)})}function Jp(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(e)})}function Yp(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(e)})}function Xp(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(e)})}function Qp(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(e)})}function ed(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(e)})}function td(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(e)})}function nd(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(e)})}function qx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(e)})}function Zx(t,e){return new t({type:"string",format:"date",check:"string_format",...ue(e)})}function Bx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(e)})}function Hx(t,e){return new t({type:"string",format:"duration",check:"string_format",...ue(e)})}function rd(t,e){return new t({type:"number",checks:[],...ue(e)})}function od(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(e)})}function id(t,e){return new t({type:"boolean",...ue(e)})}function sd(t,e){return new t({type:"null",...ue(e)})}function ad(t){return new t({type:"unknown"})}function cd(t,e){return new t({type:"never",...ue(e)})}function Qa(t,e){return new Vu({check:"less_than",...ue(e),value:t,inclusive:!1})}function ms(t,e){return new Vu({check:"less_than",...ue(e),value:t,inclusive:!0})}function ec(t,e){return new Gu({check:"greater_than",...ue(e),value:t,inclusive:!1})}function hs(t,e){return new Gu({check:"greater_than",...ue(e),value:t,inclusive:!0})}function tc(t,e){return new dx({check:"multiple_of",...ue(e),value:t})}function nc(t,e){return new mx({check:"max_length",...ue(e),maximum:t})}function oi(t,e){return new hx({check:"min_length",...ue(e),minimum:t})}function rc(t,e){return new gx({check:"length_equals",...ue(e),length:t})}function ld(t,e){return new yx({check:"string_format",format:"regex",...ue(e),pattern:t})}function ud(t){return new xx({check:"string_format",format:"lowercase",...ue(t)})}function pd(t){return new vx({check:"string_format",format:"uppercase",...ue(t)})}function dd(t,e){return new bx({check:"string_format",format:"includes",...ue(e),includes:t})}function fd(t,e){return new _x({check:"string_format",format:"starts_with",...ue(e),prefix:t})}function md(t,e){return new wx({check:"string_format",format:"ends_with",...ue(e),suffix:t})}function bo(t){return new Sx({check:"overwrite",tx:t})}function hd(t){return bo(e=>e.normalize(t))}function gd(){return bo(t=>t.trim())}function yd(){return bo(t=>t.toLowerCase())}function xd(){return bo(t=>t.toUpperCase())}function Vx(t,e,n){return new t({type:"array",element:e,...ue(n)})}function vd(t,e,n){let r=ue(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function bd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...ue(n)})}var oc=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=is(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 _d(t,e){if(t instanceof fs){let r=new oc(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 oc(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 pC=C("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ke.init(t,e),t.def=e,t.parse=(n,r)=>Mu(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>xo(t,n,r),t.parseAsync=async(n,r)=>Uu(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 dC=C("ZodMiniObject",(t,e)=>{Ja.init(t,e),pC.init(t,e),Ie.defineLazy(t,"shape",()=>e.shape)});function wd(t,e){let n={type:"object",get shape(){return Ie.assignProp(this,"shape",{...t}),this.shape},...Ie.normalizeParams(e)};return new dC(n)}function kn(t){return!!t._zod}function wo(t){let e=Object.values(t);if(e.length===0)return wd({});let n=e.every(kn),r=e.every(o=>!kn(o));if(n)return wd(t);if(r)return Tu(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 ic(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 sc(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 Wx(t){return t.description}function Kx(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 ac(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 gs={};Na(gs,{ZodISODate:()=>Yx,ZodISODateTime:()=>Jx,ZodISODuration:()=>Qx,ZodISOTime:()=>Xx,date:()=>kd,datetime:()=>Sd,duration:()=>Ed,time:()=>Td});var Jx=C("ZodISODateTime",(t,e)=>{Nx.init(t,e),pt.init(t,e)});function Sd(t){return qx(Jx,t)}var Yx=C("ZodISODate",(t,e)=>{jx.init(t,e),pt.init(t,e)});function kd(t){return Zx(Yx,t)}var Xx=C("ZodISOTime",(t,e)=>{Lx.init(t,e),pt.init(t,e)});function Td(t){return Bx(Xx,t)}var Qx=C("ZodISODuration",(t,e)=>{Dx.init(t,e),pt.init(t,e)});function Ed(t){return Hx(Qx,t)}var ev=(t,e)=>{Ha.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>Lu(t,n)},flatten:{value:n=>ju(t,n)},addIssue:{value:n=>t.issues.push(n)},addIssues:{value:n=>t.issues.push(...n)},isEmpty:{get(){return t.issues.length===0}}})},m3=C("ZodError",ev),ys=C("ZodError",ev,{Parent:Error});var tv=Du(ys),nv=Fu(ys),rv=qu(ys),ov=Zu(ys);var xt=C("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)=>tv(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>rv(t,n,r),t.parseAsync=async(n,r)=>nv(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>ov(t,n,r),t.spa=t.safeParseAsync,t.refine=(n,r)=>t.check(lI(n,r)),t.superRefine=n=>t.check(uI(n)),t.overwrite=n=>t.check(bo(n)),t.optional=()=>ft(t),t.nullable=()=>av(t),t.nullish=()=>ft(av(t)),t.nonoptional=n=>nI(t,n),t.array=()=>Ne(t),t.or=n=>at([t,n]),t.and=n=>lc(t,n),t.transform=n=>Rd(t,fv(n)),t.default=n=>QC(t,n),t.prefault=n=>tI(t,n),t.catch=n=>oI(t,n),t.pipe=n=>Rd(t,n),t.readonly=()=>aI(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)),cv=C("_ZodString",(t,e)=>{ds.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(ld(...r)),t.includes=(...r)=>t.check(dd(...r)),t.startsWith=(...r)=>t.check(fd(...r)),t.endsWith=(...r)=>t.check(md(...r)),t.min=(...r)=>t.check(oi(...r)),t.max=(...r)=>t.check(nc(...r)),t.length=(...r)=>t.check(rc(...r)),t.nonempty=(...r)=>t.check(oi(1,...r)),t.lowercase=r=>t.check(ud(r)),t.uppercase=r=>t.check(pd(r)),t.trim=()=>t.check(gd()),t.normalize=(...r)=>t.check(hd(...r)),t.toLowerCase=()=>t.check(yd()),t.toUpperCase=()=>t.check(xd())}),_C=C("ZodString",(t,e)=>{ds.init(t,e),cv.init(t,e),t.email=n=>t.check(jp(wC,n)),t.url=n=>t.check(Up(SC,n)),t.jwt=n=>t.check(nd(DC,n)),t.emoji=n=>t.check(qp(kC,n)),t.guid=n=>t.check(Xa(iv,n)),t.uuid=n=>t.check(Lp(cc,n)),t.uuidv4=n=>t.check(Dp(cc,n)),t.uuidv6=n=>t.check(Mp(cc,n)),t.uuidv7=n=>t.check(Fp(cc,n)),t.nanoid=n=>t.check(Zp(TC,n)),t.guid=n=>t.check(Xa(iv,n)),t.cuid=n=>t.check(Bp(EC,n)),t.cuid2=n=>t.check(Hp($C,n)),t.ulid=n=>t.check(Vp(RC,n)),t.base64=n=>t.check(Qp(NC,n)),t.base64url=n=>t.check(ed(jC,n)),t.xid=n=>t.check(Gp(AC,n)),t.ksuid=n=>t.check(Wp(CC,n)),t.ipv4=n=>t.check(Kp(IC,n)),t.ipv6=n=>t.check(Jp(PC,n)),t.cidrv4=n=>t.check(Yp(OC,n)),t.cidrv6=n=>t.check(Xp(zC,n)),t.e164=n=>t.check(td(LC,n)),t.datetime=n=>t.check(Sd(n)),t.date=n=>t.check(kd(n)),t.time=n=>t.check(Td(n)),t.duration=n=>t.check(Ed(n))});function R(t){return Np(_C,t)}var pt=C("ZodStringFormat",(t,e)=>{tt.init(t,e),cv.init(t,e)}),wC=C("ZodEmail",(t,e)=>{Yu.init(t,e),pt.init(t,e)});var iv=C("ZodGUID",(t,e)=>{Ku.init(t,e),pt.init(t,e)});var cc=C("ZodUUID",(t,e)=>{Ju.init(t,e),pt.init(t,e)});var SC=C("ZodURL",(t,e)=>{Xu.init(t,e),pt.init(t,e)});var kC=C("ZodEmoji",(t,e)=>{Qu.init(t,e),pt.init(t,e)});var TC=C("ZodNanoID",(t,e)=>{ep.init(t,e),pt.init(t,e)});var EC=C("ZodCUID",(t,e)=>{tp.init(t,e),pt.init(t,e)});var $C=C("ZodCUID2",(t,e)=>{np.init(t,e),pt.init(t,e)});var RC=C("ZodULID",(t,e)=>{rp.init(t,e),pt.init(t,e)});var AC=C("ZodXID",(t,e)=>{op.init(t,e),pt.init(t,e)});var CC=C("ZodKSUID",(t,e)=>{ip.init(t,e),pt.init(t,e)});var IC=C("ZodIPv4",(t,e)=>{sp.init(t,e),pt.init(t,e)});var PC=C("ZodIPv6",(t,e)=>{ap.init(t,e),pt.init(t,e)});var OC=C("ZodCIDRv4",(t,e)=>{cp.init(t,e),pt.init(t,e)});var zC=C("ZodCIDRv6",(t,e)=>{lp.init(t,e),pt.init(t,e)});var NC=C("ZodBase64",(t,e)=>{up.init(t,e),pt.init(t,e)});var jC=C("ZodBase64URL",(t,e)=>{pp.init(t,e),pt.init(t,e)});var LC=C("ZodE164",(t,e)=>{dp.init(t,e),pt.init(t,e)});var DC=C("ZodJWT",(t,e)=>{fp.init(t,e),pt.init(t,e)});var lv=C("ZodNumber",(t,e)=>{Ka.init(t,e),xt.init(t,e),t.gt=(r,o)=>t.check(ec(r,o)),t.gte=(r,o)=>t.check(hs(r,o)),t.min=(r,o)=>t.check(hs(r,o)),t.lt=(r,o)=>t.check(Qa(r,o)),t.lte=(r,o)=>t.check(ms(r,o)),t.max=(r,o)=>t.check(ms(r,o)),t.int=r=>t.check(sv(r)),t.safe=r=>t.check(sv(r)),t.positive=r=>t.check(ec(0,r)),t.nonnegative=r=>t.check(hs(0,r)),t.negative=r=>t.check(Qa(0,r)),t.nonpositive=r=>t.check(ms(0,r)),t.multipleOf=(r,o)=>t.check(tc(r,o)),t.step=(r,o)=>t.check(tc(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 rd(lv,t)}var MC=C("ZodNumberFormat",(t,e)=>{mp.init(t,e),lv.init(t,e)});function sv(t){return od(MC,t)}var FC=C("ZodBoolean",(t,e)=>{hp.init(t,e),xt.init(t,e)});function Ct(t){return id(FC,t)}var UC=C("ZodNull",(t,e)=>{gp.init(t,e),xt.init(t,e)});function uv(t){return sd(UC,t)}var qC=C("ZodUnknown",(t,e)=>{yp.init(t,e),xt.init(t,e)});function dt(){return ad(qC)}var ZC=C("ZodNever",(t,e)=>{xp.init(t,e),xt.init(t,e)});function BC(t){return cd(ZC,t)}var HC=C("ZodArray",(t,e)=>{vp.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(nc(n,r)),t.length=(n,r)=>t.check(rc(n,r)),t.unwrap=()=>t.element});function Ne(t,e){return Vx(HC,t,e)}var pv=C("ZodObject",(t,e)=>{Ja.init(t,e),xt.init(t,e),Ie.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:BC()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Ie.extend(t,n),t.merge=n=>Ie.merge(t,n),t.pick=n=>Ie.pick(t,n),t.omit=n=>Ie.omit(t,n),t.partial=(...n)=>Ie.partial(mv,t,n[0]),t.required=(...n)=>Ie.required(hv,t,n[0])});function X(t,e){let n={type:"object",get shape(){return Ie.assignProp(this,"shape",{...t}),this.shape},...Ie.normalizeParams(e)};return new pv(n)}function Xt(t,e){return new pv({type:"object",get shape(){return Ie.assignProp(this,"shape",{...t}),this.shape},catchall:dt(),...Ie.normalizeParams(e)})}var dv=C("ZodUnion",(t,e)=>{Ya.init(t,e),xt.init(t,e),t.options=e.options});function at(t,e){return new dv({type:"union",options:t,...Ie.normalizeParams(e)})}var VC=C("ZodDiscriminatedUnion",(t,e)=>{dv.init(t,e),bp.init(t,e)});function Ad(t,e,n){return new VC({type:"union",options:e,discriminator:t,...Ie.normalizeParams(n)})}var GC=C("ZodIntersection",(t,e)=>{_p.init(t,e),xt.init(t,e)});function lc(t,e){return new GC({type:"intersection",left:t,right:e})}var WC=C("ZodRecord",(t,e)=>{wp.init(t,e),xt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function nt(t,e,n){return new WC({type:"record",keyType:t,valueType:e,...Ie.normalizeParams(n)})}var $d=C("ZodEnum",(t,e)=>{Sp.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 $d({...e,checks:[],...Ie.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 $d({...e,checks:[],...Ie.normalizeParams(o),entries:i})}});function an(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new $d({type:"enum",entries:n,...Ie.normalizeParams(e)})}var KC=C("ZodLiteral",(t,e)=>{kp.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 KC({type:"literal",values:Array.isArray(t)?t:[t],...Ie.normalizeParams(e)})}var JC=C("ZodTransform",(t,e)=>{Tp.init(t,e),xt.init(t,e),t._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ie.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(Ie.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 fv(t){return new JC({type:"transform",transform:t})}var mv=C("ZodOptional",(t,e)=>{Ep.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ft(t){return new mv({type:"optional",innerType:t})}var YC=C("ZodNullable",(t,e)=>{$p.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function av(t){return new YC({type:"nullable",innerType:t})}var XC=C("ZodDefault",(t,e)=>{Rp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function QC(t,e){return new XC({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var eI=C("ZodPrefault",(t,e)=>{Ap.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function tI(t,e){return new eI({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var hv=C("ZodNonOptional",(t,e)=>{Cp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function nI(t,e){return new hv({type:"nonoptional",innerType:t,...Ie.normalizeParams(e)})}var rI=C("ZodCatch",(t,e)=>{Ip.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function oI(t,e){return new rI({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var iI=C("ZodPipe",(t,e)=>{Pp.init(t,e),xt.init(t,e),t.in=e.in,t.out=e.out});function Rd(t,e){return new iI({type:"pipe",in:t,out:e})}var sI=C("ZodReadonly",(t,e)=>{Op.init(t,e),xt.init(t,e)});function aI(t){return new sI({type:"readonly",innerType:t})}var gv=C("ZodCustom",(t,e)=>{zp.init(t,e),xt.init(t,e)});function cI(t){let e=new jt({check:"custom"});return e._zod.check=t,e}function yv(t,e){return vd(gv,t??(()=>!0),e)}function lI(t,e={}){return bd(gv,t,e)}function uI(t){let e=cI(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ie.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(Ie.issue(o))}},t(n.value,n)));return e}function Cd(t,e){return Rd(fv(t),e)}gn(Fx());var Pd="2025-11-25";var xv=[Pd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Cr="io.modelcontextprotocol/related-task",pc="2.0",Rt=yv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),vv=at([R(),He().int()]),bv=R(),R3=Xt({ttl:He().optional(),pollInterval:He().optional()}),pI=X({ttl:He().optional()}),dI=X({taskId:R()}),Od=Xt({progressToken:vv.optional(),[Cr]:dI.optional()}),xn=X({_meta:Od.optional()}),xs=xn.extend({task:pI.optional()}),_v=t=>xs.safeParse(t).success,Lt=X({method:R(),params:xn.loose().optional()}),Tn=X({_meta:Od.optional()}),En=X({method:R(),params:Tn.loose().optional()}),Dt=Xt({_meta:Od.optional()}),dc=at([R(),He().int()]),wv=X({jsonrpc:ne(pc),id:dc,...Lt.shape}).strict(),zd=t=>wv.safeParse(t).success,Sv=X({jsonrpc:ne(pc),...En.shape}).strict(),kv=t=>Sv.safeParse(t).success,Nd=X({jsonrpc:ne(pc),id:dc,result:Dt}).strict(),vs=t=>Nd.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 jd=X({jsonrpc:ne(pc),id:dc.optional(),error:X({code:He().int(),message:R(),data:dt().optional()})}).strict();var Tv=t=>jd.safeParse(t).success;var Ev=at([wv,Sv,Nd,jd]),A3=at([Nd,jd]),fc=Dt.strict(),fI=Tn.extend({requestId:dc.optional(),reason:R().optional()}),mc=En.extend({method:ne("notifications/cancelled"),params:fI}),mI=X({src:R(),mimeType:R().optional(),sizes:Ne(R()).optional(),theme:an(["light","dark"]).optional()}),bs=X({icons:Ne(mI).optional()}),si=X({name:R(),title:R().optional()}),$v=si.extend({...si.shape,...bs.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),hI=lc(X({applyDefaults:Ct().optional()}),nt(R(),dt())),gI=Cd(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,lc(X({form:hI.optional(),url:Rt.optional()}),nt(R(),dt()).optional())),yI=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({sampling:Xt({createMessage:Rt.optional()}).optional(),elicitation:Xt({create:Rt.optional()}).optional()}).optional()}),xI=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({tools:Xt({call:Rt.optional()}).optional()}).optional()}),vI=X({experimental:nt(R(),Rt).optional(),sampling:X({context:Rt.optional(),tools:Rt.optional()}).optional(),elicitation:gI.optional(),roots:X({listChanged:Ct().optional()}).optional(),tasks:yI.optional(),extensions:nt(R(),Rt).optional()}),bI=xn.extend({protocolVersion:R(),capabilities:vI,clientInfo:$v}),Ld=Lt.extend({method:ne("initialize"),params:bI});var _I=X({experimental:nt(R(),Rt).optional(),logging:Rt.optional(),completions:Rt.optional(),prompts:X({listChanged:Ct().optional()}).optional(),resources:X({subscribe:Ct().optional(),listChanged:Ct().optional()}).optional(),tools:X({listChanged:Ct().optional()}).optional(),tasks:xI.optional(),extensions:nt(R(),Rt).optional()}),wI=Dt.extend({protocolVersion:R(),capabilities:_I,serverInfo:$v,instructions:R().optional()}),Dd=En.extend({method:ne("notifications/initialized"),params:Tn.optional()});var hc=Lt.extend({method:ne("ping"),params:xn.optional()}),SI=X({progress:He(),total:ft(He()),message:ft(R())}),kI=X({...Tn.shape,...SI.shape,progressToken:vv}),gc=En.extend({method:ne("notifications/progress"),params:kI}),TI=xn.extend({cursor:bv.optional()}),_s=Lt.extend({params:TI.optional()}),ws=Dt.extend({nextCursor:bv.optional()}),EI=an(["working","input_required","completed","failed","cancelled"]),Ss=X({taskId:R(),status:EI,ttl:at([He(),uv()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ft(He()),statusMessage:ft(R())}),ai=Dt.extend({task:Ss}),$I=Tn.merge(Ss),ks=En.extend({method:ne("notifications/tasks/status"),params:$I}),yc=Lt.extend({method:ne("tasks/get"),params:xn.extend({taskId:R()})}),xc=Dt.merge(Ss),vc=Lt.extend({method:ne("tasks/result"),params:xn.extend({taskId:R()})}),C3=Dt.loose(),bc=_s.extend({method:ne("tasks/list")}),_c=ws.extend({tasks:Ne(Ss)}),wc=Lt.extend({method:ne("tasks/cancel"),params:xn.extend({taskId:R()})}),Rv=Dt.merge(Ss),Av=X({uri:R(),mimeType:ft(R()),_meta:nt(R(),dt()).optional()}),Cv=Av.extend({text:R()}),Md=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Iv=Av.extend({blob:Md}),Ts=an(["user","assistant"]),ci=X({audience:Ne(Ts).optional(),priority:He().min(0).max(1).optional(),lastModified:gs.datetime({offset:!0}).optional()}),Pv=X({...si.shape,...bs.shape,uri:R(),description:ft(R()),mimeType:ft(R()),size:ft(He()),annotations:ci.optional(),_meta:ft(Xt({}))}),RI=X({...si.shape,...bs.shape,uriTemplate:R(),description:ft(R()),mimeType:ft(R()),annotations:ci.optional(),_meta:ft(Xt({}))}),Sc=_s.extend({method:ne("resources/list")}),AI=ws.extend({resources:Ne(Pv)}),kc=_s.extend({method:ne("resources/templates/list")}),CI=ws.extend({resourceTemplates:Ne(RI)}),Fd=xn.extend({uri:R()}),II=Fd,Tc=Lt.extend({method:ne("resources/read"),params:II}),PI=Dt.extend({contents:Ne(at([Cv,Iv]))}),OI=En.extend({method:ne("notifications/resources/list_changed"),params:Tn.optional()}),zI=Fd,NI=Lt.extend({method:ne("resources/subscribe"),params:zI}),jI=Fd,LI=Lt.extend({method:ne("resources/unsubscribe"),params:jI}),DI=Tn.extend({uri:R()}),MI=En.extend({method:ne("notifications/resources/updated"),params:DI}),FI=X({name:R(),description:ft(R()),required:ft(Ct())}),UI=X({...si.shape,...bs.shape,description:ft(R()),arguments:ft(Ne(FI)),_meta:ft(Xt({}))}),Ec=_s.extend({method:ne("prompts/list")}),qI=ws.extend({prompts:Ne(UI)}),ZI=xn.extend({name:R(),arguments:nt(R(),R()).optional()}),$c=Lt.extend({method:ne("prompts/get"),params:ZI}),Ud=X({type:ne("text"),text:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),qd=X({type:ne("image"),data:Md,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),Zd=X({type:ne("audio"),data:Md,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),BI=X({type:ne("tool_use"),name:R(),id:R(),input:nt(R(),dt()),_meta:nt(R(),dt()).optional()}),HI=X({type:ne("resource"),resource:at([Cv,Iv]),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),VI=Pv.extend({type:ne("resource_link")}),Bd=at([Ud,qd,Zd,VI,HI]),GI=X({role:Ts,content:Bd}),WI=Dt.extend({description:R().optional(),messages:Ne(GI)}),KI=En.extend({method:ne("notifications/prompts/list_changed"),params:Tn.optional()}),JI=X({title:R().optional(),readOnlyHint:Ct().optional(),destructiveHint:Ct().optional(),idempotentHint:Ct().optional(),openWorldHint:Ct().optional()}),YI=X({taskSupport:an(["required","optional","forbidden"]).optional()}),Ov=X({...si.shape,...bs.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:JI.optional(),execution:YI.optional(),_meta:nt(R(),dt()).optional()}),Rc=_s.extend({method:ne("tools/list")}),XI=ws.extend({tools:Ne(Ov)}),Ac=Dt.extend({content:Ne(Bd).default([]),structuredContent:nt(R(),dt()).optional(),isError:Ct().optional()}),I3=Ac.or(Dt.extend({toolResult:dt()})),QI=xs.extend({name:R(),arguments:nt(R(),dt()).optional()}),li=Lt.extend({method:ne("tools/call"),params:QI}),eP=En.extend({method:ne("notifications/tools/list_changed"),params:Tn.optional()}),P3=X({autoRefresh:Ct().default(!0),debounceMs:He().int().nonnegative().default(300)}),Es=an(["debug","info","notice","warning","error","critical","alert","emergency"]),tP=xn.extend({level:Es}),Hd=Lt.extend({method:ne("logging/setLevel"),params:tP}),nP=Tn.extend({level:Es,logger:R().optional(),data:dt()}),rP=En.extend({method:ne("notifications/message"),params:nP}),oP=X({name:R().optional()}),iP=X({hints:Ne(oP).optional(),costPriority:He().min(0).max(1).optional(),speedPriority:He().min(0).max(1).optional(),intelligencePriority:He().min(0).max(1).optional()}),sP=X({mode:an(["auto","required","none"]).optional()}),aP=X({type:ne("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Ne(Bd).default([]),structuredContent:X({}).loose().optional(),isError:Ct().optional(),_meta:nt(R(),dt()).optional()}),cP=Ad("type",[Ud,qd,Zd]),uc=Ad("type",[Ud,qd,Zd,BI,aP]),lP=X({role:Ts,content:at([uc,Ne(uc)]),_meta:nt(R(),dt()).optional()}),uP=xs.extend({messages:Ne(lP),modelPreferences:iP.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(Ov).optional(),toolChoice:sP.optional()}),pP=Lt.extend({method:ne("sampling/createMessage"),params:uP}),$s=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens"]).or(R())),role:Ts,content:cP}),Vd=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:Ts,content:at([uc,Ne(uc)])}),dP=X({type:ne("boolean"),title:R().optional(),description:R().optional(),default:Ct().optional()}),fP=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()}),mP=X({type:an(["number","integer"]),title:R().optional(),description:R().optional(),minimum:He().optional(),maximum:He().optional(),default:He().optional()}),hP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),default:R().optional()}),gP=X({type:ne("string"),title:R().optional(),description:R().optional(),oneOf:Ne(X({const:R(),title:R()})),default:R().optional()}),yP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),enumNames:Ne(R()).optional(),default:R().optional()}),xP=at([hP,gP]),vP=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()}),bP=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()}),_P=at([vP,bP]),wP=at([yP,xP,_P]),SP=at([wP,dP,fP,mP]),kP=xs.extend({mode:ne("form").optional(),message:R(),requestedSchema:X({type:ne("object"),properties:nt(R(),SP),required:Ne(R()).optional()})}),TP=xs.extend({mode:ne("url"),message:R(),elicitationId:R(),url:R().url()}),EP=at([kP,TP]),$P=Lt.extend({method:ne("elicitation/create"),params:EP}),RP=Tn.extend({elicitationId:R()}),AP=En.extend({method:ne("notifications/elicitation/complete"),params:RP}),ui=Dt.extend({action:an(["accept","decline","cancel"]),content:Cd(t=>t===null?void 0:t,nt(R(),at([R(),He(),Ct(),Ne(R())])).optional())}),CP=X({type:ne("ref/resource"),uri:R()});var IP=X({type:ne("ref/prompt"),name:R()}),PP=xn.extend({ref:at([IP,CP]),argument:X({name:R(),value:R()}),context:X({arguments:nt(R(),R()).optional()}).optional()}),Cc=Lt.extend({method:ne("completion/complete"),params:PP});function zv(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function Nv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var OP=Dt.extend({completion:Xt({values:Ne(R()).max(100),total:ft(He().int()),hasMore:ft(Ct())})}),zP=X({uri:R().startsWith("file://"),name:R().optional(),_meta:nt(R(),dt()).optional()}),NP=Lt.extend({method:ne("roots/list"),params:xn.optional()}),Gd=Dt.extend({roots:Ne(zP)}),jP=En.extend({method:ne("notifications/roots/list_changed"),params:Tn.optional()}),O3=at([hc,Ld,Cc,Hd,$c,Ec,Sc,kc,Tc,NI,LI,li,Rc,yc,vc,bc,wc]),z3=at([mc,gc,Dd,jP,ks]),N3=at([fc,$s,Vd,ui,Gd,xc,_c,ai]),j3=at([hc,pP,$P,NP,yc,vc,bc,wc]),L3=at([mc,gc,rP,MI,OI,eP,KI,ks,AP]),D3=at([fc,wI,OP,WI,qI,AI,CI,PI,Ac,XI,xc,_c,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 Ir(t){return t==="completed"||t==="failed"||t==="cancelled"}var Lv=Symbol("Let zodToJsonSchema decide on which parser to use");var jv={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"},Dv=t=>typeof t=="string"?{...jv,name:t}:{...jv,...t};var Mv=t=>{let e=Dv(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 Wd(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,Wd(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 Fv(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 Uv(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 qv(){return{type:"boolean"}}function Pc(t,e){return fe(t.type._def,e)}var Zv=(t,e)=>fe(t.innerType._def,e);function Kd(t,e,n){let r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((o,i)=>Kd(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 LP(t,e)}}var LP=(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 Bv(t,e){return{...fe(t.innerType._def,e),default:t.defaultValue()}}function Hv(t,e){return e.effectStrategy==="input"?fe(t.schema._def,e):mt(e)}function Vv(t){return{type:"string",enum:Array.from(t.values)}}var DP=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Gv(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(DP(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 Wv(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 Jd,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:()=>(Jd===void 0&&(Jd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Jd),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 Oc(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(`^${Yd(r.value,e)}`),r.message,e);break;case"endsWith":Qt(n,RegExp(`${Yd(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(Yd(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 Yd(t,e){return e.patternStrategy==="escape"?FP(t):t}var MP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function FP(t){let e="";for(let n=0;n<t.length;n++)MP.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:Kv(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):je(t,"pattern",Kv(e,r),n,r)}function Kv(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}
|
|
51
|
-
|
|
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 zc(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}=Oc(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}=Pc(t.keyType._def,e);return{...n,propertyNames:p}}}return n}function Jv(t,e){if(e.mapStrategy==="record")return zc(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 Yv(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 Xv(t){return t.target==="openAi"?void 0:{not:mt({...t,currentPath:[...t.currentPath,"not"]})}}function Qv(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Rs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function tb(t,e){if(e.target==="openApi3")return eb(t,e);let n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(r=>r._def.typeName in Rs&&(!r._def.checks||!r._def.checks.length))){let r=n.reduce((o,i)=>{let s=Rs[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 eb(t,e)}var eb=(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 nb(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:Rs[t.innerType._def.typeName],nullable:!0}:{type:[Rs[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 rb(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",Wd(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 ob(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=qP(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=UP(t,e);return s!==void 0&&(r.additionalProperties=s),r}function UP(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 qP(t){try{return t.isOptional()}catch{return!0}}var ib=(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 sb=(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 ab(t,e){return fe(t.type._def,e)}function cb(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 lb(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 ub(t){return{not:mt(t)}}function pb(t){return mt(t)}var db=(t,e)=>fe(t.innerType._def,e);var fb=(t,e,n)=>{switch(e){case q.ZodString:return Oc(t,n);case q.ZodNumber:return rb(t,n);case q.ZodObject:return ob(t,n);case q.ZodBigInt:return Uv(t,n);case q.ZodBoolean:return qv();case q.ZodDate:return Kd(t,n);case q.ZodUndefined:return ub(n);case q.ZodNull:return Qv(n);case q.ZodArray:return Fv(t,n);case q.ZodUnion:case q.ZodDiscriminatedUnion:return tb(t,n);case q.ZodIntersection:return Gv(t,n);case q.ZodTuple:return lb(t,n);case q.ZodRecord:return zc(t,n);case q.ZodLiteral:return Wv(t,n);case q.ZodEnum:return Vv(t);case q.ZodNativeEnum:return Yv(t);case q.ZodNullable:return nb(t,n);case q.ZodOptional:return ib(t,n);case q.ZodMap:return Jv(t,n);case q.ZodSet:return cb(t,n);case q.ZodLazy:return()=>t.getter()._def;case q.ZodPromise:return ab(t,n);case q.ZodNaN:case q.ZodNever:return Xv(n);case q.ZodEffects:return Hv(t,n);case q.ZodAny:return mt(n);case q.ZodUnknown:return pb(n);case q.ZodDefault:return Bv(t,n);case q.ZodBranded:return Pc(t,n);case q.ZodReadonly:return db(t,n);case q.ZodCatch:return Zv(t,n);case q.ZodPipeline:return sb(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!==Lv)return c}if(r&&!n){let c=ZP(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=fb(t,t.typeName,e),s=typeof i=="function"?fe(i(),e):i;if(s&&BP(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var ZP=(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}},BP=(t,e,n)=>(t.description&&(n.description=t.description,e.markdownDescription&&(n.markdownDescription=t.description)),n);var Xd=(t,e)=>{let n=Mv(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 HP(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function Qd(t,e){return kn(t)?_d(t,{target:HP(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):Xd(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function ef(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=ac(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function tf(t,e){let n=Rr(t,e);if(!n.success)throw n.error;return n.data}var VP=6e4,Nc=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(mc,n=>{this._oncancel(n)}),this.setNotificationHandler(gc,n=>{this._onprogress(n)}),this.setRequestHandler(hc,n=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(yc,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(vc,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(!Ir(s.status))return await this._waitForTaskUpdate(i,r.signal),await o();if(Ir(s.status)){let c=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Cr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(bc,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(wc,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(Ir(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),vs(c)||Tv(c)?this._onresponse(c):zd(c)?this._onrequest(c,l):kv(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[Cr])==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=_v(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),vs(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(vs(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),vs(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},Ir(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)||{},[Cr]: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)??VP,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},xc,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},_c,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},Rv,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)||{},[Cr]: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)||{},[Cr]: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)||{},[Cr]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(e,n){let r=ef(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,i)=>{let s=tf(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=ef(e);this._notificationHandlers.set(r,o=>{let i=tf(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"&&zd(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=ks.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Ir(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(Ir(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=ks.parse({method:"notifications/tasks/status",params:c});await this.notification(l),Ir(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}};function mb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function hb(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];mb(s)&&mb(i)?n[o]={...s,...i}:n[o]=i}return n}var s0=Ee(qm(),1),a0=Ee(i0(),1);function JL(){let t=new s0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,a0.default)(t),t}var gl=class{constructor(e){this._ajv=e??JL()}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 yl=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},$s,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 c0(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 l0(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 xl=class extends Nc{constructor(e,n){super(n),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Es.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 gl,this.setRequestHandler(Ld,r=>this._oninitialize(r)),this.setNotificationHandler(Dd,()=>{var r;return(r=this.oninitialized)==null?void 0:r.call(this)}),this._capabilities.logging&&this.setRequestHandler(Hd,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=Es.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new yl(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=hb(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(Ac,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;l0((r=(n=this._clientCapabilities)==null?void 0:n.tasks)==null?void 0:r.requests,e,"Client")}assertTaskHandlerCapability(e){var n;this._capabilities&&c0((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:xv.includes(n)?n:Pd,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"},fc)}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},Vd,n):this.request({method:"sampling/createMessage",params:e},$s,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},Gd,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 p0=Symbol.for("mcp.completable");function Jm(t){return!!t&&typeof t=="object"&&p0 in t}function d0(t){let e=t[p0];return e==null?void 0:e.complete}var u0;(function(t){t.Completable="McpCompletable"})(u0||(u0={}));var YL=/^[A-Za-z0-9._-]{1,128}$/;function XL(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"),!YL.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 QL(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 Ym(t){let e=XL(t);return QL(t,e.warnings),e.isValid}var vl=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 bl=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 xl(e,n)}get experimental(){return this._experimental||(this._experimental={tasks:new vl(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(Rc)),this.server.assertCanSetRequestHandler(Fr(li)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Rc,()=>({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?Qd(o,{strictUnions:!0,pipeStrategy:"input"}):eD})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let o=ii(n.outputSchema);o&&(r.outputSchema=Qd(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 ic(i,n);if(!s.success){let a="error"in s?s.error:"Unknown error",c=sc(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 ic(o,n.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=sc(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(Cc)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Cc,async e=>{switch(e.params.ref.type){case"ref/prompt":return zv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Nv(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 oa;let o=Ar(r.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!Jm(i))return oa;let s=d0(i);if(!s)return oa;let a=await s(e.params.argument.value,e.params.context);return m0(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 oa;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 oa;let i=await o(e.params.argument.value,e.params.context);return m0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr(Sc)),this.server.assertCanSetRequestHandler(Fr(kc)),this.server.assertCanSetRequestHandler(Fr(Tc)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Sc,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(kc,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,r])=>({name:n,uriTemplate:r.resourceTemplate.uriTemplate.toString(),...r.metadata}))})),this.server.setRequestHandler(Tc,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(Ec)),this.server.assertCanSetRequestHandler(Fr($c)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Ec,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,n])=>({name:e,title:n.title,description:n.description,arguments:n.argsSchema?tD(n.argsSchema):void 0}))})),this.server.setRequestHandler($c,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 ic(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=sc(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 Jm(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,n,r,o,i,s,a,c,l){Ym(e);let p={title:n,description:r,inputSchema:f0(o),outputSchema:f0(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"&&Ym(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(Xm(c))o=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Xm(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 eD={type:"object",properties:{}};function h0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function g0(t){return"_def"in t||"_zod"in t||h0(t)}function Xm(t){return typeof t!="object"||t===null||g0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(h0)}function f0(t){if(t){if(Xm(t))return wo(t);if(!g0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function tD(t){let e=Ar(t);return e?Object.entries(e).map(([n,r])=>{let o=Wx(r),i=Kx(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=ac(n);if(typeof r=="string")return r;throw new Error("Schema method literal must be a string")}function m0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var oa={completion:{values:[],hasMore:!1}};var Qm=Ee(require("node:process"),1);var _l=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),nD(n)}clear(){this._buffer=void 0}};function nD(t){return Ev.parse(JSON.parse(t))}function y0(t){return JSON.stringify(t)+`
|
|
54
|
-
`
|
|
55
|
-
`).
|
|
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[C0]=this[C0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=la(s);r[a]||(tM(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 nM="[REDACTED ****]";function rM(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 oM(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)&&rM(i))return r.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=n.has(a.toLowerCase())?nM: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?oM(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 Nk=Ee(zk(),1),Ll=Nk.default;var Th=100;function kh(t){return _.isPlainObject(t)||_.isArray(t)}function jk(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function Sh(t,e,n){return t?t.concat(e).map(function(o,i){return o=jk(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function Z2(t){return _.isArray(t)&&!t.some(kh)}var B2=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function H2(t,e,n){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new(Ll||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?Th: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(Sh(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)&&Z2(m)||(_.isFileList(m)||_.endsWith(b,"[]"))&&(k=_.toArray(m)))return b=jk(b),k.forEach(function(F,j){!(_.isUndefined(F)||F===null)&&e.append(s===!0?Sh([b],j,i):s===null?b:b+"[]",d(F))}),!1}return kh(m)?!0:(e.append(Sh(w,b,i),d(m)),!1)}let v=Object.assign(B2,{defaultVisitor:y,convertValue:d,isVisitable:kh});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=H2;function Lk(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Dk(t,e){this._pairs=[],t&&qr(t,this,e)}var Mk=Dk.prototype;Mk.append=function(e,n){this._pairs.push([e,n])};Mk.toString=function(e){let n=e?r=>e.call(this,r,Lk):Lk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var Fk=Dk;function V2(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")||V2,i=_.getSafeProp(r,"serialize"),s;if(i?s=i(e,r):s=_.isURLSearchParams(e)?e.toString():new Fk(e,r).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Eh=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)})}},$h=Eh;var Zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var Bk=Ee(require("crypto"),1);var Uk=Ee(require("url"),1),qk=Uk.default.URLSearchParams;var Rh="abcdefghijklmnopqrstuvwxyz",Zk="0123456789",Hk={DIGIT:Zk,ALPHA:Rh,ALPHA_DIGIT:Rh+Rh.toUpperCase()+Zk},G2=(t=16,e=Hk.ALPHA_DIGIT)=>{let n="",{length:r}=e,o=new Uint32Array(t);Bk.default.randomFillSync(o);for(let i=0;i<t;i++)n+=e[o[i]%r];return n},Vk={isNode:!0,classes:{URLSearchParams:qk,FormData:Ll,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Hk,generateString:G2,protocols:["http","https","file","data"]};var Ih={};Na(Ih,{hasBrowserEnv:()=>Ch,hasStandardBrowserEnv:()=>W2,hasStandardBrowserWebWorkerEnv:()=>K2,navigator:()=>Ah,origin:()=>J2});var Ch=typeof window<"u"&&typeof document<"u",Ah=typeof navigator=="object"&&navigator||void 0,W2=Ch&&(!Ah||["ReactNative","NativeScript","NS"].indexOf(Ah.product)<0),K2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",J2=Ch&&window.location.href||"http://localhost";var Be={...Ih,...Vk};function Ph(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 Gk=Th;function Wk(t){if(t>Gk)throw new P("FormData field is too deeply nested ("+t+" levels). Max depth: "+Gk,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Y2(t){let e=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(t))!==null;)Wk(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function X2(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 Q2(t){function e(n,r,o,i){Wk(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]=X2(o[s])),!a)}if(_.isFormData(t)&&_.isFunction(t.entries)){let n={};return _.forEachEntry(t,(r,o)=>{e(Y2(r),o,n,0)}),n}return null}var Dl=Q2;var Mi=(t,e)=>t!=null&&_.hasOwnProp(t,e)?t[e]:void 0;function eF(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 Oh={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(Dl(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 Ph(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),eF(e)):e}],transformResponse:[function(e){let n=Mi(this,"transitional")||Oh.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=>{Oh.headers[t]={}});var Fi=Oh;function ma(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 ha(t){return!!(t&&t.__CANCEL__)}var zh=class extends P{constructor(e,n,r){super(e??"canceled",P.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}},vn=zh;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 Nh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function jh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var tF=/^https?:(?!\/\/)/i,nF=/[\t\n\r]/g;function rF(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function oF(t){return rF(t).replace(nF,"")}function Kk(t,e){if(typeof t=="string"&&tF.test(oF(t)))throw new P('Invalid URL: missing "//" after protocol',P.ERR_INVALID_URL,e)}function Do(t,e,n,r){Kk(e,r);let o=!Nh(e);return t&&(o||n===!1)?(Kk(t,r),jh(t,e)):e}var iF={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function sF(t){try{return new URL(t)}catch{return null}}function Jk(t){var e=(typeof t=="string"?sF(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)||iF[n]||0,!aF(r,o)))return"";var i=Lh(n+"_proxy")||Lh("all_proxy");return i&&i.indexOf("://")===-1&&(i=n+"://"+i),i}function aF(t,e){var n=Lh("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 Lh(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var yg=Ee(yT(),1),xg=Ee(require("http"),1),vg=Ee(require("https"),1),KT=Ee(require("http2"),1),JT=Ee(require("util"),1),gg=require("path"),YT=Ee(kT(),1),bn=Ee(require("zlib"),1);var xr="1.18.1";function ka(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var lU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function ag(t,e,n){let r=n&&n.Blob||Be.classes.Blob,o=ka(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=lU.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 TT=Ee(require("stream"),1);var cg=Symbol("internals"),lg=class extends TT.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[cg]={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[cg];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this[cg],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)})}},ug=lg;var XT=require("events");var $T=Ee(require("util"),1),RT=require("stream");var{asyncIterator:ET}=Symbol,uU=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[ET]?yield*t[ET]():yield t},Bl=uU;var pU=Be.ALPHABET.ALPHA_DIGIT+"-_",Ta=typeof TextEncoder=="function"?new TextEncoder:new $T.default.TextEncoder,Bo=`\r
|
|
57
|
-
`,dU=Ta.encode(Bo),fU=2,pg=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=Ta.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=Ta.encode(i+Bo),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+fU,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;_.isTypedArray(e)?yield e:yield*Bl(e),yield dU}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},mU=(t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+Be.generateString(o,pU)}=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=Ta.encode("--"+i+Bo),a=Ta.encode("--"+i+"--"+Bo),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let h=new pg(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),RT.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},AT=mU;var CT=Ee(require("stream"),1),dg=class extends CT.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)}},IT=dg;var PT=Ee(require("http2"),1),OT=Ee(require("util"),1),fg=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&&OT.default.isDeepStrictEqual(y,n))return h}}let o=PT.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}},zT=fg;var hU=(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,NT=hU;var gU=new Set(["localhost","0.0.0.0"]),DT=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)},mg=t=>/^0{1,4}$/.test(t),yU=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(mg)&&s.every(mg)}let n=t.split(":");return n.length===8&&n.every(mg)},xU=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return DT(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},jT=t=>t?gU.has(t)||DT(t)||yU(t)?!0:xU(t):!1,vU={http:80,https:443,ws:80,wss:443,ftp:21},bU=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]},_U=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,wU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,SU=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(_U);if(e)return e[1];let n=t.match(wU);if(n){let r=parseInt(n[1],16),o=parseInt(n[2],16);return`${r>>8}.${r&255}.${o>>8}.${o&255}`}return t},LT=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),SU(t.replace(/\.+$/,"")));function hg(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)||vU[e.protocol.split(":",1)[0]]||0,o=LT(e.hostname.toLowerCase());return n.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=bU(i);return s=LT(s),!s||a&&a!==r?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||jT(o)&&jT(s))})}function kU(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 MT=kU;function TU(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 FT=TU;var vr=(t,e,n=3)=>{let r=0,o=MT(50,250);return FT(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 Hl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,EU=(t,e,n)=>e+2<n&&Hl(t.charCodeAt(e+1))&&Hl(t.charCodeAt(e+2));function Ea(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);Hl(y)&&Hl(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&&EU(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 UT={flush:bn.default.constants.Z_SYNC_FLUSH,finishFlush:bn.default.constants.Z_SYNC_FLUSH},$U={flush:bn.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:bn.default.constants.BROTLI_OPERATION_FLUSH},RU={flush:bn.default.constants.ZSTD_e_flush,finishFlush:bn.default.constants.ZSTD_e_flush},QT=_.isFunction(bn.default.createBrotliDecompress),eE=_.isFunction(bn.default.createZstdDecompress),tE="gzip, compress, deflate"+(QT?", br":""),AU=tE+(eE?", zstd":""),{http:CU,https:IU}=YT.default,bg=/https:?/,PU=["content-type","content-length"];function OU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,o])=>{PU.includes(r.toLowerCase())&&t.set(r,o)})}var qT=Symbol("axios.http.socketListener"),Vl=Symbol("axios.http.currentReq"),nE=Symbol("axios.http.installedTunnel"),zU=new Map,ZT=new WeakMap,BT={22:21,24:5};function NU(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:BT[e]!=null&&n>=BT[e]}function jU(t,e=process.versions&&process.versions.node){if(!NU(e))return!1;let n=t&&t.options;return!!(n&&_.hasOwnProp(n,"proxyEnv")&&n.proxyEnv!=null)}function LU(t,e,n){return bg.test(t.protocol)?n||vg.default.globalAgent:e||xg.default.globalAgent}function DU(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),r=e?ZT.get(e)||ZT.set(e,new Map).get(e):zU,o=r.get(n);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new yg.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[nE]=!0,r.set(n,o),o}var HT=Be.protocols.map(t=>t+":"),VT=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},GT=(t,[e,n])=>(t.on("end",n).on("error",n),e),MU=new zT;function FU(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 UU(t,e){t&&Object.keys(t).forEach(n=>{e.has(n.toLowerCase())&&delete t[n]})}function qU(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function rE(t,e,n,r,o,i){let s=e,a=LU(t,i,o);if(!s&&s!==!1&&!jU(a)){let c=Jk(n);c&&(hg(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[nE]&&(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(bg.test(t.protocol)){if(!(o instanceof yg.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=DU(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){rE(l,e,l.href,!0,o,i)}}var ZU=typeof process<"u"&&_.kindOf(process)==="process",BU=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)}),HU=({address:t,family:e})=>{if(!_.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},WT=(t,e)=>HU(_.isObject(t)?t:{address:t,family:e}),VU={request(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:r,headers:o}=t,i=MU.getSession(n,r),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=KT.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}},oE=ZU&&function(e){return BU(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=NT(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=>WT(On)):[WT(We,St)];be.all?Ge(ye,Qe):Ge(ye,Qe[0].address,Qe[0].family)})}}let Ve=new XT.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||HT[0];if(B==="data:"){if(F>-1){let G=String(s("url")||Zt||"");if(Ea(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=ag(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(HT.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=AT(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(OU(qe,c.getHeaders(),s("formDataHeaderPolicy")),!qe.hasContentLength())try{let W=await JT.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(Bl(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 ug({maxRate:_.toFiniteNumber(ge)})],_.noop),De&&c.on("progress",GT(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=VT(Pe.username),G=VT(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?AU:tE,!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:FU,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,gg.resolve)(b);if(!G.some(ye=>typeof ye=="string"&&(0,gg.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,rE(Te,v,B+"//"+Pe.hostname+(Pe.port?":"+Pe.port:"")+Te.path,!1,y,h);let Bt,_n=!1,zt=!1,pe=bg.test(Te.protocol);if(Te.agent==null&&(Te.agent=pe?y:h),bt)Bt=VU;else{let W=s("transport");if(W)Bt=W;else if(k===0)Bt=pe?vg.default:xg.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){qU(We,St)||UU(We.headers,Ge)})}Bt=pe?IU:CU}}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 ug({maxRate:_.toFiniteNumber(ke)});Yt&&Qe.on("progress",GT(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(UT)),delete G.headers["content-encoding"];break;case"deflate":be.push(new IT),be.push(bn.default.createUnzip(UT)),delete G.headers["content-encoding"];break;case"br":QT&&(be.push(bn.default.createBrotliDecompress($U)),delete G.headers["content-encoding"]);break;case"zstd":eE&&(be.push(bn.default.createZstdDecompress(RU)),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[qT]||(G.on("error",function(Ge){let ye=G[Vl];ye&&!ye.destroyed&&ye.destroy(Ge)}),G[qT]=!0),G[Vl]=oe,Ye.add(G)}),oe.once("close",function(){yt();for(let G of Ye)G[Vl]===oe&&(G[Vl]=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 iE=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 sE=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 aE=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(aE(p),aE(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 GU=["content-type","content-length"];function WU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,o])=>{GU.includes(r.toLowerCase())&&t.set(r,o)})}var KU=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function JU(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?KU(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)&&WU(a,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(_.isFunction(o)&&(o=o(e)),o===!0||o==null&&iE(e.url))){let h=i&&s&&sE.read(s);h&&a.set(i,h)}return e}var Gl=JU;var YU=typeof XMLHttpRequest<"u",cE=YU&&function(t){return new Promise(function(n,r){let o=Gl(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=ka(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 XU=(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},lE=XU;var QU=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},eq=async function*(t,e){for await(let n of tq(t))yield*QU(n,e)},tq=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()}},_g=(t,e,n,r)=>{let o=eq(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 uE=64*1024,{isFunction:Wl}=_,nq=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),pE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},dE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},rq=t=>{let e=t.indexOf("://"),n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},oq=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?Wl(o):typeof fetch=="function",c=Wl(i),l=Wl(s);if(!a)return!1;let p=a&&Wl(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&&dE(()=>{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&&dE(()=>_.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}=Gl(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=lE([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(rq(b)){let pe=new URL(b,Be.origin);if(!ge&&(pe.username||pe.password)){let Ye=pE(pe.username),W=pE(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(nq((ge.username||"")+":"+(ge.password||""))))),V&&typeof b=="string"&&b.startsWith("data:")&&Ea(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)=>_g(pe,uE,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(_g(Te.body,uE,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)}}},iq=new Map,wg=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=iq;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:oq(e)),p=l;return l},U8=wg();var Sg={http:oE,xhr:cE,fetch:{get:wg}};_.forEach(Sg,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var fE=t=>`- ${t}`,aq=t=>_.isFunction(t)||t===null||t===!1;function cq(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,!aq(r)&&(o=Sg[(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(fE).join(`
|
|
59
|
-
|
|
60
|
-
`);return
|
|
45
|
+
path: iss.path ? [${vo(b)}, ...iss.path] : [${vo(b)}]
|
|
46
|
+
})));`),f.write(`newResult[${vo(b)}] = ${w}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let y=f.compile();return(b,w)=>y(d,b,w)},o,i=ii,s=!Ha.jitless,c=s&&ju.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 g=[];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 k of p.keys){let E=w[k],F=E._zod.run({value:m[k],issues:[]},f),L=E._zod.optin==="optional"&&E._zod.optout==="optional";F instanceof Promise?g.push(F.then(pe=>L?zx(pe,d,k,m):Xa(pe,d,k))):L?zx(F,d,k,m):Xa(F,d,k)}}if(!l)return g.length?Promise.all(g).then(()=>d):d;let x=[],v=p.keySet,y=l._zod,b=y.def.type;for(let w of Object.keys(m)){if(v.has(w))continue;if(b==="never"){x.push(w);continue}let k=y.run({value:m[w],issues:[]},f);k instanceof Promise?g.push(k.then(E=>Xa(E,d,w))):Xa(k,d,w)}return x.length&&d.issues.push({code:"unrecognized_keys",keys:x,input:m,inst:t}),g.length?Promise.all(g).then(()=>d):d}});function Nx(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=>Nr(i,n,yr())))}),e}var tc=I("$ZodUnion",(t,e)=>{Je.init(t,e),rt(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),rt(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),rt(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),rt(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=>ps(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=>Nx(s,r,t,n)):Nx(i,r,t,n)}}),Ep=I("$ZodDiscriminatedUnion",(t,e)=>{tc.init(t,e);let r=t._zod.parse;rt(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=ls(()=>{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(!ii(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)}}),$p=I("$ZodIntersection",(t,e)=>{Je.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])=>Lx(r,c,l)):Lx(r,i,s)}});function ep(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(si(t)&&si(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=ep(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=ep(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 Lx(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),bo(t))return t;let n=ep(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 Rp=I("$ZodRecord",(t,e)=>{Je.init(t,e),t._zod.parse=(r,n)=>{let o=r.value;if(!si(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(...Yr(c,p.issues)),r.value[c]=p.value})):(l.issues.length&&r.issues.push(...Yr(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=>Nr(l,n,yr())),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(...Yr(s,l.issues)),r.value[a.value]=l.value})):(c.issues.length&&r.issues.push(...Yr(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}});var Ap=I("$ZodEnum",(t,e)=>{Je.init(t,e);let r=cs(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>Du.has(typeof n)).map(n=>typeof n=="string"?Cn(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}}),Ip=I("$ZodLiteral",(t,e)=>{Je.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?Cn(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 Pp=I("$ZodTransform",(t,e)=>{Je.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 vn;return r.value=o,r}}),Cp=I("$ZodOptional",(t,e)=>{Je.init(t,e),t._zod.optin="optional",t._zod.optout="optional",rt(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),rt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ps(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)}),Op=I("$ZodNullable",(t,e)=>{Je.init(t,e),rt(t._zod,"optin",()=>e.innerType._zod.optin),rt(t._zod,"optout",()=>e.innerType._zod.optout),rt(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ps(r.source)}|null)$`):void 0}),rt(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)}),zp=I("$ZodDefault",(t,e)=>{Je.init(t,e),t._zod.optin="optional",rt(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=>jx(i,e)):jx(o,e)}});function jx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Np=I("$ZodPrefault",(t,e)=>{Je.init(t,e),t._zod.optin="optional",rt(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))}),Lp=I("$ZodNonOptional",(t,e)=>{Je.init(t,e),rt(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=>Dx(i,t)):Dx(o,t)}});function Dx(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 jp=I("$ZodCatch",(t,e)=>{Je.init(t,e),t._zod.optin="optional",rt(t._zod,"optout",()=>e.innerType._zod.optout),rt(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=>Nr(s,n,yr()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(i=>Nr(i,n,yr()))},input:r.value}),r.issues=[]),r)}});var Dp=I("$ZodPipe",(t,e)=>{Je.init(t,e),rt(t._zod,"values",()=>e.in._zod.values),rt(t._zod,"optin",()=>e.in._zod.optin),rt(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=>Mx(i,e,n)):Mx(o,e,n)}});function Mx(t,e,r){return bo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}var Mp=I("$ZodReadonly",(t,e)=>{Je.init(t,e),rt(t._zod,"propValues",()=>e.innerType._zod.propValues),rt(t._zod,"values",()=>e.innerType._zod.values),rt(t._zod,"optin",()=>e.innerType._zod.optin),rt(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(Fx):Fx(o)}});function Fx(t){return t.value=Object.freeze(t.value),t}var Fp=I("$ZodCustom",(t,e)=>{jt.init(t,e),Je.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=>Ux(i,r,n,t));Ux(o,r,n,t)}});function Ux(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(Uu(o))}}var NA=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},LA=()=>{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 ${NA(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Wa(n.values[0])}`:`Invalid option: expected one of ${Va(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":""}: ${Va(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 Gx(){return{localeError:LA()}}var jA=Symbol("ZodOutput"),DA=Symbol("ZodInput"),gs=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 Wx(){return new gs}var On=Wx();function Up(t,e){return new t({type:"string",...le(e)})}function qp(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...le(e)})}function rc(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...le(e)})}function Zp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...le(e)})}function Bp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(e)})}function Hp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(e)})}function Vp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(e)})}function Gp(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...le(e)})}function Wp(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...le(e)})}function Kp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(e)})}function Jp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...le(e)})}function Yp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(e)})}function Xp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...le(e)})}function Qp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...le(e)})}function ed(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(e)})}function td(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(e)})}function rd(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(e)})}function nd(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(e)})}function od(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(e)})}function id(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...le(e)})}function sd(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...le(e)})}function ad(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...le(e)})}function cd(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...le(e)})}function Kx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(e)})}function Jx(t,e){return new t({type:"string",format:"date",check:"string_format",...le(e)})}function Yx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...le(e)})}function Xx(t,e){return new t({type:"string",format:"duration",check:"string_format",...le(e)})}function ld(t,e){return new t({type:"number",checks:[],...le(e)})}function ud(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...le(e)})}function pd(t,e){return new t({type:"boolean",...le(e)})}function dd(t,e){return new t({type:"null",...le(e)})}function fd(t){return new t({type:"unknown"})}function md(t,e){return new t({type:"never",...le(e)})}function nc(t,e){return new Xu({check:"less_than",...le(e),value:t,inclusive:!1})}function ys(t,e){return new Xu({check:"less_than",...le(e),value:t,inclusive:!0})}function oc(t,e){return new Qu({check:"greater_than",...le(e),value:t,inclusive:!1})}function xs(t,e){return new Qu({check:"greater_than",...le(e),value:t,inclusive:!0})}function ic(t,e){return new vx({check:"multiple_of",...le(e),value:t})}function sc(t,e){return new _x({check:"max_length",...le(e),maximum:t})}function ai(t,e){return new wx({check:"min_length",...le(e),minimum:t})}function ac(t,e){return new Sx({check:"length_equals",...le(e),length:t})}function hd(t,e){return new kx({check:"string_format",format:"regex",...le(e),pattern:t})}function gd(t){return new Tx({check:"string_format",format:"lowercase",...le(t)})}function yd(t){return new Ex({check:"string_format",format:"uppercase",...le(t)})}function xd(t,e){return new $x({check:"string_format",format:"includes",...le(e),includes:t})}function vd(t,e){return new Rx({check:"string_format",format:"starts_with",...le(e),prefix:t})}function bd(t,e){return new Ax({check:"string_format",format:"ends_with",...le(e),suffix:t})}function So(t){return new Ix({check:"overwrite",tx:t})}function _d(t){return So(e=>e.normalize(t))}function wd(){return So(t=>t.trim())}function Sd(){return So(t=>t.toLowerCase())}function kd(){return So(t=>t.toUpperCase())}function Qx(t,e,r){return new t({type:"array",element:e,...le(r)})}function Td(t,e,r){let n=le(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function Ed(t,e,r){return new t({type:"custom",check:"custom",fn:e,...le(r)})}var cc=class{constructor(e){this.counter=0,this.metadataRegistry=(e==null?void 0:e.metadata)??On,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 g={...r,schemaPath:[...r.schemaPath,e],path:r.path},x=e._zod.parent;if(x)a.ref=x,this.process(x,g),this.seen.get(x).isParent=!0;else{let v=a.schema;switch(o.type){case"string":{let y=v;y.type="string";let{minimum:b,maximum:w,format:k,patterns:E,contentEncoding:F}=e._zod.bag;if(typeof b=="number"&&(y.minLength=b),typeof w=="number"&&(y.maxLength=w),k&&(y.format=i[k]??k,y.format===""&&delete y.format),F&&(y.contentEncoding=F),E&&E.size>0){let L=[...E];L.length===1?y.pattern=L[0].source:L.length>1&&(a.schema.allOf=[...L.map(pe=>({...this.target==="draft-7"?{type:"string"}:{},pattern:pe.source}))])}break}case"number":{let y=v,{minimum:b,maximum:w,format:k,multipleOf:E,exclusiveMaximum:F,exclusiveMinimum:L}=e._zod.bag;typeof k=="string"&&k.includes("int")?y.type="integer":y.type="number",typeof L=="number"&&(y.exclusiveMinimum=L),typeof b=="number"&&(y.minimum=b,typeof L=="number"&&(L>=b?delete y.minimum:delete y.exclusiveMinimum)),typeof F=="number"&&(y.exclusiveMaximum=F),typeof w=="number"&&(y.maximum=w,typeof F=="number"&&(F<=w?delete y.maximum:delete y.exclusiveMaximum)),typeof E=="number"&&(y.multipleOf=E);break}case"boolean":{let y=v;y.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":{v.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":{v.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let y=v,{minimum:b,maximum:w}=e._zod.bag;typeof b=="number"&&(y.minItems=b),typeof w=="number"&&(y.maxItems=w),y.type="array",y.items=this.process(o.element,{...g,path:[...g.path,"items"]});break}case"object":{let y=v;y.type="object",y.properties={};let b=o.shape;for(let E in b)y.properties[E]=this.process(b[E],{...g,path:[...g.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&&(y.required=Array.from(k)),((m=o.catchall)==null?void 0:m._zod.def.type)==="never"?y.additionalProperties=!1:o.catchall?o.catchall&&(y.additionalProperties=this.process(o.catchall,{...g,path:[...g.path,"additionalProperties"]})):this.io==="output"&&(y.additionalProperties=!1);break}case"union":{let y=v;y.anyOf=o.options.map((b,w)=>this.process(b,{...g,path:[...g.path,"anyOf",w]}));break}case"intersection":{let y=v,b=this.process(o.left,{...g,path:[...g.path,"allOf",0]}),w=this.process(o.right,{...g,path:[...g.path,"allOf",1]}),k=F=>"allOf"in F&&Object.keys(F).length===1,E=[...k(b)?b.allOf:[b],...k(w)?w.allOf:[w]];y.allOf=E;break}case"tuple":{let y=v;y.type="array";let b=o.items.map((E,F)=>this.process(E,{...g,path:[...g.path,"prefixItems",F]}));if(this.target==="draft-2020-12"?y.prefixItems=b:y.items=b,o.rest){let E=this.process(o.rest,{...g,path:[...g.path,"items"]});this.target==="draft-2020-12"?y.items=E:y.additionalItems=E}o.rest&&(y.items=this.process(o.rest,{...g,path:[...g.path,"items"]}));let{minimum:w,maximum:k}=e._zod.bag;typeof w=="number"&&(y.minItems=w),typeof k=="number"&&(y.maxItems=k);break}case"record":{let y=v;y.type="object",y.propertyNames=this.process(o.keyType,{...g,path:[...g.path,"propertyNames"]}),y.additionalProperties=this.process(o.valueType,{...g,path:[...g.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 y=v,b=cs(o.entries);b.every(w=>typeof w=="number")&&(y.type="number"),b.every(w=>typeof w=="string")&&(y.type="string"),y.enum=b;break}case"literal":{let y=v,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];y.type=w===null?"null":typeof w,y.const=w}else b.every(w=>typeof w=="number")&&(y.type="number"),b.every(w=>typeof w=="string")&&(y.type="string"),b.every(w=>typeof w=="boolean")&&(y.type="string"),b.every(w=>w===null)&&(y.type="null"),y.enum=b;break}case"file":{let y=v,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(y,b)):y.anyOf=E.map(F=>({...b,contentMediaType:F})):Object.assign(y,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let y=this.process(o.innerType,g);v.anyOf=[y,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,g),a.ref=o.innerType;break}case"success":{let y=v;y.type="boolean";break}case"default":{this.process(o.innerType,g),a.ref=o.innerType,v.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,g),a.ref=o.innerType,this.io==="input"&&(v._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,g),a.ref=o.innerType;let y;try{y=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}v.default=y;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let y=v,b=e._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");y.type="string",y.pattern=b.source;break}case"pipe":{let y=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(y,g),a.ref=y;break}case"readonly":{this.process(o.innerType,g),a.ref=o.innerType,v.readOnly=!0;break}case"promise":{this.process(o.innerType,g),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,g),a.ref=o.innerType;break}case"lazy":{let y=e._zod.innerType;this.process(y,g),a.ref=y;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"&&Rt(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,g,x;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=v=>{var E;let y=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let F=(E=n.external.registry.get(v[0]))==null?void 0:E.id,L=n.external.uri??(me=>me);if(F)return{ref:L(F)};let pe=v[1].defId??v[1].schema.id??`schema${this.counter++}`;return v[1].defId=pe,{defId:pe,ref:`${L("__shared")}#/${y}/${pe}`}}if(v[1]===o)return{ref:"#"};let w=`#/${y}/`,k=v[1].schema.id??`__schema${this.counter++}`;return{defId:k,ref:w+k}},s=v=>{if(v[1].schema.$ref)return;let y=v[1],{ref:b,defId:w}=i(v);y.def={...y.schema},w&&(y.defId=w);let k=y.schema;for(let E in k)delete k[E];k.$ref=b};if(n.cycles==="throw")for(let v of this.seen.entries()){let y=v[1];if(y.cycle)throw new Error(`Cycle detected: #/${(p=y.cycle)==null?void 0:p.join("/")}/<root>
|
|
47
|
+
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let v of this.seen.entries()){let y=v[1];if(e===v[0]){s(v);continue}if(n.external){let w=(d=n.external.registry.get(v[0]))==null?void 0:d.id;if(e!==v[0]&&w){s(v);continue}}if((f=this.metadataRegistry.get(v[0]))==null?void 0:f.id){s(v);continue}if(y.cycle){s(v);continue}if(y.count>1&&n.reused==="ref"){s(v);continue}}let a=(v,y)=>{let b=this.seen.get(v),w=b.def??b.schema,k={...w};if(b.ref===null)return;let E=b.ref;if(b.ref=null,E){a(E,y);let F=this.seen.get(E).schema;F.$ref&&y.target==="draft-7"?(w.allOf=w.allOf??[],w.allOf.push(F)):(Object.assign(w,F),Object.assign(w,k))}b.isParent||this.override({zodSchema:v,jsonSchema:w,path:b.path??[]})};for(let v of[...this.seen.entries()].reverse())a(v[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 v=(g=n.external.registry.get(e))==null?void 0:g.id;if(!v)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(v)}Object.assign(c,o.def);let l=((x=n.external)==null?void 0:x.defs)??{};for(let v of this.seen.entries()){let y=v[1];y.def&&y.defId&&(l[y.defId]=y.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 $d(t,e){if(t instanceof gs){let n=new cc(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 cc(e);return r.process(t),r.emit(t,e)}function Rt(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 Rt(o.element,r);case"object":{for(let i in o.shape)if(Rt(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Rt(i,r))return!0;return!1}case"intersection":return Rt(o.left,r)||Rt(o.right,r);case"tuple":{for(let i of o.items)if(Rt(i,r))return!0;return!!(o.rest&&Rt(o.rest,r))}case"record":return Rt(o.keyType,r)||Rt(o.valueType,r);case"map":return Rt(o.keyType,r)||Rt(o.valueType,r);case"set":return Rt(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Rt(o.innerType,r);case"lazy":return Rt(o.getter(),r);case"default":return Rt(o.innerType,r);case"prefault":return Rt(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Rt(o.in,r)||Rt(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var vI=I("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Je.init(t,e),t.def=e,t.parse=(r,n)=>Hu(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>_o(t,r,n),t.parseAsync=async(r,n)=>Gu(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>wo(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)=>xr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t))});var bI=I("ZodMiniObject",(t,e)=>{ec.init(t,e),vI.init(t,e),Pe.defineLazy(t,"shape",()=>e.shape)});function Rd(t,e){let r={type:"object",get shape(){return Pe.assignProp(this,"shape",{...t}),this.shape},...Pe.normalizeParams(e)};return new bI(r)}function Xr(t){return!!t._zod}function To(t){let e=Object.values(t);if(e.length===0)return Rd({});let r=e.every(Xr),n=e.every(o=>!Xr(o));if(r)return Rd(t);if(n)return Pu(t);throw new Error("Mixed Zod versions detected in object shape.")}function zn(t,e){return Xr(t)?_o(t,e):t.safeParse(e)}async function lc(t,e){return Xr(t)?await wo(t,e):await t.safeParseAsync(e)}function Nn(t){var r,n;if(!t)return;let e;if(Xr(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 ci(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 To(t)}}if(Xr(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 wI(t){return t.length===0?"object root":t.reduce((e,r,n)=>n===0?String(r):typeof r=="number"?`${e}[${r}]`:`${e}.${r}`,"")}function uc(t){if(t&&typeof t=="object"){if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0)return t.issues.map(e=>{var r;return(r=e.path)!=null&&r.length?`${e.message} at ${wI(e.path)}`:e.message}).join(`
|
|
49
|
+
`);if("message"in t&&typeof t.message=="string")return t.message;try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function tv(t){return t.description}function rv(t){var r,n,o;if(Xr(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 li(t){var o;if(Xr(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 vs={};Ma(vs,{ZodISODate:()=>ov,ZodISODateTime:()=>nv,ZodISODuration:()=>sv,ZodISOTime:()=>iv,date:()=>Id,datetime:()=>Ad,duration:()=>Cd,time:()=>Pd});var nv=I("ZodISODateTime",(t,e)=>{qx.init(t,e),ft.init(t,e)});function Ad(t){return Kx(nv,t)}var ov=I("ZodISODate",(t,e)=>{Zx.init(t,e),ft.init(t,e)});function Id(t){return Jx(ov,t)}var iv=I("ZodISOTime",(t,e)=>{Bx.init(t,e),ft.init(t,e)});function Pd(t){return Yx(iv,t)}var sv=I("ZodISODuration",(t,e)=>{Hx.init(t,e),ft.init(t,e)});function Cd(t){return Xx(sv,t)}var av=(t,e)=>{Ka.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>Zu(t,r)},flatten:{value:r=>qu(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},k3=I("ZodError",av),bs=I("ZodError",av,{Parent:Error});var cv=Bu(bs),lv=Vu(bs),uv=Wu(bs),pv=Ku(bs);var vt=I("ZodType",(t,e)=>(Je.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)=>xr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>cv(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>uv(t,r,n),t.parseAsync=async(r,n)=>lv(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>pv(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(xP(r,n)),t.superRefine=r=>t.check(vP(r)),t.overwrite=r=>t.check(So(r)),t.optional=()=>ht(t),t.nullable=()=>mv(t),t.nullish=()=>ht(mv(t)),t.nonoptional=r=>pP(t,r),t.array=()=>Ne(t),t.or=r=>lt([t,r]),t.and=r=>dc(t,r),t.transform=r=>zd(t,bv(r)),t.default=r=>cP(t,r),t.prefault=r=>uP(t,r),t.catch=r=>fP(t,r),t.pipe=r=>zd(t,r),t.readonly=()=>gP(t),t.describe=r=>{let n=t.clone();return On.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){var r;return(r=On.get(t))==null?void 0:r.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return On.get(t);let n=t.clone();return On.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),hv=I("_ZodString",(t,e)=>{hs.init(t,e),vt.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(hd(...n)),t.includes=(...n)=>t.check(xd(...n)),t.startsWith=(...n)=>t.check(vd(...n)),t.endsWith=(...n)=>t.check(bd(...n)),t.min=(...n)=>t.check(ai(...n)),t.max=(...n)=>t.check(sc(...n)),t.length=(...n)=>t.check(ac(...n)),t.nonempty=(...n)=>t.check(ai(1,...n)),t.lowercase=n=>t.check(gd(n)),t.uppercase=n=>t.check(yd(n)),t.trim=()=>t.check(wd()),t.normalize=(...n)=>t.check(_d(...n)),t.toLowerCase=()=>t.check(Sd()),t.toUpperCase=()=>t.check(kd())}),II=I("ZodString",(t,e)=>{hs.init(t,e),hv.init(t,e),t.email=r=>t.check(qp(PI,r)),t.url=r=>t.check(Gp(CI,r)),t.jwt=r=>t.check(cd(GI,r)),t.emoji=r=>t.check(Wp(OI,r)),t.guid=r=>t.check(rc(dv,r)),t.uuid=r=>t.check(Zp(pc,r)),t.uuidv4=r=>t.check(Bp(pc,r)),t.uuidv6=r=>t.check(Hp(pc,r)),t.uuidv7=r=>t.check(Vp(pc,r)),t.nanoid=r=>t.check(Kp(zI,r)),t.guid=r=>t.check(rc(dv,r)),t.cuid=r=>t.check(Jp(NI,r)),t.cuid2=r=>t.check(Yp(LI,r)),t.ulid=r=>t.check(Xp(jI,r)),t.base64=r=>t.check(id(BI,r)),t.base64url=r=>t.check(sd(HI,r)),t.xid=r=>t.check(Qp(DI,r)),t.ksuid=r=>t.check(ed(MI,r)),t.ipv4=r=>t.check(td(FI,r)),t.ipv6=r=>t.check(rd(UI,r)),t.cidrv4=r=>t.check(nd(qI,r)),t.cidrv6=r=>t.check(od(ZI,r)),t.e164=r=>t.check(ad(VI,r)),t.datetime=r=>t.check(Ad(r)),t.date=r=>t.check(Id(r)),t.time=r=>t.check(Pd(r)),t.duration=r=>t.check(Cd(r))});function R(t){return Up(II,t)}var ft=I("ZodStringFormat",(t,e)=>{nt.init(t,e),hv.init(t,e)}),PI=I("ZodEmail",(t,e)=>{np.init(t,e),ft.init(t,e)});var dv=I("ZodGUID",(t,e)=>{tp.init(t,e),ft.init(t,e)});var pc=I("ZodUUID",(t,e)=>{rp.init(t,e),ft.init(t,e)});var CI=I("ZodURL",(t,e)=>{op.init(t,e),ft.init(t,e)});var OI=I("ZodEmoji",(t,e)=>{ip.init(t,e),ft.init(t,e)});var zI=I("ZodNanoID",(t,e)=>{sp.init(t,e),ft.init(t,e)});var NI=I("ZodCUID",(t,e)=>{ap.init(t,e),ft.init(t,e)});var LI=I("ZodCUID2",(t,e)=>{cp.init(t,e),ft.init(t,e)});var jI=I("ZodULID",(t,e)=>{lp.init(t,e),ft.init(t,e)});var DI=I("ZodXID",(t,e)=>{up.init(t,e),ft.init(t,e)});var MI=I("ZodKSUID",(t,e)=>{pp.init(t,e),ft.init(t,e)});var FI=I("ZodIPv4",(t,e)=>{dp.init(t,e),ft.init(t,e)});var UI=I("ZodIPv6",(t,e)=>{fp.init(t,e),ft.init(t,e)});var qI=I("ZodCIDRv4",(t,e)=>{mp.init(t,e),ft.init(t,e)});var ZI=I("ZodCIDRv6",(t,e)=>{hp.init(t,e),ft.init(t,e)});var BI=I("ZodBase64",(t,e)=>{gp.init(t,e),ft.init(t,e)});var HI=I("ZodBase64URL",(t,e)=>{yp.init(t,e),ft.init(t,e)});var VI=I("ZodE164",(t,e)=>{xp.init(t,e),ft.init(t,e)});var GI=I("ZodJWT",(t,e)=>{vp.init(t,e),ft.init(t,e)});var gv=I("ZodNumber",(t,e)=>{Qa.init(t,e),vt.init(t,e),t.gt=(n,o)=>t.check(oc(n,o)),t.gte=(n,o)=>t.check(xs(n,o)),t.min=(n,o)=>t.check(xs(n,o)),t.lt=(n,o)=>t.check(nc(n,o)),t.lte=(n,o)=>t.check(ys(n,o)),t.max=(n,o)=>t.check(ys(n,o)),t.int=n=>t.check(fv(n)),t.safe=n=>t.check(fv(n)),t.positive=n=>t.check(oc(0,n)),t.nonnegative=n=>t.check(xs(0,n)),t.negative=n=>t.check(nc(0,n)),t.nonpositive=n=>t.check(ys(0,n)),t.multipleOf=(n,o)=>t.check(ic(n,o)),t.step=(n,o)=>t.check(ic(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 He(t){return ld(gv,t)}var WI=I("ZodNumberFormat",(t,e)=>{bp.init(t,e),gv.init(t,e)});function fv(t){return ud(WI,t)}var KI=I("ZodBoolean",(t,e)=>{_p.init(t,e),vt.init(t,e)});function Pt(t){return pd(KI,t)}var JI=I("ZodNull",(t,e)=>{wp.init(t,e),vt.init(t,e)});function yv(t){return dd(JI,t)}var YI=I("ZodUnknown",(t,e)=>{Sp.init(t,e),vt.init(t,e)});function mt(){return fd(YI)}var XI=I("ZodNever",(t,e)=>{kp.init(t,e),vt.init(t,e)});function QI(t){return md(XI,t)}var eP=I("ZodArray",(t,e)=>{Tp.init(t,e),vt.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(ai(r,n)),t.nonempty=r=>t.check(ai(1,r)),t.max=(r,n)=>t.check(sc(r,n)),t.length=(r,n)=>t.check(ac(r,n)),t.unwrap=()=>t.element});function Ne(t,e){return Qx(eP,t,e)}var xv=I("ZodObject",(t,e)=>{ec.init(t,e),vt.init(t,e),Pe.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>cr(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:mt()}),t.loose=()=>t.clone({...t._zod.def,catchall:mt()}),t.strict=()=>t.clone({...t._zod.def,catchall:QI()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>Pe.extend(t,r),t.merge=r=>Pe.merge(t,r),t.pick=r=>Pe.pick(t,r),t.omit=r=>Pe.omit(t,r),t.partial=(...r)=>Pe.partial(_v,t,r[0]),t.required=(...r)=>Pe.required(wv,t,r[0])});function X(t,e){let r={type:"object",get shape(){return Pe.assignProp(this,"shape",{...t}),this.shape},...Pe.normalizeParams(e)};return new xv(r)}function Qt(t,e){return new xv({type:"object",get shape(){return Pe.assignProp(this,"shape",{...t}),this.shape},catchall:mt(),...Pe.normalizeParams(e)})}var vv=I("ZodUnion",(t,e)=>{tc.init(t,e),vt.init(t,e),t.options=e.options});function lt(t,e){return new vv({type:"union",options:t,...Pe.normalizeParams(e)})}var tP=I("ZodDiscriminatedUnion",(t,e)=>{vv.init(t,e),Ep.init(t,e)});function Nd(t,e,r){return new tP({type:"union",options:e,discriminator:t,...Pe.normalizeParams(r)})}var rP=I("ZodIntersection",(t,e)=>{$p.init(t,e),vt.init(t,e)});function dc(t,e){return new rP({type:"intersection",left:t,right:e})}var nP=I("ZodRecord",(t,e)=>{Rp.init(t,e),vt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function ot(t,e,r){return new nP({type:"record",keyType:t,valueType:e,...Pe.normalizeParams(r)})}var Od=I("ZodEnum",(t,e)=>{Ap.init(t,e),vt.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 Od({...e,checks:[],...Pe.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 Od({...e,checks:[],...Pe.normalizeParams(o),entries:i})}});function cr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Od({type:"enum",entries:r,...Pe.normalizeParams(e)})}var oP=I("ZodLiteral",(t,e)=>{Ip.init(t,e),vt.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 oP({type:"literal",values:Array.isArray(t)?t:[t],...Pe.normalizeParams(e)})}var iP=I("ZodTransform",(t,e)=>{Pp.init(t,e),vt.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(Pe.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(Pe.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 bv(t){return new iP({type:"transform",transform:t})}var _v=I("ZodOptional",(t,e)=>{Cp.init(t,e),vt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ht(t){return new _v({type:"optional",innerType:t})}var sP=I("ZodNullable",(t,e)=>{Op.init(t,e),vt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function mv(t){return new sP({type:"nullable",innerType:t})}var aP=I("ZodDefault",(t,e)=>{zp.init(t,e),vt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function cP(t,e){return new aP({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var lP=I("ZodPrefault",(t,e)=>{Np.init(t,e),vt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function uP(t,e){return new lP({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var wv=I("ZodNonOptional",(t,e)=>{Lp.init(t,e),vt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function pP(t,e){return new wv({type:"nonoptional",innerType:t,...Pe.normalizeParams(e)})}var dP=I("ZodCatch",(t,e)=>{jp.init(t,e),vt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function fP(t,e){return new dP({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var mP=I("ZodPipe",(t,e)=>{Dp.init(t,e),vt.init(t,e),t.in=e.in,t.out=e.out});function zd(t,e){return new mP({type:"pipe",in:t,out:e})}var hP=I("ZodReadonly",(t,e)=>{Mp.init(t,e),vt.init(t,e)});function gP(t){return new hP({type:"readonly",innerType:t})}var Sv=I("ZodCustom",(t,e)=>{Fp.init(t,e),vt.init(t,e)});function yP(t){let e=new jt({check:"custom"});return e._zod.check=t,e}function kv(t,e){return Td(Sv,t??(()=>!0),e)}function xP(t,e={}){return Ed(Sv,t,e)}function vP(t){let e=yP(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Pe.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(Pe.issue(o))}},t(r.value,r)));return e}function Ld(t,e){return zd(bv(t),e)}yr(Gx());var Dd="2025-11-25";var Tv=[Dd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ln="io.modelcontextprotocol/related-task",mc="2.0",At=kv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),Ev=lt([R(),He().int()]),$v=R(),D3=Qt({ttl:He().optional(),pollInterval:He().optional()}),bP=X({ttl:He().optional()}),_P=X({taskId:R()}),Md=Qt({progressToken:Ev.optional(),[Ln]:_P.optional()}),vr=X({_meta:Md.optional()}),_s=vr.extend({task:bP.optional()}),Rv=t=>_s.safeParse(t).success,Dt=X({method:R(),params:vr.loose().optional()}),Tr=X({_meta:Md.optional()}),Er=X({method:R(),params:Tr.loose().optional()}),Mt=Qt({_meta:Md.optional()}),hc=lt([R(),He().int()]),Av=X({jsonrpc:ne(mc),id:hc,...Dt.shape}).strict(),Fd=t=>Av.safeParse(t).success,Iv=X({jsonrpc:ne(mc),...Er.shape}).strict(),Pv=t=>Iv.safeParse(t).success,Ud=X({jsonrpc:ne(mc),id:hc,result:Mt}).strict(),ws=t=>Ud.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 qd=X({jsonrpc:ne(mc),id:hc.optional(),error:X({code:He().int(),message:R(),data:mt().optional()})}).strict();var Cv=t=>qd.safeParse(t).success;var Ov=lt([Av,Iv,Ud,qd]),M3=lt([Ud,qd]),gc=Mt.strict(),wP=Tr.extend({requestId:hc.optional(),reason:R().optional()}),yc=Er.extend({method:ne("notifications/cancelled"),params:wP}),SP=X({src:R(),mimeType:R().optional(),sizes:Ne(R()).optional(),theme:cr(["light","dark"]).optional()}),Ss=X({icons:Ne(SP).optional()}),ui=X({name:R(),title:R().optional()}),zv=ui.extend({...ui.shape,...Ss.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),kP=dc(X({applyDefaults:Pt().optional()}),ot(R(),mt())),TP=Ld(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,dc(X({form:kP.optional(),url:At.optional()}),ot(R(),mt()).optional())),EP=Qt({list:At.optional(),cancel:At.optional(),requests:Qt({sampling:Qt({createMessage:At.optional()}).optional(),elicitation:Qt({create:At.optional()}).optional()}).optional()}),$P=Qt({list:At.optional(),cancel:At.optional(),requests:Qt({tools:Qt({call:At.optional()}).optional()}).optional()}),RP=X({experimental:ot(R(),At).optional(),sampling:X({context:At.optional(),tools:At.optional()}).optional(),elicitation:TP.optional(),roots:X({listChanged:Pt().optional()}).optional(),tasks:EP.optional(),extensions:ot(R(),At).optional()}),AP=vr.extend({protocolVersion:R(),capabilities:RP,clientInfo:zv}),Zd=Dt.extend({method:ne("initialize"),params:AP});var IP=X({experimental:ot(R(),At).optional(),logging:At.optional(),completions:At.optional(),prompts:X({listChanged:Pt().optional()}).optional(),resources:X({subscribe:Pt().optional(),listChanged:Pt().optional()}).optional(),tools:X({listChanged:Pt().optional()}).optional(),tasks:$P.optional(),extensions:ot(R(),At).optional()}),PP=Mt.extend({protocolVersion:R(),capabilities:IP,serverInfo:zv,instructions:R().optional()}),Bd=Er.extend({method:ne("notifications/initialized"),params:Tr.optional()});var xc=Dt.extend({method:ne("ping"),params:vr.optional()}),CP=X({progress:He(),total:ht(He()),message:ht(R())}),OP=X({...Tr.shape,...CP.shape,progressToken:Ev}),vc=Er.extend({method:ne("notifications/progress"),params:OP}),zP=vr.extend({cursor:$v.optional()}),ks=Dt.extend({params:zP.optional()}),Ts=Mt.extend({nextCursor:$v.optional()}),NP=cr(["working","input_required","completed","failed","cancelled"]),Es=X({taskId:R(),status:NP,ttl:lt([He(),yv()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ht(He()),statusMessage:ht(R())}),pi=Mt.extend({task:Es}),LP=Tr.merge(Es),$s=Er.extend({method:ne("notifications/tasks/status"),params:LP}),bc=Dt.extend({method:ne("tasks/get"),params:vr.extend({taskId:R()})}),_c=Mt.merge(Es),wc=Dt.extend({method:ne("tasks/result"),params:vr.extend({taskId:R()})}),F3=Mt.loose(),Sc=ks.extend({method:ne("tasks/list")}),kc=Ts.extend({tasks:Ne(Es)}),Tc=Dt.extend({method:ne("tasks/cancel"),params:vr.extend({taskId:R()})}),Nv=Mt.merge(Es),Lv=X({uri:R(),mimeType:ht(R()),_meta:ot(R(),mt()).optional()}),jv=Lv.extend({text:R()}),Hd=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Dv=Lv.extend({blob:Hd}),Rs=cr(["user","assistant"]),di=X({audience:Ne(Rs).optional(),priority:He().min(0).max(1).optional(),lastModified:vs.datetime({offset:!0}).optional()}),Mv=X({...ui.shape,...Ss.shape,uri:R(),description:ht(R()),mimeType:ht(R()),size:ht(He()),annotations:di.optional(),_meta:ht(Qt({}))}),jP=X({...ui.shape,...Ss.shape,uriTemplate:R(),description:ht(R()),mimeType:ht(R()),annotations:di.optional(),_meta:ht(Qt({}))}),Ec=ks.extend({method:ne("resources/list")}),DP=Ts.extend({resources:Ne(Mv)}),$c=ks.extend({method:ne("resources/templates/list")}),MP=Ts.extend({resourceTemplates:Ne(jP)}),Vd=vr.extend({uri:R()}),FP=Vd,Rc=Dt.extend({method:ne("resources/read"),params:FP}),UP=Mt.extend({contents:Ne(lt([jv,Dv]))}),qP=Er.extend({method:ne("notifications/resources/list_changed"),params:Tr.optional()}),ZP=Vd,BP=Dt.extend({method:ne("resources/subscribe"),params:ZP}),HP=Vd,VP=Dt.extend({method:ne("resources/unsubscribe"),params:HP}),GP=Tr.extend({uri:R()}),WP=Er.extend({method:ne("notifications/resources/updated"),params:GP}),KP=X({name:R(),description:ht(R()),required:ht(Pt())}),JP=X({...ui.shape,...Ss.shape,description:ht(R()),arguments:ht(Ne(KP)),_meta:ht(Qt({}))}),Ac=ks.extend({method:ne("prompts/list")}),YP=Ts.extend({prompts:Ne(JP)}),XP=vr.extend({name:R(),arguments:ot(R(),R()).optional()}),Ic=Dt.extend({method:ne("prompts/get"),params:XP}),Gd=X({type:ne("text"),text:R(),annotations:di.optional(),_meta:ot(R(),mt()).optional()}),Wd=X({type:ne("image"),data:Hd,mimeType:R(),annotations:di.optional(),_meta:ot(R(),mt()).optional()}),Kd=X({type:ne("audio"),data:Hd,mimeType:R(),annotations:di.optional(),_meta:ot(R(),mt()).optional()}),QP=X({type:ne("tool_use"),name:R(),id:R(),input:ot(R(),mt()),_meta:ot(R(),mt()).optional()}),eC=X({type:ne("resource"),resource:lt([jv,Dv]),annotations:di.optional(),_meta:ot(R(),mt()).optional()}),tC=Mv.extend({type:ne("resource_link")}),Jd=lt([Gd,Wd,Kd,tC,eC]),rC=X({role:Rs,content:Jd}),nC=Mt.extend({description:R().optional(),messages:Ne(rC)}),oC=Er.extend({method:ne("notifications/prompts/list_changed"),params:Tr.optional()}),iC=X({title:R().optional(),readOnlyHint:Pt().optional(),destructiveHint:Pt().optional(),idempotentHint:Pt().optional(),openWorldHint:Pt().optional()}),sC=X({taskSupport:cr(["required","optional","forbidden"]).optional()}),Fv=X({...ui.shape,...Ss.shape,description:R().optional(),inputSchema:X({type:ne("object"),properties:ot(R(),At).optional(),required:Ne(R()).optional()}).catchall(mt()),outputSchema:X({type:ne("object"),properties:ot(R(),At).optional(),required:Ne(R()).optional()}).catchall(mt()).optional(),annotations:iC.optional(),execution:sC.optional(),_meta:ot(R(),mt()).optional()}),Pc=ks.extend({method:ne("tools/list")}),aC=Ts.extend({tools:Ne(Fv)}),Cc=Mt.extend({content:Ne(Jd).default([]),structuredContent:ot(R(),mt()).optional(),isError:Pt().optional()}),U3=Cc.or(Mt.extend({toolResult:mt()})),cC=_s.extend({name:R(),arguments:ot(R(),mt()).optional()}),fi=Dt.extend({method:ne("tools/call"),params:cC}),lC=Er.extend({method:ne("notifications/tools/list_changed"),params:Tr.optional()}),q3=X({autoRefresh:Pt().default(!0),debounceMs:He().int().nonnegative().default(300)}),As=cr(["debug","info","notice","warning","error","critical","alert","emergency"]),uC=vr.extend({level:As}),Yd=Dt.extend({method:ne("logging/setLevel"),params:uC}),pC=Tr.extend({level:As,logger:R().optional(),data:mt()}),dC=Er.extend({method:ne("notifications/message"),params:pC}),fC=X({name:R().optional()}),mC=X({hints:Ne(fC).optional(),costPriority:He().min(0).max(1).optional(),speedPriority:He().min(0).max(1).optional(),intelligencePriority:He().min(0).max(1).optional()}),hC=X({mode:cr(["auto","required","none"]).optional()}),gC=X({type:ne("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Ne(Jd).default([]),structuredContent:X({}).loose().optional(),isError:Pt().optional(),_meta:ot(R(),mt()).optional()}),yC=Nd("type",[Gd,Wd,Kd]),fc=Nd("type",[Gd,Wd,Kd,QP,gC]),xC=X({role:Rs,content:lt([fc,Ne(fc)]),_meta:ot(R(),mt()).optional()}),vC=_s.extend({messages:Ne(xC),modelPreferences:mC.optional(),systemPrompt:R().optional(),includeContext:cr(["none","thisServer","allServers"]).optional(),temperature:He().optional(),maxTokens:He().int(),stopSequences:Ne(R()).optional(),metadata:At.optional(),tools:Ne(Fv).optional(),toolChoice:hC.optional()}),bC=Dt.extend({method:ne("sampling/createMessage"),params:vC}),Is=Mt.extend({model:R(),stopReason:ht(cr(["endTurn","stopSequence","maxTokens"]).or(R())),role:Rs,content:yC}),Xd=Mt.extend({model:R(),stopReason:ht(cr(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:Rs,content:lt([fc,Ne(fc)])}),_C=X({type:ne("boolean"),title:R().optional(),description:R().optional(),default:Pt().optional()}),wC=X({type:ne("string"),title:R().optional(),description:R().optional(),minLength:He().optional(),maxLength:He().optional(),format:cr(["email","uri","date","date-time"]).optional(),default:R().optional()}),SC=X({type:cr(["number","integer"]),title:R().optional(),description:R().optional(),minimum:He().optional(),maximum:He().optional(),default:He().optional()}),kC=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),default:R().optional()}),TC=X({type:ne("string"),title:R().optional(),description:R().optional(),oneOf:Ne(X({const:R(),title:R()})),default:R().optional()}),EC=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),enumNames:Ne(R()).optional(),default:R().optional()}),$C=lt([kC,TC]),RC=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()}),AC=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()}),IC=lt([RC,AC]),PC=lt([EC,$C,IC]),CC=lt([PC,_C,wC,SC]),OC=_s.extend({mode:ne("form").optional(),message:R(),requestedSchema:X({type:ne("object"),properties:ot(R(),CC),required:Ne(R()).optional()})}),zC=_s.extend({mode:ne("url"),message:R(),elicitationId:R(),url:R().url()}),NC=lt([OC,zC]),LC=Dt.extend({method:ne("elicitation/create"),params:NC}),jC=Tr.extend({elicitationId:R()}),DC=Er.extend({method:ne("notifications/elicitation/complete"),params:jC}),mi=Mt.extend({action:cr(["accept","decline","cancel"]),content:Ld(t=>t===null?void 0:t,ot(R(),lt([R(),He(),Pt(),Ne(R())])).optional())}),MC=X({type:ne("ref/resource"),uri:R()});var FC=X({type:ne("ref/prompt"),name:R()}),UC=vr.extend({ref:lt([FC,MC]),argument:X({name:R(),value:R()}),context:X({arguments:ot(R(),R()).optional()}).optional()}),Oc=Dt.extend({method:ne("completion/complete"),params:UC});function Uv(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function qv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var qC=Mt.extend({completion:Qt({values:Ne(R()).max(100),total:ht(He().int()),hasMore:ht(Pt())})}),ZC=X({uri:R().startsWith("file://"),name:R().optional(),_meta:ot(R(),mt()).optional()}),BC=Dt.extend({method:ne("roots/list"),params:vr.optional()}),Qd=Mt.extend({roots:Ne(ZC)}),HC=Er.extend({method:ne("notifications/roots/list_changed"),params:Tr.optional()}),Z3=lt([xc,Zd,Oc,Yd,Ic,Ac,Ec,$c,Rc,BP,VP,fi,Pc,bc,wc,Sc,Tc]),B3=lt([yc,vc,Bd,HC,$s]),H3=lt([gc,Is,Xd,mi,Qd,_c,kc,pi]),V3=lt([xc,bC,LC,BC,bc,wc,Sc,Tc]),G3=lt([yc,vc,dC,WP,qP,lC,oC,$s,DC]),W3=lt([gc,PP,qC,nC,YP,DP,MP,UP,Cc,aC,_c,kc,pi]),re=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===se.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new jd(o.elicitations,r)}return new t(e,r,n)}},jd=class extends re{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(se.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function jn(t){return t==="completed"||t==="failed"||t==="cancelled"}var Bv=Symbol("Let zodToJsonSchema decide on which parser to use");var Zv={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"},Hv=t=>typeof t=="string"?{...Zv,name:t}:{...Zv,...t};var Vv=t=>{let e=Hv(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 ef(t,e,r,n){n!=null&&n.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function Le(t,e,r,n,o){t[e]=r,ef(t,e,n,o)}var zc=(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 gt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?zc(e,t.currentPath):e.join("/")}}function Gv(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)!==q.ZodAny&&(r.items=fe(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&Le(r,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&Le(r,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(Le(r,"minItems",t.exactLength.value,t.exactLength.message,e),Le(r,"maxItems",t.exactLength.value,t.exactLength.message,e)),r}function Wv(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?Le(r,"minimum",n.value,n.message,e):Le(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),Le(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?Le(r,"maximum",n.value,n.message,e):Le(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),Le(r,"maximum",n.value,n.message,e));break;case"multipleOf":Le(r,"multipleOf",n.value,n.message,e);break}return r}function Kv(){return{type:"boolean"}}function Nc(t,e){return fe(t.type._def,e)}var Jv=(t,e)=>fe(t.innerType._def,e);function tf(t,e,r){let n=r??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>tf(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 VC(t,e)}}var VC=(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":Le(r,"minimum",n.value,n.message,e);break;case"max":Le(r,"maximum",n.value,n.message,e);break}return r};function Yv(t,e){return{...fe(t.innerType._def,e),default:t.defaultValue()}}function Xv(t,e){return e.effectStrategy==="input"?fe(t.schema._def,e):gt(e)}function Qv(t){return{type:"string",enum:Array.from(t.values)}}var GC=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function eb(t,e){let r=[fe(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),fe(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(GC(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 tb(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 rf,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:()=>(rf===void 0&&(rf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rf),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 Lc(t,e){let r={type:"string"};if(t.checks)for(let n of t.checks)switch(n.kind){case"min":Le(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e);break;case"max":Le(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":jr(r,"email",n.message,e);break;case"format:idn-email":jr(r,"idn-email",n.message,e);break;case"pattern:zod":er(r,Lr.email,n.message,e);break}break;case"url":jr(r,"uri",n.message,e);break;case"uuid":jr(r,"uuid",n.message,e);break;case"regex":er(r,n.regex,n.message,e);break;case"cuid":er(r,Lr.cuid,n.message,e);break;case"cuid2":er(r,Lr.cuid2,n.message,e);break;case"startsWith":er(r,RegExp(`^${nf(n.value,e)}`),n.message,e);break;case"endsWith":er(r,RegExp(`${nf(n.value,e)}$`),n.message,e);break;case"datetime":jr(r,"date-time",n.message,e);break;case"date":jr(r,"date",n.message,e);break;case"time":jr(r,"time",n.message,e);break;case"duration":jr(r,"duration",n.message,e);break;case"length":Le(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e),Le(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"includes":{er(r,RegExp(nf(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&jr(r,"ipv4",n.message,e),n.version!=="v4"&&jr(r,"ipv6",n.message,e);break}case"base64url":er(r,Lr.base64url,n.message,e);break;case"jwt":er(r,Lr.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&er(r,Lr.ipv4Cidr,n.message,e),n.version!=="v4"&&er(r,Lr.ipv6Cidr,n.message,e);break}case"emoji":er(r,Lr.emoji(),n.message,e);break;case"ulid":{er(r,Lr.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{jr(r,"binary",n.message,e);break}case"contentEncoding:base64":{Le(r,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{er(r,Lr.base64,n.message,e);break}}break}case"nanoid":er(r,Lr.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function nf(t,e){return e.patternStrategy==="escape"?KC(t):t}var WC=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function KC(t){let e="";for(let r=0;r<t.length;r++)WC.has(t[r])||(e+="\\"),e+=t[r];return e}function jr(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}}})):Le(t,"format",e,r,n)}function er(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:rb(e,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):Le(t,"pattern",rb(e,n),r,n)}function rb(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
|
|
50
|
+
]))`;continue}else if(n[l]==="$"){o+=`($|(?=[\r
|
|
51
|
+
]))`;continue}}if(r.s&&n[l]==="."){o+=s?`${n[l]}\r
|
|
52
|
+
`:`[${n[l]}\r
|
|
53
|
+
]`;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 jc(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)===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]})??gt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let r={type:"object",additionalProperties:fe(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)===q.ZodString&&((i=t.keyType._def.checks)!=null&&i.length)){let{type:l,...p}=Lc(t.keyType._def,e);return{...r,propertyNames:p}}else{if(((s=t.keyType)==null?void 0:s._def.typeName)===q.ZodEnum)return{...r,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}=Nc(t.keyType._def,e);return{...r,propertyNames:p}}}return r}function nb(t,e){if(e.mapStrategy==="record")return jc(t,e);let r=fe(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||gt(e),n=fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||gt(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function ob(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 ib(t){return t.target==="openAi"?void 0:{not:gt({...t,currentPath:[...t.currentPath,"not"]})}}function sb(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Ps={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function cb(t,e){if(e.target==="openApi3")return ab(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in Ps&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=Ps[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 ab(t,e)}var ab=(t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((n,o)=>fe(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 lb(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:Ps[t.innerType._def.typeName],nullable:!0}:{type:[Ps[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function ub(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",ef(r,"type",n.message,e);break;case"min":e.target==="jsonSchema7"?n.inclusive?Le(r,"minimum",n.value,n.message,e):Le(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),Le(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?Le(r,"maximum",n.value,n.message,e):Le(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),Le(r,"maximum",n.value,n.message,e));break;case"multipleOf":Le(r,"multipleOf",n.value,n.message,e);break}return r}function pb(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=YC(c);l&&r&&(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&&(n.properties[a]=p,l||o.push(a))}o.length&&(n.required=o);let s=JC(t,e);return s!==void 0&&(n.additionalProperties=s),n}function JC(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 YC(t){try{return t.isOptional()}catch{return!0}}var db=(t,e)=>{var n;if(e.currentPath.toString()===((n=e.propertyPath)==null?void 0:n.toString()))return fe(t.innerType._def,e);let r=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:gt(e)},r]}:gt(e)};var fb=(t,e)=>{if(e.pipeStrategy==="input")return fe(t.in._def,e);if(e.pipeStrategy==="output")return fe(t.out._def,e);let r=fe(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),n=fe(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}};function mb(t,e){return fe(t.type._def,e)}function hb(t,e){let n={type:"array",uniqueItems:!0,items:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&Le(n,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&Le(n,"maxItems",t.maxSize.value,t.maxSize.message,e),n}function gb(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,n)=>fe(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:fe(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,n)=>fe(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function yb(t){return{not:gt(t)}}function xb(t){return gt(t)}var vb=(t,e)=>fe(t.innerType._def,e);var bb=(t,e,r)=>{switch(e){case q.ZodString:return Lc(t,r);case q.ZodNumber:return ub(t,r);case q.ZodObject:return pb(t,r);case q.ZodBigInt:return Wv(t,r);case q.ZodBoolean:return Kv();case q.ZodDate:return tf(t,r);case q.ZodUndefined:return yb(r);case q.ZodNull:return sb(r);case q.ZodArray:return Gv(t,r);case q.ZodUnion:case q.ZodDiscriminatedUnion:return cb(t,r);case q.ZodIntersection:return eb(t,r);case q.ZodTuple:return gb(t,r);case q.ZodRecord:return jc(t,r);case q.ZodLiteral:return tb(t,r);case q.ZodEnum:return Qv(t);case q.ZodNativeEnum:return ob(t);case q.ZodNullable:return lb(t,r);case q.ZodOptional:return db(t,r);case q.ZodMap:return nb(t,r);case q.ZodSet:return hb(t,r);case q.ZodLazy:return()=>t.getter()._def;case q.ZodPromise:return mb(t,r);case q.ZodNaN:case q.ZodNever:return ib(r);case q.ZodEffects:return Xv(t,r);case q.ZodAny:return gt(r);case q.ZodUnknown:return xb(r);case q.ZodDefault:return Yv(t,r);case q.ZodBranded:return Nc(t,r);case q.ZodReadonly:return vb(t,r);case q.ZodCatch:return Jv(t,r);case q.ZodPipeline:return fb(t,r);case q.ZodFunction:case q.ZodVoid:case q.ZodSymbol:return;default:return(n=>{})(e)}};function fe(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!==Bv)return c}if(n&&!r){let c=XC(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=bb(t,t.typeName,e),s=typeof i=="function"?fe(i(),e):i;if(s&&QC(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var XC=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:zc(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`),gt(e)):e.$refStrategy==="seen"?gt(e):void 0}},QC=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r);var of=(t,e)=>{let r=Vv(e),n=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[l,p])=>({...c,[l]:fe(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,l]},!0)??gt(r)}),{}):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?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??gt(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 eO(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function sf(t,e){return Xr(t)?$d(t,{target:eO(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):of(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function af(t){let e=Nn(t),r=e==null?void 0:e.method;if(!r)throw new Error("Schema is missing a method literal");let n=li(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function cf(t,e){let r=zn(t,e);if(!r.success)throw r.error;return r.data}var tO=6e4,Dc=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(yc,r=>{this._oncancel(r)}),this.setNotificationHandler(vc,r=>{this._onprogress(r)}),this.setRequestHandler(xc,r=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(bc,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new re(se.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(wc,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 re(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 re(se.InvalidParams,`Task not found: ${i}`);if(!jn(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(jn(s.status)){let c=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Ln]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(Sc,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 re(se.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(Tc,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new re(se.InvalidParams,`Task not found: ${r.params.taskId}`);if(jn(o.status))throw new re(se.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 re(se.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof re?o:new re(se.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),re.fromError(se.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),ws(c)||Cv(c)?this._onresponse(c):Fd(c)?this._onrequest(c,l):Pv(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=re.fromError(se.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[Ln])==null?void 0:f.taskId;if(n===void 0){let g={jsonrpc:"2.0",id:e.id,error:{code:se.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:g,timestamp:Date.now()},o==null?void 0:o.sessionId).catch(x=>this._onerror(new Error(`Failed to enqueue error response: ${x}`))):o==null||o.send(g).catch(x=>this._onerror(new Error(`Failed to send an error response: ${x}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);let a=Rv(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 g=>{if(s.signal.aborted)return;let x={relatedRequestId:e.id};i&&(x.relatedTask={taskId:i}),await this.notification(g,x)},sendRequest:async(g,x,v)=>{var w;if(s.signal.aborted)throw new re(se.ConnectionClosed,"Request was cancelled");let y={...v,relatedRequestId:e.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});let b=((w=y.relatedTask)==null?void 0:w.taskId)??i;return b&&c&&await c.updateTaskStatus(b,"input_required"),await this.request(g,x,y)},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 g=>{if(s.signal.aborted)return;let x={result:g,jsonrpc:"2.0",id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:x,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(x))},async g=>{if(s.signal.aborted)return;let x={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(g.code)?g.code:se.InternalError,message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:x,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(x))}).catch(g=>this._onerror(new Error(`Failed to send response: ${g}`))).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),ws(e))n(e);else{let s=new re(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(ws(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),ws(e))o(e);else{let s=re.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 re?c:new re(se.InternalError,String(c))}}return}let i;try{let c=await this.request(e,pi,n);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new re(se.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:l},jn(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:l.status==="failed"?yield{type:"error",error:new re(se.InternalError,`Task ${i} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new re(se.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 re?c:new re(se.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 b,w,k,E,F;let d=L=>{p(L)};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(L){d(L);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:{...((k=e.params)==null?void 0:k._meta)||{},progressToken:f}}),a&&(m.params={...m.params,task:a}),c&&(m.params={...m.params,_meta:{...((E=m.params)==null?void 0:E._meta)||{},[Ln]:c}});let g=L=>{var me;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(me=this._transport)==null||me.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(L)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(ee=>this._onerror(new Error(`Failed to send cancellation: ${ee}`)));let pe=L instanceof re?L:new re(se.RequestTimeout,String(L));p(pe)};this._responseHandlers.set(f,L=>{var pe;if(!((pe=n==null?void 0:n.signal)!=null&&pe.aborted)){if(L instanceof Error)return p(L);try{let me=zn(r,L.result);me.success?l(me.data):p(me.error)}catch(me){p(me)}}}),(F=n==null?void 0:n.signal)==null||F.addEventListener("abort",()=>{var L;g((L=n==null?void 0:n.signal)==null?void 0:L.reason)});let x=(n==null?void 0:n.timeout)??tO,v=()=>g(re.fromError(se.RequestTimeout,"Request timed out",{timeout:x}));this._setupTimeout(f,x,n==null?void 0:n.maxTotalTimeout,v,(n==null?void 0:n.resetTimeoutOnProgress)??!1);let y=c==null?void 0:c.taskId;if(y){let L=pe=>{let me=this._responseHandlers.get(f);me?me(pe):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,L),this._enqueueTaskMessage(y,{type:"request",message:m,timestamp:Date.now()}).catch(pe=>{this._cleanupTimeout(f),p(pe)})}else this._transport.send(m,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(L=>{this._cleanupTimeout(f),p(L)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},_c,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},kc,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},Nv,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)||{},[Ln]: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)||{},[Ln]:r.relatedTask}}}),(m=this._transport)==null||m.send(d,r).catch(g=>this._onerror(g))});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)||{},[Ln]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(e,r){let n=af(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=cf(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=af(e);this._notificationHandlers.set(n,o=>{let i=cf(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"&&Fd(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new re(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,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 re(se.InvalidRequest,"Request cancelled"));return}let c=setTimeout(s,n);r.addEventListener("abort",()=>{clearTimeout(c),a(new re(se.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 re(se.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=$s.parse({method:"notifications/tasks/status",params:a});await this.notification(c),jn(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 re(se.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(jn(a.status))throw new re(se.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=$s.parse({method:"notifications/tasks/status",params:c});await this.notification(l),jn(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}};function _b(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function wb(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];_b(s)&&_b(i)?r[o]={...s,...i}:r[o]=i}return r}var d0=Ee(Wm(),1),f0=Ee(p0(),1);function sD(){let t=new d0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,f0.default)(t),t}var _l=class{constructor(e){this._ajv=e??sD()}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 wl=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},Is,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},mi,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 m0(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 h0(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 Sl=class extends Dc{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(As.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 _l,this.setRequestHandler(Zd,n=>this._oninitialize(n)),this.setNotificationHandler(Bd,()=>{var n;return(n=this.oninitialized)==null?void 0:n.call(this)}),this._capabilities.logging&&this.setRequestHandler(Yd,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=As.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new wl(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=wb(this._capabilities,e)}setRequestHandler(e,r){let n=Nn(e),o=n==null?void 0:n.method;if(!o)throw new Error("Schema is missing a method literal");let i=li(o);if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,l)=>{let p=zn(fi,c);if(!p.success){let g=p.error instanceof Error?p.error.message:String(p.error);throw new re(se.InvalidParams,`Invalid tools/call request: ${g}`)}let{params:d}=p.data,f=await Promise.resolve(r(c,l));if(d.task){let g=zn(pi,f);if(!g.success){let x=g.error instanceof Error?g.error.message:String(g.error);throw new re(se.InvalidParams,`Invalid task creation result: ${x}`)}return g.data}let m=zn(Cc,f);if(!m.success){let g=m.error instanceof Error?m.error.message:String(m.error);throw new re(se.InvalidParams,`Invalid tools/call result: ${g}`)}return m.data};return super.setRequestHandler(e,a)}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;h0((n=(r=this._clientCapabilities)==null?void 0:r.tasks)==null?void 0:n.requests,e,"Client")}assertTaskHandlerCapability(e){var r;this._capabilities&&m0((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:Tv.includes(r)?r:Dd,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"},gc)}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},Xd,r):this.request({method:"sampling/createMessage",params:e},Is,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},mi,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},mi,r);if(l.action==="accept"&&l.content&&c.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(c.requestedSchema)(l.content);if(!d.valid)throw new re(se.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(p){throw p instanceof re?p:new re(se.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 y0=Symbol.for("mcp.completable");function rh(t){return!!t&&typeof t=="object"&&y0 in t}function x0(t){let e=t[y0];return e==null?void 0:e.complete}var g0;(function(t){t.Completable="McpCompletable"})(g0||(g0={}));var aD=/^[A-Za-z0-9._-]{1,128}$/;function cD(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"),!aD.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 lD(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 nh(t){let e=cD(t);return lD(t,e.warnings),e.isValid}var kl=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 Tl=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 Sl(e,r)}get experimental(){return this._experimental||(this._experimental={tasks:new kl(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Vn(Pc)),this.server.assertCanSetRequestHandler(Vn(fi)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Pc,()=>({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=ci(r.inputSchema);return o?sf(o,{strictUnions:!0,pipeStrategy:"input"}):uD})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=ci(r.outputSchema);o&&(n.outputSchema=sf(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(fi,async(e,r)=>{var n;try{let o=this._registeredTools[e.params.name];if(!o)throw new re(se.InvalidParams,`Tool ${e.params.name} not found`);if(!o.enabled)throw new re(se.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 re(se.InternalError,`Tool ${e.params.name} has taskSupport '${s}' but was not registered with registerToolTask`);if(s==="required"&&!i)throw new re(se.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 re&&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,r,n){if(!e.inputSchema)return;let i=ci(e.inputSchema)??e.inputSchema,s=await lc(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=uc(a);throw new re(se.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 re(se.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=ci(e.outputSchema),i=await lc(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=uc(s);throw new re(se.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 re(se.InternalError,`Task ${c} not found during polling`);l=d}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Vn(Oc)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Oc,async e=>{switch(e.params.ref.type){case"ref/prompt":return Uv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return qv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new re(se.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,r){let n=this._registeredPrompts[r.name];if(!n)throw new re(se.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new re(se.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return aa;let o=Nn(n.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!rh(i))return aa;let s=x0(i);if(!s)return aa;let a=await s(e.params.argument.value,e.params.context);return b0(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 aa;throw new re(se.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return aa;let i=await o(e.params.argument.value,e.params.context);return b0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Vn(Ec)),this.server.assertCanSetRequestHandler(Vn($c)),this.server.assertCanSetRequestHandler(Vn(Rc)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Ec,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($c,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler(Rc,async(e,r)=>{let n=new URL(e.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new re(se.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 re(se.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Vn(Ac)),this.server.assertCanSetRequestHandler(Vn(Ic)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Ac,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,r])=>({name:e,title:r.title,description:r.description,arguments:r.argsSchema?pD(r.argsSchema):void 0}))})),this.server.setRequestHandler(Ic,async(e,r)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new re(se.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new re(se.InvalidParams,`Prompt ${e.params.name} disabled`);if(n.argsSchema){let o=ci(n.argsSchema),i=await lc(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=uc(c);throw new re(se.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:To(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=To(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 sr?(p=c._def)==null?void 0:p.innerType:c;return rh(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,r,n,o,i,s,a,c,l){nh(e);let p={title:r,description:n,inputSchema:v0(o),outputSchema:v0(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"&&nh(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=To(d.paramsSchema)),typeof d.outputSchema<"u"&&(p.outputSchema=To(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(oh(c))o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!oh(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 uD={type:"object",properties:{}};function _0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function w0(t){return"_def"in t||"_zod"in t||_0(t)}function oh(t){return typeof t!="object"||t===null||w0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(_0)}function v0(t){if(t){if(oh(t))return To(t);if(!w0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function pD(t){let e=Nn(t);return e?Object.entries(e).map(([r,n])=>{let o=tv(n),i=rv(n);return{name:r,description:o,required:!i}}):[]}function Vn(t){let e=Nn(t),r=e==null?void 0:e.method;if(!r)throw new Error("Schema is missing a method literal");let n=li(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function b0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var aa={completion:{values:[],hasMore:!1}};var ih=Ee(require("node:process"),1);var dD=10*1024*1024,El=class{constructor(e){this._maxBufferSize=(e==null?void 0:e.maxBufferSize)??dD}append(e){var n;if((((n=this._buffer)==null?void 0:n.length)??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
54
|
+
`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),fD(r)}clear(){this._buffer=void 0}};function fD(t){return Ov.parse(JSON.parse(t))}function S0(t){return JSON.stringify(t)+`
|
|
55
|
+
`}var $l=class{constructor(e=ih.default.stdin,r=ih.default.stdout,n){this._stdin=e,this._stdout=r,this._started=!1,this._ondata=o=>{var i;try{this._readBuffer.append(o),this.processReadBuffer()}catch(s){(i=this.onerror)==null||i.call(this,s),this.close().catch(()=>{})}},this._onerror=o=>{var i;(i=this.onerror)==null||i.call(this,o)},this._readBuffer=new El({maxBufferSize:n==null?void 0:n.maxBufferSize})}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,r;for(;;)try{let n=this._readBuffer.readMessage();if(n===null)break;(e=this.onmessage)==null||e.call(this,n)}catch(n){(r=this.onerror)==null||r.call(this,n)}}async close(){var r;this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),(r=this.onclose)==null||r.call(this)}send(e){return new Promise(r=>{let n=S0(e);this._stdout.write(n)?r():this._stdout.once("drain",r)})}};var ca=null;function mD(){let t=(process.env.MG_NO_PREFIX??"").toLowerCase();return t==="1"||t==="true"||t==="yes"}function hD(){return ca!==null||(ca=mD()),ca}function k0(t){t!==void 0&&(ca=t)}function sh(){return hD()}function T0(){return sh()?"":"mcp__"}function kt(t){return`${T0()}${t}`}function nr(t){let e=T0();return e==="mcp__"?t:t.replace(/mcp__/g,e)}var it=class{register(e){e.tool(this.name,nr(this.description),this.schema.shape,this.execute.bind(this))}normalizeFileId(e){return e&&e.replace(/^file\//,"")}};function la(t,e){return function(){return t.apply(e,arguments)}}var{toString:gD}=Object.prototype,{getPrototypeOf:Ci}=Object,{iterator:pa,toStringTag:R0}=Symbol,Al=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ua=(t,e)=>{let r=t,n=[];for(;r!=null&&r!==Object.prototype;){if(n.indexOf(r)!==-1)return!1;if(n.push(r),Al(r,e))return!0;r=Ci(r)}return!1},yD=(t,e)=>t!=null&&ua(t,e)?t[e]:void 0,ch=(t=>e=>{let r=gD.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Zr=t=>(t=t.toLowerCase(),e=>ch(e)===t),Il=t=>e=>typeof e===t,{isArray:Do}=Array,Oi=Il("undefined");function zi(t){return t!==null&&!Oi(t)&&t.constructor!==null&&!Oi(t.constructor)&&fr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var A0=Zr("ArrayBuffer");function xD(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&A0(t.buffer),e}var vD=Il("string"),fr=Il("function"),I0=Il("number"),Ni=t=>t!==null&&typeof t=="object",bD=t=>t===!0||t===!1,Rl=t=>{if(!Ni(t))return!1;let e=Ci(t);return(e===null||e===Object.prototype||Ci(e)===null)&&!ua(t,R0)&&!ua(t,pa)},_D=t=>{if(!Ni(t)||zi(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},wD=Zr("Date"),SD=Zr("File"),kD=t=>!!(t&&typeof t.uri<"u"),TD=t=>t&&typeof t.getParts<"u",ED=Zr("Blob"),$D=Zr("FileList"),RD=t=>Ni(t)&&fr(t.pipe);function AD(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var E0=AD(),$0=typeof E0.FormData<"u"?E0.FormData:void 0,ID=t=>{if(!t)return!1;if($0&&t instanceof $0)return!0;let e=Ci(t);if(!e||e===Object.prototype||!fr(t.append))return!1;let r=ch(t);return r==="formdata"||r==="object"&&fr(t.toString)&&t.toString()==="[object FormData]"},PD=Zr("URLSearchParams"),[CD,OD,zD,ND]=["ReadableStream","Request","Response","Headers"].map(Zr),LD=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function da(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),Do(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(zi(t))return;let i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length,a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function P0(t,e){if(zi(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var jo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,C0=t=>!Oi(t)&&t!==jo;function ah(...t){let{caseless:e,skipUndefined:r}=C0(this)&&this||{},n={},o=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let a=e&&typeof s=="string"&&P0(n,s)||s,c=Al(n,a)?n[a]:void 0;Rl(c)&&Rl(i)?n[a]=ah(c,i):Rl(i)?n[a]=ah({},i):Do(i)?n[a]=i.slice():(!r||!Oi(i))&&(n[a]=i)};for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a||zi(a)||(da(a,o),typeof a!="object"||Do(a)))continue;let c=Object.getOwnPropertySymbols(a);for(let l=0;l<c.length;l++){let p=c[l];WD.call(a,p)&&o(a[p],p)}}return n}var jD=(t,e,r,{allOwnKeys:n}={})=>(da(e,(o,i)=>{r&&fr(o)?Object.defineProperty(t,i,{__proto__:null,value:la(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),DD=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),MD=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},FD=(t,e,r,n)=>{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],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Ci(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},UD=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},qD=t=>{if(!t)return null;if(Do(t))return t;let e=t.length;if(!I0(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ZD=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ci(Uint8Array)),BD=(t,e)=>{let n=(t&&t[pa]).call(t),o;for(;(o=n.next())&&!o.done;){let i=o.value;e.call(t,i[0],i[1])}},HD=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},VD=Zr("HTMLFormElement"),GD=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),{propertyIsEnumerable:WD}=Object.prototype,KD=Zr("RegExp"),O0=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};da(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},JD=t=>{O0(t,(e,r)=>{if(fr(t)&&["arguments","caller","callee"].includes(r))return!1;let n=t[r];if(fr(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},YD=(t,e)=>{let r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Do(t)?n(t):n(String(t).split(e)),r},XD=()=>{},QD=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function eM(t){return!!(t&&fr(t.append)&&t[R0]==="FormData"&&t[pa])}var tM=t=>{let e=new WeakSet,r=n=>{if(Ni(n)){if(e.has(n))return;if(zi(n))return n;if(!("toJSON"in n)){e.add(n);let o=Do(n)?[]:{};return da(n,(i,s)=>{let a=r(i);!Oi(a)&&(o[s]=a)}),e.delete(n),o}}return n};return r(t)},rM=Zr("AsyncFunction"),nM=t=>t&&(Ni(t)||fr(t))&&fr(t.then)&&fr(t.catch),z0=((t,e)=>t?setImmediate:e?((r,n)=>(jo.addEventListener("message",({source:o,data:i})=>{o===jo&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),jo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",fr(jo.postMessage)),oM=typeof queueMicrotask<"u"?queueMicrotask.bind(jo):typeof process<"u"&&process.nextTick||z0,N0=t=>t!=null&&fr(t[pa]),iM=t=>t!=null&&ua(t,pa)&&N0(t),_={isArray:Do,isArrayBuffer:A0,isBuffer:zi,isFormData:ID,isArrayBufferView:xD,isString:vD,isNumber:I0,isBoolean:bD,isObject:Ni,isPlainObject:Rl,isEmptyObject:_D,isReadableStream:CD,isRequest:OD,isResponse:zD,isHeaders:ND,isUndefined:Oi,isDate:wD,isFile:SD,isReactNativeBlob:kD,isReactNative:TD,isBlob:ED,isRegExp:KD,isFunction:fr,isStream:RD,isURLSearchParams:PD,isTypedArray:ZD,isFileList:$D,forEach:da,merge:ah,extend:jD,trim:LD,stripBOM:DD,inherits:MD,toFlatObject:FD,kindOf:ch,kindOfTest:Zr,endsWith:UD,toArray:qD,forEachEntry:BD,matchAll:HD,isHTMLForm:VD,hasOwnProperty:Al,hasOwnProp:Al,hasOwnInPrototypeChain:ua,getSafeProp:yD,reduceDescriptors:O0,freezeMethods:JD,toObjectSet:YD,toCamelCase:GD,noop:XD,toFiniteNumber:QD,findKey:P0,global:jo,isContextDefined:C0,isSpecCompliantForm:eM,toJSONObject:tM,isAsyncFn:rM,isThenable:nM,setImmediate:z0,asap:oM,isIterable:N0,isSafeIterable:iM};var sM=_.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"]),L0=t=>{let e={},r,n,o;return t&&t.split(`
|
|
56
|
+
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&sM[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};function aM(t){let e=0,r=t.length;for(;e<r;){let n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;r>e;){let n=t.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}var cM=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),lM=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function lh(t,e){return _.isArray(t)?t.map(r=>lh(r,e)):aM(String(t).replace(e,""))}var j0=t=>lh(t,cM),uM=t=>lh(t,lM);function Li(t){let e=Object.create(null);return _.forEach(t.toJSON(),(r,n)=>{e[n]=uM(r)}),e}var D0=Symbol("internals");function fa(t){return t&&String(t).trim().toLowerCase()}function Pl(t){return t===!1||t==null?t:_.isArray(t)?t.map(Pl):j0(String(t))}function pM(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var dM=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function uh(t,e,r,n,o){if(_.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!_.isString(e)){if(_.isString(n))return e.indexOf(n)!==-1;if(_.isRegExp(n))return n.test(e)}}function fM(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function mM(t,e){let r=_.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{__proto__:null,value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}var ji=class{constructor(e){e&&this.set(e)}set(e,r,n){let o=this;function i(a,c,l){let p=fa(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]=Pl(a))}let s=(a,c)=>_.forEach(a,(l,p)=>i(l,p,c));if(_.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(_.isString(e)&&(e=e.trim())&&!dM(e))s(L0(e),r);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,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=fa(e),e){let n=_.findKey(this,e);if(n){let o=this[n];if(!r)return o;if(r===!0)return pM(o);if(_.isFunction(r))return r.call(this,o,n);if(_.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=fa(e),e){let n=_.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||uh(this,this[n],n,r)))}return!1}delete(e,r){let n=this,o=!1;function i(s){if(s=fa(s),s){let a=_.findKey(n,s);a&&(!r||uh(n,n[a],a,r))&&(delete n[a],o=!0)}}return _.isArray(e)?e.forEach(i):i(e),o}clear(e){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let i=r[n];(!e||uh(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){let r=this,n={};return _.forEach(this,(o,i)=>{let s=_.findKey(n,i);if(s){r[s]=Pl(o),delete r[i];return}let a=e?fM(i):String(i).trim();a!==i&&delete r[i],r[a]=Pl(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return _.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&_.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
57
|
+
`)}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[D0]=this[D0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=fa(s);n[a]||(mM(o,s),n[a]=!0)}return _.isArray(e)?e.forEach(i):i(e),this}};ji.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(ji.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});_.freezeMethods(ji);var st=ji;var hM="[REDACTED ****]";function gM(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 yM(t,e){let r=new Set(e.map(i=>String(i).toLowerCase())),n=[],o=i=>{if(i===null||typeof i!="object"||_.isBuffer(i))return i;if(n.indexOf(i)!==-1)return;i instanceof st&&(i=i.toJSON()),n.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)&&gM(i))return n.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=r.has(a.toLowerCase())?hM:o(c);_.isUndefined(l)||(s[a]=l)}}return n.pop(),s};return o(t)}var qt=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&&_.hasOwnProp(e,"redact")?e.redact:void 0,n=_.isArray(r)&&r.length>0?yM(e,r):_.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}}};qt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";qt.ERR_BAD_OPTION="ERR_BAD_OPTION";qt.ECONNABORTED="ECONNABORTED";qt.ETIMEDOUT="ETIMEDOUT";qt.ECONNREFUSED="ECONNREFUSED";qt.ERR_NETWORK="ERR_NETWORK";qt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";qt.ERR_DEPRECATED="ERR_DEPRECATED";qt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";qt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";qt.ERR_CANCELED="ERR_CANCELED";qt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";qt.ERR_INVALID_URL="ERR_INVALID_URL";qt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var C=qt;var Zk=Ee(qk(),1),ql=Zk.default;var Ch=100;function Ph(t){return _.isPlainObject(t)||_.isArray(t)}function Bk(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function Ih(t,e,r){return t?t.concat(e).map(function(o,i){return o=Bk(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function rF(t){return _.isArray(t)&&!t.some(Ph)}var nF=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function oF(t,e,r){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new(ql||FormData),r=_.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!_.isUndefined(w[b])});let n=r.metaTokens,o=r.visitor||g,i=r.dots,s=r.indexes,a=r.Blob||typeof Blob<"u"&&Blob,c=r.maxDepth===void 0?Ch:r.maxDepth,l=a&&_.isSpecCompliantForm(e),p=[];if(!_.isFunction(o))throw new TypeError("visitor must be a function");function d(y){if(y===null)return"";if(_.isDate(y))return y.toISOString();if(_.isBoolean(y))return y.toString();if(!l&&_.isBlob(y))throw new C("Blob is not supported. Use a Buffer instead.");if(_.isArrayBuffer(y)||_.isTypedArray(y)){if(l&&typeof a=="function")return new a([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new C("Blob is not supported. Use a Buffer instead.",C.ERR_NOT_SUPPORT)}return y}function f(y){if(y>c)throw new C("Object is too deeply nested ("+y+" levels). Max depth: "+c,C.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(y,b){if(c===1/0)return JSON.stringify(y);let w=[];return JSON.stringify(y,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 g(y,b,w){let k=y;if(_.isReactNative(e)&&_.isReactNativeBlob(y))return e.append(Ih(w,b,i),d(y)),!1;if(y&&!w&&typeof y=="object"){if(_.endsWith(b,"{}"))b=n?b:b.slice(0,-2),y=m(y,1);else if(_.isArray(y)&&rF(y)||(_.isFileList(y)||_.endsWith(b,"[]"))&&(k=_.toArray(y)))return b=Bk(b),k.forEach(function(F,L){!(_.isUndefined(F)||F===null)&&e.append(s===!0?Ih([b],L,i):s===null?b:b+"[]",d(F))}),!1}return Ph(y)?!0:(e.append(Ih(w,b,i),d(y)),!1)}let x=Object.assign(nF,{defaultVisitor:g,convertValue:d,isVisitable:Ph});function v(y,b,w=0){if(!_.isUndefined(y)){if(f(w),p.indexOf(y)!==-1)throw new Error("Circular reference detected in "+b.join("."));p.push(y),_.forEach(y,function(E,F){(!(_.isUndefined(E)||E===null)&&o.call(e,E,_.isString(F)?F.trim():F,b,x))===!0&&v(E,b?b.concat(F):[F],w+1)}),p.pop()}}if(!_.isObject(t))throw new TypeError("data must be an object");return v(t),e}var Wn=oF;function Hk(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(n){return e[n]})}function Vk(t,e){this._pairs=[],t&&Wn(t,this,e)}var Gk=Vk.prototype;Gk.append=function(e,r){this._pairs.push([e,r])};Gk.toString=function(e){let r=e?n=>e.call(this,n,Hk):Hk;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var Wk=Vk;function iF(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fo(t,e,r){if(!e)return t;t=t||"";let n=_.isFunction(r)?{serialize:r}:r,o=_.getSafeProp(n,"encode")||iF,i=_.getSafeProp(n,"serialize"),s;if(i?s=i(e,n):s=_.isURLSearchParams(e)?e.toString():new Wk(e,n).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Oh=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){_.forEach(this.handlers,function(n){n!==null&&e(n)})}},zh=Oh;var Kn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var Xk=Ee(require("crypto"),1);var Kk=Ee(require("url"),1),Jk=Kk.default.URLSearchParams;var Nh="abcdefghijklmnopqrstuvwxyz",Yk="0123456789",Qk={DIGIT:Yk,ALPHA:Nh,ALPHA_DIGIT:Nh+Nh.toUpperCase()+Yk},sF=(t=16,e=Qk.ALPHA_DIGIT)=>{let r="",{length:n}=e,o=new Uint32Array(t);Xk.default.randomFillSync(o);for(let i=0;i<t;i++)r+=e[o[i]%n];return r},eT={isNode:!0,classes:{URLSearchParams:Jk,FormData:ql,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Qk,generateString:sF,protocols:["http","https","file","data"]};var Dh={};Ma(Dh,{hasBrowserEnv:()=>jh,hasStandardBrowserEnv:()=>aF,hasStandardBrowserWebWorkerEnv:()=>cF,navigator:()=>Lh,origin:()=>lF});var jh=typeof window<"u"&&typeof document<"u",Lh=typeof navigator=="object"&&navigator||void 0,aF=jh&&(!Lh||["ReactNative","NativeScript","NS"].indexOf(Lh.product)<0),cF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lF=jh&&window.location.href||"http://localhost";var Be={...Dh,...eT};function Mh(t,e){return Wn(t,new Be.classes.URLSearchParams,{visitor:function(r,n,o,i){return Be.isNode&&_.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}var tT=Ch;function rT(t){if(t>tT)throw new C("FormData field is too deeply nested ("+t+" levels). Max depth: "+tT,C.ERR_FORM_DATA_DEPTH_EXCEEDED)}function uF(t){let e=[],r=/\w+|\[(\w*)]/g,n;for(;(n=r.exec(t))!==null;)rT(e.length),e.push(n[0]==="[]"?"":n[1]||n[0]);return e}function pF(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 dF(t){function e(r,n,o,i){rT(i);let s=r[i++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=i>=r.length;return s=!s&&_.isArray(o)?o.length:s,c?(_.hasOwnProp(o,s)?o[s]=_.isArray(o[s])?o[s].concat(n):[o[s],n]:o[s]=n,!a):((!_.hasOwnProp(o,s)||!_.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&_.isArray(o[s])&&(o[s]=pF(o[s])),!a)}if(_.isFormData(t)&&_.isFunction(t.entries)){let r={};return _.forEachEntry(t,(n,o)=>{e(uF(n),o,r,0)}),r}return null}var Zl=dF;var qi=(t,e)=>t!=null&&_.hasOwnProp(t,e)?t[e]:void 0;function fF(t,e,r){if(_.isString(t))try{return(e||JSON.parse)(t),_.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Fh={transitional:Kn,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=_.isObject(e);if(i&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return o?JSON.stringify(Zl(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 r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){let c=qi(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Mh(e,c).toString();if((a=_.isFileList(e))||n.indexOf("multipart/form-data")>-1){let l=qi(this,"env"),p=l&&l.FormData;return Wn(a?{"files[]":e}:e,p&&new p,c)}}return i||o?(r.setContentType("application/json",!1),fF(e)):e}],transformResponse:[function(e){let r=qi(this,"transitional")||Fh.transitional,n=r&&r.forcedJSONParsing,o=qi(this,"responseType"),i=o==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(n&&!o||i)){let a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,qi(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?C.from(c,C.ERR_BAD_RESPONSE,this,null,qi(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=>{Fh.headers[t]={}});var Zi=Fh;function xa(t,e){let r=this||Zi,n=e||r,o=st.from(n.headers),i=n.data;return _.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function va(t){return!!(t&&t.__CANCEL__)}var Uh=class extends C{constructor(e,r,n){super(e??"canceled",C.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},br=Uh;function on(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new C("Request failed with status code "+r.status,r.status>=400&&r.status<500?C.ERR_BAD_REQUEST:C.ERR_BAD_RESPONSE,r.config,r.request,r))}function qh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Zh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var mF=/^https?:(?!\/\/)/i,hF=/[\t\n\r]/g;function gF(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function yF(t){return gF(t).replace(hF,"")}function nT(t,e){if(typeof t=="string"&&mF.test(yF(t)))throw new C('Invalid URL: missing "//" after protocol',C.ERR_INVALID_URL,e)}function Uo(t,e,r,n){nT(e,n);let o=!qh(e);return t&&(o||r===!1)?(nT(t,n),Zh(t,e)):e}var xF={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function vF(t){try{return new URL(t)}catch{return null}}function oT(t){var e=(typeof t=="string"?vF(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)||xF[r]||0,!bF(n,o)))return"";var i=Bh(r+"_proxy")||Bh("all_proxy");return i&&i.indexOf("://")===-1&&(i=r+"://"+i),i}function bF(t,e){var r=Bh("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 Bh(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var kg=Ee(TT(),1),Tg=Ee(require("http"),1),Eg=Ee(require("https"),1),nE=Ee(require("http2"),1),oE=Ee(require("util"),1),Sg=require("path"),iE=Ee(CT(),1),_r=Ee(require("zlib"),1);var kn="1.18.1";function Ra(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var wU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function mg(t,e,r){let n=r&&r.Blob||Be.classes.Blob,o=Ra(t);if(e===void 0&&n&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=wU.exec(t);if(!i)throw new C("Invalid URL",C.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 C("Blob is not supported",C.ERR_NOT_SUPPORT);return new n([d],{type:p})}return d}throw new C("Unsupported protocol "+o,C.ERR_NOT_SUPPORT)}var Cr=Ee(require("stream"),1);var OT=Ee(require("stream"),1);var hg=Symbol("internals"),gg=class extends OT.default.Transform{constructor(e){e=_.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,o)=>!_.isUndefined(o[n])),super({readableHighWaterMark:e.chunkSize});let r=this[hg]={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[hg];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let o=this[hg],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,g)=>{let x=Buffer.byteLength(m);o.bytesSeen+=x,o.bytes+=x,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(m)?process.nextTick(g):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(g)}},f=(m,g)=>{let x=Buffer.byteLength(m),v=null,y=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(()=>{g(null,m)},a-w);b<y&&(y=b)}y&&x>y&&x-y>p&&(v=m.subarray(y),m=m.subarray(0,y)),d(m,v?()=>{process.nextTick(g,null,v)}:g)};f(e,function m(g,x){if(g)return n(g);x?f(x,m):n(null)})}},yg=gg;var sE=require("events");var NT=Ee(require("util"),1),LT=require("stream");var{asyncIterator:zT}=Symbol,SU=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[zT]?yield*t[zT]():yield t},Kl=SU;var kU=Be.ALPHABET.ALPHA_DIGIT+"-_",Aa=typeof TextEncoder=="function"?new TextEncoder:new NT.default.TextEncoder,Go=`\r
|
|
58
|
+
`,TU=Aa.encode(Go),EU=2,xg=class{constructor(e,r){let{escapeName:n}=this.constructor,o=_.isString(r),i=`Content-Disposition: form-data; name="${n(e)}"${!o&&r.name?`; filename="${n(r.name)}"`:""}${Go}`;if(o)r=Aa.encode(String(r).replace(/\r?\n|\r\n?/g,Go));else{let s=String(r.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${s}${Go}`}this.headers=Aa.encode(i+Go),this.contentLength=o?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+EU,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;_.isTypedArray(e)?yield e:yield*Kl(e),yield TU}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},$U=(t,e,r)=>{let{tag:n="form-data-boundary",size:o=25,boundary:i=n+"-"+Be.generateString(o,kU)}=r||{};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=Aa.encode("--"+i+Go),a=Aa.encode("--"+i+"--"+Go),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let m=new xg(d,f);return c+=m.size,m});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),LT.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},jT=$U;var DT=Ee(require("stream"),1),vg=class extends DT.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)}},MT=vg;var FT=Ee(require("http2"),1),UT=Ee(require("util"),1),bg=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,g]=n[f];if(!m.destroyed&&!m.closed&&UT.default.isDeepStrictEqual(g,r))return m}}let o=FT.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}},qT=bg;var RU=(t,e)=>_.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,ZT=RU;var AU=new Set(["localhost","0.0.0.0"]),VT=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)},_g=t=>/^0{1,4}$/.test(t),IU=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(_g)&&s.every(_g)}let r=t.split(":");return r.length===8&&r.every(_g)},PU=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return VT(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},BT=t=>t?AU.has(t)||VT(t)||IU(t)?!0:PU(t):!1,CU={http:80,https:443,ws:80,wss:443,ftp:21},OU=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]},zU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,NU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,LU=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(zU);if(e)return e[1];let r=t.match(NU);if(r){let n=parseInt(r[1],16),o=parseInt(r[2],16);return`${n>>8}.${n&255}.${o>>8}.${o&255}`}return t},HT=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),LU(t.replace(/\.+$/,"")));function wg(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)||CU[e.protocol.split(":",1)[0]]||0,o=HT(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=OU(i);return s=HT(s),!s||a&&a!==n?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||BT(o)&&BT(s))})}function jU(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 GT=jU;function DU(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 WT=DU;var Tn=(t,e,r=3)=>{let n=0,o=GT(50,250);return WT(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)},Wi=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ki=t=>(...e)=>_.asap(()=>t(...e));var Jl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,MU=(t,e,r)=>e+2<r&&Jl(t.charCodeAt(e+1))&&Jl(t.charCodeAt(e+2));function Ia(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 g=n.charCodeAt(m+1),x=n.charCodeAt(m+2);Jl(g)&&Jl(x)&&(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&&MU(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 KT={flush:_r.default.constants.Z_SYNC_FLUSH,finishFlush:_r.default.constants.Z_SYNC_FLUSH},FU={flush:_r.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:_r.default.constants.BROTLI_OPERATION_FLUSH},UU={flush:_r.default.constants.ZSTD_e_flush,finishFlush:_r.default.constants.ZSTD_e_flush},aE=_.isFunction(_r.default.createBrotliDecompress),cE=_.isFunction(_r.default.createZstdDecompress),lE="gzip, compress, deflate"+(aE?", br":""),qU=lE+(cE?", zstd":""),{http:ZU,https:BU}=iE.default,$g=/https:?/,HU=["content-type","content-length"];function VU(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([n,o])=>{HU.includes(n.toLowerCase())&&t.set(n,o)})}var JT=Symbol("axios.http.socketListener"),Yl=Symbol("axios.http.currentReq"),uE=Symbol("axios.http.installedTunnel"),GU=new Map,YT=new WeakMap,XT={22:21,24:5};function WU(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:XT[e]!=null&&r>=XT[e]}function KU(t,e=process.versions&&process.versions.node){if(!WU(e))return!1;let r=t&&t.options;return!!(r&&_.hasOwnProp(r,"proxyEnv")&&r.proxyEnv!=null)}function JU(t,e,r){return $g.test(t.protocol)?r||Eg.default.globalAgent:e||Tg.default.globalAgent}function YU(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),n=e?YT.get(e)||YT.set(e,new Map).get(e):GU,o=n.get(r);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new kg.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[uE]=!0,n.set(r,o),o}var QT=Be.protocols.map(t=>t+":"),eE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},tE=(t,[e,r])=>(t.on("end",r).on("error",r),e),XU=new qT;function QU(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 eq(t,e){t&&Object.keys(t).forEach(r=>{e.has(r.toLowerCase())&&delete t[r]})}function tq(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function pE(t,e,r,n,o,i){let s=e,a=JU(t,i,o);if(!s&&s!==!1&&!KU(a)){let c=oT(r);c&&(wg(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[uE]&&(t.agent=void 0),s){let c=s instanceof URL,l=g=>c||_.hasOwnProp(s,g)?s[g]:void 0,p=l("username"),d=l("password"),f=_.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(f=(p||"")+":"+(d||"")),f){let g=typeof f=="object",x=g&&_.hasOwnProp(f,"username")?f.username:void 0,v=g&&_.hasOwnProp(f,"password")?f.password:void 0;if(!!(x||v))f=(x||"")+":"+(v||"");else if(g)throw new C("Invalid proxy authorization",C.ERR_BAD_OPTION,{proxy:s})}if($g.test(t.protocol)){if(!(o instanceof kg.default)){let g=l("hostname")||l("host"),x=l("port"),v=l("protocol"),y=v?v.includes(":")?v:`${v}:`:"http:",b=g&&g.includes(":")&&!g.startsWith("[")?`[${g}]`:g,w=new URL(`${y}//${b}${x?":"+x:""}`),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=YU(k,o);t.agent=E,t.agents&&(t.agents.https=E)}}else{if(f){let y=Buffer.from(f,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+y}let g=!1;for(let y of Object.keys(t.headers))if(y.toLowerCase()==="host"){g=!0;break}g||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let x=l("hostname")||l("host");t.hostname=x,t.host=x,t.port=l("port"),t.path=r;let v=l("protocol");v&&(t.protocol=v.includes(":")?v:`${v}:`)}}t.beforeRedirects.proxy=function(l){pE(l,e,l.href,!0,o,i)}}var rq=typeof process<"u"&&_.kindOf(process)==="process",nq=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)}),oq=({address:t,family:e})=>{if(!_.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},rE=(t,e)=>oq(_.isObject(t)?t:{address:t,family:e}),iq={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:o}=t,i=XU.getSession(r,n),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=nE.default.constants,p={[s]:t.protocol.replace(":",""),[a]:t.method,[c]:t.path};_.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 g=f[l];delete f[l],m.headers=f,m.statusCode=+g,e(m)}),d}},dE=rq&&function(e){return nq(async function(n,o,i){let s=K=>_.getSafeProp(e,K),a=s("transitional")||Kn,c=s("data"),l=s("lookup"),p=s("family"),d=s("httpVersion");d===void 0&&(d=1);let f=s("http2Options"),m=s("httpAgent"),g=s("httpsAgent"),x=s("proxy"),v=s("responseType"),y=s("responseEncoding"),b=s("socketPath"),w=s("method").toUpperCase(),k=s("maxRedirects"),E=s("maxBodyLength"),F=s("maxContentLength"),L=s("decompress"),pe,me=!1,ee,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 K=ZT(l,W=>_.isArray(W)?W:[W]);l=(W,be,We)=>{K(W,be,(ye,Ke,St)=>{if(ye)return We(ye);let tt=_.isArray(Ke)?Ke.map(Or=>rE(Or)):[rE(Ke,St)];be.all?We(ye,tt):We(ye,tt[0].address,tt[0].family)})}}let Ge=new sE.EventEmitter;function de(K){try{Ge.emit("abort",!K||K.type?new br(null,e,ee):K)}catch{}}function et(){Re&&(clearTimeout(Re),Re=null)}function H(){let K=s("timeout"),W=K?"timeout of "+K+"ms exceeded":"timeout exceeded",be=s("timeoutErrorMessage");return be&&(W=be),new C(W,a.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,ee)}Ge.once("abort",o);let It=()=>{et(),e.cancelToken&&e.cancelToken.unsubscribe(de),e.signal&&e.signal.removeEventListener("abort",de),Ge.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(de),e.signal&&(e.signal.aborted?de():e.signal.addEventListener("abort",de))),i((K,W)=>{if(pe=!0,et(),W){me=!0,It();return}let{data:be}=K;if(be instanceof Cr.default.Readable||be instanceof Cr.default.Duplex){let We=Cr.default.finished(be,()=>{We(),It()})}else It()});let Bt=Uo(s("baseURL"),s("url"),s("allowAbsoluteUrls"),e),Gr=b?"http://localhost":Be.hasBrowserEnv?Be.origin:void 0,Ce=new URL(Bt,Gr),B=Ce.protocol||QT[0];if(B==="data:"){if(F>-1){let W=String(s("url")||Bt||"");if(Ia(W)>F)return o(new C("maxContentLength size of "+F+" exceeded",C.ERR_BAD_RESPONSE,e))}let K;if(w!=="GET")return on(n,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{K=mg(s("url"),v==="blob",{Blob:e.env&&e.env.Blob})}catch(W){throw C.from(W,C.ERR_BAD_REQUEST,e)}return v==="text"?(K=K.toString(y),(!y||y==="utf8")&&(K=_.stripBOM(K))):v==="stream"&&(K=Cr.default.Readable.from(K)),on(n,o,{data:K,status:200,statusText:"OK",headers:new st,config:e})}if(QT.indexOf(B)===-1)return o(new C("Unsupported protocol "+B,C.ERR_BAD_REQUEST,e));let qe=st.from(e.headers).normalize();qe.set("User-Agent","axios/"+kn,!1);let{onUploadProgress:De,onDownloadProgress:Xt}=e,at=e.maxRate,ge,ke;if(_.isSpecCompliantForm(c)){let K=qe.getContentType(/boundary=([-_\w\d]{10,70})/i);c=jT(c,W=>{qe.set(W)},{tag:`axios-${kn}-boundary`,boundary:K&&K[1]||void 0})}else if(_.isFormData(c)&&_.isFunction(c.getHeaders)&&c.getHeaders!==Object.prototype.getHeaders){if(VU(qe,c.getHeaders(),s("formDataHeaderPolicy")),!qe.hasContentLength())try{let K=await oE.default.promisify(c.getLength).call(c);Number.isFinite(K)&&K>=0&&qe.setContentLength(K)}catch{}}else if(_.isBlob(c)||_.isFile(c))c.size&&qe.setContentType(c.type||"application/octet-stream"),qe.setContentLength(c.size||0),c=Cr.default.Readable.from(Kl(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 C("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",C.ERR_BAD_REQUEST,e));if(qe.setContentLength(c.length,!1),E>-1&&c.length>E)return o(new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,e))}let dt=_.toFiniteNumber(qe.getContentLength());_.isArray(at)?(ge=at[0],ke=at[1]):ge=ke=at,c&&(De||ge)&&(_.isStream(c)||(c=Cr.default.Readable.from(c,{objectMode:!1})),c=Cr.default.pipeline([c,new yg({maxRate:_.toFiniteNumber(ge)})],_.noop),De&&c.on("progress",tE(c,Wi(dt,Tn(Ki(De),!1,3)))));let Oe,Et=s("auth");if(Et){let K=_.getSafeProp(Et,"username")||"",W=_.getSafeProp(Et,"password")||"";Oe=K+":"+W}if(!Oe&&(Ce.username||Ce.password)){let K=eE(Ce.username),W=eE(Ce.password);Oe=K+":"+W}Oe&&qe.delete("authorization");let $t;try{$t=Fo(Ce.pathname+Ce.search,s("params"),s("paramsSerializer")).replace(/^\?/,"")}catch(K){return o(C.from(K,C.ERR_BAD_REQUEST,e,null,null,{url:s("url"),exists:!0}))}qe.set("Accept-Encoding",_.hasOwnProp(a,"advertiseZstdAcceptEncoding")&&a.advertiseZstdAcceptEncoding===!0?qU:lE,!1);let Te=Object.assign(Object.create(null),{path:$t,method:w,headers:Li(qe),agents:{http:m,https:g},auth:Oe,protocol:B,family:p,beforeRedirect:QU,beforeRedirects:Object.create(null),http2Options:f});if(!_.isUndefined(l)&&(Te.lookup=l),b){if(typeof b!="string")return o(new C("socketPath must be a string",C.ERR_BAD_OPTION_VALUE,e));let K=s("allowedSocketPaths");if(K!=null){let W=Array.isArray(K)?K:[K],be=(0,Sg.resolve)(b);if(!W.some(ye=>typeof ye=="string"&&(0,Sg.resolve)(ye)===be))return o(new C(`socketPath "${b}" is not permitted by allowedSocketPaths`,C.ERR_BAD_OPTION_VALUE,e))}Te.socketPath=b}else Te.hostname=Ce.hostname.startsWith("[")?Ce.hostname.slice(1,-1):Ce.hostname,Te.port=Ce.port,pE(Te,x,B+"//"+Ce.hostname+(Ce.port?":"+Ce.port:"")+Te.path,!1,g,m);let Ht,wr=!1,Nt=!1,ue=$g.test(Te.protocol);if(Te.agent==null&&(Te.agent=ue?g:m),bt)Ht=iq;else{let K=s("transport");if(K)Ht=K;else if(k===0)Ht=ue?Eg.default:Tg.default,wr=!0;else{Nt=!0,Te.sensitiveHeaders=[],k&&(Te.maxRedirects=k);let W=s("beforeRedirect");if(W&&(Te.beforeRedirects.config=W),Oe){let We=Ce.origin,ye=Oe;Te.beforeRedirects.auth=function(St){try{new URL(St.href).origin===We&&(St.auth=ye)}catch{}}}let be=s("sensitiveHeaders");if(be!=null){if(!_.isArray(be))return o(new C("sensitiveHeaders must be an array of strings",C.ERR_BAD_OPTION_VALUE,e));let We=new Set;for(let ye of be){if(!_.isString(ye))return o(new C("sensitiveHeaders must be an array of strings",C.ERR_BAD_OPTION_VALUE,e));We.add(ye.toLowerCase())}We.size&&(Te.sensitiveHeaders=Array.from(We),Te.beforeRedirects.sensitiveHeaders=function(Ke,St){tq(Ke,St)||eq(Ke.headers,We)})}Ht=ue?BU:ZU}}E>-1?Te.maxBodyLength=E:Te.maxBodyLength=1/0,Te.insecureHTTPParser=!!s("insecureHTTPParser"),ee=Ht.request(Te,function(W){if(et(),ee.destroyed)return;let be=[W],We=_.toFiniteNumber(W.headers["content-length"]);if(Xt||ke){let tt=new yg({maxRate:_.toFiniteNumber(ke)});Xt&&tt.on("progress",tE(tt,Wi(We,Tn(Ki(Xt),!0,3)))),be.push(tt)}let ye=W,Ke=W.req||ee;if(L!==!1&&W.headers["content-encoding"])switch((w==="HEAD"||W.statusCode===204)&&delete W.headers["content-encoding"],(W.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":be.push(_r.default.createUnzip(KT)),delete W.headers["content-encoding"];break;case"deflate":be.push(new MT),be.push(_r.default.createUnzip(KT)),delete W.headers["content-encoding"];break;case"br":aE&&(be.push(_r.default.createBrotliDecompress(FU)),delete W.headers["content-encoding"]);break;case"zstd":cE&&(be.push(_r.default.createZstdDecompress(UU)),delete W.headers["content-encoding"]);break}ye=be.length>1?Cr.default.pipeline(be,_.noop):be[0];let St={status:W.statusCode,statusText:W.statusMessage,headers:new st(W.headers),config:e,request:Ke};if(v==="stream"){if(F>-1){let tt=F,Or=ye;async function*mn(){let u=0;for await(let S of Or){if(u+=S.length,u>tt)throw new C("maxContentLength size of "+tt+" exceeded",C.ERR_BAD_RESPONSE,e,Ke);yield S}}ye=Cr.default.Readable.from(mn(),{objectMode:!1})}St.data=ye,on(n,o,St)}else{let tt=[],Or=0;ye.on("data",function(u){tt.push(u),Or+=u.length,F>-1&&Or>F&&(me=!0,ye.destroy(),de(new C("maxContentLength size of "+F+" exceeded",C.ERR_BAD_RESPONSE,e,Ke)))}),ye.on("aborted",function(){if(me)return;let u=new C("stream has been aborted",C.ERR_BAD_RESPONSE,e,Ke,St);ye.destroy(u),o(u)}),ye.on("error",function(u){me||o(C.from(u,null,e,Ke,St))}),ye.on("end",function(){try{let u=tt.length===1?tt[0]:Buffer.concat(tt);v!=="arraybuffer"&&(u=u.toString(y),(!y||y==="utf8")&&(u=_.stripBOM(u))),St.data=u}catch(u){return o(C.from(u,null,e,St.request,St))}on(n,o,St)})}Ge.once("abort",tt=>{ye.destroyed||(ye.emit("error",tt),ye.destroy())})}),Ge.once("abort",K=>{ee.close?ee.close():ee.destroy(K)}),ee.on("error",function(W){o(C.from(W,null,e,ee))});let Xe=new Set;if(ee.on("socket",function(W){typeof W.setKeepAlive=="function"&&W.setKeepAlive(!0,1e3*60),W[JT]||(W.on("error",function(We){let ye=W[Yl];ye&&!ye.destroyed&&ye.destroy(We)}),W[JT]=!0),W[Yl]=ee,Xe.add(W)}),ee.once("close",function(){et();for(let W of Xe)W[Yl]===ee&&(W[Yl]=null);Xe.clear()}),s("timeout")){let K=parseInt(s("timeout"),10);if(Number.isNaN(K)){de(new C("error trying to parse `config.timeout` to int",C.ERR_BAD_OPTION_VALUE,e,ee));return}let W=function(){pe||de(H())};wr&&K>0&&(Re=setTimeout(W,K)),ee.setTimeout(K,W)}else ee.setTimeout(0);if(_.isStream(c)){let K=!1,W=!1;c.on("end",()=>{K=!0}),c.once("error",We=>{W=!0,ee.destroy(We)}),c.on("close",()=>{!K&&!W&&de(new br("Request stream has been aborted",e,ee))});let be=c;if(E>-1&&!Nt){let We=E,ye=0;be=Cr.default.pipeline([c,new Cr.default.Transform({transform(Ke,St,tt){if(ye+=Ke.length,ye>We)return tt(new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,e,ee));tt(null,Ke)}})],_.noop),be.on("error",Ke=>{ee.destroyed||ee.destroy(Ke)})}be.pipe(ee)}else c&&ee.write(c),ee.end()})};var fE=Be.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Be.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0;var mE=Be.hasStandardBrowserEnv?{write(t,e,r,n,o,i,s){if(typeof document>"u")return;let a=[`${t}=${encodeURIComponent(e)}`];_.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),_.isString(n)&&a.push(`path=${n}`),_.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 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 hE=t=>t instanceof st?{...t}:t;function Hr(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 _.isPlainObject(p)&&_.isPlainObject(d)?_.merge.call({caseless:m},p,d):_.isPlainObject(d)?_.merge({},d):_.isArray(d)?d.slice():d}function o(p,d,f,m){if(_.isUndefined(d)){if(!_.isUndefined(p))return n(void 0,p,f,m)}else return n(p,d,f,m)}function i(p,d){if(!_.isUndefined(d))return n(void 0,d)}function s(p,d){if(_.isUndefined(d)){if(!_.isUndefined(p))return n(void 0,p)}else return n(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 n(p,d);if(_.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(hE(p),hE(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,m=_.hasOwnProp(t,d)?t[d]:void 0,g=_.hasOwnProp(e,d)?e[d]:void 0,x=f(m,g,d);_.isUndefined(x)&&f!==c||(r[d]=x)}),_.hasOwnProp(e,"validateStatus")&&_.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(_.hasOwnProp(t,"validateStatus")?r.validateStatus=n(void 0,t.validateStatus):delete r.validateStatus),r}var sq=["content-type","content-length"];function aq(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([n,o])=>{sq.includes(n.toLowerCase())&&t.set(n,o)})}var cq=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function lq(t){let e=Hr({},t),r=f=>_.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=st.from(a),e.url=Fo(Uo(l,d,p,e),r("params"),r("paramsSerializer")),c){let f=_.getSafeProp(c,"username")||"",m=_.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(m?cq(m):"")))}catch(g){throw C.from(g,C.ERR_BAD_OPTION_VALUE,t)}}if(_.isFormData(n)&&(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv||_.isReactNative(n)?a.setContentType(void 0):_.isFunction(n.getHeaders)&&aq(a,n.getHeaders(),r("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(_.isFunction(o)&&(o=o(e)),o===!0||o==null&&fE(e.url))){let m=i&&s&&mE.read(s);m&&a.set(i,m)}return e}var Xl=lq;var uq=typeof XMLHttpRequest<"u",gE=uq&&function(t){return new Promise(function(r,n){let o=Xl(t),i=o.data,s=st.from(o.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,p,d,f,m,g;function x(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function y(){if(!v)return;let w=st.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:w,config:t,request:v};on(function(L){r(L),x()},function(L){n(L),x()},E),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(y)},v.onabort=function(){v&&(n(new C("Request aborted",C.ECONNABORTED,t,v)),x(),v=null)},v.onerror=function(k){let E=k&&k.message?k.message:"Network Error",F=new C(E,C.ERR_NETWORK,t,v);F.event=k||null,n(F),x(),v=null},v.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",E=o.transitional||Kn;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),n(new C(k,E.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,t,v)),x(),v=null},i===void 0&&s.setContentType(null),"setRequestHeader"in v&&_.forEach(Li(s),function(k,E){v.setRequestHeader(E,k)}),_.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),a&&a!=="json"&&(v.responseType=o.responseType),l&&([f,g]=Tn(l,!0),v.addEventListener("progress",f)),c&&v.upload&&([d,m]=Tn(c),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(p=w=>{v&&(n(!w||w.type?new br(null,t,v):w),v.abort(),x(),v=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));let b=Ra(o.url);if(b&&!Be.protocols.includes(b)){n(new C("Unsupported protocol "+b+":",C.ERR_BAD_REQUEST,t)),x();return}v.send(i||null)})};var pq=(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 C?l:new br(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,o(new C(`timeout of ${e}ms exceeded`,C.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=()=>_.asap(s),a},yE=pq;var dq=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},fq=async function*(t,e){for await(let r of mq(t))yield*dq(r,e)},mq=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()}},Rg=(t,e,r,n)=>{let o=fq(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 xE=64*1024,{isFunction:Ql}=_,hq=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),vE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},bE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},gq=t=>{let e=t.indexOf("://"),r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},yq=t=>{let e=_.global!==void 0&&_.global!==null?_.global:globalThis,{ReadableStream:r,TextEncoder:n}=e;t=_.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"?(y=>b=>y.encode(b))(new n):async y=>new Uint8Array(await new i(y).arrayBuffer())),f=c&&p&&bE(()=>{let y=!1,b=new i(Be.origin,{body:new r,method:"POST",get duplex(){return y=!0,"half"}}),w=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),y&&!w}),m=l&&p&&bE(()=>_.isReadableStream(new s("").body)),g={stream:m&&(y=>y.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!g[y]&&(g[y]=(b,w)=>{let k=b&&b[y];if(k)return k.call(b);throw new C(`Response type '${y}' is not supported`,C.ERR_NOT_SUPPORT,w)})});let x=async y=>{if(y==null)return 0;if(_.isBlob(y))return y.size;if(_.isSpecCompliantForm(y))return(await new i(Be.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(_.isArrayBufferView(y)||_.isArrayBuffer(y))return y.byteLength;if(_.isURLSearchParams(y)&&(y=y+""),_.isString(y))return(await d(y)).byteLength},v=async(y,b)=>{let w=_.toFiniteNumber(y.getContentLength());return w??x(b)};return async y=>{let{url:b,method:w,data:k,signal:E,cancelToken:F,timeout:L,onDownloadProgress:pe,onUploadProgress:me,responseType:ee,headers:Re,withCredentials:bt="same-origin",fetchOptions:Ge,maxContentLength:de,maxBodyLength:et}=Xl(y),H=_.isNumber(de)&&de>-1,It=_.isNumber(et)&&et>-1,Bt=ge=>_.hasOwnProp(y,ge)?y[ge]:void 0,Gr=o||fetch;ee=ee?(ee+"").toLowerCase():"text";let Ce=yE([E,F&&F.toAbortSignal()],L),B=null,qe=Ce&&Ce.unsubscribe&&(()=>{Ce.unsubscribe()}),De,Xt=null,at=()=>new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,y,B);try{let ge,ke=Bt("auth");if(ke){let ue=_.getSafeProp(ke,"username")||"",Xe=_.getSafeProp(ke,"password")||"";ge={username:ue,password:Xe}}if(gq(b)){let ue=new URL(b,Be.origin);if(!ge&&(ue.username||ue.password)){let Xe=vE(ue.username),K=vE(ue.password);ge={username:Xe,password:K}}(ue.username||ue.password)&&(ue.username="",ue.password="",b=ue.href)}if(ge&&(Re.delete("authorization"),Re.set("Authorization","Basic "+btoa(hq((ge.username||"")+":"+(ge.password||""))))),H&&typeof b=="string"&&b.startsWith("data:")&&Ia(b)>de)throw new C("maxContentLength size of "+de+" exceeded",C.ERR_BAD_RESPONSE,y,B);if(It&&w!=="get"&&w!=="head"){let ue=await x(k);if(typeof ue=="number"&&isFinite(ue)&&(De=ue,ue>et))throw at()}let dt=It&&(_.isReadableStream(k)||_.isStream(k)),Oe=(ue,Xe,K)=>Rg(ue,xE,W=>{if(It&&W>et)throw Xt=at();Xe&&Xe(W)},K);if(f&&w!=="get"&&w!=="head"&&(me||dt)){if(De=De??await v(Re,k),De!==0||dt){let ue=new i(b,{method:"POST",body:k,duplex:"half"}),Xe;if(_.isFormData(k)&&(Xe=ue.headers.get("content-type"))&&Re.setContentType(Xe),ue.body){let[K,W]=me&&Wi(De,Tn(Ki(me)))||[];k=Oe(ue.body,K,W)}}}else if(dt&&!c&&p&&w!=="get"&&w!=="head")k=Oe(k);else if(dt&&c&&!f&&w!=="get"&&w!=="head")throw new C("Stream request bodies are not supported by the current fetch implementation",C.ERR_NOT_SUPPORT,y,B);_.isString(bt)||(bt=bt?"include":"omit");let Et=c&&"credentials"in i.prototype;if(_.isFormData(k)){let ue=Re.getContentType();ue&&/^multipart\/form-data/i.test(ue)&&!/boundary=/i.test(ue)&&Re.delete("content-type")}Re.set("User-Agent","axios/"+kn,!1);let $t={...Ge,signal:Ce,method:w.toUpperCase(),headers:Li(Re.normalize()),body:k,duplex:"half",credentials:Et?bt:void 0};B=c&&new i(b,$t);let Te=await(c?Gr(B,Ge):Gr(b,$t)),Ht=st.from(Te.headers);if(H){let ue=_.toFiniteNumber(Ht.getContentLength());if(ue!=null&&ue>de)throw new C("maxContentLength size of "+de+" exceeded",C.ERR_BAD_RESPONSE,y,B)}let wr=m&&(ee==="stream"||ee==="response");if(m&&Te.body&&(pe||H||wr&&qe)){let ue={};["status","statusText","headers"].forEach(ye=>{ue[ye]=Te[ye]});let Xe=_.toFiniteNumber(Ht.getContentLength()),[K,W]=pe&&Wi(Xe,Tn(Ki(pe),!0))||[],be=0,We=ye=>{if(H&&(be=ye,be>de))throw new C("maxContentLength size of "+de+" exceeded",C.ERR_BAD_RESPONSE,y,B);K&&K(ye)};Te=new s(Rg(Te.body,xE,We,()=>{W&&W(),qe&&qe()}),ue)}ee=ee||"text";let Nt=await g[_.findKey(g,ee)||"text"](Te,y);if(H&&!m&&!wr){let ue;if(Nt!=null&&(typeof Nt.byteLength=="number"?ue=Nt.byteLength:typeof Nt.size=="number"?ue=Nt.size:typeof Nt=="string"&&(ue=typeof n=="function"?new n().encode(Nt).byteLength:Nt.length)),typeof ue=="number"&&ue>de)throw new C("maxContentLength size of "+de+" exceeded",C.ERR_BAD_RESPONSE,y,B)}return!wr&&qe&&qe(),await new Promise((ue,Xe)=>{on(ue,Xe,{data:Nt,headers:st.from(Te.headers),status:Te.status,statusText:Te.statusText,config:y,request:B})})}catch(ge){if(qe&&qe(),Ce&&Ce.aborted&&Ce.reason instanceof C){let ke=Ce.reason;throw ke.config=y,B&&(ke.request=B),ge!==ke&&Object.defineProperty(ke,"cause",{__proto__:null,value:ge,writable:!0,enumerable:!1,configurable:!0}),ke}if(Xt)throw B&&!Xt.request&&(Xt.request=B),Xt;if(ge instanceof C)throw B&&!ge.request&&(ge.request=B),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){let ke=new C("Network Error",C.ERR_NETWORK,y,B,ge&&ge.response);throw Object.defineProperty(ke,"cause",{__proto__:null,value:ge.cause||ge,writable:!0,enumerable:!1,configurable:!0}),ke}throw C.from(ge,ge&&ge.code,y,B,ge&&ge.response)}}},xq=new Map,Ag=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=xq;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:yq(e)),p=l;return l},Q8=Ag();var Ig={http:dE,xhr:gE,fetch:{get:Ag}};_.forEach(Ig,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var _E=t=>`- ${t}`,bq=t=>_.isFunction(t)||t===null||t===!1;function _q(t,e){t=_.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,!bq(n)&&(o=Ig[(a=String(n)).toLowerCase()],o===void 0))throw new C(`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=r?s.length>1?`since :
|
|
59
|
+
`+s.map(_E).join(`
|
|
60
|
+
`):" "+_E(s[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+a,C.ERR_NOT_SUPPORT)}return o}var eu={getAdapter:_q,adapters:Ig};function Pg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new br(null,t)}function tu(t){return Pg(t),t.headers=st.from(t.headers),t.data=xa.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),eu.getAdapter(t.adapter||Zi.adapter,t)(t).then(function(n){Pg(t),t.response=n;try{n.data=xa.call(t,t.transformResponse,n)}finally{delete t.response}return n.headers=st.from(n.headers),n},function(n){if(!va(n)&&(Pg(t),n&&n.response)){t.response=n.response;try{n.response.data=xa.call(t,t.transformResponse,n.response)}finally{delete t.response}n.response.headers=st.from(n.response.headers)}return Promise.reject(n)})}var ru={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ru[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var wE={};ru.transitional=function(e,r,n){function o(i,s){return"[Axios v"+kn+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new C(o(s," has been removed"+(r?" in "+r:"")),C.ERR_DEPRECATED);return r&&!wE[s]&&(wE[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};ru.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function wq(t,e,r){if(typeof t!="object"||t===null)throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),o=n.length;for(;o-- >0;){let i=n[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 C("option "+i+" must be "+c,C.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new C("Unknown option "+i,C.ERR_BAD_OPTION)}}var Pa={assertOptions:wq,validators:ru};var Jt=Pa.validators,Ji=class{constructor(e){this.defaults=e||{},this.interceptors={request:new zh,response:new zh}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let i=(()=>{if(!o.stack)return"";let s=o.stack.indexOf(`
|
|
61
|
+
`);return s===-1?"":o.stack.slice(s+1)})();try{if(!n.stack)n.stack=i;else if(i){let s=i.indexOf(`
|
|
61
62
|
`),a=s===-1?-1:i.indexOf(`
|
|
62
|
-
`,s+1),c=a===-1?"":i.slice(a+1);String(
|
|
63
|
-
`+i)}}catch{}}throw
|
|
64
|
-
`).some(
|
|
63
|
+
`,s+1),c=a===-1?"":i.slice(a+1);String(n.stack).endsWith(c)||(n.stack+=`
|
|
64
|
+
`+i)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Hr(this.defaults,r);let{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Pa.assertOptions(n,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean),legacyInterceptorReqResOrdering:Jt.transitional(Jt.boolean),advertiseZstdAcceptEncoding:Jt.transitional(Jt.boolean),validateStatusUndefinedResolves:Jt.transitional(Jt.boolean)},!1),o!=null&&(_.isFunction(o)?r.paramsSerializer={serialize:o}:Pa.assertOptions(o,{encode:Jt.function,serialize:Jt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Pa.assertOptions(r,{baseUrl:Jt.spelling("baseURL"),withXsrfToken:Jt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&_.merge(i.common,i[r.method]);i&&_.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete i[g]}),r.headers=st.concat(s,i);let a=[],c=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(r)===!1)return;c=c&&x.synchronous;let v=r.transitional||Kn;v&&v.legacyInterceptorReqResOrdering?a.unshift(x.fulfilled,x.rejected):a.push(x.fulfilled,x.rejected)});let l=[];this.interceptors.response.forEach(function(x){l.push(x.fulfilled,x.rejected)});let p,d=0,f;if(!c){let g=[tu.bind(this),void 0];for(g.unshift(...a),g.push(...l),f=g.length,p=Promise.resolve(r);d<f;)p=p.then(g[d++],g[d++]);return p}f=a.length;let m=r;for(;d<f;){let g=a[d++],x=a[d++];try{m=g(m)}catch(v){x.call(this,v);break}}try{p=tu.call(this,m)}catch(g){return Promise.reject(g)}for(d=0,f=l.length;d<f;)p=p.then(l[d++],l[d++]);return p}getUri(e){e=Hr(this.defaults,e);let r=Uo(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Fo(r,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(e){Ji.prototype[e]=function(r,n){return this.request(Hr(n||{},{method:e,url:r,data:n&&_.hasOwnProp(n,"data")?n.data:void 0}))}});_.forEach(["post","put","patch","query"],function(e){function r(n){return function(i,s,a){return this.request(Hr(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Ji.prototype[e]=r(),e!=="query"&&(Ji.prototype[e+"Form"]=r(!0))});var Ca=Ji;var Cg=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i,s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new br(i,s,a),r(n.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},SE=Cg;function Og(t){return function(r){return t.apply(null,r)}}function zg(t){return _.isObject(t)&&t.isAxiosError===!0}var Ng={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(Ng).forEach(([t,e])=>{Ng[e]=t});var kE=Ng;function TE(t){let e=new Ca(t),r=la(Ca.prototype.request,e);return _.extend(r,Ca.prototype,e,{allOwnKeys:!0}),_.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return TE(Hr(t,o))},r}var Tt=TE(Zi);Tt.Axios=Ca;Tt.CanceledError=br;Tt.CancelToken=SE;Tt.isCancel=va;Tt.VERSION=kn;Tt.toFormData=Wn;Tt.AxiosError=C;Tt.Cancel=Tt.CanceledError;Tt.all=function(e){return Promise.all(e)};Tt.spread=Og;Tt.isAxiosError=zg;Tt.mergeConfig=Hr;Tt.AxiosHeaders=st;Tt.formToJSON=t=>Zl(_.isHTMLForm(t)?new FormData(t):t);Tt.getAdapter=eu.getAdapter;Tt.HttpStatusCode=kE;Tt.default=Tt;var yt=Tt;var{Axios:JK,AxiosError:YK,CanceledError:XK,isCancel:QK,CancelToken:e7,VERSION:t7,all:r7,Cancel:n7,isAxiosError:o7,spread:i7,toFormData:s7,AxiosHeaders:a7,HttpStatusCode:c7,formToJSON:l7,getAdapter:u7,mergeConfig:p7,create:d7}=yt;function En(){return process.argv.slice(2)}function jg(){let t=En(),e="";for(let r=0;r<t.length;r++)if(t[r]==="--token"&&r+1<t.length){e=t[r+1];break}else if(t[r].startsWith("--token=")){e=t[r].split("=")[1];break}return e}function Dg(){let t=En(),e="";for(let r=0;r<t.length;r++)if(t[r]==="--url"&&r+1<t.length){e=t[r+1];break}else if(t[r].startsWith("--url=")){e=t[r].split("=")[1];break}return e}function Mg(){let t=En(),e=[];for(let r=0;r<t.length;r++)t[r]==="--rule"&&r+1<t.length?e.push(t[r+1]):t[r].startsWith("--rule=")&&e.push(t[r].split("=")[1]);return e}function Sq(){let t=En();for(let e of t)if(e==="--debug")return!0;return!1}function Fg(){let t=En();for(let e of t)if(e==="--no-rule")return!0;return!1}function kq(){let t=En();for(let e of t)if(e==="--no-prefix")return!0}function Ug(){let t=En(),e="";for(let r=0;r<t.length;r++)if(t[r]==="--proxy"&&r+1<t.length){e=t[r+1];break}else if(t[r].startsWith("--proxy=")){e=t[r].split("=")[1];break}return e}var Tq=(t,e=32)=>t.length>e?`${t.slice(0,e)}\u2026`:t,EE=["authorization","token","secret","password","cookie","api-key","apikey"],Eq=t=>{let e=t.toLowerCase();return EE.some(r=>e.includes(r))},Lg=t=>{let e=t.toLowerCase();return EE.some(r=>e.includes(r))?`<redacted, length=${t.length}>`:`"${Tq(t)}"`};function $q(){let t=En(),e={};for(let r=0;r<t.length;r++){let n;if(t[r]==="--header"){let i=r+1<t.length?t[r+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 ${Lg(i)} looks like a flag, not a header value.`);continue}n=i,r++}else if(t[r].startsWith("--header="))n=t[r].slice(9);else continue;if(!n){console.warn('[--header] received an empty value (expected --header "Key: Value" or --header=Key:Value).');continue}let o=n.indexOf(":");if(o===-1)console.warn(`Skipping invalid --header (missing ":" separator): ${Lg(n)}`);else if(o===0)console.warn(`Skipping invalid --header (empty header name before ":"): ${Lg(n)}`);else{let i=n.slice(0,o).trim(),s=n.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 Rq(){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 r={};for(let[n,o]of Object.entries(e)){if(typeof o!="string"){console.warn(`MG_EXTRA_HEADERS header "${n}" ignored \u2014 value must be a string (got ${typeof o}).`);continue}r[n]=o}return r}var nu=null;function ou(){return nu||(nu={...Rq(),...$q()},nu)}function $E(t){let e={};for(let[r,n]of Object.entries(t))e[r]=Eq(r)?"<masked>":n;return e}function Aq(){let t=En();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 RE(){let t=jg(),e=Dg(),r=Mg(),n=Sq(),o=Fg(),i=kq(),s=Ug(),a=Aq();return{token:t,baseUrl:e,rules:r,debug:n,noRule:o,noPrefix:i,proxy:s,format:a}}var DE=Ee(require("https"));var an=Ee(require("net"),1),Oa=Ee(require("tls"),1),NE=Ee(require("assert"),1),LE=Ee(Zo(),1);var AE=Ee(require("net"),1),IE=Ee(require("http"),1),PE=require("https");var h7=Ee(require("http"),1),g7=Ee(require("https"),1);var sn=Symbol("AgentBaseInternalState"),iu=class extends IE.Agent{constructor(e){super(e),this[sn]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
65
|
+
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new AE.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?PE.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)},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 n(c)}this[sn].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(i,s),n(a)})}createConnection(){let e=this[sn].currentSocket;if(this[sn].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[sn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[sn]&&(this[sn].defaultPort=e)}get protocol(){return this[sn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[sn]&&(this[sn].protocol=e)}};var jE=require("url");var CE=Ee(Zo(),1),su=(0,CE.default)("https-proxy-agent:parse-proxy-response");function qg(t){return new Promise((e,r)=>{let n=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(),su("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){s(),su("onerror %o",p),r(p)}function l(p){o.push(p),n+=p.length;let d=Buffer.concat(o,n),f=d.indexOf(`\r
|
|
65
66
|
\r
|
|
66
|
-
`);if(f===-1){
|
|
67
|
-
`),
|
|
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",EE),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Aa.connect({...jg(nu(n),"host","path","port"),socket:i})):i;throw i.destroy(),new Error(`Proxy authentication failed with status ${p.statusCode} after retry`)}};Ca.protocols=["http","https"];function EE(t){setImmediate(()=>{t.resume()})}function jg(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}var Lg=zg()||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy;if(Lg)try{let t=new Ca(Lg,{rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});vt.defaults.httpAgent=t,vt.defaults.httpsAgent=t,vt.defaults.proxy=!1}catch{throw new Error(`Invalid proxy URL: ${Lg}`)}else vt.defaults.httpsAgent=new CE.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});var ru=null,ir=()=>ru||(ru={"Content-Type":"application/json",Accept:"application/json","X-MG-UserAccessToken":process.env.MG_MCP_TOKEN||process.env.MASTERGO_API_TOKEN||Cg(),...Ql()},ru),ou=null,br=()=>{if(ou!==null)return ou;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}`),ou=i,ou}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`)}},gq=(t,e)=>{try{return new URL(t).host===new URL(e).host}catch{return!1}},yq=32,Vr=new Map;function xq(t,e){if(Vr.has(t))Vr.delete(t);else if(Vr.size>=yq){let n=Vr.keys().next().value;n!==void 0&&Vr.delete(n)}Vr.set(t,e)}var vq=64,bq=300*1e3,sr=new Map,Dg=new Map;function Mg(t,e,n,r){return`${t}:${e}:${n}${r?`:${r}`:""}`}function _q(t){let e=sr.get(t);if(e){if(Date.now()>e.expiresAt){sr.delete(t);return}return sr.delete(t),sr.set(t,e),e.value}}function wq(t,e){if(sr.has(t))sr.delete(t);else if(sr.size>=vq){let n=sr.keys().next().value;n!==void 0&&sr.delete(n)}sr.set(t,{value:e,expiresAt:Date.now()+bq})}async function Fg(t,e){let n=_q(t);if(n!==void 0)return n;let r=Dg.get(t);if(r)return r;let o=e().then(i=>(wq(t,i),i)).finally(()=>{Dg.delete(t)});return Dg.set(t,o),o}var Sq=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)},kq=()=>["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 `svgShortKey` field. The SVG markup is NOT in the DSL. Place `@@SVG:{svgShortKey}@@` 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:{svgShortKey}@@` 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??"[]"),...Pg()],Tq=()=>({async getMeta(t,e,n){let r=Mg("meta",t,e,n);return Fg(r,async()=>(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=Mg("dsl",t,e,n==null?void 0:n.sourceLayerId);return Fg(r,async()=>{let o={fileId:t,layerId:e};(n==null?void 0:n.sourceLayerId)!==void 0&&(o.sourceLayerId=n.sourceLayerId);let i=await vt.get(`${br()}/mcp/dsl`,{timeout:3e4,params:o,headers:ir()});return{dsl:i.data,componentDocumentLinks:Sq(i.data),rules:Og()?[]:kq()}})},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){let r=Mg("sections",t,e,n!==void 0?String(n):"list");return Fg(r,async()=>{var i;let o={fileId:t,layerId:e};n!==void 0&&(o.sectionIndex=n);try{return(await vt.get(`${br()}/mcp/design-sections`,{timeout:12e4,params:o,headers:ir()})).data}catch(s){throw((i=s.response)==null?void 0:i.status)===404?new Error("design-sections API not available on this server. Please update frontend-mcp-server to the latest version."):s}})},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=gq(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/")&&xq(t,c),c}}),ot=Tq();function Eq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={},iu={},Gr={},IE;function Ia(){if(IE)return Gr;IE=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 Ug,PE;function Pa(){if(PE)return Ug;PE=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
|
-
`+
|
|
76
|
-
`+d}let
|
|
77
|
-
`,d+=t.repeat("-",i.indent+f+3+
|
|
78
|
-
`;for(let
|
|
79
|
-
`}return d.replace(/\n$/,"")}return
|
|
80
|
-
\r`;function
|
|
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
|
|
82
|
-
`,S-1))}function Te(u,S,
|
|
67
|
+
`);if(f===-1){su("have not received end of HTTP headers yet..."),i();return}let m=d.slice(0,f).toString("ascii").split(`\r
|
|
68
|
+
`),g=m.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let x=g.split(" "),v=+x[1],y=x.slice(2).join(" "),b={};for(let w of m){if(!w)continue;let k=w.indexOf(":");if(k===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${w}"`));let E=w.slice(0,k).toLowerCase(),F=w.slice(k+1).trimStart(),L=b[E];typeof L=="string"?b[E]=[L,F]:Array.isArray(L)?L.push(F):b[E]=F}su("got proxy server response: %o %o",g,b),s(),e({connect:{statusCode:v,statusText:y,headers:b},buffered:d})}t.on("error",c),t.on("end",a),i()})}function OE(){return async({response:t,scheme:e})=>{if(e.toLowerCase()!=="negotiate")throw new Error(`Expected Negotiate scheme but got "${e}"`);let r;try{r=await import("kerberos")}catch{throw new Error('The "kerberos" package is required for Negotiate proxy authentication. Install it with: npm install kerberos')}let n=t.headers["proxy-authenticate"]||"",o=Array.isArray(n)?n[0]:n,i=typeof o=="string"&&o.includes(" ")?o.split(" ").slice(1).join(" "):void 0,a=await(await r.initializeClient("HTTP@proxy",{mechOID:r.GSS_MECH_OID_SPNEGO})).step(i||"");if(!a)throw new Error("Kerberos client.step() returned no token");return{headers:{"Proxy-Authorization":`Negotiate ${a}`}}}}var Wo=(0,LE.default)("https-proxy-agent"),au=t=>t.servername===void 0&&t.host&&!an.isIP(t.host)?{...t,servername:t.host}:t,za=class extends iu{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new jE.URL(e):e,this.proxyHeaders=(r==null?void 0:r.headers)??{},Wo("Creating new HttpsProxyAgent instance: %o",this.proxy.href),r!=null&&r.negotiate?this.onProxyAuth=OE():r!=null&&r.onProxyAuth&&(this.onProxyAuth=r.onProxyAuth);let n=(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"],...r?Zg(r,"headers","onProxyAuth","negotiate"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;n.protocol==="https:"?(Wo("Creating `tls.Socket`: %o",this.connectOpts),o=Oa.connect(au(this.connectOpts))):(Wo("Creating `net.Socket`: %o",this.connectOpts),o=an.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=an.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${s}:${r.port} HTTP/1.1\r
|
|
69
|
+
`;if(n.username||n.password){let f=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}i.Host=`${s}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(i))a+=`${f}: ${i[f]}\r
|
|
70
|
+
`;let c=qg(o);o.write(`${a}\r
|
|
71
|
+
`);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",zE),r.secureEndpoint?(Wo("Upgrading socket connection to TLS"),Oa.connect({...Zg(au(r),"host","path","port"),socket:o})):o;if(l.statusCode===407&&this.onProxyAuth){Wo("Got 407 response, invoking onProxyAuth callback"),o.destroy();let f=l.headers["proxy-authenticate"]||"",m=Array.isArray(f)?f[0].split(/\s/)[0]:f.split(/\s/)[0],g=await this.onProxyAuth({response:l,scheme:m});return this._connectWithAuth(e,r,g.headers)}o.destroy();let d=new an.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Wo("Replaying proxy buffer for failed request"),(0,NE.default)(f.listenerCount("data")>0),f.push(p),f.push(null)}),d}async _connectWithAuth(e,r,n){let{proxy:o}=this,i;o.protocol==="https:"?i=Oa.connect(au(this.connectOpts)):i=an.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=an.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
72
|
+
`;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,n),s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))c+=`${d}: ${s[d]}\r
|
|
73
|
+
`;let l=qg(i);i.write(`${c}\r
|
|
74
|
+
`);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",zE),r.secureEndpoint?(Wo("Upgrading socket connection to TLS"),Oa.connect({...Zg(au(r),"host","path","port"),socket:i})):i;throw i.destroy(),new Error(`Proxy authentication failed with status ${p.statusCode} after retry`)}};za.protocols=["http","https"];function zE(t){setImmediate(()=>{t.resume()})}function Zg(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}var Bg=Ug()||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy;if(Bg)try{let t=new za(Bg,{rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});yt.defaults.httpAgent=t,yt.defaults.httpsAgent=t,yt.defaults.proxy=!1}catch{throw new Error(`Invalid proxy URL: ${Bg}`)}else yt.defaults.httpsAgent=new DE.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});var cu=null,Vr=()=>cu||(cu={"Content-Type":"application/json",Accept:"application/json","X-MG-UserAccessToken":process.env.MG_MCP_TOKEN||process.env.MASTERGO_API_TOKEN||jg(),...ou()},cu),lu=null,cn=()=>{if(lu!==null)return lu;let t=process.env.API_BASE_URL||Dg();try{let e=new URL(t),r=e.protocol,n=e.hostname,o=e.port,i=`${r}//${n}`;return o&&(i+=`:${o}`),lu=i,lu}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`)}},Iq=(t,e)=>{try{return new URL(t).host===new URL(e).host}catch{return!1}},Pq=32,Yn=new Map;function Cq(t,e){if(Yn.has(t))Yn.delete(t);else if(Yn.size>=Pq){let r=Yn.keys().next().value;r!==void 0&&Yn.delete(r)}Yn.set(t,e)}var Oq=6e4,zq=32,ln=new Map;function Nq(t){let e=ln.get(t);if(e){if(Date.now()-e.ts>=Oq){ln.delete(t);return}return ln.delete(t),ln.set(t,e),e.data}}function Lq(t,e){if(ln.has(t))ln.delete(t);else if(ln.size>=zq){let r=ln.keys().next().value;r!==void 0&&ln.delete(r)}ln.set(t,{data:e,ts:Date.now()})}var jq=64,Dq=300*1e3,un=new Map,Hg=new Map;function Vg(t,e,r,n){return`${t}:${e}:${r}${n?`:${n}`:""}`}function Mq(t){let e=un.get(t);if(e){if(Date.now()>e.expiresAt){un.delete(t);return}return un.delete(t),un.set(t,e),e.value}}function Fq(t,e){if(un.has(t))un.delete(t);else if(un.size>=jq){let r=un.keys().next().value;r!==void 0&&un.delete(r)}un.set(t,{value:e,expiresAt:Date.now()+Dq})}async function Gg(t,e){let r=Mq(t);if(r!==void 0)return r;let n=Hg.get(t);if(n)return n;let o=e().then(i=>(Fq(t,i),i)).finally(()=>{Hg.delete(t)});return Hg.set(t,o),o}var Uq=t=>{var n;let e=new Set,r=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,r)};return(n=t.nodes)==null||n.forEach(r),Array.from(e)},qq=()=>["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 `svgShortKey` field. The SVG markup is NOT in the DSL. Place `@@SVG:{svgShortKey}@@` 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:{svgShortKey}@@` 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??"[]"),...Mg()].map(e=>nr(e)),Zq=()=>({async getMeta(t,e,r){let n=Vg("meta",t,e,r);return Gg(n,async()=>(await yt.get(`${cn()}/mcp/meta`,{timeout:3e4,params:{fileId:t,layerId:e,...r?{sourceLayerId:r}:{}},headers:Vr()})).data)},async getDsl(t,e,r){let n=Vg("dsl",t,e,r==null?void 0:r.sourceLayerId);return Gg(n,async()=>{let o={fileId:t,layerId:e};(r==null?void 0:r.sourceLayerId)!==void 0&&(o.sourceLayerId=r.sourceLayerId);let i=await yt.get(`${cn()}/mcp/dsl`,{timeout:3e4,params:o,headers:Vr()});return{dsl:i.data,componentDocumentLinks:Uq(i.data),rules:Fg()?[]:qq()}})},async extractSvg(t,e,r,n,o){let i={fileId:t,layerId:e};return r&&(i.backgroundColor=r),n!==void 0&&(i.page=n),o!==void 0&&(i.pageSize=o),(await yt.get(`${cn()}/mcp/extract-svg`,{timeout:3e4,params:i,headers:Vr()})).data},async getDesignSections(t,e,r,n){let o=Vg("sections",t,e,r!==void 0?String(r):"list");return Gg(o,async()=>{var s;let i={fileId:t,layerId:e};r!==void 0&&(i.sectionIndex=r),n&&(i.fromPageParam="true");try{return(await yt.get(`${cn()}/mcp/design-sections`,{timeout:12e4,params:i,headers:Vr()})).data}catch(a){throw((s=a.response)==null?void 0:s.status)===404?new Error("design-sections API not available on this server. Please update frontend-mcp-server to the latest version."):a}})},async getPageLayers(t,e){var o;let r=`${t}:${e}`,n=Nq(r);if(n)return n;try{let i=await yt.get(`${cn()}/mcp/page-layers`,{timeout:12e4,params:{fileId:t,layerId:e},headers:Vr()});return Lq(r,i.data),i.data}catch(i){throw((o=i.response)==null?void 0:o.status)===404?new Error("page-layers API not available on this server. Please update frontend-mcp-server to the latest version."):i}},async getD2c(t,e){let r={contentId:t,documentId:e};return(await yt.get(`${cn()}/mcp/d2c/events`,{timeout:3e4,params:r,headers:Vr()})).data},async postC2d(t,e,r){return(await yt.post(`${cn()}/mcp/c2d`,{data:t,fileId:e,layerId:r},{timeout:3e4,headers:Vr()})).data},async applyDesign(t,e,r,n,o){var i;try{return(await yt.post(`${cn()}/mcp/apply-design`,{code:t,fileId:e,layerId:r,...n?{sourceLayerId:n}:{},...o?{targetLang:o}:{}},{timeout:6e4,headers:Vr()})).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,r){return(await yt.get(`${cn()}/mcp/style`,{timeout:3e4,params:{fileId:t,layerId:e,...r?{sourceLayerId:r}:{}},headers:Vr()})).data},async request(t){return(await yt.request({...t,headers:{...Vr(),...t.headers}})).data},async extractIdsFromUrl(t){if(t.includes("/goto/")&&Yn.has(t))return{...Yn.get(t)};let e=t;if(t.includes("/goto/")){let f=Iq(t,cn()),g=(await yt.get(t,{maxRedirects:0,validateStatus:x=>x>=300&&x<400,...f?{headers:Vr()}:{}})).headers.location;if(!g)throw new Error("No redirect URL found for short link");e=new URL(g,t).href}let r=new URL(e),n=r.pathname.split("/"),o=new URLSearchParams(r.search),i=n.find(f=>/^\d+$/.test(f)),s=o.get("layer_id"),a=o.get("page_id"),c=s??a,l=!s&&!!a;if(!i)throw new Error("Could not extract fileId from URL");if(!c)throw new Error("Could not extract layerId from URL");let p=o.get("source_layer_id")||void 0,d={fileId:i,layerId:c,sourceLayerId:p,fromPageParam:l};return t.includes("/goto/")&&Cq(t,d),d}}),Ve=Zq();function Bq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yt={},uu={},Xn={},ME;function Na(){if(ME)return Xn;ME=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 Xn.isNothing=t,Xn.isObject=e,Xn.toArray=r,Xn.repeat=o,Xn.isNegativeZero=i,Xn.extend=n,Xn}var Wg,FE;function La(){if(FE)return Wg;FE=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+=`
|
|
75
|
+
|
|
76
|
+
`+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)},Wg=e,Wg}var Kg,UE;function Hq(){if(UE)return Kg;UE=1;let t=Na();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 x=1;x<=i.linesBefore&&!(p-x<0);x++){let v=e(o.buffer,a[p-x],c[p-x],o.position-(a[p]-a[p-x]),m);d=t.repeat(" ",i.indent)+r((o.line-x+1).toString(),f)+" | "+v.str+`
|
|
77
|
+
`+d}let g=e(o.buffer,a[p],c[p],o.position,m);d+=t.repeat(" ",i.indent)+r((o.line+1).toString(),f)+" | "+g.str+`
|
|
78
|
+
`,d+=t.repeat("-",i.indent+f+3+g.pos)+`^
|
|
79
|
+
`;for(let x=1;x<=i.linesAfter&&!(p+x>=c.length);x++){let v=e(o.buffer,a[p+x],c[p+x],o.position-(a[p]-a[p+x]),m);d+=t.repeat(" ",i.indent)+r((o.line+x+1).toString(),f)+" | "+v.str+`
|
|
80
|
+
`}return d.replace(/\n$/,"")}return Kg=n,Kg}var Jg,qE;function or(){if(qE)return Jg;qE=1;let t=La(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(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=n(s.styleAliases||null),r.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return Jg=o,Jg}var Yg,ZE;function u$(){if(ZE)return Yg;ZE=1;let t=La(),e=or();function r(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 n(){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=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},Yg=o,Yg}var Xg,BE;function p$(){if(BE)return Xg;BE=1;let t=or();return Xg=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Xg}var Qg,HE;function d$(){if(HE)return Qg;HE=1;let t=or();return Qg=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Qg}var ey,VE;function f$(){if(VE)return ey;VE=1;let t=or();return ey=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ey}var ty,GE;function m$(){if(GE)return ty;GE=1;let t=u$();return ty=new t({explicit:[p$(),d$(),f$()]}),ty}var ry,WE;function h$(){if(WE)return ry;WE=1;let t=or();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 r(){return null}function n(o){return o===null}return ry=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ry}var ny,KE;function g$(){if(KE)return ny;KE=1;let t=or();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 r(o){return o==="true"||o==="True"||o==="TRUE"}function n(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return ny=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:n,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"}),ny}var oy,JE;function y$(){if(JE)return oy;JE=1;let t=Na(),e=or();function r(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function n(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 m=l[d];if((m==="-"||m==="+")&&(m=l[++d]),m==="0"){if(d+1===p)return!0;if(m=l[++d],m==="b"){for(d++;d<p;d++){if(m=l[d],m!=="0"&&m!=="1")return!1;f=!0}return f&&isFinite(s(l))}if(m==="x"){for(d++;d<p;d++){if(!r(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}if(m==="o"){for(d++;d<p;d++){if(!n(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 oy=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"]}}),oy}var iy,YE;function x$(){if(YE)return iy;YE=1;let t=Na(),e=or(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(l){return l===null||!r.test(l)?!1:isFinite(parseFloat(l,10))?!0:n.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 iy=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:i,predicate:c,represent:a,defaultStyle:"lowercase"}),iy}var sy,XE;function v$(){return XE||(XE=1,sy=m$().extend({implicit:[h$(),g$(),y$(),x$()]})),sy}var ay,QE;function b$(){return QE||(QE=1,ay=v$()),ay}var cy,e$;function _$(){if(e$)return cy;e$=1;let t=or(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 n(s){return s===null?!1:e.exec(s)!==null||r.exec(s)!==null}function o(s){let a=0,c=null,l=e.exec(s);if(l===null&&(l=r.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 m=+l[4],g=+l[5],x=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let y=+l[10],b=+(l[11]||0);c=(y*60+b)*6e4,l[9]==="-"&&(c=-c)}let v=new Date(Date.UTC(p,d,f,m,g,x,a));return c&&v.setTime(v.getTime()-c),v}function i(s){return s.toISOString()}return cy=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:o,instanceOf:Date,represent:i}),cy}var ly,t$;function w$(){if(t$)return ly;t$=1;let t=or();function e(r){return r==="<<"||r===null}return ly=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),ly}var uy,r$;function S$(){if(r$)return uy;r$=1;let t=or(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
81
|
+
\r`;function r(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 n(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,p=0,d=[];for(let m=0;m<c;m++)m%4===0&&m&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|l.indexOf(a.charAt(m));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 uy=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:i,represent:o}),uy}var py,n$;function k$(){if(n$)return py;n$=1;let t=or(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(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(r.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||e.call(s,f))return!1;Object.defineProperty(s,f,{value:!0})}return!0}function o(i){return i!==null?i:[]}return py=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:o}),py}var dy,o$;function T$(){if(o$)return dy;o$=1;let t=or(),e=Object.prototype.toString;function r(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 n(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 dy=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n}),dy}var fy,i$;function E$(){if(i$)return fy;i$=1;let t=or(),e=Object.prototype.hasOwnProperty;function r(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 n(o){return o!==null?o:{}}return fy=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),fy}var my,s$;function gy(){return s$||(s$=1,my=b$().extend({implicit:[_$(),w$()],explicit:[S$(),k$(),T$(),E$()]})),my}var a$;function Vq(){if(a$)return uu;a$=1;let t=Na(),e=La(),r=Hq(),n=gy(),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]/,m=/[\x85\u2028\u2029]/,g=/[,\[\]{}]/,x=/^(?:!|!!|![0-9A-Za-z-]+!)$/,v=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function y(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 L(u){return u===120?2:u===117?4:u===85?8:0}function pe(u){return u>=48&&u<=57?u-48:-1}function me(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
82
|
+
`;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 ee(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,S,P){S==="__proto__"?Object.defineProperty(u,S,{configurable:!0,enumerable:!0,writable:!0,value:P}):u[S]=P}let bt=new Array(256),Ge=new Array(256);for(let u=0;u<256;u++)bt[u]=me(u)?1:0,Ge[u]=me(u);function de(u,S){this.input=u,this.filename=S.filename||null,this.schema=S.schema||n,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 et(u,S){let P={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return P.snippet=r(P),new e(S,P)}function H(u,S){throw et(u,S)}function It(u,S){u.onWarning&&u.onWarning.call(null,et(u,S))}function Bt(u,S,P){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]=P}function Gr(u){u.anchorMapTransactions.push(Object.create(null))}function Ce(u){let S=u.anchorMapTransactions.pop(),P=u.anchorMapTransactions;if(P.length===0)return;let N=P[P.length-1],A=Object.keys(S);for(let Z=0,h=A.length;Z<h;Z+=1){let T=A[Z];o.call(N,T)||(N[T]=S[T])}}function B(u){let S=u.anchorMapTransactions.pop(),P=Object.keys(S);for(let N=P.length-1;N>=0;N-=1){let A=S[P[N]];A.existed?u.anchorMap[P[N]]=A.value:delete u.anchorMap[P[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 Xt={YAML:function(S,P,N){S.version!==null&&H(S,"duplication of %YAML directive"),N.length!==1&&H(S,"YAML directive accepts exactly one argument");let A=/^([0-9]+)\.([0-9]+)$/.exec(N[0]);A===null&&H(S,"ill-formed argument of the YAML directive");let Z=parseInt(A[1],10),h=parseInt(A[2],10);Z!==1&&H(S,"unacceptable YAML version of the document"),S.version=N[0],S.checkLineBreaks=h<2,h!==1&&h!==2&&It(S,"unsupported YAML version of the document")},TAG:function(S,P,N){let A;N.length!==2&&H(S,"TAG directive accepts exactly two arguments");let Z=N[0];A=N[1],x.test(Z)||H(S,"ill-formed tag handle (first argument) of the TAG directive"),o.call(S.tagMap,Z)&&H(S,'there is a previously declared suffix for "'+Z+'" tag handle'),v.test(A)||H(S,"ill-formed tag prefix (second argument) of the TAG directive");try{A=decodeURIComponent(A)}catch{H(S,"tag prefix is malformed: "+A)}S.tagMap[Z]=A}};function at(u,S,P,N){if(S<P){let A=u.input.slice(S,P);if(N)for(let Z=0,h=A.length;Z<h;Z+=1){let T=A.charCodeAt(Z);T===9||T>=32&&T<=1114111||H(u,"expected valid JSON character")}else f.test(A)&&H(u,"the stream contains non-printable characters");u.result+=A}}function ge(u,S,P,N){t.isObject(P)||H(u,"cannot merge mappings; the provided source object is unacceptable");let A=Object.keys(P);for(let Z=0,h=A.length;Z<h;Z+=1){let T=A[Z];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&H(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),o.call(S,T)||(Re(S,T,P[T]),N[T]=!0)}}function ke(u,S,P,N,A,Z,h,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])&&H(u,"nested arrays are not supported inside keys"),typeof A=="object"&&y(A[O])==="[object Object]"&&(A[O]="[object Object]")}if(typeof A=="object"&&y(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],P);else ge(u,S,Z,P);else!u.json&&!o.call(P,A)&&o.call(S,A)&&(u.line=h||u.line,u.lineStart=T||u.lineStart,u.position=D||u.position,H(u,"duplicated mapping key")),Re(S,A,Z),delete P[A];return S}function dt(u){let S=u.input.charCodeAt(u.position);S===10?u.position++:S===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):H(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Oe(u,S,P){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(dt(u),A=u.input.charCodeAt(u.position),N++,u.lineIndent=0;A===32;)u.lineIndent++,A=u.input.charCodeAt(++u.position);else break}return P!==-1&&N!==0&&u.lineIndent<P&&It(u,"deficient indentation"),N}function Et(u){let S=u.position,P=u.input.charCodeAt(S);return!!((P===45||P===46)&&P===u.input.charCodeAt(S+1)&&P===u.input.charCodeAt(S+2)&&(S+=3,P=u.input.charCodeAt(S),P===0||k(P)))}function $t(u,S){S===1?u.result+=" ":S>1&&(u.result+=t.repeat(`
|
|
83
|
+
`,S-1))}function Te(u,S,P){let N,A,Z,h,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 j=u.input.charCodeAt(u.position+1);if(k(j)||P&&E(j))return!1}for(u.kind="scalar",u.result="",N=A=u.position,Z=!1;M!==0;){if(M===58){let j=u.input.charCodeAt(u.position+1);if(k(j)||P&&E(j))break}else if(M===35){let j=u.input.charCodeAt(u.position-1);if(k(j))break}else{if(u.position===u.lineStart&&Et(u)||P&&E(M))break;if(b(M))if(h=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=h,u.lineStart=T,u.lineIndent=D;break}}Z&&(at(u,N,A,!1),$t(u,u.line-h),N=A=u.position,Z=!1),w(M)||(A=u.position+1),M=u.input.charCodeAt(++u.position)}return at(u,N,A,!1),u.result?!0:(u.kind=O,u.result=z,!1)}function Ht(u,S){let P,N,A=u.input.charCodeAt(u.position);if(A!==39)return!1;for(u.kind="scalar",u.result="",u.position++,P=N=u.position;(A=u.input.charCodeAt(u.position))!==0;)if(A===39)if(at(u,P,u.position,!0),A=u.input.charCodeAt(++u.position),A===39)P=u.position,u.position++,N=u.position;else return!0;else b(A)?(at(u,P,N,!0),$t(u,Oe(u,!1,S)),P=N=u.position):u.position===u.lineStart&&Et(u)?H(u,"unexpected end of the document within a single quoted scalar"):(u.position++,w(A)||(N=u.position));H(u,"unexpected end of the stream within a single quoted scalar")}function wr(u,S){let P,N,A,Z=u.input.charCodeAt(u.position);if(Z!==34)return!1;for(u.kind="scalar",u.result="",u.position++,P=N=u.position;(Z=u.input.charCodeAt(u.position))!==0;){if(Z===34)return at(u,P,u.position,!0),u.position++,!0;if(Z===92){if(at(u,P,u.position,!0),Z=u.input.charCodeAt(++u.position),b(Z))Oe(u,!1,S);else if(Z<256&&bt[Z])u.result+=Ge[Z],u.position++;else if((A=L(Z))>0){let h=A,T=0;for(;h>0;h--)Z=u.input.charCodeAt(++u.position),(A=F(Z))>=0?T=(T<<4)+A:H(u,"expected hexadecimal character");u.result+=ee(T),u.position++}else H(u,"unknown escape sequence");P=N=u.position}else b(Z)?(at(u,P,N,!0),$t(u,Oe(u,!1,S)),P=N=u.position):u.position===u.lineStart&&Et(u)?H(u,"unexpected end of the document within a double quoted scalar"):(u.position++,w(Z)||(N=u.position))}H(u,"unexpected end of the stream within a double quoted scalar")}function Nt(u,S){let P=!0,N,A,Z,h=u.tag,T,D=u.anchor,O,z,M,j,Q=Object.create(null),Y,ie,ae,ze=u.input.charCodeAt(u.position);if(ze===91)O=93,j=!1,T=[];else if(ze===123)O=125,j=!0,T={};else return!1;for(u.anchor!==null&&Bt(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=h,u.anchor=D,u.kind=j?"mapping":"sequence",u.result=T,!0;if(P?ze===44&&H(u,"expected the node content, but found ','"):H(u,"missed comma between flow collection entries"),ie=Y=ae=null,z=M=!1,ze===63){let ct=u.input.charCodeAt(u.position+1);k(ct)&&(z=M=!0,u.position++,Oe(u,!0,S))}N=u.line,A=u.lineStart,Z=u.position,Ke(u,S,i,!1,!0),ie=u.tag,Y=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),Ke(u,S,i,!1,!0),ae=u.result),j?ke(u,T,Q,ie,Y,ae,N,A,Z):z?T.push(ke(u,null,Q,ie,Y,ae,N,A,Z)):T.push(Y),Oe(u,!0,S),ze=u.input.charCodeAt(u.position),ze===44?(P=!0,ze=u.input.charCodeAt(++u.position)):P=!1}H(u,"unexpected end of the stream within a flow collection")}function ue(u,S){let P,N=l,A=!1,Z=!1,h=S,T=0,D=!1,O,z=u.input.charCodeAt(u.position);if(z===124)P=!1;else if(z===62)P=!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:H(u,"repeat of a chomping mode identifier");else if((O=pe(z))>=0)O===0?H(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):Z?H(u,"repeat of an indentation width identifier"):(h=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(dt(u),u.lineIndent=0,z=u.input.charCodeAt(u.position);(!Z||u.lineIndent<h)&&z===32;)u.lineIndent++,z=u.input.charCodeAt(++u.position);if(!Z&&u.lineIndent>h&&(h=u.lineIndent),b(z)){T++;continue}if(!Z&&h===0&&H(u,"missing indentation for block scalar"),u.lineIndent<h){N===d?u.result+=t.repeat(`
|
|
83
84
|
`,A?1+T:T):N===l&&A&&(u.result+=`
|
|
84
|
-
`);break}
|
|
85
|
+
`);break}P?w(z)?(D=!0,u.result+=t.repeat(`
|
|
85
86
|
`,A?1+T:T)):D?(D=!1,u.result+=t.repeat(`
|
|
86
87
|
`,T+1)):T===0?A&&(u.result+=" "):u.result+=t.repeat(`
|
|
87
88
|
`,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);
|
|
89
|
-
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let
|
|
90
|
-
`,O);Q===-1?(
|
|
91
|
-
`&&(z+=D),z+=
|
|
92
|
-
`+t.repeat(" ",
|
|
93
|
-
`,M=O&&(
|
|
94
|
-
`||
|
|
89
|
+
`,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);at(u,M,u.position,!1)}return!0}function Xe(u,S){let P=u.tag,N=u.anchor,A=[],Z=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Bt(u,u.anchor,A);let h=u.input.charCodeAt(u.position);for(;h!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,H(u,"tab characters must not be used in indentation")),h===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),h=u.input.charCodeAt(u.position);continue}let D=u.line;if(Ke(u,S,a,!1,!0),A.push(u.result),Oe(u,!0,-1),h=u.input.charCodeAt(u.position),(u.line===D||u.lineIndent>S)&&h!==0)H(u,"bad indentation of a sequence entry");else if(u.lineIndent<S)break}return Z?(u.tag=P,u.anchor=N,u.kind="sequence",u.result=A,!0):!1}function K(u,S,P){let N,A,Z,h,T=u.tag,D=u.anchor,O={},z=Object.create(null),M=null,j=null,Q=null,Y=!1,ie=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Bt(u,u.anchor,O);let ae=u.input.charCodeAt(u.position);for(;ae!==0;){!Y&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,H(u,"tab characters must not be used in indentation"));let ze=u.input.charCodeAt(u.position+1),ct=u.line;if((ae===63||ae===58)&&k(ze))ae===63?(Y&&(ke(u,O,z,M,j,null,A,Z,h),M=j=Q=null),ie=!0,Y=!0,N=!0):Y?(Y=!1,N=!0):H(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,ae=ze;else{if(A=u.line,Z=u.lineStart,h=u.position,!Ke(u,P,s,!1,!0))break;if(u.line===ct){for(ae=u.input.charCodeAt(u.position);w(ae);)ae=u.input.charCodeAt(++u.position);if(ae===58)ae=u.input.charCodeAt(++u.position),k(ae)||H(u,"a whitespace character is expected after the key-value separator within a block mapping"),Y&&(ke(u,O,z,M,j,null,A,Z,h),M=j=Q=null),ie=!0,Y=!1,N=!1,M=u.tag,j=u.result;else if(ie)H(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=T,u.anchor=D,!0}else if(ie)H(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===ct||u.lineIndent>S)&&(Y&&(A=u.line,Z=u.lineStart,h=u.position),Ke(u,S,c,!0,N)&&(Y?j=u.result:Q=u.result),Y||(ke(u,O,z,M,j,Q,A,Z,h),M=j=Q=null),Oe(u,!0,-1),ae=u.input.charCodeAt(u.position)),(u.line===ct||u.lineIndent>S)&&ae!==0)H(u,"bad indentation of a mapping entry");else if(u.lineIndent<S)break}return Y&&ke(u,O,z,M,j,null,A,Z,h),ie&&(u.tag=T,u.anchor=D,u.kind="mapping",u.result=O),ie}function W(u){let S=!1,P=!1,N,A,Z=u.input.charCodeAt(u.position);if(Z!==33)return!1;u.tag!==null&&H(u,"duplication of a tag property"),Z=u.input.charCodeAt(++u.position),Z===60?(S=!0,Z=u.input.charCodeAt(++u.position)):Z===33?(P=!0,N="!!",Z=u.input.charCodeAt(++u.position)):N="!";let h=u.position;if(S){do Z=u.input.charCodeAt(++u.position);while(Z!==0&&Z!==62);u.position<u.length?(A=u.input.slice(h,u.position),Z=u.input.charCodeAt(++u.position)):H(u,"unexpected end of the stream within a verbatim tag")}else{for(;Z!==0&&!k(Z);)Z===33&&(P?H(u,"tag suffix cannot contain exclamation marks"):(N=u.input.slice(h-1,u.position+1),x.test(N)||H(u,"named tag handle cannot contain such characters"),P=!0,h=u.position+1)),Z=u.input.charCodeAt(++u.position);A=u.input.slice(h,u.position),g.test(A)&&H(u,"tag suffix cannot contain flow indicator characters")}A&&!v.test(A)&&H(u,"tag name cannot contain such characters: "+A);try{A=decodeURIComponent(A)}catch{H(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:H(u,'undeclared tag handle "'+N+'"'),!0}function be(u){let S=u.input.charCodeAt(u.position);if(S!==38)return!1;u.anchor!==null&&H(u,"duplication of an anchor property"),S=u.input.charCodeAt(++u.position);let P=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);return u.position===P&&H(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(P,u.position),!0}function We(u){let S=u.input.charCodeAt(u.position);if(S!==42)return!1;S=u.input.charCodeAt(++u.position);let P=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);u.position===P&&H(u,"name of an alias node must contain at least one character");let N=u.input.slice(P,u.position);return o.call(u.anchorMap,N)||H(u,'unidentified alias "'+N+'"'),u.result=u.anchorMap[N],Oe(u,!0,-1),!0}function ye(u,S,P,N){let A=qe(u);return Gr(u),De(u,S),u.tag=null,u.anchor=null,u.kind=null,u.result=null,K(u,P,N)&&u.kind==="mapping"?(Ce(u),!0):(B(u),De(u,A),!1)}function Ke(u,S,P,N,A){let Z,h,T=1,D=!1,O=!1,z=null,M,j,Q;u.depth>=u.maxDepth&&H(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 Y=Z=h=c===P||a===P;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),ae=qe(u);if(D&&(ie===33&&u.tag!==null||ie===38&&u.anchor!==null)||!W(u)&&!be(u))break;z===null&&(z=ae),Oe(u,!0,-1)?(D=!0,h=Y,u.lineIndent>S?T=1:u.lineIndent===S?T=0:u.lineIndent<S&&(T=-1)):h=!1}if(h&&(h=D||A),T===1||c===P)if(i===P||s===P?j=S:j=S+1,Q=u.position-u.lineStart,T===1)if(h&&(Xe(u,Q)||K(u,Q,j))||Nt(u,j))O=!0;else{let ie=u.input.charCodeAt(u.position);z!==null&&Y&&!h&&ie!==124&&ie!==62&&ye(u,z,z.position-z.lineStart,j)||Z&&ue(u,j)||Ht(u,j)||wr(u,j)?O=!0:We(u)?(O=!0,(u.tag!==null||u.anchor!==null)&&H(u,"alias node should not have any properties")):Te(u,j,i===P)&&(O=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Bt(u,u.anchor,u.result)}else T===0&&(O=h&&Xe(u,Q));if(u.tag===null)u.anchor!==null&&Bt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&H(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let ie=0,ae=u.implicitTypes.length;ie<ae;ie+=1)if(M=u.implicitTypes[ie],M.resolve(u.result)){u.result=M.construct(u.result),u.tag=M.tag,u.anchor!==null&&Bt(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 ae=0,ze=ie.length;ae<ze;ae+=1)if(u.tag.slice(0,ie[ae].tag.length)===ie[ae].tag){M=ie[ae];break}}M||H(u,"unknown tag !<"+u.tag+">"),u.result!==null&&M.kind!==u.kind&&H(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&&Bt(u,u.anchor,u.result)):H(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,P=!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));){P=!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),h=[];for(Z.length<1&&H(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);h.push(u.input.slice(A,u.position))}N!==0&&dt(u),o.call(Xt,Z)?Xt[Z](u,Z,h):It(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)):P&&H(u,"directives end mark is expected"),Ke(u,u.lineIndent-1,c,!1,!0),Oe(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(S,u.position))&&It(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Et(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Oe(u,!0,-1));return}u.position<u.length-1&&H(u,"end of the stream or a document separator is expected")}function tt(u,S){u=String(u),S=S||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
|
|
90
|
+
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let P=new de(u,S),N=u.indexOf("\0");for(N!==-1&&(P.position=N,H(P,"null byte is not allowed in input")),P.input+="\0";P.input.charCodeAt(P.position)===32;)P.lineIndent+=1,P.position+=1;for(;P.position<P.length-1;)St(P);return P.documents}function Or(u,S,P){S!==null&&typeof S=="object"&&typeof P>"u"&&(P=S,S=null);let N=tt(u,P);if(typeof S!="function")return N;for(let A=0,Z=N.length;A<Z;A+=1)S(N[A])}function mn(u,S){let P=tt(u,S);if(P.length!==0){if(P.length===1)return P[0];throw new e("expected a single document in the stream, but found more")}}return uu.loadAll=Or,uu.load=mn,uu}var hy={},c$;function Gq(){if(c$)return hy;c$=1;let t=Na(),e=La(),r=gy(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=65279,s=9,a=10,c=13,l=32,p=33,d=34,f=35,m=37,g=38,x=39,v=42,y=44,b=45,w=58,k=61,E=62,F=63,L=64,pe=91,me=93,ee=96,Re=123,bt=124,Ge=125,de={};de[0]="\\0",de[7]="\\a",de[8]="\\b",de[9]="\\t",de[10]="\\n",de[11]="\\v",de[12]="\\f",de[13]="\\r",de[27]="\\e",de[34]='\\"',de[92]="\\\\",de[133]="\\N",de[160]="\\_",de[8232]="\\L",de[8233]="\\P";let et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function It(h,T){if(T===null)return{};let D={},O=Object.keys(T);for(let z=0,M=O.length;z<M;z+=1){let j=O[z],Q=String(T[j]);j.slice(0,2)==="!!"&&(j="tag:yaml.org,2002:"+j.slice(2));let Y=h.compiledTypeMap.fallback[j];Y&&o.call(Y.styleAliases,Q)&&(Q=Y.styleAliases[Q]),D[j]=Q}return D}function Bt(h){let T,D,O=h.toString(16).toUpperCase();if(h<=255)T="x",D=2;else if(h<=65535)T="u",D=4;else if(h<=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 Gr=1,Ce=2;function B(h){this.schema=h.schema||r,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=t.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=It(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?Ce:Gr,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function qe(h,T){let D=t.repeat(" ",T),O=0,z="",M=h.length;for(;O<M;){let j,Q=h.indexOf(`
|
|
91
|
+
`,O);Q===-1?(j=h.slice(O),O=M):(j=h.slice(O,Q+1),O=Q+1),j.length&&j!==`
|
|
92
|
+
`&&(z+=D),z+=j}return z}function De(h,T){return`
|
|
93
|
+
`+t.repeat(" ",h.indent*T)}function Xt(h,T){for(let D=0,O=h.implicitTypes.length;D<O;D+=1)if(h.implicitTypes[D].resolve(T))return!0;return!1}function at(h){return h===l||h===s}function ge(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==i||h>=65536&&h<=1114111}function ke(h){return ge(h)&&h!==i&&h!==c&&h!==a}function dt(h,T,D){let O=ke(h),z=O&&!at(h);return(D?O:O&&h!==y&&h!==pe&&h!==me&&h!==Re&&h!==Ge)&&h!==f&&!(T===w&&!z)||ke(T)&&!at(T)&&h===f||T===w&&z}function Oe(h){return ge(h)&&h!==i&&!at(h)&&h!==b&&h!==F&&h!==w&&h!==y&&h!==pe&&h!==me&&h!==Re&&h!==Ge&&h!==f&&h!==g&&h!==v&&h!==p&&h!==bt&&h!==k&&h!==E&&h!==x&&h!==d&&h!==m&&h!==L&&h!==ee}function Et(h){return!at(h)&&h!==w}function $t(h,T){let D=h.charCodeAt(T),O;return D>=55296&&D<=56319&&T+1<h.length&&(O=h.charCodeAt(T+1),O>=56320&&O<=57343)?(D-55296)*1024+O-56320+65536:D}function Te(h){return/^\n* /.test(h)}let Ht=1,wr=2,Nt=3,ue=4,Xe=5;function K(h,T,D,O,z,M,j,Q){let Y,ie=0,ae=null,ze=!1,ct=!1,$y=O!==-1,rs=-1,ns=Oe($t(h,0))&&Et($t(h,h.length-1));if(T||j)for(Y=0;Y<h.length;ie>=65536?Y+=2:Y++){if(ie=$t(h,Y),!ge(ie))return Xe;ns=ns&&dt(ie,ae,Q),ae=ie}else{for(Y=0;Y<h.length;ie>=65536?Y+=2:Y++){if(ie=$t(h,Y),ie===a)ze=!0,$y&&(ct=ct||Y-rs-1>O&&h[rs+1]!==" ",rs=Y);else if(!ge(ie))return Xe;ns=ns&&dt(ie,ae,Q),ae=ie}ct=ct||$y&&Y-rs-1>O&&h[rs+1]!==" "}return!ze&&!ct?ns&&!j&&!z(h)?Ht:M===Ce?Xe:wr:D>9&&Te(h)?Xe:j?M===Ce?Xe:wr:ct?ue:Nt}function W(h,T,D,O,z){h.dump=(function(){if(T.length===0)return h.quotingType===Ce?'""':"''";if(!h.noCompatMode&&(et.indexOf(T)!==-1||H.test(T)))return h.quotingType===Ce?'"'+T+'"':"'"+T+"'";let M=h.indent*Math.max(1,D),j=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-M),Q=O||h.flowLevel>-1&&D>=h.flowLevel;function Y(ie){return Xt(h,ie)}switch(K(T,Q,h.indent,j,Y,h.quotingType,h.forceQuotes&&!O,z)){case Ht:return T;case wr:return"'"+T.replace(/'/g,"''")+"'";case Nt:return"|"+be(T,h.indent)+We(qe(T,M));case ue:return">"+be(T,h.indent)+We(qe(ye(T,j),M));case Xe:return'"'+St(T)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function be(h,T){let D=Te(h)?String(T):"",O=h[h.length-1]===`
|
|
94
|
+
`,M=O&&(h[h.length-2]===`
|
|
95
|
+
`||h===`
|
|
95
96
|
`)?"+":O?"":"-";return D+M+`
|
|
96
|
-
`}function
|
|
97
|
-
`?
|
|
98
|
-
`);return Q=Q!==-1?Q:
|
|
99
|
-
`||
|
|
100
|
-
`:"")+
|
|
101
|
-
`+
|
|
102
|
-
`,
|
|
103
|
-
`+
|
|
104
|
-
`:""}return
|
|
97
|
+
`}function We(h){return h[h.length-1]===`
|
|
98
|
+
`?h.slice(0,-1):h}function ye(h,T){let D=/(\n+)([^\n]*)/g,O=(function(){let Q=h.indexOf(`
|
|
99
|
+
`);return Q=Q!==-1?Q:h.length,D.lastIndex=Q,Ke(h.slice(0,Q),T)})(),z=h[0]===`
|
|
100
|
+
`||h[0]===" ",M,j;for(;j=D.exec(h);){let Q=j[1],Y=j[2];M=Y[0]===" ",O+=Q+(!z&&!M&&Y!==""?`
|
|
101
|
+
`:"")+Ke(Y,T),z=M}return O}function Ke(h,T){if(h===""||h[0]===" ")return h;let D=/ [^ ]/g,O,z=0,M,j=0,Q=0,Y="";for(;O=D.exec(h);)Q=O.index,Q-z>T&&(M=j>z?j:Q,Y+=`
|
|
102
|
+
`+h.slice(z,M),z=M+1),j=Q;return Y+=`
|
|
103
|
+
`,h.length-z>T&&j>z?Y+=h.slice(z,j)+`
|
|
104
|
+
`+h.slice(j+1):Y+=h.slice(z),Y.slice(1)}function St(h){let T="",D=0;for(let O=0;O<h.length;D>=65536?O+=2:O++){D=$t(h,O);let z=de[D];!z&&ge(D)?(T+=h[O],D>=65536&&(T+=h[O+1])):T+=z||Bt(D)}return T}function tt(h,T,D){let O="",z=h.tag;for(let M=0,j=D.length;M<j;M+=1){let Q=D[M];h.replacer&&(Q=h.replacer.call(D,String(M),Q)),(P(h,T,Q,!1,!1)||typeof Q>"u"&&P(h,T,null,!1,!1))&&(O!==""&&(O+=","+(h.condenseFlow?"":" ")),O+=h.dump)}h.tag=z,h.dump="["+O+"]"}function Or(h,T,D,O){let z="",M=h.tag;for(let j=0,Q=D.length;j<Q;j+=1){let Y=D[j];h.replacer&&(Y=h.replacer.call(D,String(j),Y)),(P(h,T+1,Y,!0,!0,!1,!0)||typeof Y>"u"&&P(h,T+1,null,!0,!0,!1,!0))&&((!O||z!=="")&&(z+=De(h,T)),h.dump&&a===h.dump.charCodeAt(0)?z+="-":z+="- ",z+=h.dump)}h.tag=M,h.dump=z||"[]"}function mn(h,T,D){let O="",z=h.tag,M=Object.keys(D);for(let j=0,Q=M.length;j<Q;j+=1){let Y="";O!==""&&(Y+=", "),h.condenseFlow&&(Y+='"');let ie=M[j],ae=D[ie];h.replacer&&(ae=h.replacer.call(D,ie,ae)),P(h,T,ie,!1,!1)&&(h.dump.length>1024&&(Y+="? "),Y+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),P(h,T,ae,!1,!1)&&(Y+=h.dump,O+=Y))}h.tag=z,h.dump="{"+O+"}"}function u(h,T,D,O){let z="",M=h.tag,j=Object.keys(D);if(h.sortKeys===!0)j.sort();else if(typeof h.sortKeys=="function")j.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Q=0,Y=j.length;Q<Y;Q+=1){let ie="";(!O||z!=="")&&(ie+=De(h,T));let ae=j[Q],ze=D[ae];if(h.replacer&&(ze=h.replacer.call(D,ae,ze)),!P(h,T+1,ae,!0,!0,!0))continue;let ct=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ct&&(h.dump&&a===h.dump.charCodeAt(0)?ie+="?":ie+="? "),ie+=h.dump,ct&&(ie+=De(h,T)),P(h,T+1,ze,!0,ct)&&(h.dump&&a===h.dump.charCodeAt(0)?ie+=":":ie+=": ",ie+=h.dump,z+=ie)}h.tag=M,h.dump=z||"{}"}function S(h,T,D){let O=D?h.explicitTypes:h.implicitTypes;for(let z=0,M=O.length;z<M;z+=1){let j=O[z];if((j.instanceOf||j.predicate)&&(!j.instanceOf||typeof T=="object"&&T instanceof j.instanceOf)&&(!j.predicate||j.predicate(T))){if(D?j.multi&&j.representName?h.tag=j.representName(T):h.tag=j.tag:h.tag="?",j.represent){let Q=h.styleMap[j.tag]||j.defaultStyle,Y;if(n.call(j.represent)==="[object Function]")Y=j.represent(T,Q);else if(o.call(j.represent,Q))Y=j.represent[Q](T,Q);else throw new e("!<"+j.tag+'> tag resolver accepts not "'+Q+'" style');h.dump=Y}return!0}}return!1}function P(h,T,D,O,z,M,j){h.tag=null,h.dump=D,S(h,D,!1)||S(h,D,!0);let Q=n.call(h.dump),Y=O;O&&(O=h.flowLevel<0||h.flowLevel>T);let ie=Q==="[object Object]"||Q==="[object Array]",ae,ze;if(ie&&(ae=h.duplicates.indexOf(D),ze=ae!==-1),(h.tag!==null&&h.tag!=="?"||ze||h.indent!==2&&T>0)&&(z=!1),ze&&h.usedDuplicates[ae])h.dump="*ref_"+ae;else{if(ie&&ze&&!h.usedDuplicates[ae]&&(h.usedDuplicates[ae]=!0),Q==="[object Object]")O&&Object.keys(h.dump).length!==0?(u(h,T,h.dump,z),ze&&(h.dump="&ref_"+ae+h.dump)):(mn(h,T,h.dump),ze&&(h.dump="&ref_"+ae+" "+h.dump));else if(Q==="[object Array]")O&&h.dump.length!==0?(h.noArrayIndent&&!j&&T>0?Or(h,T-1,h.dump,z):Or(h,T,h.dump,z),ze&&(h.dump="&ref_"+ae+h.dump)):(tt(h,T,h.dump),ze&&(h.dump="&ref_"+ae+" "+h.dump));else if(Q==="[object String]")h.tag!=="?"&&W(h,h.dump,T,M,Y);else{if(Q==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Q)}if(h.tag!==null&&h.tag!=="?"){let ct=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ct="!"+ct:ct.slice(0,18)==="tag:yaml.org,2002:"?ct="!!"+ct.slice(18):ct="!<"+ct+">",h.dump=ct+" "+h.dump}}return!0}function N(h,T){let D=[],O=[];A(h,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(h,T,D){if(h!==null&&typeof h=="object"){let O=T.indexOf(h);if(O!==-1)D.indexOf(O)===-1&&D.push(O);else if(T.push(h),Array.isArray(h))for(let z=0,M=h.length;z<M;z+=1)A(h[z],T,D);else{let z=Object.keys(h);for(let M=0,j=z.length;M<j;M+=1)A(h[z[M]],T,D)}}}function Z(h,T){T=T||{};let D=new B(T);D.noRefs||N(h,D);let O=h;return D.replacer&&(O=D.replacer.call({"":O},"",O)),P(D,0,O,!0,!0)?D.dump+`
|
|
105
|
+
`:""}return hy.dump=Z,hy}var l$;function Wq(){if(l$)return Yt;l$=1;let t=Vq(),e=Gq();function r(n,o){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return Yt.Type=or(),Yt.Schema=u$(),Yt.FAILSAFE_SCHEMA=m$(),Yt.JSON_SCHEMA=v$(),Yt.CORE_SCHEMA=b$(),Yt.DEFAULT_SCHEMA=gy(),Yt.load=t.load,Yt.loadAll=t.loadAll,Yt.dump=e.dump,Yt.YAMLException=La(),Yt.types={binary:S$(),float:x$(),map:f$(),null:h$(),pairs:T$(),set:E$(),timestamp:_$(),bool:g$(),int:y$(),merge:w$(),omap:k$(),seq:d$(),str:p$()},Yt.safeLoad=r("safeLoad","load"),Yt.safeLoadAll=r("safeLoadAll","loadAll"),Yt.safeDump=r("safeDump","dump"),Yt}var Kq=Wq(),yy=Bq(Kq),{Type:C7,Schema:O7,FAILSAFE_SCHEMA:z7,JSON_SCHEMA:N7,CORE_SCHEMA:L7,DEFAULT_SCHEMA:j7,load:D7,loadAll:M7,dump:F7,YAMLException:U7,types:q7,safeLoad:Z7,safeLoadAll:B7,safeDump:H7}=yy;var $$=["json","yaml","tree"],Jq=`Output format for design data. Defaults to json.
|
|
105
106
|
- json \u2014 default; useful when piping output into tools that expect JSON.
|
|
106
107
|
- yaml \u2014 fewer tokens than JSON for typical designs.
|
|
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
|
|
108
|
-
`):Array.isArray(e.sections)?
|
|
109
|
-
`)}var
|
|
110
|
-
`)}function
|
|
111
|
-
`)):(e.push("svgs:"),
|
|
108
|
+
- 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 pn(){return G.enum($$).optional().describe(Jq)}function dn(t,e){let r=Yq(e);return r==="yaml"?Qq(t):r==="tree"?r4(t):JSON.stringify(t)}function pu(t){return Xq(t)?t:null}function Yq(t){return pu(t)??pu(process.env.DEFAULT_FORMAT)??"json"}function Xq(t){return typeof t=="string"&&$$.includes(t)}function Qq(t){try{return yy.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 e4=new Set(["type","id","name","layoutStyle","fill","strokeColor","strokeType","strokeAlign","strokeWidth","componentId","componentInfo","flexContainerInfo","text","textColor","children"]),t4=new Set(["width","height","relativeX","relativeY"]);function Ko(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function r4(t){if(!Ko(t))return JSON.stringify(t);let e=t;return Ko(e.dsl)&&Array.isArray(e.dsl.nodes)?n4(e):Array.isArray(e.nodes)?R$(e,[]).join(`
|
|
109
|
+
`):Array.isArray(e.sections)?i4(e):Array.isArray(e.svgs)?s4(e):Ko(e.svgs)||Ko(e.texts)?a4(e):JSON.stringify(t)}function R$(t,e){if(e.push("globalVars:"),Ko(t.styles))for(let[r,n]of Object.entries(t.styles))e.push(` ${r}: ${JSON.stringify(n)}`);t.components!==void 0&&e.push(`components: ${JSON.stringify(t.components)}`);for(let[r,n]of Object.entries(t))r==="styles"||r==="nodes"||r==="components"||e.push(`${r}: ${JSON.stringify(n)}`);e.push("tree:");for(let r of t.nodes??[])A$(r,1,e);return e}function n4(t){let e=[];for(let[r,n]of Object.entries(t))r!=="dsl"&&e.push(`${r}: ${JSON.stringify(n)}`);return R$(t.dsl,e),e.join(`
|
|
110
|
+
`)}var o4=new Set(["type","id","name","nodeCount","x","y","width","height","layoutStyle"]);function i4(t){let e=[],r=Array.isArray(t.sections)?t.sections:[];for(let[n,o]of Object.entries(t))n!=="sections"&&e.push(`${n}: ${JSON.stringify(o)}`);return e.push("sections:"),r.forEach((n,o)=>{let i=n.layoutStyle??{},s=n.width??i.width,a=n.height??i.height,c=n.x??i.relativeX,l=n.y??i.relativeY,p=[];Yi(p,"nodeCount",n.nodeCount),e.push(` [${o}] ${n.type??"?"} ${n.id??"?"} ${du(n.name)} ${Qn(s)}x${Qn(a)} @${Qn(c)},${Qn(l)}`+(p.length?" "+p.join(" "):""));for(let[d,f]of Object.entries(n))o4.has(d)||f===void 0||e.push(` ${d}=${JSON.stringify(f)}`)}),e.join(`
|
|
111
|
+
`)}function s4(t){let e=[];for(let[n,o]of Object.entries(t))n!=="svgs"&&e.push(`${n}: ${JSON.stringify(o)}`);let r=Array.isArray(t.svgs)?t.svgs:[];return r.length===0?(e.push("svgs: []"),e.join(`
|
|
112
|
+
`)):(e.push("svgs:"),r.forEach((n,o)=>{e.push(` [${o}] ${du(n.name)} (${n.id??"?"})`);let i=n.svg;if(typeof i=="string"&&!i.includes(`
|
|
112
113
|
`))e.push(` ${i}`);else if(typeof i=="string")if(i==="")e.push(' ""');else for(let s of i.split(`
|
|
113
114
|
`))e.push(" "+s);else e.push(` ${JSON.stringify(i)}`)}),e.join(`
|
|
114
|
-
`))}function
|
|
115
|
-
`)}function
|
|
116
|
-
`)){
|
|
117
|
-
`))
|
|
115
|
+
`))}function a4(t){let e=[],r=Ko(t.svgs)?"svgs":Ko(t.texts)?"texts":null;for(let[n,o]of Object.entries(t))n!==r&&e.push(`${n}: ${JSON.stringify(o)}`);if(r){let n=t[r],o=Object.entries(n);if(o.length===0)e.push(`${r}: {}`);else{e.push(`${r}:`);for(let[i,s]of o)c4(i,s," ",e)}}return e.join(`
|
|
116
|
+
`)}function c4(t,e,r,n){if(typeof e=="string"&&!e.includes(`
|
|
117
|
+
`)){n.push(`${r}${t}: ${e}`);return}n.push(`${r}${t}:`);let o=r+" ";if(typeof e=="string")if(e==="")n.push(`${o}""`);else for(let i of e.split(`
|
|
118
|
+
`))n.push(o+i);else n.push(`${o}${JSON.stringify(e)}`)}function A$(t,e,r){let n=" ".repeat(e),o=t.layoutStyle??{},i=`${Qn(o.width)}x${Qn(o.height)}`,s=`@${Qn(o.relativeX)},${Qn(o.relativeY)}`,a=[];for(let[l,p]of Object.entries(o))t4.has(l)||p===void 0||p===null||a.push(`${l}=${p}`);Yi(a,"fill",t.fill),t.strokeColor?a.push(`stroke=${t.strokeColor}${t.strokeWidth?"/"+t.strokeWidth:""}`):t.strokeWidth&&Yi(a,"strokeWidth",t.strokeWidth),Yi(a,"strokeType",t.strokeType),Yi(a,"strokeAlign",t.strokeAlign),Yi(a,"component",t.componentId),r.push(`${n}${t.type??"?"} ${t.id??"?"} ${du(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))r.push(`${n} prop ${p}=${JSON.stringify(d)}`);for(let[p,d]of Object.entries(c))p==="properties"||d===void 0||r.push(`${n} ${p}=${JSON.stringify(d)}`)}if(t.flexContainerInfo!==void 0&&r.push(`${n} 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);r.push(`${n} text ${du(d)}${l!=null&&l.font?` font=${l.font}`:""}`)}t.textColor!==void 0&&r.push(`${n} textColor ${JSON.stringify(t.textColor)}`);for(let[l,p]of Object.entries(t))e4.has(l)||p===void 0||r.push(`${n} ${l}=${JSON.stringify(p)}`);if(Array.isArray(t.children))for(let l of t.children)A$(l,e+1,r)}function Yi(t,e,r){r!=null&&r!==""&&t.push(`${e}=${r}`)}function Qn(t){return t==null?"?":String(t)}function du(t){return'"'+(t==null?"":String(t)).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}var ja=new Set,Jo=new Map,Da=new Map,l4=parseInt(process.env.SECTION_TRACKER_MAX_ENTRIES||"1000",10),I$=parseInt(process.env.SECTION_TRACKER_TTL_MS||"1800000",10),$n=new Map;function xy(t){if($n.has(t))$n.delete(t);else if($n.size>=l4){let e=$n.keys().next().value;e!==void 0&&(ja.delete(e),Jo.delete(e),Da.delete(e),$n.delete(e))}$n.set(t,Date.now())}setInterval(()=>{let t=Date.now();for(let[e,r]of $n)t-r>I$&&(ja.delete(e),Jo.delete(e),Da.delete(e),$n.delete(e))},I$).unref();function P$(t,e){let r=`${t}:${e}`;ja.add(r),xy(r)}function C$(t,e,r){let n=`${t}:${e}`;Da.set(n,r),Jo.has(n)||Jo.set(n,new Set),xy(n)}function O$(t,e,r){let n=`${t}:${e}`,o=Da.get(n);if(o===void 0)return null;let i=Jo.get(n)??new Set;i.add(r),Jo.set(n,i),xy(n);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 z$(t,e){let r=`${t}:${e}`;ja.delete(r),Jo.delete(r),Da.delete(r),$n.delete(r)}var u4=`
|
|
118
119
|
[FALLBACK] Use only when mcp__getDesignSections is unavailable or returns an error.
|
|
119
120
|
This returns the FULL DSL in one response \u2014 may be large and exceed context limits for complex designs.
|
|
120
121
|
Prefer mcp__getDesignSections as the primary tool for all designs.
|
|
@@ -124,12 +125,12 @@ You can provide either:
|
|
|
124
125
|
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.
|
|
125
126
|
This tool also returns the rules you must follow when generating code.
|
|
126
127
|
The DSL data can also be used to transform and generate code for different frameworks.
|
|
127
|
-
`,
|
|
128
|
+
`,fu=class extends it{constructor(){super();this.description=u4;this.schema=G.object({fileId:G.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:G.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:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:G.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),format:pn()})}get name(){return kt("getDsl")}async execute({fileId:r,layerId:n,sourceLayerId:o,shortLink:i,format:s}){var a;try{if(!i&&(!r||!n&&!o))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a MasterGo URL");let c=this.normalizeFileId(r),l=n,p=o;if(i){let g=await Ve.extractIdsFromUrl(i);c=this.normalizeFileId(g.fileId),l=g.layerId,p=g.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(ja.has(f))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:nr("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 m=await Ve.getDsl(c,d,{sourceLayerId:p});return{content:[{type:"text",text:dn(m,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 eo=Ee(require("path")),to=require("fs"),Xi=require("fs/promises");var p4=`
|
|
128
129
|
\u4F7F\u7528\u6B64\u5DE5\u5177\u4ECE MasterGo \u83B7\u53D6 D2C \u6570\u636E\uFF0C\u5E76\u5728\u672C\u5730\u843D\u76D8\uFF1A
|
|
129
130
|
1\uFF09\u5C06\u8FD4\u56DE\u7684 code \u5199\u5165 html\uFF1B
|
|
130
131
|
2\uFF09\u5C06\u8FD4\u56DE\u7684 svg / image \u8D44\u6E90\u6309 resourcePath \u843D\u76D8\u5230\u5BF9\u5E94\u76EE\u5F55\uFF1B
|
|
131
132
|
3\uFF09\u8FD4\u56DE\u843D\u76D8\u6458\u8981\uFF0C\u907F\u514D\u628A\u5927\u4F53\u79EF\u8D44\u6E90\u585E\u8FDB\u4E0A\u4E0B\u6587\u3002
|
|
132
|
-
`;function
|
|
133
|
+
`;function vy(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 d4(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 mu(t){for(let e of t)if(d4(e))return e}function f4(t){let e={image:"asset/images",svg:"asset/icons"};if(!vy(t))try{let r=typeof t=="string"?JSON.parse(t):t;r.image&&(e.image=String(r.image).replace(/^(\.\/|\/)/,"").replace(/\/+$/,"")),r.svg&&(e.svg=String(r.svg).replace(/^(\.\/|\/)/,"").replace(/\/+$/,""))}catch{return e}return e}async function N$(t,e,r,n){if(vy(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=eo.default.join(e,r);(0,to.existsSync)(s)||(0,to.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,"_"),m=d?d[2]:n,g=eo.default.join(s,`${f}.${m}`),x=p;try{if(typeof x=="string"&&x.startsWith("http"))try{let b=await yt.get(x,{responseType:"arraybuffer",timeout:3e4});await(0,Xi.writeFile)(g,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"))&&x.startsWith("https://")){let k=x.replace(/^https:\/\//,"http://"),E=await yt.get(k,{responseType:"arraybuffer",timeout:3e4});await(0,Xi.writeFile)(g,E.data),a+=1;return}c+=1;return}if(typeof x=="string"&&x.startsWith("data:image/")){let b=x.split(";base64,");b.length===2&&(await(0,Xi.writeFile)(g,b[1],"base64"),a+=1);return}let v=typeof x=="object"?JSON.stringify(x,null,2):String(x??"");await(0,Xi.writeFile)(g,v,m==="png"||m==="jpg"||m==="jpeg"?"base64":"utf8"),a+=1}catch{c+=1;return}})),{savedCount:a,attemptedCount:i.length,errorCount:c}}async function m4(t){let{outDir:e,contentId:r,code:n,resourcePath:o,svg:i,image:s}=t,a=e?eo.default.isAbsolute(e)?eo.default.join(e):eo.default.join(process.cwd(),e):process.cwd();(0,to.existsSync)(a)||(0,to.mkdirSync)(a,{recursive:!0});let c=`${r||"index"}.html`,l=eo.default.join(a,c);vy(n)||await(0,Xi.writeFile)(l,n,"utf8");let p=f4(o),d=g=>{let x=eo.default.join(a,g);(0,to.existsSync)(x)||(0,to.mkdirSync)(x,{recursive:!0})};d(p.image),d(p.svg);let[f,m]=await Promise.all([N$(i,a,p.svg,"svg"),N$(s,a,p.image,"png")]);return{targetDir:a,htmlFileName:c,htmlPath:l,svgCount:f.savedCount,imageCount:m.savedCount,resourcePathMap:p}}function h4(t){var l,p;let e=t==null?void 0:t.data,r=Array.isArray(e)?e[0]:void 0,n=(r==null?void 0:r.payload)??(t==null?void 0:t.payload)??((l=t==null?void 0:t.data)==null?void 0:l.payload)??((p=r==null?void 0:r.payload)==null?void 0:p.payload)??(e==null?void 0:e.payload)??{},o=(n==null?void 0:n.code)??(n==null?void 0:n.html)??(n==null?void 0:n.content)??(t==null?void 0:t.code)??"",i=mu([n==null?void 0:n.resourcePath,t==null?void 0:t.resourcePath,r==null?void 0:r.resourcePath]),s=mu([n==null?void 0:n.image,r==null?void 0:r.image]),a=mu([n==null?void 0:n.svg,r==null?void 0:r.svg]),c=mu([n==null?void 0:n.shape,r==null?void 0:r.shape]);return{contentId:String((r==null?void 0:r.contentId)??(n==null?void 0:n.contentId)??(t==null?void 0:t.contentId)??""),frameType:(n==null?void 0:n.frameType)??(r==null?void 0:r.frameType)??(t==null?void 0:t.frameType),code:String(o??""),resourcePath:i,shape:c,svg:a,image:s}}var hu=class extends it{constructor(){super();this.description=p4;this.schema=G.object({contentId:G.string().describe("MasterGo D2C contentId\uFF0C\u4F8B\u5982 mastergo://getd2c/176452330285910-2-2845 \u4E2D\u7684 176452330285910-2-2845\u3002"),documentId:G.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:G.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")})}get name(){return kt("getD2c")}async execute({contentId:r,documentId:n,outDir:o}){var i;try{if(!r)throw new Error("contentId \u4E0D\u80FD\u4E3A\u7A7A");if(!n)throw new Error("documentId \u4E0D\u80FD\u4E3A\u7A7A");let s=await Ve.getD2c(r,n),a=h4(s),c=a.contentId||r,l=await m4({outDir:o,contentId:c,code:a.code,resourcePath:a.resourcePath,svg:a.svg,image:a.image}),p={contentId:c,documentId:n,frameType:a.frameType,targetDir:l.targetDir,htmlFileName:l.htmlFileName,htmlPath:l.htmlPath,resourcePathMap:l.resourcePathMap,savedFiles:{svg:l.svgCount,image:l.imageCount},message:`D2C \u8D44\u6E90\u5DF2\u843D\u76D8\u5230 ${l.htmlPath}\u3002HTML \u6587\u4EF6\u540D\uFF1A${l.htmlFileName}\u3002SVG \u8D44\u6E90 ${l.svgCount} \u4E2A\uFF0C\u56FE\u7247\u8D44\u6E90 ${l.imageCount} \u4E2A\u3002\u53EF\u76F4\u63A5\u6253\u5F00 html \u6587\u4EF6\u67E5\u770B\u6548\u679C\u3002`};return{content:[{type:"text",text:JSON.stringify(p)}]}}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 by=Ee(require("fs"));var L$=10*1024*1024,g4=`
|
|
133
134
|
\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
|
|
134
135
|
|
|
135
136
|
\u53C2\u6570\u8BF4\u660E\uFF1A
|
|
@@ -141,7 +142,7 @@ The DSL data can also be used to transform and generate code for different frame
|
|
|
141
142
|
\u5982\u679C\u77ED\u94FE\u63A5\u6216 URL \u4E2D\u6CA1\u6709\u89E3\u6790\u51FA layer_id\uFF0C\u5219\u4E0D\u4F20 layerId\u3002
|
|
142
143
|
|
|
143
144
|
\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
|
|
144
|
-
`,
|
|
145
|
+
`,gu=class extends it{constructor(){super();this.description=g4;this.schema=G.object({filePath:G.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:G.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:G.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:G.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK).")})}get name(){return kt("C2d")}async execute({filePath:r,fileId:n,layerId:o,shortLink:i}){var s;try{let a=i==null?void 0:i.trim(),c=n==null?void 0:n.trim(),l=o==null?void 0:o.trim(),p,d;if(a){let g=await Ve.extractIdsFromUrl(a);p=this.normalizeFileId(g.fileId),d=g.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{let g=await by.default.promises.stat(r);if(!g.isFile())throw new Error(`\u8DEF\u5F84\u4E0D\u662F\u6587\u4EF6: ${r}`);if(g.size>L$)throw new Error(`\u6587\u4EF6\u8FC7\u5927\uFF08${(g.size/1024/1024).toFixed(1)}MB > ${L$/1024/1024}MB \u4E0A\u9650\uFF09: ${r}`);f=await by.default.promises.readFile(r,"utf-8")}catch(g){let x=g instanceof Error?g.message:String(g);throw new Error(`\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6 ${r}: ${x}`)}let m=await Ve.postC2d(f,p,d);return{content:[{type:"text",text:JSON.stringify(m)}]}}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 y4="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.",yu=class extends it{constructor(){super();this.description=y4;this.schema=G.object({url:G.string().describe("Component documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid")})}get name(){return kt("getComponentLink")}async execute({url:r}){try{return{content:[{type:"text",text:`${await Ve.request({method:"GET",url:r})}`}]}}catch(n){return{content:[{type:"text",text:JSON.stringify({error:"Failed to get component documentation",message:n instanceof Error?n.message:String(n)})}]}}}};var j$=`The \`results\` returns an XML file, which contains two types of information:
|
|
145
146
|
|
|
146
147
|
- **meta**: Describes the site, environment, requirements, and other context.
|
|
147
148
|
- **action**: Corresponds to the entry page name and \`targetLayerId\`, which is the ID of the target page.
|
|
@@ -227,12 +228,12 @@ Repeat this process until the page data no longer contains the \`interactive\` f
|
|
|
227
228
|
Then, process the 0:2 page and repeat the steps for the 0:1 page.
|
|
228
229
|
|
|
229
230
|
After completion, generate the project code sequentially according to the page list in task.md.
|
|
230
|
-
`;var
|
|
231
|
+
`;var v4=`
|
|
231
232
|
Use this tool when the user intends to build a complete website or needs to obtain high-level site
|
|
232
233
|
configuration information. You must provide a fileld and layerld to identify the specific design element.
|
|
233
234
|
This tool returns the rules and results of the site and page. The rules is a markdown file, you must
|
|
234
235
|
follow the rules and use the results to analyze the site and page.
|
|
235
|
-
`,
|
|
236
|
+
`,xu=class extends it{constructor(){super();this.description=v4;this.schema=G.object({fileId:G.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:G.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),format:pn()})}get name(){return kt("getMeta")}async execute({fileId:r,layerId:n,sourceLayerId:o,format:i}){var s;try{let a=await Ve.getMeta(r,n,o);return{content:[{type:"text",text:dn({result:a,rules:nr(j$)},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 Qi=Ee(require("fs"));var D$=`---
|
|
236
237
|
description:
|
|
237
238
|
globs:
|
|
238
239
|
alwaysApply: true
|
|
@@ -543,13 +544,13 @@ AI must analyze component design and infer:
|
|
|
543
544
|
- **Tests**: Coverage for all features, edge cases, slots and states
|
|
544
545
|
- **Implementation**: Renders correctly, properties work, state management complies with specifications, styles applied correctly, slot functionality works
|
|
545
546
|
- **Documentation**: Feature documentation complete, examples available, API reference complete, slot usage documentation complete
|
|
546
|
-
`;function
|
|
547
|
+
`;function M$(t){let e=0,r=[],n=()=>{e--;let o=r.shift();o&&(e++,o())};return async function(o){e>=t?await new Promise(i=>r.push(i)):e++;try{return await o()}finally{n()}}}var _4=32,w4=8,S4=`
|
|
547
548
|
Users need to actively call this tool to get the component development workflow. When Generator is mentioned, please actively call this tool.
|
|
548
549
|
This tool provides a structured workflow for component development following best practices.
|
|
549
550
|
You must provide an absolute rootPath of workspace to save workflow files.
|
|
550
|
-
`,
|
|
551
|
+
`,vu=class extends it{constructor(){super();this.description=S4;this.schema=G.object({rootPath:G.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:G.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:G.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries.")})}get name(){return kt("getComponentGenerator")}async execute({rootPath:r,fileId:n,layerId:o,sourceLayerId:i}){var m;let s=`${r}/.mastergo/`;await Qi.default.promises.mkdir(s,{recursive:!0});let a=`${s}/component-workflow.md`,c=await Ve.getComponentStyleJson(n,o,i),l=`${s}/${c[0].name}.json`,p=M$(_4),d=M$(w4),f=async g=>{if(g.path&&g.path.length>0){g.imageUrls=[];let x=g.id.replaceAll("/","&").replaceAll(":","_"),v=`${s}/images`;await Qi.default.promises.mkdir(v,{recursive:!0});let y=[];for(let b=0;b<g.path.length;b++){let w=g.path[b],k=`${v}/${x}-${b}.svg`,E=`<svg width="100%" height="100%" viewBox="0 0 16 16"xmlns="http://www.w3.org/2000/svg">
|
|
551
552
|
<path d="${w}" fill="currentColor"/>
|
|
552
|
-
</svg>`;
|
|
553
|
+
</svg>`;y.push(p(()=>Qi.default.promises.writeFile(k,E,{flag:"wx"}).catch(()=>{}))),g.imageUrls.push(k)}await Promise.all(y),delete g.path}g.children&&await Promise.all(g.children.map(x=>d(()=>f(x))))};await f(c[0]);try{await Qi.default.promises.writeFile(a,D$,{flag:"wx"})}catch{}await Qi.default.promises.writeFile(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(g){let x=((m=g.response)==null?void 0:m.data)??(g==null?void 0:g.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(x)}]}}}};var xt=Ee(require("fs")),Zt=Ee(require("path")),Z$=Ee(require("crypto"));var B$=Ee(require("https"));var F$=`---
|
|
553
554
|
description:
|
|
554
555
|
globs:
|
|
555
556
|
alwaysApply: true
|
|
@@ -1232,27 +1233,39 @@ lib/utils/ui/
|
|
|
1232
1233
|
- **Analysis**: DSL fully parsed, widget tree planned, resources inventoried
|
|
1233
1234
|
- **Implementation**: Renders correctly, dimensions adapted, colors accurate, assets loaded
|
|
1234
1235
|
- **Quality**: No hardcoded values, proper decomposition, RTL-ready, safe area handled
|
|
1235
|
-
`;var
|
|
1236
|
+
`;var T4=`
|
|
1236
1237
|
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.
|
|
1237
1238
|
This tool provides a structured workflow for Flutter component development following best practices.
|
|
1238
1239
|
It includes MasterGo DSL to Flutter Widget mapping rules, screen adaptation with flutter_screenutil, and feature-based architecture guidance.
|
|
1239
1240
|
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.
|
|
1240
1241
|
You must provide an absolute rootPath of workspace to save workflow files.
|
|
1241
|
-
`,
|
|
1242
|
-
`+
|
|
1242
|
+
`,E4=15e3,U$=2,$4=6,wy=50*1024*1024,H$=["png","jpg","jpeg","webp","svg","gif","bmp"],V$=new B$.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});function es(t){return String(t??"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/\.{2,}/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"")||"unnamed"}function R4(t){return Z$.default.createHash("md5").update(t).digest("hex").slice(0,10)}function A4(t){try{let r=new URL(t,"https://placeholder.local").pathname.match(/\.([a-zA-Z0-9]+)$/);if(r&&H$.includes(r[1].toLowerCase()))return r[1].toLowerCase()}catch{}}function Sy(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 _y(t){xt.default.existsSync(t)||xt.default.mkdirSync(t,{recursive:!0})}function G$(t){return/^https?:\/\//i.test(t)}function ky(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 r=new URL(e).pathname.toLowerCase();if(H$.some(n=>r.endsWith(`.${n}`))||r.includes("/image/")||r.includes("/img/")||r.includes("/picture/")||e.includes("x-oss-process=image")||e.includes("imageView")||e.includes("format,")||r.includes("/thumbnail/")||e.includes("mastergo")&&(r.includes("/resource/")||r.includes("/file/"))||e.match(/[?&](w|width|h|height|resize|format)=/i))return!0}catch{}return!1}async function I4(t,e){var n;if(!G$(t))throw new Error(`Blocked unsafe URL: ${t}`);let r;for(let o=0;o<=U$;o++)try{let i=await yt.get(t,{responseType:"arraybuffer",timeout:E4,httpsAgent:V$,maxRedirects:5,maxContentLength:wy}),s=`${e}.tmp`;await xt.default.promises.writeFile(s,Buffer.from(i.data)),await xt.default.promises.rename(s,e);return}catch(i){r=i;let s=(n=i==null?void 0:i.response)==null?void 0:n.status;if(s&&s>=400&&s<500)throw r;o<U$&&await new Promise(a=>setTimeout(a,500*(o+1)))}throw r}async function P4(t,e){let r=t.match(/^data:([^;]+);base64,(.+)$/);if(!r)throw new Error("Unsupported data URL format");let n=r[1],o=r[2];if(o.length>wy*1.37)throw new Error(`Data URL too large: ${(o.length/1024/1024).toFixed(1)}MB (max ${wy/1024/1024}MB)`);let i=Sy(n),s=e.endsWith(`.${i}`)?e:`${e}.${i}`;return await xt.default.promises.writeFile(s,Buffer.from(o,"base64")),s}async function C4(t,e,r){let n=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;n[s]=await r(t[s],s)}});return await Promise.all(i),n}function O4(t,e){let r=Zt.default.join(t,"pubspec.yaml");if(!xt.default.existsSync(r))return"no-pubspec";let n=xt.default.readFileSync(r,"utf-8"),o=` - ${e}/`;if(n.split(/\r?\n/).some(c=>c.trimEnd()===o.trimEnd()))return"exists";let s=n,a=/^(flutter:[\s\S]*?)(?=^\S|$)/m.exec(n);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=n.slice(0,p)+`${o}
|
|
1243
|
+
`+n.slice(p)}else{let p=a.index+c.length,d=(c.endsWith(`
|
|
1243
1244
|
`)?"":`
|
|
1244
1245
|
`)+` assets:
|
|
1245
1246
|
${o}
|
|
1246
|
-
`;s=
|
|
1247
|
+
`;s=n.slice(0,p)+d+n.slice(p)}}else{let c=(n.endsWith(`
|
|
1247
1248
|
`)?"":`
|
|
1248
1249
|
`)+`
|
|
1249
1250
|
flutter:
|
|
1250
1251
|
assets:
|
|
1251
1252
|
${o}
|
|
1252
|
-
`;s=
|
|
1253
|
-
`);
|
|
1254
|
-
${
|
|
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 F$(t,e,n,r,o){let i=E4(t,e,n,r);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${Yi(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=>F$(s,e,n,r,o))}function vy(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(n=>vy(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"&&vy(r,e)}}var hu=class extends ht{constructor(){super();this.name=f4;this.description=m4;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");my(p),my(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?Yi(s):"")||Yi(y)||Yi(o)||"component",m=qt.default.join(p,`${x}.json`),b=`assets/image/${x}`,w=qt.default.join(n,b);my(w);let k=[];F$(h,d,w,b,k);let E=new Map;if(xy(h,"",E,l),l.length>0){let B=await k4(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 _4(F,g4,async B=>{var ge;let qe=y4(B.url),De=x4(B.url),it=`${Yi(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=gy(Tt);let Et=`${it}.${De}`,Te=qt.default.join(d,Et);gt.default.existsSync(Te)||await b4(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(!M$(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!De)try{let Tt=await vt.head(B.url,{timeout:5e3,httpsAgent:D$,maxRedirects:5});De=gy(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 v4(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=w4(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);vy(h,bt);let Ve=oe.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),ae=T4(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,P$);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 Xi={name:"@mastergo/magic-mcp",version:"0.2.6",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 test/cache-invalidate.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 .test/cache-invalidate.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 R4=`version_${Xi.version.replace(/\./g,"_")}`,A4=`the current version is ${Xi.version}`,gu=class extends ht{constructor(){super();this.name=R4;this.description=A4;this.schema=Y.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(Xi.version)}]}}};var C4="mcp__getDesignSections",I4=`
|
|
1253
|
+
`;s=n+c}return xt.default.writeFileSync(r,s),"added"}function z4(t){let e=[],r=[];if(!t||typeof t!="string")return{urls:e,lostFragments:r};let n=/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,o;for(;(o=n.exec(t))!==null;){let i=(o[1]??o[2]??o[3]??"").trim();if(i){if(i==="[object Object]"||i.includes("[object Object]")){r.push(o[0]);continue}e.push(i)}}return{urls:e,lostFragments:r}}function Ty(t,e,r,n){if(!t||typeof t!="object")return;if(Array.isArray(t)){t.forEach((i,s)=>Ty(i,`${e}[${s}]`,r,n));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}=z4(s);for(let p of c){let d=p.startsWith("data:image/")?"data":"remote",f=p.startsWith("//")?`https:${p}`:p;(d==="data"||ky(f))&&(r.has(f)||r.set(f,{token:a,url:f,kind:d}))}for(let p of l)n.push({nodeId:o,token:a,rawCssFragment:p})}else if(s.startsWith("data:image/"))r.has(s)||r.set(s,{token:a,url:s,kind:"data"});else if(s.startsWith("http")||s.startsWith("//")){let c=s.startsWith("//")?`https:${s}`:s;ky(c)&&!r.has(c)&&r.set(c,{token:a,url:c,kind:"remote"})}}else s&&typeof s=="object"&&Ty(s,a,r,n)}}function q$(t){let e=t.match(/paint_(\d+):(\d+)/);return e?Number(e[2]):Number.MAX_SAFE_INTEGER}async function N4(t,e,r,n){var o;try{let i=await Ve.getDsl(t,e,r?{sourceLayerId:r}: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)=>q$(p)-q$(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,m)=>{let g=typeof(f==null?void 0:f.url)=="string"?f.url:"";!g||!ky(g)||l.push({token:`dsl.styles.${p}.value[${m}].url`,url:g,kind:"remote"})})}return l}catch(i){return n.push(`DSL fallback fetch failed: ${(i==null?void 0:i.message)??String(i)}`),[]}}function L4(t,e){if(!e.length)return 0;let r=0,n=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(r>=e.length)return c;let l=e[r++];return n++,`url(${l})`}):a&&typeof a=="object"&&o(a)}};return o(t),n}function j4(t,e,r,n){if(!Array.isArray(t==null?void 0:t.path)||t.path.length===0)return null;let o=es(String(t.id??"icon")),i=t.width??16,s=t.height??16,c=t.path.length===1,l=`${o}.svg`,p=Zt.default.join(e,l),d=!1;if(!xt.default.existsSync(p)){let m=t.path.map((g,x)=>{var y,b,w,k;let v="currentColor";if(!c){let E=((b=(y=t.fills)==null?void 0:y[x])==null?void 0:b.color)??((k=(w=t.strokes)==null?void 0:w[x])==null?void 0:k.color);E&&(v=`rgb(${Math.round((E.r??0)*255)},${Math.round((E.g??0)*255)},${Math.round((E.b??0)*255)})`)}return` <path d="${g}" fill="${v}"/>`}).join(`
|
|
1254
|
+
`);xt.default.writeFileSync(p,`<svg width="${i}" height="${s}" viewBox="0 0 ${i} ${s}" xmlns="http://www.w3.org/2000/svg">
|
|
1255
|
+
${m}
|
|
1256
|
+
</svg>`),d=!0}let f=Zt.default.join(r,l);return xt.default.existsSync(f)||xt.default.copyFileSync(p,f),{flutterPath:`${n}/${l}`,localPath:p,needsColorFilter:c,created:d}}function W$(t,e,r,n,o){let i=j4(t,e,r,n);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${es(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=>W$(s,e,r,n,o))}function Ey(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(r=>Ey(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"&&Ey(n,e)}}var bu=class extends it{constructor(){super();this.description=T4;this.schema=G.object({rootPath:G.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:G.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:G.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),featureName:G.string().optional().describe("Optional feature directory name under assets/image/ and the Flutter feature module. Defaults to the root component name.")})}get name(){return kt("getFlutterGenerator")}async execute({rootPath:r,fileId:n,layerId:o,sourceLayerId:i,featureName:s}){let a=[],c=[],l=[];if(!Zt.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=Zt.default.resolve(r,".mastergo"),d=Zt.default.join(p,"images");_y(p),_y(d);let f=await Ve.getComponentStyleJson(n,o,i),m=(f==null?void 0:f[0])??{},g=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 v=(s?es(s):"")||es(g)||es(o)||"component",y=Zt.default.join(p,`${v}.json`),b=`assets/image/${v}`,w=Zt.default.join(r,b);_y(w);let k=[];W$(m,d,w,b,k);let E=new Map;if(Ty(m,"",E,l),l.length>0){let B=await N4(n,o,i,a);for(let qe of B)E.has(qe.url)||E.set(qe.url,qe)}let F=Array.from(E.values()),L={discovered:F.length,downloaded:0,skipped:0,failed:0,recovered:0,lost:l.length,byFormat:{}},me=await C4(F,$4,async B=>{var ge;let qe=R4(B.url),De=A4(B.url),at=`${es(B.token.replace(/:/g,"_"))||"asset"}_${qe}`;try{if(B.kind==="data"){let Et=(ge=B.url.match(/^data:([^;]+);base64,/))==null?void 0:ge[1];De=Sy(Et);let $t=`${at}.${De}`,Te=Zt.default.join(d,$t);xt.default.existsSync(Te)||await P4(B.url,Zt.default.join(d,at));let Ht=Zt.default.join(w,$t);return xt.default.existsSync(Ht)||await xt.default.promises.copyFile(Te,Ht),L.downloaded++,L.byFormat[De]=(L.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:Te,flutterPath:`${b}/${$t}`,format:De,status:"downloaded"}}if(!G$(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!De)try{let Et=await yt.head(B.url,{timeout:5e3,httpsAgent:V$,maxRedirects:5});De=Sy(String(Et.headers["content-type"]??""))}catch{De="png"}let ke=`${at}.${De}`,dt=Zt.default.join(d,ke);if(xt.default.existsSync(dt)){let Et=Zt.default.join(w,ke);return xt.default.existsSync(Et)||await xt.default.promises.copyFile(dt,Et),L.skipped++,L.byFormat[De]=(L.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:dt,flutterPath:`${b}/${ke}`,format:De,status:"skipped"}}await I4(B.url,dt);let Oe=Zt.default.join(w,ke);return await xt.default.promises.copyFile(dt,Oe),L.downloaded++,L.byFormat[De]=(L.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:dt,flutterPath:`${b}/${ke}`,format:De,status:"downloaded"}}catch(ke){let dt=(ke==null?void 0:ke.message)??String(ke);return L.failed++,c.push({token:B.token,url:B.url,error:dt}),a.push(`Failed to download ${B.token}: ${dt}`),{token:B.token,sourceUrl:B.url,localPath:"",flutterPath:"",format:De??"unknown",status:"failed",error:dt}}});for(let B of k)L.discovered++,B.status==="downloaded"?L.downloaded++:L.skipped++,L.byFormat.svg=(L.byFormat.svg??0)+1;let ee=[...me,...k],Re=O4(r,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 ee)B.status!=="failed"&&B.flutterPath&&B.sourceUrl&&bt.set(B.sourceUrl,B.flutterPath);Ey(m,bt);let Ge=ee.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),de=L4(m,Ge);L.recovered=de,L.lost=Math.max(0,L.lost-de),de>0&&a.push(`Recovered ${de} lost image placeholder(s) via DSL styles paint fallback.`);let et=l.slice(de);xt.default.writeFileSync(y,JSON.stringify(m,null,2));let H=Zt.default.join(p,"flutter-component-workflow.md");xt.default.existsSync(H)||xt.default.writeFileSync(H,F$);let It=Zt.default.join(p,"assets-manifest.json"),Bt={fileId:n,layerId:o,featureName:v,generatedAt:new Date().toISOString(),summary:L,assets:ee.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:et};xt.default.writeFileSync(It,JSON.stringify(Bt,null,2));let Gr=b,Ce=et.length>0?nr(`WARNING: ${et.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(et.map(B=>B.nodeId))).slice(0,20).join(", ")}${et.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:H,componentSpec:y,assetDir:d,flutterAssetDir:w,assetManifest:It},assetSummary:L,failedAssets:c,lostImageRefs:et.slice(0,50),warnings:a,message:`Flutter component files created. ${L.downloaded} downloaded, ${L.skipped} skipped, ${L.failed} failed, ${L.recovered} recovered, ${L.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://${H} 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://${y}, ensuring all properties and states are properly handled.`,`All image URLs in the component spec have been replaced with Flutter asset paths under ${Gr}/. 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://${It} 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.`]:[],...Ce?[Ce]:[]]})}]}}};var ts={name:"@mastergo/magic-mcp",version:"0.2.8",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 test/cache-invalidate.test.ts test/tool-prefix.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 .test/cache-invalidate.test.cjs .test/tool-prefix.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 M4=`version_${ts.version.replace(/\./g,"_")}`,F4=`the current version is ${ts.version}`,_u=class extends it{constructor(){super();this.name=M4;this.description=F4;this.schema=G.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(ts.version)}]}}};var U4=`
|
|
1257
|
+
BEFORE calling this tool, CHECK the layerId:
|
|
1258
|
+
- If layerId has NO colon and no digits (e.g. "M", or any short non-numeric id), it is likely a
|
|
1259
|
+
PAGE-level id, NOT a layer id. Page-level ids return EMPTY from this tool (they cannot be
|
|
1260
|
+
enumerated via /container).
|
|
1261
|
+
\u2192 STOP. Call mcp__getPageLayers with the same fileId+layerId first to enumerate the real
|
|
1262
|
+
layer_ids, then restore each one individually.
|
|
1263
|
+
- Only proceed with THIS tool when layerId looks like a real layer id (contains a colon and
|
|
1264
|
+
digits, e.g. "802:02364", "453:6855").
|
|
1265
|
+
This check is MANDATORY when the user's URL contains ?page_id= (not ?layer_id=). If you ignore
|
|
1266
|
+
this and call this tool with a page-level id, the server will return an error redirecting you to
|
|
1267
|
+
mcp__getPageLayers anyway \u2014 so save the round-trip and call getPageLayers first.
|
|
1268
|
+
|
|
1256
1269
|
[PRIMARY] This is the main tool for all designs. Operates in TWO modes:
|
|
1257
1270
|
|
|
1258
1271
|
Mode 1 \u2014 Get layout overview (sectionIndex NOT provided):
|
|
@@ -1285,14 +1298,41 @@ If this tool returns an error (e.g. old server), fall back to mcp__getDsl.
|
|
|
1285
1298
|
You can provide either:
|
|
1286
1299
|
1. fileId and layerId directly, or
|
|
1287
1300
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1288
|
-
`,P4=["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 `svgShortKey` field (a short sequential ID like `S0#0`, `S0#1`). The SVG markup is NOT in the DSL. You MUST place a placeholder `@@SVG:{svgShortKey}@@` 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:{svgShortKey}@@` placeholder.',"CRITICAL \u2014 RENDER EVERY ICON IN PATH NODES: Every PATH node has a `svgShortKey`. Place `@@SVG:{svgShortKey}@@` 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:{svgShortKey}@@` from the PATH node in its section. NEVER reuse a svgShortKey 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."],yu=class extends ht{constructor(){super();this.name=C4;this.description=I4;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=P4),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&&(S$(h,x),m&&typeof m=="object"&&typeof m.totalSections=="number"&&k$(h,x,m.totalSections)),s!==void 0&&m&&typeof m=="object"){let b=T$(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 O4="mcp__extractSvg",z4=`
|
|
1301
|
+
`,q4=["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 `svgShortKey` field (a short sequential ID like `S0#0`, `S0#1`). The SVG markup is NOT in the DSL. You MUST place a placeholder `@@SVG:{svgShortKey}@@` 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:{svgShortKey}@@` placeholder.',"CRITICAL \u2014 RENDER EVERY ICON IN PATH NODES: Every PATH node has a `svgShortKey`. Place `@@SVG:{svgShortKey}@@` 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:{svgShortKey}@@` from the PATH node in its section. NEVER reuse a svgShortKey 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."],wu=class extends it{constructor(){super();this.description=U4;this.schema=G.object({fileId:G.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided."),layerId:G.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided."),shortLink:G.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),sectionIndex:G.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:pn()}).passthrough()}get name(){return kt("getDesignSections")}async execute({fileId:r,layerId:n,shortLink:o,sourceLayerId:i,sectionIndex:s,format:a,...c}){var l,p,d;try{let f=Object.keys(c).filter(w=>!w.startsWith("_"));if(f.length>0){let w=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:w})}]}}if(!o&&(!r||!n&&!i))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let m=this.normalizeFileId(r),g=n,x=i,v;if(o){let w=await Ve.extractIdsFromUrl(o);m=this.normalizeFileId(w.fileId),g=w.layerId,x=w.sourceLayerId??i,v=w.fromPageParam}let y=x||g;if(!m||!y)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let b=await Ve.getDesignSections(m,y,s,v);if(s===void 0&&b&&typeof b=="object"&&(!b.rules||!Array.isArray(b.rules)||b.rules.length===0)&&(b.rules=q4.map(w=>nr(w))),s===void 0&&b&&typeof b=="object"&&typeof b.totalSections=="number"&&b.totalSections>0){let w=b.totalSections,k="",F=(Array.isArray(b.sections)?b.sections:[]).filter(pe=>pe&&typeof pe.structureSiblingCount=="number"&&pe.structureSiblingCount>1);if(F.length>0){let pe=Math.max(...F.map(me=>me.structureSiblingCount));k=` WARNING: ${F.length} sections have structureSiblingCount up to ${pe} \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.`}b.nextAction=nr(`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=${w-1} (total ${w} calls). Fetch ALL ${w} 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).${k} Skipping section DSL fetch is the #1 cause of missing menus, broken icons, and wrong data.`);let L=b.splitContainers;if(Array.isArray(L)&&L.length>0){let pe=parseInt(((l=b.rootContainer)==null?void 0:l.minHeight)??"",10)||900,me=L.filter(ee=>ee&&ee.height&&ee.height>=pe*.8&&ee.width&&ee.width<=300);if(me.length>=2){let ee=me.reduce((et,H)=>et+(H.width||0),0),Re=parseInt(((p=b.rootContainer)==null?void 0:p.width)??"",10)||1440,bt=ee,Ge=Re-ee,de=me.map(et=>et.name||et.id).join(", ");b.nextAction+=` LAYOUT: ${me.length} sidebar columns detected (${de}), total width=${ee}px. Main content must start at x=${bt} with width=${Ge}px. Do NOT let main content expand into sidebar space (no flex:1 without explicit max-width).`}}}if(s===void 0&&(P$(m,y),b&&typeof b=="object"&&typeof b.totalSections=="number"&&C$(m,y,b.totalSections)),s!==void 0&&b&&typeof b=="object"){let w=O$(m,y,s);if(w&&w.remaining>0){let k=w.missingIndices.length<=15?`[${w.missingIndices.join(",")}]`:`[${w.missingIndices.slice(0,10).join(",")}... +${w.missingIndices.length-10} more]`;b.fetchProgress=`Fetched ${w.fetched}/${w.total}. MISSING ${w.remaining} sections: ${k}. You MUST fetch ALL remaining sections before generating HTML. Do NOT stop early.`}else w&&w.remaining===0&&(b.fetchProgress=`ALL ${w.total} sections fetched. You can now generate the complete HTML.`)}return{content:[{type:"text",text:dn(b,a)}]}}catch(f){let m=((d=f.response)==null?void 0:d.data)??(f==null?void 0:f.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(m)}]}}}};var Z4="mcp__getPageLayers",B4=`
|
|
1302
|
+
List ALL layers under a given page (or any container layer) of a MasterGo design file.
|
|
1303
|
+
This is the ENUMERATION step of the multi-layer restoration workflow \u2014 it only lists
|
|
1304
|
+
layer_ids; it does NOT restore designs.
|
|
1305
|
+
|
|
1306
|
+
**Workflow (enumerate \u2192 build URLs \u2192 restore one by one):**
|
|
1307
|
+
1. Call this tool with the page_id / parent layerId to get the full layer list.
|
|
1308
|
+
2. Pick the top-level restorable layers from the result (FRAME/COMPONENT/INSTANCE at
|
|
1309
|
+
depth 0/1). For each, build a URL: https://mastergo.com/file/{fileId}?layer_id={id}
|
|
1310
|
+
(URL-encode the id, e.g. 802:02364 \u2192 802%3A02364).
|
|
1311
|
+
3. Restore them SEQUENTIALLY \u2014 take one layer_id, run the full single-layer restoration
|
|
1312
|
+
(mcp__getDesignSections \u2192 fetch all sections \u2192 mcp__applyDesign), write its HTML to its
|
|
1313
|
+
OWN separate .html file (a complete standalone document with <!DOCTYPE html>/<head>/<body>),
|
|
1314
|
+
THEN move to the next. Do NOT batch-restore. Do NOT merge multiple layers into one HTML file \u2014
|
|
1315
|
+
ONE layer = ONE standalone .html file.
|
|
1316
|
+
|
|
1317
|
+
You can provide either:
|
|
1318
|
+
1. fileId and layerId directly (layerId = the page's layerId, i.e. page_id), or
|
|
1319
|
+
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1320
|
+
|
|
1321
|
+
The returned layer list is lightweight: each entry has id, name, type, depth, parentId,
|
|
1322
|
+
childrenCount, width, height. It does NOT contain DSL/styles/SVG paths \u2014 use the section
|
|
1323
|
+
or DSL tools to restore each layer.
|
|
1324
|
+
|
|
1325
|
+
NOTE: This tool cannot enumerate a document's PAGE list from a fileId alone \u2014 you must
|
|
1326
|
+
already know a page_id / layerId to pass in. The synthetic page_id=M returns empty
|
|
1327
|
+
(page data not available via this API); use a real layer_id URL in that case.
|
|
1328
|
+
`,Su=class extends it{constructor(){super();this.name=Z4;this.description=B4;this.schema=G.object({fileId:G.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:G.string().optional().describe('Page layer ID to enumerate. This is the page_id from the MasterGo URL (e.g. "40:015"). Required if shortLink is not provided.'),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:G.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),format:pn()}).passthrough()}async execute({fileId:r,layerId:n,shortLink:o,sourceLayerId:i,format:s,...a}){var c;try{let l=Object.keys(a).filter(x=>!x.startsWith("_"));if(l.length>0){let x=`Unknown parameter(s): ${l.join(", ")}. This tool only accepts: fileId, layerId, sourceLayerId, shortLink, format. Remove the unknown parameter(s) and retry.`;return{isError:!0,content:[{type:"text",text:JSON.stringify({error:x})}]}}if(!o&&(!r||!n&&!i))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let p=this.normalizeFileId(r),d=n,f=i;if(o){let x=await Ve.extractIdsFromUrl(o);p=this.normalizeFileId(x.fileId),d=x.layerId,f=x.sourceLayerId??i}let m=f||d;if(!p||!m)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let g=await Ve.getPageLayers(p,m);return{content:[{type:"text",text:dn(g,s)}]}}catch(l){let p=(c=l==null?void 0:l.response)==null?void 0:c.data,d=(typeof p=="string"?p:p==null?void 0:p.message)||(l==null?void 0:l.message)||"Unknown error";return{isError:!0,content:[{type:"text",text:JSON.stringify({error:"getPageLayers failed",message:d})}]}}}};var H4=`
|
|
1289
1329
|
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.
|
|
1290
1330
|
You can provide either:
|
|
1291
1331
|
1. fileId and layerId directly, or
|
|
1292
1332
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1293
1333
|
|
|
1294
1334
|
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
|
-
`,
|
|
1335
|
+
`,ku=class extends it{constructor(){super();this.description=H4;this.schema=G.object({fileId:G.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:G.string().optional().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId>). Required if shortLink is not provided."),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:G.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),backgroundColor:G.string().optional().describe("Solid background color for the SVG (e.g. '#000000', 'black'). Useful for previewing white/light icons."),page:G.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:G.number().int().min(1).max(100).optional().describe("Number of SVGs per page (default 20, max 100). Only used when page is provided."),format:pn()})}get name(){return kt("extractSvg")}async execute(r){var n;try{let{fileId:o,layerId:i,sourceLayerId:s,shortLink:a,backgroundColor:c,page:l,pageSize:p,format:d}=r;if(!a&&(!o||!i&&!s))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let f=this.normalizeFileId(o),m=i,g=s;if(a){let y=await Ve.extractIdsFromUrl(a);f=this.normalizeFileId(y.fileId),m=y.layerId,g=y.sourceLayerId??s}let x=g||m;if(!f||!x)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let v=await Ve.extractSvg(f,x,c,l,p);return{content:[{type:"text",text:dn(v,d)}]}}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 Eu=require("fs/promises"),K$=require("fs"),fn=Ee(require("path"));var V4=`
|
|
1296
1336
|
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
1337
|
|
|
1298
1338
|
WHAT it does:
|
|
@@ -1319,7 +1359,7 @@ You can provide either:
|
|
|
1319
1359
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1320
1360
|
|
|
1321
1361
|
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
|
-
`,vu=class extends ht{constructor(){super();this.name=N4;this.description=j4;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:{svgShortKey}@@ 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,U$.existsSync)(me)||await(0,bu.mkdir)(me,{recursive:!0});let de=ar.default.join(me,k);await(0,bu.writeFile)(de,w,"utf8"),E$(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 svgShortKey/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:{svgShortKey}@@ 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 L4='\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 `svgShortKey` field:**\nEvery PATH node (icon) in the DSL has a `svgShortKey` field (e.g. `S0#0`) 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 `svgShortKey` (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:{svgShortKey}@@` 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 `svgShortKey` (e.g. `S0#1`, `S0#0`). NEVER reuse a svgShortKey from one PATH node for another \u2014 even if two icons look similar (e.g. two arrow icons), they are DIFFERENT vectors with DIFFERENT svgShortKeys. Always use the exact `svgShortKey` 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 `svgShortKey`. 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:{svgShortKey}@@`:\n- Read the `svgShortKey` from the PATH node in the section DSL.\n- Place `@@SVG:` + that exact svgShortKey + `@@` 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:{svgShortKey}@@</span>`\n - **JSX/React**: `<span style={{width:\'{w}px\',height:\'{h}px\'}}>{/*@@SVG:{svgShortKey}@@*/}</span>`\n - **Flutter**: `SizedBox(width:{w},height:{h},child: SvgPicture.string(\'@@SVG:{svgShortKey}@@\'))`\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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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 `svgShortKey` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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 `svgShortKey` fields. Place `@@SVG:{svgShortKey}@@` 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 `svgShortKey` (e.g. `S0#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 `svgShortKey` from the PATH node where the icon appears \u2014 never use a svgShortKey from a different PATH node.\n';function D4(){let{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}=bE();if(s!==void 0){let c=su(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=Ql();console.log(`Custom Headers: ${Object.keys(c).length>0?JSON.stringify(vE(c)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let a=new bl({name:"MasterGoMcpServer",version:Xi.version},{instructions:L4});new gu().register(a),new yu().register(a),new cu().register(a),new uu().register(a),new pu().register(a),new du().register(a),new fu().register(a),new mu().register(a),new hu().register(a),new xu().register(a),new vu().register(a),a.connect(new wl)}D4();
|
|
1362
|
+
`,Tu=class extends it{constructor(){super();this.description=V4;this.schema=G.object({fileId:G.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided. Must match the fileId used in getDesignSections."),layerId:G.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided. Must match the layerId used in getDesignSections."),sourceLayerId:G.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:G.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),code:G.string().describe("The COMPLETE generated code containing @@SVG:{svgShortKey}@@ and/or T{sectionIndex}|{nodeId} placeholders."),outDir:G.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:G.string().optional().describe("Output file name (default: 'index.html'). Include extension. Example: 'snmp-agent.html'."),targetLang:G.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('...')).")})}get name(){return kt("applyDesign")}async execute(r){var n,o,i;try{let{fileId:s,layerId:a,sourceLayerId:c,shortLink:l,code:p,outDir:d,outputFileName:f,targetLang:m}=r;if(!l&&(!s||!a&&!c))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let g=this.normalizeFileId(s),x=a,v=c;if(l){let Ge=await Ve.extractIdsFromUrl(l);g=this.normalizeFileId(Ge.fileId),x=Ge.layerId,v=Ge.sourceLayerId??c}let y=v||x;if(!g||!y)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 Ve.applyDesign(p,g,y,v,m),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=fn.default.basename((f==null?void 0:f.trim())||"index.html"),E=fn.default.resolve(process.env.MG_OUTPUT_ROOT||process.cwd()),F=fn.default.isAbsolute(d)?fn.default.resolve(d):fn.default.resolve(E,d),L=fn.default.relative(E,F);if(L===".."||L.startsWith(".."+fn.default.sep)||fn.default.isAbsolute(L))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 pe=F;(0,K$.existsSync)(pe)||await(0,Eu.mkdir)(pe,{recursive:!0});let me=fn.default.join(pe,k);await(0,Eu.writeFile)(me,w,"utf8"),z$(g,y);let ee=b.report||{},Re={success:!0,filePath:me,fileName:k,report:ee};if(b.warning&&(Re.warning=b.warning),b.error&&(Re.error=b.error),!Re.warning){let Ge=(((n=ee.svgUnresolved)==null?void 0:n.length)||0)+(((o=ee.textUnresolved)==null?void 0:o.length)||0);Ge>0&&(Re.warning=`${Ge} placeholder(s) unresolved \u2014 check svgShortKey/text keys.`)}let bt=ee.fabricatedPaths??[];return!Re.error&&bt.length>0&&(Re.error=`${bt.length} fabricated path(s) detected \u2014 replace them with @@SVG:{svgShortKey}@@ 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 G4='\n## MasterGo Design DSL - Section-by-Section Workflow\n\n### Step -1: Multi-layer restoration \u2014 enumerate, then restore ONE layer at a time, EACH as its own file\nUse this workflow when the user wants to restore a WHOLE PAGE or a CONTAINER with multiple child layers (e.g. URL has `page_id`, or a top-level frame whose children should each be restored separately). Do NOT restore all layers in one shot \u2014 restore them sequentially, and **each layer MUST become its own standalone HTML file**.\n\n**Workflow:**\n1. **Enumerate**: Call `mcp__getPageLayers` with the page_id / parent layerId. It returns a flat list of ALL layers, each as `{id, name, type, depth, parentId, childrenCount, width, height}`.\n2. **Pick the layers to restore**: From the list, identify the top-level restorable layers (typically depth=0 or depth=1 FRAME/COMPONENT/INSTANCE nodes \u2014 the actual screens/cards/sections, not every nested leaf). For each, build a restorable URL: `https://mastergo.com/file/{fileId}?layer_id={layer_id}` (URL-encode the layer_id, e.g. `802:02364` \u2192 `802%3A02364`).\n3. **Restore ONE layer at a time, writing EACH to its OWN separate .html file**: Take the FIRST layer_id \u2192 run the normal single-layer restoration (Step 0 \u2192 Step 4 below: `getDesignSections` \u2192 fetch all sections \u2192 `applyDesign`) \u2192 write that layer\'s complete HTML to a SEPARATE file. ONLY after finishing one layer\'s HTML FILE, move to the NEXT layer_id and repeat. Do not start layer N+1 before layer N\'s file is fully written.\n4. Repeat until all picked layers are restored \u2014 you should end up with N separate .html files (one per layer), NOT one merged file.\n\n**CRITICAL \u2014 ONE LAYER = ONE STANDALONE HTML FILE. This is non-negotiable:**\n- Each layer\'s output is a COMPLETE, standalone HTML document with its own `<!DOCTYPE html>`, `<head>`, and `<body>` \u2014 NOT an HTML fragment, NOT a `<div>` chunk to be concatenated.\n- Do NOT combine multiple layers into one HTML file. Do NOT stack multiple layers\' `<body>` content into a single page. Do NOT fetch all layers\' DSLs in parallel and merge them.\n- Write each layer to a DISTINCT file. Name files by the layer name or layer_id (e.g. `\u5BB9\u56681.html`, `navbar.html`, or `layer-802-02364.html`). If the user specified an output directory, write each file there.\n- Finish one layer completely (including `mcp__applyDesign` and writing the file) before starting the next.\n\n**When to use this vs. direct restoration:**\n- URL has `page_id` and no `layer_id` \u2192 ALWAYS use this workflow (a page contains many layers; restore them individually, each as its own file).\n- URL has a specific `layer_id` for a single component \u2192 use the normal workflow (Step 0+), no enumeration needed, one file.\n- A page_id returns empty (e.g. the synthetic `page_id=M`) \u2192 the page data isn\'t available via this API; ask the user for a specific layer_id URL instead.\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 `svgShortKey` field:**\nEvery PATH node (icon) in the DSL has a `svgShortKey` field (e.g. `S0#0`) 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 `svgShortKey` (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:{svgShortKey}@@` 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 `svgShortKey` (e.g. `S0#1`, `S0#0`). NEVER reuse a svgShortKey from one PATH node for another \u2014 even if two icons look similar (e.g. two arrow icons), they are DIFFERENT vectors with DIFFERENT svgShortKeys. Always use the exact `svgShortKey` 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 `svgShortKey`. 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:{svgShortKey}@@`:\n- Read the `svgShortKey` from the PATH node in the section DSL.\n- Place `@@SVG:` + that exact svgShortKey + `@@` 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:{svgShortKey}@@</span>`\n - **JSX/React**: `<span style={{width:\'{w}px\',height:\'{h}px\'}}>{/*@@SVG:{svgShortKey}@@*/}</span>`\n - **Flutter**: `SizedBox(width:{w},height:{h},child: SvgPicture.string(\'@@SVG:{svgShortKey}@@\'))`\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__getPageLayers` ENUMERATES layer_ids. Use it when you have a page_id (layerId) and need the list of all layers inside it BEFORE restoring each layer \u2014 it returns a lightweight {id, name, type, depth, parentId, childrenCount, width, height} list, then you feed each layer_id back into `getDesignSections` or `getDsl` to restore. It CANNOT list a document\'s pages from a fileId alone \u2014 you must already have a page_id / layerId.\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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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 `svgShortKey` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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:{svgShortKey}@@` 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 `svgShortKey` fields. Place `@@SVG:{svgShortKey}@@` 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 `svgShortKey` (e.g. `S0#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 `svgShortKey` from the PATH node where the icon appears \u2014 never use a svgShortKey from a different PATH node.\n';function W4(){let{token:t,baseUrl:e,rules:r,debug:n,noRule:o,noPrefix:i,proxy:s,format:a}=RE();if(k0(i),a!==void 0){let l=pu(a);l?process.env.DEFAULT_FORMAT=l:console.warn(`Invalid --format value: "${a}". 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(`No Prefix: ${sh()?"enabled (tools registered without 'mcp__' prefix)":"disabled (default: 'mcp__' prefix)"}`),console.log(`Proxy: ${s||"none"}`);let l=ou();console.log(`Custom Headers: ${Object.keys(l).length>0?JSON.stringify($E(l)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let c=new Tl({name:"MasterGoMcpServer",version:ts.version},{instructions:nr(G4)});new _u().register(c),new wu().register(c),new Su().register(c),new fu().register(c),new hu().register(c),new gu().register(c),new yu().register(c),new xu().register(c),new vu().register(c),new bu().register(c),new ku().register(c),new Tu().register(c),c.connect(new $l)}W4();
|
|
1323
1363
|
/*! Bundled license information:
|
|
1324
1364
|
|
|
1325
1365
|
mime-db/index.js:
|