xmcp 0.7.0 → 0.7.1

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.
Files changed (155) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/package.json +2 -3
  4. package/src/auth/api-key.ts +0 -120
  5. package/src/auth/jwt.ts +0 -52
  6. package/src/cli/commands/create/__tests__/create.test.ts +0 -99
  7. package/src/cli/commands/create/index.ts +0 -74
  8. package/src/cli/commands/create/templates/index.ts +0 -4
  9. package/src/cli/commands/create/templates/prompt.ts +0 -30
  10. package/src/cli/commands/create/templates/resource.ts +0 -20
  11. package/src/cli/commands/create/templates/tool.ts +0 -34
  12. package/src/cli/commands/create/templates/widget.ts +0 -33
  13. package/src/cli/utils/naming.ts +0 -39
  14. package/src/cli.ts +0 -125
  15. package/src/client/headers.ts +0 -61
  16. package/src/client/index.ts +0 -180
  17. package/src/client/types.ts +0 -122
  18. package/src/client/utils.ts +0 -133
  19. package/src/cloudflare.ts +0 -6
  20. package/src/compiler/build-telemetry.ts +0 -88
  21. package/src/compiler/client/component-compiler.ts +0 -250
  22. package/src/compiler/client/transpile.ts +0 -21
  23. package/src/compiler/compiler-context.ts +0 -61
  24. package/src/compiler/config/__tests__/config.test.ts +0 -459
  25. package/src/compiler/config/index.ts +0 -62
  26. package/src/compiler/config/injection.ts +0 -210
  27. package/src/compiler/config/schemas/bundler.ts +0 -12
  28. package/src/compiler/config/schemas/experimental/index.ts +0 -22
  29. package/src/compiler/config/schemas/index.ts +0 -20
  30. package/src/compiler/config/schemas/paths.ts +0 -35
  31. package/src/compiler/config/schemas/template.ts +0 -80
  32. package/src/compiler/config/schemas/transport/http.ts +0 -116
  33. package/src/compiler/config/schemas/transport/stdio.ts +0 -31
  34. package/src/compiler/config/schemas/typescript.ts +0 -26
  35. package/src/compiler/config/utils.ts +0 -168
  36. package/src/compiler/generate-env-code.ts +0 -5
  37. package/src/compiler/generate-import-code.ts +0 -187
  38. package/src/compiler/generate-tools-code.ts +0 -174
  39. package/src/compiler/get-bundler-config/get-entries.ts +0 -44
  40. package/src/compiler/get-bundler-config/get-externals.ts +0 -114
  41. package/src/compiler/get-bundler-config/get-injected-variables.ts +0 -46
  42. package/src/compiler/get-bundler-config/index.ts +0 -288
  43. package/src/compiler/get-bundler-config/plugins/index.ts +0 -140
  44. package/src/compiler/get-bundler-config/plugins/types/express.ts +0 -3
  45. package/src/compiler/get-bundler-config/plugins/types/fastify.ts +0 -4
  46. package/src/compiler/get-bundler-config/plugins/types/index.ts +0 -5
  47. package/src/compiler/get-bundler-config/plugins/types/nest.ts +0 -65
  48. package/src/compiler/get-bundler-config/plugins/types/next.ts +0 -52
  49. package/src/compiler/get-bundler-config/resolve-tsconfig-paths.ts +0 -51
  50. package/src/compiler/index.ts +0 -484
  51. package/src/compiler/on-first-build.ts +0 -54
  52. package/src/compiler/parse-xmcp-config.ts +0 -200
  53. package/src/compiler/start-http-server.ts +0 -42
  54. package/src/compiler/utils/__tests__/config-detection.test.ts +0 -307
  55. package/src/compiler/utils/__tests__/path-utils.test.ts +0 -137
  56. package/src/compiler/utils/config-detection.ts +0 -34
  57. package/src/compiler/utils/path-utils.ts +0 -22
  58. package/src/compiler/watcher-recovery.ts +0 -72
  59. package/src/host-bridge.ts +0 -36
  60. package/src/index.ts +0 -94
  61. package/src/platforms/build-cloudflare-output.ts +0 -116
  62. package/src/platforms/build-vercel-output.ts +0 -131
  63. package/src/plugins/index.ts +0 -1
  64. package/src/plugins/x402/index.ts +0 -24
  65. package/src/runtime/adapters/express/index.ts +0 -75
  66. package/src/runtime/adapters/fastify/__tests__/fastify.test.ts +0 -115
  67. package/src/runtime/adapters/fastify/index.ts +0 -78
  68. package/src/runtime/adapters/nestjs/index.ts +0 -16
  69. package/src/runtime/adapters/nestjs/xmcp.controller.ts +0 -34
  70. package/src/runtime/adapters/nestjs/xmcp.guard.ts +0 -101
  71. package/src/runtime/adapters/nestjs/xmcp.oauth.controller.ts +0 -36
  72. package/src/runtime/adapters/nestjs/xmcp.oauth.module.ts +0 -21
  73. package/src/runtime/adapters/nestjs/xmcp.oauth.service.ts +0 -36
  74. package/src/runtime/adapters/nestjs/xmcp.service.ts +0 -96
  75. package/src/runtime/adapters/nestjs/xmcp.utils.ts +0 -11
  76. package/src/runtime/adapters/nextjs/auth.ts +0 -265
  77. package/src/runtime/adapters/nextjs/handler/error-handler.ts +0 -67
  78. package/src/runtime/adapters/nextjs/handler/node-to-web-adapter.ts +0 -143
  79. package/src/runtime/adapters/nextjs/handler/request-converter.ts +0 -74
  80. package/src/runtime/adapters/nextjs/handler/server-lifecycle.ts +0 -69
  81. package/src/runtime/adapters/nextjs/index.ts +0 -121
  82. package/src/runtime/contexts/client-info-context.ts +0 -16
  83. package/src/runtime/contexts/http-request-context.ts +0 -21
  84. package/src/runtime/contexts/http-transport-context.ts +0 -18
  85. package/src/runtime/headers.ts +0 -42
  86. package/src/runtime/middlewares/utils.ts +0 -72
  87. package/src/runtime/platforms/cloudflare/cors.ts +0 -44
  88. package/src/runtime/platforms/cloudflare/middlewares/api-key.ts +0 -102
  89. package/src/runtime/platforms/cloudflare/middlewares/jwt.ts +0 -127
  90. package/src/runtime/platforms/cloudflare/types.ts +0 -23
  91. package/src/runtime/platforms/cloudflare/worker.ts +0 -270
  92. package/src/runtime/templates/home.ts +0 -746
  93. package/src/runtime/transports/http/base-streamable-http.ts +0 -46
  94. package/src/runtime/transports/http/cors/headers.ts +0 -58
  95. package/src/runtime/transports/http/cors/index.ts +0 -34
  96. package/src/runtime/transports/http/index.ts +0 -78
  97. package/src/runtime/transports/http/stateless-streamable-http.ts +0 -353
  98. package/src/runtime/transports/http/web-stateless-http.ts +0 -288
  99. package/src/runtime/transports/stdio/index.ts +0 -109
  100. package/src/runtime/utils/__tests__/client-info.test.ts +0 -146
  101. package/src/runtime/utils/__tests__/tool-extra.test.ts +0 -239
  102. package/src/runtime/utils/client-info.ts +0 -114
  103. package/src/runtime/utils/elicitation.ts +0 -396
  104. package/src/runtime/utils/ext-apps-registry.ts +0 -151
  105. package/src/runtime/utils/mcp-app-protocol.ts +0 -16
  106. package/src/runtime/utils/mcp-app-types.ts +0 -113
  107. package/src/runtime/utils/mcp-host-bridge.ts +0 -473
  108. package/src/runtime/utils/path-to-tool-name.ts +0 -69
  109. package/src/runtime/utils/prompt-loader.ts +0 -151
  110. package/src/runtime/utils/prompts.ts +0 -69
  111. package/src/runtime/utils/react/generate-html.ts +0 -69
  112. package/src/runtime/utils/react/index.ts +0 -6
  113. package/src/runtime/utils/request-tool-names.ts +0 -48
  114. package/src/runtime/utils/resource-loader.ts +0 -151
  115. package/src/runtime/utils/resources.ts +0 -331
  116. package/src/runtime/utils/server.ts +0 -107
  117. package/src/runtime/utils/tool-loader.ts +0 -149
  118. package/src/runtime/utils/tools.ts +0 -183
  119. package/src/runtime/utils/transformers/prompt.ts +0 -120
  120. package/src/runtime/utils/transformers/resource.ts +0 -196
  121. package/src/runtime/utils/transformers/tool.ts +0 -400
  122. package/src/runtime/utils/ui/__tests__/split-meta.test.ts +0 -803
  123. package/src/runtime/utils/ui/flatten-meta.ts +0 -44
  124. package/src/runtime/utils/ui/split-meta.ts +0 -78
  125. package/src/runtime/utils/utils/resource-uri-composer.ts +0 -204
  126. package/src/runtime/utils/validators/index.ts +0 -138
  127. package/src/telemetry/ci-info.ts +0 -6
  128. package/src/telemetry/debug.ts +0 -8
  129. package/src/telemetry/events/definitions.ts +0 -52
  130. package/src/telemetry/events/detached-flush.ts +0 -83
  131. package/src/telemetry/events/post-payload.ts +0 -141
  132. package/src/telemetry/events/tracker.ts +0 -281
  133. package/src/telemetry/index.ts +0 -7
  134. package/src/telemetry/metadata.ts +0 -49
  135. package/src/telemetry/project-id.ts +0 -35
  136. package/src/telemetry/storage.ts +0 -218
  137. package/src/types/adapter.d.ts +0 -5
  138. package/src/types/client-info.ts +0 -20
  139. package/src/types/declarations.ts +0 -37
  140. package/src/types/injected.d.ts +0 -62
  141. package/src/types/middleware.ts +0 -19
  142. package/src/types/prompt.ts +0 -6
  143. package/src/types/resource.ts +0 -15
  144. package/src/types/tool.ts +0 -192
  145. package/src/types/ui-meta.ts +0 -42
  146. package/src/utils/cli-icons.ts +0 -5
  147. package/src/utils/constants.ts +0 -31
  148. package/src/utils/context.ts +0 -105
  149. package/src/utils/detect-package-manager.ts +0 -46
  150. package/src/utils/file-watcher.ts +0 -66
  151. package/src/utils/fs-utils.ts +0 -16
  152. package/src/utils/path-validation.ts +0 -66
  153. package/src/utils/port-utils.ts +0 -43
  154. package/src/utils/spawn-process.ts +0 -49
  155. package/src/utils/subscribable.ts +0 -62
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  || ${a} === "boolean" || ${i} === null`).assign(o,(0,l._)`[${i}]`)}}(e);s.else(),m(e),s.endIf(),s.if((0,l._)`${o} !== undefined`,()=>{s.assign(i,o),function({gen:e,parentData:t,parentDataProperty:r},s){e.if((0,l._)`${t} !== undefined`,()=>e.assign((0,l._)`${t}[${r}]`,s))}(e,o)})}(e,t,c):m(e)})}return p};let d=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,i=s.Correct){let n,a=i===s.Correct?l.operators.EQ:l.operators.NEQ;switch(e){case"null":return(0,l._)`${t} ${a} null`;case"array":n=(0,l._)`Array.isArray(${t})`;break;case"object":n=(0,l._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":n=o((0,l._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":n=o();break;default:return(0,l._)`typeof ${t} ${a} ${e}`}return i===s.Correct?n:(0,l.not)(n);function o(e=l.nil){return(0,l.and)((0,l._)`typeof ${t} == "number"`,e,r?(0,l._)`isFinite(${t})`:l.nil)}}function f(e,t,r,s){let i;if(1===e.length)return p(e[0],t,r,s);let n=(0,u.toHash)(e);if(n.array&&n.object){let e=(0,l._)`typeof ${t} != "object"`;i=n.null?e:(0,l._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else i=l.nil;for(let e in n.number&&delete n.integer,n)i=(0,l.and)(i,p(e,t,r,s));return i}t.checkDataType=p,t.checkDataTypes=f;let h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,l._)`{type: ${e}}`:(0,l._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:s}=e,i=(0,u.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:i,schemaValue:i,parentSchema:s,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=m},6593(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;let s=r(8994),i=r(7218);function n(e,t,r){let{gen:n,compositeRule:a,data:o,opts:l}=e;if(void 0===r)return;let u=(0,s._)`${o}${(0,s.getProperty)(t)}`;if(a)return void(0,i.checkStrictMode)(e,`default is ignored for: ${u}`);let c=(0,s._)`${u} === undefined`;"empty"===l.useDefaults&&(c=(0,s._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,s._)`${u} = ${(0,s.stringify)(r)}`)}t.assignDefaults=function(e,t){let{properties:r,items:s}=e.schema;if("object"===t&&r)for(let t in r)n(e,t,r[t].default);else"array"===t&&Array.isArray(s)&&s.forEach((t,r)=>n(e,r,t.default))}},6023(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;let s=r(564),i=r(6419),n=r(238),a=r(6419),o=r(6593),l=r(9820),u=r(3826),c=r(8994),d=r(6660),p=r(9008),f=r(7218),h=r(8425);function m({gen:e,validateName:t,schema:r,schemaEnv:s,opts:i},n){var a;i.code.es5?e.func(t,(0,c._)`${d.default.data}, ${d.default.valCxt}`,s.$async,()=>{var t,s;e.code((0,c._)`"use strict"; ${y(r,i)}`),t=e,s=i,t.if(d.default.valCxt,()=>{t.var(d.default.instancePath,(0,c._)`${d.default.valCxt}.${d.default.instancePath}`),t.var(d.default.parentData,(0,c._)`${d.default.valCxt}.${d.default.parentData}`),t.var(d.default.parentDataProperty,(0,c._)`${d.default.valCxt}.${d.default.parentDataProperty}`),t.var(d.default.rootData,(0,c._)`${d.default.valCxt}.${d.default.rootData}`),s.dynamicRef&&t.var(d.default.dynamicAnchors,(0,c._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{t.var(d.default.instancePath,(0,c._)`""`),t.var(d.default.parentData,(0,c._)`undefined`),t.var(d.default.parentDataProperty,(0,c._)`undefined`),t.var(d.default.rootData,d.default.data),s.dynamicRef&&t.var(d.default.dynamicAnchors,(0,c._)`{}`)}),e.code(n)}):e.func(t,(0,c._)`${d.default.data}, ${(a=i,(0,c._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${a.dynamicRef?(0,c._)`, ${d.default.dynamicAnchors}={}`:c.nil}}={}`)}`,s.$async,()=>e.code(y(r,i)).code(n))}function y(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${r} */`:c.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function _(e){(0,f.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:s,self:i}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return $(e,[],!1,t);let r=(0,i.getSchemaTypes)(e.schema),s=(0,i.coerceAndCheckDataType)(e,r);$(e,r,!s,t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:i}){let n=r.$comment;if(!0===i.$comment)e.code((0,c._)`${d.default.self}.logger.log(${n})`);else if("function"==typeof i.$comment){let r=(0,c.str)`${s}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,c._)`${d.default.self}.opts.$comment(${n}, ${r}, ${i}.schema)`)}}function $(e,t,r,s){var i,o,l,u;let{gen:p,schema:h,data:m,allErrors:y,opts:g,self:v}=e,{RULES:_}=v;if(h.$ref&&(g.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(h,_)))return void p.block(()=>T(e,"$ref",_.all.$ref.definition));function b(i){(0,n.shouldUseGroup)(h,i)&&(i.type?(p.if((0,a.checkDataType)(i.type,m,g.strictNumbers)),E(e,i),1===t.length&&t[0]===i.type&&r&&(p.else(),(0,a.reportTypeError)(e)),p.endIf()):E(e,i),y||p.if((0,c._)`${d.default.errors} === ${s||0}`))}g.jtd||(i=e,o=t,!i.schemaEnv.meta&&i.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{k(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let s of e.dataTypes)k(t,s)?r.push(s):t.includes("integer")&&"number"===s&&r.push("integer");e.dataTypes=r}(e,t)}}(i,o),i.opts.allowUnionTypes||(l=i,(u=o).length>1&&!(2===u.length&&u.includes("null"))&&S(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let s in r){let i=r[s];if("object"==typeof i&&(0,n.shouldUseRule)(e.schema,i)){let{type:r}=i.definition;r.length&&!r.some(e=>{var r,s;return r=t,s=e,r.includes(s)||"number"===s&&r.includes("integer")})&&S(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}(i,i.dataTypes))),p.block(()=>{for(let e of _.rules)b(e);b(_.post)})}function E(e,t){let{gen:r,schema:s,opts:{useDefaults:i}}=e;i&&(0,o.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,n.shouldUseRule)(s,r)&&T(e,r.keyword,r.definition,t.type)})}function k(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(_(e),g(e))?function(e){let{schema:t,opts:r,gen:s}=e;m(e,()=>{r.$comment&&t.$comment&&w(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),s.let(d.default.vErrors,null),s.let(d.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,c._)`${r}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}(e),b(e),function(e){let{gen:t,schemaEnv:r,validateName:s,ValidationError:i,opts:n}=e;r.$async?t.if((0,c._)`${d.default.errors} === 0`,()=>t.return(d.default.data),()=>t.throw((0,c._)`new ${i}(${d.default.vErrors})`)):(t.assign((0,c._)`${s}.errors`,d.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:s}){r instanceof c.Name&&e.assign((0,c._)`${t}.props`,r),s instanceof c.Name&&e.assign((0,c._)`${t}.items`,s)}(e),t.return((0,c._)`${d.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,s.topBoolOrEmptySchema)(e))};class x{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",I(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,c.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=c.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:r,schemaCode:s,schemaType:i,def:n}=this;r.if((0,c.or)((0,c._)`${s} === undefined`,t)),e!==c.nil&&r.assign(e,!0),(i.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:s,it:i}=this;return(0,c.or)(function(){if(r.length){if(!(t instanceof c.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,c._)`${(0,a.checkDataTypes)(e,t,i.opts.strictNumbers,a.DataType.Wrong)}`}return c.nil}(),function(){if(s.validateSchema){let r=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,c._)`!${r}(${t})`}return c.nil}())}subschema(e,t){let r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return!function(e,t){if(v(e)&&(_(e),g(e)))return function(e,t){var r;let s,{schema:i,gen:n,opts:a}=e;a.$comment&&i.$comment&&w(e),(s=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,p.resolveUrl)(r.opts.uriResolver,r.baseId,s)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let o=n.const("_errs",d.default.errors);b(e,o),n.var(t,(0,c._)`${o} === ${d.default.errors}`)}(e,t);(0,s.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){let{it:r,gen:s}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(s,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(s,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:s}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return s.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}}function T(e,t,r,s){let i=new x(e,r,t);"code"in r?r.code(i,s):i.$data&&r.validate?(0,l.funcKeywordCode)(i,r):"macro"in r?(0,l.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(i,r)}t.KeywordCxt=x;let O=/^\/(?:[^~]|~0|~1)*$/,P=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function I(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let i,n;if(""===e)return d.default.rootData;if("/"===e[0]){if(!O.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,n=d.default.rootData}else{let a=P.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let l=+a[1];if("#"===(i=a[2])){if(l>=t)throw Error(o("property/index",l));return s[t-l]}if(l>t)throw Error(o("data",l));if(n=r[t-l],!i)return n}let a=n;for(let e of i.split("/"))e&&(n=(0,c._)`${n}${(0,c.getProperty)((0,f.unescapeJsonPointer)(e))}`,a=(0,c._)`${a} && ${n}`);return a;function o(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=I},9820(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;let s=r(8994),i=r(6660),n=r(4954),a=r(8425);function o(e){let{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,(0,s._)`${i.parentData}[${i.parentDataProperty}]`))}function l(e,t,r){if(void 0===r)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,s.stringify)(r)})}t.macroKeywordCode=function(e,t){let{gen:r,keyword:i,schema:n,parentSchema:a,it:o}=e,u=t.macro.call(o.self,n,a,o),c=l(r,i,u);!1!==o.opts.validateSchema&&o.self.validateSchema(u,!0);let d=r.name("valid");e.subschema({schema:u,schemaPath:s.nil,errSchemaPath:`${o.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},d),e.pass(d,()=>e.error(!0))},t.funcKeywordCode=function(e,t){var r;let{gen:u,keyword:c,schema:d,parentSchema:p,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(h,t);let m=l(u,c,!f&&t.compile?t.compile.call(h.self,d,p,h):t.validate),y=u.let("valid");function g(r=t.async?(0,s._)`await `:s.nil){let a=h.opts.passContext?i.default.this:i.default.self,o=!("compile"in t&&!f||!1===t.schema);u.assign(y,(0,s._)`${r}${(0,n.callValidateCode)(e,m,a,o)}`,t.modifying)}function v(e){var r;u.if((0,s.not)(null!=(r=t.valid)?r:y),e)}e.block$data(y,function(){if(!1===t.errors)g(),t.modifying&&o(e),v(()=>e.error());else{let r,n,l=t.async?(r=u.let("ruleErrs",null),u.try(()=>g((0,s._)`await `),e=>u.assign(y,!1).if((0,s._)`${e} instanceof ${h.ValidationError}`,()=>u.assign(r,(0,s._)`${e}.errors`),()=>u.throw(e))),r):(n=(0,s._)`${m}.errors`,u.assign(n,null),g(s.nil),n);t.modifying&&o(e),v(()=>(function(e,t){let{gen:r}=e;r.if((0,s._)`Array.isArray(${t})`,()=>{r.assign(i.default.vErrors,(0,s._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,(0,s._)`${i.default.vErrors}.length`),(0,a.extendErrors)(e)},()=>e.error())})(e,l))}}),e.ok(null!=(r=t.valid)?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:s},i,n){if(Array.isArray(i.keyword)?!i.keyword.includes(n):i.keyword!==n)throw Error("ajv implementation error");let a=i.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${s}": `+r.errorsText(i.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}},3826(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;let s=r(8994),i=r(7218);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:o,topSchemaRef:l}){if(void 0!==t&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){let n=e.schema[t];return void 0===r?{schema:n,schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==n){if(void 0===a||void 0===o||void 0===l)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:l,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:n,data:a,dataTypes:o,propertyName:l}){if(void 0!==a&&void 0!==r)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(void 0!==r){let{errorPath:a,dataPathArr:o,opts:l}=t;c(u.let("data",(0,s._)`${t.data}${(0,s.getProperty)(r)}`,!0)),e.errorPath=(0,s.str)`${a}${(0,i.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,s._)`${r}`,e.dataPathArr=[...o,e.parentDataProperty]}function c(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==a&&(c(a instanceof s.Name?a:u.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),o&&(e.dataTypes=o)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:i,allErrors:n}){void 0!==s&&(e.compositeRule=s),void 0!==i&&(e.createErrors=i),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}},1967(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=r(6023);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return s.KeywordCxt}});var i=r(8994);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});let n=r(4383),a=r(4220),o=r(6247),l=r(1688),u=r(8994),c=r(9008),d=r(6419),p=r(7218),f=r(114),h=r(8951),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...function(e){var t,r,s,i,n,a,o,l,u,c,d,p,f,y,g,v,_,b,w,$,E,k,S,x,T;let O=e.strict,P=null==(t=e.code)?void 0:t.optimize,I=!0===P||void 0===P?1:P||0,j=null!=(s=null==(r=e.code)?void 0:r.regExp)?s:m,N=null!=(i=e.uriResolver)?i:h.default;return{strictSchema:null==(a=null!=(n=e.strictSchema)?n:O)||a,strictNumbers:null==(l=null!=(o=e.strictNumbers)?o:O)||l,strictTypes:null!=(c=null!=(u=e.strictTypes)?u:O)?c:"log",strictTuples:null!=(p=null!=(d=e.strictTuples)?d:O)?p:"log",strictRequired:null!=(y=null!=(f=e.strictRequired)?f:O)&&y,code:e.code?{...e.code,optimize:I,regExp:j}:{optimize:I,regExp:j},loopRequired:null!=(g=e.loopRequired)?g:200,loopEnum:null!=(v=e.loopEnum)?v:200,meta:null==(_=e.meta)||_,messages:null==(b=e.messages)||b,inlineRefs:null==(w=e.inlineRefs)||w,schemaId:null!=($=e.schemaId)?$:"$id",addUsedSchema:null==(E=e.addUsedSchema)||E,validateSchema:null==(k=e.validateSchema)||k,validateFormats:null==(S=e.validateFormats)||S,unicodeRegExp:null==(x=e.unicodeRegExp)||x,int32range:null==(T=e.int32range)||T,uriResolver:N}}(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);const s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,o.getRules)(),w.call(this,v,e,"NOT SUPPORTED"),w.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=x.call(this),e.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,s=f;"id"===r&&((s={...f}).id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let s=r(t);return"$async"in r||(this.errors=r.errors),s}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return s.call(this,e,t);async function s(e,t){await i.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||n.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0)}async function n(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return o.call(this,t),await l.call(this,t.missingSchema),n.call(this,e)}}function o({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){let r=await u.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,s=this.opts.validateSchema){let i;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,s);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(i=e[t])&&"string"!=typeof i)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(r,e);if(!s&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return s}getSchema(e){let t;for(;"string"==typeof(t=$.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,s=new l.SchemaEnv({schema:{},schemaId:r});if(!(t=l.resolveSchema.call(this,s,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=$.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,c.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(P.call(this,r,t),!t)return(0,p.eachItem)(r,e=>I.call(this,e)),this;N.call(this,t);let s={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===s.type.length?e=>I.call(this,e,s):e=>s.type.forEach(t=>I.call(this,e,s,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let s of(e=JSON.parse(JSON.stringify(e)),t)){let t=s.split("/").slice(1),i=e;for(let e of t)i=i[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:s}=t.definition,n=i[e];s&&n&&(i[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let s=e[r];(!t||t.test(r))&&("string"==typeof s?delete e[r]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[r]))}}_addSchema(e,t,r,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let n,{schemaId:a}=this.opts;if("object"==typeof e)n=e[a];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let o=this._cache.get(e);if(void 0!==o)return o;r=(0,c.normalizeId)(n||r);let u=c.getSchemaRefs.call(this,e,r);return o=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:u}),this._cache.set(o.schema,o),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=o),s&&this.validateSchema(e,!0),o}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,r,s="error"){for(let i in e)i in t&&this.logger[s](`${r}: option ${i}. ${e[i]}`)}function $(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function k(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function x(){let e={...this.opts};for(let t of y)delete e[t];return e}b.ValidationError=n.default,b.MissingRefError=a.default,t.default=b;let T={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function P(e,t){let{RULES:r}=this;if((0,p.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!O.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function I(e,t,r){var s;let i=null==t?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=i?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?j.call(this,a,o,t.before):a.rules.push(o),n.all[e]=o,null==(s=t.implements)||s.forEach(e=>this.addKeyword(e))}function j(e,t,r){let s=e.rules.findIndex(e=>e.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,R]}}},6013(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7371);s.code='require("ajv/dist/runtime/equal").default',t.default=s},5532(e,t){"use strict";function r(e){let t,r=e.length,s=0,i=0;for(;i<r;)s++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r&&(64512&(t=e.charCodeAt(i)))==56320&&i++;return s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},8951(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7980);s.code='require("ajv/dist/runtime/uri").default',t.default=s},4383(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}},714(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;let s=r(8994),i=r(7218);function n(e,t){let{gen:r,schema:n,data:a,keyword:o,it:l}=e;l.items=!0;let u=r.const("len",(0,s._)`${a}.length`);if(!1===n)e.setParams({len:t.length}),e.pass((0,s._)`${u} <= ${t.length}`);else if("object"==typeof n&&!(0,i.alwaysValidSchema)(l,n)){let n=r.var("valid",(0,s._)`${u} <= ${t.length}`);r.if((0,s.not)(n),()=>{var a;return a=n,void r.forRange("i",t.length,u,t=>{e.subschema({keyword:o,dataProp:t,dataPropType:i.Type.Num},a),l.allErrors||r.if((0,s.not)(a),()=>r.break())})}),e.ok(n)}}t.validateAdditionalItems=n,t.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:s}=t;Array.isArray(s)?n(e,s):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}}},8401(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),n=r(6660),a=r(7218);t.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,i._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:t,schema:r,parentSchema:o,data:l,errsCount:u,it:c}=e;if(!u)throw Error("ajv implementation error");let{allErrors:d,opts:p}=c;if(c.props=!0,"all"!==p.removeAdditional&&(0,a.alwaysValidSchema)(c,r))return;let f=(0,s.allSchemaProperties)(o.properties),h=(0,s.allSchemaProperties)(o.patternProperties);function m(e){t.code((0,i._)`delete ${l}[${e}]`)}function y(s){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)return void m(s);if(!1===r){e.setParams({additionalProperty:s}),e.error(),d||t.break();return}if("object"==typeof r&&!(0,a.alwaysValidSchema)(c,r)){let r=t.name("valid");"failing"===p.removeAdditional?(g(s,r,!1),t.if((0,i.not)(r),()=>{e.reset(),m(s)})):(g(s,r),d||t.if((0,i.not)(r),()=>t.break()))}}function g(t,r,s){let i={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===s&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",l,r=>{f.length||h.length?t.if(function(r){let n;if(f.length>8){let e=(0,a.schemaRefOrVal)(c,o.properties,"properties");n=(0,s.isOwnProperty)(t,e,r)}else n=f.length?(0,i.or)(...f.map(e=>(0,i._)`${r} === ${e}`)):i.nil;return h.length&&(n=(0,i.or)(n,...h.map(t=>(0,i._)`${(0,s.usePattern)(e,t)}.test(${r})`))),(0,i.not)(n)}(r),()=>y(r)):y(r)}),e.ok((0,i._)`${u} === ${n.default.errors}`)}}},2003(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let n=t.name("valid");r.forEach((t,r)=>{if((0,s.alwaysValidSchema)(i,t))return;let a=e.subschema({keyword:"allOf",schemaProp:r},n);e.ok(n),e.mergeEvaluated(a)})}}},1070(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(4954).validateUnion,error:{message:"must match a schema in anyOf"}}},2692(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?(0,s.str)`must contain at least ${e} valid item(s)`:(0,s.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?(0,s._)`{minContains: ${e}}`:(0,s._)`{minContains: ${e}, maxContains: ${t}}`},code(e){let t,r,{gen:n,schema:a,parentSchema:o,data:l,it:u}=e,{minContains:c,maxContains:d}=o;u.opts.next?(t=void 0===c?1:c,r=d):t=1;let p=n.const("len",(0,s._)`${l}.length`);if(e.setParams({min:t,max:r}),void 0===r&&0===t)return void(0,i.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==r&&t>r){(0,i.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,i.alwaysValidSchema)(u,a)){let i=(0,s._)`${p} >= ${t}`;void 0!==r&&(i=(0,s._)`${i} && ${p} <= ${r}`),e.pass(i);return}u.items=!0;let f=n.name("valid");function h(){let e=n.name("_valid"),i=n.let("count",0);m(e,()=>n.if(e,()=>{var e;return e=i,void(n.code((0,s._)`${e}++`),void 0===r?n.if((0,s._)`${e} >= ${t}`,()=>n.assign(f,!0).break()):(n.if((0,s._)`${e} > ${r}`,()=>n.assign(f,!1).break()),1===t?n.assign(f,!0):n.if((0,s._)`${e} >= ${t}`,()=>n.assign(f,!0))))}))}function m(t,r){n.forRange("i",0,p,s=>{e.subschema({keyword:"contains",dataProp:s,dataPropType:i.Type.Num,compositeRule:!0},t),r()})}void 0===r&&1===t?m(f,()=>n.if(f,()=>n.break())):0===t?(n.let(f,!0),void 0!==r&&n.if((0,s._)`${l}.length > 0`,h)):(n.let(f,!1),h()),e.result(f,()=>e.reset())}}},5860(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;let s=r(8994),i=r(7218),n=r(4954);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>(0,s.str)`must have ${1===t?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>(0,s._)`{property: ${e},
5
5
  missingProperty: ${i},
6
6
  depsCount: ${t},
7
- deps: ${r}}`};let a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let s in e)"__proto__"!==s&&((Array.isArray(e[s])?t:r)[s]=e[s]);return[t,r]}(e);o(e,t),l(e,r)}};function o(e,t=e.schema){let{gen:r,data:i,it:a}=e;if(0===Object.keys(t).length)return;let l=r.let("missing");for(let o in t){let u=t[o];if(0===u.length)continue;let c=(0,n.propertyInData)(r,i,o,a.opts.ownProperties);e.setParams({property:o,depsCount:u.length,deps:u.join(", ")}),a.allErrors?r.if(c,()=>{for(let t of u)(0,n.checkReportMissingProp)(e,t)}):(r.if((0,s._)`${c} && (${(0,n.checkMissingProp)(e,u,l)})`),(0,n.reportMissingProp)(e,l),r.else())}}function l(e,t=e.schema){let{gen:r,data:s,keyword:a,it:o}=e,u=r.name("valid");for(let l in t)(0,i.alwaysValidSchema)(o,t[l])||(r.if((0,n.propertyInData)(r,s,l,o.opts.ownProperties),()=>{let t=e.subschema({keyword:a,schemaProp:l},u);e.mergeValidEvaluated(t,u)},()=>r.var(u,!0)),e.ok(u))}t.validatePropertyDeps=o,t.validateSchemaDeps=l,t.default=a},8102(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);function n(e,t){let r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,s.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,s._)`{failingKeyword: ${e.ifClause}}`},code(e){let t,{gen:r,parentSchema:a,it:o}=e;void 0===a.then&&void 0===a.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let l=n(o,"then"),u=n(o,"else");if(!l&&!u)return;let c=r.let("valid",!0),d=r.name("_valid");if(t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.mergeEvaluated(t),e.reset(),l&&u){let t=r.let("ifClause");e.setParams({ifClause:t}),r.if(d,p("then",t),p("else",t))}else l?r.if(d,p("then")):r.if((0,s.not)(d),p("else"));function p(t,i){return()=>{let n=e.subschema({keyword:t},d);r.assign(c,d),e.mergeValidEvaluated(n,c),i?r.assign(i,(0,s._)`${t}`):e.setParams({ifClause:t})}}e.pass(c,()=>e.error(!0))}}},8313(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(714),i=r(1997),n=r(3665),a=r(5153),o=r(2692),l=r(5860),u=r(374),c=r(8401),d=r(3252),p=r(6398),f=r(4948),h=r(1070),m=r(5368),y=r(2003),g=r(8102),v=r(1871);t.default=function(e=!1){let t=[f.default,h.default,m.default,y.default,g.default,v.default,u.default,c.default,l.default,d.default,p.default];return e?t.push(i.default,a.default):t.push(s.default,n.default),t.push(o.default),t}},3665(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;let s=r(8994),i=r(7218),n=r(4954);function a(e,t,r=e.schema){let{gen:n,parentSchema:o,data:l,keyword:u,it:c}=e;(function(e){let{opts:s,errSchemaPath:n}=c,a=r.length,o=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(s.strictTuples&&!o){let e=`"${u}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${n}"`;(0,i.checkStrictMode)(c,e,s.strictTuples)}})(o),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(n,r.length,c.items));let d=n.name("valid"),p=n.const("len",(0,s._)`${l}.length`);r.forEach((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(n.if((0,s._)`${p} > ${r}`,()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},d)),e.ok(d))})}t.validateTuple=a,t.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,n.validateArray)(e))}}},5153(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(4954),a=r(714);t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:o}=r;s.items=!0,(0,i.alwaysValidSchema)(s,t)||(o?(0,a.validateAdditionalItems)(e,o):e.ok((0,n.validateArray)(e)))}}},4948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,s.alwaysValidSchema)(i,r))return void e.fail();let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},5368(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,s._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:r,parentSchema:n,it:a}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let o=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block(function(){r.forEach((r,n)=>{let c;(0,i.alwaysValidSchema)(a,r)?t.var(u,!0):c=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if((0,s._)`${u} && ${o}`).assign(o,!1).assign(l,(0,s._)`[${l}, ${n}]`).else(),t.if(u,()=>{t.assign(o,!0),t.assign(l,n),c&&e.mergeEvaluated(c,s.Name)})})}),e.result(o,()=>e.reset(),()=>e.error(!0))}}},6398(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),n=r(7218),a=r(7218);t.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:l,it:u}=e,{opts:c}=u,d=(0,s.allSchemaProperties)(r),p=d.filter(e=>(0,n.alwaysValidSchema)(u,r[e]));if(0===d.length||p.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;let f=c.strictSchema&&!c.allowMatchingProperties&&l.properties,h=t.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,a.evaluatedPropsToName)(t,u.props));let{props:m}=u;for(let e of d)f&&function(e){for(let t in f)new RegExp(e).test(t)&&(0,n.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),u.allErrors?y(e):(t.var(h,!0),y(e),t.if(h));function y(r){t.forIn("key",o,n=>{t.if((0,i._)`${(0,s.usePattern)(e,r)}.test(${n})`,()=>{let s=p.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:a.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign((0,i._)`${m}[${n}]`,!0):s||u.allErrors||t.if((0,i.not)(h),()=>t.break())})})}}}},1997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3665);t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")}},3252(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6023),i=r(4954),n=r(7218),a=r(8401);t.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:l,it:u}=e;"all"===u.opts.removeAdditional&&void 0===o.additionalProperties&&a.default.code(new s.KeywordCxt(u,a.default,"additionalProperties"));let c=(0,i.allSchemaProperties)(r);for(let e of c)u.definedProperties.add(e);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=n.mergeEvaluated.props(t,(0,n.toHash)(c),u.props));let d=c.filter(e=>!(0,n.alwaysValidSchema)(u,r[e]));if(0===d.length)return;let p=t.name("valid");for(let s of d){var f;(f=s,u.opts.useDefaults&&!u.compositeRule&&void 0!==r[f].default)?h(s):(t.if((0,i.propertyInData)(t,l,s,u.opts.ownProperties)),h(s),u.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(s),e.ok(p)}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}}},374(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,s._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:r,data:n,it:a}=e;if((0,i.alwaysValidSchema)(a,r))return;let o=t.name("valid");t.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},o),t.if((0,s.not)(o),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(o)}}},1871(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}},4954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;let s=r(8994),i=r(7218),n=r(6660),a=r(7218);function o(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}function l(e,t,r){return(0,s._)`${o(e)}.call(${t}, ${r})`}function u(e,t,r,i){let n=(0,s._)`${t}${(0,s.getProperty)(r)} === undefined`;return i?(0,s.or)(n,(0,s.not)(l(e,t,r))):n}function c(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){let{gen:r,data:i,it:n}=e;r.if(u(r,i,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,s._)`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,n){return(0,s.or)(...i.map(i=>(0,s.and)(u(e,t,i,r.ownProperties),(0,s._)`${n} = ${i}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=o,t.isOwnProperty=l,t.propertyInData=function(e,t,r,i){let n=(0,s._)`${t}${(0,s.getProperty)(r)} !== undefined`;return i?(0,s._)`${n} && ${l(e,t,r)}`:n},t.noPropertyInData=u,t.allSchemaProperties=c,t.schemaProperties=function(e,t){return c(t).filter(r=>!(0,i.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:a,errorPath:o},it:l},u,c,d){let p=d?(0,s._)`${e}, ${t}, ${i}${a}`:t,f=[[n.default.instancePath,(0,s.strConcat)(n.default.instancePath,o)],[n.default.parentData,l.parentData],[n.default.parentDataProperty,l.parentDataProperty],[n.default.rootData,n.default.rootData]];l.opts.dynamicRef&&f.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);let h=(0,s._)`${p}, ${r.object(...f)}`;return c!==s.nil?(0,s._)`${u}.call(${c}, ${h})`:(0,s._)`${u}(${h})`};let d=(0,s._)`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:n}=t.code,o=n(r,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,s._)`${"new RegExp"===n.code?d:(0,a.useFunc)(e,n)}(${r}, ${i})`})},t.validateArray=function(e){let{gen:t,data:r,keyword:n,it:a}=e,o=t.name("valid");if(a.allErrors){let e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(o,!0),l(()=>t.break()),o;function l(a){let l=t.const("len",(0,s._)`${r}.length`);t.forRange("i",0,l,r=>{e.subschema({keyword:n,dataProp:r,dataPropType:i.Type.Num},o),t.if((0,s.not)(o),a)})}},t.validateUnion=function(e){let{gen:t,schema:r,keyword:n,it:a}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some(e=>(0,i.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let o=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((r,i)=>{let a=e.subschema({keyword:n,schemaProp:i,compositeRule:!0},l);t.assign(o,(0,s._)`${o} || ${l}`),e.mergeValidEvaluated(a,l)||t.if((0,s.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}},3330(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},8119(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3330),i=r(930);t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,i.default]},930(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;let s=r(4220),i=r(4954),n=r(8994),a=r(6660),o=r(1688),l=r(7218);function u(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,n._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function c(e,t,r,s){let{gen:o,it:u}=e,{allErrors:c,schemaEnv:d,opts:p}=u,f=p.passContext?a.default.this:n.nil;function h(e){let t=(0,n._)`${e}.errors`;o.assign(a.default.vErrors,(0,n._)`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),o.assign(a.default.errors,(0,n._)`${a.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;let s=null==(t=null==r?void 0:r.validate)?void 0:t.evaluated;if(!0!==u.props)if(s&&!s.dynamicProps)void 0!==s.props&&(u.props=l.mergeEvaluated.props(o,s.props,u.props));else{let t=o.var("props",(0,n._)`${e}.evaluated.props`);u.props=l.mergeEvaluated.props(o,t,u.props,n.Name)}if(!0!==u.items)if(s&&!s.dynamicItems)void 0!==s.items&&(u.items=l.mergeEvaluated.items(o,s.items,u.items));else{let t=o.var("items",(0,n._)`${e}.evaluated.items`);u.items=l.mergeEvaluated.items(o,t,u.items,n.Name)}}s?function(){if(!d.$async)throw Error("async schema referenced by sync schema");let r=o.let("valid");o.try(()=>{o.code((0,n._)`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),c||o.assign(r,!0)},e=>{o.if((0,n._)`!(${e} instanceof ${u.ValidationError})`,()=>o.throw(e)),h(e),c||o.assign(r,!1)}),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,f),()=>m(t),()=>h(t))}t.getValidate=u,t.callRef=c,t.default={keyword:"$ref",schemaType:"string",code(e){var t,r;let i,a,l,d,{gen:p,schema:f,it:h}=e,{baseId:m,schemaEnv:y,validateName:g,opts:v,self:_}=h,{root:b}=y;if(("#"===f||"#/"===f)&&m===b.baseId){if(y===b)return c(e,g,y,y.$async);let t=p.scopeValue("root",{ref:b});return c(e,(0,n._)`${t}.validate`,b,b.$async)}let w=o.resolveRef.call(_,b,m,f);if(void 0===w)throw new s.default(h.opts.uriResolver,m,f);return w instanceof o.SchemaEnv?(i=u(e,t=w),void c(e,i,t,t.$async)):(r=w,a=p.scopeValue("schema",!0===v.code.source?{ref:r,code:(0,n.stringify)(r)}:{ref:r}),l=p.name("valid"),d=e.subschema({schema:r,dataTypes:[],schemaPath:n.nil,topSchemaRef:a,errSchemaPath:f},l),void(e.mergeEvaluated(d),e.ok(l)))}}},9376(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(5141),n=r(1688),a=r(4220),o=r(7218);t.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,s._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){let{gen:t,data:r,schema:l,parentSchema:u,it:c}=e,{oneOf:d}=u;if(!c.opts.discriminator)throw Error("discriminator: requires discriminator option");let p=l.propertyName;if("string"!=typeof p)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!d)throw Error("discriminator: requires oneOf keyword");let f=t.let("valid",!1),h=t.const("tag",(0,s._)`${r}${(0,s.getProperty)(p)}`);t.if((0,s._)`typeof ${h} == "string"`,()=>(function(){let r=function(){var e;let t={},r=i(u),s=!0;for(let t=0;t<d.length;t++){let u=d[t];if((null==u?void 0:u.$ref)&&!(0,o.schemaHasRulesButRef)(u,c.self.RULES)){let e=u.$ref;if((u=n.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,e))instanceof n.SchemaEnv&&(u=u.schema),void 0===u)throw new a.default(c.opts.uriResolver,c.baseId,e)}let f=null==(e=null==u?void 0:u.properties)?void 0:e[p];if("object"!=typeof f)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);s=s&&(r||i(u)),function(e,t){if(e.const)l(e.const,t);else if(e.enum)for(let r of e.enum)l(r,t);else throw Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}(f,t)}if(!s)throw Error(`discriminator: "${p}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(p)}function l(e,r){if("string"!=typeof e||e in t)throw Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();for(let i in t.if(!1),r)t.elseIf((0,s._)`${h} === ${i}`),t.assign(f,function(r){let i=t.name("valid"),n=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(n,s.Name),i}(r[i]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:h,tagName:p}),t.endIf()})(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:h,tagName:p})),e.ok(f)}}},5141(e,t){"use strict";var r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(s=r||(t.DiscrError=r={})).Tag="tag",s.Mapping="mapping"},3959(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8119),i=r(659),n=r(8313),a=r(8563),o=r(4618);t.default=[s.default,i.default,(0,n.default)(),a.default,o.metadataVocabulary,o.contentVocabulary]},424(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,s._)`{format: ${e}}`},code(e,t){let r,i,n,a,o,l,{gen:u,data:c,$data:d,schema:p,schemaCode:f,it:h}=e,{opts:m,errSchemaPath:y,schemaEnv:g,self:v}=h;m.validateFormats&&(d?(r=u.scopeValue("formats",{ref:v.formats,code:m.code.formats}),i=u.const("fDef",(0,s._)`${r}[${f}]`),n=u.let("fType"),a=u.let("format"),u.if((0,s._)`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>u.assign(n,(0,s._)`${i}.type || "string"`).assign(a,(0,s._)`${i}.validate`),()=>u.assign(n,(0,s._)`"string"`).assign(a,i)),e.fail$data((0,s.or)(!1===m.strictSchema?s.nil:(0,s._)`${f} && !${a}`,(o=g.$async?(0,s._)`(${i}.async ? await ${a}(${c}) : ${a}(${c}))`:(0,s._)`${a}(${c})`,l=(0,s._)`(typeof ${a} == "function" ? ${o} : ${a}.test(${c}))`,(0,s._)`${a} && ${a} !== true && ${n} === ${t} && !${l}`)))):function(){var r;let i,n,a=v.formats[p];if(!a){if(!1===m.strictSchema)return v.logger.warn(o());throw Error(o());function o(){return`unknown format "${p}" ignored in schema at path "${y}"`}}if(!0===a)return;let[l,d,f]=(i=(r=a)instanceof RegExp?(0,s.regexpCode)(r):m.code.formats?(0,s._)`${m.code.formats}${(0,s.getProperty)(p)}`:void 0,n=u.scopeValue("formats",{key:p,ref:r,code:i}),"object"!=typeof r||r instanceof RegExp?["string",r,n]:[r.type||"string",r.validate,(0,s._)`${n}.validate`]);l===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,s._)`await ${f}(${c})`}return"function"==typeof d?(0,s._)`${f}(${c})`:(0,s._)`${f}.test(${c})`}())}())}}},8563(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[r(424).default]},4618(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7080(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(6013);t.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,s._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:r,$data:a,schemaCode:o,schema:l}=e;a||l&&"object"==typeof l?e.fail$data((0,s._)`!${(0,i.useFunc)(t,n.default)}(${r}, ${o})`):e.fail((0,s._)`${l} !== ${r}`)}}},5358(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(6013);t.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,s._)`{allowedValues: ${e}}`},code(e){let t,r,{gen:a,data:o,$data:l,schema:u,schemaCode:c,it:d}=e;if(!l&&0===u.length)throw Error("enum must have non-empty array");let p=u.length>=d.opts.loopEnum,f=()=>null!=t?t:t=(0,i.useFunc)(a,n.default);if(p||l)r=a.let("valid"),e.block$data(r,function(){a.assign(r,!1),a.forOf("v",c,e=>a.if((0,s._)`${f()}(${o}, ${e})`,()=>a.assign(r,!0).break()))});else{if(!Array.isArray(u))throw Error("ajv implementation error");let e=a.const("vSchema",c);r=(0,s.or)(...u.map((t,r)=>{var i,n;let a;return i=e,"object"==typeof(a=u[n=r])&&null!==a?(0,s._)`${f()}(${o}, ${i}[${n}])`:(0,s._)`${o} === ${a}`}))}e.pass(r)}}},659(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8997),i=r(9190),n=r(4280),a=r(8805),o=r(2189),l=r(3138),u=r(8870),c=r(1858),d=r(7080),p=r(5358);t.default=[s.default,i.default,n.default,a.default,o.default,l.default,u.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default]},8870(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,n="maxItems"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`${r}.length ${n} ${i}`)}}},4280(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(5532);t.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:a,it:o}=e,l="maxLength"===t?s.operators.GT:s.operators.LT,u=!1===o.opts.unicode?(0,s._)`${r}.length`:(0,s._)`${(0,i.useFunc)(e.gen,n.default)}(${r})`;e.fail$data((0,s._)`${u} ${l} ${a}`)}}},8997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=s.operators,n={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};t.default={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must be ${n[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,s._)`{comparison: ${n[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,s._)`${r} ${n[t].fail} ${i} || isNaN(${r})`)}}},2189(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,n="maxProperties"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`Object.keys(${r}).length ${n} ${i}`)}}},9190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,s._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:r,schemaCode:i,it:n}=e,a=n.opts.multipleOfPrecision,o=t.let("res"),l=a?(0,s._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,s._)`${o} !== parseInt(${o})`;e.fail$data((0,s._)`(${i} === 0 || (${o} = ${r}/${i}, ${l}))`)}}},8805(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(7218),n=r(8994);t.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,n._)`{pattern: ${e}}`},code(e){let{gen:t,data:r,$data:a,schema:o,schemaCode:l,it:u}=e,c=u.opts.unicodeRegExp?"u":"";if(a){let{regExp:s}=u.opts.code,a="new RegExp"===s.code?(0,n._)`new RegExp`:(0,i.useFunc)(t,s),o=t.let("valid");t.try(()=>t.assign(o,(0,n._)`${a}(${l}, ${c}).test(${r})`),()=>t.assign(o,!1)),e.fail$data((0,n._)`!${o}`)}else{let t=(0,s.usePattern)(e,o);e.fail$data((0,n._)`!${t}.test(${r})`)}}}},3138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),n=r(7218);t.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,i.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,i._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:r,schemaCode:a,data:o,$data:l,it:u}=e,{opts:c}=u;if(!l&&0===r.length)return;let d=r.length>=c.loopRequired;if(u.allErrors?function(){if(d||l)e.block$data(i.nil,p);else for(let t of r)(0,s.checkReportMissingProp)(e,t)}():function(){let n=t.let("missing");if(d||l){let r=t.let("valid",!0);e.block$data(r,()=>{var l,u;return l=n,u=r,void(e.setParams({missingProperty:l}),t.forOf(l,a,()=>{t.assign(u,(0,s.propertyInData)(t,o,l,c.ownProperties)),t.if((0,i.not)(u),()=>{e.error(),t.break()})},i.nil))}),e.ok(r)}else t.if((0,s.checkMissingProp)(e,r,n)),(0,s.reportMissingProp)(e,n),t.else()}(),c.strictRequired){let t=e.parentSchema.properties,{definedProperties:s}=e.it;for(let e of r)if((null==t?void 0:t[e])===void 0&&!s.has(e)){let t=u.schemaEnv.baseId+u.errSchemaPath,r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,n.checkStrictMode)(u,r,u.opts.strictRequired)}}function p(){t.forOf("prop",a,r=>{e.setParams({missingProperty:r}),t.if((0,s.noPropertyInData)(t,o,r,c.ownProperties),()=>e.error())})}}}},1858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6419),i=r(8994),n=r(7218),a=r(6013);t.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,i.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,i._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:r,$data:o,schema:l,parentSchema:u,schemaCode:c,it:d}=e;if(!o&&!l)return;let p=t.let("valid"),f=u.items?(0,s.getSchemaTypes)(u.items):[];e.block$data(p,function(){let o=t.let("i",(0,i._)`${r}.length`),l=t.let("j");e.setParams({i:o,j:l}),t.assign(p,!0),t.if((0,i._)`${o} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?function(n,a){let o=t.name("item"),l=(0,s.checkDataTypes)(f,o,d.opts.strictNumbers,s.DataType.Wrong),u=t.const("indices",(0,i._)`{}`);t.for((0,i._)`;${n}--;`,()=>{t.let(o,(0,i._)`${r}[${n}]`),t.if(l,(0,i._)`continue`),f.length>1&&t.if((0,i._)`typeof ${o} == "string"`,(0,i._)`${o} += "_"`),t.if((0,i._)`typeof ${u}[${o}] == "number"`,()=>{t.assign(a,(0,i._)`${u}[${o}]`),e.error(),t.assign(p,!1).break()}).code((0,i._)`${u}[${o}] = ${n}`)})}:function(s,o){let l=(0,n.useFunc)(t,a.default),u=t.name("outer");t.label(u).for((0,i._)`;${s}--;`,()=>t.for((0,i._)`${o} = ${s}; ${o}--;`,()=>t.if((0,i._)`${l}(${r}[${s}], ${r}[${o}])`,()=>{e.error(),t.assign(p,!1).break(u)})))})(o,l))},(0,i._)`${c} === false`),e.ok(p)}}},9454(e,t,r){"use strict";var s=r(181).Buffer,i=r(181).SlowBuffer;function n(e,t){if(!s.isBuffer(e)||!s.isBuffer(t)||e.length!==t.length)return!1;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r}e.exports=n,n.install=function(){s.prototype.equal=i.prototype.equal=function(e){return n(this,e)}};var a=s.prototype.equal,o=i.prototype.equal;n.restore=function(){s.prototype.equal=a,i.prototype.equal=o}},6507(e,t,r){"use strict";let s=r(5317),i=r(8388),n=r(442);function a(e,t,r){let a=i(e,t,r),o=s.spawn(a.command,a.args,a.options);return n.hookChildProcess(o,a),o}e.exports=a,e.exports.spawn=a,e.exports.sync=function(e,t,r){let a=i(e,t,r),o=s.spawnSync(a.command,a.args,a.options);return o.error=o.error||n.verifyENOENTSync(o.status,a),o},e.exports._parse=i,e.exports._enoent=n},442(e){"use strict";let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function s(e,s){return t&&1===e&&!s.file?r(s.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let i=e.emit;e.emit=function(t,n){if("exit"===t){let t=s(n,r);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:s,verifyENOENTSync:function(e,s){return t&&1===e&&!s.file?r(s.original,"spawnSync"):null},notFoundError:r}},8388(e,t,r){"use strict";let s=r(6928),i=r(3803),n=r(2077),a=r(1880),o="win32"===process.platform,l=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let c={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?c:function(e){let t;if(!o)return e;let r=(e.file=i(e),(t=e.file&&a(e.file))?(e.args.unshift(e.file),e.command=t,i(e)):e.file),c=!l.test(r);if(e.options.forceShell||c){let t=u.test(r);e.command=s.normalize(e.command),e.command=n.command(e.command),e.args=e.args.map(e=>n.argument(e,t));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(c)}},2077(e){"use strict";let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},1880(e,t,r){"use strict";let s=r(9896),i=r(600);e.exports=function(e){let t,r=Buffer.alloc(150);try{t=s.openSync(e,"r"),s.readSync(t,r,0,150,0),s.closeSync(t)}catch(e){}return i(r.toString())}},3803(e,t,r){"use strict";let s=r(6928),i=r(1905),n=r(9695);function a(e,t){let r,a=e.options.env||process.env,o=process.cwd(),l=null!=e.options.cwd,u=l&&void 0!==process.chdir&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch(e){}try{r=i.sync(e.command,{path:a[n({env:a})],pathExt:t?s.delimiter:void 0})}catch(e){}finally{u&&process.chdir(o)}return r&&(r=s.resolve(l?e.options.cwd:"",r)),r}e.exports=function(e){return a(e)||a(e,!0)}},8583(e,t,r){let s=r(9896),i=r(6928),n=r(857),a=r(6982),o=r(4519).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function u(e){console.log(`[dotenv@${o}][DEBUG] ${e}`)}function c(e){console.log(`[dotenv@${o}] ${e}`)}function d(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function p(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)s.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=i.resolve(process.cwd(),".env.vault");return s.existsSync(t)?t:null}function f(e){return"~"===e[0]?i.join(n.homedir(),e.slice(1)):e}let h={configDotenv:function(e){let t,r=i.resolve(process.cwd(),".env"),n="utf8",a=!!(e&&e.debug),o=!e||!("quiet"in e)||e.quiet;e&&e.encoding?n=e.encoding:a&&u("No encoding is specified. UTF-8 is used by default");let l=[r];if(e&&e.path)if(Array.isArray(e.path))for(let t of(l=[],e.path))l.push(f(t));else l=[f(e.path)];let d={};for(let r of l)try{let t=h.parse(s.readFileSync(r,{encoding:n}));h.populate(d,t,e)}catch(e){a&&u(`Failed to load ${r} ${e.message}`),t=e}let p=process.env;if(e&&null!=e.processEnv&&(p=e.processEnv),h.populate(p,d,e),a||!o){let e=Object.keys(d).length,r=[];for(let e of l)try{let t=i.relative(process.cwd(),e);r.push(t)}catch(r){a&&u(`Failed to load ${e} ${r.message}`),t=r}c(`injecting env (${e}) from ${r.join(",")}`)}return t?{parsed:d,error:t}:{parsed:d}},_configVault:function(e){let t=!!(e&&e.debug),r=!e||!("quiet"in e)||e.quiet;(t||!r)&&c("Loading env from encrypted .env.vault");let s=h._parseVault(e),i=process.env;return e&&null!=e.processEnv&&(i=e.processEnv),h.populate(i,s,e),{parsed:s}},_parseVault:function(e){let t,r=p(e=e||{});e.path=r;let s=h.configDotenv(e);if(!s.parsed){let e=Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw e.code="MISSING_DATA",e}let i=d(e).split(","),n=i.length;for(let e=0;e<n;e++)try{let r=i[e].trim(),n=function(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let s=r.password;if(!s){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let i=r.searchParams.get("environment");if(!i){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let n=`DOTENV_VAULT_${i.toUpperCase()}`,a=e.parsed[n];if(!a){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:a,key:s}}(s,r);t=h.decrypt(n.ciphertext,n.key);break}catch(t){if(e+1>=n)throw t}return h.parse(t)},config:function(e){if(0===d(e).length)return h.configDotenv(e);let t=p(e);if(!t){var r;return r=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${o}][WARN] ${r}`),h.configDotenv(e)}return h._configVault(e)},decrypt:function(e,t){let r=Buffer.from(t.slice(-64),"hex"),s=Buffer.from(e,"base64"),i=s.subarray(0,12),n=s.subarray(-16);s=s.subarray(12,-16);try{let e=a.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(n),`${e.update(s)}${e.final()}`}catch(s){let e=s instanceof RangeError,t="Invalid key length"===s.message,r="Unsupported state or unable to authenticate data"===s.message;if(e||t){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw s}},parse:function(e){let t,r={},s=e.toString();for(s=s.replace(/\r\n?/mg,"\n");null!=(t=l.exec(s));){let e=t[1],s=t[2]||"",i=(s=s.trim())[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===i&&(s=(s=s.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),r[e]=s}return r},populate:function(e,t,r={}){let s=!!(r&&r.debug),i=!!(r&&r.override);if("object"!=typeof t){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===i&&(e[r]=t[r]),s&&(!0===i?u(`"${r}" is already defined and WAS overwritten`):u(`"${r}" is already defined and was NOT overwritten`))):e[r]=t[r]}};e.exports.configDotenv=h.configDotenv,e.exports._configVault=h._configVault,e.exports._parseVault=h._parseVault,e.exports.config=h.config,e.exports.decrypt=h.decrypt,e.exports.parse=h.parse,e.exports.populate=h.populate,e.exports=h},9053(e,t,r){"use strict";var s=r(6608).Buffer,i=r(2188);function n(e){if(s.isBuffer(e))return e;if("string"==typeof e)return s.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function a(e,t,r){for(var s=0;t+s<r&&0===e[t+s];)++s;return e[t+s]>=128&&--s,s}e.exports={derToJose:function(e,t){e=n(e);var r=i(t),a=r+1,o=e.length,l=0;if(48!==e[l++])throw Error('Could not find expected "seq"');var u=e[l++];if(129===u&&(u=e[l++]),o-l<u)throw Error('"seq" specified length of "'+u+'", only "'+(o-l)+'" remaining');if(2!==e[l++])throw Error('Could not find expected "int" for "r"');var c=e[l++];if(o-l-2<c)throw Error('"r" specified length of "'+c+'", only "'+(o-l-2)+'" available');if(a<c)throw Error('"r" specified length of "'+c+'", max of "'+a+'" is acceptable');var d=l;if(l+=c,2!==e[l++])throw Error('Could not find expected "int" for "s"');var p=e[l++];if(o-l!==p)throw Error('"s" specified length of "'+p+'", expected "'+(o-l)+'"');if(a<p)throw Error('"s" specified length of "'+p+'", max of "'+a+'" is acceptable');var f=l;if((l+=p)!==o)throw Error('Expected to consume entire buffer, but "'+(o-l)+'" bytes remain');var h=r-c,m=r-p,y=s.allocUnsafe(h+c+m+p);for(l=0;l<h;++l)y[l]=0;e.copy(y,l,d+Math.max(-h,0),d+c),l=r;for(var g=l;l<g+m;++l)y[l]=0;return e.copy(y,l,f+Math.max(-m,0),f+p),y=(y=y.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,t){e=n(e);var r=i(t),o=e.length;if(o!==2*r)throw TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+o+'"');var l=a(e,0,r),u=a(e,r,e.length),c=r-l,d=r-u,p=2+c+1+1+d,f=p<128,h=s.allocUnsafe((f?2:3)+p),m=0;return h[m++]=48,f?h[m++]=p:(h[m++]=129,h[m++]=255&p),h[m++]=2,h[m++]=c,l<0?(h[m++]=0,m+=e.copy(h,m,0,r)):m+=e.copy(h,m,l,r),h[m++]=2,h[m++]=d,u<0?(h[m++]=0,e.copy(h,m,r)):e.copy(h,m,r+u),h}}},2188(e){"use strict";function t(e){return(e/8|0)+ +(e%8!=0)}var r={ES256:t(256),ES384:t(384),ES512:t(521)};e.exports=function(e){var t=r[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}},7371(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((s=t.length)!=r.length)return!1;for(i=s;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,n[i]))return!1;for(i=s;0!=i--;){var s,i,n,a=n[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},9344(e,t,r){var s;function i(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,s){i(e,t||{},function(e,t){e?s(e):r(t)})})}s(e,t||{},function(e,s){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,s=!1),r(e,s)})}r(9896),s="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=i,i.sync=function(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709(e,t,r){e.exports=i,i.sync=function(e,t){return n(s.statSync(e),t)};var s=r(9896);function i(e,t,r){s.stat(e,function(e,s){r(e,!e&&n(s,t))})}function n(e,t){var r,s,i,n,a,o,l,u,c;return e.isFile()&&(r=e,s=t,i=r.mode,n=r.uid,a=r.gid,o=void 0!==s.uid?s.uid:process.getuid&&process.getuid(),l=void 0!==s.gid?s.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),i&parseInt("001",8)||i&c&&a===l||i&u&&n===o||i&(u|c)&&0===o)}},8541(e,t,r){e.exports=n,n.sync=function(e,t){return i(s.statSync(e),e,t)};var s=r(9896);function i(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var s=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!s||-1!==(s=s.split(";")).indexOf(""))return!0;for(var i=0;i<s.length;i++){var n=s[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function n(e,t,r){s.stat(e,function(s,n){r(s,!s&&i(n,e,t))})}},205(e){"use strict";var t=e.exports=function(e,r,s){"function"==typeof r&&(s=r,r={});var i="function"==typeof(s=r.cb||s)?s:s.pre||function(){};!function e(r,s,i,n,a,o,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var p in s(n,a,o,l,u,c,d),n){var f=n[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var h=0;h<f.length;h++)e(r,s,i,f[h],a+"/"+p+"/"+h,o,a,p,n,h)}else if(p in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)e(r,s,i,f[m],a+"/"+p+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),o,a,p,n,m)}else(p in t.keywords||r.allKeys&&!(p in t.skipKeywords))&&e(r,s,i,f,a+"/"+p,o,a,p,n)}i(n,a,o,l,u,c,d)}}(r,i,s.post||function(){},e,"",e)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},2548(e,t,r){var s=r(3263);e.exports=function(e,t){t=t||{};var r=s.decode(e,t);if(!r)return null;var i=r.payload;if("string"==typeof i)try{var n=JSON.parse(i);null!==n&&"object"==typeof n&&(i=n)}catch(e){}return!0===t.complete?{header:r.header,payload:i,signature:r.signature}:i}},8400(e,t,r){e.exports={decode:r(2548),verify:r(6467),sign:r(9147),JsonWebTokenError:r(1957),NotBeforeError:r(4470),TokenExpiredError:r(7788)}},1957(e){var t=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,e.exports=t},4470(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="NotBeforeError",this.date=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},7788(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},5841(e,t,r){e.exports=r(3895).satisfies(process.version,">=15.7.0")},953(e,t,r){e.exports=r(3895).satisfies(process.version,"^6.12.0 || >=8.0.0")},455(e,t,r){e.exports=r(3895).satisfies(process.version,">=16.9.0")},4559(e,t,r){var s=r(3866);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=s(e);if(void 0===i)return;return Math.floor(r+i/1e3)}if("number"==typeof e)return r+e}},723(e,t,r){let s=r(5841),i=r(455),n={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},a={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let o=n[r];if(!o)throw Error(`Unknown key type "${r}".`);if(!o.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${o.join(", ")}.`);if(s)switch(r){case"ec":let l=t.asymmetricKeyDetails.namedCurve,u=a[e];if(l!==u)throw Error(`"alg" parameter "${e}" requires curve "${u}".`);break;case"rsa-pss":if(i){let r=parseInt(e.slice(-3),10),{hashAlgorithm:s,mgf1HashAlgorithm:i,saltLength:n}=t.asymmetricKeyDetails;if(s!==`sha${r}`||i!==s)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==n&&n>r>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},9147(e,t,r){let s=r(4559),i=r(953),n=r(723),a=r(3263),o=r(5357),l=r(6782),u=r(5250),c=r(8094),d=r(6052),p=r(1251),f=r(8430),{KeyObject:h,createSecretKey:m,createPrivateKey:y}=r(6982),g=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];i&&g.splice(3,0,"PS256","PS384","PS512");let v={expiresIn:{isValid:function(e){return u(e)||p(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||p(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return p(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:o.bind(null,g),message:'"algorithm" must be a valid string enum value'},header:{isValid:d,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},_={iat:{isValid:c,message:'"iat" should be a number of seconds'},exp:{isValid:c,message:'"exp" should be a number of seconds'},nbf:{isValid:c,message:'"nbf" should be a number of seconds'}};function b(e,t,r,s){if(!d(r))throw Error('Expected "'+s+'" to be a plain object.');Object.keys(r).forEach(function(i){let n=e[i];if(!n){if(!t)throw Error('"'+i+'" is not allowed in "'+s+'"');return}if(!n.isValid(r[i]))throw Error(n.message)})}let w={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},$=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,i){var o,l;"function"==typeof r?(i=r,r={}):r=r||{};let u="object"==typeof e&&!Buffer.isBuffer(e),c=Object.assign({alg:r.algorithm||"HS256",typ:u?"JWT":void 0,kid:r.keyid},r.header);function d(e){if(i)return i(e);throw e}if(!t&&"none"!==r.algorithm)return d(Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof h))try{t=y(t)}catch(e){try{t=m("string"==typeof t?Buffer.from(t):t)}catch(e){return d(Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&"secret"!==t.type)return d(Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if("private"!==t.type)return d(Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!r.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return d(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(void 0===e)return d(Error("payload is required"));if(u){try{o=e,b(_,!0,o,"payload")}catch(e){return d(e)}r.mutatePayload||(e=Object.assign({},e))}else{let t=$.filter(function(e){return void 0!==r[e]});if(t.length>0)return d(Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return d(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return d(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{l=r,b(v,!1,l,"options")}catch(e){return d(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{n(c.alg,t)}catch(e){return d(e)}let p=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:u&&(e.iat=p),void 0!==r.notBefore){try{e.nbf=s(r.notBefore,p)}catch(e){return d(e)}if(void 0===e.nbf)return d(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=s(r.expiresIn,p)}catch(e){return d(e)}if(void 0===e.exp)return d(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(w).forEach(function(t){let s=w[t];if(void 0!==r[t]){if(void 0!==e[s])return d(Error('Bad "options.'+t+'" option. The payload already has an "'+s+'" property.'));e[s]=r[t]}});let g=r.encoding||"utf8";if("function"==typeof i)i=i&&f(i),a.createSign({header:c,privateKey:t,payload:e,encoding:g}).once("error",i).once("done",function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&e.length<256)return i(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));i(null,e)});else{let s=a.sign({header:c,payload:e,secret:t,encoding:g});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&s.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return s}}},6467(e,t,r){let s=r(1957),i=r(4470),n=r(7788),a=r(2548),o=r(4559),l=r(723),u=r(953),c=r(3263),{KeyObject:d,createSecretKey:p,createPublicKey:f}=r(6982),h=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],y=["RS256","RS384","RS512"],g=["HS256","HS384","HS512"];u&&(h.splice(h.length,0,"PS256","PS384","PS512"),y.splice(y.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,u){let v,_,b;if("function"!=typeof r||u||(u=r,r={}),r||(r={}),r=Object.assign({},r),v=u||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return v(new s("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return v(new s("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return v(new s("allowInvalidAsymmetricKeyTypes must be a boolean"));let w=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return v(new s("jwt must be provided"));if("string"!=typeof e)return v(new s("jwt must be a string"));let $=e.split(".");if(3!==$.length)return v(new s("jwt malformed"));try{_=a(e,{complete:!0})}catch(e){return v(e)}if(!_)return v(new s("invalid token"));let E=_.header;if("function"==typeof t){if(!u)return v(new s("verify must be called asynchronous if secret or public key is provided as a callback"));b=t}else b=function(e,r){return r(null,t)};return b(E,function(t,a){let u;if(t)return v(new s("error in secret or public key callback: "+t.message));let b=""!==$[2].trim();if(!b&&a)return v(new s("jwt signature is required"));if(b&&!a)return v(new s("secret or public key must be provided"));if(!b&&!r.algorithms)return v(new s('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=a&&!(a instanceof d))try{a=f(a)}catch(e){try{a=p("string"==typeof a?Buffer.from(a):a)}catch(e){return v(new s("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===a.type?r.algorithms=g:["rsa","rsa-pss"].includes(a.asymmetricKeyType)?r.algorithms=y:"ec"===a.asymmetricKeyType?r.algorithms=m:r.algorithms=h),-1===r.algorithms.indexOf(_.header.alg))return v(new s("invalid algorithm"));if(E.alg.startsWith("HS")&&"secret"!==a.type)return v(new s(`secretOrPublicKey must be a symmetric key when using ${E.alg}`));if(/^(?:RS|PS|ES)/.test(E.alg)&&"public"!==a.type)return v(new s(`secretOrPublicKey must be an asymmetric key when using ${E.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{l(E.alg,a)}catch(e){return v(e)}try{u=c.verify(e,_.header.alg,a)}catch(e){return v(e)}if(!u)return v(new s("invalid signature"));let k=_.payload;if(void 0!==k.nbf&&!r.ignoreNotBefore){if("number"!=typeof k.nbf)return v(new s("invalid nbf value"));if(k.nbf>w+(r.clockTolerance||0))return v(new i("jwt not active",new Date(1e3*k.nbf)))}if(void 0!==k.exp&&!r.ignoreExpiration){if("number"!=typeof k.exp)return v(new s("invalid exp value"));if(w>=k.exp+(r.clockTolerance||0))return v(new n("jwt expired",new Date(1e3*k.exp)))}if(r.audience){let e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(k.aud)?k.aud:[k.aud]).some(function(t){return e.some(function(e){return e instanceof RegExp?e.test(t):e===t})}))return v(new s("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&k.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(k.iss)))return v(new s("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&k.sub!==r.subject)return v(new s("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&k.jti!==r.jwtid)return v(new s("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&k.nonce!==r.nonce)return v(new s("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof k.iat)return v(new s("iat required when maxAge is specified"));let e=o(r.maxAge,k.iat);if(void 0===e)return v(new s('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(w>=e+(r.clockTolerance||0))return v(new n("maxAge exceeded",new Date(1e3*e)))}return!0===r.complete?v(null,{header:E,payload:k,signature:_.signature}):v(null,k)})}},2357(e,t,r){var s,i=r(6608).Buffer,n=r(6982),a=r(9053),o=r(9023),l="secret must be a string or buffer",u="key must be a string or a buffer",c="function"==typeof n.createPublicKey;function d(e){if(!i.isBuffer(e)&&"string"!=typeof e&&(!c||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw m(u)}function p(e){if(!i.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function f(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var t=[].slice.call(arguments,1);return TypeError(o.format.bind(o,e).apply(null,t))}function y(e){var t;return t=e,i.isBuffer(t)||"string"==typeof t||(e=JSON.stringify(e)),e}function g(e){return function(t,r){!function(e){if(!i.isBuffer(e)){if("string"!=typeof e){if(!c||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw m(l)}}}(r),t=y(t);var s=n.createHmac("sha"+e,r);return f((s.update(t),s.digest("base64")))}}c&&(u+=" or a KeyObject",l+="or a KeyObject");var v="timingSafeEqual"in n?function(e,t){return e.byteLength===t.byteLength&&n.timingSafeEqual(e,t)}:function(e,t){return s||(s=r(9454)),s(e,t)};function _(e){return function(t,r,s){var n=g(e)(t,s);return v(i.from(r),i.from(n))}}function b(e){return function(t,r){p(r),t=y(t);var s=n.createSign("RSA-SHA"+e);return f((s.update(t),s.sign(r,"base64")))}}function w(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=n.createVerify("RSA-SHA"+e);return i.update(t),i.verify(s,r,"base64")}}function $(e){return function(t,r){p(r),t=y(t);var s=n.createSign("RSA-SHA"+e);return f((s.update(t),s.sign({key:r,padding:n.constants.RSA_PKCS1_PSS_PADDING,saltLength:n.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function E(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=n.createVerify("RSA-SHA"+e);return i.update(t),i.verify({key:s,padding:n.constants.RSA_PKCS1_PSS_PADDING,saltLength:n.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function k(e){var t=b(e);return function(){var r=t.apply(null,arguments);return a.derToJose(r,"ES"+e)}}function S(e){var t=w(e);return function(r,s,i){return t(r,s=a.joseToDer(s,"ES"+e).toString("base64"),i)}}function x(){return function(){return""}}function T(){return function(e,t){return""===t}}e.exports=function(e){var t=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!t)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var r=(t[1]||t[3]).toLowerCase(),s=t[2];return{sign:({hs:g,rs:b,ps:$,es:k,none:x})[r](s),verify:({hs:_,rs:w,ps:E,es:S,none:T})[r](s)}}},3263(e,t,r){var s=r(9615),i=r(6747);t.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],t.sign=s.sign,t.verify=i.verify,t.decode=i.decode,t.isValid=i.isValid,t.createSign=function(e){return new s(e)},t.createVerify=function(e){return new i(e)}},6360(e,t,r){var s=r(6608).Buffer,i=r(2203);function n(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=s.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=s.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick((function(){this.emit("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}r(9023).inherits(n,i),n.prototype.write=function(e){this.buffer=s.concat([this.buffer,s.from(e)]),this.emit("data",e)},n.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=n},9615(e,t,r){var s=r(6608).Buffer,i=r(6360),n=r(2357),a=r(2203),o=r(5911),l=r(9023);function u(e,t){return s.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function c(e){var t,r,s,i=e.header,a=e.payload,c=e.secret||e.privateKey,d=e.encoding,p=n(i.alg),f=(t=(t=d)||"utf8",r=u(o(i),"binary"),s=u(o(a),t),l.format("%s.%s",r,s)),h=p.sign(f,c);return l.format("%s.%s",f,h)}function d(e){var t=e.secret;if(t=null==(t=null==t?e.privateKey:t)?e.key:t,!0===/^hs/i.test(e.header.alg)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new i(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}l.inherits(d,a),d.prototype.sign=function(){try{var e=c({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},d.sign=c,e.exports=d},5911(e,t,r){var s=r(181).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||s.isBuffer(e)?e.toString():JSON.stringify(e)}},6747(e,t,r){var s=r(6608).Buffer,i=r(6360),n=r(2357),a=r(2203),o=r(5911),l=r(9023),u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function c(e){var t=e.split(".",1)[0],r=s.from(t,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(r))return r;try{return JSON.parse(r)}catch(e){return}}function d(e){return e.split(".")[2]}function p(e){return u.test(e)&&!!c(e)}function f(e,t,r){if(!t){var s=Error("Missing algorithm parameter for jws.verify");throw s.code="MISSING_ALGORITHM",s}var i=d(e=o(e)),a=e.split(".",2).join(".");return n(t).verify(a,i,r)}function h(e,t){if(t=t||{},!p(e=o(e)))return null;var r,i,n=c(e);if(!n)return null;var a=(r=r||"utf8",i=e.split(".")[1],s.from(i,"base64").toString(r));return("JWT"===n.typ||t.json)&&(a=JSON.parse(a,t.encoding)),{header:n,payload:a,signature:d(e)}}function m(e){var t=(e=e||{}).secret;if(t=null==(t=null==t?e.publicKey:t)?e.key:t,!0===/^hs/i.test(e.algorithm)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new i(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}l.inherits(m,a),m.prototype.verify=function(){try{var e=f(this.signature.buffer,this.algorithm,this.key.buffer),t=h(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},m.decode=h,m.isValid=p,m.verify=f,e.exports=m},5357(e){var t,r,s=1/0,i=0/0,n=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=/^(?:0|[1-9]\d*)$/,c=parseInt;function d(e){return e!=e}var p=Object.prototype,f=p.hasOwnProperty,h=p.toString,m=p.propertyIsEnumerable,y=(t=Object.keys,r=Object,function(e){return t(r(e))}),g=Math.max,v=Array.isArray;function _(e){var t,r,s;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=0x1fffffffffffff&&"[object Function]"!=(s=b(r=e)?h.call(r):"")&&"[object GeneratorFunction]"!=s}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){return!!e&&"object"==typeof e}e.exports=function(e,t,r,$){e=_(e)?e:function(e){return e?function(e,t){for(var r=-1,s=e?e.length:0,i=Array(s);++r<s;)i[r]=t(e[r],r,e);return i}(_(e)?function(e,t){var r,s,i,n,a=v(e)||w(s=r=e)&&_(s)&&f.call(r,"callee")&&(!m.call(r,"callee")||"[object Arguments]"==h.call(r))?function(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s}(e.length,String):[],o=a.length,l=!!o;for(var c in e){f.call(e,c)&&!(l&&("length"==c||(i=c,(n=null==(n=o)?0x1fffffffffffff:n)&&("number"==typeof i||u.test(i))&&i>-1&&i%1==0&&i<n)))&&a.push(c)}return a}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||p))return y(e);var t,r,s=[];for(var i in Object(e))f.call(e,i)&&"constructor"!=i&&s.push(i);return s}(e),function(t){return e[t]}):[]}(e),r=r&&!$?(S=(k=(E=r)?(E=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||w(t)&&"[object Symbol]"==h.call(t))return i;if(b(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=b(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=o.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):a.test(e)?i:+e}(E))===s||E===-s?(E<0?-1:1)*17976931348623157e292:E==E?E:0:0===E?E:0)%1,k==k?S?k-S:k:0):0;var E,k,S,x,T=e.length;return r<0&&(r=g(T+r,0)),"string"==typeof(x=e)||!v(x)&&w(x)&&"[object String]"==h.call(x)?r<=T&&e.indexOf(t,r)>-1:!!T&&function(e,t,r){if(t!=t){for(var s=e.length,i=r+-1;++i<s;)if(d(e[i],i,e))return i;return -1}for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return -1}(e,t,r)>-1}},6782(e){var t=Object.prototype.toString;e.exports=function(e){var r;return!0===e||!1===e||!!(r=e)&&"object"==typeof r&&"[object Boolean]"==t.call(e)}},5250(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p;return"number"==typeof e&&e==(p=(d=(c=e)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=n.test(e);return d||a.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,d==d?p?d-p:d:0)}},8094(e){var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==t.call(e)}},6052(e){var t,r,s=Object.prototype,i=Function.prototype.toString,n=s.hasOwnProperty,a=i.call(Object),o=s.toString,l=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=o.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var r=n.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==a}},1251(e){var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){var s;return"string"==typeof e||!r(e)&&!!(s=e)&&"object"==typeof s&&"[object String]"==t.call(e)}},8430(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p,f,h=2,m=e;if("function"!=typeof m)throw TypeError("Expected a function");return p=(d=(c=h)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=n.test(e);return d||a.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,h=d==d?p?d-p:d:0,function(){return--h>0&&(f=m.apply(this,arguments)),h<=1&&(m=void 0),f}}},3866(e){function t(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var s,i,n,a,o=typeof e;if("string"===o&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*c;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*c;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:break}}}return}if("number"===o&&isFinite(e)){return r.long?(i=Math.abs(s=e))>=864e5?t(s,i,864e5,"day"):i>=36e5?t(s,i,36e5,"hour"):i>=6e4?t(s,i,6e4,"minute"):i>=1e3?t(s,i,1e3,"second"):s+" ms":(a=Math.abs(n=e))>=864e5?Math.round(n/864e5)+"d":a>=36e5?Math.round(n/36e5)+"h":a>=6e4?Math.round(n/6e4)+"m":a>=1e3?Math.round(n/1e3)+"s":n+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9695(e){"use strict";let t=(e={})=>{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},6608(e,t,r){var s=r(181),i=s.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=s:(n(s,t),t.Buffer=a),a.prototype=Object.create(i.prototype),n(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var s=i(e);return void 0!==t?"string"==typeof r?s.fill(t,r):s.fill(t):s.fill(0),s},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return s.SlowBuffer(e)}},8610(e,t,r){"use strict";let s=Symbol("SemVer ANY");class i{static get ANY(){return s}constructor(e,t){if(t=n(t),e instanceof i)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===s?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?a[o.COMPARATORLOOSE]:a[o.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=s}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===s||e===s)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=n(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;let n=r(4621),{safeRe:a,t:o}=r(152),l=r(5461),u=r(674),c=r(2398),d=r(2069)},2069(e,t,r){"use strict";let s=/\s+/g;class i{constructor(e,t){if(t=a(t),e instanceof i)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new i(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(s," "),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){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){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&&m)|(this.options.loose&&y))+":"+e,r=n.get(t);if(r)return r;let s=this.options.loose,i=s?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(i,I(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],h));let a=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>P(e,this.options));s&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new o(e,this.options))){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return n.set(t,v),v}intersects(e,t){if(!(e instanceof i))throw TypeError("a Range is required");return this.set.some(r=>_(r,t)&&e.set.some(e=>_(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(j(this.set[t],e,this.options))return!0;return!1}}e.exports=i;let n=new(r(2044)),a=r(4621),o=r(8610),l=r(674),u=r(2398),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:h}=r(152),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(5076),g=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,_=(e,t)=>{let r=!0,s=e.slice(),i=s.pop();for(;r&&s.length;)r=s.every(e=>i.intersects(e,t)),i=s.pop();return r},b=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=k(e,t)),l("tildes",e=$(e,t)),l("xrange",e=x(e,t)),l("stars",e=O(e,t)),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,s,i,n)=>{let a;return l("tilde",e,t,r,s,i,n),w(r)?a="":w(s)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?a=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:n?(l("replaceTilde pr",n),a=`>=${r}.${s}.${i}-${n} <${r}.${+s+1}.0-0`):a=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,l("tilde return",a),a})},k=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,n,a)=>{let o;return l("caret",e,t,r,i,n,a),w(r)?o="":w(i)?o=`>=${r}.0.0${s} <${+r+1}.0.0-0`:w(n)?o="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:a?(l("replaceCaret pr",a),o="0"===r?"0"===i?`>=${r}.${i}.${n}-${a} <${r}.${i}.${+n+1}-0`:`>=${r}.${i}.${n}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${n}-${a} <${+r+1}.0.0-0`):(l("no pr"),o="0"===r?"0"===i?`>=${r}.${i}.${n}${s} <${r}.${i}.${+n+1}-0`:`>=${r}.${i}.${n}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${n} <${+r+1}.0.0-0`),l("caret return",o),o})},x=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>T(e,t)).join(" ")),T=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,s,i,n,a,o)=>{l("xRange",e,r,s,i,n,a,o);let u=w(i),c=u||w(n),d=c||w(a);return"="===s&&d&&(s=""),o=t.includePrerelease?"-0":"",u?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&d?(c&&(n=0),a=0,">"===s?(s=">=",c?(i=+i+1,n=0):n=+n+1,a=0):"<="===s&&(s="<",c?i=+i+1:n=+n+1),"<"===s&&(o="-0"),r=`${s+i}.${n}.${a}${o}`):c?r=`>=${i}.0.0${o} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${n}.0${o} <${i}.${+n+1}.0-0`),l("xRange return",r),r})},O=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),P=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),I=e=>(t,r,s,i,n,a,o,l,u,c,d,p)=>(r=w(s)?"":w(i)?`>=${s}.0.0${e?"-0":""}`:w(n)?`>=${s}.${i}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=w(u)?"":w(c)?`<${+u+1}.0.0-0`:w(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),j=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){let s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}},2398(e,t,r){"use strict";let s=r(674),{MAX_LENGTH:i,MAX_SAFE_INTEGER:n}=r(5076),{safeRe:a,t:o}=r(152),l=r(4621),{compareIdentifiers:u}=r(9101);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);s("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[o.LOOSE]:a[o.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>n||this.major<0)throw TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=r[5]?r[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(e){if(s("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(s("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(s("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)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,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},5608(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},5461(e,t,r){"use strict";let s=r(8271),i=r(733),n=r(1686),a=r(6479),o=r(7257),l=r(5850);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return i(e,r,u);case">":return n(e,r,u);case">=":return a(e,r,u);case"<":return o(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},7771(e,t,r){"use strict";let s=r(2398),i=r(6802),{safeRe:n,t:a}=r(152);e.exports=(e,t)=>{if(e instanceof s)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let s,i=t.includePrerelease?n[a.COERCERTLFULL]:n[a.COERCERTL];for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?n[a.COERCEFULL]:n[a.COERCE]);if(null===r)return null;let o=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${o}.${l}.${u}${c}${d}`,t)}},8767(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>{let i=new s(e,r),n=new s(t,r);return i.compare(n)||i.compareBuild(n)}},6293(e,t,r){"use strict";let s=r(6958);e.exports=(e,t)=>s(e,t,!0)},6958(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>new s(e,r).compare(new s(t,r))},3086(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,null,!0),i=s(t,null,!0),n=r.compare(i);if(0===n)return null;let a=n>0,o=a?r:i,l=a?i:r,u=!!o.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},8271(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0===s(e,t,r)},1686(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>0},6479(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>=0},3625(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r,i,n)=>{"string"==typeof r&&(n=i,i=r,r=void 0);try{return new s(e instanceof s?e.version:e,r).inc(t,i,n).version}catch(e){return null}}},7257(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>s(e,t,r)},5850(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>=s(e,t,r)},7744(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).major},4812(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).minor},733(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0!==s(e,t,r)},6802(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r=!1)=>{if(e instanceof s)return e;try{return new s(e,t)}catch(e){if(!r)return null;throw e}}},8643(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).patch},9283(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r&&r.prerelease.length?r.prerelease:null}},7032(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(t,e,r)},9839(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(r,e,t))},4056(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>{try{t=new s(t,r)}catch(e){return!1}return t.test(e)}},7697(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(e,r,t))},6807(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r?r.version:null}},3895(e,t,r){"use strict";let s=r(152),i=r(5076),n=r(2398),a=r(9101),o=r(6802),l=r(6807),u=r(5608),c=r(3625),d=r(3086),p=r(7744),f=r(4812),h=r(8643),m=r(9283),y=r(6958),g=r(7032),v=r(6293),_=r(8767),b=r(7697),w=r(9839),$=r(1686),E=r(7257),k=r(8271),S=r(733),x=r(6479),T=r(5850),O=r(5461),P=r(7771),I=r(8610),j=r(2069),N=r(4056),R=r(6613),C=r(7114),A=r(1008),z=r(203),M=r(5372),D=r(4713),L=r(4497),q=r(9272),U=r(3490);e.exports={parse:o,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:v,compareBuild:_,sort:b,rsort:w,gt:$,lt:E,eq:k,neq:S,gte:x,lte:T,cmp:O,coerce:P,Comparator:I,Range:j,satisfies:N,toComparators:R,maxSatisfying:C,minSatisfying:A,minVersion:z,validRange:M,outside:D,gtr:L,ltr:q,intersects:U,simplifyRange:r(4039),subset:r(22),SemVer:n,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},5076(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},674(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},9101(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let s=t.test(e),i=t.test(r);return s&&i&&(e*=1,r*=1),e===r?0:s&&!i?-1:i&&!s?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},2044(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)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)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},4621(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},152(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=r(5076),a=r(674),o=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",n],[f,i]],m=(e,t,r)=>{let s=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),d[e]=i,u[i]=t,c[i]=s,o[i]=new RegExp(t,r?"g":void 0),l[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4497(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,">",r)},3490(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>(e=new s(e,r),t=new s(t,r),e.intersects(t,r))},9272(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,"<",r)},7114(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let n=null,a=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!n||-1===a.compare(e))&&(a=new s(n=e,r))}),n}},1008(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let n=null,a=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!n||1===a.compare(e))&&(a=new s(n=e,r))}),n}},203(e,t,r){"use strict";let s=r(2398),i=r(2069),n=r(1686);e.exports=(e,t)=>{e=new i(e,t);let r=new s("0.0.0");if(e.test(r)||(r=new s("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],a=null;i.forEach(e=>{let t=new s(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||n(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||n(r,a))&&(r=a)}return r&&e.test(r)?r:null}},4713(e,t,r){"use strict";let s=r(2398),i=r(8610),{ANY:n}=i,a=r(2069),o=r(4056),l=r(1686),u=r(7257),c=r(5850),d=r(6479);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new s(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let s=t.set[r],a=null,o=null;if(s.forEach(e=>{e.semver===n&&(e=new i(">=0.0.0")),a=a||e,o=o||e,f(e.semver,a.semver,p)?a=e:m(e.semver,o.semver,p)&&(o=e)}),a.operator===y||a.operator===g||(!o.operator||o.operator===y)&&h(e,o.semver)||o.operator===g&&m(e,o.semver))return!1}return!0}},4039(e,t,r){"use strict";let s=r(4056),i=r(6958);e.exports=(e,t,r)=>{let n=[],a=null,o=null,l=e.sort((e,t)=>i(e,t,r));for(let e of l)s(e,t,r)?(o=e,a||(a=e)):(o&&n.push([a,o]),o=null,a=null);a&&n.push([a,null]);let u=[];for(let[e,t]of n)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},22(e,t,r){"use strict";let s=r(2069),i=r(8610),{ANY:n}=i,a=r(4056),o=r(6958),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,r)=>{let s,i,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===n)if(1===t.length&&t[0].semver===n)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===n)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?i=p(i,t,r):g.add(t.semver);if(g.size>1)return null;if(s&&i&&((c=o(s.semver,i.semver,r))>0||0===c&&(">="!==s.operator||"<="!==i.operator)))return null;for(let e of g){if(s&&!a(e,String(s),r)||i&&!a(e,String(i),r))return null;for(let s of t)if(!a(e,String(s),r))return!1;return!0}let v=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,_=!!s&&!r.includePrerelease&&!!s.semver.prerelease.length&&s.semver;for(let e of(v&&1===v.prerelease.length&&"<"===i.operator&&0===v.prerelease[0]&&(v=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,s){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),">"===e.operator||">="===e.operator){if((f=d(s,e,r))===e&&f!==s)return!1}else if(">="===s.operator&&!a(s.semver,String(e),r))return!1}if(i){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=p(i,e,r))===e&&h!==i)return!1}else if("<="===i.operator&&!a(i.semver,String(e),r))return!1}if(!e.operator&&(i||s)&&0!==c)return!1}return(!s||!m||!!i||0===c)&&(!i||!y||!!s||0===c)&&!_&&!v&&!0},d=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new s(e,r),t=new s(t,r);let i=!1;e:for(let s of e.set){for(let e of t.set){let t=c(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},6613(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>new s(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},5372(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}}},600(e,t,r){"use strict";let s=r(9638);e.exports=(e="")=>{let t=e.match(s);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return"env"===n?i:i?`${n} ${i}`:n}},9638(e){"use strict";e.exports=/^#!(.*)/},1905(e,t,r){let s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=r(6928),n=s?";":":",a=r(9344),o=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),l=(e,t)=>{let r=t.colon||n,i=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=s?a.split(r):[""];return s&&-1!==e.indexOf(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:a}},u=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:s,pathExt:n,pathExtExe:u}=l(e,t),c=[],d=r=>new Promise((n,a)=>{if(r===s.length)return t.all&&c.length?n(c):a(o(e));let l=s[r],u=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(u,e);n(p(!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,r,0))}),p=(e,r,s)=>new Promise((i,o)=>{if(s===n.length)return i(d(r+1));let l=n[s];a(e+l,{pathExt:u},(n,a)=>{if(!n&&a)if(!t.all)return i(e+l);else c.push(e+l);return i(p(e,r,s+1))})});return r?d(0).then(e=>r(null,e),r):d(0)};e.exports=u,u.sync=(e,t)=>{let{pathEnv:r,pathExt:s,pathExtExe:n}=l(e,t=t||{}),u=[];for(let o=0;o<r.length;o++){let l=r[o],c=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<s.length;e++){let r=p+s[e];try{if(a.sync(r,{pathExt:n}))if(!t.all)return r;else u.push(r)}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw o(e)}},181(e){"use strict";e.exports=require("buffer")},5317(e){"use strict";e.exports=require("child_process")},6982(e){"use strict";e.exports=require("crypto")},9896(e){"use strict";e.exports=require("fs")},7598(e){"use strict";e.exports=require("node:crypto")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2203(e){"use strict";e.exports=require("stream")},9023(e){"use strict";e.exports=require("util")},7980(e,t,r){"use strict";let{normalizeIPv6:s,removeDotSegments:i,recomposeAuthority:n,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:l,reescapeHostDelimiters:u,isIPv4:c,nonSimpleDomain:d}=r(609),{SCHEMES:p,getSchemeHandler:f}=r(4848);function h(e,t,r,s){let n={};return s||(e=b(m(e,r),r),t=b(m(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function m(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),o=[],u=f(s.scheme||r.scheme);u&&u.serialize&&u.serialize(r,s),void 0!==r.path&&(s.skipEscape?r.path=a(r.path):(r.path=l(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==s.reference&&r.scheme&&o.push(r.scheme,":");let c=n(r);if(void 0!==c&&("suffix"!==s.reference&&o.push("//"),o.push(c),r.path&&"/"!==r.path[0]&&o.push("/")),void 0!==r.path){let e=r.path;s.absolutePath||u&&u.absolutePath||(e=i(e)),void 0===c&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}let y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,g=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,v=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function _(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,a=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);let l=e.match(g);null!==l&&-1!==l[1].indexOf("\\")&&(i.error="URI authority must not contain a literal backslash.",n=!0);let p=e.match(v);if(null!==p){let e=p[1],t=e.replace(/[\t\n\r]/g,"");t.length>=2&&("//"!==t.slice(0,2)?(i.error=i.error||"URI authority must not contain a literal backslash.",n=!0):e.length!==t.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",n=!0))}let h=e.match(y);if(h){i.scheme=h[1],i.userinfo=h[3],i.host=h[4],i.port=parseInt(h[5],10),i.path=h[6]||"",i.query=h[7],i.fragment=h[8],isNaN(i.port)&&(i.port=h[5]);let t=void 0!==h[2]&&i.path&&"/"!==i.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof i.port&&(i.port<0||i.port>65535)?"URI port is malformed.":void 0;if(void 0!==t&&(i.error=i.error||t,n=!0),i.host)if(!1===c(i.host)){let e=s(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");let l=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&i.host&&(r.domainHost||l&&l.domainHost)&&!1===a&&d(i.host))try{i.host=new URL("http://"+i.host).hostname}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}if((!l||l&&!l.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=u(unescape(i.host),a))),i.path&&(i.path=o(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}l&&l.parse&&l.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n}}function b(e,t){return _(e,t).parsed}function w(e,t){let{parsed:r,malformedAuthorityOrPort:s}=_(e,t);return{normalized:s?e:m(r,t),malformedAuthorityOrPort:s}}function $(e,t){if("string"==typeof e){let{normalized:r,malformedAuthorityOrPort:s}=w(e,t);return s?void 0:r}if("object"==typeof e)return m(e,t)}let E={SCHEMES:p,normalize:function(e,t){return"string"==typeof e?e=w(e,t).normalized:"object"==typeof e&&(e=b(m(e,t),t)),e},resolve:function(e,t,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:n}=_(e,s),{parsed:a,malformedAuthorityOrPort:o}=_(t,s);if(n||o)throw Error(i.error||a.error||"URI is malformed.");let l=h(i,a,s,!0);return s.skipEscape=!0,m(l,s)},resolveComponent:h,equal:function(e,t,r){let s=$(e,r),i=$(t,r);return void 0!==s&&void 0!==i&&s.toLowerCase()===i.toLowerCase()},serialize:m,parse:b};e.exports=E,e.exports.default=E,e.exports.fastUri=E},4848(e,t,r){"use strict";let{isUUID:s}=r(609),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function a(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function l(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let u={scheme:"http",domainHost:!0,parse:o,serialize:l},c={scheme:"https",domainHost:u.domainHost,parse:o,serialize:l},d={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=a(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(a(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:d.domainHost,parse:d.parse,serialize:d.serialize},f={http:u,https:c,ws:d,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=h(`${s}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),i=h(`${r}:${t.nid||s}`);i&&(e=i.serialize(e,t));let n=e,a=e.nss;return n.path=`${s||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&s(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function h(e){return e&&(f[e]||f[e.toLowerCase()])||void 0}Object.setPrototypeOf(f,null),e.exports={wsIsSecure:a,SCHEMES:f,isValidSchemeName:function(e){return -1!==n.indexOf(e)},getSchemeHandler:h}},609(e){"use strict";let t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),s=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(e){let t="",r=0,s=0;for(s=0;s<e.length;s++)if(48!==(r=e[s].charCodeAt(0))){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s];break}for(s+=1;s<e.length;s++){if(!((r=e[s].charCodeAt(0))>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s]}return t}let o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,r){if(e.length){let s=a(e);if(""===s)return r.error=!0,!1;t.push(s),e.length=0}return!0}function c(e){if(2>function(e,t){let r=0;for(let t=0;t<e.length;t++)":"===e[t]&&r++;return r}(e,":"))return{host:e,isIPV6:!1};let t=function(e){let t=0,r={error:!1,address:"",zone:""},s=[],i=[],n=!1,o=!1,c=u;for(let a=0;a<e.length;a++){let u=e[a];if("["!==u&&"]"!==u)if(":"===u){if(!0===n&&(o=!0),!c(i,s,r))break;if(++t>7){r.error=!0;break}a>0&&":"===e[a-1]&&(n=!0),s.push(":");continue}else if("%"===u){if(!c(i,s,r))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?r.zone=i.join(""):o?s.push(i.join("")):s.push(a(i))),r.address=s.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}let d={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},p=/[@/?#:]/g,f=/[@/?#]/g;function h(e,t){let r=t?f:p;return r.lastIndex=0,e.replace(r,e=>d[e])}e.exports={nonSimpleDomain:o,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let s=unescape(e.host);if(!r(s)){let e=c(s);s=!0===e.isIPV6?`[${e.escapedHost}]`:h(s,!1)}t.push(s)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},reescapeHostDelimiters:h,normalizePercentEncoding:function(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let n=0;n<e.length;n++){if("%"===e[n]&&n+2<e.length){let a=e.slice(n+1,n+3);if(s(a)){let e=a.toUpperCase(),s=String.fromCharCode(parseInt(e,16));t&&i(s)?r+=s:r+="%"+e,n+=2;continue}}r+=e[n]}return r},normalizePathEncoding:function(e){let t="";for(let r=0;r<e.length;r++){if("%"===e[r]&&r+2<e.length){let n=e.slice(r+1,r+3);if(s(n)){let e=n.toUpperCase(),s=String.fromCharCode(parseInt(e,16));"."!==s&&i(s)?t+=s:t+="%"+e,r+=2;continue}}n(e[r])?t+=e[r]:t+=escape(e[r])}return t},escapePreservingEscapes:function(e){let t="";for(let r=0;r<e.length;r++){if("%"===e[r]&&r+2<e.length){let i=e.slice(r+1,r+3);if(s(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t},removeDotSegments:function(e){let t=e,r=[],s=-1,i=0;for(;i=t.length;){if(1===i)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===i){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===i&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(s=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,s)),t=t.slice(s)}return r.join("")},isIPv4:r,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:a}},114(e){"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},7456(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},4519(e){"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},8330(e){"use strict";e.exports=JSON.parse('{"name":"xmcp","description":"The MCP framework","version":"0.7.0","author":{"name":"xmcp","email":"support@xmcp.dev","url":"https://xmcp.dev"},"contributors":[{"name":"Valentina Bearzotti","email":"valebearzotti1@gmail.com","url":"https://github.com/valebearzotti"},{"name":"Jose Rago","email":"jose@basement.studio","url":"https://github.com/ragojose"}],"license":"MIT","keywords":["mcp","modelcontextprotocol","http","stdio"],"repository":{"type":"git","url":"https://github.com/basementstudio/xmcp"},"homepage":"https://xmcp.dev","type":"commonjs","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xmcp":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js"},"./host-bridge":{"types":"./dist/host-bridge.d.ts","import":"./dist/host-bridge.js","require":"./dist/host-bridge.js","default":"./dist/host-bridge.js"},"./headers":{"types":"./dist/runtime/headers.d.ts","require":"./dist/runtime/headers.js","default":"./dist/runtime/headers.js"},"./cloudflare":{"types":"./dist/cloudflare.d.ts","import":"./dist/cloudflare.js","require":"./dist/cloudflare.js","default":"./dist/cloudflare.js"},"./package.json":"./package.json"},"typesVersions":{"*":{"host-bridge":["dist/host-bridge.d.ts"],"headers":["dist/runtime/headers.d.ts"],"cloudflare":["dist/cloudflare.d.ts"]}},"files":["dist","src"],"scripts":{"dev":"cross-env NODE_ENV=development tsx --watch --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","build":"cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","analyze":"cross-env GENERATE_STATS=true pnpm build && pnpm tsx scripts/analyze-rspack-stats.ts","test:config":"node --import tsx --test src/compiler/config/__tests__/*.test.ts","test:adapters":"node --import tsx --test src/runtime/adapters/fastify/__tests__/*.test.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","@rspack/core":"^1.6.7","jose":"^6.1.3","postcss-loader":"^8.2.0","ts-checker-rspack-plugin":"^1.2.1","typescript":"^5.9.3"},"devDependencies":{"@nestjs/common":"^11.1.12","@types/async-retry":"^1.4.9","@types/content-type":"^1.1.9","@types/express":"^5.0.6","@types/fs-extra":"^11.0.4","@types/jsonwebtoken":"^9.0.10","@types/node":"^22.19.2","@types/react":"^19.2.7","@types/react-dom":"^19.2.3","async-retry":"^1.3.3","chalk":"^5.6.2","chokidar":"^3.6.0","ci-info":"^4.3.1","commander":"^11.1.0","content-type":"^1.0.5","cross-env":"^7.0.3","del":"^7.1.0","dotenv":"^16.6.1","express":"^4.22.1","fastify":"^5.0.0","fs-extra":"^11.3.2","glob":"^11.1.0","is-docker":"^4.0.0","is-wsl":"^3.1.0","json5":"^2.2.3","jsonwebtoken":"^9.0.3","memfs":"^4.51.1","raw-body":"^3.0.2","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","tsx":"^4.21.0"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0","zod":"^3.25.76 || ^4.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}}}')}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,s){if(1&s&&(r=this(r)),8&s||"object"==typeof r&&r&&(4&s&&r.__esModule||16&s&&"function"==typeof r.then))return r;var n=Object.create(null);i.r(n);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>{a[e]=()=>r[e]});return a.default=()=>r,i.d(n,a),n},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";let e,t,r;i.r(n),i.d(n,{createHTTPClient:()=>lM,HOST_CONTEXT_CHANGED_METHOD:()=>lY,UPDATE_MODEL_CONTEXT_METHOD:()=>lB,UrlElicitationRequiredError:()=>oy,isEnvHeader:()=>lN,createSTDIOClient:()=>lD,jwtAuthMiddleware:()=>eB,listSTDIOClientTools:()=>lL,createMcpHostBridge:()=>l2,SIZE_CHANGED_METHOD:()=>lQ,INITIALIZE_METHOD:()=>lF,LOG_MESSAGE_METHOD:()=>lW,INITIALIZED_METHOD:()=>lH,OPEN_LINK_METHOD:()=>lG,REQUEST_DISPLAY_MODE_METHOD:()=>lK,disconnectSTDIOClient:()=>lU,RESOURCES_READ_METHOD:()=>lX,createContext:()=>eY,callSTDIOClientTool:()=>lq,headersToRecord:()=>lR,MCP_APPS_PROTOCOL_VERSION:()=>lV,extractToolNamesFromRequest:()=>lZ,UI_MESSAGE_METHOD:()=>lJ,apiKeyAuthMiddleware:()=>eH,completable:()=>e0});var s,a,o,l,u,c,d,p,f,h,m,y,g,v,_=i(8583),b=i.n(_);(s=c||(c={})).assertEqual=e=>{},s.assertIs=function(e){},s.assertNever=function(e){throw Error()},s.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},s.getValidEnumValues=e=>{let t=s.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let s of t)r[s]=e[s];return s.objectValues(r)},s.objectValues=e=>s.objectKeys(e).map(function(t){return e[t]}),s.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},s.find=(e,t)=>{for(let r of e)if(t(r))return r},s.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,s.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},s.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(d||(d={})).mergeShapes=(e,t)=>({...e,...t});let w=c.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=e=>{switch(typeof e){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(e)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":if(Array.isArray(e))return w.array;if(null===e)return w.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return w.promise;if("undefined"!=typeof Map&&e instanceof Map)return w.map;if("undefined"!=typeof Set&&e instanceof Set)return w.set;if("undefined"!=typeof Date&&e instanceof Date)return w.date;return w.object;default:return w.unknown}},E=c.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class k extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},s=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(s);else if("invalid_return_type"===i.code)s(i.returnTypeError);else if("invalid_arguments"===i.code)s(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,s=0;for(;s<i.path.length;){let r=i.path[s];s===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],s++}}};return s(this),r}static assert(e){if(!(e instanceof k))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,c.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t=Object.create(null),r=[];for(let s of this.issues)if(s.path.length>0){let r=s.path[0];t[r]=t[r]||[],t[r].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}k.create=e=>new k(e);let S=(e,t)=>{let r;switch(e.code){case E.invalid_type:r=e.received===w.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,c.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${c.joinValues(e.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${c.joinValues(e.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${c.joinValues(e.options)}, received '${e.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:c.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case E.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case E.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=t.defaultError,c.assertNever(e)}return{message:r}};(a=p||(p={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},a.toString=e=>"string"==typeof e?e:e?.message;let x=e=>{let{data:t,path:r,errorMaps:s,issueData:i}=e,n=[...r,...i.path||[]],a={...i,path:n};if(void 0!==i.message)return{...i,path:n,message:i.message};let o="";for(let e of s.filter(e=>!!e).slice().reverse())o=e(a,{data:t,defaultError:o}).message;return{...i,path:n,message:o}};function T(e,t){let r=x({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,S,void 0].filter(e=>!!e)});e.common.issues.push(r)}class O{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let s of t){if("aborted"===s.status)return P;"dirty"===s.status&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,s=await e.value;r.push({key:t,value:s})}return O.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let s of t){let{key:t,value:i}=s;if("aborted"===t.status||"aborted"===i.status)return P;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||s.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let P=Object.freeze({status:"aborted"}),I=e=>({status:"dirty",value:e}),j=e=>({status:"valid",value:e}),N=e=>"undefined"!=typeof Promise&&e instanceof Promise;class R{constructor(e,t,r,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let C=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new k(e.common.issues);return this._error=t,this._error}}};function A(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:s,description:i}=e;if(t&&(r||s))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:n}=e;return"invalid_enum_value"===t.code?{message:n??i.defaultError}:void 0===i.data?{message:n??s??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:n??r??i.defaultError}},description:i}}class z{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(N(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},s=this._parseSync({data:e,path:r.path,parent:r});return C(r,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},s=this._parse({data:e,path:r.path,parent:r});return C(r,await (N(s)?s:Promise.resolve(s)))}refine(e,t){return this._refinement((r,s)=>{let i=e(r),n=()=>s.addIssue({code:E.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(n(),!1)):!!i||(n(),!1)})}refinement(e,t){return this._refinement((r,s)=>!!e(r)||(s.addIssue("function"==typeof t?t(r,s):t),!1))}_refinement(e){return new eP({schema:this,typeName:f.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eI.create(this,this._def)}nullable(){return ej.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ep.create(this)}promise(){return eO.create(this,this._def)}or(e){return eh.create([this,e],this._def)}and(e){return eg.create(this,e,this._def)}transform(e){return new eP({...A(this._def),schema:this,typeName:f.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eN({...A(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:f.ZodDefault})}brand(){return new eA({typeName:f.ZodBranded,type:this,...A(this._def)})}catch(e){return new eR({...A(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:f.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return ez.create(this,e)}readonly(){return eM.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let M=/^c[^\s-]{8,}$/i,D=/^[0-9a-z]+$/,L=/^[0-9A-HJKMNP-TV-Z]{26}$/i,q=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,U=/^[a-z0-9_-]{21}$/i,Z=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,F=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,K=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,G=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,B=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,J=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y=RegExp(`^${X}$`);function Q(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class ee extends z{_parse(t){var r,s,i,n;let a;if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==w.string){let e=this._getOrReturnCtx(t);return T(e,{code:E.invalid_type,expected:w.string,received:e.parsedType}),P}let o=new O;for(let l of this._def.checks)if("min"===l.kind)t.data.length<l.value&&(T(a=this._getOrReturnCtx(t,a),{code:E.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)t.data.length>l.value&&(T(a=this._getOrReturnCtx(t,a),{code:E.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let e=t.data.length>l.value,r=t.data.length<l.value;(e||r)&&(a=this._getOrReturnCtx(t,a),e?T(a,{code:E.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&T(a,{code:E.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)F.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"email",code:E.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)e||(e=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),e.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"emoji",code:E.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)q.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"uuid",code:E.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)U.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"nanoid",code:E.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)M.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"cuid",code:E.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)D.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"cuid2",code:E.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)L.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"ulid",code:E.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(t.data)}catch{T(a=this._getOrReturnCtx(t,a),{validation:"url",code:E.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"regex",code:E.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?t.data=t.data.trim():"includes"===l.kind?t.data.includes(l.value,l.position)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?t.data=t.data.toLowerCase():"toUpperCase"===l.kind?t.data=t.data.toUpperCase():"startsWith"===l.kind?t.data.startsWith(l.value)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?t.data.endsWith(l.value)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?(function(e){let t=`${X}T${Q(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(l).test(t.data)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?Y.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${Q(l)}$`).test(t.data)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?V.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"duration",code:E.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(r=t.data,!(("v4"===(s=l.version)||!s)&&H.test(r)||("v6"===s||!s)&&G.test(r))&&1&&(T(a=this._getOrReturnCtx(t,a),{validation:"ip",code:E.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!Z.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(s));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(t.data,l.alg)&&(T(a=this._getOrReturnCtx(t,a),{validation:"jwt",code:E.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(i=t.data,!(("v4"===(n=l.version)||!n)&&K.test(i)||("v6"===n||!n)&&B.test(i))&&1&&(T(a=this._getOrReturnCtx(t,a),{validation:"cidr",code:E.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?J.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"base64",code:E.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?W.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"base64url",code:E.invalid_string,message:l.message}),o.dirty()):c.assertNever(l);return{status:o.value,value:t.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:E.invalid_string,...p.errToObj(r)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...p.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...p.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...p.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...p.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...p.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...p.errToObj(t)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ee.create=e=>new ee({checks:[],typeName:f.ZodString,coerce:e?.coerce??!1,...A(e)});class et extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==w.number){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.number,received:t.parsedType}),P}let r=new O;for(let s of this._def.checks)"int"===s.kind?c.isInteger(e.data)||(T(t=this._getOrReturnCtx(e,t),{code:E.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"multipleOf"===s.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,i=r>s?r:s;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(T(t=this._getOrReturnCtx(e,t),{code:E.not_finite,message:s.message}),r.dirty()):c.assertNever(s);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,r,s){return new et({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:p.toString(s)}]})}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&c.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}et.create=e=>new et({checks:[],typeName:f.ZodNumber,coerce:e?.coerce||!1,...A(e)});class er extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==w.bigint)return this._getInvalidInput(e);let r=new O;for(let s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(T(t=this._getOrReturnCtx(e,t),{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):c.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.bigint,received:t.parsedType}),P}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,r,s){return new er({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:p.toString(s)}]})}_addCheck(e){return new er({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}er.create=e=>new er({checks:[],typeName:f.ZodBigInt,coerce:e?.coerce??!1,...A(e)});class es extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.boolean,received:t.parsedType}),P}return j(e.data)}}es.create=e=>new es({typeName:f.ZodBoolean,coerce:e?.coerce||!1,...A(e)});class ei extends z{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.date,received:t.parsedType}),P}if(Number.isNaN(e.data.getTime()))return T(this._getOrReturnCtx(e),{code:E.invalid_date}),P;let r=new O;for(let s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):c.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ei({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ei.create=e=>new ei({checks:[],coerce:e?.coerce||!1,typeName:f.ZodDate,...A(e)});class en extends z{_parse(e){if(this._getType(e)!==w.symbol){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.symbol,received:t.parsedType}),P}return j(e.data)}}en.create=e=>new en({typeName:f.ZodSymbol,...A(e)});class ea extends z{_parse(e){if(this._getType(e)!==w.undefined){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.undefined,received:t.parsedType}),P}return j(e.data)}}ea.create=e=>new ea({typeName:f.ZodUndefined,...A(e)});class eo extends z{_parse(e){if(this._getType(e)!==w.null){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.null,received:t.parsedType}),P}return j(e.data)}}eo.create=e=>new eo({typeName:f.ZodNull,...A(e)});class el extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}}el.create=e=>new el({typeName:f.ZodAny,...A(e)});class eu extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}}eu.create=e=>new eu({typeName:f.ZodUnknown,...A(e)});class ec extends z{_parse(e){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.never,received:t.parsedType}),P}}ec.create=e=>new ec({typeName:f.ZodNever,...A(e)});class ed extends z{_parse(e){if(this._getType(e)!==w.undefined){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.void,received:t.parsedType}),P}return j(e.data)}}ed.create=e=>new ed({typeName:f.ZodVoid,...A(e)});class ep extends z{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),s=this._def;if(t.parsedType!==w.array)return T(t,{code:E.invalid_type,expected:w.array,received:t.parsedType}),P;if(null!==s.exactLength){let e=t.data.length>s.exactLength.value,i=t.data.length<s.exactLength.value;(e||i)&&(T(t,{code:e?E.too_big:E.too_small,minimum:i?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(T(t,{code:E.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(T(t,{code:E.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>s.type._parseAsync(new R(t,e,t.path,r)))).then(e=>O.mergeArray(r,e));let i=[...t.data].map((e,r)=>s.type._parseSync(new R(t,e,t.path,r)));return O.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new ep({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new ep({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new ep({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}}ep.create=(e,t)=>new ep({type:e,minLength:null,maxLength:null,exactLength:null,typeName:f.ZodArray,...A(t)});class ef extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=c.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==w.object){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.object,received:t.parsedType}),P}let{status:t,ctx:r}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),n=[];if(!(this._def.catchall instanceof ec&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||n.push(e);let a=[];for(let e of i){let t=s[e],i=r.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new R(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ec){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of n)a.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)n.length>0&&(T(r,{code:E.unrecognized_keys,keys:n}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of n){let s=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new R(r,s,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let r=await t.key,s=await t.value;e.push({key:r,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>O.mergeObjectSync(t,e)):O.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new ef({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let s=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:p.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ef({...this._def,unknownKeys:"strip"})}passthrough(){return new ef({...this._def,unknownKeys:"passthrough"})}extend(e){return new ef({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ef({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:f.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ef({...this._def,catchall:e})}pick(e){let t={};for(let r of c.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ef({...this._def,shape:()=>t})}omit(e){let t={};for(let r of c.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ef({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ef){let r={};for(let s in t.shape){let i=t.shape[s];r[s]=eI.create(e(i))}return new ef({...t._def,shape:()=>r})}if(t instanceof ep)return new ep({...t._def,type:e(t.element)});if(t instanceof eI)return eI.create(e(t.unwrap()));if(t instanceof ej)return ej.create(e(t.unwrap()));if(t instanceof ev)return ev.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of c.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?t[r]=s:t[r]=s.optional()}return new ef({...this._def,shape:()=>t})}required(e){let t={};for(let r of c.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eI;)e=e._def.innerType;t[r]=e}return new ef({...this._def,shape:()=>t})}keyof(){return eS(c.objectKeys(this.shape))}}ef.create=(e,t)=>new ef({shape:()=>e,unknownKeys:"strip",catchall:ec.create(),typeName:f.ZodObject,...A(t)}),ef.strictCreate=(e,t)=>new ef({shape:()=>e,unknownKeys:"strict",catchall:ec.create(),typeName:f.ZodObject,...A(t)}),ef.lazycreate=(e,t)=>new ef({shape:e,unknownKeys:"strip",catchall:ec.create(),typeName:f.ZodObject,...A(t)});class eh extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new k(e.ctx.common.issues));return T(t,{code:E.invalid_union,unionErrors:r}),P});{let e,s=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},n=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:r}),r.common.issues.length&&s.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=s.map(e=>new k(e));return T(t,{code:E.invalid_union,unionErrors:i}),P}}get options(){return this._def.options}}eh.create=(e,t)=>new eh({options:e,typeName:f.ZodUnion,...A(t)});let em=e=>{if(e instanceof eE)return em(e.schema);if(e instanceof eP)return em(e.innerType());if(e instanceof ek)return[e.value];if(e instanceof ex)return e.options;if(e instanceof eT)return c.objectValues(e.enum);else if(e instanceof eN)return em(e._def.innerType);else if(e instanceof ea)return[void 0];else if(e instanceof eo)return[null];else if(e instanceof eI)return[void 0,...em(e.unwrap())];else if(e instanceof ej)return[null,...em(e.unwrap())];else if(e instanceof eA)return em(e.unwrap());else if(e instanceof eM)return em(e.unwrap());else if(e instanceof eR)return em(e._def.innerType);else return[]};class ey extends z{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.object)return T(t,{code:E.invalid_type,expected:w.object,received:t.parsedType}),P;let r=this.discriminator,s=t.data[r],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(T(t,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let s=new Map;for(let r of t){let t=em(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(s.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,r)}}return new ey({typeName:f.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...A(r)})}}class eg extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=(e,s)=>{if("aborted"===e.status||"aborted"===s.status)return P;let i=function e(t,r){let s=$(t),i=$(r);if(t===r)return{valid:!0,data:t};if(s===w.object&&i===w.object){let s=c.objectKeys(r),i=c.objectKeys(t).filter(e=>-1!==s.indexOf(e)),n={...t,...r};for(let s of i){let i=e(t[s],r[s]);if(!i.valid)return{valid:!1};n[s]=i.data}return{valid:!0,data:n}}if(s===w.array&&i===w.array){if(t.length!==r.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let n=e(t[i],r[i]);if(!n.valid)return{valid:!1};s.push(n.data)}return{valid:!0,data:s}}if(s===w.date&&i===w.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,s.value);return i.valid?(("dirty"===e.status||"dirty"===s.status)&&t.dirty(),{status:t.value,value:i.data}):(T(r,{code:E.invalid_intersection_types}),P)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}eg.create=(e,t,r)=>new eg({left:e,right:t,typeName:f.ZodIntersection,...A(r)});class ev extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.array)return T(r,{code:E.invalid_type,expected:w.array,received:r.parsedType}),P;if(r.data.length<this._def.items.length)return T(r,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),P;!this._def.rest&&r.data.length>this._def.items.length&&(T(r,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...r.data].map((e,t)=>{let s=this._def.items[t]||this._def.rest;return s?s._parse(new R(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(s).then(e=>O.mergeArray(t,e)):O.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ev({...this._def,rest:e})}}ev.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ev({items:e,typeName:f.ZodTuple,rest:null,...A(t)})};class e_ extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.object)return T(r,{code:E.invalid_type,expected:w.object,received:r.parsedType}),P;let s=[],i=this._def.keyType,n=this._def.valueType;for(let e in r.data)s.push({key:i._parse(new R(r,e,r.path,e)),value:n._parse(new R(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?O.mergeObjectAsync(t,s):O.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,r){return new e_(t instanceof z?{keyType:e,valueType:t,typeName:f.ZodRecord,...A(r)}:{keyType:ee.create(),valueType:e,typeName:f.ZodRecord,...A(t)})}}class eb extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.map)return T(r,{code:E.invalid_type,expected:w.map,received:r.parsedType}),P;let s=this._def.keyType,i=this._def.valueType,n=[...r.data.entries()].map(([e,t],n)=>({key:s._parse(new R(r,e,r.path,[n,"key"])),value:i._parse(new R(r,t,r.path,[n,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of n){let s=await r.key,i=await r.value;if("aborted"===s.status||"aborted"===i.status)return P;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of n){let s=r.key,i=r.value;if("aborted"===s.status||"aborted"===i.status)return P;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}}}}eb.create=(e,t,r)=>new eb({valueType:t,keyType:e,typeName:f.ZodMap,...A(r)});class ew extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.set)return T(r,{code:E.invalid_type,expected:w.set,received:r.parsedType}),P;let s=this._def;null!==s.minSize&&r.data.size<s.minSize.value&&(T(r,{code:E.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&r.data.size>s.maxSize.value&&(T(r,{code:E.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let i=this._def.valueType;function n(e){let r=new Set;for(let s of e){if("aborted"===s.status)return P;"dirty"===s.status&&t.dirty(),r.add(s.value)}return{status:t.value,value:r}}let a=[...r.data.values()].map((e,t)=>i._parse(new R(r,e,r.path,t)));return r.common.async?Promise.all(a).then(e=>n(e)):n(a)}min(e,t){return new ew({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new ew({...this._def,maxSize:{value:e,message:p.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ew.create=(e,t)=>new ew({valueType:e,minSize:null,maxSize:null,typeName:f.ZodSet,...A(t)});class e$ extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.function)return T(t,{code:E.invalid_type,expected:w.function,received:t.parsedType}),P;function r(e,r){return x({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S,S].filter(e=>!!e),issueData:{code:E.invalid_arguments,argumentsError:r}})}function s(e,r){return x({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S,S].filter(e=>!!e),issueData:{code:E.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},n=t.data;if(this._def.returns instanceof eO){let e=this;return j(async function(...t){let a=new k([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(r(t,e)),a}),l=await Reflect.apply(n,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw a.addIssue(s(l,e)),a})})}{let e=this;return j(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new k([r(t,a.error)]);let o=Reflect.apply(n,this,a.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new k([s(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new e$({...this._def,args:ev.create(e).rest(eu.create())})}returns(e){return new e$({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new e$({args:e||ev.create([]).rest(eu.create()),returns:t||eu.create(),typeName:f.ZodFunction,...A(r)})}}class eE extends z{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eE.create=(e,t)=>new eE({getter:e,typeName:f.ZodLazy,...A(t)});class ek extends z{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return T(t,{received:t.data,code:E.invalid_literal,expected:this._def.value}),P}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eS(e,t){return new ex({values:e,typeName:f.ZodEnum,...A(t)})}ek.create=(e,t)=>new ek({value:e,typeName:f.ZodLiteral,...A(t)});class ex extends z{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return T(t,{expected:c.joinValues(r),received:t.parsedType,code:E.invalid_type}),P}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return T(t,{received:t.data,code:E.invalid_enum_value,options:r}),P}return j(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ex.create(e,{...this._def,...t})}exclude(e,t=this._def){return ex.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ex.create=eS;class eT extends z{_parse(e){let t=c.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==w.string&&r.parsedType!==w.number){let e=c.objectValues(t);return T(r,{expected:c.joinValues(e),received:r.parsedType,code:E.invalid_type}),P}if(this._cache||(this._cache=new Set(c.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=c.objectValues(t);return T(r,{received:r.data,code:E.invalid_enum_value,options:e}),P}return j(e.data)}get enum(){return this._def.values}}eT.create=(e,t)=>new eT({values:e,typeName:f.ZodNativeEnum,...A(t)});class eO extends z{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==w.promise&&!1===t.common.async?(T(t,{code:E.invalid_type,expected:w.promise,received:t.parsedType}),P):j((t.parsedType===w.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eO.create=(e,t)=>new eO({type:e,typeName:f.ZodPromise,...A(t)});class eP extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===f.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:e=>{T(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===s.type){let e=s.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return P;let s=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===s.status?P:"dirty"===s.status||"dirty"===t.value?I(s.value):s});{if("aborted"===t.value)return P;let s=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===s.status?P:"dirty"===s.status||"dirty"===t.value?I(s.value):s}}if("refinement"===s.type){let e=e=>{let t=s.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?P:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===s.status?P:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}}if("transform"===s.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?P:Promise.resolve(s.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return P;let n=s.transform(e.value,i);if(n instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}c.assertNever(s)}}eP.create=(e,t,r)=>new eP({schema:e,typeName:f.ZodEffects,effect:t,...A(r)}),eP.createWithPreprocess=(e,t,r)=>new eP({schema:t,effect:{type:"preprocess",transform:e},typeName:f.ZodEffects,...A(r)});class eI extends z{_parse(e){return this._getType(e)===w.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eI.create=(e,t)=>new eI({innerType:e,typeName:f.ZodOptional,...A(t)});class ej extends z{_parse(e){return this._getType(e)===w.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ej.create=(e,t)=>new ej({innerType:e,typeName:f.ZodNullable,...A(t)});class eN extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===w.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eN.create=(e,t)=>new eN({innerType:e,typeName:f.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...A(t)});class eR extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return N(s)?s.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new k(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new k(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eR.create=(e,t)=>new eR({innerType:e,typeName:f.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...A(t)});class eC extends z{_parse(e){if(this._getType(e)!==w.nan){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.nan,received:t.parsedType}),P}return{status:"valid",value:e.data}}}eC.create=e=>new eC({typeName:f.ZodNaN,...A(e)}),Symbol("zod_brand");class eA extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ez extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?P:"dirty"===e.status?(t.dirty(),I(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?P:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ez({in:e,out:t,typeName:f.ZodPipeline})}}class eM extends z{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return N(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}eM.create=(e,t)=>new eM({innerType:e,typeName:f.ZodReadonly,...A(t)}),ef.lazycreate,(o=f||(f={})).ZodString="ZodString",o.ZodNumber="ZodNumber",o.ZodNaN="ZodNaN",o.ZodBigInt="ZodBigInt",o.ZodBoolean="ZodBoolean",o.ZodDate="ZodDate",o.ZodSymbol="ZodSymbol",o.ZodUndefined="ZodUndefined",o.ZodNull="ZodNull",o.ZodAny="ZodAny",o.ZodUnknown="ZodUnknown",o.ZodNever="ZodNever",o.ZodVoid="ZodVoid",o.ZodArray="ZodArray",o.ZodObject="ZodObject",o.ZodUnion="ZodUnion",o.ZodDiscriminatedUnion="ZodDiscriminatedUnion",o.ZodIntersection="ZodIntersection",o.ZodTuple="ZodTuple",o.ZodRecord="ZodRecord",o.ZodMap="ZodMap",o.ZodSet="ZodSet",o.ZodFunction="ZodFunction",o.ZodLazy="ZodLazy",o.ZodLiteral="ZodLiteral",o.ZodEnum="ZodEnum",o.ZodEffects="ZodEffects",o.ZodNativeEnum="ZodNativeEnum",o.ZodOptional="ZodOptional",o.ZodNullable="ZodNullable",o.ZodDefault="ZodDefault",o.ZodCatch="ZodCatch",o.ZodPromise="ZodPromise",o.ZodBranded="ZodBranded",o.ZodPipeline="ZodPipeline",o.ZodReadonly="ZodReadonly";let eD=ee.create;et.create,eC.create,er.create;let eL=es.create;ei.create,en.create,ea.create,eo.create,el.create,eu.create,ec.create,ed.create,ep.create;let eq=ef.create;ef.strictCreate,eh.create,ey.create,eg.create,ev.create,e_.create,eb.create,ew.create;let eU=e$.create;eE.create,ek.create,ex.create,eT.create;let eZ=eO.create;eP.create,eI.create,ej.create,eP.createWithPreprocess,ez.create;let eV=eq({apiKey:eD().optional(),headerName:eD().optional(),validateApiKey:eU().args(eD()).returns(eZ(eL())).optional()}).strict().refine(e=>void 0!==e.apiKey||void 0!==e.validateApiKey,{message:"Either 'apiKey' or 'validateApiKey' must be provided"}).refine(e=>void 0===e.apiKey||void 0===e.validateApiKey,{message:"'apiKey' and 'validateApiKey' are mutually exclusive - provide only one"}),eF="Unauthorized: Missing or invalid API key";function eH(e){let t=eV.safeParse(e);if(!t.success){let r="apiKey"in e,s="validateApiKey"in e;if(r&&s)throw Error("'apiKey' and 'validateApiKey' are mutually exclusive - provide only one");if(r||s)throw Error(`Invalid configuration: ${t.error.message}`);throw Error("Either 'apiKey' or 'validateApiKey' must be provided")}let r=e.headerName??"x-api-key",s="apiKey"in e?e.apiKey:void 0,i="validateApiKey"in e?e.validateApiKey:void 0;return async(t,n,a)=>{let o=t.header(r);!o||"apiKey"in e&&o!==s||i&&!await i(o)?n.status(401).json({error:eF}):a()}}var eK=i(8400),eG=i.n(eK);function eB(e){return(t,r,s)=>{let i=t.header("Authorization");if(!i||!i.startsWith("Bearer "))return void r.status(401).json({error:"Unauthorized: Missing or malformed Authorization header"});let n=i.slice(7).trim();if(!n)return void r.status(401).json({error:"Unauthorized: Missing access token"});try{let{secret:r,...i}=e;t.user=eG().verify(n,r,i),s()}catch(e){r.status(401).json({error:"Unauthorized: Invalid or expired token"})}}}let eJ=require("async_hooks"),eW=(e,t)=>{globalThis[e]=t},eX=e=>globalThis[e];function eY({name:e}){let t=Symbol.for(`xmcp-context-${e}`),r=Symbol.for(`xmcp-context-${e}-fallback-store`);if(eX(t))return eX(t);let s=new eJ.AsyncLocalStorage,i=globalThis[r]??{current:null};eW(r,i);let n={provider:(e,t)=>(i.current=e,s.run(e,t)),getContext:()=>{let t=s.getStore();if(t)return t;if(i.current)return i.current;throw Error(`getContext() can only be used within the ${e} context.`)},setContext:t=>{let r=s.getStore()??i.current;if(!r)throw Error(`setContext() can only be used within the ${e} context.`);Object.assign(r,t)}};return eW(t,n),n}let eQ=Symbol.for("mcp.completable");function e0(e,t){return Object.defineProperty(e,eQ,{value:{complete:t},enumerable:!1,writable:!1,configurable:!1}),e}(h||(h={})).Completable="McpCompletable";let e1=Object.freeze({status:"aborted"});function e2(e,t,r){function s(r,s){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:s,constr:a,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,s);let i=a.prototype,n=Object.keys(i);for(let e=0;e<n.length;e++){let t=n[e];t in r||(r[t]=i[t].bind(r))}}let i=r?.Parent??Object;class n extends i{}function a(e){var t;let i=r?.Parent?new n:this;for(let r of(s(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))r();return i}return Object.defineProperty(n,"name",{value:e}),Object.defineProperty(a,"init",{value:s}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Symbol("zod_brand");class e9 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e4 extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(m=globalThis).__zod_globalConfig??(m.__zod_globalConfig={});let e6=globalThis.__zod_globalConfig;function e5(e){return e&&Object.assign(e6,e),e6}let e8=/^[cC][0-9a-z]{6,}$/,e3=/^[0-9a-z]+$/,e7=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,te=/^[0-9a-vA-V]{20}$/,tt=/^[A-Za-z0-9]{27}$/,tr=/^[a-zA-Z0-9_-]{21}$/,ts=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ti=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ta=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,to=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,td=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tp=/^[A-Za-z0-9_-]*$/,tf=/^https?$/,th=/^\+[1-9]\d{6,14}$/,tm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ty=RegExp(`^${tm}$`);function tg(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tv=/^-?\d+$/,t_=/^-?\d+(?:\.\d+)?$/,tb=/^(?:true|false)$/i,tw=/^null$/i,t$=/^[^A-Z]*$/,tE=/^[^a-z]*$/;function tk(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function tS(e,t){return"bigint"==typeof t?t.toString():t}function tx(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function tT(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let tO=Symbol("evaluating");function tP(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==tO)return void 0===s&&(s=tO,s=r()),s},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function tI(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tj(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function tN(e){return JSON.stringify(e)}let tR="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tC(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let tA=tx(()=>{if(e6.jitless||"undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function tz(e){if(!1===tC(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==tC(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function tM(e){return tz(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let tD=new Set(["string","number","symbol"]);function tL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tq(e,t,r){let s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function tU(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let tZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tV(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function tF(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function tH(e){return"string"==typeof e?e:e?.message}function tK(e,t,r){let s=e.message?e.message:tH(e.inst?._zod.def?.error?.(e))??tH(t?.error?.(e))??tH(r.customError?.(e))??tH(r.localeError?.(e))??"Invalid input",{inst:i,continue:n,input:a,...o}=e;return o.path??(o.path=[]),o.message=s,t?.reportInput&&(o.input=a),o}function tG(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function tB(...e){let[t,r,s]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:s}:{...t}}let tJ=e2("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tW={number:"number",bigint:"bigint",object:"date"},tX=e2("$ZodCheckLessThan",(e,t)=>{tJ.init(e,t);let r=tW[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:r,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tY=e2("$ZodCheckGreaterThan",(e,t)=>{tJ.init(e,t);let r=tW[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tQ=e2("$ZodCheckMultipleOf",(e,t)=>{tJ.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let s,i,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0==(i=Math.round(s=r.value/t.value),n=Number.EPSILON*Math.max(Math.abs(s),1),Math.abs(s-i)<n?0:s-i))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),t0=e2("$ZodCheckNumberFormat",(e,t)=>{tJ.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),s=r?"int":"number",[i,n]=tZ[t.format];e._zod.onattach.push(e=>{let s=e._zod.bag;s.format=t.format,s.minimum=i,s.maximum=n,r&&(s.pattern=tv)}),e._zod.check=a=>{let o=a.value;if(r){if(!Number.isInteger(o))return void a.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}))}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>n&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),t1=e2("$ZodCheckMaxLength",(e,t)=>{var r;tJ.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let s=r.value;if(s.length<=t.maximum)return;let i=tG(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),t2=e2("$ZodCheckMinLength",(e,t)=>{var r;tJ.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let s=r.value;if(s.length>=t.minimum)return;let i=tG(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),t9=e2("$ZodCheckLengthEquals",(e,t)=>{var r;tJ.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let s=r.value,i=s.length;if(i===t.length)return;let n=tG(s),a=i>t.length;r.issues.push({origin:n,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),t4=e2("$ZodCheckStringFormat",(e,t)=>{var r,s;tJ.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),t6=e2("$ZodCheckRegex",(e,t)=>{t4.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t5=e2("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=t$),t4.init(e,t)}),t8=e2("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tE),t4.init(e,t)}),t3=e2("$ZodCheckIncludes",(e,t)=>{tJ.init(e,t);let r=tL(t.includes),s=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(s)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),t7=e2("$ZodCheckStartsWith",(e,t)=>{tJ.init(e,t);let r=RegExp(`^${tL(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),re=e2("$ZodCheckEndsWith",(e,t)=>{tJ.init(e,t);let r=RegExp(`.*${tL(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),rt=e2("$ZodCheckOverwrite",(e,t)=>{tJ.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rr{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let rs=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ri=e2("$ZodError",rs),rn=e2("$ZodError",rs,{Parent:Error}),ra=e=>(t,r,s,i)=>{let n=s?{...s,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new e9;if(a.issues.length){let t=new(i?.Err??e)(a.issues.map(e=>tK(e,n,e5())));throw tR(t,i?.callee),t}return a.value},ro=e=>async(t,r,s,i)=>{let n=s?{...s,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(i?.Err??e)(a.issues.map(e=>tK(e,n,e5())));throw tR(t,i?.callee),t}return a.value},rl=e=>(t,r,s)=>{let i=s?{...s,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},i);if(n instanceof Promise)throw new e9;return n.issues.length?{success:!1,error:new(e??ri)(n.issues.map(e=>tK(e,i,e5())))}:{success:!0,data:n.value}},ru=rl(rn),rc=e=>async(t,r,s)=>{let i=s?{...s,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(e=>tK(e,i,e5())))}:{success:!0,data:n.value}},rd=rc(rn),rp={major:4,minor:4,patch:3},rf=e2("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rp;let s=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&s.unshift(e),s))for(let r of t._zod.onattach)r(e);if(0===s.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let s,i=tV(e);for(let n of t){if(n._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}(e)||!n._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,a=n._zod.check(e);if(a instanceof Promise&&r?.async===!1)throw new e9;if(s||a instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await a,e.issues.length!==t&&(i||(i=tV(e,t)))});else{if(e.issues.length===t)continue;i||(i=tV(e,t))}}return s?s.then(()=>e):e},r=(r,i,n)=>{if(tV(r))return r.aborted=!0,r;let a=t(i,s,n);if(a instanceof Promise){if(!1===n.async)throw new e9;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if("backward"===n.direction){let t=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,n)):r(t,i,n)}let a=e._zod.parse(i,n);if(a instanceof Promise){if(!1===n.async)throw new e9;return a.then(e=>t(e,s,n))}return t(a,s,n)}}tP(e,"~standard",()=>({validate:t=>{try{let r=ru(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return rd(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),rh=e2("$ZodString",(e,t)=>{var r;let s;rf.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(s=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${s}$`)),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rm=e2("$ZodStringFormat",(e,t)=>{t4.init(e,t),rh.init(e,t)}),ry=e2("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ti),rm.init(e,t)}),rg=e2("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tn(e))}else t.pattern??(t.pattern=tn());rm.init(e,t)}),rv=e2("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ta),rm.init(e,t)}),r_=e2("$ZodURL",(e,t)=>{rm.init(e,t),e._zod.check=r=>{try{let s=r.value.trim();if(!t.normalize&&t.protocol?.source===tf.source&&!/^https?:\/\//i.test(s))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});let i=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=s;return}catch(s){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),rb=e2("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rm.init(e,t)}),rw=e2("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=tr),rm.init(e,t)}),r$=e2("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=e8),rm.init(e,t)}),rE=e2("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=e3),rm.init(e,t)}),rk=e2("$ZodULID",(e,t)=>{t.pattern??(t.pattern=e7),rm.init(e,t)}),rS=e2("$ZodXID",(e,t)=>{t.pattern??(t.pattern=te),rm.init(e,t)}),rx=e2("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tt),rm.init(e,t)}),rT=e2("$ZodISODateTime",(e,t)=>{let r,s,i;t.pattern??(r=tg({precision:t.precision}),s=["Z"],t.local&&s.push(""),t.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${r}(?:${s.join("|")})`,t.pattern=RegExp(`^${tm}T(?:${i})$`)),rm.init(e,t)}),rO=e2("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ty),rm.init(e,t)}),rP=e2("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${tg(t)}$`)),rm.init(e,t)}),rI=e2("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ts),rm.init(e,t)}),rj=e2("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=to),rm.init(e,t),e._zod.bag.format="ipv4"}),rN=e2("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tl),rm.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),rR=e2("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tu),rm.init(e,t)}),rC=e2("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tc),rm.init(e,t),e._zod.check=r=>{let s=r.value.split("/");try{if(2!==s.length)throw Error();let[e,t]=s;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function rA(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rz=e2("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=td),rm.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rA(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rM=e2("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tp),rm.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!tp.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rA(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rD=e2("$ZodE164",(e,t)=>{t.pattern??(t.pattern=th),rm.init(e,t)}),rL=e2("$ZodJWT",(e,t)=>{rm.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[s]=r;if(!s)return!1;let i=JSON.parse(atob(s));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rq=e2("$ZodNumber",(e,t)=>{rf.init(e,t),e._zod.pattern=e._zod.bag.pattern??t_,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let n="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...n?{received:n}:{}}),r}}),rU=e2("$ZodNumberFormat",(e,t)=>{t0.init(e,t),rq.init(e,t)}),rZ=e2("$ZodBoolean",(e,t)=>{rf.init(e,t),e._zod.pattern=tb,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),rV=e2("$ZodNull",(e,t)=>{rf.init(e,t),e._zod.pattern=tw,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let s=t.value;return null===s||t.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),t}}),rF=e2("$ZodAny",(e,t)=>{rf.init(e,t),e._zod.parse=e=>e}),rH=e2("$ZodUnknown",(e,t)=>{rf.init(e,t),e._zod.parse=e=>e}),rK=e2("$ZodNever",(e,t)=>{rf.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function rG(e,t,r){e.issues.length&&t.issues.push(...tF(r,e.issues)),t.value[r]=e.value}let rB=e2("$ZodArray",(e,t)=>{rf.init(e,t),e._zod.parse=(r,s)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let n=[];for(let e=0;e<i.length;e++){let a=i[e],o=t.element._zod.run({value:a,issues:[]},s);o instanceof Promise?n.push(o.then(t=>rG(t,r,e))):rG(o,r,e)}return n.length?Promise.all(n).then(()=>r):r}});function rJ(e,t,r,s,i,n){let a=r in s;if(e.issues.length){if(i&&n&&!a)return;t.issues.push(...tF(r,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}function rW(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let s=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function rX(e,t,r,s,i,n){let a=[],o=i.keySet,l=i.catchall._zod,u=l.def.type,c="optional"===l.optin,d="optional"===l.optout;for(let i in t){if("__proto__"===i||o.has(i))continue;if("never"===u){a.push(i);continue}let n=l.run({value:t[i],issues:[]},s);n instanceof Promise?e.push(n.then(e=>rJ(e,r,i,t,c,d))):rJ(n,r,i,t,c,d)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length)?Promise.all(e).then(()=>r):r}let rY=e2("$ZodObject",(e,t)=>{let r;rf.init(e,t);let s=Object.getOwnPropertyDescriptor(t,"shape");if(!s?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let i=tx(()=>rW(t));tP(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let s=e[t]._zod;if(s.values)for(let e of(r[t]??(r[t]=new Set),s.values))r[t].add(e)}return r});let n=t.catchall;e._zod.parse=(t,s)=>{r??(r=i.value);let a=t.value;if(!tC(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let o=[],l=r.shape;for(let e of r.keys){let r=l[e],i="optional"===r._zod.optin,n="optional"===r._zod.optout,u=r._zod.run({value:a[e],issues:[]},s);u instanceof Promise?o.push(u.then(r=>rJ(r,t,e,a,i,n))):rJ(u,t,e,a,i,n)}return n?rX(o,a,t,s,i.value,e):o.length?Promise.all(o).then(()=>t):t}}),rQ=e2("$ZodObjectJIT",(e,t)=>{let r,s;rY.init(e,t);let i=e._zod.parse,n=tx(()=>rW(t)),a=!e6.jitless,o=a&&tA.value,l=t.catchall;e._zod.parse=(u,c)=>{s??(s=n.value);let d=u.value;return tC(d)?a&&o&&c?.async===!1&&!0!==c.jitless?(r||(r=(e=>{let t=new rr(["shape","payload","ctx"]),r=n.value,s=e=>{let t=tN(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),a=0;for(let e of r.keys)i[e]=`key_${a++}`;for(let n of(t.write("const newResult = {};"),r.keys)){let r=i[n],a=tN(n),o=e[n],l=o?._zod?.optin==="optional",u=o?._zod?.optout==="optional";t.write(`const ${r} = ${s(n)};`),l&&u?t.write(`
7
+ deps: ${r}}`};let a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let s in e)"__proto__"!==s&&((Array.isArray(e[s])?t:r)[s]=e[s]);return[t,r]}(e);o(e,t),l(e,r)}};function o(e,t=e.schema){let{gen:r,data:i,it:a}=e;if(0===Object.keys(t).length)return;let l=r.let("missing");for(let o in t){let u=t[o];if(0===u.length)continue;let c=(0,n.propertyInData)(r,i,o,a.opts.ownProperties);e.setParams({property:o,depsCount:u.length,deps:u.join(", ")}),a.allErrors?r.if(c,()=>{for(let t of u)(0,n.checkReportMissingProp)(e,t)}):(r.if((0,s._)`${c} && (${(0,n.checkMissingProp)(e,u,l)})`),(0,n.reportMissingProp)(e,l),r.else())}}function l(e,t=e.schema){let{gen:r,data:s,keyword:a,it:o}=e,u=r.name("valid");for(let l in t)(0,i.alwaysValidSchema)(o,t[l])||(r.if((0,n.propertyInData)(r,s,l,o.opts.ownProperties),()=>{let t=e.subschema({keyword:a,schemaProp:l},u);e.mergeValidEvaluated(t,u)},()=>r.var(u,!0)),e.ok(u))}t.validatePropertyDeps=o,t.validateSchemaDeps=l,t.default=a},8102(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);function n(e,t){let r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,s.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,s._)`{failingKeyword: ${e.ifClause}}`},code(e){let t,{gen:r,parentSchema:a,it:o}=e;void 0===a.then&&void 0===a.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let l=n(o,"then"),u=n(o,"else");if(!l&&!u)return;let c=r.let("valid",!0),d=r.name("_valid");if(t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.mergeEvaluated(t),e.reset(),l&&u){let t=r.let("ifClause");e.setParams({ifClause:t}),r.if(d,p("then",t),p("else",t))}else l?r.if(d,p("then")):r.if((0,s.not)(d),p("else"));function p(t,i){return()=>{let n=e.subschema({keyword:t},d);r.assign(c,d),e.mergeValidEvaluated(n,c),i?r.assign(i,(0,s._)`${t}`):e.setParams({ifClause:t})}}e.pass(c,()=>e.error(!0))}}},8313(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(714),i=r(1997),n=r(3665),a=r(5153),o=r(2692),l=r(5860),u=r(374),c=r(8401),d=r(3252),p=r(6398),f=r(4948),h=r(1070),m=r(5368),y=r(2003),g=r(8102),v=r(1871);t.default=function(e=!1){let t=[f.default,h.default,m.default,y.default,g.default,v.default,u.default,c.default,l.default,d.default,p.default];return e?t.push(i.default,a.default):t.push(s.default,n.default),t.push(o.default),t}},3665(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;let s=r(8994),i=r(7218),n=r(4954);function a(e,t,r=e.schema){let{gen:n,parentSchema:o,data:l,keyword:u,it:c}=e;(function(e){let{opts:s,errSchemaPath:n}=c,a=r.length,o=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(s.strictTuples&&!o){let e=`"${u}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${n}"`;(0,i.checkStrictMode)(c,e,s.strictTuples)}})(o),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(n,r.length,c.items));let d=n.name("valid"),p=n.const("len",(0,s._)`${l}.length`);r.forEach((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(n.if((0,s._)`${p} > ${r}`,()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},d)),e.ok(d))})}t.validateTuple=a,t.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,n.validateArray)(e))}}},5153(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(4954),a=r(714);t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:o}=r;s.items=!0,(0,i.alwaysValidSchema)(s,t)||(o?(0,a.validateAdditionalItems)(e,o):e.ok((0,n.validateArray)(e)))}}},4948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,s.alwaysValidSchema)(i,r))return void e.fail();let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},5368(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,s._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:r,parentSchema:n,it:a}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let o=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block(function(){r.forEach((r,n)=>{let c;(0,i.alwaysValidSchema)(a,r)?t.var(u,!0):c=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if((0,s._)`${u} && ${o}`).assign(o,!1).assign(l,(0,s._)`[${l}, ${n}]`).else(),t.if(u,()=>{t.assign(o,!0),t.assign(l,n),c&&e.mergeEvaluated(c,s.Name)})})}),e.result(o,()=>e.reset(),()=>e.error(!0))}}},6398(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),n=r(7218),a=r(7218);t.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:l,it:u}=e,{opts:c}=u,d=(0,s.allSchemaProperties)(r),p=d.filter(e=>(0,n.alwaysValidSchema)(u,r[e]));if(0===d.length||p.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;let f=c.strictSchema&&!c.allowMatchingProperties&&l.properties,h=t.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,a.evaluatedPropsToName)(t,u.props));let{props:m}=u;for(let e of d)f&&function(e){for(let t in f)new RegExp(e).test(t)&&(0,n.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),u.allErrors?y(e):(t.var(h,!0),y(e),t.if(h));function y(r){t.forIn("key",o,n=>{t.if((0,i._)`${(0,s.usePattern)(e,r)}.test(${n})`,()=>{let s=p.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:a.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign((0,i._)`${m}[${n}]`,!0):s||u.allErrors||t.if((0,i.not)(h),()=>t.break())})})}}}},1997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3665);t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")}},3252(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6023),i=r(4954),n=r(7218),a=r(8401);t.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:l,it:u}=e;"all"===u.opts.removeAdditional&&void 0===o.additionalProperties&&a.default.code(new s.KeywordCxt(u,a.default,"additionalProperties"));let c=(0,i.allSchemaProperties)(r);for(let e of c)u.definedProperties.add(e);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=n.mergeEvaluated.props(t,(0,n.toHash)(c),u.props));let d=c.filter(e=>!(0,n.alwaysValidSchema)(u,r[e]));if(0===d.length)return;let p=t.name("valid");for(let s of d){var f;(f=s,u.opts.useDefaults&&!u.compositeRule&&void 0!==r[f].default)?h(s):(t.if((0,i.propertyInData)(t,l,s,u.opts.ownProperties)),h(s),u.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(s),e.ok(p)}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}}},374(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,s._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:r,data:n,it:a}=e;if((0,i.alwaysValidSchema)(a,r))return;let o=t.name("valid");t.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},o),t.if((0,s.not)(o),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(o)}}},1871(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}},4954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;let s=r(8994),i=r(7218),n=r(6660),a=r(7218);function o(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}function l(e,t,r){return(0,s._)`${o(e)}.call(${t}, ${r})`}function u(e,t,r,i){let n=(0,s._)`${t}${(0,s.getProperty)(r)} === undefined`;return i?(0,s.or)(n,(0,s.not)(l(e,t,r))):n}function c(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){let{gen:r,data:i,it:n}=e;r.if(u(r,i,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,s._)`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,n){return(0,s.or)(...i.map(i=>(0,s.and)(u(e,t,i,r.ownProperties),(0,s._)`${n} = ${i}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=o,t.isOwnProperty=l,t.propertyInData=function(e,t,r,i){let n=(0,s._)`${t}${(0,s.getProperty)(r)} !== undefined`;return i?(0,s._)`${n} && ${l(e,t,r)}`:n},t.noPropertyInData=u,t.allSchemaProperties=c,t.schemaProperties=function(e,t){return c(t).filter(r=>!(0,i.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:a,errorPath:o},it:l},u,c,d){let p=d?(0,s._)`${e}, ${t}, ${i}${a}`:t,f=[[n.default.instancePath,(0,s.strConcat)(n.default.instancePath,o)],[n.default.parentData,l.parentData],[n.default.parentDataProperty,l.parentDataProperty],[n.default.rootData,n.default.rootData]];l.opts.dynamicRef&&f.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);let h=(0,s._)`${p}, ${r.object(...f)}`;return c!==s.nil?(0,s._)`${u}.call(${c}, ${h})`:(0,s._)`${u}(${h})`};let d=(0,s._)`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:n}=t.code,o=n(r,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,s._)`${"new RegExp"===n.code?d:(0,a.useFunc)(e,n)}(${r}, ${i})`})},t.validateArray=function(e){let{gen:t,data:r,keyword:n,it:a}=e,o=t.name("valid");if(a.allErrors){let e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(o,!0),l(()=>t.break()),o;function l(a){let l=t.const("len",(0,s._)`${r}.length`);t.forRange("i",0,l,r=>{e.subschema({keyword:n,dataProp:r,dataPropType:i.Type.Num},o),t.if((0,s.not)(o),a)})}},t.validateUnion=function(e){let{gen:t,schema:r,keyword:n,it:a}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some(e=>(0,i.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let o=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((r,i)=>{let a=e.subschema({keyword:n,schemaProp:i,compositeRule:!0},l);t.assign(o,(0,s._)`${o} || ${l}`),e.mergeValidEvaluated(a,l)||t.if((0,s.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}},3330(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},8119(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3330),i=r(930);t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,i.default]},930(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;let s=r(4220),i=r(4954),n=r(8994),a=r(6660),o=r(1688),l=r(7218);function u(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,n._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function c(e,t,r,s){let{gen:o,it:u}=e,{allErrors:c,schemaEnv:d,opts:p}=u,f=p.passContext?a.default.this:n.nil;function h(e){let t=(0,n._)`${e}.errors`;o.assign(a.default.vErrors,(0,n._)`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),o.assign(a.default.errors,(0,n._)`${a.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;let s=null==(t=null==r?void 0:r.validate)?void 0:t.evaluated;if(!0!==u.props)if(s&&!s.dynamicProps)void 0!==s.props&&(u.props=l.mergeEvaluated.props(o,s.props,u.props));else{let t=o.var("props",(0,n._)`${e}.evaluated.props`);u.props=l.mergeEvaluated.props(o,t,u.props,n.Name)}if(!0!==u.items)if(s&&!s.dynamicItems)void 0!==s.items&&(u.items=l.mergeEvaluated.items(o,s.items,u.items));else{let t=o.var("items",(0,n._)`${e}.evaluated.items`);u.items=l.mergeEvaluated.items(o,t,u.items,n.Name)}}s?function(){if(!d.$async)throw Error("async schema referenced by sync schema");let r=o.let("valid");o.try(()=>{o.code((0,n._)`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),c||o.assign(r,!0)},e=>{o.if((0,n._)`!(${e} instanceof ${u.ValidationError})`,()=>o.throw(e)),h(e),c||o.assign(r,!1)}),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,f),()=>m(t),()=>h(t))}t.getValidate=u,t.callRef=c,t.default={keyword:"$ref",schemaType:"string",code(e){var t,r;let i,a,l,d,{gen:p,schema:f,it:h}=e,{baseId:m,schemaEnv:y,validateName:g,opts:v,self:_}=h,{root:b}=y;if(("#"===f||"#/"===f)&&m===b.baseId){if(y===b)return c(e,g,y,y.$async);let t=p.scopeValue("root",{ref:b});return c(e,(0,n._)`${t}.validate`,b,b.$async)}let w=o.resolveRef.call(_,b,m,f);if(void 0===w)throw new s.default(h.opts.uriResolver,m,f);return w instanceof o.SchemaEnv?(i=u(e,t=w),void c(e,i,t,t.$async)):(r=w,a=p.scopeValue("schema",!0===v.code.source?{ref:r,code:(0,n.stringify)(r)}:{ref:r}),l=p.name("valid"),d=e.subschema({schema:r,dataTypes:[],schemaPath:n.nil,topSchemaRef:a,errSchemaPath:f},l),void(e.mergeEvaluated(d),e.ok(l)))}}},9376(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(5141),n=r(1688),a=r(4220),o=r(7218);t.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,s._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){let{gen:t,data:r,schema:l,parentSchema:u,it:c}=e,{oneOf:d}=u;if(!c.opts.discriminator)throw Error("discriminator: requires discriminator option");let p=l.propertyName;if("string"!=typeof p)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!d)throw Error("discriminator: requires oneOf keyword");let f=t.let("valid",!1),h=t.const("tag",(0,s._)`${r}${(0,s.getProperty)(p)}`);t.if((0,s._)`typeof ${h} == "string"`,()=>(function(){let r=function(){var e;let t={},r=i(u),s=!0;for(let t=0;t<d.length;t++){let u=d[t];if((null==u?void 0:u.$ref)&&!(0,o.schemaHasRulesButRef)(u,c.self.RULES)){let e=u.$ref;if((u=n.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,e))instanceof n.SchemaEnv&&(u=u.schema),void 0===u)throw new a.default(c.opts.uriResolver,c.baseId,e)}let f=null==(e=null==u?void 0:u.properties)?void 0:e[p];if("object"!=typeof f)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);s=s&&(r||i(u)),function(e,t){if(e.const)l(e.const,t);else if(e.enum)for(let r of e.enum)l(r,t);else throw Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}(f,t)}if(!s)throw Error(`discriminator: "${p}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(p)}function l(e,r){if("string"!=typeof e||e in t)throw Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();for(let i in t.if(!1),r)t.elseIf((0,s._)`${h} === ${i}`),t.assign(f,function(r){let i=t.name("valid"),n=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(n,s.Name),i}(r[i]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:h,tagName:p}),t.endIf()})(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:h,tagName:p})),e.ok(f)}}},5141(e,t){"use strict";var r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(s=r||(t.DiscrError=r={})).Tag="tag",s.Mapping="mapping"},3959(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8119),i=r(659),n=r(8313),a=r(8563),o=r(4618);t.default=[s.default,i.default,(0,n.default)(),a.default,o.metadataVocabulary,o.contentVocabulary]},424(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,s._)`{format: ${e}}`},code(e,t){let r,i,n,a,o,l,{gen:u,data:c,$data:d,schema:p,schemaCode:f,it:h}=e,{opts:m,errSchemaPath:y,schemaEnv:g,self:v}=h;m.validateFormats&&(d?(r=u.scopeValue("formats",{ref:v.formats,code:m.code.formats}),i=u.const("fDef",(0,s._)`${r}[${f}]`),n=u.let("fType"),a=u.let("format"),u.if((0,s._)`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>u.assign(n,(0,s._)`${i}.type || "string"`).assign(a,(0,s._)`${i}.validate`),()=>u.assign(n,(0,s._)`"string"`).assign(a,i)),e.fail$data((0,s.or)(!1===m.strictSchema?s.nil:(0,s._)`${f} && !${a}`,(o=g.$async?(0,s._)`(${i}.async ? await ${a}(${c}) : ${a}(${c}))`:(0,s._)`${a}(${c})`,l=(0,s._)`(typeof ${a} == "function" ? ${o} : ${a}.test(${c}))`,(0,s._)`${a} && ${a} !== true && ${n} === ${t} && !${l}`)))):function(){var r;let i,n,a=v.formats[p];if(!a){if(!1===m.strictSchema)return v.logger.warn(o());throw Error(o());function o(){return`unknown format "${p}" ignored in schema at path "${y}"`}}if(!0===a)return;let[l,d,f]=(i=(r=a)instanceof RegExp?(0,s.regexpCode)(r):m.code.formats?(0,s._)`${m.code.formats}${(0,s.getProperty)(p)}`:void 0,n=u.scopeValue("formats",{key:p,ref:r,code:i}),"object"!=typeof r||r instanceof RegExp?["string",r,n]:[r.type||"string",r.validate,(0,s._)`${n}.validate`]);l===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,s._)`await ${f}(${c})`}return"function"==typeof d?(0,s._)`${f}(${c})`:(0,s._)`${f}.test(${c})`}())}())}}},8563(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[r(424).default]},4618(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7080(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(6013);t.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,s._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:r,$data:a,schemaCode:o,schema:l}=e;a||l&&"object"==typeof l?e.fail$data((0,s._)`!${(0,i.useFunc)(t,n.default)}(${r}, ${o})`):e.fail((0,s._)`${l} !== ${r}`)}}},5358(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(6013);t.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,s._)`{allowedValues: ${e}}`},code(e){let t,r,{gen:a,data:o,$data:l,schema:u,schemaCode:c,it:d}=e;if(!l&&0===u.length)throw Error("enum must have non-empty array");let p=u.length>=d.opts.loopEnum,f=()=>null!=t?t:t=(0,i.useFunc)(a,n.default);if(p||l)r=a.let("valid"),e.block$data(r,function(){a.assign(r,!1),a.forOf("v",c,e=>a.if((0,s._)`${f()}(${o}, ${e})`,()=>a.assign(r,!0).break()))});else{if(!Array.isArray(u))throw Error("ajv implementation error");let e=a.const("vSchema",c);r=(0,s.or)(...u.map((t,r)=>{var i,n;let a;return i=e,"object"==typeof(a=u[n=r])&&null!==a?(0,s._)`${f()}(${o}, ${i}[${n}])`:(0,s._)`${o} === ${a}`}))}e.pass(r)}}},659(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8997),i=r(9190),n=r(4280),a=r(8805),o=r(2189),l=r(3138),u=r(8870),c=r(1858),d=r(7080),p=r(5358);t.default=[s.default,i.default,n.default,a.default,o.default,l.default,u.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default]},8870(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,n="maxItems"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`${r}.length ${n} ${i}`)}}},4280(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),n=r(5532);t.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:a,it:o}=e,l="maxLength"===t?s.operators.GT:s.operators.LT,u=!1===o.opts.unicode?(0,s._)`${r}.length`:(0,s._)`${(0,i.useFunc)(e.gen,n.default)}(${r})`;e.fail$data((0,s._)`${u} ${l} ${a}`)}}},8997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=s.operators,n={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};t.default={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must be ${n[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,s._)`{comparison: ${n[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,s._)`${r} ${n[t].fail} ${i} || isNaN(${r})`)}}},2189(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,n="maxProperties"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`Object.keys(${r}).length ${n} ${i}`)}}},9190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,s._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:r,schemaCode:i,it:n}=e,a=n.opts.multipleOfPrecision,o=t.let("res"),l=a?(0,s._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,s._)`${o} !== parseInt(${o})`;e.fail$data((0,s._)`(${i} === 0 || (${o} = ${r}/${i}, ${l}))`)}}},8805(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(7218),n=r(8994);t.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,n._)`{pattern: ${e}}`},code(e){let{gen:t,data:r,$data:a,schema:o,schemaCode:l,it:u}=e,c=u.opts.unicodeRegExp?"u":"";if(a){let{regExp:s}=u.opts.code,a="new RegExp"===s.code?(0,n._)`new RegExp`:(0,i.useFunc)(t,s),o=t.let("valid");t.try(()=>t.assign(o,(0,n._)`${a}(${l}, ${c}).test(${r})`),()=>t.assign(o,!1)),e.fail$data((0,n._)`!${o}`)}else{let t=(0,s.usePattern)(e,o);e.fail$data((0,n._)`!${t}.test(${r})`)}}}},3138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),n=r(7218);t.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,i.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,i._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:r,schemaCode:a,data:o,$data:l,it:u}=e,{opts:c}=u;if(!l&&0===r.length)return;let d=r.length>=c.loopRequired;if(u.allErrors?function(){if(d||l)e.block$data(i.nil,p);else for(let t of r)(0,s.checkReportMissingProp)(e,t)}():function(){let n=t.let("missing");if(d||l){let r=t.let("valid",!0);e.block$data(r,()=>{var l,u;return l=n,u=r,void(e.setParams({missingProperty:l}),t.forOf(l,a,()=>{t.assign(u,(0,s.propertyInData)(t,o,l,c.ownProperties)),t.if((0,i.not)(u),()=>{e.error(),t.break()})},i.nil))}),e.ok(r)}else t.if((0,s.checkMissingProp)(e,r,n)),(0,s.reportMissingProp)(e,n),t.else()}(),c.strictRequired){let t=e.parentSchema.properties,{definedProperties:s}=e.it;for(let e of r)if((null==t?void 0:t[e])===void 0&&!s.has(e)){let t=u.schemaEnv.baseId+u.errSchemaPath,r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,n.checkStrictMode)(u,r,u.opts.strictRequired)}}function p(){t.forOf("prop",a,r=>{e.setParams({missingProperty:r}),t.if((0,s.noPropertyInData)(t,o,r,c.ownProperties),()=>e.error())})}}}},1858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6419),i=r(8994),n=r(7218),a=r(6013);t.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,i.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,i._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:r,$data:o,schema:l,parentSchema:u,schemaCode:c,it:d}=e;if(!o&&!l)return;let p=t.let("valid"),f=u.items?(0,s.getSchemaTypes)(u.items):[];e.block$data(p,function(){let o=t.let("i",(0,i._)`${r}.length`),l=t.let("j");e.setParams({i:o,j:l}),t.assign(p,!0),t.if((0,i._)`${o} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?function(n,a){let o=t.name("item"),l=(0,s.checkDataTypes)(f,o,d.opts.strictNumbers,s.DataType.Wrong),u=t.const("indices",(0,i._)`{}`);t.for((0,i._)`;${n}--;`,()=>{t.let(o,(0,i._)`${r}[${n}]`),t.if(l,(0,i._)`continue`),f.length>1&&t.if((0,i._)`typeof ${o} == "string"`,(0,i._)`${o} += "_"`),t.if((0,i._)`typeof ${u}[${o}] == "number"`,()=>{t.assign(a,(0,i._)`${u}[${o}]`),e.error(),t.assign(p,!1).break()}).code((0,i._)`${u}[${o}] = ${n}`)})}:function(s,o){let l=(0,n.useFunc)(t,a.default),u=t.name("outer");t.label(u).for((0,i._)`;${s}--;`,()=>t.for((0,i._)`${o} = ${s}; ${o}--;`,()=>t.if((0,i._)`${l}(${r}[${s}], ${r}[${o}])`,()=>{e.error(),t.assign(p,!1).break(u)})))})(o,l))},(0,i._)`${c} === false`),e.ok(p)}}},9454(e,t,r){"use strict";var s=r(181).Buffer,i=r(181).SlowBuffer;function n(e,t){if(!s.isBuffer(e)||!s.isBuffer(t)||e.length!==t.length)return!1;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r}e.exports=n,n.install=function(){s.prototype.equal=i.prototype.equal=function(e){return n(this,e)}};var a=s.prototype.equal,o=i.prototype.equal;n.restore=function(){s.prototype.equal=a,i.prototype.equal=o}},6507(e,t,r){"use strict";let s=r(5317),i=r(8388),n=r(442);function a(e,t,r){let a=i(e,t,r),o=s.spawn(a.command,a.args,a.options);return n.hookChildProcess(o,a),o}e.exports=a,e.exports.spawn=a,e.exports.sync=function(e,t,r){let a=i(e,t,r),o=s.spawnSync(a.command,a.args,a.options);return o.error=o.error||n.verifyENOENTSync(o.status,a),o},e.exports._parse=i,e.exports._enoent=n},442(e){"use strict";let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function s(e,s){return t&&1===e&&!s.file?r(s.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let i=e.emit;e.emit=function(t,n){if("exit"===t){let t=s(n,r);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:s,verifyENOENTSync:function(e,s){return t&&1===e&&!s.file?r(s.original,"spawnSync"):null},notFoundError:r}},8388(e,t,r){"use strict";let s=r(6928),i=r(3803),n=r(2077),a=r(1880),o="win32"===process.platform,l=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let c={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?c:function(e){let t;if(!o)return e;let r=(e.file=i(e),(t=e.file&&a(e.file))?(e.args.unshift(e.file),e.command=t,i(e)):e.file),c=!l.test(r);if(e.options.forceShell||c){let t=u.test(r);e.command=s.normalize(e.command),e.command=n.command(e.command),e.args=e.args.map(e=>n.argument(e,t));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(c)}},2077(e){"use strict";let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},1880(e,t,r){"use strict";let s=r(9896),i=r(600);e.exports=function(e){let t,r=Buffer.alloc(150);try{t=s.openSync(e,"r"),s.readSync(t,r,0,150,0),s.closeSync(t)}catch(e){}return i(r.toString())}},3803(e,t,r){"use strict";let s=r(6928),i=r(1905),n=r(9695);function a(e,t){let r,a=e.options.env||process.env,o=process.cwd(),l=null!=e.options.cwd,u=l&&void 0!==process.chdir&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch(e){}try{r=i.sync(e.command,{path:a[n({env:a})],pathExt:t?s.delimiter:void 0})}catch(e){}finally{u&&process.chdir(o)}return r&&(r=s.resolve(l?e.options.cwd:"",r)),r}e.exports=function(e){return a(e)||a(e,!0)}},8583(e,t,r){let s=r(9896),i=r(6928),n=r(857),a=r(6982),o=r(4519).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function u(e){console.log(`[dotenv@${o}][DEBUG] ${e}`)}function c(e){console.log(`[dotenv@${o}] ${e}`)}function d(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function p(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)s.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=i.resolve(process.cwd(),".env.vault");return s.existsSync(t)?t:null}function f(e){return"~"===e[0]?i.join(n.homedir(),e.slice(1)):e}let h={configDotenv:function(e){let t,r=i.resolve(process.cwd(),".env"),n="utf8",a=!!(e&&e.debug),o=!e||!("quiet"in e)||e.quiet;e&&e.encoding?n=e.encoding:a&&u("No encoding is specified. UTF-8 is used by default");let l=[r];if(e&&e.path)if(Array.isArray(e.path))for(let t of(l=[],e.path))l.push(f(t));else l=[f(e.path)];let d={};for(let r of l)try{let t=h.parse(s.readFileSync(r,{encoding:n}));h.populate(d,t,e)}catch(e){a&&u(`Failed to load ${r} ${e.message}`),t=e}let p=process.env;if(e&&null!=e.processEnv&&(p=e.processEnv),h.populate(p,d,e),a||!o){let e=Object.keys(d).length,r=[];for(let e of l)try{let t=i.relative(process.cwd(),e);r.push(t)}catch(r){a&&u(`Failed to load ${e} ${r.message}`),t=r}c(`injecting env (${e}) from ${r.join(",")}`)}return t?{parsed:d,error:t}:{parsed:d}},_configVault:function(e){let t=!!(e&&e.debug),r=!e||!("quiet"in e)||e.quiet;(t||!r)&&c("Loading env from encrypted .env.vault");let s=h._parseVault(e),i=process.env;return e&&null!=e.processEnv&&(i=e.processEnv),h.populate(i,s,e),{parsed:s}},_parseVault:function(e){let t,r=p(e=e||{});e.path=r;let s=h.configDotenv(e);if(!s.parsed){let e=Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw e.code="MISSING_DATA",e}let i=d(e).split(","),n=i.length;for(let e=0;e<n;e++)try{let r=i[e].trim(),n=function(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let s=r.password;if(!s){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let i=r.searchParams.get("environment");if(!i){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let n=`DOTENV_VAULT_${i.toUpperCase()}`,a=e.parsed[n];if(!a){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:a,key:s}}(s,r);t=h.decrypt(n.ciphertext,n.key);break}catch(t){if(e+1>=n)throw t}return h.parse(t)},config:function(e){if(0===d(e).length)return h.configDotenv(e);let t=p(e);if(!t){var r;return r=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${o}][WARN] ${r}`),h.configDotenv(e)}return h._configVault(e)},decrypt:function(e,t){let r=Buffer.from(t.slice(-64),"hex"),s=Buffer.from(e,"base64"),i=s.subarray(0,12),n=s.subarray(-16);s=s.subarray(12,-16);try{let e=a.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(n),`${e.update(s)}${e.final()}`}catch(s){let e=s instanceof RangeError,t="Invalid key length"===s.message,r="Unsupported state or unable to authenticate data"===s.message;if(e||t){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw s}},parse:function(e){let t,r={},s=e.toString();for(s=s.replace(/\r\n?/mg,"\n");null!=(t=l.exec(s));){let e=t[1],s=t[2]||"",i=(s=s.trim())[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===i&&(s=(s=s.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),r[e]=s}return r},populate:function(e,t,r={}){let s=!!(r&&r.debug),i=!!(r&&r.override);if("object"!=typeof t){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===i&&(e[r]=t[r]),s&&(!0===i?u(`"${r}" is already defined and WAS overwritten`):u(`"${r}" is already defined and was NOT overwritten`))):e[r]=t[r]}};e.exports.configDotenv=h.configDotenv,e.exports._configVault=h._configVault,e.exports._parseVault=h._parseVault,e.exports.config=h.config,e.exports.decrypt=h.decrypt,e.exports.parse=h.parse,e.exports.populate=h.populate,e.exports=h},9053(e,t,r){"use strict";var s=r(6608).Buffer,i=r(2188);function n(e){if(s.isBuffer(e))return e;if("string"==typeof e)return s.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function a(e,t,r){for(var s=0;t+s<r&&0===e[t+s];)++s;return e[t+s]>=128&&--s,s}e.exports={derToJose:function(e,t){e=n(e);var r=i(t),a=r+1,o=e.length,l=0;if(48!==e[l++])throw Error('Could not find expected "seq"');var u=e[l++];if(129===u&&(u=e[l++]),o-l<u)throw Error('"seq" specified length of "'+u+'", only "'+(o-l)+'" remaining');if(2!==e[l++])throw Error('Could not find expected "int" for "r"');var c=e[l++];if(o-l-2<c)throw Error('"r" specified length of "'+c+'", only "'+(o-l-2)+'" available');if(a<c)throw Error('"r" specified length of "'+c+'", max of "'+a+'" is acceptable');var d=l;if(l+=c,2!==e[l++])throw Error('Could not find expected "int" for "s"');var p=e[l++];if(o-l!==p)throw Error('"s" specified length of "'+p+'", expected "'+(o-l)+'"');if(a<p)throw Error('"s" specified length of "'+p+'", max of "'+a+'" is acceptable');var f=l;if((l+=p)!==o)throw Error('Expected to consume entire buffer, but "'+(o-l)+'" bytes remain');var h=r-c,m=r-p,y=s.allocUnsafe(h+c+m+p);for(l=0;l<h;++l)y[l]=0;e.copy(y,l,d+Math.max(-h,0),d+c),l=r;for(var g=l;l<g+m;++l)y[l]=0;return e.copy(y,l,f+Math.max(-m,0),f+p),y=(y=y.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,t){e=n(e);var r=i(t),o=e.length;if(o!==2*r)throw TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+o+'"');var l=a(e,0,r),u=a(e,r,e.length),c=r-l,d=r-u,p=2+c+1+1+d,f=p<128,h=s.allocUnsafe((f?2:3)+p),m=0;return h[m++]=48,f?h[m++]=p:(h[m++]=129,h[m++]=255&p),h[m++]=2,h[m++]=c,l<0?(h[m++]=0,m+=e.copy(h,m,0,r)):m+=e.copy(h,m,l,r),h[m++]=2,h[m++]=d,u<0?(h[m++]=0,e.copy(h,m,r)):e.copy(h,m,r+u),h}}},2188(e){"use strict";function t(e){return(e/8|0)+ +(e%8!=0)}var r={ES256:t(256),ES384:t(384),ES512:t(521)};e.exports=function(e){var t=r[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}},7371(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((s=t.length)!=r.length)return!1;for(i=s;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,n[i]))return!1;for(i=s;0!=i--;){var s,i,n,a=n[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},9344(e,t,r){var s;function i(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,s){i(e,t||{},function(e,t){e?s(e):r(t)})})}s(e,t||{},function(e,s){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,s=!1),r(e,s)})}r(9896),s="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=i,i.sync=function(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709(e,t,r){e.exports=i,i.sync=function(e,t){return n(s.statSync(e),t)};var s=r(9896);function i(e,t,r){s.stat(e,function(e,s){r(e,!e&&n(s,t))})}function n(e,t){var r,s,i,n,a,o,l,u,c;return e.isFile()&&(r=e,s=t,i=r.mode,n=r.uid,a=r.gid,o=void 0!==s.uid?s.uid:process.getuid&&process.getuid(),l=void 0!==s.gid?s.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),i&parseInt("001",8)||i&c&&a===l||i&u&&n===o||i&(u|c)&&0===o)}},8541(e,t,r){e.exports=n,n.sync=function(e,t){return i(s.statSync(e),e,t)};var s=r(9896);function i(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var s=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!s||-1!==(s=s.split(";")).indexOf(""))return!0;for(var i=0;i<s.length;i++){var n=s[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function n(e,t,r){s.stat(e,function(s,n){r(s,!s&&i(n,e,t))})}},205(e){"use strict";var t=e.exports=function(e,r,s){"function"==typeof r&&(s=r,r={});var i="function"==typeof(s=r.cb||s)?s:s.pre||function(){};!function e(r,s,i,n,a,o,l,u,c,d){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var p in s(n,a,o,l,u,c,d),n){var f=n[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var h=0;h<f.length;h++)e(r,s,i,f[h],a+"/"+p+"/"+h,o,a,p,n,h)}else if(p in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)e(r,s,i,f[m],a+"/"+p+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),o,a,p,n,m)}else(p in t.keywords||r.allKeys&&!(p in t.skipKeywords))&&e(r,s,i,f,a+"/"+p,o,a,p,n)}i(n,a,o,l,u,c,d)}}(r,i,s.post||function(){},e,"",e)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},2548(e,t,r){var s=r(3263);e.exports=function(e,t){t=t||{};var r=s.decode(e,t);if(!r)return null;var i=r.payload;if("string"==typeof i)try{var n=JSON.parse(i);null!==n&&"object"==typeof n&&(i=n)}catch(e){}return!0===t.complete?{header:r.header,payload:i,signature:r.signature}:i}},8400(e,t,r){e.exports={decode:r(2548),verify:r(6467),sign:r(9147),JsonWebTokenError:r(1957),NotBeforeError:r(4470),TokenExpiredError:r(7788)}},1957(e){var t=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,e.exports=t},4470(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="NotBeforeError",this.date=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},7788(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},5841(e,t,r){e.exports=r(3895).satisfies(process.version,">=15.7.0")},953(e,t,r){e.exports=r(3895).satisfies(process.version,"^6.12.0 || >=8.0.0")},455(e,t,r){e.exports=r(3895).satisfies(process.version,">=16.9.0")},4559(e,t,r){var s=r(3866);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=s(e);if(void 0===i)return;return Math.floor(r+i/1e3)}if("number"==typeof e)return r+e}},723(e,t,r){let s=r(5841),i=r(455),n={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},a={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let o=n[r];if(!o)throw Error(`Unknown key type "${r}".`);if(!o.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${o.join(", ")}.`);if(s)switch(r){case"ec":let l=t.asymmetricKeyDetails.namedCurve,u=a[e];if(l!==u)throw Error(`"alg" parameter "${e}" requires curve "${u}".`);break;case"rsa-pss":if(i){let r=parseInt(e.slice(-3),10),{hashAlgorithm:s,mgf1HashAlgorithm:i,saltLength:n}=t.asymmetricKeyDetails;if(s!==`sha${r}`||i!==s)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==n&&n>r>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},9147(e,t,r){let s=r(4559),i=r(953),n=r(723),a=r(3263),o=r(5357),l=r(6782),u=r(5250),c=r(8094),d=r(6052),p=r(1251),f=r(8430),{KeyObject:h,createSecretKey:m,createPrivateKey:y}=r(6982),g=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];i&&g.splice(3,0,"PS256","PS384","PS512");let v={expiresIn:{isValid:function(e){return u(e)||p(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||p(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return p(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:o.bind(null,g),message:'"algorithm" must be a valid string enum value'},header:{isValid:d,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},_={iat:{isValid:c,message:'"iat" should be a number of seconds'},exp:{isValid:c,message:'"exp" should be a number of seconds'},nbf:{isValid:c,message:'"nbf" should be a number of seconds'}};function b(e,t,r,s){if(!d(r))throw Error('Expected "'+s+'" to be a plain object.');Object.keys(r).forEach(function(i){let n=e[i];if(!n){if(!t)throw Error('"'+i+'" is not allowed in "'+s+'"');return}if(!n.isValid(r[i]))throw Error(n.message)})}let w={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},$=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,i){var o,l;"function"==typeof r?(i=r,r={}):r=r||{};let u="object"==typeof e&&!Buffer.isBuffer(e),c=Object.assign({alg:r.algorithm||"HS256",typ:u?"JWT":void 0,kid:r.keyid},r.header);function d(e){if(i)return i(e);throw e}if(!t&&"none"!==r.algorithm)return d(Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof h))try{t=y(t)}catch(e){try{t=m("string"==typeof t?Buffer.from(t):t)}catch(e){return d(Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&"secret"!==t.type)return d(Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if("private"!==t.type)return d(Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!r.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return d(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(void 0===e)return d(Error("payload is required"));if(u){try{o=e,b(_,!0,o,"payload")}catch(e){return d(e)}r.mutatePayload||(e=Object.assign({},e))}else{let t=$.filter(function(e){return void 0!==r[e]});if(t.length>0)return d(Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return d(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return d(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{l=r,b(v,!1,l,"options")}catch(e){return d(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{n(c.alg,t)}catch(e){return d(e)}let p=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:u&&(e.iat=p),void 0!==r.notBefore){try{e.nbf=s(r.notBefore,p)}catch(e){return d(e)}if(void 0===e.nbf)return d(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=s(r.expiresIn,p)}catch(e){return d(e)}if(void 0===e.exp)return d(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(w).forEach(function(t){let s=w[t];if(void 0!==r[t]){if(void 0!==e[s])return d(Error('Bad "options.'+t+'" option. The payload already has an "'+s+'" property.'));e[s]=r[t]}});let g=r.encoding||"utf8";if("function"==typeof i)i=i&&f(i),a.createSign({header:c,privateKey:t,payload:e,encoding:g}).once("error",i).once("done",function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&e.length<256)return i(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));i(null,e)});else{let s=a.sign({header:c,payload:e,secret:t,encoding:g});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&s.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return s}}},6467(e,t,r){let s=r(1957),i=r(4470),n=r(7788),a=r(2548),o=r(4559),l=r(723),u=r(953),c=r(3263),{KeyObject:d,createSecretKey:p,createPublicKey:f}=r(6982),h=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],y=["RS256","RS384","RS512"],g=["HS256","HS384","HS512"];u&&(h.splice(h.length,0,"PS256","PS384","PS512"),y.splice(y.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,u){let v,_,b;if("function"!=typeof r||u||(u=r,r={}),r||(r={}),r=Object.assign({},r),v=u||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return v(new s("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return v(new s("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return v(new s("allowInvalidAsymmetricKeyTypes must be a boolean"));let w=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return v(new s("jwt must be provided"));if("string"!=typeof e)return v(new s("jwt must be a string"));let $=e.split(".");if(3!==$.length)return v(new s("jwt malformed"));try{_=a(e,{complete:!0})}catch(e){return v(e)}if(!_)return v(new s("invalid token"));let E=_.header;if("function"==typeof t){if(!u)return v(new s("verify must be called asynchronous if secret or public key is provided as a callback"));b=t}else b=function(e,r){return r(null,t)};return b(E,function(t,a){let u;if(t)return v(new s("error in secret or public key callback: "+t.message));let b=""!==$[2].trim();if(!b&&a)return v(new s("jwt signature is required"));if(b&&!a)return v(new s("secret or public key must be provided"));if(!b&&!r.algorithms)return v(new s('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=a&&!(a instanceof d))try{a=f(a)}catch(e){try{a=p("string"==typeof a?Buffer.from(a):a)}catch(e){return v(new s("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===a.type?r.algorithms=g:["rsa","rsa-pss"].includes(a.asymmetricKeyType)?r.algorithms=y:"ec"===a.asymmetricKeyType?r.algorithms=m:r.algorithms=h),-1===r.algorithms.indexOf(_.header.alg))return v(new s("invalid algorithm"));if(E.alg.startsWith("HS")&&"secret"!==a.type)return v(new s(`secretOrPublicKey must be a symmetric key when using ${E.alg}`));if(/^(?:RS|PS|ES)/.test(E.alg)&&"public"!==a.type)return v(new s(`secretOrPublicKey must be an asymmetric key when using ${E.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{l(E.alg,a)}catch(e){return v(e)}try{u=c.verify(e,_.header.alg,a)}catch(e){return v(e)}if(!u)return v(new s("invalid signature"));let k=_.payload;if(void 0!==k.nbf&&!r.ignoreNotBefore){if("number"!=typeof k.nbf)return v(new s("invalid nbf value"));if(k.nbf>w+(r.clockTolerance||0))return v(new i("jwt not active",new Date(1e3*k.nbf)))}if(void 0!==k.exp&&!r.ignoreExpiration){if("number"!=typeof k.exp)return v(new s("invalid exp value"));if(w>=k.exp+(r.clockTolerance||0))return v(new n("jwt expired",new Date(1e3*k.exp)))}if(r.audience){let e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(k.aud)?k.aud:[k.aud]).some(function(t){return e.some(function(e){return e instanceof RegExp?e.test(t):e===t})}))return v(new s("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&k.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(k.iss)))return v(new s("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&k.sub!==r.subject)return v(new s("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&k.jti!==r.jwtid)return v(new s("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&k.nonce!==r.nonce)return v(new s("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof k.iat)return v(new s("iat required when maxAge is specified"));let e=o(r.maxAge,k.iat);if(void 0===e)return v(new s('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(w>=e+(r.clockTolerance||0))return v(new n("maxAge exceeded",new Date(1e3*e)))}return!0===r.complete?v(null,{header:E,payload:k,signature:_.signature}):v(null,k)})}},2357(e,t,r){var s,i=r(6608).Buffer,n=r(6982),a=r(9053),o=r(9023),l="secret must be a string or buffer",u="key must be a string or a buffer",c="function"==typeof n.createPublicKey;function d(e){if(!i.isBuffer(e)&&"string"!=typeof e&&(!c||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw m(u)}function p(e){if(!i.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function f(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var t=[].slice.call(arguments,1);return TypeError(o.format.bind(o,e).apply(null,t))}function y(e){var t;return t=e,i.isBuffer(t)||"string"==typeof t||(e=JSON.stringify(e)),e}function g(e){return function(t,r){!function(e){if(!i.isBuffer(e)){if("string"!=typeof e){if(!c||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw m(l)}}}(r),t=y(t);var s=n.createHmac("sha"+e,r);return f((s.update(t),s.digest("base64")))}}c&&(u+=" or a KeyObject",l+="or a KeyObject");var v="timingSafeEqual"in n?function(e,t){return e.byteLength===t.byteLength&&n.timingSafeEqual(e,t)}:function(e,t){return s||(s=r(9454)),s(e,t)};function _(e){return function(t,r,s){var n=g(e)(t,s);return v(i.from(r),i.from(n))}}function b(e){return function(t,r){p(r),t=y(t);var s=n.createSign("RSA-SHA"+e);return f((s.update(t),s.sign(r,"base64")))}}function w(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=n.createVerify("RSA-SHA"+e);return i.update(t),i.verify(s,r,"base64")}}function $(e){return function(t,r){p(r),t=y(t);var s=n.createSign("RSA-SHA"+e);return f((s.update(t),s.sign({key:r,padding:n.constants.RSA_PKCS1_PSS_PADDING,saltLength:n.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function E(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=n.createVerify("RSA-SHA"+e);return i.update(t),i.verify({key:s,padding:n.constants.RSA_PKCS1_PSS_PADDING,saltLength:n.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function k(e){var t=b(e);return function(){var r=t.apply(null,arguments);return a.derToJose(r,"ES"+e)}}function S(e){var t=w(e);return function(r,s,i){return t(r,s=a.joseToDer(s,"ES"+e).toString("base64"),i)}}function x(){return function(){return""}}function T(){return function(e,t){return""===t}}e.exports=function(e){var t=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!t)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var r=(t[1]||t[3]).toLowerCase(),s=t[2];return{sign:({hs:g,rs:b,ps:$,es:k,none:x})[r](s),verify:({hs:_,rs:w,ps:E,es:S,none:T})[r](s)}}},3263(e,t,r){var s=r(9615),i=r(6747);t.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],t.sign=s.sign,t.verify=i.verify,t.decode=i.decode,t.isValid=i.isValid,t.createSign=function(e){return new s(e)},t.createVerify=function(e){return new i(e)}},6360(e,t,r){var s=r(6608).Buffer,i=r(2203);function n(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=s.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=s.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick((function(){this.emit("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}r(9023).inherits(n,i),n.prototype.write=function(e){this.buffer=s.concat([this.buffer,s.from(e)]),this.emit("data",e)},n.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=n},9615(e,t,r){var s=r(6608).Buffer,i=r(6360),n=r(2357),a=r(2203),o=r(5911),l=r(9023);function u(e,t){return s.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function c(e){var t,r,s,i=e.header,a=e.payload,c=e.secret||e.privateKey,d=e.encoding,p=n(i.alg),f=(t=(t=d)||"utf8",r=u(o(i),"binary"),s=u(o(a),t),l.format("%s.%s",r,s)),h=p.sign(f,c);return l.format("%s.%s",f,h)}function d(e){var t=e.secret;if(t=null==(t=null==t?e.privateKey:t)?e.key:t,!0===/^hs/i.test(e.header.alg)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new i(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}l.inherits(d,a),d.prototype.sign=function(){try{var e=c({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},d.sign=c,e.exports=d},5911(e,t,r){var s=r(181).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||s.isBuffer(e)?e.toString():JSON.stringify(e)}},6747(e,t,r){var s=r(6608).Buffer,i=r(6360),n=r(2357),a=r(2203),o=r(5911),l=r(9023),u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function c(e){var t=e.split(".",1)[0],r=s.from(t,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(r))return r;try{return JSON.parse(r)}catch(e){return}}function d(e){return e.split(".")[2]}function p(e){return u.test(e)&&!!c(e)}function f(e,t,r){if(!t){var s=Error("Missing algorithm parameter for jws.verify");throw s.code="MISSING_ALGORITHM",s}var i=d(e=o(e)),a=e.split(".",2).join(".");return n(t).verify(a,i,r)}function h(e,t){if(t=t||{},!p(e=o(e)))return null;var r,i,n=c(e);if(!n)return null;var a=(r=r||"utf8",i=e.split(".")[1],s.from(i,"base64").toString(r));return("JWT"===n.typ||t.json)&&(a=JSON.parse(a,t.encoding)),{header:n,payload:a,signature:d(e)}}function m(e){var t=(e=e||{}).secret;if(t=null==(t=null==t?e.publicKey:t)?e.key:t,!0===/^hs/i.test(e.algorithm)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new i(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}l.inherits(m,a),m.prototype.verify=function(){try{var e=f(this.signature.buffer,this.algorithm,this.key.buffer),t=h(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},m.decode=h,m.isValid=p,m.verify=f,e.exports=m},5357(e){var t,r,s=1/0,i=0/0,n=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=/^(?:0|[1-9]\d*)$/,c=parseInt;function d(e){return e!=e}var p=Object.prototype,f=p.hasOwnProperty,h=p.toString,m=p.propertyIsEnumerable,y=(t=Object.keys,r=Object,function(e){return t(r(e))}),g=Math.max,v=Array.isArray;function _(e){var t,r,s;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=0x1fffffffffffff&&"[object Function]"!=(s=b(r=e)?h.call(r):"")&&"[object GeneratorFunction]"!=s}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){return!!e&&"object"==typeof e}e.exports=function(e,t,r,$){e=_(e)?e:function(e){return e?function(e,t){for(var r=-1,s=e?e.length:0,i=Array(s);++r<s;)i[r]=t(e[r],r,e);return i}(_(e)?function(e,t){var r,s,i,n,a=v(e)||w(s=r=e)&&_(s)&&f.call(r,"callee")&&(!m.call(r,"callee")||"[object Arguments]"==h.call(r))?function(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s}(e.length,String):[],o=a.length,l=!!o;for(var c in e){f.call(e,c)&&!(l&&("length"==c||(i=c,(n=null==(n=o)?0x1fffffffffffff:n)&&("number"==typeof i||u.test(i))&&i>-1&&i%1==0&&i<n)))&&a.push(c)}return a}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||p))return y(e);var t,r,s=[];for(var i in Object(e))f.call(e,i)&&"constructor"!=i&&s.push(i);return s}(e),function(t){return e[t]}):[]}(e),r=r&&!$?(S=(k=(E=r)?(E=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||w(t)&&"[object Symbol]"==h.call(t))return i;if(b(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=b(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=o.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):a.test(e)?i:+e}(E))===s||E===-s?(E<0?-1:1)*17976931348623157e292:E==E?E:0:0===E?E:0)%1,k==k?S?k-S:k:0):0;var E,k,S,x,T=e.length;return r<0&&(r=g(T+r,0)),"string"==typeof(x=e)||!v(x)&&w(x)&&"[object String]"==h.call(x)?r<=T&&e.indexOf(t,r)>-1:!!T&&function(e,t,r){if(t!=t){for(var s=e.length,i=r+-1;++i<s;)if(d(e[i],i,e))return i;return -1}for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return -1}(e,t,r)>-1}},6782(e){var t=Object.prototype.toString;e.exports=function(e){var r;return!0===e||!1===e||!!(r=e)&&"object"==typeof r&&"[object Boolean]"==t.call(e)}},5250(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p;return"number"==typeof e&&e==(p=(d=(c=e)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=n.test(e);return d||a.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,d==d?p?d-p:d:0)}},8094(e){var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==t.call(e)}},6052(e){var t,r,s=Object.prototype,i=Function.prototype.toString,n=s.hasOwnProperty,a=i.call(Object),o=s.toString,l=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=o.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var r=n.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==a}},1251(e){var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){var s;return"string"==typeof e||!r(e)&&!!(s=e)&&"object"==typeof s&&"[object String]"==t.call(e)}},8430(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p,f,h=2,m=e;if("function"!=typeof m)throw TypeError("Expected a function");return p=(d=(c=h)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=n.test(e);return d||a.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,h=d==d?p?d-p:d:0,function(){return--h>0&&(f=m.apply(this,arguments)),h<=1&&(m=void 0),f}}},3866(e){function t(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var s,i,n,a,o=typeof e;if("string"===o&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*c;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*c;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:break}}}return}if("number"===o&&isFinite(e)){return r.long?(i=Math.abs(s=e))>=864e5?t(s,i,864e5,"day"):i>=36e5?t(s,i,36e5,"hour"):i>=6e4?t(s,i,6e4,"minute"):i>=1e3?t(s,i,1e3,"second"):s+" ms":(a=Math.abs(n=e))>=864e5?Math.round(n/864e5)+"d":a>=36e5?Math.round(n/36e5)+"h":a>=6e4?Math.round(n/6e4)+"m":a>=1e3?Math.round(n/1e3)+"s":n+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9695(e){"use strict";let t=(e={})=>{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},6608(e,t,r){var s=r(181),i=s.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=s:(n(s,t),t.Buffer=a),a.prototype=Object.create(i.prototype),n(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var s=i(e);return void 0!==t?"string"==typeof r?s.fill(t,r):s.fill(t):s.fill(0),s},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return s.SlowBuffer(e)}},8610(e,t,r){"use strict";let s=Symbol("SemVer ANY");class i{static get ANY(){return s}constructor(e,t){if(t=n(t),e instanceof i)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===s?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?a[o.COMPARATORLOOSE]:a[o.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=s}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===s||e===s)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=n(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;let n=r(4621),{safeRe:a,t:o}=r(152),l=r(5461),u=r(674),c=r(2398),d=r(2069)},2069(e,t,r){"use strict";let s=/\s+/g;class i{constructor(e,t){if(t=a(t),e instanceof i)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new i(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(s," "),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){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){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&&m)|(this.options.loose&&y))+":"+e,r=n.get(t);if(r)return r;let s=this.options.loose,i=s?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(i,I(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],h));let a=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>P(e,this.options));s&&(a=a.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",a);let u=new Map;for(let e of a.map(e=>new o(e,this.options))){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return n.set(t,v),v}intersects(e,t){if(!(e instanceof i))throw TypeError("a Range is required");return this.set.some(r=>_(r,t)&&e.set.some(e=>_(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(j(this.set[t],e,this.options))return!0;return!1}}e.exports=i;let n=new(r(2044)),a=r(4621),o=r(8610),l=r(674),u=r(2398),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:h}=r(152),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(5076),g=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,_=(e,t)=>{let r=!0,s=e.slice(),i=s.pop();for(;r&&s.length;)r=s.every(e=>i.intersects(e,t)),i=s.pop();return r},b=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=k(e,t)),l("tildes",e=$(e,t)),l("xrange",e=x(e,t)),l("stars",e=O(e,t)),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,s,i,n)=>{let a;return l("tilde",e,t,r,s,i,n),w(r)?a="":w(s)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?a=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:n?(l("replaceTilde pr",n),a=`>=${r}.${s}.${i}-${n} <${r}.${+s+1}.0-0`):a=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,l("tilde return",a),a})},k=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,n,a)=>{let o;return l("caret",e,t,r,i,n,a),w(r)?o="":w(i)?o=`>=${r}.0.0${s} <${+r+1}.0.0-0`:w(n)?o="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:a?(l("replaceCaret pr",a),o="0"===r?"0"===i?`>=${r}.${i}.${n}-${a} <${r}.${i}.${+n+1}-0`:`>=${r}.${i}.${n}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${n}-${a} <${+r+1}.0.0-0`):(l("no pr"),o="0"===r?"0"===i?`>=${r}.${i}.${n}${s} <${r}.${i}.${+n+1}-0`:`>=${r}.${i}.${n}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${n} <${+r+1}.0.0-0`),l("caret return",o),o})},x=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>T(e,t)).join(" ")),T=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,s,i,n,a,o)=>{l("xRange",e,r,s,i,n,a,o);let u=w(i),c=u||w(n),d=c||w(a);return"="===s&&d&&(s=""),o=t.includePrerelease?"-0":"",u?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&d?(c&&(n=0),a=0,">"===s?(s=">=",c?(i=+i+1,n=0):n=+n+1,a=0):"<="===s&&(s="<",c?i=+i+1:n=+n+1),"<"===s&&(o="-0"),r=`${s+i}.${n}.${a}${o}`):c?r=`>=${i}.0.0${o} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${n}.0${o} <${i}.${+n+1}.0-0`),l("xRange return",r),r})},O=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),P=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),I=e=>(t,r,s,i,n,a,o,l,u,c,d,p)=>(r=w(s)?"":w(i)?`>=${s}.0.0${e?"-0":""}`:w(n)?`>=${s}.${i}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,l=w(u)?"":w(c)?`<${+u+1}.0.0-0`:w(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),j=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){let s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}},2398(e,t,r){"use strict";let s=r(674),{MAX_LENGTH:i,MAX_SAFE_INTEGER:n}=r(5076),{safeRe:a,t:o}=r(152),l=r(4621),{compareIdentifiers:u}=r(9101);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);s("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[o.LOOSE]:a[o.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>n||this.major<0)throw TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=r[5]?r[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(e){if(s("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(s("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(s("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)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,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},5608(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},5461(e,t,r){"use strict";let s=r(8271),i=r(733),n=r(1686),a=r(6479),o=r(7257),l=r(5850);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return i(e,r,u);case">":return n(e,r,u);case">=":return a(e,r,u);case"<":return o(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},7771(e,t,r){"use strict";let s=r(2398),i=r(6802),{safeRe:n,t:a}=r(152);e.exports=(e,t)=>{if(e instanceof s)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let s,i=t.includePrerelease?n[a.COERCERTLFULL]:n[a.COERCERTL];for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?n[a.COERCEFULL]:n[a.COERCE]);if(null===r)return null;let o=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${o}.${l}.${u}${c}${d}`,t)}},8767(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>{let i=new s(e,r),n=new s(t,r);return i.compare(n)||i.compareBuild(n)}},6293(e,t,r){"use strict";let s=r(6958);e.exports=(e,t)=>s(e,t,!0)},6958(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>new s(e,r).compare(new s(t,r))},3086(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,null,!0),i=s(t,null,!0),n=r.compare(i);if(0===n)return null;let a=n>0,o=a?r:i,l=a?i:r,u=!!o.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},8271(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0===s(e,t,r)},1686(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>0},6479(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>=0},3625(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r,i,n)=>{"string"==typeof r&&(n=i,i=r,r=void 0);try{return new s(e instanceof s?e.version:e,r).inc(t,i,n).version}catch(e){return null}}},7257(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>s(e,t,r)},5850(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>=s(e,t,r)},7744(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).major},4812(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).minor},733(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0!==s(e,t,r)},6802(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r=!1)=>{if(e instanceof s)return e;try{return new s(e,t)}catch(e){if(!r)return null;throw e}}},8643(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).patch},9283(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r&&r.prerelease.length?r.prerelease:null}},7032(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(t,e,r)},9839(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(r,e,t))},4056(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>{try{t=new s(t,r)}catch(e){return!1}return t.test(e)}},7697(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(e,r,t))},6807(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r?r.version:null}},3895(e,t,r){"use strict";let s=r(152),i=r(5076),n=r(2398),a=r(9101),o=r(6802),l=r(6807),u=r(5608),c=r(3625),d=r(3086),p=r(7744),f=r(4812),h=r(8643),m=r(9283),y=r(6958),g=r(7032),v=r(6293),_=r(8767),b=r(7697),w=r(9839),$=r(1686),E=r(7257),k=r(8271),S=r(733),x=r(6479),T=r(5850),O=r(5461),P=r(7771),I=r(8610),j=r(2069),N=r(4056),R=r(6613),C=r(7114),A=r(1008),z=r(203),M=r(5372),D=r(4713),L=r(4497),q=r(9272),U=r(3490);e.exports={parse:o,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:v,compareBuild:_,sort:b,rsort:w,gt:$,lt:E,eq:k,neq:S,gte:x,lte:T,cmp:O,coerce:P,Comparator:I,Range:j,satisfies:N,toComparators:R,maxSatisfying:C,minSatisfying:A,minVersion:z,validRange:M,outside:D,gtr:L,ltr:q,intersects:U,simplifyRange:r(4039),subset:r(22),SemVer:n,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},5076(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},674(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},9101(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let s=t.test(e),i=t.test(r);return s&&i&&(e*=1,r*=1),e===r?0:s&&!i?-1:i&&!s?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},2044(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)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)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},4621(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},152(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=r(5076),a=r(674),o=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",n],[f,i]],m=(e,t,r)=>{let s=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),d[e]=i,u[i]=t,c[i]=s,o[i]=new RegExp(t,r?"g":void 0),l[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4497(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,">",r)},3490(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>(e=new s(e,r),t=new s(t,r),e.intersects(t,r))},9272(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,"<",r)},7114(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let n=null,a=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!n||-1===a.compare(e))&&(a=new s(n=e,r))}),n}},1008(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let n=null,a=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!n||1===a.compare(e))&&(a=new s(n=e,r))}),n}},203(e,t,r){"use strict";let s=r(2398),i=r(2069),n=r(1686);e.exports=(e,t)=>{e=new i(e,t);let r=new s("0.0.0");if(e.test(r)||(r=new s("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],a=null;i.forEach(e=>{let t=new s(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||n(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||n(r,a))&&(r=a)}return r&&e.test(r)?r:null}},4713(e,t,r){"use strict";let s=r(2398),i=r(8610),{ANY:n}=i,a=r(2069),o=r(4056),l=r(1686),u=r(7257),c=r(5850),d=r(6479);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new s(e,p),t=new a(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let s=t.set[r],a=null,o=null;if(s.forEach(e=>{e.semver===n&&(e=new i(">=0.0.0")),a=a||e,o=o||e,f(e.semver,a.semver,p)?a=e:m(e.semver,o.semver,p)&&(o=e)}),a.operator===y||a.operator===g||(!o.operator||o.operator===y)&&h(e,o.semver)||o.operator===g&&m(e,o.semver))return!1}return!0}},4039(e,t,r){"use strict";let s=r(4056),i=r(6958);e.exports=(e,t,r)=>{let n=[],a=null,o=null,l=e.sort((e,t)=>i(e,t,r));for(let e of l)s(e,t,r)?(o=e,a||(a=e)):(o&&n.push([a,o]),o=null,a=null);a&&n.push([a,null]);let u=[];for(let[e,t]of n)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},22(e,t,r){"use strict";let s=r(2069),i=r(8610),{ANY:n}=i,a=r(4056),o=r(6958),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,r)=>{let s,i,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===n)if(1===t.length&&t[0].semver===n)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===n)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?i=p(i,t,r):g.add(t.semver);if(g.size>1)return null;if(s&&i&&((c=o(s.semver,i.semver,r))>0||0===c&&(">="!==s.operator||"<="!==i.operator)))return null;for(let e of g){if(s&&!a(e,String(s),r)||i&&!a(e,String(i),r))return null;for(let s of t)if(!a(e,String(s),r))return!1;return!0}let v=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,_=!!s&&!r.includePrerelease&&!!s.semver.prerelease.length&&s.semver;for(let e of(v&&1===v.prerelease.length&&"<"===i.operator&&0===v.prerelease[0]&&(v=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,s){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),">"===e.operator||">="===e.operator){if((f=d(s,e,r))===e&&f!==s)return!1}else if(">="===s.operator&&!a(s.semver,String(e),r))return!1}if(i){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=p(i,e,r))===e&&h!==i)return!1}else if("<="===i.operator&&!a(i.semver,String(e),r))return!1}if(!e.operator&&(i||s)&&0!==c)return!1}return(!s||!m||!!i||0===c)&&(!i||!y||!!s||0===c)&&!_&&!v&&!0},d=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new s(e,r),t=new s(t,r);let i=!1;e:for(let s of e.set){for(let e of t.set){let t=c(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},6613(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>new s(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},5372(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}}},600(e,t,r){"use strict";let s=r(9638);e.exports=(e="")=>{let t=e.match(s);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return"env"===n?i:i?`${n} ${i}`:n}},9638(e){"use strict";e.exports=/^#!(.*)/},1905(e,t,r){let s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=r(6928),n=s?";":":",a=r(9344),o=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),l=(e,t)=>{let r=t.colon||n,i=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=s?a.split(r):[""];return s&&-1!==e.indexOf(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:a}},u=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:s,pathExt:n,pathExtExe:u}=l(e,t),c=[],d=r=>new Promise((n,a)=>{if(r===s.length)return t.all&&c.length?n(c):a(o(e));let l=s[r],u=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(u,e);n(p(!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,r,0))}),p=(e,r,s)=>new Promise((i,o)=>{if(s===n.length)return i(d(r+1));let l=n[s];a(e+l,{pathExt:u},(n,a)=>{if(!n&&a)if(!t.all)return i(e+l);else c.push(e+l);return i(p(e,r,s+1))})});return r?d(0).then(e=>r(null,e),r):d(0)};e.exports=u,u.sync=(e,t)=>{let{pathEnv:r,pathExt:s,pathExtExe:n}=l(e,t=t||{}),u=[];for(let o=0;o<r.length;o++){let l=r[o],c=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<s.length;e++){let r=p+s[e];try{if(a.sync(r,{pathExt:n}))if(!t.all)return r;else u.push(r)}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw o(e)}},181(e){"use strict";e.exports=require("buffer")},5317(e){"use strict";e.exports=require("child_process")},6982(e){"use strict";e.exports=require("crypto")},9896(e){"use strict";e.exports=require("fs")},7598(e){"use strict";e.exports=require("node:crypto")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2203(e){"use strict";e.exports=require("stream")},9023(e){"use strict";e.exports=require("util")},7980(e,t,r){"use strict";let{normalizeIPv6:s,removeDotSegments:i,recomposeAuthority:n,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:l,reescapeHostDelimiters:u,isIPv4:c,nonSimpleDomain:d}=r(609),{SCHEMES:p,getSchemeHandler:f}=r(4848);function h(e,t,r,s){let n={};return s||(e=b(m(e,r),r),t=b(m(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function m(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),o=[],u=f(s.scheme||r.scheme);u&&u.serialize&&u.serialize(r,s),void 0!==r.path&&(s.skipEscape?r.path=a(r.path):(r.path=l(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==s.reference&&r.scheme&&o.push(r.scheme,":");let c=n(r);if(void 0!==c&&("suffix"!==s.reference&&o.push("//"),o.push(c),r.path&&"/"!==r.path[0]&&o.push("/")),void 0!==r.path){let e=r.path;s.absolutePath||u&&u.absolutePath||(e=i(e)),void 0===c&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}let y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,g=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,v=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function _(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1,a=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);let l=e.match(g);null!==l&&-1!==l[1].indexOf("\\")&&(i.error="URI authority must not contain a literal backslash.",n=!0);let p=e.match(v);if(null!==p){let e=p[1],t=e.replace(/[\t\n\r]/g,"");t.length>=2&&("//"!==t.slice(0,2)?(i.error=i.error||"URI authority must not contain a literal backslash.",n=!0):e.length!==t.length&&(i.error=i.error||"URI authority introducer must not contain whitespace.",n=!0))}let h=e.match(y);if(h){i.scheme=h[1],i.userinfo=h[3],i.host=h[4],i.port=parseInt(h[5],10),i.path=h[6]||"",i.query=h[7],i.fragment=h[8],isNaN(i.port)&&(i.port=h[5]);let t=void 0!==h[2]&&i.path&&"/"!==i.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof i.port&&(i.port<0||i.port>65535)?"URI port is malformed.":void 0;if(void 0!==t&&(i.error=i.error||t,n=!0),i.host)if(!1===c(i.host)){let e=s(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");let l=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&i.host&&(r.domainHost||l&&l.domainHost)&&!1===a&&d(i.host))try{i.host=new URL("http://"+i.host).hostname}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}if((!l||l&&!l.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=u(unescape(i.host),a))),i.path&&(i.path=o(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}l&&l.parse&&l.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:n}}function b(e,t){return _(e,t).parsed}function w(e,t){let{parsed:r,malformedAuthorityOrPort:s}=_(e,t);return{normalized:s?e:m(r,t),malformedAuthorityOrPort:s}}function $(e,t){if("string"==typeof e){let{normalized:r,malformedAuthorityOrPort:s}=w(e,t);return s?void 0:r}if("object"==typeof e)return m(e,t)}let E={SCHEMES:p,normalize:function(e,t){return"string"==typeof e?e=w(e,t).normalized:"object"==typeof e&&(e=b(m(e,t),t)),e},resolve:function(e,t,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:n}=_(e,s),{parsed:a,malformedAuthorityOrPort:o}=_(t,s);if(n||o)throw Error(i.error||a.error||"URI is malformed.");let l=h(i,a,s,!0);return s.skipEscape=!0,m(l,s)},resolveComponent:h,equal:function(e,t,r){let s=$(e,r),i=$(t,r);return void 0!==s&&void 0!==i&&s.toLowerCase()===i.toLowerCase()},serialize:m,parse:b};e.exports=E,e.exports.default=E,e.exports.fastUri=E},4848(e,t,r){"use strict";let{isUUID:s}=r(609),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function a(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function l(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let u={scheme:"http",domainHost:!0,parse:o,serialize:l},c={scheme:"https",domainHost:u.domainHost,parse:o,serialize:l},d={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=a(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(a(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:d.domainHost,parse:d.parse,serialize:d.serialize},f={http:u,https:c,ws:d,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=h(`${s}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),i=h(`${r}:${t.nid||s}`);i&&(e=i.serialize(e,t));let n=e,a=e.nss;return n.path=`${s||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&s(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function h(e){return e&&(f[e]||f[e.toLowerCase()])||void 0}Object.setPrototypeOf(f,null),e.exports={wsIsSecure:a,SCHEMES:f,isValidSchemeName:function(e){return -1!==n.indexOf(e)},getSchemeHandler:h}},609(e){"use strict";let t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),s=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),n=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function a(e){let t="",r=0,s=0;for(s=0;s<e.length;s++)if(48!==(r=e[s].charCodeAt(0))){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s];break}for(s+=1;s<e.length;s++){if(!((r=e[s].charCodeAt(0))>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s]}return t}let o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,r){if(e.length){let s=a(e);if(""===s)return r.error=!0,!1;t.push(s),e.length=0}return!0}function c(e){if(2>function(e,t){let r=0;for(let t=0;t<e.length;t++)":"===e[t]&&r++;return r}(e,":"))return{host:e,isIPV6:!1};let t=function(e){let t=0,r={error:!1,address:"",zone:""},s=[],i=[],n=!1,o=!1,c=u;for(let a=0;a<e.length;a++){let u=e[a];if("["!==u&&"]"!==u)if(":"===u){if(!0===n&&(o=!0),!c(i,s,r))break;if(++t>7){r.error=!0;break}a>0&&":"===e[a-1]&&(n=!0),s.push(":");continue}else if("%"===u){if(!c(i,s,r))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?r.zone=i.join(""):o?s.push(i.join("")):s.push(a(i))),r.address=s.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}let d={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},p=/[@/?#:]/g,f=/[@/?#]/g;function h(e,t){let r=t?f:p;return r.lastIndex=0,e.replace(r,e=>d[e])}e.exports={nonSimpleDomain:o,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let s=unescape(e.host);if(!r(s)){let e=c(s);s=!0===e.isIPV6?`[${e.escapedHost}]`:h(s,!1)}t.push(s)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},reescapeHostDelimiters:h,normalizePercentEncoding:function(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let n=0;n<e.length;n++){if("%"===e[n]&&n+2<e.length){let a=e.slice(n+1,n+3);if(s(a)){let e=a.toUpperCase(),s=String.fromCharCode(parseInt(e,16));t&&i(s)?r+=s:r+="%"+e,n+=2;continue}}r+=e[n]}return r},normalizePathEncoding:function(e){let t="";for(let r=0;r<e.length;r++){if("%"===e[r]&&r+2<e.length){let n=e.slice(r+1,r+3);if(s(n)){let e=n.toUpperCase(),s=String.fromCharCode(parseInt(e,16));"."!==s&&i(s)?t+=s:t+="%"+e,r+=2;continue}}n(e[r])?t+=e[r]:t+=escape(e[r])}return t},escapePreservingEscapes:function(e){let t="";for(let r=0;r<e.length;r++){if("%"===e[r]&&r+2<e.length){let i=e.slice(r+1,r+3);if(s(i)){t+="%"+i.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t},removeDotSegments:function(e){let t=e,r=[],s=-1,i=0;for(;i=t.length;){if(1===i)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===i){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===i&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(s=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,s)),t=t.slice(s)}return r.join("")},isIPv4:r,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:a}},114(e){"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},7456(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},4519(e){"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},8330(e){"use strict";e.exports=JSON.parse('{"name":"xmcp","description":"The MCP framework","version":"0.7.1","author":{"name":"xmcp","email":"support@xmcp.dev","url":"https://xmcp.dev"},"contributors":[{"name":"Valentina Bearzotti","email":"valebearzotti1@gmail.com","url":"https://github.com/valebearzotti"},{"name":"Jose Rago","email":"jose@basement.studio","url":"https://github.com/ragojose"}],"license":"MIT","keywords":["mcp","modelcontextprotocol","http","stdio"],"repository":{"type":"git","url":"https://github.com/basementstudio/xmcp"},"homepage":"https://xmcp.dev","type":"commonjs","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xmcp":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js"},"./host-bridge":{"types":"./dist/host-bridge.d.ts","import":"./dist/host-bridge.js","require":"./dist/host-bridge.js","default":"./dist/host-bridge.js"},"./headers":{"types":"./dist/runtime/headers.d.ts","require":"./dist/runtime/headers.js","default":"./dist/runtime/headers.js"},"./cloudflare":{"types":"./dist/cloudflare.d.ts","import":"./dist/cloudflare.js","require":"./dist/cloudflare.js","default":"./dist/cloudflare.js"},"./package.json":"./package.json"},"typesVersions":{"*":{"host-bridge":["dist/host-bridge.d.ts"],"headers":["dist/runtime/headers.d.ts"],"cloudflare":["dist/cloudflare.d.ts"]}},"files":["dist"],"scripts":{"dev":"cross-env NODE_ENV=development tsx --watch --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","build":"cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","analyze":"cross-env GENERATE_STATS=true pnpm build && pnpm tsx scripts/analyze-rspack-stats.ts","test:config":"node --import tsx --test src/compiler/config/__tests__/*.test.ts","test:adapters":"node --import tsx --test src/runtime/adapters/fastify/__tests__/*.test.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","@rspack/core":"^1.6.7","jose":"^6.1.3","postcss-loader":"^8.2.0","ts-checker-rspack-plugin":"^1.2.1","typescript":"^5.9.3"},"devDependencies":{"@nestjs/common":"^11.1.12","@types/async-retry":"^1.4.9","@types/content-type":"^1.1.9","@types/express":"^5.0.6","@types/fs-extra":"^11.0.4","@types/jsonwebtoken":"^9.0.10","@types/node":"^22.19.2","@types/react":"^19.2.7","@types/react-dom":"^19.2.3","async-retry":"^1.3.3","chalk":"^5.6.2","chokidar":"^3.6.0","ci-info":"^4.3.1","commander":"^11.1.0","content-type":"^1.0.5","cross-env":"^7.0.3","del":"^7.1.0","dotenv":"^16.6.1","express":"^4.22.1","fastify":"^5.0.0","fs-extra":"^11.3.2","glob":"^11.1.0","is-docker":"^4.0.0","is-wsl":"^3.1.0","json5":"^2.2.3","jsonwebtoken":"^9.0.3","memfs":"^4.51.1","raw-body":"^3.0.2","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","tsx":"^4.21.0"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0","zod":"^3.25.76 || ^4.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}}}')}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,s){if(1&s&&(r=this(r)),8&s||"object"==typeof r&&r&&(4&s&&r.__esModule||16&s&&"function"==typeof r.then))return r;var n=Object.create(null);i.r(n);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>{a[e]=()=>r[e]});return a.default=()=>r,i.d(n,a),n},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";let e,t,r;i.r(n),i.d(n,{createHTTPClient:()=>lM,HOST_CONTEXT_CHANGED_METHOD:()=>lY,UPDATE_MODEL_CONTEXT_METHOD:()=>lB,UrlElicitationRequiredError:()=>oy,isEnvHeader:()=>lN,createSTDIOClient:()=>lD,jwtAuthMiddleware:()=>eB,listSTDIOClientTools:()=>lL,createMcpHostBridge:()=>l2,SIZE_CHANGED_METHOD:()=>lQ,INITIALIZE_METHOD:()=>lF,LOG_MESSAGE_METHOD:()=>lW,INITIALIZED_METHOD:()=>lH,OPEN_LINK_METHOD:()=>lG,REQUEST_DISPLAY_MODE_METHOD:()=>lK,disconnectSTDIOClient:()=>lU,RESOURCES_READ_METHOD:()=>lX,createContext:()=>eY,callSTDIOClientTool:()=>lq,headersToRecord:()=>lR,MCP_APPS_PROTOCOL_VERSION:()=>lV,extractToolNamesFromRequest:()=>lZ,UI_MESSAGE_METHOD:()=>lJ,apiKeyAuthMiddleware:()=>eH,completable:()=>e0});var s,a,o,l,u,c,d,p,f,h,m,y,g,v,_=i(8583),b=i.n(_);(s=c||(c={})).assertEqual=e=>{},s.assertIs=function(e){},s.assertNever=function(e){throw Error()},s.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},s.getValidEnumValues=e=>{let t=s.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let s of t)r[s]=e[s];return s.objectValues(r)},s.objectValues=e=>s.objectKeys(e).map(function(t){return e[t]}),s.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},s.find=(e,t)=>{for(let r of e)if(t(r))return r},s.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,s.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},s.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(d||(d={})).mergeShapes=(e,t)=>({...e,...t});let w=c.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=e=>{switch(typeof e){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(e)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":if(Array.isArray(e))return w.array;if(null===e)return w.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return w.promise;if("undefined"!=typeof Map&&e instanceof Map)return w.map;if("undefined"!=typeof Set&&e instanceof Set)return w.set;if("undefined"!=typeof Date&&e instanceof Date)return w.date;return w.object;default:return w.unknown}},E=c.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class k extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},s=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(s);else if("invalid_return_type"===i.code)s(i.returnTypeError);else if("invalid_arguments"===i.code)s(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,s=0;for(;s<i.path.length;){let r=i.path[s];s===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],s++}}};return s(this),r}static assert(e){if(!(e instanceof k))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,c.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t=Object.create(null),r=[];for(let s of this.issues)if(s.path.length>0){let r=s.path[0];t[r]=t[r]||[],t[r].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}k.create=e=>new k(e);let S=(e,t)=>{let r;switch(e.code){case E.invalid_type:r=e.received===w.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,c.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${c.joinValues(e.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${c.joinValues(e.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${c.joinValues(e.options)}, received '${e.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:c.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case E.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case E.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=t.defaultError,c.assertNever(e)}return{message:r}};(a=p||(p={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},a.toString=e=>"string"==typeof e?e:e?.message;let x=e=>{let{data:t,path:r,errorMaps:s,issueData:i}=e,n=[...r,...i.path||[]],a={...i,path:n};if(void 0!==i.message)return{...i,path:n,message:i.message};let o="";for(let e of s.filter(e=>!!e).slice().reverse())o=e(a,{data:t,defaultError:o}).message;return{...i,path:n,message:o}};function T(e,t){let r=x({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,S,void 0].filter(e=>!!e)});e.common.issues.push(r)}class O{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let s of t){if("aborted"===s.status)return P;"dirty"===s.status&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,s=await e.value;r.push({key:t,value:s})}return O.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let s of t){let{key:t,value:i}=s;if("aborted"===t.status||"aborted"===i.status)return P;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||s.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let P=Object.freeze({status:"aborted"}),I=e=>({status:"dirty",value:e}),j=e=>({status:"valid",value:e}),N=e=>"undefined"!=typeof Promise&&e instanceof Promise;class R{constructor(e,t,r,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let C=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new k(e.common.issues);return this._error=t,this._error}}};function A(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:s,description:i}=e;if(t&&(r||s))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:n}=e;return"invalid_enum_value"===t.code?{message:n??i.defaultError}:void 0===i.data?{message:n??s??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:n??r??i.defaultError}},description:i}}class z{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(N(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},s=this._parseSync({data:e,path:r.path,parent:r});return C(r,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},s=this._parse({data:e,path:r.path,parent:r});return C(r,await (N(s)?s:Promise.resolve(s)))}refine(e,t){return this._refinement((r,s)=>{let i=e(r),n=()=>s.addIssue({code:E.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(n(),!1)):!!i||(n(),!1)})}refinement(e,t){return this._refinement((r,s)=>!!e(r)||(s.addIssue("function"==typeof t?t(r,s):t),!1))}_refinement(e){return new eP({schema:this,typeName:f.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eI.create(this,this._def)}nullable(){return ej.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ep.create(this)}promise(){return eO.create(this,this._def)}or(e){return eh.create([this,e],this._def)}and(e){return eg.create(this,e,this._def)}transform(e){return new eP({...A(this._def),schema:this,typeName:f.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eN({...A(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:f.ZodDefault})}brand(){return new eA({typeName:f.ZodBranded,type:this,...A(this._def)})}catch(e){return new eR({...A(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:f.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return ez.create(this,e)}readonly(){return eM.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let M=/^c[^\s-]{8,}$/i,D=/^[0-9a-z]+$/,L=/^[0-9A-HJKMNP-TV-Z]{26}$/i,q=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,U=/^[a-z0-9_-]{21}$/i,Z=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,F=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,K=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,G=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,B=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,J=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,W=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y=RegExp(`^${X}$`);function Q(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class ee extends z{_parse(t){var r,s,i,n;let a;if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==w.string){let e=this._getOrReturnCtx(t);return T(e,{code:E.invalid_type,expected:w.string,received:e.parsedType}),P}let o=new O;for(let l of this._def.checks)if("min"===l.kind)t.data.length<l.value&&(T(a=this._getOrReturnCtx(t,a),{code:E.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)t.data.length>l.value&&(T(a=this._getOrReturnCtx(t,a),{code:E.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let e=t.data.length>l.value,r=t.data.length<l.value;(e||r)&&(a=this._getOrReturnCtx(t,a),e?T(a,{code:E.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&T(a,{code:E.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)F.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"email",code:E.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)e||(e=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),e.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"emoji",code:E.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)q.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"uuid",code:E.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)U.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"nanoid",code:E.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)M.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"cuid",code:E.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)D.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"cuid2",code:E.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)L.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"ulid",code:E.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(t.data)}catch{T(a=this._getOrReturnCtx(t,a),{validation:"url",code:E.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"regex",code:E.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?t.data=t.data.trim():"includes"===l.kind?t.data.includes(l.value,l.position)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?t.data=t.data.toLowerCase():"toUpperCase"===l.kind?t.data=t.data.toUpperCase():"startsWith"===l.kind?t.data.startsWith(l.value)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?t.data.endsWith(l.value)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?(function(e){let t=`${X}T${Q(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(l).test(t.data)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?Y.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${Q(l)}$`).test(t.data)||(T(a=this._getOrReturnCtx(t,a),{code:E.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?V.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"duration",code:E.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(r=t.data,!(("v4"===(s=l.version)||!s)&&H.test(r)||("v6"===s||!s)&&G.test(r))&&1&&(T(a=this._getOrReturnCtx(t,a),{validation:"ip",code:E.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!Z.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(s));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(t.data,l.alg)&&(T(a=this._getOrReturnCtx(t,a),{validation:"jwt",code:E.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(i=t.data,!(("v4"===(n=l.version)||!n)&&K.test(i)||("v6"===n||!n)&&B.test(i))&&1&&(T(a=this._getOrReturnCtx(t,a),{validation:"cidr",code:E.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?J.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"base64",code:E.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?W.test(t.data)||(T(a=this._getOrReturnCtx(t,a),{validation:"base64url",code:E.invalid_string,message:l.message}),o.dirty()):c.assertNever(l);return{status:o.value,value:t.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:E.invalid_string,...p.errToObj(r)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...p.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...p.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...p.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...p.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...p.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...p.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...p.errToObj(t)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ee.create=e=>new ee({checks:[],typeName:f.ZodString,coerce:e?.coerce??!1,...A(e)});class et extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==w.number){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.number,received:t.parsedType}),P}let r=new O;for(let s of this._def.checks)"int"===s.kind?c.isInteger(e.data)||(T(t=this._getOrReturnCtx(e,t),{code:E.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"multipleOf"===s.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,i=r>s?r:s;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(T(t=this._getOrReturnCtx(e,t),{code:E.not_finite,message:s.message}),r.dirty()):c.assertNever(s);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,r,s){return new et({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:p.toString(s)}]})}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&c.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}et.create=e=>new et({checks:[],typeName:f.ZodNumber,coerce:e?.coerce||!1,...A(e)});class er extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==w.bigint)return this._getInvalidInput(e);let r=new O;for(let s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(T(t=this._getOrReturnCtx(e,t),{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):c.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.bigint,received:t.parsedType}),P}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,r,s){return new er({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:p.toString(s)}]})}_addCheck(e){return new er({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}er.create=e=>new er({checks:[],typeName:f.ZodBigInt,coerce:e?.coerce??!1,...A(e)});class es extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.boolean,received:t.parsedType}),P}return j(e.data)}}es.create=e=>new es({typeName:f.ZodBoolean,coerce:e?.coerce||!1,...A(e)});class ei extends z{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.date,received:t.parsedType}),P}if(Number.isNaN(e.data.getTime()))return T(this._getOrReturnCtx(e),{code:E.invalid_date}),P;let r=new O;for(let s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(T(t=this._getOrReturnCtx(e,t),{code:E.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):c.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ei({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ei.create=e=>new ei({checks:[],coerce:e?.coerce||!1,typeName:f.ZodDate,...A(e)});class en extends z{_parse(e){if(this._getType(e)!==w.symbol){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.symbol,received:t.parsedType}),P}return j(e.data)}}en.create=e=>new en({typeName:f.ZodSymbol,...A(e)});class ea extends z{_parse(e){if(this._getType(e)!==w.undefined){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.undefined,received:t.parsedType}),P}return j(e.data)}}ea.create=e=>new ea({typeName:f.ZodUndefined,...A(e)});class eo extends z{_parse(e){if(this._getType(e)!==w.null){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.null,received:t.parsedType}),P}return j(e.data)}}eo.create=e=>new eo({typeName:f.ZodNull,...A(e)});class el extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}}el.create=e=>new el({typeName:f.ZodAny,...A(e)});class eu extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}}eu.create=e=>new eu({typeName:f.ZodUnknown,...A(e)});class ec extends z{_parse(e){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.never,received:t.parsedType}),P}}ec.create=e=>new ec({typeName:f.ZodNever,...A(e)});class ed extends z{_parse(e){if(this._getType(e)!==w.undefined){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.void,received:t.parsedType}),P}return j(e.data)}}ed.create=e=>new ed({typeName:f.ZodVoid,...A(e)});class ep extends z{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),s=this._def;if(t.parsedType!==w.array)return T(t,{code:E.invalid_type,expected:w.array,received:t.parsedType}),P;if(null!==s.exactLength){let e=t.data.length>s.exactLength.value,i=t.data.length<s.exactLength.value;(e||i)&&(T(t,{code:e?E.too_big:E.too_small,minimum:i?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(T(t,{code:E.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(T(t,{code:E.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>s.type._parseAsync(new R(t,e,t.path,r)))).then(e=>O.mergeArray(r,e));let i=[...t.data].map((e,r)=>s.type._parseSync(new R(t,e,t.path,r)));return O.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new ep({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new ep({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new ep({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}}ep.create=(e,t)=>new ep({type:e,minLength:null,maxLength:null,exactLength:null,typeName:f.ZodArray,...A(t)});class ef extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=c.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==w.object){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.object,received:t.parsedType}),P}let{status:t,ctx:r}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),n=[];if(!(this._def.catchall instanceof ec&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||n.push(e);let a=[];for(let e of i){let t=s[e],i=r.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new R(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ec){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of n)a.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)n.length>0&&(T(r,{code:E.unrecognized_keys,keys:n}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of n){let s=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new R(r,s,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let r=await t.key,s=await t.value;e.push({key:r,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>O.mergeObjectSync(t,e)):O.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new ef({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let s=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:p.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ef({...this._def,unknownKeys:"strip"})}passthrough(){return new ef({...this._def,unknownKeys:"passthrough"})}extend(e){return new ef({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ef({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:f.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ef({...this._def,catchall:e})}pick(e){let t={};for(let r of c.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ef({...this._def,shape:()=>t})}omit(e){let t={};for(let r of c.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ef({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ef){let r={};for(let s in t.shape){let i=t.shape[s];r[s]=eI.create(e(i))}return new ef({...t._def,shape:()=>r})}if(t instanceof ep)return new ep({...t._def,type:e(t.element)});if(t instanceof eI)return eI.create(e(t.unwrap()));if(t instanceof ej)return ej.create(e(t.unwrap()));if(t instanceof ev)return ev.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of c.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?t[r]=s:t[r]=s.optional()}return new ef({...this._def,shape:()=>t})}required(e){let t={};for(let r of c.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eI;)e=e._def.innerType;t[r]=e}return new ef({...this._def,shape:()=>t})}keyof(){return eS(c.objectKeys(this.shape))}}ef.create=(e,t)=>new ef({shape:()=>e,unknownKeys:"strip",catchall:ec.create(),typeName:f.ZodObject,...A(t)}),ef.strictCreate=(e,t)=>new ef({shape:()=>e,unknownKeys:"strict",catchall:ec.create(),typeName:f.ZodObject,...A(t)}),ef.lazycreate=(e,t)=>new ef({shape:e,unknownKeys:"strip",catchall:ec.create(),typeName:f.ZodObject,...A(t)});class eh extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new k(e.ctx.common.issues));return T(t,{code:E.invalid_union,unionErrors:r}),P});{let e,s=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},n=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:r}),r.common.issues.length&&s.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=s.map(e=>new k(e));return T(t,{code:E.invalid_union,unionErrors:i}),P}}get options(){return this._def.options}}eh.create=(e,t)=>new eh({options:e,typeName:f.ZodUnion,...A(t)});let em=e=>{if(e instanceof eE)return em(e.schema);if(e instanceof eP)return em(e.innerType());if(e instanceof ek)return[e.value];if(e instanceof ex)return e.options;if(e instanceof eT)return c.objectValues(e.enum);else if(e instanceof eN)return em(e._def.innerType);else if(e instanceof ea)return[void 0];else if(e instanceof eo)return[null];else if(e instanceof eI)return[void 0,...em(e.unwrap())];else if(e instanceof ej)return[null,...em(e.unwrap())];else if(e instanceof eA)return em(e.unwrap());else if(e instanceof eM)return em(e.unwrap());else if(e instanceof eR)return em(e._def.innerType);else return[]};class ey extends z{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.object)return T(t,{code:E.invalid_type,expected:w.object,received:t.parsedType}),P;let r=this.discriminator,s=t.data[r],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(T(t,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let s=new Map;for(let r of t){let t=em(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(s.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,r)}}return new ey({typeName:f.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...A(r)})}}class eg extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=(e,s)=>{if("aborted"===e.status||"aborted"===s.status)return P;let i=function e(t,r){let s=$(t),i=$(r);if(t===r)return{valid:!0,data:t};if(s===w.object&&i===w.object){let s=c.objectKeys(r),i=c.objectKeys(t).filter(e=>-1!==s.indexOf(e)),n={...t,...r};for(let s of i){let i=e(t[s],r[s]);if(!i.valid)return{valid:!1};n[s]=i.data}return{valid:!0,data:n}}if(s===w.array&&i===w.array){if(t.length!==r.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let n=e(t[i],r[i]);if(!n.valid)return{valid:!1};s.push(n.data)}return{valid:!0,data:s}}if(s===w.date&&i===w.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,s.value);return i.valid?(("dirty"===e.status||"dirty"===s.status)&&t.dirty(),{status:t.value,value:i.data}):(T(r,{code:E.invalid_intersection_types}),P)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}eg.create=(e,t,r)=>new eg({left:e,right:t,typeName:f.ZodIntersection,...A(r)});class ev extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.array)return T(r,{code:E.invalid_type,expected:w.array,received:r.parsedType}),P;if(r.data.length<this._def.items.length)return T(r,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),P;!this._def.rest&&r.data.length>this._def.items.length&&(T(r,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...r.data].map((e,t)=>{let s=this._def.items[t]||this._def.rest;return s?s._parse(new R(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(s).then(e=>O.mergeArray(t,e)):O.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ev({...this._def,rest:e})}}ev.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ev({items:e,typeName:f.ZodTuple,rest:null,...A(t)})};class e_ extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.object)return T(r,{code:E.invalid_type,expected:w.object,received:r.parsedType}),P;let s=[],i=this._def.keyType,n=this._def.valueType;for(let e in r.data)s.push({key:i._parse(new R(r,e,r.path,e)),value:n._parse(new R(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?O.mergeObjectAsync(t,s):O.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,r){return new e_(t instanceof z?{keyType:e,valueType:t,typeName:f.ZodRecord,...A(r)}:{keyType:ee.create(),valueType:e,typeName:f.ZodRecord,...A(t)})}}class eb extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.map)return T(r,{code:E.invalid_type,expected:w.map,received:r.parsedType}),P;let s=this._def.keyType,i=this._def.valueType,n=[...r.data.entries()].map(([e,t],n)=>({key:s._parse(new R(r,e,r.path,[n,"key"])),value:i._parse(new R(r,t,r.path,[n,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of n){let s=await r.key,i=await r.value;if("aborted"===s.status||"aborted"===i.status)return P;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of n){let s=r.key,i=r.value;if("aborted"===s.status||"aborted"===i.status)return P;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}}}}eb.create=(e,t,r)=>new eb({valueType:t,keyType:e,typeName:f.ZodMap,...A(r)});class ew extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.set)return T(r,{code:E.invalid_type,expected:w.set,received:r.parsedType}),P;let s=this._def;null!==s.minSize&&r.data.size<s.minSize.value&&(T(r,{code:E.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&r.data.size>s.maxSize.value&&(T(r,{code:E.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let i=this._def.valueType;function n(e){let r=new Set;for(let s of e){if("aborted"===s.status)return P;"dirty"===s.status&&t.dirty(),r.add(s.value)}return{status:t.value,value:r}}let a=[...r.data.values()].map((e,t)=>i._parse(new R(r,e,r.path,t)));return r.common.async?Promise.all(a).then(e=>n(e)):n(a)}min(e,t){return new ew({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new ew({...this._def,maxSize:{value:e,message:p.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ew.create=(e,t)=>new ew({valueType:e,minSize:null,maxSize:null,typeName:f.ZodSet,...A(t)});class e$ extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.function)return T(t,{code:E.invalid_type,expected:w.function,received:t.parsedType}),P;function r(e,r){return x({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S,S].filter(e=>!!e),issueData:{code:E.invalid_arguments,argumentsError:r}})}function s(e,r){return x({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,S,S].filter(e=>!!e),issueData:{code:E.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},n=t.data;if(this._def.returns instanceof eO){let e=this;return j(async function(...t){let a=new k([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(r(t,e)),a}),l=await Reflect.apply(n,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw a.addIssue(s(l,e)),a})})}{let e=this;return j(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new k([r(t,a.error)]);let o=Reflect.apply(n,this,a.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new k([s(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new e$({...this._def,args:ev.create(e).rest(eu.create())})}returns(e){return new e$({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new e$({args:e||ev.create([]).rest(eu.create()),returns:t||eu.create(),typeName:f.ZodFunction,...A(r)})}}class eE extends z{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eE.create=(e,t)=>new eE({getter:e,typeName:f.ZodLazy,...A(t)});class ek extends z{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return T(t,{received:t.data,code:E.invalid_literal,expected:this._def.value}),P}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eS(e,t){return new ex({values:e,typeName:f.ZodEnum,...A(t)})}ek.create=(e,t)=>new ek({value:e,typeName:f.ZodLiteral,...A(t)});class ex extends z{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return T(t,{expected:c.joinValues(r),received:t.parsedType,code:E.invalid_type}),P}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return T(t,{received:t.data,code:E.invalid_enum_value,options:r}),P}return j(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ex.create(e,{...this._def,...t})}exclude(e,t=this._def){return ex.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ex.create=eS;class eT extends z{_parse(e){let t=c.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==w.string&&r.parsedType!==w.number){let e=c.objectValues(t);return T(r,{expected:c.joinValues(e),received:r.parsedType,code:E.invalid_type}),P}if(this._cache||(this._cache=new Set(c.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=c.objectValues(t);return T(r,{received:r.data,code:E.invalid_enum_value,options:e}),P}return j(e.data)}get enum(){return this._def.values}}eT.create=(e,t)=>new eT({values:e,typeName:f.ZodNativeEnum,...A(t)});class eO extends z{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==w.promise&&!1===t.common.async?(T(t,{code:E.invalid_type,expected:w.promise,received:t.parsedType}),P):j((t.parsedType===w.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eO.create=(e,t)=>new eO({type:e,typeName:f.ZodPromise,...A(t)});class eP extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===f.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:e=>{T(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===s.type){let e=s.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return P;let s=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===s.status?P:"dirty"===s.status||"dirty"===t.value?I(s.value):s});{if("aborted"===t.value)return P;let s=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===s.status?P:"dirty"===s.status||"dirty"===t.value?I(s.value):s}}if("refinement"===s.type){let e=e=>{let t=s.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?P:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===s.status?P:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}}if("transform"===s.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?P:Promise.resolve(s.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return P;let n=s.transform(e.value,i);if(n instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}c.assertNever(s)}}eP.create=(e,t,r)=>new eP({schema:e,typeName:f.ZodEffects,effect:t,...A(r)}),eP.createWithPreprocess=(e,t,r)=>new eP({schema:t,effect:{type:"preprocess",transform:e},typeName:f.ZodEffects,...A(r)});class eI extends z{_parse(e){return this._getType(e)===w.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eI.create=(e,t)=>new eI({innerType:e,typeName:f.ZodOptional,...A(t)});class ej extends z{_parse(e){return this._getType(e)===w.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ej.create=(e,t)=>new ej({innerType:e,typeName:f.ZodNullable,...A(t)});class eN extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===w.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eN.create=(e,t)=>new eN({innerType:e,typeName:f.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...A(t)});class eR extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return N(s)?s.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new k(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new k(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eR.create=(e,t)=>new eR({innerType:e,typeName:f.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...A(t)});class eC extends z{_parse(e){if(this._getType(e)!==w.nan){let t=this._getOrReturnCtx(e);return T(t,{code:E.invalid_type,expected:w.nan,received:t.parsedType}),P}return{status:"valid",value:e.data}}}eC.create=e=>new eC({typeName:f.ZodNaN,...A(e)}),Symbol("zod_brand");class eA extends z{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ez extends z{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?P:"dirty"===e.status?(t.dirty(),I(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?P:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ez({in:e,out:t,typeName:f.ZodPipeline})}}class eM extends z{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return N(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}eM.create=(e,t)=>new eM({innerType:e,typeName:f.ZodReadonly,...A(t)}),ef.lazycreate,(o=f||(f={})).ZodString="ZodString",o.ZodNumber="ZodNumber",o.ZodNaN="ZodNaN",o.ZodBigInt="ZodBigInt",o.ZodBoolean="ZodBoolean",o.ZodDate="ZodDate",o.ZodSymbol="ZodSymbol",o.ZodUndefined="ZodUndefined",o.ZodNull="ZodNull",o.ZodAny="ZodAny",o.ZodUnknown="ZodUnknown",o.ZodNever="ZodNever",o.ZodVoid="ZodVoid",o.ZodArray="ZodArray",o.ZodObject="ZodObject",o.ZodUnion="ZodUnion",o.ZodDiscriminatedUnion="ZodDiscriminatedUnion",o.ZodIntersection="ZodIntersection",o.ZodTuple="ZodTuple",o.ZodRecord="ZodRecord",o.ZodMap="ZodMap",o.ZodSet="ZodSet",o.ZodFunction="ZodFunction",o.ZodLazy="ZodLazy",o.ZodLiteral="ZodLiteral",o.ZodEnum="ZodEnum",o.ZodEffects="ZodEffects",o.ZodNativeEnum="ZodNativeEnum",o.ZodOptional="ZodOptional",o.ZodNullable="ZodNullable",o.ZodDefault="ZodDefault",o.ZodCatch="ZodCatch",o.ZodPromise="ZodPromise",o.ZodBranded="ZodBranded",o.ZodPipeline="ZodPipeline",o.ZodReadonly="ZodReadonly";let eD=ee.create;et.create,eC.create,er.create;let eL=es.create;ei.create,en.create,ea.create,eo.create,el.create,eu.create,ec.create,ed.create,ep.create;let eq=ef.create;ef.strictCreate,eh.create,ey.create,eg.create,ev.create,e_.create,eb.create,ew.create;let eU=e$.create;eE.create,ek.create,ex.create,eT.create;let eZ=eO.create;eP.create,eI.create,ej.create,eP.createWithPreprocess,ez.create;let eV=eq({apiKey:eD().optional(),headerName:eD().optional(),validateApiKey:eU().args(eD()).returns(eZ(eL())).optional()}).strict().refine(e=>void 0!==e.apiKey||void 0!==e.validateApiKey,{message:"Either 'apiKey' or 'validateApiKey' must be provided"}).refine(e=>void 0===e.apiKey||void 0===e.validateApiKey,{message:"'apiKey' and 'validateApiKey' are mutually exclusive - provide only one"}),eF="Unauthorized: Missing or invalid API key";function eH(e){let t=eV.safeParse(e);if(!t.success){let r="apiKey"in e,s="validateApiKey"in e;if(r&&s)throw Error("'apiKey' and 'validateApiKey' are mutually exclusive - provide only one");if(r||s)throw Error(`Invalid configuration: ${t.error.message}`);throw Error("Either 'apiKey' or 'validateApiKey' must be provided")}let r=e.headerName??"x-api-key",s="apiKey"in e?e.apiKey:void 0,i="validateApiKey"in e?e.validateApiKey:void 0;return async(t,n,a)=>{let o=t.header(r);!o||"apiKey"in e&&o!==s||i&&!await i(o)?n.status(401).json({error:eF}):a()}}var eK=i(8400),eG=i.n(eK);function eB(e){return(t,r,s)=>{let i=t.header("Authorization");if(!i||!i.startsWith("Bearer "))return void r.status(401).json({error:"Unauthorized: Missing or malformed Authorization header"});let n=i.slice(7).trim();if(!n)return void r.status(401).json({error:"Unauthorized: Missing access token"});try{let{secret:r,...i}=e;t.user=eG().verify(n,r,i),s()}catch(e){r.status(401).json({error:"Unauthorized: Invalid or expired token"})}}}let eJ=require("async_hooks"),eW=(e,t)=>{globalThis[e]=t},eX=e=>globalThis[e];function eY({name:e}){let t=Symbol.for(`xmcp-context-${e}`),r=Symbol.for(`xmcp-context-${e}-fallback-store`);if(eX(t))return eX(t);let s=new eJ.AsyncLocalStorage,i=globalThis[r]??{current:null};eW(r,i);let n={provider:(e,t)=>(i.current=e,s.run(e,t)),getContext:()=>{let t=s.getStore();if(t)return t;if(i.current)return i.current;throw Error(`getContext() can only be used within the ${e} context.`)},setContext:t=>{let r=s.getStore()??i.current;if(!r)throw Error(`setContext() can only be used within the ${e} context.`);Object.assign(r,t)}};return eW(t,n),n}let eQ=Symbol.for("mcp.completable");function e0(e,t){return Object.defineProperty(e,eQ,{value:{complete:t},enumerable:!1,writable:!1,configurable:!1}),e}(h||(h={})).Completable="McpCompletable";let e1=Object.freeze({status:"aborted"});function e2(e,t,r){function s(r,s){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:s,constr:a,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,s);let i=a.prototype,n=Object.keys(i);for(let e=0;e<n.length;e++){let t=n[e];t in r||(r[t]=i[t].bind(r))}}let i=r?.Parent??Object;class n extends i{}function a(e){var t;let i=r?.Parent?new n:this;for(let r of(s(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))r();return i}return Object.defineProperty(n,"name",{value:e}),Object.defineProperty(a,"init",{value:s}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Symbol("zod_brand");class e9 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e4 extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(m=globalThis).__zod_globalConfig??(m.__zod_globalConfig={});let e6=globalThis.__zod_globalConfig;function e5(e){return e&&Object.assign(e6,e),e6}let e8=/^[cC][0-9a-z]{6,}$/,e3=/^[0-9a-z]+$/,e7=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,te=/^[0-9a-vA-V]{20}$/,tt=/^[A-Za-z0-9]{27}$/,tr=/^[a-zA-Z0-9_-]{21}$/,ts=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ti=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ta=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,to=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,td=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tp=/^[A-Za-z0-9_-]*$/,tf=/^https?$/,th=/^\+[1-9]\d{6,14}$/,tm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ty=RegExp(`^${tm}$`);function tg(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tv=/^-?\d+$/,t_=/^-?\d+(?:\.\d+)?$/,tb=/^(?:true|false)$/i,tw=/^null$/i,t$=/^[^A-Z]*$/,tE=/^[^a-z]*$/;function tk(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function tS(e,t){return"bigint"==typeof t?t.toString():t}function tx(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function tT(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let tO=Symbol("evaluating");function tP(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==tO)return void 0===s&&(s=tO,s=r()),s},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function tI(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tj(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function tN(e){return JSON.stringify(e)}let tR="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tC(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let tA=tx(()=>{if(e6.jitless||"undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function tz(e){if(!1===tC(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==tC(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function tM(e){return tz(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let tD=new Set(["string","number","symbol"]);function tL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tq(e,t,r){let s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function tU(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let tZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tV(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function tF(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function tH(e){return"string"==typeof e?e:e?.message}function tK(e,t,r){let s=e.message?e.message:tH(e.inst?._zod.def?.error?.(e))??tH(t?.error?.(e))??tH(r.customError?.(e))??tH(r.localeError?.(e))??"Invalid input",{inst:i,continue:n,input:a,...o}=e;return o.path??(o.path=[]),o.message=s,t?.reportInput&&(o.input=a),o}function tG(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function tB(...e){let[t,r,s]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:s}:{...t}}let tJ=e2("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tW={number:"number",bigint:"bigint",object:"date"},tX=e2("$ZodCheckLessThan",(e,t)=>{tJ.init(e,t);let r=tW[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:r,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tY=e2("$ZodCheckGreaterThan",(e,t)=>{tJ.init(e,t);let r=tW[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tQ=e2("$ZodCheckMultipleOf",(e,t)=>{tJ.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let s,i,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0==(i=Math.round(s=r.value/t.value),n=Number.EPSILON*Math.max(Math.abs(s),1),Math.abs(s-i)<n?0:s-i))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),t0=e2("$ZodCheckNumberFormat",(e,t)=>{tJ.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),s=r?"int":"number",[i,n]=tZ[t.format];e._zod.onattach.push(e=>{let s=e._zod.bag;s.format=t.format,s.minimum=i,s.maximum=n,r&&(s.pattern=tv)}),e._zod.check=a=>{let o=a.value;if(r){if(!Number.isInteger(o))return void a.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}))}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>n&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),t1=e2("$ZodCheckMaxLength",(e,t)=>{var r;tJ.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let s=r.value;if(s.length<=t.maximum)return;let i=tG(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),t2=e2("$ZodCheckMinLength",(e,t)=>{var r;tJ.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let s=r.value;if(s.length>=t.minimum)return;let i=tG(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),t9=e2("$ZodCheckLengthEquals",(e,t)=>{var r;tJ.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let s=r.value,i=s.length;if(i===t.length)return;let n=tG(s),a=i>t.length;r.issues.push({origin:n,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),t4=e2("$ZodCheckStringFormat",(e,t)=>{var r,s;tJ.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),t6=e2("$ZodCheckRegex",(e,t)=>{t4.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t5=e2("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=t$),t4.init(e,t)}),t8=e2("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tE),t4.init(e,t)}),t3=e2("$ZodCheckIncludes",(e,t)=>{tJ.init(e,t);let r=tL(t.includes),s=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(s)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),t7=e2("$ZodCheckStartsWith",(e,t)=>{tJ.init(e,t);let r=RegExp(`^${tL(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),re=e2("$ZodCheckEndsWith",(e,t)=>{tJ.init(e,t);let r=RegExp(`.*${tL(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),rt=e2("$ZodCheckOverwrite",(e,t)=>{tJ.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rr{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let rs=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ri=e2("$ZodError",rs),rn=e2("$ZodError",rs,{Parent:Error}),ra=e=>(t,r,s,i)=>{let n=s?{...s,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new e9;if(a.issues.length){let t=new(i?.Err??e)(a.issues.map(e=>tK(e,n,e5())));throw tR(t,i?.callee),t}return a.value},ro=e=>async(t,r,s,i)=>{let n=s?{...s,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(i?.Err??e)(a.issues.map(e=>tK(e,n,e5())));throw tR(t,i?.callee),t}return a.value},rl=e=>(t,r,s)=>{let i=s?{...s,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},i);if(n instanceof Promise)throw new e9;return n.issues.length?{success:!1,error:new(e??ri)(n.issues.map(e=>tK(e,i,e5())))}:{success:!0,data:n.value}},ru=rl(rn),rc=e=>async(t,r,s)=>{let i=s?{...s,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(e=>tK(e,i,e5())))}:{success:!0,data:n.value}},rd=rc(rn),rp={major:4,minor:4,patch:3},rf=e2("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rp;let s=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&s.unshift(e),s))for(let r of t._zod.onattach)r(e);if(0===s.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let s,i=tV(e);for(let n of t){if(n._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}(e)||!n._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,a=n._zod.check(e);if(a instanceof Promise&&r?.async===!1)throw new e9;if(s||a instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await a,e.issues.length!==t&&(i||(i=tV(e,t)))});else{if(e.issues.length===t)continue;i||(i=tV(e,t))}}return s?s.then(()=>e):e},r=(r,i,n)=>{if(tV(r))return r.aborted=!0,r;let a=t(i,s,n);if(a instanceof Promise){if(!1===n.async)throw new e9;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if("backward"===n.direction){let t=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,n)):r(t,i,n)}let a=e._zod.parse(i,n);if(a instanceof Promise){if(!1===n.async)throw new e9;return a.then(e=>t(e,s,n))}return t(a,s,n)}}tP(e,"~standard",()=>({validate:t=>{try{let r=ru(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return rd(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),rh=e2("$ZodString",(e,t)=>{var r;let s;rf.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(s=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${s}$`)),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rm=e2("$ZodStringFormat",(e,t)=>{t4.init(e,t),rh.init(e,t)}),ry=e2("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ti),rm.init(e,t)}),rg=e2("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tn(e))}else t.pattern??(t.pattern=tn());rm.init(e,t)}),rv=e2("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ta),rm.init(e,t)}),r_=e2("$ZodURL",(e,t)=>{rm.init(e,t),e._zod.check=r=>{try{let s=r.value.trim();if(!t.normalize&&t.protocol?.source===tf.source&&!/^https?:\/\//i.test(s))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});let i=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=s;return}catch(s){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),rb=e2("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rm.init(e,t)}),rw=e2("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=tr),rm.init(e,t)}),r$=e2("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=e8),rm.init(e,t)}),rE=e2("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=e3),rm.init(e,t)}),rk=e2("$ZodULID",(e,t)=>{t.pattern??(t.pattern=e7),rm.init(e,t)}),rS=e2("$ZodXID",(e,t)=>{t.pattern??(t.pattern=te),rm.init(e,t)}),rx=e2("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tt),rm.init(e,t)}),rT=e2("$ZodISODateTime",(e,t)=>{let r,s,i;t.pattern??(r=tg({precision:t.precision}),s=["Z"],t.local&&s.push(""),t.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${r}(?:${s.join("|")})`,t.pattern=RegExp(`^${tm}T(?:${i})$`)),rm.init(e,t)}),rO=e2("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ty),rm.init(e,t)}),rP=e2("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${tg(t)}$`)),rm.init(e,t)}),rI=e2("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ts),rm.init(e,t)}),rj=e2("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=to),rm.init(e,t),e._zod.bag.format="ipv4"}),rN=e2("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tl),rm.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),rR=e2("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tu),rm.init(e,t)}),rC=e2("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tc),rm.init(e,t),e._zod.check=r=>{let s=r.value.split("/");try{if(2!==s.length)throw Error();let[e,t]=s;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function rA(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rz=e2("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=td),rm.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rA(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rM=e2("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tp),rm.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!tp.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rA(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rD=e2("$ZodE164",(e,t)=>{t.pattern??(t.pattern=th),rm.init(e,t)}),rL=e2("$ZodJWT",(e,t)=>{rm.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[s]=r;if(!s)return!1;let i=JSON.parse(atob(s));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rq=e2("$ZodNumber",(e,t)=>{rf.init(e,t),e._zod.pattern=e._zod.bag.pattern??t_,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let n="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...n?{received:n}:{}}),r}}),rU=e2("$ZodNumberFormat",(e,t)=>{t0.init(e,t),rq.init(e,t)}),rZ=e2("$ZodBoolean",(e,t)=>{rf.init(e,t),e._zod.pattern=tb,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),rV=e2("$ZodNull",(e,t)=>{rf.init(e,t),e._zod.pattern=tw,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let s=t.value;return null===s||t.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),t}}),rF=e2("$ZodAny",(e,t)=>{rf.init(e,t),e._zod.parse=e=>e}),rH=e2("$ZodUnknown",(e,t)=>{rf.init(e,t),e._zod.parse=e=>e}),rK=e2("$ZodNever",(e,t)=>{rf.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function rG(e,t,r){e.issues.length&&t.issues.push(...tF(r,e.issues)),t.value[r]=e.value}let rB=e2("$ZodArray",(e,t)=>{rf.init(e,t),e._zod.parse=(r,s)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let n=[];for(let e=0;e<i.length;e++){let a=i[e],o=t.element._zod.run({value:a,issues:[]},s);o instanceof Promise?n.push(o.then(t=>rG(t,r,e))):rG(o,r,e)}return n.length?Promise.all(n).then(()=>r):r}});function rJ(e,t,r,s,i,n){let a=r in s;if(e.issues.length){if(i&&n&&!a)return;t.issues.push(...tF(r,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}function rW(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let s=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function rX(e,t,r,s,i,n){let a=[],o=i.keySet,l=i.catchall._zod,u=l.def.type,c="optional"===l.optin,d="optional"===l.optout;for(let i in t){if("__proto__"===i||o.has(i))continue;if("never"===u){a.push(i);continue}let n=l.run({value:t[i],issues:[]},s);n instanceof Promise?e.push(n.then(e=>rJ(e,r,i,t,c,d))):rJ(n,r,i,t,c,d)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length)?Promise.all(e).then(()=>r):r}let rY=e2("$ZodObject",(e,t)=>{let r;rf.init(e,t);let s=Object.getOwnPropertyDescriptor(t,"shape");if(!s?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let i=tx(()=>rW(t));tP(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let s=e[t]._zod;if(s.values)for(let e of(r[t]??(r[t]=new Set),s.values))r[t].add(e)}return r});let n=t.catchall;e._zod.parse=(t,s)=>{r??(r=i.value);let a=t.value;if(!tC(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let o=[],l=r.shape;for(let e of r.keys){let r=l[e],i="optional"===r._zod.optin,n="optional"===r._zod.optout,u=r._zod.run({value:a[e],issues:[]},s);u instanceof Promise?o.push(u.then(r=>rJ(r,t,e,a,i,n))):rJ(u,t,e,a,i,n)}return n?rX(o,a,t,s,i.value,e):o.length?Promise.all(o).then(()=>t):t}}),rQ=e2("$ZodObjectJIT",(e,t)=>{let r,s;rY.init(e,t);let i=e._zod.parse,n=tx(()=>rW(t)),a=!e6.jitless,o=a&&tA.value,l=t.catchall;e._zod.parse=(u,c)=>{s??(s=n.value);let d=u.value;return tC(d)?a&&o&&c?.async===!1&&!0!==c.jitless?(r||(r=(e=>{let t=new rr(["shape","payload","ctx"]),r=n.value,s=e=>{let t=tN(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),a=0;for(let e of r.keys)i[e]=`key_${a++}`;for(let n of(t.write("const newResult = {};"),r.keys)){let r=i[n],a=tN(n),o=e[n],l=o?._zod?.optin==="optional",u=o?._zod?.optout==="optional";t.write(`const ${r} = ${s(n)};`),l&&u?t.write(`
8
8
  if (${r}.issues.length) {
9
9
  if (${a} in input) {
10
10
  payload.issues = payload.issues.concat(${r}.issues.map(iss => ({