likec4 1.54.0 → 1.55.0
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/__app__/src/routes/index.js +2 -2
- package/dist/THIRD-PARTY-LICENSES.md +3 -69
- package/dist/_chunks/index.d.mts +1 -1
- package/dist/_chunks/index2.d.mts +10 -20
- package/dist/_chunks/libs/@hono/mcp.mjs +1 -1
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +8 -8
- package/dist/_chunks/libs/ajv.mjs +1 -1
- package/dist/_chunks/libs/atomically.mjs +1 -1
- package/dist/_chunks/libs/conf.mjs +1 -1
- package/dist/_chunks/libs/find-up-simple.mjs +1 -1
- package/dist/_chunks/libs/p-timeout.mjs +1 -0
- package/dist/_chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/_chunks/libs/pathe.mjs +1 -1
- package/dist/_chunks/libs/tinyrainbow.mjs +1 -1
- package/dist/_chunks/libs/zod.d.mts +2091 -0
- package/dist/_chunks/node.mjs +76 -1
- package/dist/_chunks/src2.mjs +58 -58
- package/dist/cli/index.mjs +1167 -36
- package/dist/config/index.d.mts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/vite-plugin/index.d.mts +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal.mjs +1 -1
- package/package.json +22 -21
- package/dist/_chunks/filesystem.mjs +0 -1229
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +0 -9325
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../rolldown-runtime.mjs";import{_ as t,a as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,o as d,p as f,s as p,u as m,v as h,y as g}from"./@modelcontextprotocol/sdk.mjs";var _=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicAnchor=void 0;let n=g(),r=t(),a=f(),o=i(),s={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>c(e,e.schema)};function c(e,t){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;let o=(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(t)}`,s=a.errSchemaPath===`#`?a.validateName:l(e);i.if((0,n._)`!${o}`,()=>i.assign(o,s))}e.dynamicAnchor=c;function l(e){let{schemaEnv:t,schema:n,self:r}=e.it,{root:i,baseId:s,localRefs:c,meta:l}=t.root,{schemaId:u}=r.opts,d=new a.SchemaEnv({schema:n,schemaId:u,root:i,baseId:s,localRefs:c,meta:l});return a.compileSchema.call(r,d),(0,o.getValidate)(e,d)}e.default=s})),v=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicRef=void 0;let n=g(),r=t(),a=i(),o={keyword:`$dynamicRef`,schemaType:`string`,code:e=>s(e,e.schema)};function s(e,t){let{gen:i,keyword:o,it:s}=e;if(t[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=t.slice(1);if(s.allErrors)l();else{let t=i.let(`valid`,!1);l(t),e.ok(t)}function l(e){if(s.schemaEnv.root.dynamicAnchors[c]){let t=i.let(`_v`,(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(c)}`);i.if(t,u(t,e),u(s.validateName,e))}else u(s.validateName,e)()}function u(t,n){return n?()=>i.block(()=>{(0,a.callRef)(e,t),i.let(n,!0)}):()=>(0,a.callRef)(e,t)}}e.dynamicRef=s,e.default=o})),y=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_(),n=h();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),b=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=v();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),x=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_(),n=v(),r=y(),i=b();e.default=[t.default,n.default,r.default,i.default]})),S=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=r();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),C=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=r();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),w=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),T=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=S(),n=C(),r=w();e.default=[t.default,n.default,r.default]})),E=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=g(),r=h(),i=t();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,n._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:t,schema:a,data:o,errsCount:s,it:c}=e;if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof n.Name?t.if((0,n._)`${u} !== true`,()=>t.forIn(`key`,o,e=>t.if(f(u,e),()=>d(e)))):u!==!0&&t.forIn(`key`,o,e=>u===void 0?d(e):t.if(p(u,e),()=>d(e))),c.props=!0,e.ok((0,n._)`${s} === ${i.default.errors}`);function d(i){if(a===!1){e.setParams({unevaluatedProperty:i}),e.error(),l||t.break();return}if(!(0,r.alwaysValidSchema)(c,a)){let a=t.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:i,dataPropType:r.Type.Str},a),l||t.if((0,n.not)(a),()=>t.break())}}function f(e,t){return(0,n._)`!${e} || !${e}[${t}]`}function p(e,t){let r=[];for(let i in e)e[i]===!0&&r.push((0,n._)`${t} !== ${i}`);return(0,n.and)(...r)}}}})),D=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=g(),n=h();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=r.const(`len`,(0,t._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,t._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,n.alwaysValidSchema)(o,i)){let n=r.var(`valid`,(0,t._)`${c} <= ${s}`);r.if((0,t.not)(n),()=>l(n,s)),e.ok(n)}o.items=!0;function l(i,a){r.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:n.Type.Num},i),o.allErrors||r.if((0,t.not)(i),()=>r.break())})}}}})),O=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=E(),n=D();e.default=[t.default,n.default]})),k=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=m(),r=l(),i=p(),a=x(),o=T(),s=O(),c=d(),u=n();e.default=[a.default,t.default,r.default,(0,i.default)(!0),c.default,u.metadataVocabulary,u.contentVocabulary,o.default,s.default]})),A=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/schema`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Core and Validation specifications meta-schema`,allOf:[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],type:[`object`,`boolean`],$comment:`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,properties:{definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}}}})),j=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/applicator`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:`meta`,title:`Applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},$defs:{schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}}}})),M=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/unevaluated`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:`meta`,title:`Unevaluated applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}}}})),N=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/content`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Content vocabulary meta-schema`,type:[`object`,`boolean`],properties:{contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}}}})),P=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/core`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:`meta`,title:`Core vocabulary meta-schema`,type:[`object`,`boolean`],properties:{$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},$defs:{anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}}}})),F=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/format-annotation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:`meta`,title:`Format vocabulary meta-schema for annotation results`,type:[`object`,`boolean`],properties:{format:{type:`string`}}}})),I=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/meta-data`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:`meta`,title:`Meta-data vocabulary meta-schema`,type:[`object`,`boolean`],properties:{title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}}}})),L=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/validation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:`meta`,title:`Validation vocabulary meta-schema`,type:[`object`,`boolean`],properties:{type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},$defs:{nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}}}})),R=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=A(),n=j(),r=M(),i=N(),a=P(),o=F(),s=I(),c=L(),l=[`/properties`];function u(e){return[t,n,r,i,a,u(this,o),s,u(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function u(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=u})),z=e(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=a(),r=k(),i=c(),l=R(),d=`https://json-schema.org/draft/2020-12/schema`;var f=class extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(l.default.call(this,e),this.refs[`http://json-schema.org/schema`]=d)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}};e.Ajv2020=f,t.exports=e=f,t.exports.Ajv2020=f,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=f;var p=o();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return p.KeywordCxt}});var m=g();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return m._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return m.CodeGen}});var h=s();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return h.default}});var _=u();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return _.default}})}));export{z as t};
|
|
1
|
+
import{t as e}from"../rolldown-runtime.mjs";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,b as l,g as u,h as d,k as f,v as p,w as m,x as h,y as g}from"./@modelcontextprotocol/sdk.mjs";var _=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicAnchor=void 0;let n=t(),r=a(),i=m(),s=o(),c={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>l(e,e.schema)};function l(e,t){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;let o=(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(t)}`,s=a.errSchemaPath===`#`?a.validateName:u(e);i.if((0,n._)`!${o}`,()=>i.assign(o,s))}e.dynamicAnchor=l;function u(e){let{schemaEnv:t,schema:n,self:r}=e.it,{root:a,baseId:o,localRefs:c,meta:l}=t.root,{schemaId:u}=r.opts,d=new i.SchemaEnv({schema:n,schemaId:u,root:a,baseId:o,localRefs:c,meta:l});return i.compileSchema.call(r,d),(0,s.getValidate)(e,d)}e.default=c})),v=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dynamicRef=void 0;let n=t(),r=a(),i=o(),s={keyword:`$dynamicRef`,schemaType:`string`,code:e=>c(e,e.schema)};function c(e,t){let{gen:a,keyword:o,it:s}=e;if(t[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=t.slice(1);if(s.allErrors)l();else{let t=a.let(`valid`,!1);l(t),e.ok(t)}function l(e){if(s.schemaEnv.root.dynamicAnchors[c]){let t=a.let(`_v`,(0,n._)`${r.default.dynamicAnchors}${(0,n.getProperty)(c)}`);a.if(t,u(t,e),u(s.validateName,e))}else u(s.validateName,e)()}function u(t,n){return n?()=>a.block(()=>{(0,i.callRef)(e,t),a.let(n,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=c,e.default=s})),y=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_(),n=f();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),b=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=v();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),x=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=_(),n=v(),r=y(),i=b();e.default=[t.default,n.default,r.default,i.default]})),S=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=g();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),C=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=g();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),w=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=f();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),T=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=S(),n=C(),r=w();e.default=[t.default,n.default,r.default]})),E=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=t(),r=f(),i=a();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,n._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:t,schema:a,data:o,errsCount:s,it:c}=e;if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof n.Name?t.if((0,n._)`${u} !== true`,()=>t.forIn(`key`,o,e=>t.if(f(u,e),()=>d(e)))):u!==!0&&t.forIn(`key`,o,e=>u===void 0?d(e):t.if(p(u,e),()=>d(e))),c.props=!0,e.ok((0,n._)`${s} === ${i.default.errors}`);function d(i){if(a===!1){e.setParams({unevaluatedProperty:i}),e.error(),l||t.break();return}if(!(0,r.alwaysValidSchema)(c,a)){let a=t.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:i,dataPropType:r.Type.Str},a),l||t.if((0,n.not)(a),()=>t.break())}}function f(e,t){return(0,n._)`!${e} || !${e}[${t}]`}function p(e,t){let r=[];for(let i in e)e[i]===!0&&r.push((0,n._)`${t} !== ${i}`);return(0,n.and)(...r)}}}})),D=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let n=t(),r=f();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],error:{message:({params:{len:e}})=>(0,n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,n._)`{limit: ${e}}`},code(e){let{gen:t,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=t.const(`len`,(0,n._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,n._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,r.alwaysValidSchema)(o,i)){let r=t.var(`valid`,(0,n._)`${c} <= ${s}`);t.if((0,n.not)(r),()=>l(r,s)),e.ok(r)}o.items=!0;function l(i,a){t.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:r.Type.Num},i),o.allErrors||t.if((0,n.not)(i),()=>t.break())})}}}})),O=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=E(),n=D();e.default=[t.default,n.default]})),k=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=h(),n=l(),r=p(),i=x(),a=T(),o=O(),s=c(),d=u();e.default=[i.default,t.default,n.default,(0,r.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,a.default,o.default]})),A=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/schema`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Core and Validation specifications meta-schema`,allOf:[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],type:[`object`,`boolean`],$comment:`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,properties:{definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}}}})),j=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/applicator`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:`meta`,title:`Applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},$defs:{schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}}}})),M=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/unevaluated`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:`meta`,title:`Unevaluated applicator vocabulary meta-schema`,type:[`object`,`boolean`],properties:{unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}}}})),N=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/content`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:`meta`,title:`Content vocabulary meta-schema`,type:[`object`,`boolean`],properties:{contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}}}})),P=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/core`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:`meta`,title:`Core vocabulary meta-schema`,type:[`object`,`boolean`],properties:{$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},$defs:{anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}}}})),F=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/format-annotation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:`meta`,title:`Format vocabulary meta-schema for annotation results`,type:[`object`,`boolean`],properties:{format:{type:`string`}}}})),I=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/meta-data`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:`meta`,title:`Meta-data vocabulary meta-schema`,type:[`object`,`boolean`],properties:{title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}}}})),L=e(((e,t)=>{t.exports={$schema:`https://json-schema.org/draft/2020-12/schema`,$id:`https://json-schema.org/draft/2020-12/meta/validation`,$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:`meta`,title:`Validation vocabulary meta-schema`,type:[`object`,`boolean`],properties:{type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},$defs:{nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}}}})),R=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t=A(),n=j(),r=M(),i=N(),a=P(),o=F(),s=I(),c=L(),l=[`/properties`];function u(e){return[t,n,r,i,a,u(this,o),s,u(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function u(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=u})),z=e(((e,a)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let o=n(),c=k(),l=d(),u=R(),f=`https://json-schema.org/draft/2020-12/schema`;var p=class extends o.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),c.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(l.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(u.default.call(this,e),this.refs[`http://json-schema.org/schema`]=f)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}};e.Ajv2020=p,a.exports=e=p,a.exports.Ajv2020=p,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=p;var m=r();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return m.KeywordCxt}});var h=t();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return h.CodeGen}});var g=i();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return g.default}});var _=s();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return _.default}})}));export{z as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{promisify as e}from"node:util";import t from"node:
|
|
1
|
+
import{promisify as e}from"node:util";import t from"node:path";import n from"node:os";import r from"node:fs";import i from"node:process";const a=(e,t)=>function n(...r){return e.apply(void 0,r).catch(t)},o=(e,t)=>function n(...r){try{return e.apply(void 0,r)}catch(e){return t(e)}},s=i.getuid?!i.getuid():!1,c=()=>void 0,l={isChangeErrorOk:e=>{if(!l.isNodeError(e))return!1;let{code:t}=e;return t===`ENOSYS`||!s&&(t===`EINVAL`||t===`EPERM`)},isNodeError:e=>e instanceof Error,isRetriableError:e=>{if(!l.isNodeError(e))return!1;let{code:t}=e;return t===`EMFILE`||t===`ENFILE`||t===`EAGAIN`||t===`EBUSY`||t===`EACCESS`||t===`EACCES`||t===`EACCS`||t===`EPERM`},onChangeError:e=>{if(!l.isNodeError(e)||!l.isChangeErrorOk(e))throw e}};var u=class{constructor(){this.interval=25,this.intervalId=void 0,this.limit=1e4,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||=setInterval(this.tick,this.interval)},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=e=>{this.queueWaiting.add(e),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=e=>{this.queueWaiting.delete(e),this.queueActive.delete(e)},this.schedule=()=>new Promise(e=>{let t=()=>this.remove(n),n=()=>e(t);this.add(n)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(let e of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(e),this.queueActive.add(e),e()}}}}},d=new u;const f=(e,t)=>function n(r){return function n(...i){return d.schedule().then(a=>{let o=e=>(a(),e),s=e=>{if(a(),Date.now()>=r)throw e;if(t(e)){let e=Math.round(100*Math.random());return new Promise(t=>setTimeout(t,e)).then(()=>n.apply(void 0,i))}throw e};return e.apply(void 0,i).then(o,s)})}},p=(e,t)=>function n(r){return function n(...i){try{return e.apply(void 0,i)}catch(e){if(Date.now()>r)throw e;if(t(e))return n.apply(void 0,i);throw e}}},m={attempt:{chmod:a(e(r.chmod),l.onChangeError),chown:a(e(r.chown),l.onChangeError),close:a(e(r.close),c),fsync:a(e(r.fsync),c),mkdir:a(e(r.mkdir),c),realpath:a(e(r.realpath),c),stat:a(e(r.stat),c),unlink:a(e(r.unlink),c),chmodSync:o(r.chmodSync,l.onChangeError),chownSync:o(r.chownSync,l.onChangeError),closeSync:o(r.closeSync,c),existsSync:o(r.existsSync,c),fsyncSync:o(r.fsync,c),mkdirSync:o(r.mkdirSync,c),realpathSync:o(r.realpathSync,c),statSync:o(r.statSync,c),unlinkSync:o(r.unlinkSync,c)},retry:{close:f(e(r.close),l.isRetriableError),fsync:f(e(r.fsync),l.isRetriableError),open:f(e(r.open),l.isRetriableError),readFile:f(e(r.readFile),l.isRetriableError),rename:f(e(r.rename),l.isRetriableError),stat:f(e(r.stat),l.isRetriableError),write:f(e(r.write),l.isRetriableError),writeFile:f(e(r.writeFile),l.isRetriableError),closeSync:p(r.closeSync,l.isRetriableError),fsyncSync:p(r.fsyncSync,l.isRetriableError),openSync:p(r.openSync,l.isRetriableError),readFileSync:p(r.readFileSync,l.isRetriableError),renameSync:p(r.renameSync,l.isRetriableError),statSync:p(r.statSync,l.isRetriableError),writeSync:p(r.writeSync,l.isRetriableError),writeFileSync:p(r.writeFileSync,l.isRetriableError)}},h={},g=n.userInfo().uid,_=n.userInfo().gid,v=!!i.getuid;i.getuid&&i.getuid();const y=e=>e instanceof Error&&`code`in e,b=e=>typeof e==`string`,x=e=>e===void 0,S=i.platform===`linux`,C=i.platform===`win32`,w=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`];C||w.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),S&&w.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`);var T=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=e=>{if(!this.exited){this.exited=!0;for(let e of this.callbacks)e();e&&(C&&e!==`SIGINT`&&e!==`SIGTERM`&&e!==`SIGKILL`?i.kill(i.pid,`SIGTERM`):i.kill(i.pid,e))}},this.hook=()=>{i.once(`exit`,()=>this.exit());for(let e of w)try{i.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}};const E=new T().register,D={store:{},create:e=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6);return`${e}${`.tmp-${Date.now().toString().slice(-10)}${t}`}`},get:(e,t,n=!0)=>{let r=D.truncate(t(e));if(r in D.store)return D.get(e,t,n);D.store[r]=n;let i=()=>delete D.store[r];return[r,i]},purge:e=>{D.store[e]&&(delete D.store[e],m.attempt.unlink(e))},purgeSync:e=>{D.store[e]&&(delete D.store[e],m.attempt.unlinkSync(e))},purgeSyncAll:()=>{for(let e in D.store)D.purgeSync(e)},truncate:e=>{let n=t.basename(e);if(n.length<=128)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(n);if(!r)return e;let i=n.length-128;return`${e.slice(0,-n.length)}${r[1]}${r[2].slice(0,-i)}${r[3]}`}};E(D.purgeSyncAll);function O(e,n,r=h){if(b(r))return O(e,n,{encoding:r});let i=Date.now()+((r.timeout??1e3)||-1),a=null,o=null,s=null;try{let c=m.attempt.realpathSync(e),l=!!c;e=c||e,[o,a]=D.get(e,r.tmpCreate||D.create,r.tmpPurge!==!1);let u=v&&x(r.chown),d=x(r.mode);if(l&&(u||d)){let t=m.attempt.statSync(e);t&&(r={...r},u&&(r.chown={uid:t.uid,gid:t.gid}),d&&(r.mode=t.mode))}if(!l){let n=t.dirname(e);m.attempt.mkdirSync(n,{mode:511,recursive:!0})}s=m.retry.openSync(i)(o,`w`,r.mode||438),r.tmpCreated&&r.tmpCreated(o),b(n)?m.retry.writeSync(i)(s,n,0,r.encoding||`utf8`):x(n)||m.retry.writeSync(i)(s,n,0,n.length,0),r.fsync!==!1&&(r.fsyncWait===!1?m.attempt.fsync(s):m.retry.fsyncSync(i)(s)),m.retry.closeSync(i)(s),s=null,r.chown&&(r.chown.uid!==g||r.chown.gid!==_)&&m.attempt.chownSync(o,r.chown.uid,r.chown.gid),r.mode&&r.mode!==438&&m.attempt.chmodSync(o,r.mode);try{m.retry.renameSync(i)(o,e)}catch(t){if(!y(t)||t.code!==`ENAMETOOLONG`)throw t;m.retry.renameSync(i)(o,D.truncate(e))}a(),o=null}finally{s&&m.attempt.closeSync(s),o&&D.purge(o)}}export{O as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,t}from"../rolldown-runtime.mjs";import{r as n}from"./@modelcontextprotocol/sdk.mjs";import{t as r}from"./atomically.mjs";import{t as i}from"./ajv.mjs";import{isDeepStrictEqual as a}from"node:util";import o from"node:os";import s from"node:path";import c from"node:fs";import l from"node:process";import u from"node:crypto";import d from"node:assert";const f=e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)},p=new Set([`__proto__`,`prototype`,`constructor`]),m=1e6,h=e=>e>=`0`&&e<=`9`;function g(e){if(e===`0`)return!0;if(/^[1-9]\d*$/.test(e)){let t=Number.parseInt(e,10);return t<=2**53-1&&t<=m}return!1}function _(e,t){return p.has(e)?!1:(e&&g(e)?t.push(Number.parseInt(e,10)):t.push(e),!0)}function v(e){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);let t=[],n=``,r=`start`,i=!1,a=0;for(let o of e){if(a++,i){n+=o,i=!1;continue}if(o===`\\`){if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);i=!0,r=r===`start`?`property`:r;continue}switch(o){case`.`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`property`;break}if(!_(n,t))return[];n=``,r=`property`;break;case`[`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`index`;break}if(r===`property`||r===`start`){if((n||r===`property`)&&!_(n,t))return[];n=``}r=`index`;break;case`]`:if(r===`index`){if(n===``)n=(t.pop()||``)+`[]`,r=`property`;else{let e=Number.parseInt(n,10);!Number.isNaN(e)&&Number.isFinite(e)&&e>=0&&e<=2**53-1&&e<=m&&n===String(e)?t.push(e):t.push(n),n=``,r=`indexEnd`}break}if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);n+=o;break;default:if(r===`index`&&!h(o))throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);r===`start`&&(r=`property`),n+=o}}switch(i&&(n+=`\\`),r){case`property`:if(!_(n,t))return[];break;case`index`:throw Error(`Index was not closed`);case`start`:t.push(``);break}return t}function y(e){if(typeof e==`string`)return v(e);if(Array.isArray(e)){let t=[];for(let[n,r]of e.entries()){if(typeof r!=`string`&&typeof r!=`number`)throw TypeError(`Expected a string or number for path segment at index ${n}, got ${typeof r}`);if(typeof r==`number`&&!Number.isFinite(r))throw TypeError(`Path segment at index ${n} must be a finite number, got ${r}`);if(p.has(r))return[];typeof r==`string`&&g(r)?t.push(Number.parseInt(r,10)):t.push(r)}return t}return[]}function b(e,t,n){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return n===void 0?e:n;let r=y(t);if(r.length===0)return n;for(let t=0;t<r.length;t++){let i=r[t];if(e=e[i],e==null){if(t!==r.length-1)return n;break}}return e===void 0?n:e}function x(e,t,n){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return e;let r=e,i=y(t);if(i.length===0)return e;for(let t=0;t<i.length;t++){let r=i[t];if(t===i.length-1)e[r]=n;else if(!f(e[r])){let n=typeof i[t+1]==`number`;e[r]=n?[]:{}}e=e[r]}return r}function S(e,t){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=y(t);if(n.length===0)return!1;for(let t=0;t<n.length;t++){let r=n[t];if(t===n.length-1)return Object.hasOwn(e,r)?(delete e[r],!0):!1;if(e=e[r],!f(e))return!1}}function C(e,t){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=y(t);if(n.length===0)return!1;for(let t of n){if(!f(e)||!(t in e))return!1;e=e[t]}return!0}const w=o.homedir(),T=o.tmpdir(),{env:E}=l,ee=e=>{let t=s.join(w,`Library`);return{data:s.join(t,`Application Support`,e),config:s.join(t,`Preferences`,e),cache:s.join(t,`Caches`,e),log:s.join(t,`Logs`,e),temp:s.join(T,e)}},te=e=>{let t=E.APPDATA||s.join(w,`AppData`,`Roaming`),n=E.LOCALAPPDATA||s.join(w,`AppData`,`Local`);return{data:s.join(n,e,`Data`),config:s.join(t,e,`Config`),cache:s.join(n,e,`Cache`),log:s.join(n,e,`Log`),temp:s.join(T,e)}},ne=e=>{let t=s.basename(w);return{data:s.join(E.XDG_DATA_HOME||s.join(w,`.local`,`share`),e),config:s.join(E.XDG_CONFIG_HOME||s.join(w,`.config`),e),cache:s.join(E.XDG_CACHE_HOME||s.join(w,`.cache`),e),log:s.join(E.XDG_STATE_HOME||s.join(w,`.local`,`state`),e),temp:s.join(T,t,e)}};function re(e,{suffix:t=`nodejs`}={}){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),l.platform===`darwin`?ee(e):l.platform===`win32`?te(e):ne(e)}const ie=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!ae(i,a)&&r||Object.defineProperty(e,n,a)},ae=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},oe=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},se=(e,t)=>`/* Wrapped ${e}*/\n${t}`,ce=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),le=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),ue=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=se.bind(null,r,t.toString());Object.defineProperty(i,`name`,le);let{writable:a,enumerable:o,configurable:s}=ce;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})};function de(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))ie(e,t,r,n);return oe(e,t),ue(e,t,r),e}const fe=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let{wait:n=0,maxWait:r=1/0,before:i=!1,after:a=!0}=t;if(n<0||r<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!a)throw Error("Both `before` and `after` are false, function wouldn't be called.");let o,s,c,l=function(...t){let l=this,u=()=>{o=void 0,s&&=(clearTimeout(s),void 0),a&&(c=e.apply(l,t))},d=()=>{s=void 0,o&&=(clearTimeout(o),void 0),a&&(c=e.apply(l,t))},f=i&&!o;return clearTimeout(o),o=setTimeout(u,n),r>0&&r!==1/0&&!s&&(s=setTimeout(d,r)),f&&(c=e.apply(l,t)),c};return de(l,e),l.cancel=()=>{o&&=(clearTimeout(o),void 0),s&&=(clearTimeout(s),void 0)},l};var D=t(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),O=t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),k=t(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=D(),a=O();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),A=t(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({}),i=e=>e?typeof e==`object`?e:n:r;t.exports=i})),j=t(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},i=(e,t)=>r(t,e);t.exports={compareIdentifiers:r,rcompareIdentifiers:i}})),M=t(((e,t)=>{let n=O(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=D(),{safeRe:a,t:o}=k(),s=A(),{compareIdentifiers:c}=j();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),N=t(((e,t)=>{let n=M(),r=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}};t.exports=r})),pe=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e,t);return r?r.version:null};t.exports=r})),me=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null};t.exports=r})),he=t(((e,t)=>{let n=M(),r=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}};t.exports=r})),ge=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`};t.exports=r})),_e=t(((e,t)=>{let n=M(),r=(e,t)=>new n(e,t).major;t.exports=r})),ve=t(((e,t)=>{let n=M(),r=(e,t)=>new n(e,t).minor;t.exports=r})),ye=t(((e,t)=>{let n=M(),r=(e,t)=>new n(e,t).patch;t.exports=r})),be=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};t.exports=r})),P=t(((e,t)=>{let n=M(),r=(e,t,r)=>new n(e,r).compare(new n(t,r));t.exports=r})),xe=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(t,e,r);t.exports=r})),Se=t(((e,t)=>{let n=P(),r=(e,t)=>n(e,t,!0);t.exports=r})),F=t(((e,t)=>{let n=M(),r=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)};t.exports=r})),Ce=t(((e,t)=>{let n=F(),r=(e,t)=>e.sort((e,r)=>n(e,r,t));t.exports=r})),we=t(((e,t)=>{let n=F(),r=(e,t)=>e.sort((e,r)=>n(r,e,t));t.exports=r})),I=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)>0;t.exports=r})),L=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)<0;t.exports=r})),Te=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)===0;t.exports=r})),R=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)!==0;t.exports=r})),z=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)>=0;t.exports=r})),B=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)<=0;t.exports=r})),V=t(((e,t)=>{let n=Te(),r=R(),i=I(),a=z(),o=L(),s=B(),c=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}};t.exports=c})),Ee=t(((e,t)=>{let n=M(),r=N(),{safeRe:i,t:a}=k(),o=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)};t.exports=o})),De=t(((e,t)=>{var n=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};t.exports=n})),H=t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,te(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>ee(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(ne(this.set[t],e,this.options))return!0;return!1}};let r=new(De()),i=A(),a=U(),o=O(),s=M(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=k(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=D(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),ee=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),te=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),ne=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),U=t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=A(),{safeRe:i,t:a}=k(),o=V(),s=O(),c=M(),l=H()})),W=t(((e,t)=>{let n=H(),r=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)};t.exports=r})),Oe=t(((e,t)=>{let n=H(),r=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `));t.exports=r})),ke=t(((e,t)=>{let n=M(),r=H(),i=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a};t.exports=i})),Ae=t(((e,t)=>{let n=M(),r=H(),i=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a};t.exports=i})),je=t(((e,t)=>{let n=M(),r=H(),i=I(),a=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null};t.exports=a})),Me=t(((e,t)=>{let n=H(),r=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}};t.exports=r})),G=t(((e,t)=>{let n=M(),r=U(),{ANY:i}=r,a=H(),o=W(),s=I(),c=L(),l=B(),u=z(),d=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0};t.exports=d})),Ne=t(((e,t)=>{let n=G(),r=(e,t,r)=>n(e,t,`>`,r);t.exports=r})),Pe=t(((e,t)=>{let n=G(),r=(e,t,r)=>n(e,t,`<`,r);t.exports=r})),Fe=t(((e,t)=>{let n=H(),r=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r));t.exports=r})),Ie=t(((e,t)=>{let n=W(),r=P();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),Le=t(((e,t)=>{let n=H(),r=U(),{ANY:i}=r,a=W(),o=P(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),Re=t(((e,t)=>{let n=k(),r=D(),i=M(),a=j();t.exports={parse:N(),valid:pe(),clean:me(),inc:he(),diff:ge(),major:_e(),minor:ve(),patch:ye(),prerelease:be(),compare:P(),rcompare:xe(),compareLoose:Se(),compareBuild:F(),sort:Ce(),rsort:we(),gt:I(),lt:L(),eq:Te(),neq:R(),gte:z(),lte:B(),cmp:V(),coerce:Ee(),Comparator:U(),Range:H(),satisfies:W(),toComparators:Oe(),maxSatisfying:ke(),minSatisfying:Ae(),minVersion:je(),validRange:Me(),outside:G(),gtr:Ne(),ltr:Pe(),intersects:Fe(),simplifyRange:Ie(),subset:Le(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}));const ze=Object.prototype.toString;function Be(e,t,n){return e?e.constructor===t?!0:ze.call(e)===n:!1}function Ve(e){return Be(e,Uint8Array,`[object Uint8Array]`)}function He(e){return Be(e,ArrayBuffer,`[object ArrayBuffer]`)}function Ue(e){return Ve(e)||He(e)}function We(e){if(!Ve(e))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function Ge(e){if(!Ue(e))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function K(e,t){if(e.length===0)return new Uint8Array;t??=e.reduce((e,t)=>e+t.length,0);let n=new Uint8Array(t),r=0;for(let t of e)We(t),n.set(t,r),r+=t.length;return n}const Ke={utf8:new globalThis.TextDecoder(`utf8`)};function q(e,t=`utf8`){return Ge(e),Ke[t]??=new globalThis.TextDecoder(t),Ke[t].decode(e)}function qe(e){if(typeof e!=`string`)throw TypeError(`Expected \`string\`, got \`${typeof e}\``)}const Je=new globalThis.TextEncoder;function J(e){return qe(e),Je.encode(e)}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));var Ye=i(),Xe=e(n(),1),Y=e(Re(),1);const Ze=`aes-256-cbc`,Qe=new Set([`aes-256-cbc`,`aes-256-gcm`,`aes-256-ctr`]),$e=e=>typeof e==`string`&&Qe.has(e),X=()=>Object.create(null),et=e=>e!==void 0,Z=(e,t)=>{let n=new Set([`undefined`,`symbol`,`function`]),r=typeof t;if(n.has(r))throw TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},Q=`__internal__`,$=`${Q}.migrations.version`;var tt=class{path;events;#e;#t;#n;#r;#i={};#a=!1;#o;#s;#c;constructor(e={}){let t=this.#l(e);this.#r=t,this.#u(t),this.#f(t),this.#p(t),this.events=new EventTarget,this.#t=t.encryptionKey,this.#n=t.encryptionAlgorithm??Ze,this.path=this.#m(t),this.#h(t),t.watch&&this._watch()}get(e,t){if(this.#r.accessPropertiesByDotNotation)return this._get(e,t);let{store:n}=this;return e in n?n[e]:t}set(e,t){if(typeof e!=`string`&&typeof e!=`object`)throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!=`object`&&t===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw TypeError(`Please don't use the ${Q} key, as it's used to manage this module internal operations.`);let{store:n}=this,r=(e,t)=>{if(Z(e,t),this.#r.accessPropertiesByDotNotation)x(n,e,t);else{if(e===`__proto__`||e===`constructor`||e===`prototype`)return;n[e]=t}};if(typeof e==`object`){let t=e;for(let[e,n]of Object.entries(t))r(e,n)}else r(e,t);this.store=n}has(e){return this.#r.accessPropertiesByDotNotation?C(this.store,e):e in this.store}appendToArray(e,t){Z(e,t);let n=this.#r.accessPropertiesByDotNotation?this._get(e,[]):e in this.store?this.store[e]:[];if(!Array.isArray(n))throw TypeError(`The key \`${e}\` is already set to a non-array value`);this.set(e,[...n,t])}reset(...e){for(let t of e)et(this.#i[t])&&this.set(t,this.#i[t])}delete(e){let{store:t}=this;this.#r.accessPropertiesByDotNotation?S(t,e):delete t[e],this.store=t}clear(){let e=X();for(let t of Object.keys(this.#i))et(this.#i[t])&&(Z(t,this.#i[t]),this.#r.accessPropertiesByDotNotation?x(e,t,this.#i[t]):e[t]=this.#i[t]);this.store=e}onDidChange(e,t){if(typeof e!=`string`)throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleValueChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleStoreChange(e)}get size(){return Object.keys(this.store).filter(e=>!this._isReservedKeyPath(e)).length}get store(){try{let e=c.readFileSync(this.path,this.#t?null:`utf8`),t=this._decryptData(e),n=e=>{let t=this._deserialize(e);return this.#a||this._validate(t),Object.assign(X(),t)};return n(t)}catch(e){if(e?.code===`ENOENT`)return this._ensureDirectory(),X();if(this.#r.clearInvalidConfig){let t=e;if(t.name===`SyntaxError`||t.message?.startsWith(`Config schema violation:`)||t.message===`Failed to decrypt config data.`)return X()}throw e}}set store(e){if(this._ensureDirectory(),!C(e,Q))try{let t=c.readFileSync(this.path,this.#t?null:`utf8`),n=this._decryptData(t),r=this._deserialize(n);C(r,Q)&&x(e,Q,b(r,Q))}catch{}this.#a||this._validate(e),this._write(e),this.events.dispatchEvent(new Event(`change`))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))this._isReservedKeyPath(e)||(yield[e,t])}_closeWatcher(){this.#o&&=(this.#o.close(),void 0),this.#s&&=(c.unwatchFile(this.path),!1),this.#c=void 0}_decryptData(e){let t=this.#t;if(!t)return typeof e==`string`?e:q(e);let n=this.#n,r=n===`aes-256-gcm`?16:0,i=`:`.codePointAt(0),a=typeof e==`string`?e.codePointAt(16):e[16];if(!(i!==void 0&&a===i)){if(n===`aes-256-cbc`)return typeof e==`string`?e:q(e);throw Error(`Failed to decrypt config data.`)}let o=e=>{if(r===0)return{ciphertext:e};let t=e.length-r;if(t<0)throw Error(`Invalid authentication tag length.`);return{ciphertext:e.slice(0,t),authenticationTag:e.slice(t)}},s=e.slice(0,16),c=e.slice(17),l=typeof c==`string`?J(c):c,d=e=>{let{ciphertext:r,authenticationTag:i}=o(l),a=u.pbkdf2Sync(t,e,1e4,32,`sha512`),c=u.createDecipheriv(n,a,s);return i&&c.setAuthTag(i),q(K([c.update(r),c.final()]))};try{return d(s)}catch{try{return d(s.toString())}catch{}}if(n===`aes-256-cbc`)return typeof e==`string`?e:q(e);throw Error(`Failed to decrypt config data.`)}_handleStoreChange(e){let t=this.store,n=()=>{let n=t,r=this.store;a(r,n)||(t=r,e.call(this,r,n))};return this.events.addEventListener(`change`,n),()=>{this.events.removeEventListener(`change`,n)}}_handleValueChange(e,t){let n=e(),r=()=>{let r=n,i=e();a(i,r)||(n=i,t.call(this,i,r))};return this.events.addEventListener(`change`,r),()=>{this.events.removeEventListener(`change`,r)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0,` `);_validate(e){if(!this.#e||this.#e(e)||!this.#e.errors)return;let t=this.#e.errors.map(({instancePath:e,message:t=``})=>`\`${e.slice(1)}\` ${t}`);throw Error(`Config schema violation: `+t.join(`; `))}_ensureDirectory(){c.mkdirSync(s.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e),n=this.#t;if(n){let e=u.randomBytes(16),r=u.pbkdf2Sync(n,e,1e4,32,`sha512`),i=u.createCipheriv(this.#n,r,e),a=K([i.update(J(t)),i.final()]),o=[e,J(`:`),a];this.#n===`aes-256-gcm`&&o.push(i.getAuthTag()),t=K(o)}if(l.env.SNAP)c.writeFileSync(this.path,t,{mode:this.#r.configFileMode});else try{r(this.path,t,{mode:this.#r.configFileMode})}catch(e){if(e?.code===`EXDEV`){c.writeFileSync(this.path,t,{mode:this.#r.configFileMode});return}throw e}}_watch(){if(this._ensureDirectory(),c.existsSync(this.path)||this._write(X()),l.platform===`win32`||l.platform===`darwin`){this.#c??=fe(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:100});let e=s.dirname(this.path),t=s.basename(this.path);this.#o=c.watch(e,{persistent:!1,encoding:`utf8`},(e,n)=>{n&&n!==t||typeof this.#c==`function`&&this.#c()})}else this.#c??=fe(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:1e3}),c.watchFile(this.path,{persistent:!1},(e,t)=>{typeof this.#c==`function`&&this.#c()}),this.#s=!0}_migrate(e,t,n){let r=this._get($,`0.0.0`),i=Object.keys(e).filter(e=>this._shouldPerformMigration(e,r,t)),a=structuredClone(this.store);for(let o of i)try{n&&n(this,{fromVersion:r,toVersion:o,finalVersion:t,versions:i});let s=e[o];s?.(this),this._set($,o),r=o,a=structuredClone(this.store)}catch(e){this.store=a;let t=e instanceof Error?e.message:String(e);throw Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${t}`)}(this._isVersionInRangeFormat(r)||!Y.default.eq(r,t))&&this._set($,t)}_containsReservedKey(e){return typeof e==`string`?this._isReservedKeyPath(e):!e||typeof e!=`object`?!1:this._objectContainsReservedKey(e)}_objectContainsReservedKey(e){if(!e||typeof e!=`object`)return!1;for(let[t,n]of Object.entries(e))if(this._isReservedKeyPath(t)||this._objectContainsReservedKey(n))return!0;return!1}_isReservedKeyPath(e){return e===Q||e.startsWith(`${Q}.`)}_isVersionInRangeFormat(e){return Y.default.clean(e)===null}_shouldPerformMigration(e,t,n){return this._isVersionInRangeFormat(e)?t!==`0.0.0`&&Y.default.satisfies(t,e)?!1:Y.default.satisfies(n,e):!(Y.default.lte(e,t)||Y.default.gt(e,n))}_get(e,t){return b(this.store,e,t)}_set(e,t){let{store:n}=this;x(n,e,t),this.store=n}#l(e){let t={configName:`config`,fileExtension:`json`,projectSuffix:`nodejs`,clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(t.encryptionAlgorithm??=Ze,!$e(t.encryptionAlgorithm))throw TypeError(`The \`encryptionAlgorithm\` option must be one of: ${[...Qe].join(`, `)}`);if(!t.cwd){if(!t.projectName)throw Error("Please specify the `projectName` option.");t.cwd=re(t.projectName,{suffix:t.projectSuffix}).config}return typeof t.fileExtension==`string`&&(t.fileExtension=t.fileExtension.replace(/^\.+/,``)),t}#u(e){if(!(e.schema??e.ajvOptions??e.rootSchema))return;if(e.schema&&typeof e.schema!=`object`)throw TypeError("The `schema` option must be an object.");let t=Xe.default.default,n=new Ye.Ajv2020({allErrors:!0,useDefaults:!0,...e.ajvOptions});t(n);let r={...e.rootSchema,type:`object`,properties:e.schema};this.#e=n.compile(r),this.#d(e.schema)}#d(e){let t=Object.entries(e??{});for(let[e,n]of t){if(!n||typeof n!=`object`||!Object.hasOwn(n,`default`))continue;let{default:t}=n;t!==void 0&&(this.#i[e]=t)}}#f(e){e.defaults&&Object.assign(this.#i,e.defaults)}#p(e){e.serialize&&(this._serialize=e.serialize),e.deserialize&&(this._deserialize=e.deserialize)}#m(e){let t=typeof e.fileExtension==`string`?e.fileExtension:void 0,n=t?`.${t}`:``;return s.resolve(e.cwd,`${e.configName??`config`}${n}`)}#h(e){if(e.migrations){this.#g(e),this._validate(this.store);return}let t=this.store,n=Object.assign(X(),e.defaults??{},t);this._validate(n);try{d.deepEqual(t,n)}catch{this.store=n}}#g(e){let{migrations:t,projectVersion:n}=e;if(t){if(!n)throw Error("Please specify the `projectVersion` option.");this.#a=!0;try{let r=this.store,i=Object.assign(X(),e.defaults??{},r);try{d.deepEqual(r,i)}catch{this._write(i)}this._migrate(t,n,e.beforeEachMigration)}finally{this.#a=!1}}}};export{Re as n,tt as t};
|
|
1
|
+
import{s as e,t}from"../rolldown-runtime.mjs";import{t as n}from"./atomically.mjs";import{m as r}from"./@modelcontextprotocol/sdk.mjs";import{t as i}from"./ajv.mjs";import{isDeepStrictEqual as a}from"node:util";import o from"node:path";import s from"node:os";import c from"node:fs";import l from"node:process";import u from"node:crypto";import d from"node:assert";const f=e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)},p=new Set([`__proto__`,`prototype`,`constructor`]),m=1e6,h=e=>e>=`0`&&e<=`9`;function g(e){if(e===`0`)return!0;if(/^[1-9]\d*$/.test(e)){let t=Number.parseInt(e,10);return t<=2**53-1&&t<=m}return!1}function _(e,t){return p.has(e)?!1:(e&&g(e)?t.push(Number.parseInt(e,10)):t.push(e),!0)}function v(e){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);let t=[],n=``,r=`start`,i=!1,a=0;for(let o of e){if(a++,i){n+=o,i=!1;continue}if(o===`\\`){if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);i=!0,r=r===`start`?`property`:r;continue}switch(o){case`.`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`property`;break}if(!_(n,t))return[];n=``,r=`property`;break;case`[`:if(r===`index`)throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`){r=`index`;break}if(r===`property`||r===`start`){if((n||r===`property`)&&!_(n,t))return[];n=``}r=`index`;break;case`]`:if(r===`index`){if(n===``)n=(t.pop()||``)+`[]`,r=`property`;else{let e=Number.parseInt(n,10);!Number.isNaN(e)&&Number.isFinite(e)&&e>=0&&e<=2**53-1&&e<=m&&n===String(e)?t.push(e):t.push(n),n=``,r=`indexEnd`}break}if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);n+=o;break;default:if(r===`index`&&!h(o))throw Error(`Invalid character '${o}' in an index at position ${a}`);if(r===`indexEnd`)throw Error(`Invalid character '${o}' after an index at position ${a}`);r===`start`&&(r=`property`),n+=o}}switch(i&&(n+=`\\`),r){case`property`:if(!_(n,t))return[];break;case`index`:throw Error(`Index was not closed`);case`start`:t.push(``);break}return t}function y(e){if(typeof e==`string`)return v(e);if(Array.isArray(e)){let t=[];for(let[n,r]of e.entries()){if(typeof r!=`string`&&typeof r!=`number`)throw TypeError(`Expected a string or number for path segment at index ${n}, got ${typeof r}`);if(typeof r==`number`&&!Number.isFinite(r))throw TypeError(`Path segment at index ${n} must be a finite number, got ${r}`);if(p.has(r))return[];typeof r==`string`&&g(r)?t.push(Number.parseInt(r,10)):t.push(r)}return t}return[]}function b(e,t,n){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return n===void 0?e:n;let r=y(t);if(r.length===0)return n;for(let t=0;t<r.length;t++){let i=r[t];if(e=e[i],e==null){if(t!==r.length-1)return n;break}}return e===void 0?n:e}function x(e,t,n){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return e;let r=e,i=y(t);if(i.length===0)return e;for(let t=0;t<i.length;t++){let r=i[t];if(t===i.length-1)e[r]=n;else if(!f(e[r])){let n=typeof i[t+1]==`number`;e[r]=n?[]:{}}e=e[r]}return r}function S(e,t){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=y(t);if(n.length===0)return!1;for(let t=0;t<n.length;t++){let r=n[t];if(t===n.length-1)return Object.hasOwn(e,r)?(delete e[r],!0):!1;if(e=e[r],!f(e))return!1}}function C(e,t){if(!f(e)||typeof t!=`string`&&!Array.isArray(t))return!1;let n=y(t);if(n.length===0)return!1;for(let t of n){if(!f(e)||!(t in e))return!1;e=e[t]}return!0}const w=s.homedir(),T=s.tmpdir(),{env:E}=l,ee=e=>{let t=o.join(w,`Library`);return{data:o.join(t,`Application Support`,e),config:o.join(t,`Preferences`,e),cache:o.join(t,`Caches`,e),log:o.join(t,`Logs`,e),temp:o.join(T,e)}},te=e=>{let t=E.APPDATA||o.join(w,`AppData`,`Roaming`),n=E.LOCALAPPDATA||o.join(w,`AppData`,`Local`);return{data:o.join(n,e,`Data`),config:o.join(t,e,`Config`),cache:o.join(n,e,`Cache`),log:o.join(n,e,`Log`),temp:o.join(T,e)}},ne=e=>{let t=o.basename(w);return{data:o.join(E.XDG_DATA_HOME||o.join(w,`.local`,`share`),e),config:o.join(E.XDG_CONFIG_HOME||o.join(w,`.config`),e),cache:o.join(E.XDG_CACHE_HOME||o.join(w,`.cache`),e),log:o.join(E.XDG_STATE_HOME||o.join(w,`.local`,`state`),e),temp:o.join(T,t,e)}};function re(e,{suffix:t=`nodejs`}={}){if(typeof e!=`string`)throw TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),l.platform===`darwin`?ee(e):l.platform===`win32`?te(e):ne(e)}const ie=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!ae(i,a)&&r||Object.defineProperty(e,n,a)},ae=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},oe=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},se=(e,t)=>`/* Wrapped ${e}*/\n${t}`,ce=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),le=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),ue=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=se.bind(null,r,t.toString());Object.defineProperty(i,`name`,le);let{writable:a,enumerable:o,configurable:s}=ce;Object.defineProperty(e,`toString`,{value:i,writable:a,enumerable:o,configurable:s})};function de(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))ie(e,t,r,n);return oe(e,t),ue(e,t,r),e}const fe=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let{wait:n=0,maxWait:r=1/0,before:i=!1,after:a=!0}=t;if(n<0||r<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!a)throw Error("Both `before` and `after` are false, function wouldn't be called.");let o,s,c,l=function(...t){let l=this,u=()=>{o=void 0,s&&=(clearTimeout(s),void 0),a&&(c=e.apply(l,t))},d=()=>{s=void 0,o&&=(clearTimeout(o),void 0),a&&(c=e.apply(l,t))},f=i&&!o;return clearTimeout(o),o=setTimeout(u,n),r>0&&r!==1/0&&!s&&(s=setTimeout(d,r)),f&&(c=e.apply(l,t)),c};return de(l,e),l.cancel=()=>{o&&=(clearTimeout(o),void 0),s&&=(clearTimeout(s),void 0)},l};var D=t(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),O=t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),k=t(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=D(),a=O();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),A=t(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({}),i=e=>e?typeof e==`object`?e:n:r;t.exports=i})),j=t(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},i=(e,t)=>r(t,e);t.exports={compareIdentifiers:r,rcompareIdentifiers:i}})),M=t(((e,t)=>{let n=O(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=D(),{safeRe:a,t:o}=k(),s=A(),{compareIdentifiers:c}=j();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),N=t(((e,t)=>{let n=M(),r=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}};t.exports=r})),pe=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e,t);return r?r.version:null};t.exports=r})),me=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null};t.exports=r})),he=t(((e,t)=>{let n=M(),r=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}};t.exports=r})),ge=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`};t.exports=r})),_e=t(((e,t)=>{let n=M(),r=(e,t)=>new n(e,t).major;t.exports=r})),ve=t(((e,t)=>{let n=M(),r=(e,t)=>new n(e,t).minor;t.exports=r})),ye=t(((e,t)=>{let n=M(),r=(e,t)=>new n(e,t).patch;t.exports=r})),be=t(((e,t)=>{let n=N(),r=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};t.exports=r})),P=t(((e,t)=>{let n=M(),r=(e,t,r)=>new n(e,r).compare(new n(t,r));t.exports=r})),xe=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(t,e,r);t.exports=r})),Se=t(((e,t)=>{let n=P(),r=(e,t)=>n(e,t,!0);t.exports=r})),F=t(((e,t)=>{let n=M(),r=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)};t.exports=r})),Ce=t(((e,t)=>{let n=F(),r=(e,t)=>e.sort((e,r)=>n(e,r,t));t.exports=r})),we=t(((e,t)=>{let n=F(),r=(e,t)=>e.sort((e,r)=>n(r,e,t));t.exports=r})),I=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)>0;t.exports=r})),L=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)<0;t.exports=r})),Te=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)===0;t.exports=r})),R=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)!==0;t.exports=r})),z=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)>=0;t.exports=r})),B=t(((e,t)=>{let n=P(),r=(e,t,r)=>n(e,t,r)<=0;t.exports=r})),V=t(((e,t)=>{let n=Te(),r=R(),i=I(),a=z(),o=L(),s=B(),c=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}};t.exports=c})),Ee=t(((e,t)=>{let n=M(),r=N(),{safeRe:i,t:a}=k(),o=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)};t.exports=o})),De=t(((e,t)=>{var n=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};t.exports=n})),H=t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,te(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>ee(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(ne(this.set[t],e,this.options))return!0;return!1}};let r=new(De()),i=A(),a=U(),o=O(),s=M(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=k(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=D(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),ee=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),te=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),ne=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),U=t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=A(),{safeRe:i,t:a}=k(),o=V(),s=O(),c=M(),l=H()})),W=t(((e,t)=>{let n=H(),r=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)};t.exports=r})),Oe=t(((e,t)=>{let n=H(),r=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `));t.exports=r})),ke=t(((e,t)=>{let n=M(),r=H(),i=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a};t.exports=i})),Ae=t(((e,t)=>{let n=M(),r=H(),i=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a};t.exports=i})),je=t(((e,t)=>{let n=M(),r=H(),i=I(),a=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null};t.exports=a})),Me=t(((e,t)=>{let n=H(),r=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}};t.exports=r})),G=t(((e,t)=>{let n=M(),r=U(),{ANY:i}=r,a=H(),o=W(),s=I(),c=L(),l=B(),u=z(),d=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0};t.exports=d})),Ne=t(((e,t)=>{let n=G(),r=(e,t,r)=>n(e,t,`>`,r);t.exports=r})),Pe=t(((e,t)=>{let n=G(),r=(e,t,r)=>n(e,t,`<`,r);t.exports=r})),Fe=t(((e,t)=>{let n=H(),r=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r));t.exports=r})),Ie=t(((e,t)=>{let n=W(),r=P();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),Le=t(((e,t)=>{let n=H(),r=U(),{ANY:i}=r,a=W(),o=P(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),Re=t(((e,t)=>{let n=k(),r=D(),i=M(),a=j();t.exports={parse:N(),valid:pe(),clean:me(),inc:he(),diff:ge(),major:_e(),minor:ve(),patch:ye(),prerelease:be(),compare:P(),rcompare:xe(),compareLoose:Se(),compareBuild:F(),sort:Ce(),rsort:we(),gt:I(),lt:L(),eq:Te(),neq:R(),gte:z(),lte:B(),cmp:V(),coerce:Ee(),Comparator:U(),Range:H(),satisfies:W(),toComparators:Oe(),maxSatisfying:ke(),minSatisfying:Ae(),minVersion:je(),validRange:Me(),outside:G(),gtr:Ne(),ltr:Pe(),intersects:Fe(),simplifyRange:Ie(),subset:Le(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}));const ze=Object.prototype.toString;function Be(e,t,n){return e?e.constructor===t?!0:ze.call(e)===n:!1}function Ve(e){return Be(e,Uint8Array,`[object Uint8Array]`)}function He(e){return Be(e,ArrayBuffer,`[object ArrayBuffer]`)}function Ue(e){return Ve(e)||He(e)}function We(e){if(!Ve(e))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function Ge(e){if(!Ue(e))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function K(e,t){if(e.length===0)return new Uint8Array;t??=e.reduce((e,t)=>e+t.length,0);let n=new Uint8Array(t),r=0;for(let t of e)We(t),n.set(t,r),r+=t.length;return n}const Ke={utf8:new globalThis.TextDecoder(`utf8`)};function q(e,t=`utf8`){return Ge(e),Ke[t]??=new globalThis.TextDecoder(t),Ke[t].decode(e)}function qe(e){if(typeof e!=`string`)throw TypeError(`Expected \`string\`, got \`${typeof e}\``)}const Je=new globalThis.TextEncoder;function J(e){return qe(e),Je.encode(e)}Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));var Ye=i(),Xe=e(r(),1),Y=e(Re(),1);const Ze=`aes-256-cbc`,Qe=new Set([`aes-256-cbc`,`aes-256-gcm`,`aes-256-ctr`]),$e=e=>typeof e==`string`&&Qe.has(e),X=()=>Object.create(null),et=e=>e!==void 0,Z=(e,t)=>{let n=new Set([`undefined`,`symbol`,`function`]),r=typeof t;if(n.has(r))throw TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},Q=`__internal__`,$=`${Q}.migrations.version`;var tt=class{path;events;#e;#t;#n;#r;#i={};#a=!1;#o;#s;#c;constructor(e={}){let t=this.#l(e);this.#r=t,this.#u(t),this.#f(t),this.#p(t),this.events=new EventTarget,this.#t=t.encryptionKey,this.#n=t.encryptionAlgorithm??Ze,this.path=this.#m(t),this.#h(t),t.watch&&this._watch()}get(e,t){if(this.#r.accessPropertiesByDotNotation)return this._get(e,t);let{store:n}=this;return e in n?n[e]:t}set(e,t){if(typeof e!=`string`&&typeof e!=`object`)throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!=`object`&&t===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw TypeError(`Please don't use the ${Q} key, as it's used to manage this module internal operations.`);let{store:n}=this,r=(e,t)=>{if(Z(e,t),this.#r.accessPropertiesByDotNotation)x(n,e,t);else{if(e===`__proto__`||e===`constructor`||e===`prototype`)return;n[e]=t}};if(typeof e==`object`){let t=e;for(let[e,n]of Object.entries(t))r(e,n)}else r(e,t);this.store=n}has(e){return this.#r.accessPropertiesByDotNotation?C(this.store,e):e in this.store}appendToArray(e,t){Z(e,t);let n=this.#r.accessPropertiesByDotNotation?this._get(e,[]):e in this.store?this.store[e]:[];if(!Array.isArray(n))throw TypeError(`The key \`${e}\` is already set to a non-array value`);this.set(e,[...n,t])}reset(...e){for(let t of e)et(this.#i[t])&&this.set(t,this.#i[t])}delete(e){let{store:t}=this;this.#r.accessPropertiesByDotNotation?S(t,e):delete t[e],this.store=t}clear(){let e=X();for(let t of Object.keys(this.#i))et(this.#i[t])&&(Z(t,this.#i[t]),this.#r.accessPropertiesByDotNotation?x(e,t,this.#i[t]):e[t]=this.#i[t]);this.store=e}onDidChange(e,t){if(typeof e!=`string`)throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleValueChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!=`function`)throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleStoreChange(e)}get size(){return Object.keys(this.store).filter(e=>!this._isReservedKeyPath(e)).length}get store(){try{let e=c.readFileSync(this.path,this.#t?null:`utf8`),t=this._decryptData(e),n=e=>{let t=this._deserialize(e);return this.#a||this._validate(t),Object.assign(X(),t)};return n(t)}catch(e){if(e?.code===`ENOENT`)return this._ensureDirectory(),X();if(this.#r.clearInvalidConfig){let t=e;if(t.name===`SyntaxError`||t.message?.startsWith(`Config schema violation:`)||t.message===`Failed to decrypt config data.`)return X()}throw e}}set store(e){if(this._ensureDirectory(),!C(e,Q))try{let t=c.readFileSync(this.path,this.#t?null:`utf8`),n=this._decryptData(t),r=this._deserialize(n);C(r,Q)&&x(e,Q,b(r,Q))}catch{}this.#a||this._validate(e),this._write(e),this.events.dispatchEvent(new Event(`change`))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))this._isReservedKeyPath(e)||(yield[e,t])}_closeWatcher(){this.#o&&=(this.#o.close(),void 0),this.#s&&=(c.unwatchFile(this.path),!1),this.#c=void 0}_decryptData(e){let t=this.#t;if(!t)return typeof e==`string`?e:q(e);let n=this.#n,r=n===`aes-256-gcm`?16:0,i=`:`.codePointAt(0),a=typeof e==`string`?e.codePointAt(16):e[16];if(!(i!==void 0&&a===i)){if(n===`aes-256-cbc`)return typeof e==`string`?e:q(e);throw Error(`Failed to decrypt config data.`)}let o=e=>{if(r===0)return{ciphertext:e};let t=e.length-r;if(t<0)throw Error(`Invalid authentication tag length.`);return{ciphertext:e.slice(0,t),authenticationTag:e.slice(t)}},s=e.slice(0,16),c=e.slice(17),l=typeof c==`string`?J(c):c,d=e=>{let{ciphertext:r,authenticationTag:i}=o(l),a=u.pbkdf2Sync(t,e,1e4,32,`sha512`),c=u.createDecipheriv(n,a,s);return i&&c.setAuthTag(i),q(K([c.update(r),c.final()]))};try{return d(s)}catch{try{return d(s.toString())}catch{}}if(n===`aes-256-cbc`)return typeof e==`string`?e:q(e);throw Error(`Failed to decrypt config data.`)}_handleStoreChange(e){let t=this.store,n=()=>{let n=t,r=this.store;a(r,n)||(t=r,e.call(this,r,n))};return this.events.addEventListener(`change`,n),()=>{this.events.removeEventListener(`change`,n)}}_handleValueChange(e,t){let n=e(),r=()=>{let r=n,i=e();a(i,r)||(n=i,t.call(this,i,r))};return this.events.addEventListener(`change`,r),()=>{this.events.removeEventListener(`change`,r)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0,` `);_validate(e){if(!this.#e||this.#e(e)||!this.#e.errors)return;let t=this.#e.errors.map(({instancePath:e,message:t=``})=>`\`${e.slice(1)}\` ${t}`);throw Error(`Config schema violation: `+t.join(`; `))}_ensureDirectory(){c.mkdirSync(o.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e),r=this.#t;if(r){let e=u.randomBytes(16),n=u.pbkdf2Sync(r,e,1e4,32,`sha512`),i=u.createCipheriv(this.#n,n,e),a=K([i.update(J(t)),i.final()]),o=[e,J(`:`),a];this.#n===`aes-256-gcm`&&o.push(i.getAuthTag()),t=K(o)}if(l.env.SNAP)c.writeFileSync(this.path,t,{mode:this.#r.configFileMode});else try{n(this.path,t,{mode:this.#r.configFileMode})}catch(e){if(e?.code===`EXDEV`){c.writeFileSync(this.path,t,{mode:this.#r.configFileMode});return}throw e}}_watch(){if(this._ensureDirectory(),c.existsSync(this.path)||this._write(X()),l.platform===`win32`||l.platform===`darwin`){this.#c??=fe(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:100});let e=o.dirname(this.path),t=o.basename(this.path);this.#o=c.watch(e,{persistent:!1,encoding:`utf8`},(e,n)=>{n&&n!==t||typeof this.#c==`function`&&this.#c()})}else this.#c??=fe(()=>{this.events.dispatchEvent(new Event(`change`))},{wait:1e3}),c.watchFile(this.path,{persistent:!1},(e,t)=>{typeof this.#c==`function`&&this.#c()}),this.#s=!0}_migrate(e,t,n){let r=this._get($,`0.0.0`),i=Object.keys(e).filter(e=>this._shouldPerformMigration(e,r,t)),a=structuredClone(this.store);for(let o of i)try{n&&n(this,{fromVersion:r,toVersion:o,finalVersion:t,versions:i});let s=e[o];s?.(this),this._set($,o),r=o,a=structuredClone(this.store)}catch(e){this.store=a;let t=e instanceof Error?e.message:String(e);throw Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${t}`)}(this._isVersionInRangeFormat(r)||!Y.default.eq(r,t))&&this._set($,t)}_containsReservedKey(e){return typeof e==`string`?this._isReservedKeyPath(e):!e||typeof e!=`object`?!1:this._objectContainsReservedKey(e)}_objectContainsReservedKey(e){if(!e||typeof e!=`object`)return!1;for(let[t,n]of Object.entries(e))if(this._isReservedKeyPath(t)||this._objectContainsReservedKey(n))return!0;return!1}_isReservedKeyPath(e){return e===Q||e.startsWith(`${Q}.`)}_isVersionInRangeFormat(e){return Y.default.clean(e)===null}_shouldPerformMigration(e,t,n){return this._isVersionInRangeFormat(e)?t!==`0.0.0`&&Y.default.satisfies(t,e)?!1:Y.default.satisfies(n,e):!(Y.default.lte(e,t)||Y.default.gt(e,n))}_get(e,t){return b(this.store,e,t)}_set(e,t){let{store:n}=this;x(n,e,t),this.store=n}#l(e){let t={configName:`config`,fileExtension:`json`,projectSuffix:`nodejs`,clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(t.encryptionAlgorithm??=Ze,!$e(t.encryptionAlgorithm))throw TypeError(`The \`encryptionAlgorithm\` option must be one of: ${[...Qe].join(`, `)}`);if(!t.cwd){if(!t.projectName)throw Error("Please specify the `projectName` option.");t.cwd=re(t.projectName,{suffix:t.projectSuffix}).config}return typeof t.fileExtension==`string`&&(t.fileExtension=t.fileExtension.replace(/^\.+/,``)),t}#u(e){if(!(e.schema??e.ajvOptions??e.rootSchema))return;if(e.schema&&typeof e.schema!=`object`)throw TypeError("The `schema` option must be an object.");let t=Xe.default.default,n=new Ye.Ajv2020({allErrors:!0,useDefaults:!0,...e.ajvOptions});t(n);let r={...e.rootSchema,type:`object`,properties:e.schema};this.#e=n.compile(r),this.#d(e.schema)}#d(e){let t=Object.entries(e??{});for(let[e,n]of t){if(!n||typeof n!=`object`||!Object.hasOwn(n,`default`))continue;let{default:t}=n;t!==void 0&&(this.#i[e]=t)}}#f(e){e.defaults&&Object.assign(this.#i,e.defaults)}#p(e){e.serialize&&(this._serialize=e.serialize),e.deserialize&&(this._deserialize=e.deserialize)}#m(e){let t=typeof e.fileExtension==`string`?e.fileExtension:void 0,n=t?`.${t}`:``;return o.resolve(e.cwd,`${e.configName??`config`}${n}`)}#h(e){if(e.migrations){this.#g(e),this._validate(this.store);return}let t=this.store,n=Object.assign(X(),e.defaults??{},t);this._validate(n);try{d.deepEqual(t,n)}catch{this.store=n}}#g(e){let{migrations:t,projectVersion:n}=e;if(t){if(!n)throw Error("Please specify the `projectVersion` option.");this.#a=!0;try{let r=this.store,i=Object.assign(X(),e.defaults??{},r);try{d.deepEqual(r,i)}catch{this._write(i)}this._migrate(t,n,e.beforeEachMigration)}finally{this.#a=!1}}}};export{Re as n,tt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:
|
|
1
|
+
import e from"node:path";import"node:fs/promises";import t from"node:fs";import n from"node:process";import{fileURLToPath as r}from"node:url";const i=e=>e instanceof URL?r(e):e;function a(r,{cwd:a=n.cwd(),type:o=`file`,stopAt:s}={}){let c=e.resolve(i(a)??``),{root:l}=e.parse(c);for(s=e.resolve(c,i(s)??l);c&&c!==s&&c!==l;){let n=e.isAbsolute(r)?r:e.join(c,r);try{let e=t.statSync(n,{throwIfNoEntry:!1});if(o===`file`&&e?.isFile()||o===`directory`&&e?.isDirectory())return n}catch{}c=e.dirname(c)}}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};const t=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function n(n,r){let{milliseconds:i,fallback:a,message:o,customTimers:s={setTimeout,clearTimeout},signal:c}=r,l,u,d=new Promise((r,d)=>{if(typeof i!=`number`||Math.sign(i)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${i}\``);if(c?.aborted){d(t(c));return}if(c&&(u=()=>{d(t(c))},c.addEventListener(`abort`,u,{once:!0})),n.then(r,d),i===1/0)return;let f=new e;l=s.setTimeout.call(void 0,()=>{if(a){try{r(a())}catch(e){d(e)}return}typeof n.cancel==`function`&&n.cancel(),o===!1?r():o instanceof Error?d(o):(f.message=o??`Promise timed out after ${i} milliseconds`,d(f))},i)}).finally(()=>{d.clear(),u&&c&&c.removeEventListener(`abort`,u)});return d.clear=()=>{s.clearTimeout.call(void 0,l),l=void 0},d}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"node:
|
|
1
|
+
import e from"node:path";import t from"node:fs/promises";import n from"node:process";function r(e,t){return n=>n.length>1?[e,t,n[0],`--`,...n.slice(1)]:[e,t,n[0]]}function i(){return e=>[`deno`,`run`,`npm:${e[0]}`,...e.slice(1)]}const a={agent:[`npm`,0],run:r(`npm`,`run`),install:[`npm`,`i`,0],frozen:[`npm`,`ci`,0],global:[`npm`,`i`,`-g`,0],add:[`npm`,`i`,0],upgrade:[`npm`,`update`,0],"upgrade-interactive":null,dedupe:[`npm`,`dedupe`,0],execute:[`npx`,0],"execute-local":[`npx`,0],uninstall:[`npm`,`uninstall`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},o={agent:[`yarn`,0],run:[`yarn`,`run`,0],install:[`yarn`,`install`,0],frozen:[`yarn`,`install`,`--frozen-lockfile`,0],global:[`yarn`,`global`,`add`,0],add:[`yarn`,`add`,0],upgrade:[`yarn`,`upgrade`,0],"upgrade-interactive":[`yarn`,`upgrade-interactive`,0],dedupe:null,execute:[`npx`,0],"execute-local":r(`yarn`,`exec`),uninstall:[`yarn`,`remove`,0],global_uninstall:[`yarn`,`global`,`remove`,0]},s={...o,frozen:[`yarn`,`install`,`--immutable`,0],upgrade:[`yarn`,`up`,0],"upgrade-interactive":[`yarn`,`up`,`-i`,0],dedupe:[`yarn`,`dedupe`,0],execute:[`yarn`,`dlx`,0],"execute-local":[`yarn`,`exec`,0],global:[`npm`,`i`,`-g`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},c={agent:[`pnpm`,0],run:[`pnpm`,`run`,0],install:[`pnpm`,`i`,0],frozen:[`pnpm`,`i`,`--frozen-lockfile`,0],global:[`pnpm`,`add`,`-g`,0],add:[`pnpm`,`add`,0],upgrade:[`pnpm`,`update`,0],"upgrade-interactive":[`pnpm`,`update`,`-i`,0],dedupe:[`pnpm`,`dedupe`,0],execute:[`pnpm`,`dlx`,0],"execute-local":[`pnpm`,`exec`,0],uninstall:[`pnpm`,`remove`,0],global_uninstall:[`pnpm`,`remove`,`--global`,0]},l={agent:[`bun`,0],run:[`bun`,`run`,0],install:[`bun`,`install`,0],frozen:[`bun`,`install`,`--frozen-lockfile`,0],global:[`bun`,`add`,`-g`,0],add:[`bun`,`add`,0],upgrade:[`bun`,`update`,0],"upgrade-interactive":[`bun`,`update`,`-i`,0],dedupe:null,execute:[`bun`,`x`,0],"execute-local":[`bun`,`x`,0],uninstall:[`bun`,`remove`,0],global_uninstall:[`bun`,`remove`,`-g`,0]},u={agent:[`deno`,0],run:[`deno`,`task`,0],install:[`deno`,`install`,0],frozen:[`deno`,`install`,`--frozen`,0],global:[`deno`,`install`,`-g`,0],add:[`deno`,`add`,0],upgrade:[`deno`,`outdated`,`--update`,0],"upgrade-interactive":[`deno`,`outdated`,`--update`,0],dedupe:null,execute:i(),"execute-local":[`deno`,`task`,`--eval`,0],uninstall:[`deno`,`remove`,0],global_uninstall:[`deno`,`uninstall`,`-g`,0]},d={npm:a,yarn:o,"yarn@berry":s,pnpm:c,"pnpm@6":{...c,run:r(`pnpm`,`run`)},bun:l,deno:u};function f(e,t,n){let r=d[e][t];return p(r,n)}function p(e,t){if(e==null)return null;let n=typeof e==`function`?e(t):e.flatMap(e=>typeof e==`number`?t:[e]);return{command:n[0],args:n.slice(1)}}const m=[`npm`,`yarn`,`yarn@berry`,`pnpm`,`pnpm@6`,`bun`,`deno`],h={"bun.lock":`bun`,"bun.lockb":`bun`,"deno.lock":`deno`,"pnpm-lock.yaml":`pnpm`,"pnpm-workspace.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`,"npm-shrinkwrap.json":`npm`},g={"node_modules/.deno/":`deno`,"node_modules/.pnpm/":`pnpm`,"node_modules/.yarn-state.yml":`yarn`,"node_modules/.yarn_integrity":`yarn`,"node_modules/.package-lock.json":`npm`,".pnp.cjs":`yarn`,".pnp.js":`yarn`,"bun.lock":`bun`,"bun.lockb":`bun`};async function _(e,n){try{let r=await t.stat(e);return n===`file`?r.isFile():r.isDirectory()}catch{return!1}}function*v(t=n.cwd()){let r=e.resolve(t),{root:i}=e.parse(r);for(;r&&r!==i;)yield r,r=e.dirname(r)}async function y(e,t){return!e||!await _(e,`file`)?null:await S(e,t)}async function b(t={}){let{cwd:n,strategies:r=[`lockfile`,`packageManager-field`,`devEngines-field`]}=t,i;if(typeof t.stopDir==`string`){let n=e.resolve(t.stopDir);i=e=>e===n}else i=t.stopDir;for(let a of v(n)){for(let n of r)switch(n){case`lockfile`:for(let n of Object.keys(h))if(await _(e.join(a,n),`file`)){let r=h[n];return await y(e.join(a,`package.json`),t)||{name:r,agent:r}}break;case`packageManager-field`:case`devEngines-field`:{let n=await y(e.join(a,`package.json`),t);if(n)return n;break}case`install-metadata`:for(let t of Object.keys(g)){let n=t.endsWith(`/`)?`dir`:`file`;if(await _(e.join(a,t),n)){let e=g[t];return{name:e,agent:e===`yarn`?C(t)?`yarn`:`yarn@berry`:e}}}break}if(i?.(a))break}return null}function x(e){let t=e=>e?.match(/\d+(\.\d+){0,2}/)?.[0]??e;if(typeof e.packageManager==`string`){let[n,r]=e.packageManager.replace(/^\^/,``).split(`@`);return{name:n,ver:t(r)}}if(typeof e.devEngines?.packageManager?.name==`string`)return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function S(e,n){try{let r=await t.readFile(e,`utf8`),i=n.packageJsonParser?await n.packageJsonParser(r,e):JSON.parse(r),a,o=x(i);if(o){let e=o.name,t=o.ver,r=t;return e===`yarn`&&t&&Number.parseInt(t)>1?(a=`yarn@berry`,r=`berry`,{name:e,agent:a,version:r}):e===`pnpm`&&t&&Number.parseInt(t)<7?(a=`pnpm@6`,{name:e,agent:a,version:r}):m.includes(e)?(a=e,{name:e,agent:a,version:r}):n.onUnknown?.(i.packageManager)??null}}catch{}return null}function C(e){return e.endsWith(`.yarn_integrity`)}export{f as n,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=/^[A-Za-z]:\//;function t(t=``){return t&&t.replace(/\\/g,`/`).replace(e,e=>e.toUpperCase())}const n=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,r=/.(\.[^./]+|\.)
|
|
1
|
+
const e=/^[A-Za-z]:\//;function t(t=``){return t&&t.replace(/\\/g,`/`).replace(e,e=>e.toUpperCase())}const n=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,r=/.(\.[^./]+|\.)$/,i=function(e){return n.test(e)},a=function(e){if(e===`..`)return``;let n=r.exec(t(e));return n&&n[1]||``};globalThis.process?.platform;export{i as n,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function t(e){return String(e)}t.open=``,t.close=``;function n(){let e=typeof process<`u`?process:void 0,t=e?.env||{},n=t.FORCE_TTY!==`false`,r=e?.argv||[];return!(`NO_COLOR`in t||r.includes(`--no-color`))&&(`FORCE_COLOR`in t||r.includes(`--color`)||e?.platform===`win32`||n&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function r(){let r
|
|
1
|
+
var e={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function t(e){return String(e)}t.open=``,t.close=``;function n(){let e=typeof process<`u`?process:void 0,t=e?.env||{},n=t.FORCE_TTY!==`false`,r=e?.argv||[];return!(`NO_COLOR`in t||r.includes(`--no-color`))&&(`FORCE_COLOR`in t||r.includes(`--color`)||e?.platform===`win32`||n&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function r({force:r}={}){let i=r||n(),a=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},o=(e,t,n=e)=>{let r=r=>{let i=String(r),o=i.indexOf(t,e.length);return~o?e+a(i,t,n,o)+t:e+i+t};return r.open=e,r.close=t,r},s={isColorSupported:i},c=e=>`\x1B[${e}m`;for(let n in e){let r=e[n];s[n]=i?o(c(r[0]),c(r[1]),r[2]):t}return s}var i=r();export{i as t};
|