metascope 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/.DS_Store +0 -0
  2. package/dist/bin/cli.js +14 -14
  3. package/dist/lib/{chunk-DrSxFLj_.js → _virtual/_rolldown/runtime.js} +1 -1
  4. package/dist/lib/file-matching.js +152 -0
  5. package/dist/lib/index.d.ts +11 -1496
  6. package/dist/lib/index.js +6 -6215
  7. package/dist/lib/log.d.ts +11 -0
  8. package/dist/lib/log.js +20 -0
  9. package/dist/lib/metadata-types.d.ts +151 -0
  10. package/dist/lib/metadata-types.js +30 -0
  11. package/dist/lib/metadata.d.ts +16 -0
  12. package/dist/lib/metadata.js +235 -0
  13. package/dist/lib/package.js +5 -0
  14. package/dist/lib/parsers/configparser-parser.js +43 -0
  15. package/dist/lib/parsers/gemspec-parser.js +256 -0
  16. package/dist/lib/parsers/go-mod-parser.js +153 -0
  17. package/dist/lib/parsers/makefile-config-parser.js +102 -0
  18. package/dist/lib/parsers/properties-parser.js +31 -0
  19. package/dist/lib/parsers/rfc822-header-parser.js +48 -0
  20. package/dist/lib/parsers/setup-py-parser.js +173 -0
  21. package/dist/lib/source.d.ts +17 -0
  22. package/dist/lib/source.js +34 -0
  23. package/dist/lib/sources/arduino-library-properties.d.ts +45 -0
  24. package/dist/lib/sources/arduino-library-properties.js +208 -0
  25. package/dist/lib/sources/cinder-cinderblock-xml.d.ts +21 -0
  26. package/dist/lib/sources/cinder-cinderblock-xml.js +134 -0
  27. package/dist/lib/sources/code-stats.d.ts +14 -0
  28. package/dist/lib/sources/code-stats.js +40 -0
  29. package/dist/lib/sources/codemeta-json.d.ts +117 -0
  30. package/dist/lib/sources/codemeta-json.js +226 -0
  31. package/dist/lib/sources/dependency-updates.d.ts +22 -0
  32. package/dist/lib/sources/dependency-updates.js +132 -0
  33. package/dist/lib/sources/file-stats.d.ts +12 -0
  34. package/dist/lib/sources/file-stats.js +48 -0
  35. package/dist/lib/sources/git-config.d.ts +8 -0
  36. package/dist/lib/sources/git-config.js +21 -0
  37. package/dist/lib/sources/git-stats.d.ts +35 -0
  38. package/dist/lib/sources/git-stats.js +130 -0
  39. package/dist/lib/sources/github.d.ts +94 -0
  40. package/dist/lib/sources/github.js +399 -0
  41. package/dist/lib/sources/go-go-mod.d.ts +19 -0
  42. package/dist/lib/sources/go-go-mod.js +38 -0
  43. package/dist/lib/sources/go-goreleaser-yaml.d.ts +19 -0
  44. package/dist/lib/sources/go-goreleaser-yaml.js +152 -0
  45. package/dist/lib/sources/java-pom-xml.d.ts +52 -0
  46. package/dist/lib/sources/java-pom-xml.js +248 -0
  47. package/dist/lib/sources/license-file.d.ts +10 -0
  48. package/dist/lib/sources/license-file.js +26 -0
  49. package/dist/lib/sources/metadata-file.d.ts +14 -0
  50. package/dist/lib/sources/metadata-file.js +109 -0
  51. package/dist/lib/sources/metascope.d.ts +14 -0
  52. package/dist/lib/sources/metascope.js +35 -0
  53. package/dist/lib/sources/node-npm-registry.d.ts +19 -0
  54. package/dist/lib/sources/node-npm-registry.js +74 -0
  55. package/dist/lib/sources/node-package-json.d.ts +7 -0
  56. package/dist/lib/sources/node-package-json.js +27 -0
  57. package/dist/lib/sources/obsidian-plugin-manifest-json.d.ts +17 -0
  58. package/dist/lib/sources/obsidian-plugin-manifest-json.js +34 -0
  59. package/dist/lib/sources/obsidian-plugin-registry.d.ts +10 -0
  60. package/dist/lib/sources/obsidian-plugin-registry.js +44 -0
  61. package/dist/lib/sources/openframeworks-addon-config-mk.d.ts +17 -0
  62. package/dist/lib/sources/openframeworks-addon-config-mk.js +39 -0
  63. package/dist/lib/sources/openframeworks-install-xml.d.ts +20 -0
  64. package/dist/lib/sources/openframeworks-install-xml.js +153 -0
  65. package/dist/lib/sources/processing-library-properties.d.ts +44 -0
  66. package/dist/lib/sources/processing-library-properties.js +219 -0
  67. package/dist/lib/sources/processing-sketch-properties.d.ts +38 -0
  68. package/dist/lib/sources/processing-sketch-properties.js +185 -0
  69. package/dist/lib/sources/publiccode-yaml.d.ts +73 -0
  70. package/dist/lib/sources/publiccode-yaml.js +256 -0
  71. package/dist/lib/sources/python-pkg-info.d.ts +31 -0
  72. package/dist/lib/sources/python-pkg-info.js +115 -0
  73. package/dist/lib/sources/python-pypi-registry.d.ts +19 -0
  74. package/dist/lib/sources/python-pypi-registry.js +101 -0
  75. package/dist/lib/sources/python-pyproject-toml.d.ts +7 -0
  76. package/dist/lib/sources/python-pyproject-toml.js +30 -0
  77. package/dist/lib/sources/python-setup-cfg.d.ts +28 -0
  78. package/dist/lib/sources/python-setup-cfg.js +106 -0
  79. package/dist/lib/sources/python-setup-py.d.ts +28 -0
  80. package/dist/lib/sources/python-setup-py.js +48 -0
  81. package/dist/lib/sources/readme-file.d.ts +11 -0
  82. package/dist/lib/sources/readme-file.js +55 -0
  83. package/dist/lib/sources/ruby-gemspec.d.ts +44 -0
  84. package/dist/lib/sources/ruby-gemspec.js +62 -0
  85. package/dist/lib/sources/rust-cargo-toml.d.ts +40 -0
  86. package/dist/lib/sources/rust-cargo-toml.js +159 -0
  87. package/dist/lib/sources/xcode-info-plist.d.ts +22 -0
  88. package/dist/lib/sources/xcode-info-plist.js +199 -0
  89. package/dist/lib/sources/xcode-project-pbxproj.d.ts +21 -0
  90. package/dist/lib/sources/xcode-project-pbxproj.js +222 -0
  91. package/dist/lib/templates/codemeta.d.ts +47 -0
  92. package/dist/lib/templates/codemeta.js +494 -0
  93. package/dist/lib/templates/frontmatter.d.ts +87 -0
  94. package/dist/lib/templates/frontmatter.js +111 -0
  95. package/dist/lib/templates/index.d.ts +181 -0
  96. package/dist/lib/templates/index.js +22 -0
  97. package/dist/lib/templates/metadata.d.ts +17 -0
  98. package/dist/lib/templates/metadata.js +35 -0
  99. package/dist/lib/templates/project.d.ts +39 -0
  100. package/dist/lib/templates/project.js +51 -0
  101. package/dist/lib/utilities/codemeta-helpers.d.ts +39 -0
  102. package/dist/lib/utilities/codemeta-helpers.js +83 -0
  103. package/dist/lib/utilities/fetch.js +43 -0
  104. package/dist/lib/utilities/formatting.js +28 -0
  105. package/dist/lib/utilities/license-identification.js +141 -0
  106. package/dist/lib/utilities/schema-primitives.js +47 -0
  107. package/dist/lib/utilities/template-helpers.d.ts +135 -0
  108. package/dist/lib/utilities/template-helpers.js +310 -0
  109. package/dist/lib/utilities/tree-sitter-wasm.js +30 -0
  110. package/package.json +6 -6
  111. package/readme.md +62 -15
package/dist/bin/cli.js CHANGED
@@ -103,7 +103,7 @@ fi
103
103
  `)}`:``;J.fail(Z(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(X).length,Object.keys(X).join(`, `)+Y))}},Q.unknownArguments=function(Y,X,$,ee,te=!0){var ne;let re=L.getInternalMethods().getCommandInstance().getCommands(),ie=[],ae=L.getInternalMethods().getContext();if(Object.keys(Y).forEach(J=>{!specialKeys.includes(J)&&!Object.prototype.hasOwnProperty.call($,J)&&!Object.prototype.hasOwnProperty.call(L.getInternalMethods().getParseContext(),J)&&!Q.isValidAndSomeAliasIsNotNew(J,X)&&ie.push(J)}),te&&(ae.commands.length>0||re.length>0||ee)&&Y._.slice(ae.commands.length).forEach(L=>{re.includes(``+L)||ie.push(``+L)}),te){let J=L.getDemandedCommands()._?.max||0,X=ae.commands.length+J;X<Y._.length&&Y._.slice(X).forEach(L=>{L=String(L),!ae.commands.includes(L)&&!ie.includes(L)&&ie.push(L)})}ie.length&&J.fail(Z(`Unknown argument: %s`,`Unknown arguments: %s`,ie.length,ie.map(L=>L.trim()?L:`"${L}"`).join(`, `)))},Q.unknownCommands=function(Y){let X=L.getInternalMethods().getCommandInstance().getCommands(),Q=[],$=L.getInternalMethods().getContext();return($.commands.length>0||X.length>0)&&Y._.slice($.commands.length).forEach(L=>{X.includes(``+L)||Q.push(``+L)}),Q.length>0?(J.fail(Z(`Unknown command: %s`,`Unknown commands: %s`,Q.length,Q.join(`, `))),!0):!1},Q.isValidAndSomeAliasIsNotNew=function(J,Y){if(!Object.prototype.hasOwnProperty.call(Y,J))return!1;let X=L.parsed.newAliases;return[J,...Y[J]].some(L=>!Object.prototype.hasOwnProperty.call(X,L)||!X[J])},Q.limitedChoices=function(Y){let Z=L.getOptions(),Q={};if(!Object.keys(Z.choices).length)return;Object.keys(Y).forEach(L=>{specialKeys.indexOf(L)===-1&&Object.prototype.hasOwnProperty.call(Z.choices,L)&&[].concat(Y[L]).forEach(J=>{Z.choices[L].indexOf(J)===-1&&J!==void 0&&(Q[L]=(Q[L]||[]).concat(J))})});let $=Object.keys(Q);if(!$.length)return;let ee=X(`Invalid values:`);$.forEach(L=>{ee+=`\n ${X(`Argument: %s, Given: %s, Choices: %s`,L,J.stringifiedValues(Q[L]),J.stringifiedValues(Z.choices[L]))}`}),J.fail(ee)};let $={};Q.implies=function(J,X){argsert(`<string|object> [array|number|string]`,[J,X],arguments.length),typeof J==`object`?Object.keys(J).forEach(L=>{Q.implies(L,J[L])}):(L.global(J),$[J]||($[J]=[]),Array.isArray(X)?X.forEach(L=>Q.implies(J,L)):(assertNotStrictEqual(X,void 0,Y),$[J].push(X)))},Q.getImplied=function(){return $};function ee(L,J){let Y=Number(J);return J=isNaN(Y)?J:Y,typeof J==`number`?J=L._.length>=J:J.match(/^--no-.+/)?(J=J.match(/^--no-(.+)/)[1],J=!Object.prototype.hasOwnProperty.call(L,J)):J=Object.prototype.hasOwnProperty.call(L,J),J}Q.implications=function(L){let Y=[];if(Object.keys($).forEach(J=>{let X=J;($[J]||[]).forEach(J=>{let Z=X,Q=J;Z=ee(L,Z),J=ee(L,J),Z&&!J&&Y.push(` ${X} -> ${Q}`)})}),Y.length){let L=`${X(`Implications failed:`)}\n`;Y.forEach(J=>{L+=J}),J.fail(L)}};let te={};Q.conflicts=function(J,Y){argsert(`<string|object> [array|string]`,[J,Y],arguments.length),typeof J==`object`?Object.keys(J).forEach(L=>{Q.conflicts(L,J[L])}):(L.global(J),te[J]||(te[J]=[]),Array.isArray(Y)?Y.forEach(L=>Q.conflicts(J,L)):te[J].push(Y))},Q.getConflicting=()=>te,Q.conflicting=function(Z){Object.keys(Z).forEach(L=>{te[L]&&te[L].forEach(Y=>{Y&&Z[L]!==void 0&&Z[Y]!==void 0&&J.fail(X(`Arguments %s and %s are mutually exclusive`,L,Y))})}),L.getInternalMethods().getParserConfiguration()[`strip-dashed`]&&Object.keys(te).forEach(L=>{te[L].forEach(Q=>{Q&&Z[Y.Parser.camelCase(L)]!==void 0&&Z[Y.Parser.camelCase(Q)]!==void 0&&J.fail(X(`Arguments %s and %s are mutually exclusive`,L,Q))})})},Q.recommendCommands=function(L,Y){let Z=3;Y=Y.sort((L,J)=>J.length-L.length);let Q=null,$=1/0;for(let J=0,X;(X=Y[J])!==void 0;J++){let J=levenshtein(L,X);J<=3&&J<$&&($=J,Q=X)}Q&&J.fail(X(`Did you mean %s?`,Q))},Q.reset=function(L){return $=objFilter($,J=>!L[J]),te=objFilter(te,J=>!L[J]),Q};let ne=[];return Q.freeze=function(){ne.push({implied:$,conflicting:te})},Q.unfreeze=function(){let L=ne.pop();assertNotStrictEqual(L,void 0,Y),{implied:$,conflicting:te}=L},Q}let previouslyVisitedConfigs=[],shim;function applyExtends(L,J,Y,X){shim=X;let Z={};if(Object.prototype.hasOwnProperty.call(L,`extends`)){if(typeof L.extends!=`string`)return Z;let Q=/\.json|\..*rc$/.test(L.extends),$=null;if(Q)$=getPathToDefaultConfig(J,L.extends);else try{$=import.meta.resolve(L.extends)}catch{return L}checkForCircularExtends($),previouslyVisitedConfigs.push($),Z=Q?JSON.parse(shim.readFileSync($,`utf8`)):X.require(L.extends),delete L.extends,Z=applyExtends(Z,shim.path.dirname($),Y,shim)}return previouslyVisitedConfigs=[],Y?mergeDeep$1(Z,L):Object.assign({},Z,L)}function checkForCircularExtends(L){if(previouslyVisitedConfigs.indexOf(L)>-1)throw new YError(`Circular extended configurations: '${L}'.`)}function getPathToDefaultConfig(L,J){return shim.path.resolve(L,J)}function mergeDeep$1(L,J){let Y={};function X(L){return L&&typeof L==`object`&&!Array.isArray(L)}Object.assign(Y,L);for(let Z of Object.keys(J))X(J[Z])&&X(Y[Z])?Y[Z]=mergeDeep$1(L[Z],J[Z]):Y[Z]=J[Z];return Y}var __classPrivateFieldSet=function(L,J,Y,X,Z){if(X===`m`)throw TypeError(`Private method is not writable`);if(X===`a`&&!Z)throw TypeError(`Private accessor was defined without a setter`);if(typeof J==`function`?L!==J||!Z:!J.has(L))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return X===`a`?Z.call(L,Y):Z?Z.value=Y:J.set(L,Y),Y},__classPrivateFieldGet=function(L,J,Y,X){if(Y===`a`&&!X)throw TypeError(`Private accessor was defined without a getter`);if(typeof J==`function`?L!==J||!X:!J.has(L))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return Y===`m`?X:Y===`a`?X.call(L):X?X.value:J.get(L)},_YargsInstance_command,_YargsInstance_cwd,_YargsInstance_context,_YargsInstance_completion,_YargsInstance_completionCommand,_YargsInstance_defaultShowHiddenOpt,_YargsInstance_exitError,_YargsInstance_detectLocale,_YargsInstance_emittedWarnings,_YargsInstance_exitProcess,_YargsInstance_frozens,_YargsInstance_globalMiddleware,_YargsInstance_groups,_YargsInstance_hasOutput,_YargsInstance_helpOpt,_YargsInstance_isGlobalContext,_YargsInstance_logger,_YargsInstance_output,_YargsInstance_options,_YargsInstance_parentRequire,_YargsInstance_parserConfig,_YargsInstance_parseFn,_YargsInstance_parseContext,_YargsInstance_pkgs,_YargsInstance_preservedGroups,_YargsInstance_processArgs,_YargsInstance_recommendCommands,_YargsInstance_shim,_YargsInstance_strict,_YargsInstance_strictCommands,_YargsInstance_strictOptions,_YargsInstance_usage,_YargsInstance_usageConfig,_YargsInstance_versionOpt,_YargsInstance_validation;function YargsFactory(L){return(J=[],Y=L.process.cwd(),X)=>{let Z=new YargsInstance(J,Y,X,L);return Object.defineProperty(Z,`argv`,{get:()=>Z.parse(),enumerable:!0}),Z.help(),Z.version(),Z}}const kCopyDoubleDash=Symbol(`copyDoubleDash`),kCreateLogger=Symbol(`copyDoubleDash`),kDeleteFromParserHintObject=Symbol(`deleteFromParserHintObject`),kEmitWarning=Symbol(`emitWarning`),kFreeze=Symbol(`freeze`),kGetDollarZero=Symbol(`getDollarZero`),kGetParserConfiguration=Symbol(`getParserConfiguration`),kGetUsageConfiguration=Symbol(`getUsageConfiguration`),kGuessLocale=Symbol(`guessLocale`),kGuessVersion=Symbol(`guessVersion`),kParsePositionalNumbers=Symbol(`parsePositionalNumbers`),kPkgUp=Symbol(`pkgUp`),kPopulateParserHintArray=Symbol(`populateParserHintArray`),kPopulateParserHintSingleValueDictionary=Symbol(`populateParserHintSingleValueDictionary`),kPopulateParserHintArrayDictionary=Symbol(`populateParserHintArrayDictionary`),kPopulateParserHintDictionary=Symbol(`populateParserHintDictionary`),kSanitizeKey=Symbol(`sanitizeKey`),kSetKey=Symbol(`setKey`),kUnfreeze=Symbol(`unfreeze`),kValidateAsync=Symbol(`validateAsync`),kGetCommandInstance=Symbol(`getCommandInstance`),kGetContext=Symbol(`getContext`),kGetHasOutput=Symbol(`getHasOutput`),kGetLoggerInstance=Symbol(`getLoggerInstance`),kGetParseContext=Symbol(`getParseContext`),kGetUsageInstance=Symbol(`getUsageInstance`),kGetValidationInstance=Symbol(`getValidationInstance`),kHasParseCallback=Symbol(`hasParseCallback`),kIsGlobalContext=Symbol(`isGlobalContext`),kPostProcess=Symbol(`postProcess`),kRebase=Symbol(`rebase`),kReset=Symbol(`reset`),kRunYargsParserAndExecuteCommands=Symbol(`runYargsParserAndExecuteCommands`),kRunValidation=Symbol(`runValidation`),kSetHasOutput=Symbol(`setHasOutput`),kTrackManuallySetKeys=Symbol(`kTrackManuallySetKeys`),DEFAULT_LOCALE=`en_US`;var YargsInstance=class{constructor(L=[],J,Y,X){this.customScriptName=!1,this.parsed=!1,_YargsInstance_command.set(this,void 0),_YargsInstance_cwd.set(this,void 0),_YargsInstance_context.set(this,{commands:[],fullCommands:[]}),_YargsInstance_completion.set(this,null),_YargsInstance_completionCommand.set(this,null),_YargsInstance_defaultShowHiddenOpt.set(this,`show-hidden`),_YargsInstance_exitError.set(this,null),_YargsInstance_detectLocale.set(this,!0),_YargsInstance_emittedWarnings.set(this,{}),_YargsInstance_exitProcess.set(this,!0),_YargsInstance_frozens.set(this,[]),_YargsInstance_globalMiddleware.set(this,void 0),_YargsInstance_groups.set(this,{}),_YargsInstance_hasOutput.set(this,!1),_YargsInstance_helpOpt.set(this,null),_YargsInstance_isGlobalContext.set(this,!0),_YargsInstance_logger.set(this,void 0),_YargsInstance_output.set(this,``),_YargsInstance_options.set(this,void 0),_YargsInstance_parentRequire.set(this,void 0),_YargsInstance_parserConfig.set(this,{}),_YargsInstance_parseFn.set(this,null),_YargsInstance_parseContext.set(this,null),_YargsInstance_pkgs.set(this,{}),_YargsInstance_preservedGroups.set(this,{}),_YargsInstance_processArgs.set(this,void 0),_YargsInstance_recommendCommands.set(this,!1),_YargsInstance_shim.set(this,void 0),_YargsInstance_strict.set(this,!1),_YargsInstance_strictCommands.set(this,!1),_YargsInstance_strictOptions.set(this,!1),_YargsInstance_usage.set(this,void 0),_YargsInstance_usageConfig.set(this,{}),_YargsInstance_versionOpt.set(this,null),_YargsInstance_validation.set(this,void 0),__classPrivateFieldSet(this,_YargsInstance_shim,X,`f`),__classPrivateFieldSet(this,_YargsInstance_processArgs,L,`f`),__classPrivateFieldSet(this,_YargsInstance_cwd,J,`f`),__classPrivateFieldSet(this,_YargsInstance_parentRequire,Y,`f`),__classPrivateFieldSet(this,_YargsInstance_globalMiddleware,new GlobalMiddleware(this),`f`),this.$0=this[kGetDollarZero](),this[kReset](),__classPrivateFieldSet(this,_YargsInstance_command,__classPrivateFieldGet(this,_YargsInstance_command,`f`),`f`),__classPrivateFieldSet(this,_YargsInstance_usage,__classPrivateFieldGet(this,_YargsInstance_usage,`f`),`f`),__classPrivateFieldSet(this,_YargsInstance_validation,__classPrivateFieldGet(this,_YargsInstance_validation,`f`),`f`),__classPrivateFieldSet(this,_YargsInstance_options,__classPrivateFieldGet(this,_YargsInstance_options,`f`),`f`),__classPrivateFieldGet(this,_YargsInstance_options,`f`).showHiddenOpt=__classPrivateFieldGet(this,_YargsInstance_defaultShowHiddenOpt,`f`),__classPrivateFieldSet(this,_YargsInstance_logger,this[kCreateLogger](),`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.setLocale(DEFAULT_LOCALE)}addHelpOpt(L,J){let Y=`help`;return argsert(`[string|boolean] [string]`,[L,J],arguments.length),__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)&&(this[kDeleteFromParserHintObject](__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)),__classPrivateFieldSet(this,_YargsInstance_helpOpt,null,`f`)),L===!1&&J===void 0?this:(__classPrivateFieldSet(this,_YargsInstance_helpOpt,typeof L==`string`?L:`help`,`f`),this.boolean(__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)),this.describe(__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`),J||__classPrivateFieldGet(this,_YargsInstance_usage,`f`).deferY18nLookup(`Show help`)),this)}help(L,J){return this.addHelpOpt(L,J)}addShowHiddenOpt(L,J){if(argsert(`[string|boolean] [string]`,[L,J],arguments.length),L===!1&&J===void 0)return this;let Y=typeof L==`string`?L:__classPrivateFieldGet(this,_YargsInstance_defaultShowHiddenOpt,`f`);return this.boolean(Y),this.describe(Y,J||__classPrivateFieldGet(this,_YargsInstance_usage,`f`).deferY18nLookup(`Show hidden options`)),__classPrivateFieldGet(this,_YargsInstance_options,`f`).showHiddenOpt=Y,this}showHidden(L,J){return this.addShowHiddenOpt(L,J)}alias(L,J){return argsert(`<object|string|array> [string|array]`,[L,J],arguments.length),this[kPopulateParserHintArrayDictionary](this.alias.bind(this),`alias`,L,J),this}array(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`array`,L),this[kTrackManuallySetKeys](L),this}boolean(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`boolean`,L),this[kTrackManuallySetKeys](L),this}check(L,J){return argsert(`<function> [boolean]`,[L,J],arguments.length),this.middleware((J,Y)=>maybeAsyncResult(()=>L(J,Y.getOptions()),Y=>(Y?(typeof Y==`string`||Y instanceof Error)&&__classPrivateFieldGet(this,_YargsInstance_usage,`f`).fail(Y.toString(),Y):__classPrivateFieldGet(this,_YargsInstance_usage,`f`).fail(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.__(`Argument check failed: %s`,L.toString())),J),L=>(__classPrivateFieldGet(this,_YargsInstance_usage,`f`).fail(L.message?L.message:L.toString(),L),J)),!1,J),this}choices(L,J){return argsert(`<object|string|array> [string|array]`,[L,J],arguments.length),this[kPopulateParserHintArrayDictionary](this.choices.bind(this),`choices`,L,J),this}coerce(L,J){if(argsert(`<object|string|array> [function]`,[L,J],arguments.length),Array.isArray(L)){if(!J)throw new YError(`coerce callback must be provided`);for(let Y of L)this.coerce(Y,J);return this}else if(typeof L==`object`){for(let J of Object.keys(L))this.coerce(J,L[J]);return this}if(!J)throw new YError(`coerce callback must be provided`);let Y=L;return __classPrivateFieldGet(this,_YargsInstance_options,`f`).key[Y]=!0,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).addCoerceMiddleware((L,X)=>{var Z;let Q=[Y,...X.getAliases()[Y]??[]].filter(J=>Object.prototype.hasOwnProperty.call(L,J));return Q.length===0?L:maybeAsyncResult(()=>J(L[Q[0]]),J=>(Q.forEach(Y=>{L[Y]=J}),L),L=>{throw new YError(L.message)})},Y),this}conflicts(L,J){return argsert(`<string|object> [string|array]`,[L,J],arguments.length),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).conflicts(L,J),this}config(L=`config`,J,Y){return argsert(`[object|string] [string|function] [function]`,[L,J,Y],arguments.length),typeof L==`object`&&!Array.isArray(L)?(L=applyExtends(L,__classPrivateFieldGet(this,_YargsInstance_cwd,`f`),this[kGetParserConfiguration]()[`deep-merge-config`]||!1,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects=(__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects||[]).concat(L),this):(typeof J==`function`&&(Y=J,J=void 0),this.describe(L,J||__classPrivateFieldGet(this,_YargsInstance_usage,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(L)?L:[L]).forEach(L=>{__classPrivateFieldGet(this,_YargsInstance_options,`f`).config[L]=Y||!0}),this)}completion(L,J,Y){return argsert(`[string] [string|boolean|function] [function]`,[L,J,Y],arguments.length),typeof J==`function`&&(Y=J,J=void 0),__classPrivateFieldSet(this,_YargsInstance_completionCommand,L||__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)||`completion`,`f`),!J&&J!==!1&&(J=`generate completion script`),this.command(__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`),J),Y&&__classPrivateFieldGet(this,_YargsInstance_completion,`f`).registerFunction(Y),this}command(L,J,Y,X,Z,Q){return argsert(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[L,J,Y,X,Z,Q],arguments.length),__classPrivateFieldGet(this,_YargsInstance_command,`f`).addHandler(L,J,Y,X,Z,Q),this}commands(L,J,Y,X,Z,Q){return this.command(L,J,Y,X,Z,Q)}commandDir(L,J){argsert(`<string> [object]`,[L,J],arguments.length);let Y=__classPrivateFieldGet(this,_YargsInstance_parentRequire,`f`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).require;return __classPrivateFieldGet(this,_YargsInstance_command,`f`).addDirectory(L,Y,__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getCallerFile(),J),this}count(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`count`,L),this[kTrackManuallySetKeys](L),this}default(L,J,Y){return argsert(`<object|string|array> [*] [string]`,[L,J,Y],arguments.length),Y&&(assertSingleKey(L,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),__classPrivateFieldGet(this,_YargsInstance_options,`f`).defaultDescription[L]=Y),typeof J==`function`&&(assertSingleKey(L,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),__classPrivateFieldGet(this,_YargsInstance_options,`f`).defaultDescription[L]||(__classPrivateFieldGet(this,_YargsInstance_options,`f`).defaultDescription[L]=__classPrivateFieldGet(this,_YargsInstance_usage,`f`).functionDescription(J)),J=J.call()),this[kPopulateParserHintSingleValueDictionary](this.default.bind(this),`default`,L,J),this}defaults(L,J,Y){return this.default(L,J,Y)}demandCommand(L=1,J,Y,X){return argsert(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[L,J,Y,X],arguments.length),typeof J!=`number`&&(Y=J,J=1/0),this.global(`_`,!1),__classPrivateFieldGet(this,_YargsInstance_options,`f`).demandedCommands._={min:L,max:J,minMsg:Y,maxMsg:X},this}demand(L,J,Y){return Array.isArray(J)?(J.forEach(L=>{assertNotStrictEqual(Y,!0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),this.demandOption(L,Y)}),J=1/0):typeof J!=`number`&&(Y=J,J=1/0),typeof L==`number`?(assertNotStrictEqual(Y,!0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),this.demandCommand(L,J,Y,Y)):Array.isArray(L)?L.forEach(L=>{assertNotStrictEqual(Y,!0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),this.demandOption(L,Y)}):typeof Y==`string`?this.demandOption(L,Y):(Y===!0||Y===void 0)&&this.demandOption(L),this}demandOption(L,J){return argsert(`<object|string|array> [string]`,[L,J],arguments.length),this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this),`demandedOptions`,L,J),this}deprecateOption(L,J){return argsert(`<string> [string|boolean]`,[L,J],arguments.length),__classPrivateFieldGet(this,_YargsInstance_options,`f`).deprecatedOptions[L]=J,this}describe(L,J){return argsert(`<object|string|array> [string]`,[L,J],arguments.length),this[kSetKey](L,!0),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).describe(L,J),this}detectLocale(L){return argsert(`<boolean>`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_detectLocale,L,`f`),this}env(L){return argsert(`[string|boolean]`,[L],arguments.length),L===!1?delete __classPrivateFieldGet(this,_YargsInstance_options,`f`).envPrefix:__classPrivateFieldGet(this,_YargsInstance_options,`f`).envPrefix=L||``,this}epilogue(L){return argsert(`<string>`,[L],arguments.length),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).epilog(L),this}epilog(L){return this.epilogue(L)}example(L,J){return argsert(`<string|array> [string]`,[L,J],arguments.length),Array.isArray(L)?L.forEach(L=>this.example(...L)):__classPrivateFieldGet(this,_YargsInstance_usage,`f`).example(L,J),this}exit(L,J){__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`),__classPrivateFieldSet(this,_YargsInstance_exitError,J,`f`),__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.exit(L)}exitProcess(L=!0){return argsert(`[boolean]`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_exitProcess,L,`f`),this}fail(L){if(argsert(`<function|boolean>`,[L],arguments.length),typeof L==`boolean`&&L!==!1)throw new YError(`Invalid first argument. Expected function or boolean 'false'`);return __classPrivateFieldGet(this,_YargsInstance_usage,`f`).failFn(L),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(L,J){return argsert(`<array> [function]`,[L,J],arguments.length),J?__classPrivateFieldGet(this,_YargsInstance_completion,`f`).getCompletion(L,J):new Promise((J,Y)=>{__classPrivateFieldGet(this,_YargsInstance_completion,`f`).getCompletion(L,(L,X)=>{L?Y(L):J(X)})})}getDemandedOptions(){return argsert([],0),__classPrivateFieldGet(this,_YargsInstance_options,`f`).demandedOptions}getDemandedCommands(){return argsert([],0),__classPrivateFieldGet(this,_YargsInstance_options,`f`).demandedCommands}getDeprecatedOptions(){return argsert([],0),__classPrivateFieldGet(this,_YargsInstance_options,`f`).deprecatedOptions}getDetectLocale(){return __classPrivateFieldGet(this,_YargsInstance_detectLocale,`f`)}getExitProcess(){return __classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)}getGroups(){return Object.assign({},__classPrivateFieldGet(this,_YargsInstance_groups,`f`),__classPrivateFieldGet(this,_YargsInstance_preservedGroups,`f`))}getHelp(){if(__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`),!__classPrivateFieldGet(this,_YargsInstance_usage,`f`).hasCachedHelpMessage()){if(!this.parsed){let L=this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this,_YargsInstance_processArgs,`f`),void 0,void 0,0,!0);if(isPromise$1(L))return L.then(()=>__classPrivateFieldGet(this,_YargsInstance_usage,`f`).help())}let L=__classPrivateFieldGet(this,_YargsInstance_command,`f`).runDefaultBuilderOn(this);if(isPromise$1(L))return L.then(()=>__classPrivateFieldGet(this,_YargsInstance_usage,`f`).help())}return Promise.resolve(__classPrivateFieldGet(this,_YargsInstance_usage,`f`).help())}getOptions(){return __classPrivateFieldGet(this,_YargsInstance_options,`f`)}getStrict(){return __classPrivateFieldGet(this,_YargsInstance_strict,`f`)}getStrictCommands(){return __classPrivateFieldGet(this,_YargsInstance_strictCommands,`f`)}getStrictOptions(){return __classPrivateFieldGet(this,_YargsInstance_strictOptions,`f`)}global(L,J){return argsert(`<string|array> [boolean]`,[L,J],arguments.length),L=[].concat(L),J===!1?L.forEach(L=>{__classPrivateFieldGet(this,_YargsInstance_options,`f`).local.includes(L)||__classPrivateFieldGet(this,_YargsInstance_options,`f`).local.push(L)}):__classPrivateFieldGet(this,_YargsInstance_options,`f`).local=__classPrivateFieldGet(this,_YargsInstance_options,`f`).local.filter(J=>L.indexOf(J)===-1),this}group(L,J){argsert(`<string|array> <string>`,[L,J],arguments.length);let Y=__classPrivateFieldGet(this,_YargsInstance_preservedGroups,`f`)[J]||__classPrivateFieldGet(this,_YargsInstance_groups,`f`)[J];__classPrivateFieldGet(this,_YargsInstance_preservedGroups,`f`)[J]&&delete __classPrivateFieldGet(this,_YargsInstance_preservedGroups,`f`)[J];let X={};return __classPrivateFieldGet(this,_YargsInstance_groups,`f`)[J]=(Y||[]).concat(L).filter(L=>X[L]?!1:X[L]=!0),this}hide(L){return argsert(`<string>`,[L],arguments.length),__classPrivateFieldGet(this,_YargsInstance_options,`f`).hiddenOptions.push(L),this}implies(L,J){return argsert(`<string|object> [number|string|array]`,[L,J],arguments.length),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).implies(L,J),this}locale(L){return argsert(`[string]`,[L],arguments.length),L===void 0?(this[kGuessLocale](),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.getLocale()):(__classPrivateFieldSet(this,_YargsInstance_detectLocale,!1,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.setLocale(L),this)}middleware(L,J,Y){return __classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).addMiddleware(L,!!J,Y)}nargs(L,J){return argsert(`<string|object|array> [number]`,[L,J],arguments.length),this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this),`narg`,L,J),this}normalize(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`normalize`,L),this}number(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`number`,L),this[kTrackManuallySetKeys](L),this}option(L,J){if(argsert(`<string|object> [object]`,[L,J],arguments.length),typeof L==`object`)Object.keys(L).forEach(J=>{this.options(J,L[J])});else{typeof J!=`object`&&(J={}),this[kTrackManuallySetKeys](L),__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`)&&(L===`version`||J?.alias===`version`)&&this[kEmitWarning]([`"version" is a reserved word.`,`Please do one of the following:`,'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)",`- Use a different option key`,`https://yargs.js.org/docs/#api-reference-version`].join(`
104
104
  `),void 0,`versionWarning`),__classPrivateFieldGet(this,_YargsInstance_options,`f`).key[L]=!0,J.alias&&this.alias(L,J.alias);let Y=J.deprecate||J.deprecated;Y&&this.deprecateOption(L,Y);let X=J.demand||J.required||J.require;X&&this.demand(L,X),J.demandOption&&this.demandOption(L,typeof J.demandOption==`string`?J.demandOption:void 0),J.conflicts&&this.conflicts(L,J.conflicts),`default`in J&&this.default(L,J.default),J.implies!==void 0&&this.implies(L,J.implies),J.nargs!==void 0&&this.nargs(L,J.nargs),J.config&&this.config(L,J.configParser),J.normalize&&this.normalize(L),J.choices&&this.choices(L,J.choices),J.coerce&&this.coerce(L,J.coerce),J.group&&this.group(L,J.group),(J.boolean||J.type===`boolean`)&&(this.boolean(L),J.alias&&this.boolean(J.alias)),(J.array||J.type===`array`)&&(this.array(L),J.alias&&this.array(J.alias)),(J.number||J.type===`number`)&&(this.number(L),J.alias&&this.number(J.alias)),(J.string||J.type===`string`)&&(this.string(L),J.alias&&this.string(J.alias)),(J.count||J.type===`count`)&&this.count(L),typeof J.global==`boolean`&&this.global(L,J.global),J.defaultDescription&&(__classPrivateFieldGet(this,_YargsInstance_options,`f`).defaultDescription[L]=J.defaultDescription),J.skipValidation&&this.skipValidation(L);let Z=J.describe||J.description||J.desc,Q=__classPrivateFieldGet(this,_YargsInstance_usage,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(Q,L)||typeof Z==`string`)&&this.describe(L,Z),J.hidden&&this.hide(L),J.requiresArg&&this.requiresArg(L)}return this}options(L,J){return this.option(L,J)}parse(L,J,Y){argsert(`[string|array] [function|boolean|object] [function]`,[L,J,Y],arguments.length),this[kFreeze](),L===void 0&&(L=__classPrivateFieldGet(this,_YargsInstance_processArgs,`f`)),typeof J==`object`&&(__classPrivateFieldSet(this,_YargsInstance_parseContext,J,`f`),J=Y),typeof J==`function`&&(__classPrivateFieldSet(this,_YargsInstance_parseFn,J,`f`),J=!1),J||__classPrivateFieldSet(this,_YargsInstance_processArgs,L,`f`),__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)&&__classPrivateFieldSet(this,_YargsInstance_exitProcess,!1,`f`);let X=this[kRunYargsParserAndExecuteCommands](L,!!J),Z=this.parsed;return __classPrivateFieldGet(this,_YargsInstance_completion,`f`).setParsed(this.parsed),isPromise$1(X)?X.then(L=>(__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)&&__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`).call(this,__classPrivateFieldGet(this,_YargsInstance_exitError,`f`),L,__classPrivateFieldGet(this,_YargsInstance_output,`f`)),L)).catch(L=>{throw __classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)&&__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)(L,this.parsed.argv,__classPrivateFieldGet(this,_YargsInstance_output,`f`)),L}).finally(()=>{this[kUnfreeze](),this.parsed=Z}):(__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)&&__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`).call(this,__classPrivateFieldGet(this,_YargsInstance_exitError,`f`),X,__classPrivateFieldGet(this,_YargsInstance_output,`f`)),this[kUnfreeze](),this.parsed=Z,X)}parseAsync(L,J,Y){let X=this.parse(L,J,Y);return isPromise$1(X)?X:Promise.resolve(X)}parseSync(L,J,Y){let X=this.parse(L,J,Y);if(isPromise$1(X))throw new YError(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return X}parserConfiguration(L){return argsert(`<object>`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_parserConfig,L,`f`),this}pkgConf(L,J){argsert(`<string> [string]`,[L,J],arguments.length);let Y=null,X=this[kPkgUp](J||__classPrivateFieldGet(this,_YargsInstance_cwd,`f`));return X[L]&&typeof X[L]==`object`&&(Y=applyExtends(X[L],J||__classPrivateFieldGet(this,_YargsInstance_cwd,`f`),this[kGetParserConfiguration]()[`deep-merge-config`]||!1,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects=(__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects||[]).concat(Y)),this}positional(L,J){argsert(`<string> <object>`,[L,J],arguments.length);let Y=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];J=objFilter(J,(L,J)=>L===`type`&&![`string`,`number`,`boolean`].includes(J)?!1:Y.includes(L));let X=__classPrivateFieldGet(this,_YargsInstance_context,`f`).fullCommands[__classPrivateFieldGet(this,_YargsInstance_context,`f`).fullCommands.length-1],Z=X?__classPrivateFieldGet(this,_YargsInstance_command,`f`).cmdToParseOptions(X):{array:[],alias:{},default:{},demand:{}};return objectKeys(Z).forEach(Y=>{let X=Z[Y];Array.isArray(X)?X.indexOf(L)!==-1&&(J[Y]=!0):X[L]&&!(Y in J)&&(J[Y]=X[L])}),this.group(L,__classPrivateFieldGet(this,_YargsInstance_usage,`f`).getPositionalGroupName()),this.option(L,J)}recommendCommands(L=!0){return argsert(`[boolean]`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_recommendCommands,L,`f`),this}required(L,J,Y){return this.demand(L,J,Y)}require(L,J,Y){return this.demand(L,J,Y)}requiresArg(L){return argsert(`<array|string|object> [number]`,[L],arguments.length),typeof L==`string`&&__classPrivateFieldGet(this,_YargsInstance_options,`f`).narg[L]||this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this),`narg`,L,NaN),this}showCompletionScript(L,J){return argsert(`[string] [string]`,[L,J],arguments.length),L||=this.$0,__classPrivateFieldGet(this,_YargsInstance_logger,`f`).log(__classPrivateFieldGet(this,_YargsInstance_completion,`f`).generateCompletionScript(L,J||__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)||`completion`)),this}showHelp(L){if(argsert(`[string|function]`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`),!__classPrivateFieldGet(this,_YargsInstance_usage,`f`).hasCachedHelpMessage()){if(!this.parsed){let J=this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet(this,_YargsInstance_processArgs,`f`),void 0,void 0,0,!0);if(isPromise$1(J))return J.then(()=>{__classPrivateFieldGet(this,_YargsInstance_usage,`f`).showHelp(L)}),this}let J=__classPrivateFieldGet(this,_YargsInstance_command,`f`).runDefaultBuilderOn(this);if(isPromise$1(J))return J.then(()=>{__classPrivateFieldGet(this,_YargsInstance_usage,`f`).showHelp(L)}),this}return __classPrivateFieldGet(this,_YargsInstance_usage,`f`).showHelp(L),this}scriptName(L){return this.customScriptName=!0,this.$0=L,this}showHelpOnFail(L,J){return argsert(`[boolean|string] [string]`,[L,J],arguments.length),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).showHelpOnFail(L,J),this}showVersion(L){return argsert(`[string|function]`,[L],arguments.length),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).showVersion(L),this}skipValidation(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`skipValidation`,L),this}strict(L){return argsert(`[boolean]`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_strict,L!==!1,`f`),this}strictCommands(L){return argsert(`[boolean]`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_strictCommands,L!==!1,`f`),this}strictOptions(L){return argsert(`[boolean]`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_strictOptions,L!==!1,`f`),this}string(L){return argsert(`<array|string>`,[L],arguments.length),this[kPopulateParserHintArray](`string`,L),this[kTrackManuallySetKeys](L),this}terminalWidth(){return argsert([],0),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.stdColumns}updateLocale(L){return this.updateStrings(L)}updateStrings(L){return argsert(`<object>`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_detectLocale,!1,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.updateLocale(L),this}usage(L,J,Y,X){if(argsert(`<string|null|undefined> [string|boolean] [function|object] [function]`,[L,J,Y,X],arguments.length),J!==void 0){if(assertNotStrictEqual(L,null,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),(L||``).match(/^\$0( |$)/))return this.command(L,J,Y,X);throw new YError(`.usage() description must start with $0 if being used as alias for .command()`)}else return __classPrivateFieldGet(this,_YargsInstance_usage,`f`).usage(L),this}usageConfiguration(L){return argsert(`<object>`,[L],arguments.length),__classPrivateFieldSet(this,_YargsInstance_usageConfig,L,`f`),this}version(L,J,Y){let X=`version`;if(argsert(`[boolean|string] [string] [string]`,[L,J,Y],arguments.length),__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`)&&(this[kDeleteFromParserHintObject](__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`)),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).version(void 0),__classPrivateFieldSet(this,_YargsInstance_versionOpt,null,`f`)),arguments.length===0)Y=this[kGuessVersion](),L=X;else if(arguments.length===1){if(L===!1)return this;Y=L,L=X}else arguments.length===2&&(Y=J,J=void 0);return __classPrivateFieldSet(this,_YargsInstance_versionOpt,typeof L==`string`?L:X,`f`),J||=__classPrivateFieldGet(this,_YargsInstance_usage,`f`).deferY18nLookup(`Show version number`),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).version(Y||void 0),this.boolean(__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`)),this.describe(__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`),J),this}wrap(L){return argsert(`<number|null|undefined>`,[L],arguments.length),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).wrap(L),this}[(_YargsInstance_command=new WeakMap,_YargsInstance_cwd=new WeakMap,_YargsInstance_context=new WeakMap,_YargsInstance_completion=new WeakMap,_YargsInstance_completionCommand=new WeakMap,_YargsInstance_defaultShowHiddenOpt=new WeakMap,_YargsInstance_exitError=new WeakMap,_YargsInstance_detectLocale=new WeakMap,_YargsInstance_emittedWarnings=new WeakMap,_YargsInstance_exitProcess=new WeakMap,_YargsInstance_frozens=new WeakMap,_YargsInstance_globalMiddleware=new WeakMap,_YargsInstance_groups=new WeakMap,_YargsInstance_hasOutput=new WeakMap,_YargsInstance_helpOpt=new WeakMap,_YargsInstance_isGlobalContext=new WeakMap,_YargsInstance_logger=new WeakMap,_YargsInstance_output=new WeakMap,_YargsInstance_options=new WeakMap,_YargsInstance_parentRequire=new WeakMap,_YargsInstance_parserConfig=new WeakMap,_YargsInstance_parseFn=new WeakMap,_YargsInstance_parseContext=new WeakMap,_YargsInstance_pkgs=new WeakMap,_YargsInstance_preservedGroups=new WeakMap,_YargsInstance_processArgs=new WeakMap,_YargsInstance_recommendCommands=new WeakMap,_YargsInstance_shim=new WeakMap,_YargsInstance_strict=new WeakMap,_YargsInstance_strictCommands=new WeakMap,_YargsInstance_strictOptions=new WeakMap,_YargsInstance_usage=new WeakMap,_YargsInstance_usageConfig=new WeakMap,_YargsInstance_versionOpt=new WeakMap,_YargsInstance_validation=new WeakMap,kCopyDoubleDash)](L){if(!L._||!L[`--`])return L;L._.push.apply(L._,L[`--`]);try{delete L[`--`]}catch{}return L}[kCreateLogger](){return{log:(...L)=>{this[kHasParseCallback]()||console.log(...L),__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`),__classPrivateFieldGet(this,_YargsInstance_output,`f`).length&&__classPrivateFieldSet(this,_YargsInstance_output,__classPrivateFieldGet(this,_YargsInstance_output,`f`)+`
105
105
  `,`f`),__classPrivateFieldSet(this,_YargsInstance_output,__classPrivateFieldGet(this,_YargsInstance_output,`f`)+L.join(` `),`f`)},error:(...L)=>{this[kHasParseCallback]()||console.error(...L),__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`),__classPrivateFieldGet(this,_YargsInstance_output,`f`).length&&__classPrivateFieldSet(this,_YargsInstance_output,__classPrivateFieldGet(this,_YargsInstance_output,`f`)+`
106
- `,`f`),__classPrivateFieldSet(this,_YargsInstance_output,__classPrivateFieldGet(this,_YargsInstance_output,`f`)+L.join(` `),`f`)}}}[kDeleteFromParserHintObject](L){objectKeys(__classPrivateFieldGet(this,_YargsInstance_options,`f`)).forEach(J=>{if((L=>L===`configObjects`)(J))return;let Y=__classPrivateFieldGet(this,_YargsInstance_options,`f`)[J];Array.isArray(Y)?Y.includes(L)&&Y.splice(Y.indexOf(L),1):typeof Y==`object`&&delete Y[L]}),delete __classPrivateFieldGet(this,_YargsInstance_usage,`f`).getDescriptions()[L]}[kEmitWarning](L,J,Y){__classPrivateFieldGet(this,_YargsInstance_emittedWarnings,`f`)[Y]||(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.emitWarning(L,J),__classPrivateFieldGet(this,_YargsInstance_emittedWarnings,`f`)[Y]=!0)}[kFreeze](){__classPrivateFieldGet(this,_YargsInstance_frozens,`f`).push({options:__classPrivateFieldGet(this,_YargsInstance_options,`f`),configObjects:__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects.slice(0),exitProcess:__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`),groups:__classPrivateFieldGet(this,_YargsInstance_groups,`f`),strict:__classPrivateFieldGet(this,_YargsInstance_strict,`f`),strictCommands:__classPrivateFieldGet(this,_YargsInstance_strictCommands,`f`),strictOptions:__classPrivateFieldGet(this,_YargsInstance_strictOptions,`f`),completionCommand:__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`),output:__classPrivateFieldGet(this,_YargsInstance_output,`f`),exitError:__classPrivateFieldGet(this,_YargsInstance_exitError,`f`),hasOutput:__classPrivateFieldGet(this,_YargsInstance_hasOutput,`f`),parsed:this.parsed,parseFn:__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`),parseContext:__classPrivateFieldGet(this,_YargsInstance_parseContext,`f`)}),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).freeze(),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).freeze(),__classPrivateFieldGet(this,_YargsInstance_command,`f`).freeze(),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).freeze()}[kGetDollarZero](){let L=``,J;return J=/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.argv()[0])?__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.argv().slice(1,2):__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.argv().slice(0,1),L=J.map(L=>{let J=this[kRebase](__classPrivateFieldGet(this,_YargsInstance_cwd,`f`),L);return L.match(/^(\/|([a-zA-Z]:)?\\)/)&&J.length<L.length?J:L}).join(` `).trim(),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`_`)&&__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getProcessArgvBin()===__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`_`)&&(L=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`_`).replace(`${__classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.dirname(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.execPath())}/`,``)),L}[kGetParserConfiguration](){return __classPrivateFieldGet(this,_YargsInstance_parserConfig,`f`)}[kGetUsageConfiguration](){return __classPrivateFieldGet(this,_YargsInstance_usageConfig,`f`)}[kGuessLocale](){if(!__classPrivateFieldGet(this,_YargsInstance_detectLocale,`f`))return;let L=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LC_ALL`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LC_MESSAGES`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LANG`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(L.replace(/[.:].*/,``))}[kGuessVersion](){return this[kPkgUp]().version||`unknown`}[kParsePositionalNumbers](L){let J=L[`--`]?L[`--`]:L._;for(let L=0,Y;(Y=J[L])!==void 0;L++)__classPrivateFieldGet(this,_YargsInstance_shim,`f`).Parser.looksLikeNumber(Y)&&Number.isSafeInteger(Math.floor(parseFloat(`${Y}`)))&&(J[L]=Number(Y));return L}[kPkgUp](L){let J=L||`*`;if(__classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J])return __classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J];let Y={};try{let J=L||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).mainFilename;__classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.extname(J)&&(J=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.dirname(J));let X=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).findUp(J,(L,J)=>{if(J.includes(`package.json`))return`package.json`});assertNotStrictEqual(X,void 0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),Y=JSON.parse(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).readFileSync(X,`utf8`))}catch{}return __classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J]=Y||{},__classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J]}[kPopulateParserHintArray](L,J){J=[].concat(J),J.forEach(J=>{J=this[kSanitizeKey](J),__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L].push(J)})}[kPopulateParserHintSingleValueDictionary](L,J,Y,X){this[kPopulateParserHintDictionary](L,J,Y,X,(L,J,Y)=>{__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L][J]=Y})}[kPopulateParserHintArrayDictionary](L,J,Y,X){this[kPopulateParserHintDictionary](L,J,Y,X,(L,J,Y)=>{__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L][J]=(__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L][J]||[]).concat(Y)})}[kPopulateParserHintDictionary](L,J,Y,X,Z){if(Array.isArray(Y))Y.forEach(J=>{L(J,X)});else if((L=>typeof L==`object`)(Y))for(let J of objectKeys(Y))L(J,Y[J]);else Z(J,this[kSanitizeKey](Y),X)}[kSanitizeKey](L){return L===`__proto__`?`___proto___`:L}[kSetKey](L,J){return this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this),`key`,L,J),this}[kUnfreeze](){var L,J,Y,X,Z,Q,$,ee,te,ne,re,ie;let ae=__classPrivateFieldGet(this,_YargsInstance_frozens,`f`).pop();assertNotStrictEqual(ae,void 0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`));let oe;L=this,J=this,Y=this,X=this,Z=this,Q=this,$=this,ee=this,te=this,ne=this,re=this,ie=this,{options:{set value(J){__classPrivateFieldSet(L,_YargsInstance_options,J,`f`)}}.value,configObjects:oe,exitProcess:{set value(L){__classPrivateFieldSet(J,_YargsInstance_exitProcess,L,`f`)}}.value,groups:{set value(L){__classPrivateFieldSet(Y,_YargsInstance_groups,L,`f`)}}.value,output:{set value(L){__classPrivateFieldSet(X,_YargsInstance_output,L,`f`)}}.value,exitError:{set value(L){__classPrivateFieldSet(Z,_YargsInstance_exitError,L,`f`)}}.value,hasOutput:{set value(L){__classPrivateFieldSet(Q,_YargsInstance_hasOutput,L,`f`)}}.value,parsed:this.parsed,strict:{set value(L){__classPrivateFieldSet($,_YargsInstance_strict,L,`f`)}}.value,strictCommands:{set value(L){__classPrivateFieldSet(ee,_YargsInstance_strictCommands,L,`f`)}}.value,strictOptions:{set value(L){__classPrivateFieldSet(te,_YargsInstance_strictOptions,L,`f`)}}.value,completionCommand:{set value(L){__classPrivateFieldSet(ne,_YargsInstance_completionCommand,L,`f`)}}.value,parseFn:{set value(L){__classPrivateFieldSet(re,_YargsInstance_parseFn,L,`f`)}}.value,parseContext:{set value(L){__classPrivateFieldSet(ie,_YargsInstance_parseContext,L,`f`)}}.value}=ae,__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects=oe,__classPrivateFieldGet(this,_YargsInstance_usage,`f`).unfreeze(),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unfreeze(),__classPrivateFieldGet(this,_YargsInstance_command,`f`).unfreeze(),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).unfreeze()}[kValidateAsync](L,J){return maybeAsyncResult(J,J=>(L(J),J))}getInternalMethods(){return{getCommandInstance:this[kGetCommandInstance].bind(this),getContext:this[kGetContext].bind(this),getHasOutput:this[kGetHasOutput].bind(this),getLoggerInstance:this[kGetLoggerInstance].bind(this),getParseContext:this[kGetParseContext].bind(this),getParserConfiguration:this[kGetParserConfiguration].bind(this),getUsageConfiguration:this[kGetUsageConfiguration].bind(this),getUsageInstance:this[kGetUsageInstance].bind(this),getValidationInstance:this[kGetValidationInstance].bind(this),hasParseCallback:this[kHasParseCallback].bind(this),isGlobalContext:this[kIsGlobalContext].bind(this),postProcess:this[kPostProcess].bind(this),reset:this[kReset].bind(this),runValidation:this[kRunValidation].bind(this),runYargsParserAndExecuteCommands:this[kRunYargsParserAndExecuteCommands].bind(this),setHasOutput:this[kSetHasOutput].bind(this)}}[kGetCommandInstance](){return __classPrivateFieldGet(this,_YargsInstance_command,`f`)}[kGetContext](){return __classPrivateFieldGet(this,_YargsInstance_context,`f`)}[kGetHasOutput](){return __classPrivateFieldGet(this,_YargsInstance_hasOutput,`f`)}[kGetLoggerInstance](){return __classPrivateFieldGet(this,_YargsInstance_logger,`f`)}[kGetParseContext](){return __classPrivateFieldGet(this,_YargsInstance_parseContext,`f`)||{}}[kGetUsageInstance](){return __classPrivateFieldGet(this,_YargsInstance_usage,`f`)}[kGetValidationInstance](){return __classPrivateFieldGet(this,_YargsInstance_validation,`f`)}[kHasParseCallback](){return!!__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)}[kIsGlobalContext](){return __classPrivateFieldGet(this,_YargsInstance_isGlobalContext,`f`)}[kPostProcess](L,J,Y,X){return Y||isPromise$1(L)?L:(J||(L=this[kCopyDoubleDash](L)),(this[kGetParserConfiguration]()[`parse-positional-numbers`]||this[kGetParserConfiguration]()[`parse-positional-numbers`]===void 0)&&(L=this[kParsePositionalNumbers](L)),X&&(L=applyMiddleware(L,this,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).getMiddleware(),!1)),L)}[kReset](L={}){__classPrivateFieldSet(this,_YargsInstance_options,__classPrivateFieldGet(this,_YargsInstance_options,`f`)||{},`f`);let J={};J.local=__classPrivateFieldGet(this,_YargsInstance_options,`f`).local||[],J.configObjects=__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects||[];let Y={};return J.local.forEach(J=>{Y[J]=!0,(L[J]||[]).forEach(L=>{Y[L]=!0})}),Object.assign(__classPrivateFieldGet(this,_YargsInstance_preservedGroups,`f`),Object.keys(__classPrivateFieldGet(this,_YargsInstance_groups,`f`)).reduce((L,J)=>{let X=__classPrivateFieldGet(this,_YargsInstance_groups,`f`)[J].filter(L=>!(L in Y));return X.length>0&&(L[J]=X),L},{})),__classPrivateFieldSet(this,_YargsInstance_groups,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(L=>{J[L]=(__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L]||[]).filter(L=>!Y[L])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(L=>{J[L]=objFilter(__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L],L=>!Y[L])}),J.envPrefix=__classPrivateFieldGet(this,_YargsInstance_options,`f`).envPrefix,__classPrivateFieldSet(this,_YargsInstance_options,J,`f`),__classPrivateFieldSet(this,_YargsInstance_usage,__classPrivateFieldGet(this,_YargsInstance_usage,`f`)?__classPrivateFieldGet(this,_YargsInstance_usage,`f`).reset(Y):usage(this,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldSet(this,_YargsInstance_validation,__classPrivateFieldGet(this,_YargsInstance_validation,`f`)?__classPrivateFieldGet(this,_YargsInstance_validation,`f`).reset(Y):validation(this,__classPrivateFieldGet(this,_YargsInstance_usage,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldSet(this,_YargsInstance_command,__classPrivateFieldGet(this,_YargsInstance_command,`f`)?__classPrivateFieldGet(this,_YargsInstance_command,`f`).reset():command(__classPrivateFieldGet(this,_YargsInstance_usage,`f`),__classPrivateFieldGet(this,_YargsInstance_validation,`f`),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldGet(this,_YargsInstance_completion,`f`)||__classPrivateFieldSet(this,_YargsInstance_completion,completion(this,__classPrivateFieldGet(this,_YargsInstance_usage,`f`),__classPrivateFieldGet(this,_YargsInstance_command,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).reset(),__classPrivateFieldSet(this,_YargsInstance_completionCommand,null,`f`),__classPrivateFieldSet(this,_YargsInstance_output,``,`f`),__classPrivateFieldSet(this,_YargsInstance_exitError,null,`f`),__classPrivateFieldSet(this,_YargsInstance_hasOutput,!1,`f`),this.parsed=!1,this}[kRebase](L,J){return __classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.relative(L,J)}[kRunYargsParserAndExecuteCommands](L,J,Y,X=0,Z=!1){var Q,$,ee,te;let ne=!!Y||Z;L||=__classPrivateFieldGet(this,_YargsInstance_processArgs,`f`),__classPrivateFieldGet(this,_YargsInstance_options,`f`).__=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.__,__classPrivateFieldGet(this,_YargsInstance_options,`f`).configuration=this[kGetParserConfiguration]();let re=!!__classPrivateFieldGet(this,_YargsInstance_options,`f`).configuration[`populate--`],ie=Object.assign({},__classPrivateFieldGet(this,_YargsInstance_options,`f`).configuration,{"populate--":!0}),ae=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).Parser.detailed(L,Object.assign({},__classPrivateFieldGet(this,_YargsInstance_options,`f`),{configuration:{"parse-positional-numbers":!1,...ie}})),oe=Object.assign(ae.argv,__classPrivateFieldGet(this,_YargsInstance_parseContext,`f`)),se,ce=ae.aliases,le=!1,ue=!1;Object.keys(oe).forEach(L=>{L===__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)&&oe[L]?le=!0:L===__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`)&&oe[L]&&(ue=!0)}),oe.$0=this.$0,this.parsed=ae,X===0&&__classPrivateFieldGet(this,_YargsInstance_usage,`f`).clearCachedHelpMessage();try{if(this[kGuessLocale](),J)return this[kPostProcess](oe,re,!!Y,!1);__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)&&[__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)].concat(ce[__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)]||[]).filter(L=>L.length>1).includes(``+oe._[oe._.length-1])&&(oe._.pop(),le=!0),__classPrivateFieldSet(this,_YargsInstance_isGlobalContext,!1,`f`);let Q=__classPrivateFieldGet(this,_YargsInstance_command,`f`).getCommands(),$=__classPrivateFieldGet(this,_YargsInstance_completion,`f`)?.completionKey?[__classPrivateFieldGet(this,_YargsInstance_completion,`f`)?.completionKey,...this.getAliases()[__classPrivateFieldGet(this,_YargsInstance_completion,`f`)?.completionKey]??[]].some(L=>Object.prototype.hasOwnProperty.call(oe,L)):!1,ee=le||$||Z;if(oe._.length){if(Q.length){let L;for(let J=X||0,$;oe._[J]!==void 0;J++)if($=String(oe._[J]),Q.includes($)&&$!==__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)){let L=__classPrivateFieldGet(this,_YargsInstance_command,`f`).runCommand($,this,ae,J+1,Z,le||ue||Z);return this[kPostProcess](L,re,!!Y,!1)}else if(!L&&$!==__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)){L=$;break}!__classPrivateFieldGet(this,_YargsInstance_command,`f`).hasDefaultCommand()&&__classPrivateFieldGet(this,_YargsInstance_recommendCommands,`f`)&&L&&!ee&&__classPrivateFieldGet(this,_YargsInstance_validation,`f`).recommendCommands(L,Q)}__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)&&oe._.includes(__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`))&&!$&&(__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),this.showCompletionScript(),this.exit(0))}if(__classPrivateFieldGet(this,_YargsInstance_command,`f`).hasDefaultCommand()&&!ee){let L=__classPrivateFieldGet(this,_YargsInstance_command,`f`).runCommand(null,this,ae,0,Z,le||ue||Z);return this[kPostProcess](L,re,!!Y,!1)}if($){__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),L=[].concat(L);let J=L.slice(L.indexOf(`--${__classPrivateFieldGet(this,_YargsInstance_completion,`f`).completionKey}`)+1);return __classPrivateFieldGet(this,_YargsInstance_completion,`f`).getCompletion(J,(L,J)=>{if(L)throw new YError(L.message);(J||[]).forEach(L=>{__classPrivateFieldGet(this,_YargsInstance_logger,`f`).log(L)}),this.exit(0)}),this[kPostProcess](oe,!re,!!Y,!1)}if(__classPrivateFieldGet(this,_YargsInstance_hasOutput,`f`)||(le?(__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),ne=!0,this.showHelp(L=>{__classPrivateFieldGet(this,_YargsInstance_logger,`f`).log(L),this.exit(0)})):ue&&(__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),ne=!0,__classPrivateFieldGet(this,_YargsInstance_usage,`f`).showVersion(`log`),this.exit(0))),!ne&&__classPrivateFieldGet(this,_YargsInstance_options,`f`).skipValidation.length>0&&(ne=Object.keys(oe).some(L=>__classPrivateFieldGet(this,_YargsInstance_options,`f`).skipValidation.indexOf(L)>=0&&oe[L]===!0)),!ne){if(ae.error)throw new YError(ae.error.message);if(!$){let L=this[kRunValidation](ce,{},ae.error);Y||(se=applyMiddleware(oe,this,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).getMiddleware(),!0)),se=this[kValidateAsync](L,se??oe),isPromise$1(se)&&!Y&&(se=se.then(()=>applyMiddleware(oe,this,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).getMiddleware(),!1)))}}}catch(L){if(L instanceof YError)__classPrivateFieldGet(this,_YargsInstance_usage,`f`).fail(L.message,L);else throw L}return this[kPostProcess](se??oe,re,!!Y,!0)}[kRunValidation](L,J,Y,X){let Z={...this.getDemandedOptions()};return Q=>{if(Y)throw new YError(Y.message);__classPrivateFieldGet(this,_YargsInstance_validation,`f`).nonOptionCount(Q),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).requiredArguments(Q,Z);let $=!1;__classPrivateFieldGet(this,_YargsInstance_strictCommands,`f`)&&($=__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unknownCommands(Q)),__classPrivateFieldGet(this,_YargsInstance_strict,`f`)&&!$?__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unknownArguments(Q,L,J,!!X):__classPrivateFieldGet(this,_YargsInstance_strictOptions,`f`)&&__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unknownArguments(Q,L,{},!1,!1),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).limitedChoices(Q),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).implications(Q),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).conflicting(Q)}}[kSetHasOutput](){__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`)}[kTrackManuallySetKeys](L){if(typeof L==`string`)__classPrivateFieldGet(this,_YargsInstance_options,`f`).key[L]=!0;else for(let J of L)__classPrivateFieldGet(this,_YargsInstance_options,`f`).key[J]=!0}};function isYargsInstance(L){return!!L&&typeof L.getInternalMethods==`function`}const Yargs=YargsFactory(esm_default);var version$1=`0.1.0`,bin={metascope:`dist/bin/cli.js`};function isPlainObject$7(L){if(typeof L!=`object`||!L)return!1;let J=Object.getPrototypeOf(L);return J!==null&&J!==Object.prototype&&Object.getPrototypeOf(J)!==null||Symbol.iterator in L?!1:Symbol.toStringTag in L?Object.prototype.toString.call(L)===`[object Module]`:!0}function _defu(L,J,Y=`.`,X){if(!isPlainObject$7(J))return _defu(L,{},Y,X);let Z=Object.assign({},J);for(let J in L){if(J===`__proto__`||J===`constructor`)continue;let Q=L[J];Q!=null&&(X&&X(Z,J,Q,Y)||(Array.isArray(Q)&&Array.isArray(Z[J])?Z[J]=[...Q,...Z[J]]:isPlainObject$7(Q)&&isPlainObject$7(Z[J])?Z[J]=_defu(Q,Z[J],(Y?`${Y}.`:``)+J.toString(),X):Z[J]=Q))}return Z}function createDefu(L){return(...J)=>J.reduce((J,Y)=>_defu(J,Y,``,L),{})}const defu=createDefu(),defuFn=createDefu((L,J,Y)=>{if(L[J]!==void 0&&typeof Y==`function`)return L[J]=Y(L[J]),!0}),defuArrayFn=createDefu((L,J,Y)=>{if(Array.isArray(L[J])&&typeof Y==`function`)return L[J]=Y(L[J]),!0});let LogLevel=function(L){return L.info=`info`,L.warn=`warn`,L.error=`error`,L.debug=`debug`,L.trace=`trace`,L.fatal=`fatal`,L}({});const LogLevelPriority={[LogLevel.trace]:10,[LogLevel.debug]:20,[LogLevel.info]:30,[LogLevel.warn]:40,[LogLevel.error]:50,[LogLevel.fatal]:60},LogLevelPriorityToNames={10:LogLevel.trace,20:LogLevel.debug,30:LogLevel.info,40:LogLevel.warn,50:LogLevel.error,60:LogLevel.fatal},LAZY_SYMBOL=Symbol.for(`loglayer.lazy`),LAZY_EVAL_ERROR=`[LazyEvalError]`;function isLazy(L){return typeof L==`object`&&!!L&&LAZY_SYMBOL in L}function countLazyValues(L){let J=0;for(let Y of Object.keys(L))isLazy(L[Y])&&J++;return J}function resolveLazyValues(L){let J=!1;for(let Y of Object.keys(L))if(isLazy(L[Y])){J=!0;break}if(!J)return{resolved:L,errors:null};let Y={},X=null;for(let J of Object.keys(L)){let Z=L[J];if(isLazy(Z))try{Y[J]=Z[LAZY_SYMBOL]()}catch(L){Y[J]=LAZY_EVAL_ERROR,X||=[],X.push({key:J,error:L})}else Y[J]=Z}return{resolved:Y,errors:X}}function hasPromiseValues(L){for(let J of Object.keys(L))if(L[J]instanceof Promise)return!0;return!1}function replacePromiseValues(L){let J=null,Y={};for(let X of Object.keys(L))L[X]instanceof Promise?(Y[X]=LAZY_EVAL_ERROR,J||=[],J.push(X)):Y[X]=L[X];return J?{resolved:Y,asyncKeys:J}:{resolved:L,asyncKeys:null}}async function resolvePromiseValues(L){let J=Object.keys(L),Y=await Promise.allSettled(J.map(J=>Promise.resolve(L[J]))),X={},Z=null;for(let L=0;L<J.length;L++){let Q=Y[L];Q.status===`fulfilled`?X[J[L]]=Q.value:(X[J[L]]=LAZY_EVAL_ERROR,Z||=[],Z.push({key:J[L],error:Q.reason}))}return{resolved:X,errors:Z}}let PluginCallbackType=function(L){return L.transformLogLevel=`transformLogLevel`,L.onBeforeDataOut=`onBeforeDataOut`,L.shouldSendToLogger=`shouldSendToLogger`,L.onMetadataCalled=`onMetadataCalled`,L.onBeforeMessageOut=`onBeforeMessageOut`,L.onContextCalled=`onContextCalled`,L}({});var DefaultContextManager=class L{context={};hasContext=!1;setContext(L){if(!L){this.context={},this.hasContext=!1;return}this.context=L,this.hasContext=!0}appendContext(L){this.context={...this.context,...L},this.hasContext=!0}getContext(){return this.context}hasContextData(){return this.hasContext}clearContext(L){if(L===void 0){this.context={},this.hasContext=!1;return}let J=Array.isArray(L)?L:[L];for(let L of J)delete this.context[L];this.hasContext=Object.keys(this.context).length>0}onChildLoggerCreated({parentContextManager:L,childContextManager:J}){if(L.hasContextData()){let Y=L.getContext();J.setContext({...Y})}}clone(){let J=new L;return J.setContext({...this.context}),J.hasContext=this.hasContext,J}},MockContextManager=class L{setContext(L){}appendContext(L){}getContext(){return{}}hasContextData(){return!1}clearContext(L){}onChildLoggerCreated(L){}clone(){return new L}},DefaultLogLevelManager=class L{logLevelEnabledStatus={info:!0,warn:!0,error:!0,debug:!0,trace:!0,fatal:!0};setLevel(L){let J=LogLevelPriority[L];for(let L of Object.values(LogLevel)){let Y=L,X=LogLevelPriority[L];this.logLevelEnabledStatus[Y]=X>=J}}enableIndividualLevel(L){let J=L;J in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[J]=!0)}disableIndividualLevel(L){let J=L;J in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[J]=!1)}isLevelEnabled(L){let J=L;return this.logLevelEnabledStatus[J]}enableLogging(){for(let L of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[L]=!0}disableLogging(){for(let L of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[L]=!1}onChildLoggerCreated({parentLogLevelManager:J,childLogLevelManager:Y}){let X=J.logLevelEnabledStatus;Y instanceof L&&(Y.logLevelEnabledStatus={...X})}clone(){let J=new L;return J.logLevelEnabledStatus={...this.logLevelEnabledStatus},J}},MockLogLevelManager=class L{setLevel(L){}enableIndividualLevel(L){}disableIndividualLevel(L){}isLevelEnabled(L){return!0}enableLogging(){}disableLogging(){}onChildLoggerCreated(L){}clone(){return new L}},BaseTransport=class{id;logger;enabled;consoleDebug;level;constructor(L){this.id=L.id??Date.now().toString()+Math.random().toString(),this.logger=L.logger,this.enabled=L.enabled??!0,this.consoleDebug=L.consoleDebug??!1,this.level=L.level??`trace`}_sendToLogger(L){if(!this.enabled||LogLevelPriority[L.logLevel]<LogLevelPriority[this.level])return;let J=this.shipToLogger(L);if(this.consoleDebug)switch(L.logLevel){case LogLevel.info:console.info(...J);break;case LogLevel.warn:console.warn(...J);break;case LogLevel.error:console.error(...J);break;case LogLevel.trace:console.debug(...J);break;case LogLevel.debug:console.debug(...J);break;case LogLevel.fatal:console.debug(...J);break;default:console.log(...J)}}getLoggerInstance(){return this.logger}},LoggerlessTransport=class{id;enabled;level;consoleDebug;constructor(L){this.id=Date.now().toString()+Math.random().toString(),this.enabled=L.enabled??!0,this.consoleDebug=L.consoleDebug??!1,this.level=L.level??`trace`}_sendToLogger(L){if(!this.enabled||LogLevelPriority[L.logLevel]<LogLevelPriority[this.level])return;let J=this.shipToLogger(L);if(this.consoleDebug)switch(L.logLevel){case LogLevel.info:console.info(...J);break;case LogLevel.warn:console.warn(...J);break;case LogLevel.error:console.error(...J);break;case LogLevel.trace:console.debug(...J);break;case LogLevel.debug:console.debug(...J);break;case LogLevel.fatal:console.debug(...J);break;default:console.log(...J)}}getLoggerInstance(){throw Error(`This transport does not have a logger instance`)}};const CALLBACK_LIST=[PluginCallbackType.onBeforeDataOut,PluginCallbackType.onMetadataCalled,PluginCallbackType.onBeforeMessageOut,PluginCallbackType.transformLogLevel,PluginCallbackType.shouldSendToLogger,PluginCallbackType.onContextCalled];var PluginManager=class{idToPlugin;transformLogLevel=[];onBeforeDataOut=[];shouldSendToLogger=[];onMetadataCalled=[];onBeforeMessageOut=[];onContextCalled=[];constructor(L){this.idToPlugin={},this.mapPlugins(L),this.indexPlugins()}mapPlugins(L){for(let J of L){if(J.id||=Date.now().toString()+Math.random().toString(),this.idToPlugin[J.id])throw Error(`[LogLayer] Plugin with id ${J.id} already exists.`);J.registeredAt=Date.now(),this.idToPlugin[J.id]=J}}indexPlugins(){this.transformLogLevel=[],this.onBeforeDataOut=[],this.shouldSendToLogger=[],this.onMetadataCalled=[],this.onBeforeMessageOut=[],this.onContextCalled=[];let L=Object.values(this.idToPlugin).sort((L,J)=>L.registeredAt-J.registeredAt);for(let J of L){if(J.disabled)return;for(let L of CALLBACK_LIST)J[L]&&J.id&&this[L].push(J.id)}}hasPlugins(L){return this[L].length>0}countPlugins(L){return L?this[L].length:Object.keys(this.idToPlugin).length}addPlugins(L){this.mapPlugins(L),this.indexPlugins()}enablePlugin(L){let J=this.idToPlugin[L];J&&(J.disabled=!1),this.indexPlugins()}disablePlugin(L){let J=this.idToPlugin[L];J&&(J.disabled=!0),this.indexPlugins()}removePlugin(L){delete this.idToPlugin[L],this.indexPlugins()}runTransformLogLevel(L,J){let Y=null;for(let X of this.transformLogLevel){let Z=this.idToPlugin[X];if(Z.transformLogLevel){let X=Z.transformLogLevel({data:L.data,logLevel:L.logLevel,messages:L.messages,error:L.error,metadata:L.metadata,context:L.context},J);X!=null&&X!==!1&&(Y=X)}}return Y!=null&&Y!==!1?Y:L.logLevel}runOnBeforeDataOut(L,J){let Y={...L};for(let L of this.onBeforeDataOut){let X=this.idToPlugin[L];if(X.onBeforeDataOut){let L=X.onBeforeDataOut({data:Y.data,logLevel:Y.logLevel,error:Y.error,metadata:Y.metadata,context:Y.context},J);L&&(Y.data||={},Object.assign(Y.data,L))}}return Y.data}runShouldSendToLogger(L,J){return!this.shouldSendToLogger.some(Y=>!this.idToPlugin[Y].shouldSendToLogger?.(L,J))}runOnMetadataCalled(L,J){let Y={...L};for(let L of this.onMetadataCalled){let X=this.idToPlugin[L].onMetadataCalled?.(Y,J);if(X)Y=X;else return null}return Y}runOnBeforeMessageOut(L,J){let Y=[...L.messages];for(let X of this.onBeforeMessageOut){let Z=this.idToPlugin[X].onBeforeMessageOut?.({messages:Y,logLevel:L.logLevel},J);Z&&(Y=Z)}return Y}runOnContextCalled(L,J){let Y={...L};for(let L of this.onContextCalled){let X=this.idToPlugin[L].onContextCalled?.(Y,J);if(X)Y=X;else return null}return Y}},LogLayer=class L{pluginManager;idToTransport;hasMultipleTransports;singleTransport;contextManager;logLevelManager;_isLoggingLazyError=!1;_lazyContextCount=0;_assignedGroups=null;_groupsConfig=null;_activeGroups=null;_ungroupedBehavior=`all`;_config;constructor(L){this._config={...L,enabled:L.enabled??!0},this.contextManager=new DefaultContextManager,this.logLevelManager=new DefaultLogLevelManager,this._config.enabled||this.disableLogging(),this.pluginManager=new PluginManager([...L.plugins||[],...mixinRegistry.pluginsToInit]),this._config.errorFieldName||(this._config.errorFieldName=`err`),this._config.copyMsgOnOnlyError||(this._config.copyMsgOnOnlyError=!1),this._initializeTransports(this._config.transport),this._groupsConfig=L.groups?{...L.groups}:null,this._ungroupedBehavior=L.ungroupedBehavior??`all`,this._activeGroups=L.activeGroups?new Set(L.activeGroups):null,this._parseEnvGroups(),mixinRegistry.logLayerHandlers.length>0&&mixinRegistry.logLayerHandlers.forEach(J=>{J.onConstruct&&J.onConstruct(this,L)})}withContextManager(L){return this.contextManager&&typeof this.contextManager[Symbol.dispose]==`function`&&this.contextManager[Symbol.dispose](),this.contextManager=L,this._lazyContextCount=L.hasContextData()?countLazyValues(L.getContext()):0,this}getContextManager(){return this.contextManager}withLogLevelManager(L){return this.logLevelManager&&typeof this.logLevelManager[Symbol.dispose]==`function`&&this.logLevelManager[Symbol.dispose](),this.logLevelManager=L,this}getLogLevelManager(){return this.logLevelManager}getConfig(){return this._config}_initializeTransports(L){if(this.idToTransport)for(let L in this.idToTransport)this.idToTransport[L]&&typeof this.idToTransport[L][Symbol.dispose]==`function`&&this.idToTransport[L][Symbol.dispose]();this.hasMultipleTransports=Array.isArray(L)&&L.length>1,this.singleTransport=this.hasMultipleTransports?null:Array.isArray(L)?L[0]:L,Array.isArray(L)?this.idToTransport=L.reduce((L,J)=>(L[J.id]=J,L),{}):this.idToTransport={[L.id]:L}}withPrefix(L){let J=this.child();return J._config.prefix=L,J}withGroup(L){let J=this.child(),Y=Array.isArray(L)?L:[L];if(J._assignedGroups){let L=new Set([...J._assignedGroups,...Y]);J._assignedGroups=Array.from(L)}else J._assignedGroups=[...Y];return J}addGroup(L,J){return this._groupsConfig||={},this._groupsConfig[L]={...J},this}removeGroup(L){return this._groupsConfig&&(delete this._groupsConfig[L],Object.keys(this._groupsConfig).length===0&&(this._groupsConfig=null)),this}enableGroup(L){return this._groupsConfig?.[L]&&(this._groupsConfig[L]={...this._groupsConfig[L],enabled:!0}),this}disableGroup(L){return this._groupsConfig?.[L]&&(this._groupsConfig[L]={...this._groupsConfig[L],enabled:!1}),this}setGroupLevel(L,J){return this._groupsConfig?.[L]&&(this._groupsConfig[L]={...this._groupsConfig[L],level:J}),this}setActiveGroups(L){return this._activeGroups=L?new Set(L):null,this}getGroups(){return this._groupsConfig?{...this._groupsConfig}:{}}withContext(L){let J=L;if(!L)return this._config.consoleDebug&&console.debug(`[LogLayer] withContext was called with no context; dropping.`),this;if(this.pluginManager.hasPlugins(PluginCallbackType.onContextCalled)&&(J=this.pluginManager.runOnContextCalled(L,this),!J))return this._config.consoleDebug&&console.debug(`[LogLayer] Context was dropped due to plugin returning falsy value.`),this;let Y=this.contextManager.getContext();for(let L of Object.keys(J)){let X=L in Y&&isLazy(Y[L]),Z=isLazy(J[L]);!X&&Z?this._lazyContextCount++:X&&!Z&&this._lazyContextCount--}return this.contextManager.appendContext(J),this}clearContext(L){if(L!==void 0&&this._lazyContextCount>0){let J=this.contextManager.getContext(),Y=Array.isArray(L)?L:[L];for(let L of Y)L in J&&isLazy(J[L])&&this._lazyContextCount--}else L===void 0&&(this._lazyContextCount=0);return this.contextManager.clearContext(L),this}getContext(L){let J=this.contextManager.getContext();if(L?.raw||this._lazyContextCount===0)return J;let{resolved:Y,errors:X}=resolveLazyValues(J);X&&this._logLazyEvalErrors(X,`context`);let{resolved:Z,asyncKeys:Q}=replacePromiseValues(Y);return Q&&this._logAsyncLazyContextErrors(Q),Z}addPlugins(L){this.pluginManager.addPlugins(L)}enablePlugin(L){this.pluginManager.enablePlugin(L)}disablePlugin(L){this.pluginManager.disablePlugin(L)}removePlugin(L){this.pluginManager.removePlugin(L)}withMetadata(L){return new LogBuilder(this).withMetadata(L)}withError(L){return new LogBuilder(this).withError(L)}child(){let J=new L({...this._config,transport:Array.isArray(this._config.transport)?[...this._config.transport]:this._config.transport}).withPluginManager(this.pluginManager).withContextManager(this.contextManager.clone()).withLogLevelManager(this.logLevelManager.clone());return this.contextManager.onChildLoggerCreated({parentContextManager:this.contextManager,childContextManager:J.contextManager,parentLogger:this,childLogger:J}),this.logLevelManager.onChildLoggerCreated({parentLogLevelManager:this.logLevelManager,childLogLevelManager:J.logLevelManager,parentLogger:this,childLogger:J}),J._lazyContextCount=J.contextManager.hasContextData()?countLazyValues(J.contextManager.getContext()):0,J._groupsConfig=this._groupsConfig,J._activeGroups=this._activeGroups,J._ungroupedBehavior=this._ungroupedBehavior,J._assignedGroups=this._assignedGroups?[...this._assignedGroups]:null,J}withFreshTransports(L){return this._config.transport=L,this._initializeTransports(L),this}addTransport(L){let J=Array.isArray(L)?L:[L],Y=Array.isArray(this._config.transport)?this._config.transport:[this._config.transport],X=new Set(J.map(L=>L.id));for(let L of J){let J=this.idToTransport[L.id];J&&typeof J[Symbol.dispose]==`function`&&J[Symbol.dispose]()}let Z=[...Y.filter(L=>!X.has(L.id)),...J];this._config.transport=Z;for(let L of J)this.idToTransport[L.id]=L;return this.hasMultipleTransports=Z.length>1,this.singleTransport=this.hasMultipleTransports?null:Z[0],this}removeTransport(L){let J=this.idToTransport[L];if(!J)return!1;typeof J[Symbol.dispose]==`function`&&J[Symbol.dispose](),delete this.idToTransport[L];let Y=(Array.isArray(this._config.transport)?this._config.transport:[this._config.transport]).filter(J=>J.id!==L);return this._config.transport=Y.length===1?Y[0]:Y,this.hasMultipleTransports=Y.length>1,this.singleTransport=this.hasMultipleTransports?null:Y[0]||null,!0}withFreshPlugins(L){return this._config.plugins=L,this.pluginManager=new PluginManager(L),this}withPluginManager(L){return this.pluginManager=L,this}errorOnly(L,J){let Y=J?.logLevel||LogLevel.error;if(!this.isLevelEnabled(Y))return;let{copyMsgOnOnlyError:X}=this._config,Z={logLevel:Y,err:L};(X&&J?.copyMsg!==!1||J?.copyMsg===!0)&&L?.message&&(Z.params=[L.message]),this._formatLog(Z)}metadataOnly(L,J=LogLevel.info){if(!this.isLevelEnabled(J))return;let{muteMetadata:Y,consoleDebug:X}=this._config;if(Y)return;if(!L){X&&console.debug(`[LogLayer] metadataOnly was called with no metadata; dropping.`);return}let Z=L;if(this.pluginManager.hasPlugins(PluginCallbackType.onMetadataCalled)&&(Z=this.pluginManager.runOnMetadataCalled(L,this),!Z)){X&&console.debug(`[LogLayer] Metadata was dropped due to plugin returning falsy value.`);return}let Q={logLevel:J,metadata:Z};return this._formatLog(Q)}info(...L){this.isLevelEnabled(LogLevel.info)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.info,params:L}))}warn(...L){this.isLevelEnabled(LogLevel.warn)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.warn,params:L}))}error(...L){this.isLevelEnabled(LogLevel.error)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.error,params:L}))}debug(...L){this.isLevelEnabled(LogLevel.debug)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.debug,params:L}))}trace(...L){this.isLevelEnabled(LogLevel.trace)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.trace,params:L}))}fatal(...L){this.isLevelEnabled(LogLevel.fatal)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.fatal,params:L}))}raw(L){if(!this.isLevelEnabled(L.logLevel))return;let J={logLevel:L.logLevel,params:L.messages,metadata:L.metadata,err:L.error,context:L.context};return this._formatMessage(L.messages),this._formatLog(J)}disableLogging(){return this.logLevelManager.disableLogging(),this}enableLogging(){return this.logLevelManager.enableLogging(),this}muteContext(){return this._config.muteContext=!0,this}unMuteContext(){return this._config.muteContext=!1,this}muteMetadata(){return this._config.muteMetadata=!0,this}unMuteMetadata(){return this._config.muteMetadata=!1,this}enableIndividualLevel(L){return this.logLevelManager.enableIndividualLevel(L),this}disableIndividualLevel(L){return this.logLevelManager.disableIndividualLevel(L),this}setLevel(L){return this.logLevelManager.setLevel(L),this}isLevelEnabled(L){return this.logLevelManager.isLevelEnabled(L)}formatContext(L){let{contextFieldName:J,muteContext:Y}=this._config;return L&&Object.keys(L).length>0&&!Y?J?{[J]:{...L}}:{...L}:{}}formatMetadata(L=null){let{metadataFieldName:J,muteMetadata:Y}=this._config;return L&&!Y?J?{[J]:{...L}}:{...L}:{}}getLoggerInstance(L){let J=this.idToTransport[L];if(J)return J.getLoggerInstance()}_parseEnvGroups(){let L=typeof process<`u`?process.env?.LOGLAYER_GROUPS:void 0;if(!L)return;let J=L.split(`,`).map(L=>L.trim()).filter(Boolean),Y=[];for(let L of J){let J=L.indexOf(`:`);if(J>0){let X=L.slice(0,J),Z=L.slice(J+1);Y.push(X),this._groupsConfig?.[X]&&(this._groupsConfig[X]={...this._groupsConfig[X],level:Z})}else Y.push(L)}this._activeGroups=new Set(Y)}_mergeGroups(L){if(this._assignedGroups&&L){let J=new Set([...this._assignedGroups,...L]);return Array.from(J)}return L||this._assignedGroups}_applyUngroupedRules(L){return this._ungroupedBehavior===`all`?!0:this._ungroupedBehavior===`none`?!1:this._ungroupedBehavior.includes(L)}_shouldTransportReceiveLog(L,J,Y){if(!this._groupsConfig)return!0;let X=this._mergeGroups(Y);if(!X||X.length===0)return this._applyUngroupedRules(L);let Z=!1;for(let Y of X){let X=this._groupsConfig[Y];if(X&&(Z=!0,X.enabled!==!1&&!(this._activeGroups&&!this._activeGroups.has(Y)))){if(X.level){let L=LogLevelPriority[X.level];if(LogLevelPriority[J]<L)continue}if(X.transports.includes(L))return!0}}return Z?!1:this._applyUngroupedRules(L)}_formatMessage(L=[]){let{prefix:J}=this._config;J&&typeof L[0]==`string`&&(L[0]=`${J} ${L[0]}`)}_formatLog({logLevel:L,params:J=[],metadata:Y=null,err:X,context:Z=null,groups:Q=null}){let $=Z===null?this.contextManager.getContext():Z,ee;if(this._lazyContextCount>0||Z!==null){let L=resolveLazyValues($);L.errors&&this._logLazyEvalErrors(L.errors,`context`);let{resolved:J,asyncKeys:Y}=replacePromiseValues(L.resolved);Y&&this._logAsyncLazyContextErrors(Y),ee=J}else ee=$;let te=null;if(Y){let L=resolveLazyValues(Y);Y=L.resolved,te=L.errors}if(te&&this._logLazyEvalErrors(te,`metadata`),Y&&hasPromiseValues(Y))return this._resolveAsyncAndProcess(L,J,ee,Y,X,Z,Q);this._processLog(L,J,ee,Y,X,Z,Q)}async _resolveAsyncAndProcess(L,J,Y,X,Z,Q,$){let ee=null;if(X){let L=await resolvePromiseValues(X);ee=L.resolved,L.errors&&this._logLazyEvalErrors(L.errors,`metadata`)}this._processLog(L,J,Y,ee,Z,Q,$)}_logLazyEvalErrors(L,J){if(this._isLoggingLazyError){for(let Y of L)console.error(`[LogLayer] Lazy evaluation error in ${J} key "${Y.key}":`,Y.error);return}this._isLoggingLazyError=!0;try{for(let Y of L){let L=Y.error instanceof Error?Y.error.message:String(Y.error);this._processLog(LogLevel.error,[`[LogLayer] Lazy evaluation failed for ${J} key "${Y.key}": ${L}`],{},null,Y.error instanceof Error?Y.error:void 0,{})}}finally{this._isLoggingLazyError=!1}}_logAsyncLazyContextErrors(L){if(this._isLoggingLazyError){for(let J of L)console.error(`[LogLayer] Async lazy values are not supported in context (key "${J}"). Use async lazy only in metadata.`);return}this._isLoggingLazyError=!0;try{for(let J of L)this._processLog(LogLevel.error,[`[LogLayer] Async lazy values are not supported in context (key "${J}"). Use async lazy only in metadata.`],{},null,void 0,{})}finally{this._isLoggingLazyError=!1}}_processLog(L,J,Y,X,Z,Q,$=null){let{errorSerializer:ee,errorFieldInMetadata:te,muteContext:ne,contextFieldName:re,metadataFieldName:ie,errorFieldName:ae}=this._config,oe=!!X||(ne?!1:Q===null?this.contextManager.hasContextData():Object.keys(Q).length>0),se={};if(oe)if(re&&re===ie){let L=this.formatContext(Y)[re],J=this.formatMetadata(X)[ie];se={[re]:{...L,...J}}}else se={...this.formatContext(Y),...this.formatMetadata(X)};if(Z){let L=ee?ee(Z):Z;te&&X&&ie?se?.[ie]?se[ie][ae]=L:se={...se,[ie]:{[ae]:L}}:se=te&&!X&&ie?{...se,[ie]:{[ae]:L}}:{...se,[ae]:L},oe=!0}this.pluginManager.hasPlugins(PluginCallbackType.onBeforeDataOut)&&(se=this.pluginManager.runOnBeforeDataOut({data:oe?se:void 0,logLevel:L,error:Z,metadata:X,context:Y},this),se&&!oe&&(oe=!0)),this.pluginManager.hasPlugins(PluginCallbackType.onBeforeMessageOut)&&(J=this.pluginManager.runOnBeforeMessageOut({messages:[...J],logLevel:L},this)),this.pluginManager.hasPlugins(PluginCallbackType.transformLogLevel)&&(L=this.pluginManager.runTransformLogLevel({data:oe?se:void 0,logLevel:L,messages:[...J],error:Z,metadata:X,context:Y},this));let ce=this._mergeGroups($)??void 0;if(this.hasMultipleTransports){let Q=this._config.transport.filter(J=>!(!J.enabled||!this._shouldTransportReceiveLog(J.id,L,$))).map(async Q=>{let $=L;if(!(this.pluginManager.hasPlugins(PluginCallbackType.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...J],data:oe?se:void 0,logLevel:$,transportId:Q.id,error:Z,metadata:X,context:Y,groups:ce},this)))return Q._sendToLogger({logLevel:$,messages:[...J],data:oe?se:void 0,hasData:oe,error:Z,metadata:X,context:Y,groups:ce})});Promise.all(Q).catch(L=>{this._config.consoleDebug&&console.error(`[LogLayer] Error executing transports:`,L)})}else{if(!this.singleTransport?.enabled||!this._shouldTransportReceiveLog(this.singleTransport.id,L,$)||this.pluginManager.hasPlugins(PluginCallbackType.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...J],data:oe?se:void 0,logLevel:L,transportId:this.singleTransport.id,error:Z,metadata:X,context:Y,groups:ce},this))return;this.singleTransport._sendToLogger({logLevel:L,messages:[...J],data:oe?se:void 0,hasData:oe,error:Z,metadata:X,context:Y,groups:ce})}}},MockLogBuilder=class{debug(...L){}error(...L){}info(...L){}trace(...L){}warn(...L){}fatal(...L){}enableLogging(){return this}disableLogging(){return this}withMetadata(L){return this}withError(L){return this}withGroup(L){return this}},MockLogLayer=class{mockLogBuilder=new MockLogBuilder;mockContextManager=new MockContextManager;mockLogLevelManager=new MockLogLevelManager;info(...L){}warn(...L){}error(...L){}debug(...L){}trace(...L){}fatal(...L){}raw(L){}getLoggerInstance(L){}errorOnly(L,J){}metadataOnly(L,J){}addPlugins(L){}removePlugin(L){}enablePlugin(L){}disablePlugin(L){}withPrefix(L){return this}withGroup(L){return this}addGroup(L,J){return this}removeGroup(L){return this}enableGroup(L){return this}disableGroup(L){return this}setGroupLevel(L,J){return this}setActiveGroups(L){return this}getGroups(){return{}}withContext(L){return this}withError(L){return this.mockLogBuilder.withError(L)}withMetadata(L){return this.mockLogBuilder.withMetadata(L)}getContext(L){return{}}clearContext(L){return this}enableLogging(){return this}disableLogging(){return this}child(){return this}muteContext(){return this}unMuteContext(){return this}muteMetadata(){return this}unMuteMetadata(){return this}withFreshTransports(L){return this}addTransport(L){return this}removeTransport(L){return!0}withFreshPlugins(L){return this}withContextManager(L){return this}getContextManager(){return this.mockContextManager}withLogLevelManager(L){return this}getLogLevelManager(){return this.mockLogLevelManager}getConfig(){return{}}setMockLogBuilder(L){this.mockLogBuilder=L}enableIndividualLevel(L){return this}disableIndividualLevel(L){return this}setLevel(L){return this}isLevelEnabled(L){return!0}getMockLogBuilder(){return this.mockLogBuilder}resetMockLogBuilder(){this.mockLogBuilder=new MockLogBuilder}};const mixinRegistry={logLayerHandlers:[],pluginsToInit:[],logBuilderHandlers:[]};var LogBuilder=class{err;metadata;structuredLogger;hasMetadata;pluginManager;_groups=null;constructor(L){this.err=null,this.metadata={},this.structuredLogger=L,this.hasMetadata=!1,this.pluginManager=L.pluginManager,mixinRegistry.logBuilderHandlers.length>0&&mixinRegistry.logBuilderHandlers.forEach(J=>{J.onConstruct&&J.onConstruct(this,L)})}withMetadata(L){let{pluginManager:J,structuredLogger:{_config:{consoleDebug:Y}}}=this;if(!L)return Y&&console.debug(`[LogLayer] withMetadata was called with no metadata; dropping.`),this;let X=L;return J.hasPlugins(PluginCallbackType.onMetadataCalled)&&(X=J.runOnMetadataCalled(L,this.structuredLogger),!X)?(Y&&console.debug(`[LogLayer] Metadata was dropped due to plugin returning falsy value.`),this):(this.metadata={...this.metadata,...X},this.hasMetadata=!0,this)}withError(L){return this.err=L,this}withGroup(L){let J=Array.isArray(L)?L:[L];if(this._groups){let L=new Set([...this._groups,...J]);this._groups=Array.from(L)}else this._groups=[...J];return this}info(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.info))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.info,L)}warn(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.warn))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.warn,L)}error(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.error))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.error,L)}debug(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.debug))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.debug,L)}trace(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.trace))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.trace,L)}fatal(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.fatal))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.fatal,L)}disableLogging(){return this.structuredLogger.disableLogging(),this}enableLogging(){return this.structuredLogger.enableLogging(),this}formatLog(L,J){let{muteMetadata:Y}=this.structuredLogger._config,X=Y?!1:this.hasMetadata;return this.structuredLogger._formatLog({logLevel:L,params:J,metadata:X?this.metadata:null,err:this.err,groups:this._groups})}};const isNonErrorSymbol=Symbol(`isNonError`);function defineProperty(L,J,Y){Object.defineProperty(L,J,{value:Y,writable:!1,enumerable:!1,configurable:!1})}function stringify$1(L){if(L===void 0)return`undefined`;if(L===null)return`null`;if(typeof L==`string`)return L;if(typeof L==`number`||typeof L==`boolean`)return String(L);if(typeof L==`bigint`)return`${L}n`;if(typeof L==`symbol`)return L.toString();if(typeof L==`function`)return`[Function${L.name?` ${L.name}`:` (anonymous)`}]`;if(L instanceof Error)try{return String(L)}catch{return`<Unserializable error>`}try{return JSON.stringify(L)}catch{try{return String(L)}catch{return`<Unserializable value>`}}}var NonError$1=class L extends Error{constructor(J,{superclass:Y=Error}={}){if(L.isNonError(J))return J;if(J instanceof Error)throw TypeError(`Do not pass Error instances to NonError. Throw the error directly instead.`);super(`Non-error value: ${stringify$1(J)}`),Y!==Error&&Object.setPrototypeOf(this,Y.prototype),defineProperty(this,`name`,`NonError`),defineProperty(this,isNonErrorSymbol,!0),defineProperty(this,`isNonError`,!0),defineProperty(this,`value`,J)}static isNonError(L){return L?.[isNonErrorSymbol]===!0}static#e(J,Y){try{let X=J(...Y);return X&&typeof X.then==`function`?(async()=>{try{return await X}catch(J){throw J instanceof Error?J:new L(J)}})():X}catch(J){throw J instanceof Error?J:new L(J)}}static try(J){return L.#e(J,[])}static wrap(J){return(...Y)=>L.#e(J,Y)}static[Symbol.hasInstance](J){return L.isNonError(J)}};const list$1=[Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(L=>[L.name,L]),errorConstructors=new Map(list$1),errorFactories=new Map,errorProperties=[{property:`name`,enumerable:!1},{property:`message`,enumerable:!1},{property:`stack`,enumerable:!1},{property:`code`,enumerable:!0},{property:`cause`,enumerable:!1},{property:`errors`,enumerable:!1}],toJsonWasCalled=new WeakSet,toJSON=L=>{toJsonWasCalled.add(L);let J=L.toJSON();return toJsonWasCalled.delete(L),J},newError=L=>{if(L===`NonError`)return new NonError$1;let J=errorFactories.get(L);if(J)return J();let Y=errorConstructors.get(L)??Error;return Y===AggregateError?new Y([]):new Y},destroyCircular=({from:L,seen:J,to:Y,forceEnumerable:X,maxDepth:Z,depth:Q,useToJSON:$,serialize:ee})=>{if(Y||=Array.isArray(L)?[]:!ee&&isErrorLike(L)?newError(L.name):{},J.add(L),Q>=Z)return J.delete(L),Y;if($&&typeof L.toJSON==`function`&&!toJsonWasCalled.has(L))return J.delete(L),toJSON(L);let te=L=>destroyCircular({from:L,seen:J,forceEnumerable:X,maxDepth:Z,depth:Q+1,useToJSON:$,serialize:ee});for(let X of Object.keys(L)){let Z=L[X];if(Z&&Z instanceof Uint8Array&&Z.constructor.name===`Buffer`){Y[X]=ee?`[object Buffer]`:Z;continue}if(typeof Z==`object`&&Z&&typeof Z.pipe==`function`){Y[X]=ee?`[object Stream]`:Z;continue}if(typeof Z==`function`){ee||(Y[X]=Z);continue}if(ee&&typeof Z==`bigint`){Y[X]=`${Z}n`;continue}if(!Z||typeof Z!=`object`){try{Y[X]=Z}catch{}continue}if(!J.has(Z)){Y[X]=te(Z);continue}Y[X]=`[Circular]`}if(ee||Y instanceof Error)for(let{property:Z,enumerable:Q}of errorProperties){let $=L[Z];if($==null||Object.getOwnPropertyDescriptor(Y,Z)?.configurable===!1)continue;let ee=$;typeof $==`object`&&(ee=J.has($)?`[Circular]`:te($)),Object.defineProperty(Y,Z,{value:ee,enumerable:X||Q,configurable:!0,writable:!0})}return J.delete(L),Y};function serializeError(L,J={}){let{maxDepth:Y=1/0,useToJSON:X=!0}=J;return typeof L==`object`&&L?destroyCircular({from:L,seen:new Set,forceEnumerable:!0,maxDepth:Y,depth:0,useToJSON:X,serialize:!0}):(typeof L==`function`&&(L=`<Function>`),destroyCircular({from:new NonError$1(L),seen:new Set,forceEnumerable:!0,maxDepth:Y,depth:0,useToJSON:X,serialize:!0}))}function isErrorLike(L){return!!L&&typeof L==`object`&&typeof L.name==`string`&&typeof L.message==`string`&&typeof L.stack==`string`}var require_safe_stable_stringify=__commonJSMin(((L,J)=>{let{hasOwnProperty:Y}=Object.prototype,X=ue();X.configure=ue,X.stringify=X,X.default=X,L.stringify=X,L.configure=ue,J.exports=X;let Z=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Q(L){return L.length<5e3&&!Z.test(L)?`"${L}"`:JSON.stringify(L)}function $(L,J){if(L.length>200||J)return L.sort(J);for(let J=1;J<L.length;J++){let Y=L[J],X=J;for(;X!==0&&L[X-1]>Y;)L[X]=L[X-1],X--;L[X]=Y}return L}let ee=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function te(L){return ee.call(L)!==void 0&&L.length!==0}function ne(L,J,Y){L.length<Y&&(Y=L.length);let X=J===`,`?``:` `,Z=`"0":${X}${L[0]}`;for(let Q=1;Q<Y;Q++)Z+=`${J}"${Q}":${X}${L[Q]}`;return Z}function re(L){if(Y.call(L,`circularValue`)){let J=L.circularValue;if(typeof J==`string`)return`"${J}"`;if(J==null)return J;if(J===Error||J===TypeError)return{toString(){throw TypeError(`Converting circular structure to JSON`)}};throw TypeError(`The "circularValue" argument must be of type string or the value null or undefined`)}return`"[Circular]"`}function ie(L){let J;if(Y.call(L,`deterministic`)&&(J=L.deterministic,typeof J!=`boolean`&&typeof J!=`function`))throw TypeError(`The "deterministic" argument must be of type boolean or comparator function`);return J===void 0?!0:J}function ae(L,J){let X;if(Y.call(L,J)&&(X=L[J],typeof X!=`boolean`))throw TypeError(`The "${J}" argument must be of type boolean`);return X===void 0?!0:X}function oe(L,J){let X;if(Y.call(L,J)){if(X=L[J],typeof X!=`number`)throw TypeError(`The "${J}" argument must be of type number`);if(!Number.isInteger(X))throw TypeError(`The "${J}" argument must be an integer`);if(X<1)throw RangeError(`The "${J}" argument must be >= 1`)}return X===void 0?1/0:X}function se(L){return L===1?`1 item`:`${L} items`}function ce(L){let J=new Set;for(let Y of L)(typeof Y==`string`||typeof Y==`number`)&&J.add(String(Y));return J}function le(L){if(Y.call(L,`strict`)){let J=L.strict;if(typeof J!=`boolean`)throw TypeError(`The "strict" argument must be of type boolean`);if(J)return L=>{let J=`Object can not safely be stringified. Received type ${typeof L}`;throw typeof L!=`function`&&(J+=` (${L.toString()})`),Error(J)}}}function ue(L){L={...L};let J=le(L);J&&(L.bigint===void 0&&(L.bigint=!1),`circularValue`in L||(L.circularValue=Error));let Y=re(L),X=ae(L,`bigint`),Z=ie(L),ee=typeof Z==`function`?Z:void 0,ue=oe(L,`maximumDepth`),de=oe(L,`maximumBreadth`);function fe(L,ne,re,ie,ae,oe){let ce=ne[L];switch(typeof ce==`object`&&ce&&typeof ce.toJSON==`function`&&(ce=ce.toJSON(L)),ce=ie.call(ne,L,ce),typeof ce){case`string`:return Q(ce);case`object`:{if(ce===null)return`null`;if(re.indexOf(ce)!==-1)return Y;let L=``,J=`,`,X=oe;if(Array.isArray(ce)){if(ce.length===0)return`[]`;if(ue<re.length+1)return`"[Array]"`;re.push(ce),ae!==``&&(oe+=ae,L+=`\n${oe}`,J=`,\n${oe}`);let Y=Math.min(ce.length,de),Z=0;for(;Z<Y-1;Z++){let Y=fe(String(Z),ce,re,ie,ae,oe);L+=Y===void 0?`null`:Y,L+=J}let Q=fe(String(Z),ce,re,ie,ae,oe);if(L+=Q===void 0?`null`:Q,ce.length-1>de){let Y=ce.length-de-1;L+=`${J}"... ${se(Y)} not stringified"`}return ae!==``&&(L+=`\n${X}`),re.pop(),`[${L}]`}let ne=Object.keys(ce),le=ne.length;if(le===0)return`{}`;if(ue<re.length+1)return`"[Object]"`;let pe=``,me=``;ae!==``&&(oe+=ae,J=`,\n${oe}`,pe=` `);let he=Math.min(le,de);Z&&!te(ce)&&(ne=$(ne,ee)),re.push(ce);for(let Y=0;Y<he;Y++){let X=ne[Y],Z=fe(X,ce,re,ie,ae,oe);Z!==void 0&&(L+=`${me}${Q(X)}:${pe}${Z}`,me=J)}if(le>de){let Y=le-de;L+=`${me}"...":${pe}"${se(Y)} not stringified"`,me=J}return ae!==``&&me.length>1&&(L=`\n${oe}${L}\n${X}`),re.pop(),`{${L}}`}case`number`:return isFinite(ce)?String(ce):J?J(ce):`null`;case`boolean`:return ce===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(ce);default:return J?J(ce):void 0}}function pe(L,Z,$,ee,te,ne){switch(typeof Z==`object`&&Z&&typeof Z.toJSON==`function`&&(Z=Z.toJSON(L)),typeof Z){case`string`:return Q(Z);case`object`:{if(Z===null)return`null`;if($.indexOf(Z)!==-1)return Y;let L=ne,J=``,X=`,`;if(Array.isArray(Z)){if(Z.length===0)return`[]`;if(ue<$.length+1)return`"[Array]"`;$.push(Z),te!==``&&(ne+=te,J+=`\n${ne}`,X=`,\n${ne}`);let Y=Math.min(Z.length,de),Q=0;for(;Q<Y-1;Q++){let L=pe(String(Q),Z[Q],$,ee,te,ne);J+=L===void 0?`null`:L,J+=X}let re=pe(String(Q),Z[Q],$,ee,te,ne);if(J+=re===void 0?`null`:re,Z.length-1>de){let L=Z.length-de-1;J+=`${X}"... ${se(L)} not stringified"`}return te!==``&&(J+=`\n${L}`),$.pop(),`[${J}]`}$.push(Z);let re=``;te!==``&&(ne+=te,X=`,\n${ne}`,re=` `);let ie=``;for(let L of ee){let Y=pe(L,Z[L],$,ee,te,ne);Y!==void 0&&(J+=`${ie}${Q(L)}:${re}${Y}`,ie=X)}return te!==``&&ie.length>1&&(J=`\n${ne}${J}\n${L}`),$.pop(),`{${J}}`}case`number`:return isFinite(Z)?String(Z):J?J(Z):`null`;case`boolean`:return Z===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(Z);default:return J?J(Z):void 0}}function me(L,re,ie,ae,oe){switch(typeof re){case`string`:return Q(re);case`object`:{if(re===null)return`null`;if(typeof re.toJSON==`function`){if(re=re.toJSON(L),typeof re!=`object`)return me(L,re,ie,ae,oe);if(re===null)return`null`}if(ie.indexOf(re)!==-1)return Y;let J=oe;if(Array.isArray(re)){if(re.length===0)return`[]`;if(ue<ie.length+1)return`"[Array]"`;ie.push(re),oe+=ae;let L=`\n${oe}`,Y=`,\n${oe}`,X=Math.min(re.length,de),Z=0;for(;Z<X-1;Z++){let J=me(String(Z),re[Z],ie,ae,oe);L+=J===void 0?`null`:J,L+=Y}let Q=me(String(Z),re[Z],ie,ae,oe);if(L+=Q===void 0?`null`:Q,re.length-1>de){let J=re.length-de-1;L+=`${Y}"... ${se(J)} not stringified"`}return L+=`\n${J}`,ie.pop(),`[${L}]`}let X=Object.keys(re),ce=X.length;if(ce===0)return`{}`;if(ue<ie.length+1)return`"[Object]"`;oe+=ae;let le=`,\n${oe}`,fe=``,pe=``,he=Math.min(ce,de);te(re)&&(fe+=ne(re,le,de),X=X.slice(re.length),he-=re.length,pe=le),Z&&(X=$(X,ee)),ie.push(re);for(let L=0;L<he;L++){let J=X[L],Y=me(J,re[J],ie,ae,oe);Y!==void 0&&(fe+=`${pe}${Q(J)}: ${Y}`,pe=le)}if(ce>de){let L=ce-de;fe+=`${pe}"...": "${se(L)} not stringified"`,pe=le}return pe!==``&&(fe=`\n${oe}${fe}\n${J}`),ie.pop(),`{${fe}}`}case`number`:return isFinite(re)?String(re):J?J(re):`null`;case`boolean`:return re===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(re);default:return J?J(re):void 0}}function he(L,re,ie){switch(typeof re){case`string`:return Q(re);case`object`:{if(re===null)return`null`;if(typeof re.toJSON==`function`){if(re=re.toJSON(L),typeof re!=`object`)return he(L,re,ie);if(re===null)return`null`}if(ie.indexOf(re)!==-1)return Y;let J=``,X=re.length!==void 0;if(X&&Array.isArray(re)){if(re.length===0)return`[]`;if(ue<ie.length+1)return`"[Array]"`;ie.push(re);let L=Math.min(re.length,de),Y=0;for(;Y<L-1;Y++){let L=he(String(Y),re[Y],ie);J+=L===void 0?`null`:L,J+=`,`}let X=he(String(Y),re[Y],ie);if(J+=X===void 0?`null`:X,re.length-1>de){let L=re.length-de-1;J+=`,"... ${se(L)} not stringified"`}return ie.pop(),`[${J}]`}let ae=Object.keys(re),oe=ae.length;if(oe===0)return`{}`;if(ue<ie.length+1)return`"[Object]"`;let ce=``,le=Math.min(oe,de);X&&te(re)&&(J+=ne(re,`,`,de),ae=ae.slice(re.length),le-=re.length,ce=`,`),Z&&(ae=$(ae,ee)),ie.push(re);for(let L=0;L<le;L++){let Y=ae[L],X=he(Y,re[Y],ie);X!==void 0&&(J+=`${ce}${Q(Y)}:${X}`,ce=`,`)}if(oe>de){let L=oe-de;J+=`${ce}"...":"${se(L)} not stringified"`}return ie.pop(),`{${J}}`}case`number`:return isFinite(re)?String(re):J?J(re):`null`;case`boolean`:return re===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(re);default:return J?J(re):void 0}}function ge(L,J,Y){if(arguments.length>1){let X=``;if(typeof Y==`number`?X=` `.repeat(Math.min(Y,10)):typeof Y==`string`&&(X=Y.slice(0,10)),J!=null){if(typeof J==`function`)return fe(``,{"":L},[],J,X,``);if(Array.isArray(J))return pe(``,L,[],ce(J),X,``)}if(X.length!==0)return me(``,L,[],X,``)}return he(``,L,[])}return ge}})),import_safe_stable_stringify=__toESM(require_safe_stable_stringify(),1);const configure$1=import_safe_stable_stringify.configure,stringify=import_safe_stable_stringify.default;var require_symbols=__commonJSMin(((L,J)=>{let Y=typeof process<`u`&&process.env.TERM_PROGRAM===`Hyper`,X=typeof process<`u`&&process.platform===`win32`,Z=typeof process<`u`&&process.platform===`linux`,Q={ballotDisabled:`☒`,ballotOff:`☐`,ballotOn:`☑`,bullet:`•`,bulletWhite:`◦`,fullBlock:`█`,heart:`❤`,identicalTo:`≡`,line:`─`,mark:`※`,middot:`·`,minus:`-`,multiplication:`×`,obelus:`÷`,pencilDownRight:`✎`,pencilRight:`✏`,pencilUpRight:`✐`,percent:`%`,pilcrow2:`❡`,pilcrow:`¶`,plusMinus:`±`,question:`?`,section:`§`,starsOff:`☆`,starsOn:`★`,upDownArrow:`↕`},$=Object.assign({},Q,{check:`√`,cross:`×`,ellipsisLarge:`...`,ellipsis:`...`,info:`i`,questionSmall:`?`,pointer:`>`,pointerSmall:`»`,radioOff:`( )`,radioOn:`(*)`,warning:`‼`}),ee=Object.assign({},Q,{ballotCross:`✘`,check:`✔`,cross:`✖`,ellipsisLarge:`⋯`,ellipsis:`…`,info:`ℹ`,questionFull:`?`,questionSmall:`﹖`,pointer:Z?`▸`:`❯`,pointerSmall:Z?`‣`:`›`,radioOff:`◯`,radioOn:`◉`,warning:`⚠`});J.exports=X&&!Y?$:ee,Reflect.defineProperty(J.exports,`common`,{enumerable:!1,value:Q}),Reflect.defineProperty(J.exports,`windows`,{enumerable:!1,value:$}),Reflect.defineProperty(J.exports,`other`,{enumerable:!1,value:ee})})),require_ansi_colors=__commonJSMin(((L,J)=>{let Y=L=>typeof L==`object`&&!!L&&!Array.isArray(L),X=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Z=()=>typeof process<`u`?process.env.FORCE_COLOR!==`0`:!1,Q=()=>{let L={enabled:Z(),visible:!0,styles:{},keys:{}},J=L=>{let J=L.open=`\u001b[${L.codes[0]}m`,Y=L.close=`\u001b[${L.codes[1]}m`,X=L.regex=RegExp(`\\u001b\\[${L.codes[1]}m`,`g`);return L.wrap=(L,Z)=>{L.includes(Y)&&(L=L.replace(X,Y+J));let Q=J+L+Y;return Z?Q.replace(/\r*\n/g,`${Y}$&${J}`):Q},L},Q=(L,J,Y)=>typeof L==`function`?L(J):L.wrap(J,Y),$=(J,Y)=>{if(J===``||J==null)return``;if(L.enabled===!1)return J;if(L.visible===!1)return``;let X=``+J,Z=X.includes(`
106
+ `,`f`),__classPrivateFieldSet(this,_YargsInstance_output,__classPrivateFieldGet(this,_YargsInstance_output,`f`)+L.join(` `),`f`)}}}[kDeleteFromParserHintObject](L){objectKeys(__classPrivateFieldGet(this,_YargsInstance_options,`f`)).forEach(J=>{if((L=>L===`configObjects`)(J))return;let Y=__classPrivateFieldGet(this,_YargsInstance_options,`f`)[J];Array.isArray(Y)?Y.includes(L)&&Y.splice(Y.indexOf(L),1):typeof Y==`object`&&delete Y[L]}),delete __classPrivateFieldGet(this,_YargsInstance_usage,`f`).getDescriptions()[L]}[kEmitWarning](L,J,Y){__classPrivateFieldGet(this,_YargsInstance_emittedWarnings,`f`)[Y]||(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.emitWarning(L,J),__classPrivateFieldGet(this,_YargsInstance_emittedWarnings,`f`)[Y]=!0)}[kFreeze](){__classPrivateFieldGet(this,_YargsInstance_frozens,`f`).push({options:__classPrivateFieldGet(this,_YargsInstance_options,`f`),configObjects:__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects.slice(0),exitProcess:__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`),groups:__classPrivateFieldGet(this,_YargsInstance_groups,`f`),strict:__classPrivateFieldGet(this,_YargsInstance_strict,`f`),strictCommands:__classPrivateFieldGet(this,_YargsInstance_strictCommands,`f`),strictOptions:__classPrivateFieldGet(this,_YargsInstance_strictOptions,`f`),completionCommand:__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`),output:__classPrivateFieldGet(this,_YargsInstance_output,`f`),exitError:__classPrivateFieldGet(this,_YargsInstance_exitError,`f`),hasOutput:__classPrivateFieldGet(this,_YargsInstance_hasOutput,`f`),parsed:this.parsed,parseFn:__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`),parseContext:__classPrivateFieldGet(this,_YargsInstance_parseContext,`f`)}),__classPrivateFieldGet(this,_YargsInstance_usage,`f`).freeze(),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).freeze(),__classPrivateFieldGet(this,_YargsInstance_command,`f`).freeze(),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).freeze()}[kGetDollarZero](){let L=``,J;return J=/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.argv()[0])?__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.argv().slice(1,2):__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.argv().slice(0,1),L=J.map(L=>{let J=this[kRebase](__classPrivateFieldGet(this,_YargsInstance_cwd,`f`),L);return L.match(/^(\/|([a-zA-Z]:)?\\)/)&&J.length<L.length?J:L}).join(` `).trim(),__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`_`)&&__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getProcessArgvBin()===__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`_`)&&(L=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`_`).replace(`${__classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.dirname(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).process.execPath())}/`,``)),L}[kGetParserConfiguration](){return __classPrivateFieldGet(this,_YargsInstance_parserConfig,`f`)}[kGetUsageConfiguration](){return __classPrivateFieldGet(this,_YargsInstance_usageConfig,`f`)}[kGuessLocale](){if(!__classPrivateFieldGet(this,_YargsInstance_detectLocale,`f`))return;let L=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LC_ALL`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LC_MESSAGES`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LANG`)||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(L.replace(/[.:].*/,``))}[kGuessVersion](){return this[kPkgUp]().version||`unknown`}[kParsePositionalNumbers](L){let J=L[`--`]?L[`--`]:L._;for(let L=0,Y;(Y=J[L])!==void 0;L++)__classPrivateFieldGet(this,_YargsInstance_shim,`f`).Parser.looksLikeNumber(Y)&&Number.isSafeInteger(Math.floor(parseFloat(`${Y}`)))&&(J[L]=Number(Y));return L}[kPkgUp](L){let J=L||`*`;if(__classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J])return __classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J];let Y={};try{let J=L||__classPrivateFieldGet(this,_YargsInstance_shim,`f`).mainFilename;__classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.extname(J)&&(J=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.dirname(J));let X=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).findUp(J,(L,J)=>{if(J.includes(`package.json`))return`package.json`});assertNotStrictEqual(X,void 0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),Y=JSON.parse(__classPrivateFieldGet(this,_YargsInstance_shim,`f`).readFileSync(X,`utf8`))}catch{}return __classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J]=Y||{},__classPrivateFieldGet(this,_YargsInstance_pkgs,`f`)[J]}[kPopulateParserHintArray](L,J){J=[].concat(J),J.forEach(J=>{J=this[kSanitizeKey](J),__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L].push(J)})}[kPopulateParserHintSingleValueDictionary](L,J,Y,X){this[kPopulateParserHintDictionary](L,J,Y,X,(L,J,Y)=>{__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L][J]=Y})}[kPopulateParserHintArrayDictionary](L,J,Y,X){this[kPopulateParserHintDictionary](L,J,Y,X,(L,J,Y)=>{__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L][J]=(__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L][J]||[]).concat(Y)})}[kPopulateParserHintDictionary](L,J,Y,X,Z){if(Array.isArray(Y))Y.forEach(J=>{L(J,X)});else if((L=>typeof L==`object`)(Y))for(let J of objectKeys(Y))L(J,Y[J]);else Z(J,this[kSanitizeKey](Y),X)}[kSanitizeKey](L){return L===`__proto__`?`___proto___`:L}[kSetKey](L,J){return this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this),`key`,L,J),this}[kUnfreeze](){var L,J,Y,X,Z,Q,$,ee,te,ne,re,ie;let ae=__classPrivateFieldGet(this,_YargsInstance_frozens,`f`).pop();assertNotStrictEqual(ae,void 0,__classPrivateFieldGet(this,_YargsInstance_shim,`f`));let oe;L=this,J=this,Y=this,X=this,Z=this,Q=this,$=this,ee=this,te=this,ne=this,re=this,ie=this,{options:{set value(J){__classPrivateFieldSet(L,_YargsInstance_options,J,`f`)}}.value,configObjects:oe,exitProcess:{set value(L){__classPrivateFieldSet(J,_YargsInstance_exitProcess,L,`f`)}}.value,groups:{set value(L){__classPrivateFieldSet(Y,_YargsInstance_groups,L,`f`)}}.value,output:{set value(L){__classPrivateFieldSet(X,_YargsInstance_output,L,`f`)}}.value,exitError:{set value(L){__classPrivateFieldSet(Z,_YargsInstance_exitError,L,`f`)}}.value,hasOutput:{set value(L){__classPrivateFieldSet(Q,_YargsInstance_hasOutput,L,`f`)}}.value,parsed:this.parsed,strict:{set value(L){__classPrivateFieldSet($,_YargsInstance_strict,L,`f`)}}.value,strictCommands:{set value(L){__classPrivateFieldSet(ee,_YargsInstance_strictCommands,L,`f`)}}.value,strictOptions:{set value(L){__classPrivateFieldSet(te,_YargsInstance_strictOptions,L,`f`)}}.value,completionCommand:{set value(L){__classPrivateFieldSet(ne,_YargsInstance_completionCommand,L,`f`)}}.value,parseFn:{set value(L){__classPrivateFieldSet(re,_YargsInstance_parseFn,L,`f`)}}.value,parseContext:{set value(L){__classPrivateFieldSet(ie,_YargsInstance_parseContext,L,`f`)}}.value}=ae,__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects=oe,__classPrivateFieldGet(this,_YargsInstance_usage,`f`).unfreeze(),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unfreeze(),__classPrivateFieldGet(this,_YargsInstance_command,`f`).unfreeze(),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).unfreeze()}[kValidateAsync](L,J){return maybeAsyncResult(J,J=>(L(J),J))}getInternalMethods(){return{getCommandInstance:this[kGetCommandInstance].bind(this),getContext:this[kGetContext].bind(this),getHasOutput:this[kGetHasOutput].bind(this),getLoggerInstance:this[kGetLoggerInstance].bind(this),getParseContext:this[kGetParseContext].bind(this),getParserConfiguration:this[kGetParserConfiguration].bind(this),getUsageConfiguration:this[kGetUsageConfiguration].bind(this),getUsageInstance:this[kGetUsageInstance].bind(this),getValidationInstance:this[kGetValidationInstance].bind(this),hasParseCallback:this[kHasParseCallback].bind(this),isGlobalContext:this[kIsGlobalContext].bind(this),postProcess:this[kPostProcess].bind(this),reset:this[kReset].bind(this),runValidation:this[kRunValidation].bind(this),runYargsParserAndExecuteCommands:this[kRunYargsParserAndExecuteCommands].bind(this),setHasOutput:this[kSetHasOutput].bind(this)}}[kGetCommandInstance](){return __classPrivateFieldGet(this,_YargsInstance_command,`f`)}[kGetContext](){return __classPrivateFieldGet(this,_YargsInstance_context,`f`)}[kGetHasOutput](){return __classPrivateFieldGet(this,_YargsInstance_hasOutput,`f`)}[kGetLoggerInstance](){return __classPrivateFieldGet(this,_YargsInstance_logger,`f`)}[kGetParseContext](){return __classPrivateFieldGet(this,_YargsInstance_parseContext,`f`)||{}}[kGetUsageInstance](){return __classPrivateFieldGet(this,_YargsInstance_usage,`f`)}[kGetValidationInstance](){return __classPrivateFieldGet(this,_YargsInstance_validation,`f`)}[kHasParseCallback](){return!!__classPrivateFieldGet(this,_YargsInstance_parseFn,`f`)}[kIsGlobalContext](){return __classPrivateFieldGet(this,_YargsInstance_isGlobalContext,`f`)}[kPostProcess](L,J,Y,X){return Y||isPromise$1(L)?L:(J||(L=this[kCopyDoubleDash](L)),(this[kGetParserConfiguration]()[`parse-positional-numbers`]||this[kGetParserConfiguration]()[`parse-positional-numbers`]===void 0)&&(L=this[kParsePositionalNumbers](L)),X&&(L=applyMiddleware(L,this,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).getMiddleware(),!1)),L)}[kReset](L={}){__classPrivateFieldSet(this,_YargsInstance_options,__classPrivateFieldGet(this,_YargsInstance_options,`f`)||{},`f`);let J={};J.local=__classPrivateFieldGet(this,_YargsInstance_options,`f`).local||[],J.configObjects=__classPrivateFieldGet(this,_YargsInstance_options,`f`).configObjects||[];let Y={};return J.local.forEach(J=>{Y[J]=!0,(L[J]||[]).forEach(L=>{Y[L]=!0})}),Object.assign(__classPrivateFieldGet(this,_YargsInstance_preservedGroups,`f`),Object.keys(__classPrivateFieldGet(this,_YargsInstance_groups,`f`)).reduce((L,J)=>{let X=__classPrivateFieldGet(this,_YargsInstance_groups,`f`)[J].filter(L=>!(L in Y));return X.length>0&&(L[J]=X),L},{})),__classPrivateFieldSet(this,_YargsInstance_groups,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(L=>{J[L]=(__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L]||[]).filter(L=>!Y[L])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(L=>{J[L]=objFilter(__classPrivateFieldGet(this,_YargsInstance_options,`f`)[L],L=>!Y[L])}),J.envPrefix=__classPrivateFieldGet(this,_YargsInstance_options,`f`).envPrefix,__classPrivateFieldSet(this,_YargsInstance_options,J,`f`),__classPrivateFieldSet(this,_YargsInstance_usage,__classPrivateFieldGet(this,_YargsInstance_usage,`f`)?__classPrivateFieldGet(this,_YargsInstance_usage,`f`).reset(Y):usage(this,__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldSet(this,_YargsInstance_validation,__classPrivateFieldGet(this,_YargsInstance_validation,`f`)?__classPrivateFieldGet(this,_YargsInstance_validation,`f`).reset(Y):validation(this,__classPrivateFieldGet(this,_YargsInstance_usage,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldSet(this,_YargsInstance_command,__classPrivateFieldGet(this,_YargsInstance_command,`f`)?__classPrivateFieldGet(this,_YargsInstance_command,`f`).reset():command(__classPrivateFieldGet(this,_YargsInstance_usage,`f`),__classPrivateFieldGet(this,_YargsInstance_validation,`f`),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldGet(this,_YargsInstance_completion,`f`)||__classPrivateFieldSet(this,_YargsInstance_completion,completion(this,__classPrivateFieldGet(this,_YargsInstance_usage,`f`),__classPrivateFieldGet(this,_YargsInstance_command,`f`),__classPrivateFieldGet(this,_YargsInstance_shim,`f`)),`f`),__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).reset(),__classPrivateFieldSet(this,_YargsInstance_completionCommand,null,`f`),__classPrivateFieldSet(this,_YargsInstance_output,``,`f`),__classPrivateFieldSet(this,_YargsInstance_exitError,null,`f`),__classPrivateFieldSet(this,_YargsInstance_hasOutput,!1,`f`),this.parsed=!1,this}[kRebase](L,J){return __classPrivateFieldGet(this,_YargsInstance_shim,`f`).path.relative(L,J)}[kRunYargsParserAndExecuteCommands](L,J,Y,X=0,Z=!1){var Q,$,ee,te;let ne=!!Y||Z;L||=__classPrivateFieldGet(this,_YargsInstance_processArgs,`f`),__classPrivateFieldGet(this,_YargsInstance_options,`f`).__=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).y18n.__,__classPrivateFieldGet(this,_YargsInstance_options,`f`).configuration=this[kGetParserConfiguration]();let re=!!__classPrivateFieldGet(this,_YargsInstance_options,`f`).configuration[`populate--`],ie=Object.assign({},__classPrivateFieldGet(this,_YargsInstance_options,`f`).configuration,{"populate--":!0}),ae=__classPrivateFieldGet(this,_YargsInstance_shim,`f`).Parser.detailed(L,Object.assign({},__classPrivateFieldGet(this,_YargsInstance_options,`f`),{configuration:{"parse-positional-numbers":!1,...ie}})),oe=Object.assign(ae.argv,__classPrivateFieldGet(this,_YargsInstance_parseContext,`f`)),se,ce=ae.aliases,le=!1,ue=!1;Object.keys(oe).forEach(L=>{L===__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)&&oe[L]?le=!0:L===__classPrivateFieldGet(this,_YargsInstance_versionOpt,`f`)&&oe[L]&&(ue=!0)}),oe.$0=this.$0,this.parsed=ae,X===0&&__classPrivateFieldGet(this,_YargsInstance_usage,`f`).clearCachedHelpMessage();try{if(this[kGuessLocale](),J)return this[kPostProcess](oe,re,!!Y,!1);__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)&&[__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)].concat(ce[__classPrivateFieldGet(this,_YargsInstance_helpOpt,`f`)]||[]).filter(L=>L.length>1).includes(``+oe._[oe._.length-1])&&(oe._.pop(),le=!0),__classPrivateFieldSet(this,_YargsInstance_isGlobalContext,!1,`f`);let Q=__classPrivateFieldGet(this,_YargsInstance_command,`f`).getCommands(),$=__classPrivateFieldGet(this,_YargsInstance_completion,`f`)?.completionKey?[__classPrivateFieldGet(this,_YargsInstance_completion,`f`)?.completionKey,...this.getAliases()[__classPrivateFieldGet(this,_YargsInstance_completion,`f`)?.completionKey]??[]].some(L=>Object.prototype.hasOwnProperty.call(oe,L)):!1,ee=le||$||Z;if(oe._.length){if(Q.length){let L;for(let J=X||0,$;oe._[J]!==void 0;J++)if($=String(oe._[J]),Q.includes($)&&$!==__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)){let L=__classPrivateFieldGet(this,_YargsInstance_command,`f`).runCommand($,this,ae,J+1,Z,le||ue||Z);return this[kPostProcess](L,re,!!Y,!1)}else if(!L&&$!==__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)){L=$;break}!__classPrivateFieldGet(this,_YargsInstance_command,`f`).hasDefaultCommand()&&__classPrivateFieldGet(this,_YargsInstance_recommendCommands,`f`)&&L&&!ee&&__classPrivateFieldGet(this,_YargsInstance_validation,`f`).recommendCommands(L,Q)}__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`)&&oe._.includes(__classPrivateFieldGet(this,_YargsInstance_completionCommand,`f`))&&!$&&(__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),this.showCompletionScript(),this.exit(0))}if(__classPrivateFieldGet(this,_YargsInstance_command,`f`).hasDefaultCommand()&&!ee){let L=__classPrivateFieldGet(this,_YargsInstance_command,`f`).runCommand(null,this,ae,0,Z,le||ue||Z);return this[kPostProcess](L,re,!!Y,!1)}if($){__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),L=[].concat(L);let J=L.slice(L.indexOf(`--${__classPrivateFieldGet(this,_YargsInstance_completion,`f`).completionKey}`)+1);return __classPrivateFieldGet(this,_YargsInstance_completion,`f`).getCompletion(J,(L,J)=>{if(L)throw new YError(L.message);(J||[]).forEach(L=>{__classPrivateFieldGet(this,_YargsInstance_logger,`f`).log(L)}),this.exit(0)}),this[kPostProcess](oe,!re,!!Y,!1)}if(__classPrivateFieldGet(this,_YargsInstance_hasOutput,`f`)||(le?(__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),ne=!0,this.showHelp(L=>{__classPrivateFieldGet(this,_YargsInstance_logger,`f`).log(L),this.exit(0)})):ue&&(__classPrivateFieldGet(this,_YargsInstance_exitProcess,`f`)&&setBlocking(!0),ne=!0,__classPrivateFieldGet(this,_YargsInstance_usage,`f`).showVersion(`log`),this.exit(0))),!ne&&__classPrivateFieldGet(this,_YargsInstance_options,`f`).skipValidation.length>0&&(ne=Object.keys(oe).some(L=>__classPrivateFieldGet(this,_YargsInstance_options,`f`).skipValidation.indexOf(L)>=0&&oe[L]===!0)),!ne){if(ae.error)throw new YError(ae.error.message);if(!$){let L=this[kRunValidation](ce,{},ae.error);Y||(se=applyMiddleware(oe,this,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).getMiddleware(),!0)),se=this[kValidateAsync](L,se??oe),isPromise$1(se)&&!Y&&(se=se.then(()=>applyMiddleware(oe,this,__classPrivateFieldGet(this,_YargsInstance_globalMiddleware,`f`).getMiddleware(),!1)))}}}catch(L){if(L instanceof YError)__classPrivateFieldGet(this,_YargsInstance_usage,`f`).fail(L.message,L);else throw L}return this[kPostProcess](se??oe,re,!!Y,!0)}[kRunValidation](L,J,Y,X){let Z={...this.getDemandedOptions()};return Q=>{if(Y)throw new YError(Y.message);__classPrivateFieldGet(this,_YargsInstance_validation,`f`).nonOptionCount(Q),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).requiredArguments(Q,Z);let $=!1;__classPrivateFieldGet(this,_YargsInstance_strictCommands,`f`)&&($=__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unknownCommands(Q)),__classPrivateFieldGet(this,_YargsInstance_strict,`f`)&&!$?__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unknownArguments(Q,L,J,!!X):__classPrivateFieldGet(this,_YargsInstance_strictOptions,`f`)&&__classPrivateFieldGet(this,_YargsInstance_validation,`f`).unknownArguments(Q,L,{},!1,!1),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).limitedChoices(Q),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).implications(Q),__classPrivateFieldGet(this,_YargsInstance_validation,`f`).conflicting(Q)}}[kSetHasOutput](){__classPrivateFieldSet(this,_YargsInstance_hasOutput,!0,`f`)}[kTrackManuallySetKeys](L){if(typeof L==`string`)__classPrivateFieldGet(this,_YargsInstance_options,`f`).key[L]=!0;else for(let J of L)__classPrivateFieldGet(this,_YargsInstance_options,`f`).key[J]=!0}};function isYargsInstance(L){return!!L&&typeof L.getInternalMethods==`function`}const Yargs=YargsFactory(esm_default);var name=`metascope`,version$1=`0.2.0`,bin={metascope:`dist/bin/cli.js`};function isPlainObject$7(L){if(typeof L!=`object`||!L)return!1;let J=Object.getPrototypeOf(L);return J!==null&&J!==Object.prototype&&Object.getPrototypeOf(J)!==null||Symbol.iterator in L?!1:Symbol.toStringTag in L?Object.prototype.toString.call(L)===`[object Module]`:!0}function _defu(L,J,Y=`.`,X){if(!isPlainObject$7(J))return _defu(L,{},Y,X);let Z=Object.assign({},J);for(let J in L){if(J===`__proto__`||J===`constructor`)continue;let Q=L[J];Q!=null&&(X&&X(Z,J,Q,Y)||(Array.isArray(Q)&&Array.isArray(Z[J])?Z[J]=[...Q,...Z[J]]:isPlainObject$7(Q)&&isPlainObject$7(Z[J])?Z[J]=_defu(Q,Z[J],(Y?`${Y}.`:``)+J.toString(),X):Z[J]=Q))}return Z}function createDefu(L){return(...J)=>J.reduce((J,Y)=>_defu(J,Y,``,L),{})}const defu=createDefu(),defuFn=createDefu((L,J,Y)=>{if(L[J]!==void 0&&typeof Y==`function`)return L[J]=Y(L[J]),!0}),defuArrayFn=createDefu((L,J,Y)=>{if(Array.isArray(L[J])&&typeof Y==`function`)return L[J]=Y(L[J]),!0});let LogLevel=function(L){return L.info=`info`,L.warn=`warn`,L.error=`error`,L.debug=`debug`,L.trace=`trace`,L.fatal=`fatal`,L}({});const LogLevelPriority={[LogLevel.trace]:10,[LogLevel.debug]:20,[LogLevel.info]:30,[LogLevel.warn]:40,[LogLevel.error]:50,[LogLevel.fatal]:60},LogLevelPriorityToNames={10:LogLevel.trace,20:LogLevel.debug,30:LogLevel.info,40:LogLevel.warn,50:LogLevel.error,60:LogLevel.fatal},LAZY_SYMBOL=Symbol.for(`loglayer.lazy`),LAZY_EVAL_ERROR=`[LazyEvalError]`;function isLazy(L){return typeof L==`object`&&!!L&&LAZY_SYMBOL in L}function countLazyValues(L){let J=0;for(let Y of Object.keys(L))isLazy(L[Y])&&J++;return J}function resolveLazyValues(L){let J=!1;for(let Y of Object.keys(L))if(isLazy(L[Y])){J=!0;break}if(!J)return{resolved:L,errors:null};let Y={},X=null;for(let J of Object.keys(L)){let Z=L[J];if(isLazy(Z))try{Y[J]=Z[LAZY_SYMBOL]()}catch(L){Y[J]=LAZY_EVAL_ERROR,X||=[],X.push({key:J,error:L})}else Y[J]=Z}return{resolved:Y,errors:X}}function hasPromiseValues(L){for(let J of Object.keys(L))if(L[J]instanceof Promise)return!0;return!1}function replacePromiseValues(L){let J=null,Y={};for(let X of Object.keys(L))L[X]instanceof Promise?(Y[X]=LAZY_EVAL_ERROR,J||=[],J.push(X)):Y[X]=L[X];return J?{resolved:Y,asyncKeys:J}:{resolved:L,asyncKeys:null}}async function resolvePromiseValues(L){let J=Object.keys(L),Y=await Promise.allSettled(J.map(J=>Promise.resolve(L[J]))),X={},Z=null;for(let L=0;L<J.length;L++){let Q=Y[L];Q.status===`fulfilled`?X[J[L]]=Q.value:(X[J[L]]=LAZY_EVAL_ERROR,Z||=[],Z.push({key:J[L],error:Q.reason}))}return{resolved:X,errors:Z}}let PluginCallbackType=function(L){return L.transformLogLevel=`transformLogLevel`,L.onBeforeDataOut=`onBeforeDataOut`,L.shouldSendToLogger=`shouldSendToLogger`,L.onMetadataCalled=`onMetadataCalled`,L.onBeforeMessageOut=`onBeforeMessageOut`,L.onContextCalled=`onContextCalled`,L}({});var DefaultContextManager=class L{context={};hasContext=!1;setContext(L){if(!L){this.context={},this.hasContext=!1;return}this.context=L,this.hasContext=!0}appendContext(L){this.context={...this.context,...L},this.hasContext=!0}getContext(){return this.context}hasContextData(){return this.hasContext}clearContext(L){if(L===void 0){this.context={},this.hasContext=!1;return}let J=Array.isArray(L)?L:[L];for(let L of J)delete this.context[L];this.hasContext=Object.keys(this.context).length>0}onChildLoggerCreated({parentContextManager:L,childContextManager:J}){if(L.hasContextData()){let Y=L.getContext();J.setContext({...Y})}}clone(){let J=new L;return J.setContext({...this.context}),J.hasContext=this.hasContext,J}},MockContextManager=class L{setContext(L){}appendContext(L){}getContext(){return{}}hasContextData(){return!1}clearContext(L){}onChildLoggerCreated(L){}clone(){return new L}},DefaultLogLevelManager=class L{logLevelEnabledStatus={info:!0,warn:!0,error:!0,debug:!0,trace:!0,fatal:!0};setLevel(L){let J=LogLevelPriority[L];for(let L of Object.values(LogLevel)){let Y=L,X=LogLevelPriority[L];this.logLevelEnabledStatus[Y]=X>=J}}enableIndividualLevel(L){let J=L;J in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[J]=!0)}disableIndividualLevel(L){let J=L;J in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[J]=!1)}isLevelEnabled(L){let J=L;return this.logLevelEnabledStatus[J]}enableLogging(){for(let L of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[L]=!0}disableLogging(){for(let L of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[L]=!1}onChildLoggerCreated({parentLogLevelManager:J,childLogLevelManager:Y}){let X=J.logLevelEnabledStatus;Y instanceof L&&(Y.logLevelEnabledStatus={...X})}clone(){let J=new L;return J.logLevelEnabledStatus={...this.logLevelEnabledStatus},J}},MockLogLevelManager=class L{setLevel(L){}enableIndividualLevel(L){}disableIndividualLevel(L){}isLevelEnabled(L){return!0}enableLogging(){}disableLogging(){}onChildLoggerCreated(L){}clone(){return new L}},BaseTransport=class{id;logger;enabled;consoleDebug;level;constructor(L){this.id=L.id??Date.now().toString()+Math.random().toString(),this.logger=L.logger,this.enabled=L.enabled??!0,this.consoleDebug=L.consoleDebug??!1,this.level=L.level??`trace`}_sendToLogger(L){if(!this.enabled||LogLevelPriority[L.logLevel]<LogLevelPriority[this.level])return;let J=this.shipToLogger(L);if(this.consoleDebug)switch(L.logLevel){case LogLevel.info:console.info(...J);break;case LogLevel.warn:console.warn(...J);break;case LogLevel.error:console.error(...J);break;case LogLevel.trace:console.debug(...J);break;case LogLevel.debug:console.debug(...J);break;case LogLevel.fatal:console.debug(...J);break;default:console.log(...J)}}getLoggerInstance(){return this.logger}},LoggerlessTransport=class{id;enabled;level;consoleDebug;constructor(L){this.id=Date.now().toString()+Math.random().toString(),this.enabled=L.enabled??!0,this.consoleDebug=L.consoleDebug??!1,this.level=L.level??`trace`}_sendToLogger(L){if(!this.enabled||LogLevelPriority[L.logLevel]<LogLevelPriority[this.level])return;let J=this.shipToLogger(L);if(this.consoleDebug)switch(L.logLevel){case LogLevel.info:console.info(...J);break;case LogLevel.warn:console.warn(...J);break;case LogLevel.error:console.error(...J);break;case LogLevel.trace:console.debug(...J);break;case LogLevel.debug:console.debug(...J);break;case LogLevel.fatal:console.debug(...J);break;default:console.log(...J)}}getLoggerInstance(){throw Error(`This transport does not have a logger instance`)}};const CALLBACK_LIST=[PluginCallbackType.onBeforeDataOut,PluginCallbackType.onMetadataCalled,PluginCallbackType.onBeforeMessageOut,PluginCallbackType.transformLogLevel,PluginCallbackType.shouldSendToLogger,PluginCallbackType.onContextCalled];var PluginManager=class{idToPlugin;transformLogLevel=[];onBeforeDataOut=[];shouldSendToLogger=[];onMetadataCalled=[];onBeforeMessageOut=[];onContextCalled=[];constructor(L){this.idToPlugin={},this.mapPlugins(L),this.indexPlugins()}mapPlugins(L){for(let J of L){if(J.id||=Date.now().toString()+Math.random().toString(),this.idToPlugin[J.id])throw Error(`[LogLayer] Plugin with id ${J.id} already exists.`);J.registeredAt=Date.now(),this.idToPlugin[J.id]=J}}indexPlugins(){this.transformLogLevel=[],this.onBeforeDataOut=[],this.shouldSendToLogger=[],this.onMetadataCalled=[],this.onBeforeMessageOut=[],this.onContextCalled=[];let L=Object.values(this.idToPlugin).sort((L,J)=>L.registeredAt-J.registeredAt);for(let J of L){if(J.disabled)return;for(let L of CALLBACK_LIST)J[L]&&J.id&&this[L].push(J.id)}}hasPlugins(L){return this[L].length>0}countPlugins(L){return L?this[L].length:Object.keys(this.idToPlugin).length}addPlugins(L){this.mapPlugins(L),this.indexPlugins()}enablePlugin(L){let J=this.idToPlugin[L];J&&(J.disabled=!1),this.indexPlugins()}disablePlugin(L){let J=this.idToPlugin[L];J&&(J.disabled=!0),this.indexPlugins()}removePlugin(L){delete this.idToPlugin[L],this.indexPlugins()}runTransformLogLevel(L,J){let Y=null;for(let X of this.transformLogLevel){let Z=this.idToPlugin[X];if(Z.transformLogLevel){let X=Z.transformLogLevel({data:L.data,logLevel:L.logLevel,messages:L.messages,error:L.error,metadata:L.metadata,context:L.context},J);X!=null&&X!==!1&&(Y=X)}}return Y!=null&&Y!==!1?Y:L.logLevel}runOnBeforeDataOut(L,J){let Y={...L};for(let L of this.onBeforeDataOut){let X=this.idToPlugin[L];if(X.onBeforeDataOut){let L=X.onBeforeDataOut({data:Y.data,logLevel:Y.logLevel,error:Y.error,metadata:Y.metadata,context:Y.context},J);L&&(Y.data||={},Object.assign(Y.data,L))}}return Y.data}runShouldSendToLogger(L,J){return!this.shouldSendToLogger.some(Y=>!this.idToPlugin[Y].shouldSendToLogger?.(L,J))}runOnMetadataCalled(L,J){let Y={...L};for(let L of this.onMetadataCalled){let X=this.idToPlugin[L].onMetadataCalled?.(Y,J);if(X)Y=X;else return null}return Y}runOnBeforeMessageOut(L,J){let Y=[...L.messages];for(let X of this.onBeforeMessageOut){let Z=this.idToPlugin[X].onBeforeMessageOut?.({messages:Y,logLevel:L.logLevel},J);Z&&(Y=Z)}return Y}runOnContextCalled(L,J){let Y={...L};for(let L of this.onContextCalled){let X=this.idToPlugin[L].onContextCalled?.(Y,J);if(X)Y=X;else return null}return Y}},LogLayer=class L{pluginManager;idToTransport;hasMultipleTransports;singleTransport;contextManager;logLevelManager;_isLoggingLazyError=!1;_lazyContextCount=0;_assignedGroups=null;_groupsConfig=null;_activeGroups=null;_ungroupedBehavior=`all`;_config;constructor(L){this._config={...L,enabled:L.enabled??!0},this.contextManager=new DefaultContextManager,this.logLevelManager=new DefaultLogLevelManager,this._config.enabled||this.disableLogging(),this.pluginManager=new PluginManager([...L.plugins||[],...mixinRegistry.pluginsToInit]),this._config.errorFieldName||(this._config.errorFieldName=`err`),this._config.copyMsgOnOnlyError||(this._config.copyMsgOnOnlyError=!1),this._initializeTransports(this._config.transport),this._groupsConfig=L.groups?{...L.groups}:null,this._ungroupedBehavior=L.ungroupedBehavior??`all`,this._activeGroups=L.activeGroups?new Set(L.activeGroups):null,this._parseEnvGroups(),mixinRegistry.logLayerHandlers.length>0&&mixinRegistry.logLayerHandlers.forEach(J=>{J.onConstruct&&J.onConstruct(this,L)})}withContextManager(L){return this.contextManager&&typeof this.contextManager[Symbol.dispose]==`function`&&this.contextManager[Symbol.dispose](),this.contextManager=L,this._lazyContextCount=L.hasContextData()?countLazyValues(L.getContext()):0,this}getContextManager(){return this.contextManager}withLogLevelManager(L){return this.logLevelManager&&typeof this.logLevelManager[Symbol.dispose]==`function`&&this.logLevelManager[Symbol.dispose](),this.logLevelManager=L,this}getLogLevelManager(){return this.logLevelManager}getConfig(){return this._config}_initializeTransports(L){if(this.idToTransport)for(let L in this.idToTransport)this.idToTransport[L]&&typeof this.idToTransport[L][Symbol.dispose]==`function`&&this.idToTransport[L][Symbol.dispose]();this.hasMultipleTransports=Array.isArray(L)&&L.length>1,this.singleTransport=this.hasMultipleTransports?null:Array.isArray(L)?L[0]:L,Array.isArray(L)?this.idToTransport=L.reduce((L,J)=>(L[J.id]=J,L),{}):this.idToTransport={[L.id]:L}}withPrefix(L){let J=this.child();return J._config.prefix=L,J}withGroup(L){let J=this.child(),Y=Array.isArray(L)?L:[L];if(J._assignedGroups){let L=new Set([...J._assignedGroups,...Y]);J._assignedGroups=Array.from(L)}else J._assignedGroups=[...Y];return J}addGroup(L,J){return this._groupsConfig||={},this._groupsConfig[L]={...J},this}removeGroup(L){return this._groupsConfig&&(delete this._groupsConfig[L],Object.keys(this._groupsConfig).length===0&&(this._groupsConfig=null)),this}enableGroup(L){return this._groupsConfig?.[L]&&(this._groupsConfig[L]={...this._groupsConfig[L],enabled:!0}),this}disableGroup(L){return this._groupsConfig?.[L]&&(this._groupsConfig[L]={...this._groupsConfig[L],enabled:!1}),this}setGroupLevel(L,J){return this._groupsConfig?.[L]&&(this._groupsConfig[L]={...this._groupsConfig[L],level:J}),this}setActiveGroups(L){return this._activeGroups=L?new Set(L):null,this}getGroups(){return this._groupsConfig?{...this._groupsConfig}:{}}withContext(L){let J=L;if(!L)return this._config.consoleDebug&&console.debug(`[LogLayer] withContext was called with no context; dropping.`),this;if(this.pluginManager.hasPlugins(PluginCallbackType.onContextCalled)&&(J=this.pluginManager.runOnContextCalled(L,this),!J))return this._config.consoleDebug&&console.debug(`[LogLayer] Context was dropped due to plugin returning falsy value.`),this;let Y=this.contextManager.getContext();for(let L of Object.keys(J)){let X=L in Y&&isLazy(Y[L]),Z=isLazy(J[L]);!X&&Z?this._lazyContextCount++:X&&!Z&&this._lazyContextCount--}return this.contextManager.appendContext(J),this}clearContext(L){if(L!==void 0&&this._lazyContextCount>0){let J=this.contextManager.getContext(),Y=Array.isArray(L)?L:[L];for(let L of Y)L in J&&isLazy(J[L])&&this._lazyContextCount--}else L===void 0&&(this._lazyContextCount=0);return this.contextManager.clearContext(L),this}getContext(L){let J=this.contextManager.getContext();if(L?.raw||this._lazyContextCount===0)return J;let{resolved:Y,errors:X}=resolveLazyValues(J);X&&this._logLazyEvalErrors(X,`context`);let{resolved:Z,asyncKeys:Q}=replacePromiseValues(Y);return Q&&this._logAsyncLazyContextErrors(Q),Z}addPlugins(L){this.pluginManager.addPlugins(L)}enablePlugin(L){this.pluginManager.enablePlugin(L)}disablePlugin(L){this.pluginManager.disablePlugin(L)}removePlugin(L){this.pluginManager.removePlugin(L)}withMetadata(L){return new LogBuilder(this).withMetadata(L)}withError(L){return new LogBuilder(this).withError(L)}child(){let J=new L({...this._config,transport:Array.isArray(this._config.transport)?[...this._config.transport]:this._config.transport}).withPluginManager(this.pluginManager).withContextManager(this.contextManager.clone()).withLogLevelManager(this.logLevelManager.clone());return this.contextManager.onChildLoggerCreated({parentContextManager:this.contextManager,childContextManager:J.contextManager,parentLogger:this,childLogger:J}),this.logLevelManager.onChildLoggerCreated({parentLogLevelManager:this.logLevelManager,childLogLevelManager:J.logLevelManager,parentLogger:this,childLogger:J}),J._lazyContextCount=J.contextManager.hasContextData()?countLazyValues(J.contextManager.getContext()):0,J._groupsConfig=this._groupsConfig,J._activeGroups=this._activeGroups,J._ungroupedBehavior=this._ungroupedBehavior,J._assignedGroups=this._assignedGroups?[...this._assignedGroups]:null,J}withFreshTransports(L){return this._config.transport=L,this._initializeTransports(L),this}addTransport(L){let J=Array.isArray(L)?L:[L],Y=Array.isArray(this._config.transport)?this._config.transport:[this._config.transport],X=new Set(J.map(L=>L.id));for(let L of J){let J=this.idToTransport[L.id];J&&typeof J[Symbol.dispose]==`function`&&J[Symbol.dispose]()}let Z=[...Y.filter(L=>!X.has(L.id)),...J];this._config.transport=Z;for(let L of J)this.idToTransport[L.id]=L;return this.hasMultipleTransports=Z.length>1,this.singleTransport=this.hasMultipleTransports?null:Z[0],this}removeTransport(L){let J=this.idToTransport[L];if(!J)return!1;typeof J[Symbol.dispose]==`function`&&J[Symbol.dispose](),delete this.idToTransport[L];let Y=(Array.isArray(this._config.transport)?this._config.transport:[this._config.transport]).filter(J=>J.id!==L);return this._config.transport=Y.length===1?Y[0]:Y,this.hasMultipleTransports=Y.length>1,this.singleTransport=this.hasMultipleTransports?null:Y[0]||null,!0}withFreshPlugins(L){return this._config.plugins=L,this.pluginManager=new PluginManager(L),this}withPluginManager(L){return this.pluginManager=L,this}errorOnly(L,J){let Y=J?.logLevel||LogLevel.error;if(!this.isLevelEnabled(Y))return;let{copyMsgOnOnlyError:X}=this._config,Z={logLevel:Y,err:L};(X&&J?.copyMsg!==!1||J?.copyMsg===!0)&&L?.message&&(Z.params=[L.message]),this._formatLog(Z)}metadataOnly(L,J=LogLevel.info){if(!this.isLevelEnabled(J))return;let{muteMetadata:Y,consoleDebug:X}=this._config;if(Y)return;if(!L){X&&console.debug(`[LogLayer] metadataOnly was called with no metadata; dropping.`);return}let Z=L;if(this.pluginManager.hasPlugins(PluginCallbackType.onMetadataCalled)&&(Z=this.pluginManager.runOnMetadataCalled(L,this),!Z)){X&&console.debug(`[LogLayer] Metadata was dropped due to plugin returning falsy value.`);return}let Q={logLevel:J,metadata:Z};return this._formatLog(Q)}info(...L){this.isLevelEnabled(LogLevel.info)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.info,params:L}))}warn(...L){this.isLevelEnabled(LogLevel.warn)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.warn,params:L}))}error(...L){this.isLevelEnabled(LogLevel.error)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.error,params:L}))}debug(...L){this.isLevelEnabled(LogLevel.debug)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.debug,params:L}))}trace(...L){this.isLevelEnabled(LogLevel.trace)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.trace,params:L}))}fatal(...L){this.isLevelEnabled(LogLevel.fatal)&&(this._formatMessage(L),this._formatLog({logLevel:LogLevel.fatal,params:L}))}raw(L){if(!this.isLevelEnabled(L.logLevel))return;let J={logLevel:L.logLevel,params:L.messages,metadata:L.metadata,err:L.error,context:L.context};return this._formatMessage(L.messages),this._formatLog(J)}disableLogging(){return this.logLevelManager.disableLogging(),this}enableLogging(){return this.logLevelManager.enableLogging(),this}muteContext(){return this._config.muteContext=!0,this}unMuteContext(){return this._config.muteContext=!1,this}muteMetadata(){return this._config.muteMetadata=!0,this}unMuteMetadata(){return this._config.muteMetadata=!1,this}enableIndividualLevel(L){return this.logLevelManager.enableIndividualLevel(L),this}disableIndividualLevel(L){return this.logLevelManager.disableIndividualLevel(L),this}setLevel(L){return this.logLevelManager.setLevel(L),this}isLevelEnabled(L){return this.logLevelManager.isLevelEnabled(L)}formatContext(L){let{contextFieldName:J,muteContext:Y}=this._config;return L&&Object.keys(L).length>0&&!Y?J?{[J]:{...L}}:{...L}:{}}formatMetadata(L=null){let{metadataFieldName:J,muteMetadata:Y}=this._config;return L&&!Y?J?{[J]:{...L}}:{...L}:{}}getLoggerInstance(L){let J=this.idToTransport[L];if(J)return J.getLoggerInstance()}_parseEnvGroups(){let L=typeof process<`u`?process.env?.LOGLAYER_GROUPS:void 0;if(!L)return;let J=L.split(`,`).map(L=>L.trim()).filter(Boolean),Y=[];for(let L of J){let J=L.indexOf(`:`);if(J>0){let X=L.slice(0,J),Z=L.slice(J+1);Y.push(X),this._groupsConfig?.[X]&&(this._groupsConfig[X]={...this._groupsConfig[X],level:Z})}else Y.push(L)}this._activeGroups=new Set(Y)}_mergeGroups(L){if(this._assignedGroups&&L){let J=new Set([...this._assignedGroups,...L]);return Array.from(J)}return L||this._assignedGroups}_applyUngroupedRules(L){return this._ungroupedBehavior===`all`?!0:this._ungroupedBehavior===`none`?!1:this._ungroupedBehavior.includes(L)}_shouldTransportReceiveLog(L,J,Y){if(!this._groupsConfig)return!0;let X=this._mergeGroups(Y);if(!X||X.length===0)return this._applyUngroupedRules(L);let Z=!1;for(let Y of X){let X=this._groupsConfig[Y];if(X&&(Z=!0,X.enabled!==!1&&!(this._activeGroups&&!this._activeGroups.has(Y)))){if(X.level){let L=LogLevelPriority[X.level];if(LogLevelPriority[J]<L)continue}if(X.transports.includes(L))return!0}}return Z?!1:this._applyUngroupedRules(L)}_formatMessage(L=[]){let{prefix:J}=this._config;J&&typeof L[0]==`string`&&(L[0]=`${J} ${L[0]}`)}_formatLog({logLevel:L,params:J=[],metadata:Y=null,err:X,context:Z=null,groups:Q=null}){let $=Z===null?this.contextManager.getContext():Z,ee;if(this._lazyContextCount>0||Z!==null){let L=resolveLazyValues($);L.errors&&this._logLazyEvalErrors(L.errors,`context`);let{resolved:J,asyncKeys:Y}=replacePromiseValues(L.resolved);Y&&this._logAsyncLazyContextErrors(Y),ee=J}else ee=$;let te=null;if(Y){let L=resolveLazyValues(Y);Y=L.resolved,te=L.errors}if(te&&this._logLazyEvalErrors(te,`metadata`),Y&&hasPromiseValues(Y))return this._resolveAsyncAndProcess(L,J,ee,Y,X,Z,Q);this._processLog(L,J,ee,Y,X,Z,Q)}async _resolveAsyncAndProcess(L,J,Y,X,Z,Q,$){let ee=null;if(X){let L=await resolvePromiseValues(X);ee=L.resolved,L.errors&&this._logLazyEvalErrors(L.errors,`metadata`)}this._processLog(L,J,Y,ee,Z,Q,$)}_logLazyEvalErrors(L,J){if(this._isLoggingLazyError){for(let Y of L)console.error(`[LogLayer] Lazy evaluation error in ${J} key "${Y.key}":`,Y.error);return}this._isLoggingLazyError=!0;try{for(let Y of L){let L=Y.error instanceof Error?Y.error.message:String(Y.error);this._processLog(LogLevel.error,[`[LogLayer] Lazy evaluation failed for ${J} key "${Y.key}": ${L}`],{},null,Y.error instanceof Error?Y.error:void 0,{})}}finally{this._isLoggingLazyError=!1}}_logAsyncLazyContextErrors(L){if(this._isLoggingLazyError){for(let J of L)console.error(`[LogLayer] Async lazy values are not supported in context (key "${J}"). Use async lazy only in metadata.`);return}this._isLoggingLazyError=!0;try{for(let J of L)this._processLog(LogLevel.error,[`[LogLayer] Async lazy values are not supported in context (key "${J}"). Use async lazy only in metadata.`],{},null,void 0,{})}finally{this._isLoggingLazyError=!1}}_processLog(L,J,Y,X,Z,Q,$=null){let{errorSerializer:ee,errorFieldInMetadata:te,muteContext:ne,contextFieldName:re,metadataFieldName:ie,errorFieldName:ae}=this._config,oe=!!X||(ne?!1:Q===null?this.contextManager.hasContextData():Object.keys(Q).length>0),se={};if(oe)if(re&&re===ie){let L=this.formatContext(Y)[re],J=this.formatMetadata(X)[ie];se={[re]:{...L,...J}}}else se={...this.formatContext(Y),...this.formatMetadata(X)};if(Z){let L=ee?ee(Z):Z;te&&X&&ie?se?.[ie]?se[ie][ae]=L:se={...se,[ie]:{[ae]:L}}:se=te&&!X&&ie?{...se,[ie]:{[ae]:L}}:{...se,[ae]:L},oe=!0}this.pluginManager.hasPlugins(PluginCallbackType.onBeforeDataOut)&&(se=this.pluginManager.runOnBeforeDataOut({data:oe?se:void 0,logLevel:L,error:Z,metadata:X,context:Y},this),se&&!oe&&(oe=!0)),this.pluginManager.hasPlugins(PluginCallbackType.onBeforeMessageOut)&&(J=this.pluginManager.runOnBeforeMessageOut({messages:[...J],logLevel:L},this)),this.pluginManager.hasPlugins(PluginCallbackType.transformLogLevel)&&(L=this.pluginManager.runTransformLogLevel({data:oe?se:void 0,logLevel:L,messages:[...J],error:Z,metadata:X,context:Y},this));let ce=this._mergeGroups($)??void 0;if(this.hasMultipleTransports){let Q=this._config.transport.filter(J=>!(!J.enabled||!this._shouldTransportReceiveLog(J.id,L,$))).map(async Q=>{let $=L;if(!(this.pluginManager.hasPlugins(PluginCallbackType.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...J],data:oe?se:void 0,logLevel:$,transportId:Q.id,error:Z,metadata:X,context:Y,groups:ce},this)))return Q._sendToLogger({logLevel:$,messages:[...J],data:oe?se:void 0,hasData:oe,error:Z,metadata:X,context:Y,groups:ce})});Promise.all(Q).catch(L=>{this._config.consoleDebug&&console.error(`[LogLayer] Error executing transports:`,L)})}else{if(!this.singleTransport?.enabled||!this._shouldTransportReceiveLog(this.singleTransport.id,L,$)||this.pluginManager.hasPlugins(PluginCallbackType.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...J],data:oe?se:void 0,logLevel:L,transportId:this.singleTransport.id,error:Z,metadata:X,context:Y,groups:ce},this))return;this.singleTransport._sendToLogger({logLevel:L,messages:[...J],data:oe?se:void 0,hasData:oe,error:Z,metadata:X,context:Y,groups:ce})}}},MockLogBuilder=class{debug(...L){}error(...L){}info(...L){}trace(...L){}warn(...L){}fatal(...L){}enableLogging(){return this}disableLogging(){return this}withMetadata(L){return this}withError(L){return this}withGroup(L){return this}},MockLogLayer=class{mockLogBuilder=new MockLogBuilder;mockContextManager=new MockContextManager;mockLogLevelManager=new MockLogLevelManager;info(...L){}warn(...L){}error(...L){}debug(...L){}trace(...L){}fatal(...L){}raw(L){}getLoggerInstance(L){}errorOnly(L,J){}metadataOnly(L,J){}addPlugins(L){}removePlugin(L){}enablePlugin(L){}disablePlugin(L){}withPrefix(L){return this}withGroup(L){return this}addGroup(L,J){return this}removeGroup(L){return this}enableGroup(L){return this}disableGroup(L){return this}setGroupLevel(L,J){return this}setActiveGroups(L){return this}getGroups(){return{}}withContext(L){return this}withError(L){return this.mockLogBuilder.withError(L)}withMetadata(L){return this.mockLogBuilder.withMetadata(L)}getContext(L){return{}}clearContext(L){return this}enableLogging(){return this}disableLogging(){return this}child(){return this}muteContext(){return this}unMuteContext(){return this}muteMetadata(){return this}unMuteMetadata(){return this}withFreshTransports(L){return this}addTransport(L){return this}removeTransport(L){return!0}withFreshPlugins(L){return this}withContextManager(L){return this}getContextManager(){return this.mockContextManager}withLogLevelManager(L){return this}getLogLevelManager(){return this.mockLogLevelManager}getConfig(){return{}}setMockLogBuilder(L){this.mockLogBuilder=L}enableIndividualLevel(L){return this}disableIndividualLevel(L){return this}setLevel(L){return this}isLevelEnabled(L){return!0}getMockLogBuilder(){return this.mockLogBuilder}resetMockLogBuilder(){this.mockLogBuilder=new MockLogBuilder}};const mixinRegistry={logLayerHandlers:[],pluginsToInit:[],logBuilderHandlers:[]};var LogBuilder=class{err;metadata;structuredLogger;hasMetadata;pluginManager;_groups=null;constructor(L){this.err=null,this.metadata={},this.structuredLogger=L,this.hasMetadata=!1,this.pluginManager=L.pluginManager,mixinRegistry.logBuilderHandlers.length>0&&mixinRegistry.logBuilderHandlers.forEach(J=>{J.onConstruct&&J.onConstruct(this,L)})}withMetadata(L){let{pluginManager:J,structuredLogger:{_config:{consoleDebug:Y}}}=this;if(!L)return Y&&console.debug(`[LogLayer] withMetadata was called with no metadata; dropping.`),this;let X=L;return J.hasPlugins(PluginCallbackType.onMetadataCalled)&&(X=J.runOnMetadataCalled(L,this.structuredLogger),!X)?(Y&&console.debug(`[LogLayer] Metadata was dropped due to plugin returning falsy value.`),this):(this.metadata={...this.metadata,...X},this.hasMetadata=!0,this)}withError(L){return this.err=L,this}withGroup(L){let J=Array.isArray(L)?L:[L];if(this._groups){let L=new Set([...this._groups,...J]);this._groups=Array.from(L)}else this._groups=[...J];return this}info(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.info))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.info,L)}warn(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.warn))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.warn,L)}error(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.error))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.error,L)}debug(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.debug))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.debug,L)}trace(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.trace))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.trace,L)}fatal(...L){if(this.structuredLogger.isLevelEnabled(LogLevel.fatal))return this.structuredLogger._formatMessage(L),this.formatLog(LogLevel.fatal,L)}disableLogging(){return this.structuredLogger.disableLogging(),this}enableLogging(){return this.structuredLogger.enableLogging(),this}formatLog(L,J){let{muteMetadata:Y}=this.structuredLogger._config,X=Y?!1:this.hasMetadata;return this.structuredLogger._formatLog({logLevel:L,params:J,metadata:X?this.metadata:null,err:this.err,groups:this._groups})}};const isNonErrorSymbol=Symbol(`isNonError`);function defineProperty(L,J,Y){Object.defineProperty(L,J,{value:Y,writable:!1,enumerable:!1,configurable:!1})}function stringify$1(L){if(L===void 0)return`undefined`;if(L===null)return`null`;if(typeof L==`string`)return L;if(typeof L==`number`||typeof L==`boolean`)return String(L);if(typeof L==`bigint`)return`${L}n`;if(typeof L==`symbol`)return L.toString();if(typeof L==`function`)return`[Function${L.name?` ${L.name}`:` (anonymous)`}]`;if(L instanceof Error)try{return String(L)}catch{return`<Unserializable error>`}try{return JSON.stringify(L)}catch{try{return String(L)}catch{return`<Unserializable value>`}}}var NonError$1=class L extends Error{constructor(J,{superclass:Y=Error}={}){if(L.isNonError(J))return J;if(J instanceof Error)throw TypeError(`Do not pass Error instances to NonError. Throw the error directly instead.`);super(`Non-error value: ${stringify$1(J)}`),Y!==Error&&Object.setPrototypeOf(this,Y.prototype),defineProperty(this,`name`,`NonError`),defineProperty(this,isNonErrorSymbol,!0),defineProperty(this,`isNonError`,!0),defineProperty(this,`value`,J)}static isNonError(L){return L?.[isNonErrorSymbol]===!0}static#e(J,Y){try{let X=J(...Y);return X&&typeof X.then==`function`?(async()=>{try{return await X}catch(J){throw J instanceof Error?J:new L(J)}})():X}catch(J){throw J instanceof Error?J:new L(J)}}static try(J){return L.#e(J,[])}static wrap(J){return(...Y)=>L.#e(J,Y)}static[Symbol.hasInstance](J){return L.isNonError(J)}};const list$1=[Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(L=>[L.name,L]),errorConstructors=new Map(list$1),errorFactories=new Map,errorProperties=[{property:`name`,enumerable:!1},{property:`message`,enumerable:!1},{property:`stack`,enumerable:!1},{property:`code`,enumerable:!0},{property:`cause`,enumerable:!1},{property:`errors`,enumerable:!1}],toJsonWasCalled=new WeakSet,toJSON=L=>{toJsonWasCalled.add(L);let J=L.toJSON();return toJsonWasCalled.delete(L),J},newError=L=>{if(L===`NonError`)return new NonError$1;let J=errorFactories.get(L);if(J)return J();let Y=errorConstructors.get(L)??Error;return Y===AggregateError?new Y([]):new Y},destroyCircular=({from:L,seen:J,to:Y,forceEnumerable:X,maxDepth:Z,depth:Q,useToJSON:$,serialize:ee})=>{if(Y||=Array.isArray(L)?[]:!ee&&isErrorLike(L)?newError(L.name):{},J.add(L),Q>=Z)return J.delete(L),Y;if($&&typeof L.toJSON==`function`&&!toJsonWasCalled.has(L))return J.delete(L),toJSON(L);let te=L=>destroyCircular({from:L,seen:J,forceEnumerable:X,maxDepth:Z,depth:Q+1,useToJSON:$,serialize:ee});for(let X of Object.keys(L)){let Z=L[X];if(Z&&Z instanceof Uint8Array&&Z.constructor.name===`Buffer`){Y[X]=ee?`[object Buffer]`:Z;continue}if(typeof Z==`object`&&Z&&typeof Z.pipe==`function`){Y[X]=ee?`[object Stream]`:Z;continue}if(typeof Z==`function`){ee||(Y[X]=Z);continue}if(ee&&typeof Z==`bigint`){Y[X]=`${Z}n`;continue}if(!Z||typeof Z!=`object`){try{Y[X]=Z}catch{}continue}if(!J.has(Z)){Y[X]=te(Z);continue}Y[X]=`[Circular]`}if(ee||Y instanceof Error)for(let{property:Z,enumerable:Q}of errorProperties){let $=L[Z];if($==null||Object.getOwnPropertyDescriptor(Y,Z)?.configurable===!1)continue;let ee=$;typeof $==`object`&&(ee=J.has($)?`[Circular]`:te($)),Object.defineProperty(Y,Z,{value:ee,enumerable:X||Q,configurable:!0,writable:!0})}return J.delete(L),Y};function serializeError(L,J={}){let{maxDepth:Y=1/0,useToJSON:X=!0}=J;return typeof L==`object`&&L?destroyCircular({from:L,seen:new Set,forceEnumerable:!0,maxDepth:Y,depth:0,useToJSON:X,serialize:!0}):(typeof L==`function`&&(L=`<Function>`),destroyCircular({from:new NonError$1(L),seen:new Set,forceEnumerable:!0,maxDepth:Y,depth:0,useToJSON:X,serialize:!0}))}function isErrorLike(L){return!!L&&typeof L==`object`&&typeof L.name==`string`&&typeof L.message==`string`&&typeof L.stack==`string`}var require_safe_stable_stringify=__commonJSMin(((L,J)=>{let{hasOwnProperty:Y}=Object.prototype,X=ue();X.configure=ue,X.stringify=X,X.default=X,L.stringify=X,L.configure=ue,J.exports=X;let Z=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Q(L){return L.length<5e3&&!Z.test(L)?`"${L}"`:JSON.stringify(L)}function $(L,J){if(L.length>200||J)return L.sort(J);for(let J=1;J<L.length;J++){let Y=L[J],X=J;for(;X!==0&&L[X-1]>Y;)L[X]=L[X-1],X--;L[X]=Y}return L}let ee=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function te(L){return ee.call(L)!==void 0&&L.length!==0}function ne(L,J,Y){L.length<Y&&(Y=L.length);let X=J===`,`?``:` `,Z=`"0":${X}${L[0]}`;for(let Q=1;Q<Y;Q++)Z+=`${J}"${Q}":${X}${L[Q]}`;return Z}function re(L){if(Y.call(L,`circularValue`)){let J=L.circularValue;if(typeof J==`string`)return`"${J}"`;if(J==null)return J;if(J===Error||J===TypeError)return{toString(){throw TypeError(`Converting circular structure to JSON`)}};throw TypeError(`The "circularValue" argument must be of type string or the value null or undefined`)}return`"[Circular]"`}function ie(L){let J;if(Y.call(L,`deterministic`)&&(J=L.deterministic,typeof J!=`boolean`&&typeof J!=`function`))throw TypeError(`The "deterministic" argument must be of type boolean or comparator function`);return J===void 0?!0:J}function ae(L,J){let X;if(Y.call(L,J)&&(X=L[J],typeof X!=`boolean`))throw TypeError(`The "${J}" argument must be of type boolean`);return X===void 0?!0:X}function oe(L,J){let X;if(Y.call(L,J)){if(X=L[J],typeof X!=`number`)throw TypeError(`The "${J}" argument must be of type number`);if(!Number.isInteger(X))throw TypeError(`The "${J}" argument must be an integer`);if(X<1)throw RangeError(`The "${J}" argument must be >= 1`)}return X===void 0?1/0:X}function se(L){return L===1?`1 item`:`${L} items`}function ce(L){let J=new Set;for(let Y of L)(typeof Y==`string`||typeof Y==`number`)&&J.add(String(Y));return J}function le(L){if(Y.call(L,`strict`)){let J=L.strict;if(typeof J!=`boolean`)throw TypeError(`The "strict" argument must be of type boolean`);if(J)return L=>{let J=`Object can not safely be stringified. Received type ${typeof L}`;throw typeof L!=`function`&&(J+=` (${L.toString()})`),Error(J)}}}function ue(L){L={...L};let J=le(L);J&&(L.bigint===void 0&&(L.bigint=!1),`circularValue`in L||(L.circularValue=Error));let Y=re(L),X=ae(L,`bigint`),Z=ie(L),ee=typeof Z==`function`?Z:void 0,ue=oe(L,`maximumDepth`),de=oe(L,`maximumBreadth`);function fe(L,ne,re,ie,ae,oe){let ce=ne[L];switch(typeof ce==`object`&&ce&&typeof ce.toJSON==`function`&&(ce=ce.toJSON(L)),ce=ie.call(ne,L,ce),typeof ce){case`string`:return Q(ce);case`object`:{if(ce===null)return`null`;if(re.indexOf(ce)!==-1)return Y;let L=``,J=`,`,X=oe;if(Array.isArray(ce)){if(ce.length===0)return`[]`;if(ue<re.length+1)return`"[Array]"`;re.push(ce),ae!==``&&(oe+=ae,L+=`\n${oe}`,J=`,\n${oe}`);let Y=Math.min(ce.length,de),Z=0;for(;Z<Y-1;Z++){let Y=fe(String(Z),ce,re,ie,ae,oe);L+=Y===void 0?`null`:Y,L+=J}let Q=fe(String(Z),ce,re,ie,ae,oe);if(L+=Q===void 0?`null`:Q,ce.length-1>de){let Y=ce.length-de-1;L+=`${J}"... ${se(Y)} not stringified"`}return ae!==``&&(L+=`\n${X}`),re.pop(),`[${L}]`}let ne=Object.keys(ce),le=ne.length;if(le===0)return`{}`;if(ue<re.length+1)return`"[Object]"`;let pe=``,me=``;ae!==``&&(oe+=ae,J=`,\n${oe}`,pe=` `);let he=Math.min(le,de);Z&&!te(ce)&&(ne=$(ne,ee)),re.push(ce);for(let Y=0;Y<he;Y++){let X=ne[Y],Z=fe(X,ce,re,ie,ae,oe);Z!==void 0&&(L+=`${me}${Q(X)}:${pe}${Z}`,me=J)}if(le>de){let Y=le-de;L+=`${me}"...":${pe}"${se(Y)} not stringified"`,me=J}return ae!==``&&me.length>1&&(L=`\n${oe}${L}\n${X}`),re.pop(),`{${L}}`}case`number`:return isFinite(ce)?String(ce):J?J(ce):`null`;case`boolean`:return ce===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(ce);default:return J?J(ce):void 0}}function pe(L,Z,$,ee,te,ne){switch(typeof Z==`object`&&Z&&typeof Z.toJSON==`function`&&(Z=Z.toJSON(L)),typeof Z){case`string`:return Q(Z);case`object`:{if(Z===null)return`null`;if($.indexOf(Z)!==-1)return Y;let L=ne,J=``,X=`,`;if(Array.isArray(Z)){if(Z.length===0)return`[]`;if(ue<$.length+1)return`"[Array]"`;$.push(Z),te!==``&&(ne+=te,J+=`\n${ne}`,X=`,\n${ne}`);let Y=Math.min(Z.length,de),Q=0;for(;Q<Y-1;Q++){let L=pe(String(Q),Z[Q],$,ee,te,ne);J+=L===void 0?`null`:L,J+=X}let re=pe(String(Q),Z[Q],$,ee,te,ne);if(J+=re===void 0?`null`:re,Z.length-1>de){let L=Z.length-de-1;J+=`${X}"... ${se(L)} not stringified"`}return te!==``&&(J+=`\n${L}`),$.pop(),`[${J}]`}$.push(Z);let re=``;te!==``&&(ne+=te,X=`,\n${ne}`,re=` `);let ie=``;for(let L of ee){let Y=pe(L,Z[L],$,ee,te,ne);Y!==void 0&&(J+=`${ie}${Q(L)}:${re}${Y}`,ie=X)}return te!==``&&ie.length>1&&(J=`\n${ne}${J}\n${L}`),$.pop(),`{${J}}`}case`number`:return isFinite(Z)?String(Z):J?J(Z):`null`;case`boolean`:return Z===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(Z);default:return J?J(Z):void 0}}function me(L,re,ie,ae,oe){switch(typeof re){case`string`:return Q(re);case`object`:{if(re===null)return`null`;if(typeof re.toJSON==`function`){if(re=re.toJSON(L),typeof re!=`object`)return me(L,re,ie,ae,oe);if(re===null)return`null`}if(ie.indexOf(re)!==-1)return Y;let J=oe;if(Array.isArray(re)){if(re.length===0)return`[]`;if(ue<ie.length+1)return`"[Array]"`;ie.push(re),oe+=ae;let L=`\n${oe}`,Y=`,\n${oe}`,X=Math.min(re.length,de),Z=0;for(;Z<X-1;Z++){let J=me(String(Z),re[Z],ie,ae,oe);L+=J===void 0?`null`:J,L+=Y}let Q=me(String(Z),re[Z],ie,ae,oe);if(L+=Q===void 0?`null`:Q,re.length-1>de){let J=re.length-de-1;L+=`${Y}"... ${se(J)} not stringified"`}return L+=`\n${J}`,ie.pop(),`[${L}]`}let X=Object.keys(re),ce=X.length;if(ce===0)return`{}`;if(ue<ie.length+1)return`"[Object]"`;oe+=ae;let le=`,\n${oe}`,fe=``,pe=``,he=Math.min(ce,de);te(re)&&(fe+=ne(re,le,de),X=X.slice(re.length),he-=re.length,pe=le),Z&&(X=$(X,ee)),ie.push(re);for(let L=0;L<he;L++){let J=X[L],Y=me(J,re[J],ie,ae,oe);Y!==void 0&&(fe+=`${pe}${Q(J)}: ${Y}`,pe=le)}if(ce>de){let L=ce-de;fe+=`${pe}"...": "${se(L)} not stringified"`,pe=le}return pe!==``&&(fe=`\n${oe}${fe}\n${J}`),ie.pop(),`{${fe}}`}case`number`:return isFinite(re)?String(re):J?J(re):`null`;case`boolean`:return re===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(re);default:return J?J(re):void 0}}function he(L,re,ie){switch(typeof re){case`string`:return Q(re);case`object`:{if(re===null)return`null`;if(typeof re.toJSON==`function`){if(re=re.toJSON(L),typeof re!=`object`)return he(L,re,ie);if(re===null)return`null`}if(ie.indexOf(re)!==-1)return Y;let J=``,X=re.length!==void 0;if(X&&Array.isArray(re)){if(re.length===0)return`[]`;if(ue<ie.length+1)return`"[Array]"`;ie.push(re);let L=Math.min(re.length,de),Y=0;for(;Y<L-1;Y++){let L=he(String(Y),re[Y],ie);J+=L===void 0?`null`:L,J+=`,`}let X=he(String(Y),re[Y],ie);if(J+=X===void 0?`null`:X,re.length-1>de){let L=re.length-de-1;J+=`,"... ${se(L)} not stringified"`}return ie.pop(),`[${J}]`}let ae=Object.keys(re),oe=ae.length;if(oe===0)return`{}`;if(ue<ie.length+1)return`"[Object]"`;let ce=``,le=Math.min(oe,de);X&&te(re)&&(J+=ne(re,`,`,de),ae=ae.slice(re.length),le-=re.length,ce=`,`),Z&&(ae=$(ae,ee)),ie.push(re);for(let L=0;L<le;L++){let Y=ae[L],X=he(Y,re[Y],ie);X!==void 0&&(J+=`${ce}${Q(Y)}:${X}`,ce=`,`)}if(oe>de){let L=oe-de;J+=`${ce}"...":"${se(L)} not stringified"`}return ie.pop(),`{${J}}`}case`number`:return isFinite(re)?String(re):J?J(re):`null`;case`boolean`:return re===!0?`true`:`false`;case`undefined`:return;case`bigint`:if(X)return String(re);default:return J?J(re):void 0}}function ge(L,J,Y){if(arguments.length>1){let X=``;if(typeof Y==`number`?X=` `.repeat(Math.min(Y,10)):typeof Y==`string`&&(X=Y.slice(0,10)),J!=null){if(typeof J==`function`)return fe(``,{"":L},[],J,X,``);if(Array.isArray(J))return pe(``,L,[],ce(J),X,``)}if(X.length!==0)return me(``,L,[],X,``)}return he(``,L,[])}return ge}})),import_safe_stable_stringify=__toESM(require_safe_stable_stringify(),1);const configure$1=import_safe_stable_stringify.configure,stringify=import_safe_stable_stringify.default;var require_symbols=__commonJSMin(((L,J)=>{let Y=typeof process<`u`&&process.env.TERM_PROGRAM===`Hyper`,X=typeof process<`u`&&process.platform===`win32`,Z=typeof process<`u`&&process.platform===`linux`,Q={ballotDisabled:`☒`,ballotOff:`☐`,ballotOn:`☑`,bullet:`•`,bulletWhite:`◦`,fullBlock:`█`,heart:`❤`,identicalTo:`≡`,line:`─`,mark:`※`,middot:`·`,minus:`-`,multiplication:`×`,obelus:`÷`,pencilDownRight:`✎`,pencilRight:`✏`,pencilUpRight:`✐`,percent:`%`,pilcrow2:`❡`,pilcrow:`¶`,plusMinus:`±`,question:`?`,section:`§`,starsOff:`☆`,starsOn:`★`,upDownArrow:`↕`},$=Object.assign({},Q,{check:`√`,cross:`×`,ellipsisLarge:`...`,ellipsis:`...`,info:`i`,questionSmall:`?`,pointer:`>`,pointerSmall:`»`,radioOff:`( )`,radioOn:`(*)`,warning:`‼`}),ee=Object.assign({},Q,{ballotCross:`✘`,check:`✔`,cross:`✖`,ellipsisLarge:`⋯`,ellipsis:`…`,info:`ℹ`,questionFull:`?`,questionSmall:`﹖`,pointer:Z?`▸`:`❯`,pointerSmall:Z?`‣`:`›`,radioOff:`◯`,radioOn:`◉`,warning:`⚠`});J.exports=X&&!Y?$:ee,Reflect.defineProperty(J.exports,`common`,{enumerable:!1,value:Q}),Reflect.defineProperty(J.exports,`windows`,{enumerable:!1,value:$}),Reflect.defineProperty(J.exports,`other`,{enumerable:!1,value:ee})})),require_ansi_colors=__commonJSMin(((L,J)=>{let Y=L=>typeof L==`object`&&!!L&&!Array.isArray(L),X=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Z=()=>typeof process<`u`?process.env.FORCE_COLOR!==`0`:!1,Q=()=>{let L={enabled:Z(),visible:!0,styles:{},keys:{}},J=L=>{let J=L.open=`\u001b[${L.codes[0]}m`,Y=L.close=`\u001b[${L.codes[1]}m`,X=L.regex=RegExp(`\\u001b\\[${L.codes[1]}m`,`g`);return L.wrap=(L,Z)=>{L.includes(Y)&&(L=L.replace(X,Y+J));let Q=J+L+Y;return Z?Q.replace(/\r*\n/g,`${Y}$&${J}`):Q},L},Q=(L,J,Y)=>typeof L==`function`?L(J):L.wrap(J,Y),$=(J,Y)=>{if(J===``||J==null)return``;if(L.enabled===!1)return J;if(L.visible===!1)return``;let X=``+J,Z=X.includes(`
107
107
  `),$=Y.length;for($>0&&Y.includes(`unstyle`)&&(Y=[...new Set([`unstyle`,...Y])].reverse());$-- >0;)X=Q(L.styles[Y[$]],X,Z);return X},ee=(Y,X,Z)=>{L.styles[Y]=J({name:Y,codes:X}),(L.keys[Z]||(L.keys[Z]=[])).push(Y),Reflect.defineProperty(L,Y,{configurable:!0,enumerable:!0,set(J){L.alias(Y,J)},get(){let J=L=>$(L,J.stack);return Reflect.setPrototypeOf(J,L),J.stack=this.stack?this.stack.concat(Y):[Y],J}})};return ee(`reset`,[0,0],`modifier`),ee(`bold`,[1,22],`modifier`),ee(`dim`,[2,22],`modifier`),ee(`italic`,[3,23],`modifier`),ee(`underline`,[4,24],`modifier`),ee(`inverse`,[7,27],`modifier`),ee(`hidden`,[8,28],`modifier`),ee(`strikethrough`,[9,29],`modifier`),ee(`black`,[30,39],`color`),ee(`red`,[31,39],`color`),ee(`green`,[32,39],`color`),ee(`yellow`,[33,39],`color`),ee(`blue`,[34,39],`color`),ee(`magenta`,[35,39],`color`),ee(`cyan`,[36,39],`color`),ee(`white`,[37,39],`color`),ee(`gray`,[90,39],`color`),ee(`grey`,[90,39],`color`),ee(`bgBlack`,[40,49],`bg`),ee(`bgRed`,[41,49],`bg`),ee(`bgGreen`,[42,49],`bg`),ee(`bgYellow`,[43,49],`bg`),ee(`bgBlue`,[44,49],`bg`),ee(`bgMagenta`,[45,49],`bg`),ee(`bgCyan`,[46,49],`bg`),ee(`bgWhite`,[47,49],`bg`),ee(`blackBright`,[90,39],`bright`),ee(`redBright`,[91,39],`bright`),ee(`greenBright`,[92,39],`bright`),ee(`yellowBright`,[93,39],`bright`),ee(`blueBright`,[94,39],`bright`),ee(`magentaBright`,[95,39],`bright`),ee(`cyanBright`,[96,39],`bright`),ee(`whiteBright`,[97,39],`bright`),ee(`bgBlackBright`,[100,49],`bgBright`),ee(`bgRedBright`,[101,49],`bgBright`),ee(`bgGreenBright`,[102,49],`bgBright`),ee(`bgYellowBright`,[103,49],`bgBright`),ee(`bgBlueBright`,[104,49],`bgBright`),ee(`bgMagentaBright`,[105,49],`bgBright`),ee(`bgCyanBright`,[106,49],`bgBright`),ee(`bgWhiteBright`,[107,49],`bgBright`),L.ansiRegex=X,L.hasColor=L.hasAnsi=J=>(L.ansiRegex.lastIndex=0,typeof J==`string`&&J!==``&&L.ansiRegex.test(J)),L.alias=(J,Y)=>{let X=typeof Y==`string`?L[Y]:Y;if(typeof X!=`function`)throw TypeError(`Expected alias to be the name of an existing color (string) or a function`);X.stack||=(Reflect.defineProperty(X,`name`,{value:J}),L.styles[J]=X,[J]),Reflect.defineProperty(L,J,{configurable:!0,enumerable:!0,set(Y){L.alias(J,Y)},get(){let J=L=>$(L,J.stack);return Reflect.setPrototypeOf(J,L),J.stack=this.stack?this.stack.concat(X.stack):X.stack,J}})},L.theme=J=>{if(!Y(J))throw TypeError(`Expected theme to be an object`);for(let Y of Object.keys(J))L.alias(Y,J[Y]);return L},L.alias(`unstyle`,J=>typeof J==`string`&&J!==``?(L.ansiRegex.lastIndex=0,J.replace(L.ansiRegex,``)):``),L.alias(`noop`,L=>L),L.none=L.clear=L.noop,L.stripColor=L.unstyle,L.symbols=require_symbols(),L.define=ee,L};J.exports=Q(),J.exports.create=Q})),import_ansi_colors=__toESM(require_ansi_colors(),1);const segmenter$2=new Intl.Segmenter,zeroWidthClusterRegex=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,leadingNonPrintingRegex=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,rgiEmojiRegex=/^\p{RGI_Emoji}$/v,unqualifiedKeycapRegex=/^[\d#*]\u20E3$/,extendedPictographicRegex=/\p{Extended_Pictographic}/gu;function isDoubleWidthNonRgiEmojiSequence(L){if(L.length>50)return!1;if(unqualifiedKeycapRegex.test(L))return!0;if(L.includes(`‍`)){let J=L.match(extendedPictographicRegex);return J!==null&&J.length>=2}return!1}function baseVisible(L){return L.replace(leadingNonPrintingRegex,``)}function isZeroWidthCluster(L){return zeroWidthClusterRegex.test(L)}function trailingHalfwidthWidth(L,J){let Y=0;if(L.length>1)for(let X of L.slice(1))X>=`＀`&&X<=`￯`&&(Y+=eastAsianWidth(X.codePointAt(0),J));return Y}function stringWidth(L,J={}){if(typeof L!=`string`||L.length===0)return 0;let{ambiguousIsNarrow:Y=!0,countAnsiEscapeCodes:X=!1}=J,Z=L;if(!X&&(Z.includes(`\x1B`)||Z.includes(`›`))&&(Z=stripAnsi(Z)),Z.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(Z))return Z.length;let Q=0,$={ambiguousAsWide:!Y};for(let{segment:L}of segmenter$2.segment(Z)){if(isZeroWidthCluster(L))continue;if(rgiEmojiRegex.test(L)||isDoubleWidthNonRgiEmojiSequence(L)){Q+=2;continue}let J=baseVisible(L).codePointAt(0);Q+=eastAsianWidth(J,$),Q+=trailingHalfwidthWidth(L,$)}return Q}const ANSI_ESCAPE=`\x1B`,ANSI_ESCAPE_CSI=`›`,ESCAPES=new Set([ANSI_ESCAPE,ANSI_ESCAPE_CSI]),ANSI_ESCAPE_BELL=`\x07`,ANSI_CSI=`[`,ANSI_OSC=`]`,ANSI_SGR_TERMINATOR=`m`,ANSI_SGR_RESET=0,ANSI_SGR_RESET_FOREGROUND=39,ANSI_SGR_RESET_BACKGROUND=49,ANSI_SGR_RESET_UNDERLINE_COLOR=59,ANSI_SGR_FOREGROUND_EXTENDED=38,ANSI_SGR_BACKGROUND_EXTENDED=48,ANSI_SGR_UNDERLINE_COLOR_EXTENDED=58,ANSI_SGR_COLOR_MODE_256=5,ANSI_SGR_COLOR_MODE_RGB=2,ANSI_ESCAPE_LINK=`${ANSI_OSC}8;;`,ANSI_ESCAPE_REGEX=RegExp(`^\\u001B(?:\\${ANSI_CSI}(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}|${ANSI_ESCAPE_LINK}(?<uri>[^\\u0007\\u001B]*)(?:\\u0007|\\u001B\\\\))`),ANSI_ESCAPE_CSI_REGEX=RegExp(`^\\u009B(?<sgr>[0-9;]*)${ANSI_SGR_TERMINATOR}`),ANSI_SGR_MODIFIER_CLOSE_CODES=new Set(ansiStyles.codes.values());ANSI_SGR_MODIFIER_CLOSE_CODES.delete(ANSI_SGR_RESET);const segmenter$1=new Intl.Segmenter,getGraphemes=L=>Array.from(segmenter$1.segment(L),({segment:L})=>L),TAB_SIZE=8,wrapAnsiCode=L=>`${ANSI_ESCAPE}${ANSI_CSI}${L}${ANSI_SGR_TERMINATOR}`,wrapAnsiHyperlink=L=>`${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${L}${ANSI_ESCAPE_BELL}`,getSgrTokens=L=>{let J=L.split(`;`).map(L=>L===``?ANSI_SGR_RESET:Number.parseInt(L,10)),Y=[];for(let L=0;L<J.length;L++){let X=J[L];if(Number.isFinite(X)){if(X===ANSI_SGR_FOREGROUND_EXTENDED||X===ANSI_SGR_BACKGROUND_EXTENDED||X===ANSI_SGR_UNDERLINE_COLOR_EXTENDED){if(L+1>=J.length)break;let Z=J[L+1];if(Z===ANSI_SGR_COLOR_MODE_256&&Number.isFinite(J[L+2])){Y.push([X,Z,J[L+2]]),L+=2;continue}let Q=J[L+2],$=J[L+3],ee=J[L+4];if(Z===ANSI_SGR_COLOR_MODE_RGB&&Number.isFinite(Q)&&Number.isFinite($)&&Number.isFinite(ee)){Y.push([X,Z,Q,$,ee]),L+=4;continue}break}Y.push([X])}}return Y},removeActiveStyle=(L,J)=>{let Y=L.findIndex(L=>L.family===J);Y!==-1&&L.splice(Y,1)},upsertActiveStyle=(L,J)=>{removeActiveStyle(L,J.family),L.push(J)},removeModifierStylesByClose=(L,J)=>{for(let Y=L.length-1;Y>=0;Y--){let X=L[Y];X.family.startsWith(`modifier-`)&&X.close===J&&L.splice(Y,1)}},getColorStyle=(L,J)=>{if(L>=30&&L<=37||L>=90&&L<=97||L===ANSI_SGR_FOREGROUND_EXTENDED&&J.length>1)return{family:`foreground`,open:J.join(`;`),close:ANSI_SGR_RESET_FOREGROUND};if(L>=40&&L<=47||L>=100&&L<=107||L===ANSI_SGR_BACKGROUND_EXTENDED&&J.length>1)return{family:`background`,open:J.join(`;`),close:ANSI_SGR_RESET_BACKGROUND};if(L===ANSI_SGR_UNDERLINE_COLOR_EXTENDED&&J.length>1)return{family:`underlineColor`,open:J.join(`;`),close:ANSI_SGR_RESET_UNDERLINE_COLOR}},applySgrResetCode=(L,J)=>L===ANSI_SGR_RESET?(J.length=0,!0):L===ANSI_SGR_RESET_FOREGROUND?(removeActiveStyle(J,`foreground`),!0):L===ANSI_SGR_RESET_BACKGROUND?(removeActiveStyle(J,`background`),!0):L===ANSI_SGR_RESET_UNDERLINE_COLOR?(removeActiveStyle(J,`underlineColor`),!0):ANSI_SGR_MODIFIER_CLOSE_CODES.has(L)?(removeModifierStylesByClose(J,L),!0):!1,applySgrToken=(L,J)=>{let[Y]=L;if(applySgrResetCode(Y,J))return;let X=getColorStyle(Y,L);if(X){upsertActiveStyle(J,X);return}let Z=ansiStyles.codes.get(Y);Z!==void 0&&Z!==ANSI_SGR_RESET&&upsertActiveStyle(J,{family:`modifier-${Y}`,open:L.join(`;`),close:Z})},applySgrParameters=(L,J)=>{for(let Y of getSgrTokens(L))applySgrToken(Y,J)},applySgrResets=(L,J)=>{for(let Y of getSgrTokens(L)){let[L]=Y;applySgrResetCode(L,J)}},applyLeadingSgrResets=(L,J)=>{let Y=L;for(;Y.length>0;){if(Y.startsWith(ANSI_ESCAPE)&&Y[1]!==`\\`){let L=ANSI_ESCAPE_REGEX.exec(Y);if(!L)break;L.groups.sgr!==void 0&&applySgrResets(L.groups.sgr,J),Y=Y.slice(L[0].length);continue}if(Y.startsWith(ANSI_ESCAPE_CSI)){let L=ANSI_ESCAPE_CSI_REGEX.exec(Y);if(!L||L.groups.sgr===void 0)break;applySgrResets(L.groups.sgr,J),Y=Y.slice(L[0].length);continue}break}},getClosingSgrSequence=L=>[...L].reverse().map(L=>wrapAnsiCode(L.close)).join(``),getOpeningSgrSequence=L=>L.map(L=>wrapAnsiCode(L.open)).join(``),wordLengths=L=>L.split(` `).map(L=>stringWidth(L)),wrapWord=(L,J,Y)=>{let X=getGraphemes(J),Z=!1,Q=!1,$=stringWidth(stripAnsi(L.at(-1)));for(let[J,ee]of X.entries()){let te=stringWidth(ee);if($+te<=Y?L[L.length-1]+=ee:(L.push(ee),$=0),ESCAPES.has(ee)&&!(Q&&ee===ANSI_ESCAPE&&X[J+1]===`\\`)&&(Z=!0,Q=X.slice(J+1,J+1+ANSI_ESCAPE_LINK.length).join(``)===ANSI_ESCAPE_LINK),Z){Q?(ee===ANSI_ESCAPE_BELL||ee===`\\`&&J>0&&X[J-1]===ANSI_ESCAPE)&&(Z=!1,Q=!1):ee===ANSI_SGR_TERMINATOR&&(Z=!1);continue}$+=te,$===Y&&J<X.length-1&&(L.push(``),$=0)}!$&&L.at(-1).length>0&&L.length>1&&(L[L.length-2]+=L.pop())},stringVisibleTrimSpacesRight=L=>{let J=L.split(` `),Y=J.length;for(;Y>0&&!(stringWidth(J[Y-1])>0);)Y--;return Y===J.length?L:J.slice(0,Y).join(` `)+J.slice(Y).join(``)},expandTabs=L=>{if(!L.includes(` `))return L;let J=L.split(` `),Y=0,X=``;for(let[L,Z]of J.entries())if(X+=Z,Y+=stringWidth(Z),L<J.length-1){let L=TAB_SIZE-Y%TAB_SIZE;X+=` `.repeat(L),Y+=L}return X},exec$1=(L,J,Y={})=>{if(Y.trim!==!1&&L.trim()===``)return``;let X=``,Z,Q=[],$=wordLengths(L),ee=[``];for(let[X,Z]of L.split(` `).entries()){Y.trim!==!1&&(ee[ee.length-1]=ee.at(-1).trimStart());let L=stringWidth(ee.at(-1));if(X!==0&&(L>=J&&(Y.wordWrap===!1||Y.trim===!1)&&(ee.push(``),L=0),(L>0||Y.trim===!1)&&(ee[ee.length-1]+=` `,L++)),Y.hard&&Y.wordWrap!==!1&&$[X]>J){let Y=J-L,Q=1+Math.floor(($[X]-Y-1)/J);Math.floor(($[X]-1)/J)<Q&&ee.push(``),wrapWord(ee,Z,J);continue}if(L+$[X]>J&&L>0&&$[X]>0){if(Y.wordWrap===!1&&L<J){wrapWord(ee,Z,J);continue}ee.push(``)}if(L+$[X]>J&&Y.wordWrap===!1){wrapWord(ee,Z,J);continue}ee[ee.length-1]+=Z}Y.trim!==!1&&(ee=ee.map(L=>stringVisibleTrimSpacesRight(L)));let te=ee.join(`
108
108
  `),ne=getGraphemes(te),re=0;for(let[L,J]of ne.entries()){if(X+=J,J===ANSI_ESCAPE&&ne[L+1]!==`\\`){let{groups:L}=ANSI_ESCAPE_REGEX.exec(te.slice(re))||{groups:{}};L.sgr===void 0?L.uri!==void 0&&(Z=L.uri.length===0?void 0:L.uri):applySgrParameters(L.sgr,Q)}else if(J===ANSI_ESCAPE_CSI){let{groups:L}=ANSI_ESCAPE_CSI_REGEX.exec(te.slice(re))||{groups:{}};L.sgr!==void 0&&applySgrParameters(L.sgr,Q)}if(ne[L+1]===`
109
109
  `)Z&&(X+=wrapAnsiHyperlink(``)),X+=getClosingSgrSequence(Q);else if(J===`
@@ -118,7 +118,7 @@ fi
118
118
  `,J-1),[Z,Q]=getOffsets(Y);return{line:X===-1?Z:L.slice(0,X+1).match(/\n/g).length+Z,column:J-X-1+Q}}function indexToPosition(L,J,Y){if(typeof L!=`string`)throw TypeError(`Text parameter should be a string`);if(!Number.isInteger(J))throw TypeError(`Index parameter should be an integer`);if(J<0||J>L.length)throw RangeError(`Index out of bounds`);return getPosition(L,J,Y)}const getCodePoint=L=>`\\u{${L.codePointAt(0).toString(16)}}`;var JSONError=class L extends Error{name=`JSONError`;fileName;#e;#t;#n;#r;#i;constructor(J){if(typeof J==`string`)super(),this.#n=J;else{let{jsonParseError:L,fileName:Y,input:X}=J;super(void 0,{cause:L}),this.#e=X,this.#t=L,this.fileName=Y}Error.captureStackTrace?.(this,L)}get message(){this.#n??=`${addCodePointToUnexpectedToken(this.#t.message)}${this.#e===``?` while parsing empty string`:``}`;let{codeFrame:L}=this;return`${this.#n}${this.fileName?` in ${this.fileName}`:``}${L?`\n\n${L}\n`:``}`}set message(L){this.#n=L}#a(L){if(!this.#t)return;let J=this.#e,Y=getErrorLocation(J,this.#t.message);if(Y)return(0,import_lib$2.codeFrameColumns)(J,{start:Y},{highlightCode:L})}get codeFrame(){return this.#r??=this.#a(!0),this.#r}get rawCodeFrame(){return this.#i??=this.#a(!1),this.#i}};const getErrorLocation=(L,J)=>{let Y=J.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!Y)return;let{index:X,line:Z,column:Q}=Y.groups;return Z&&Q?{line:Number(Z),column:Number(Q)}:indexToPosition(L,Number(X),{oneBased:!0})},addCodePointToUnexpectedToken=L=>L.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(L,J,Y)=>`"${Y}"(${getCodePoint(Y)})`);function parseJson(L,J,Y){typeof J==`string`&&(Y=J,J=void 0);try{return JSON.parse(L,J)}catch(J){throw new JSONError({jsonParseError:J,fileName:Y,input:L})}}var require_debug=__commonJSMin(((L,J)=>{J.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...L)=>console.error(`SEMVER`,...L):()=>{}})),require_constants$5=__commonJSMin(((L,J)=>{let Y=`2.0.0`,X=256,Z=2**53-1||9007199254740991,Q=16,$=250;J.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Z,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),require_re=__commonJSMin(((L,J)=>{let{MAX_SAFE_COMPONENT_LENGTH:Y,MAX_SAFE_BUILD_LENGTH:X,MAX_LENGTH:Z}=require_constants$5(),Q=require_debug();L=J.exports={};let $=L.re=[],ee=L.safeRe=[],te=L.src=[],ne=L.safeSrc=[],re=L.t={},ie=0,ae=`[a-zA-Z0-9-]`,oe=[[`\\s`,1],[`\\d`,Z],[ae,X]],se=L=>{for(let[J,Y]of oe)L=L.split(`${J}*`).join(`${J}{0,${Y}}`).split(`${J}+`).join(`${J}{1,${Y}}`);return L},ce=(L,J,Y)=>{let X=se(J),Z=ie++;Q(L,Z,J),re[L]=Z,te[Z]=J,ne[Z]=X,$[Z]=new RegExp(J,Y?`g`:void 0),ee[Z]=new RegExp(X,Y?`g`:void 0)};ce(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),ce(`NUMERICIDENTIFIERLOOSE`,`\\d+`),ce(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${ae}*`),ce(`MAINVERSION`,`(${te[re.NUMERICIDENTIFIER]})\\.(${te[re.NUMERICIDENTIFIER]})\\.(${te[re.NUMERICIDENTIFIER]})`),ce(`MAINVERSIONLOOSE`,`(${te[re.NUMERICIDENTIFIERLOOSE]})\\.(${te[re.NUMERICIDENTIFIERLOOSE]})\\.(${te[re.NUMERICIDENTIFIERLOOSE]})`),ce(`PRERELEASEIDENTIFIER`,`(?:${te[re.NONNUMERICIDENTIFIER]}|${te[re.NUMERICIDENTIFIER]})`),ce(`PRERELEASEIDENTIFIERLOOSE`,`(?:${te[re.NONNUMERICIDENTIFIER]}|${te[re.NUMERICIDENTIFIERLOOSE]})`),ce(`PRERELEASE`,`(?:-(${te[re.PRERELEASEIDENTIFIER]}(?:\\.${te[re.PRERELEASEIDENTIFIER]})*))`),ce(`PRERELEASELOOSE`,`(?:-?(${te[re.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${te[re.PRERELEASEIDENTIFIERLOOSE]})*))`),ce(`BUILDIDENTIFIER`,`${ae}+`),ce(`BUILD`,`(?:\\+(${te[re.BUILDIDENTIFIER]}(?:\\.${te[re.BUILDIDENTIFIER]})*))`),ce(`FULLPLAIN`,`v?${te[re.MAINVERSION]}${te[re.PRERELEASE]}?${te[re.BUILD]}?`),ce(`FULL`,`^${te[re.FULLPLAIN]}$`),ce(`LOOSEPLAIN`,`[v=\\s]*${te[re.MAINVERSIONLOOSE]}${te[re.PRERELEASELOOSE]}?${te[re.BUILD]}?`),ce(`LOOSE`,`^${te[re.LOOSEPLAIN]}$`),ce(`GTLT`,`((?:<|>)?=?)`),ce(`XRANGEIDENTIFIERLOOSE`,`${te[re.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),ce(`XRANGEIDENTIFIER`,`${te[re.NUMERICIDENTIFIER]}|x|X|\\*`),ce(`XRANGEPLAIN`,`[v=\\s]*(${te[re.XRANGEIDENTIFIER]})(?:\\.(${te[re.XRANGEIDENTIFIER]})(?:\\.(${te[re.XRANGEIDENTIFIER]})(?:${te[re.PRERELEASE]})?${te[re.BUILD]}?)?)?`),ce(`XRANGEPLAINLOOSE`,`[v=\\s]*(${te[re.XRANGEIDENTIFIERLOOSE]})(?:\\.(${te[re.XRANGEIDENTIFIERLOOSE]})(?:\\.(${te[re.XRANGEIDENTIFIERLOOSE]})(?:${te[re.PRERELEASELOOSE]})?${te[re.BUILD]}?)?)?`),ce(`XRANGE`,`^${te[re.GTLT]}\\s*${te[re.XRANGEPLAIN]}$`),ce(`XRANGELOOSE`,`^${te[re.GTLT]}\\s*${te[re.XRANGEPLAINLOOSE]}$`),ce(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${Y}})(?:\\.(\\d{1,${Y}}))?(?:\\.(\\d{1,${Y}}))?`),ce(`COERCE`,`${te[re.COERCEPLAIN]}(?:$|[^\\d])`),ce(`COERCEFULL`,te[re.COERCEPLAIN]+`(?:${te[re.PRERELEASE]})?(?:${te[re.BUILD]})?(?:$|[^\\d])`),ce(`COERCERTL`,te[re.COERCE],!0),ce(`COERCERTLFULL`,te[re.COERCEFULL],!0),ce(`LONETILDE`,`(?:~>?)`),ce(`TILDETRIM`,`(\\s*)${te[re.LONETILDE]}\\s+`,!0),L.tildeTrimReplace=`$1~`,ce(`TILDE`,`^${te[re.LONETILDE]}${te[re.XRANGEPLAIN]}$`),ce(`TILDELOOSE`,`^${te[re.LONETILDE]}${te[re.XRANGEPLAINLOOSE]}$`),ce(`LONECARET`,`(?:\\^)`),ce(`CARETTRIM`,`(\\s*)${te[re.LONECARET]}\\s+`,!0),L.caretTrimReplace=`$1^`,ce(`CARET`,`^${te[re.LONECARET]}${te[re.XRANGEPLAIN]}$`),ce(`CARETLOOSE`,`^${te[re.LONECARET]}${te[re.XRANGEPLAINLOOSE]}$`),ce(`COMPARATORLOOSE`,`^${te[re.GTLT]}\\s*(${te[re.LOOSEPLAIN]})$|^$`),ce(`COMPARATOR`,`^${te[re.GTLT]}\\s*(${te[re.FULLPLAIN]})$|^$`),ce(`COMPARATORTRIM`,`(\\s*)${te[re.GTLT]}\\s*(${te[re.LOOSEPLAIN]}|${te[re.XRANGEPLAIN]})`,!0),L.comparatorTrimReplace=`$1$2$3`,ce(`HYPHENRANGE`,`^\\s*(${te[re.XRANGEPLAIN]})\\s+-\\s+(${te[re.XRANGEPLAIN]})\\s*$`),ce(`HYPHENRANGELOOSE`,`^\\s*(${te[re.XRANGEPLAINLOOSE]})\\s+-\\s+(${te[re.XRANGEPLAINLOOSE]})\\s*$`),ce(`STAR`,`(<|>)?=?\\s*\\*`),ce(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),ce(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),require_parse_options=__commonJSMin(((L,J)=>{let Y=Object.freeze({loose:!0}),X=Object.freeze({});J.exports=L=>L?typeof L==`object`?L:Y:X})),require_identifiers=__commonJSMin(((L,J)=>{let Y=/^[0-9]+$/,X=(L,J)=>{if(typeof L==`number`&&typeof J==`number`)return L===J?0:L<J?-1:1;let X=Y.test(L),Z=Y.test(J);return X&&Z&&(L=+L,J=+J),L===J?0:X&&!Z?-1:Z&&!X?1:L<J?-1:1};J.exports={compareIdentifiers:X,rcompareIdentifiers:(L,J)=>X(J,L)}})),require_semver$1=__commonJSMin(((L,J)=>{let Y=require_debug(),{MAX_LENGTH:X,MAX_SAFE_INTEGER:Z}=require_constants$5(),{safeRe:Q,t:$}=require_re(),ee=require_parse_options(),{compareIdentifiers:te}=require_identifiers();J.exports=class L{constructor(J,te){if(te=ee(te),J instanceof L){if(J.loose===!!te.loose&&J.includePrerelease===!!te.includePrerelease)return J;J=J.version}else if(typeof J!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof J}".`);if(J.length>X)throw TypeError(`version is longer than ${X} characters`);Y(`SemVer`,J,te),this.options=te,this.loose=!!te.loose,this.includePrerelease=!!te.includePrerelease;let ne=J.trim().match(te.loose?Q[$.LOOSE]:Q[$.FULL]);if(!ne)throw TypeError(`Invalid Version: ${J}`);if(this.raw=J,this.major=+ne[1],this.minor=+ne[2],this.patch=+ne[3],this.major>Z||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>Z||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>Z||this.patch<0)throw TypeError(`Invalid patch version`);ne[4]?this.prerelease=ne[4].split(`.`).map(L=>{if(/^[0-9]+$/.test(L)){let J=+L;if(J>=0&&J<Z)return J}return L}):this.prerelease=[],this.build=ne[5]?ne[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(J){if(Y(`SemVer.compare`,this.version,this.options,J),!(J instanceof L)){if(typeof J==`string`&&J===this.version)return 0;J=new L(J,this.options)}return J.version===this.version?0:this.compareMain(J)||this.comparePre(J)}compareMain(J){return J instanceof L||(J=new L(J,this.options)),this.major<J.major?-1:this.major>J.major?1:this.minor<J.minor?-1:this.minor>J.minor?1:this.patch<J.patch?-1:this.patch>J.patch?1:0}comparePre(J){if(J instanceof L||(J=new L(J,this.options)),this.prerelease.length&&!J.prerelease.length)return-1;if(!this.prerelease.length&&J.prerelease.length)return 1;if(!this.prerelease.length&&!J.prerelease.length)return 0;let X=0;do{let L=this.prerelease[X],Z=J.prerelease[X];if(Y(`prerelease compare`,X,L,Z),L===void 0&&Z===void 0)return 0;if(Z===void 0)return 1;if(L===void 0)return-1;if(L===Z)continue;return te(L,Z)}while(++X)}compareBuild(J){J instanceof L||(J=new L(J,this.options));let X=0;do{let L=this.build[X],Z=J.build[X];if(Y(`build compare`,X,L,Z),L===void 0&&Z===void 0)return 0;if(Z===void 0)return 1;if(L===void 0)return-1;if(L===Z)continue;return te(L,Z)}while(++X)}inc(L,J,Y){if(L.startsWith(`pre`)){if(!J&&Y===!1)throw Error(`invalid increment argument: identifier is empty`);if(J){let L=`-${J}`.match(this.options.loose?Q[$.PRERELEASELOOSE]:Q[$.PRERELEASE]);if(!L||L[1]!==J)throw Error(`invalid identifier: ${J}`)}}switch(L){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,J,Y);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,J,Y);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,J,Y),this.inc(`pre`,J,Y);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,J,Y),this.inc(`pre`,J,Y);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let L=Number(Y)?1:0;if(this.prerelease.length===0)this.prerelease=[L];else{let X=this.prerelease.length;for(;--X>=0;)typeof this.prerelease[X]==`number`&&(this.prerelease[X]++,X=-2);if(X===-1){if(J===this.prerelease.join(`.`)&&Y===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(L)}}if(J){let X=[J,L];Y===!1&&(X=[J]),te(this.prerelease[0],J)===0?isNaN(this.prerelease[1])&&(this.prerelease=X):this.prerelease=X}break}default:throw Error(`invalid increment argument: ${L}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),require_parse$6=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X=!1)=>{if(L instanceof Y)return L;try{return new Y(L,J)}catch(L){if(!X)return null;throw L}}})),require_valid$1=__commonJSMin(((L,J)=>{let Y=require_parse$6();J.exports=(L,J)=>{let X=Y(L,J);return X?X.version:null}})),require_clean=__commonJSMin(((L,J)=>{let Y=require_parse$6();J.exports=(L,J)=>{let X=Y(L.trim().replace(/^[=v]+/,``),J);return X?X.version:null}})),require_spdx_license_ids=__commonJSMin(((L,J)=>{J.exports=`0BSD,3D-Slicer-1.0,AAL,ADSL,AFL-1.1,AFL-1.2,AFL-2.0,AFL-2.1,AFL-3.0,AGPL-1.0-only,AGPL-1.0-or-later,AGPL-3.0-only,AGPL-3.0-or-later,ALGLIB-Documentation,AMD-newlib,AMDPLPA,AML,AML-glslang,AMPAS,ANTLR-PD,ANTLR-PD-fallback,APAFML,APL-1.0,APSL-1.0,APSL-1.1,APSL-1.2,APSL-2.0,ASWF-Digital-Assets-1.0,ASWF-Digital-Assets-1.1,Abstyles,AdaCore-doc,Adobe-2006,Adobe-Display-PostScript,Adobe-Glyph,Adobe-Utopia,Advanced-Cryptics-Dictionary,Afmparse,Aladdin,Apache-1.0,Apache-1.1,Apache-2.0,App-s2p,Arphic-1999,Artistic-1.0,Artistic-1.0-Perl,Artistic-1.0-cl8,Artistic-2.0,Artistic-dist,Aspell-RU,BOLA-1.1,BSD-1-Clause,BSD-2-Clause,BSD-2-Clause-Darwin,BSD-2-Clause-Patent,BSD-2-Clause-Views,BSD-2-Clause-first-lines,BSD-2-Clause-pkgconf-disclaimer,BSD-3-Clause,BSD-3-Clause-Attribution,BSD-3-Clause-Clear,BSD-3-Clause-HP,BSD-3-Clause-LBNL,BSD-3-Clause-Modification,BSD-3-Clause-No-Military-License,BSD-3-Clause-No-Nuclear-License,BSD-3-Clause-No-Nuclear-License-2014,BSD-3-Clause-No-Nuclear-Warranty,BSD-3-Clause-Open-MPI,BSD-3-Clause-Sun,BSD-3-Clause-Tso,BSD-3-Clause-acpica,BSD-3-Clause-flex,BSD-4-Clause,BSD-4-Clause-Shortened,BSD-4-Clause-UC,BSD-4.3RENO,BSD-4.3TAHOE,BSD-Advertising-Acknowledgement,BSD-Attribution-HPND-disclaimer,BSD-Inferno-Nettverk,BSD-Mark-Modifications,BSD-Protection,BSD-Source-Code,BSD-Source-beginning-file,BSD-Systemics,BSD-Systemics-W3Works,BSL-1.0,BUSL-1.1,Baekmuk,Bahyph,Barr,Beerware,BitTorrent-1.0,BitTorrent-1.1,Bitstream-Charter,Bitstream-Vera,BlueOak-1.0.0,Boehm-GC,Boehm-GC-without-fee,Borceux,Brian-Gladman-2-Clause,Brian-Gladman-3-Clause,Buddy,C-UDA-1.0,CAL-1.0,CAL-1.0-Combined-Work-Exception,CAPEC-tou,CATOSL-1.1,CC-BY-1.0,CC-BY-2.0,CC-BY-2.5,CC-BY-2.5-AU,CC-BY-3.0,CC-BY-3.0-AT,CC-BY-3.0-AU,CC-BY-3.0-DE,CC-BY-3.0-IGO,CC-BY-3.0-NL,CC-BY-3.0-US,CC-BY-4.0,CC-BY-NC-1.0,CC-BY-NC-2.0,CC-BY-NC-2.5,CC-BY-NC-3.0,CC-BY-NC-3.0-DE,CC-BY-NC-4.0,CC-BY-NC-ND-1.0,CC-BY-NC-ND-2.0,CC-BY-NC-ND-2.5,CC-BY-NC-ND-3.0,CC-BY-NC-ND-3.0-DE,CC-BY-NC-ND-3.0-IGO,CC-BY-NC-ND-4.0,CC-BY-NC-SA-1.0,CC-BY-NC-SA-2.0,CC-BY-NC-SA-2.0-DE,CC-BY-NC-SA-2.0-FR,CC-BY-NC-SA-2.0-UK,CC-BY-NC-SA-2.5,CC-BY-NC-SA-3.0,CC-BY-NC-SA-3.0-DE,CC-BY-NC-SA-3.0-IGO,CC-BY-NC-SA-4.0,CC-BY-ND-1.0,CC-BY-ND-2.0,CC-BY-ND-2.5,CC-BY-ND-3.0,CC-BY-ND-3.0-DE,CC-BY-ND-4.0,CC-BY-SA-1.0,CC-BY-SA-2.0,CC-BY-SA-2.0-UK,CC-BY-SA-2.1-JP,CC-BY-SA-2.5,CC-BY-SA-3.0,CC-BY-SA-3.0-AT,CC-BY-SA-3.0-DE,CC-BY-SA-3.0-IGO,CC-BY-SA-4.0,CC-PDDC,CC-PDM-1.0,CC-SA-1.0,CC0-1.0,CDDL-1.0,CDDL-1.1,CDL-1.0,CDLA-Permissive-1.0,CDLA-Permissive-2.0,CDLA-Sharing-1.0,CECILL-1.0,CECILL-1.1,CECILL-2.0,CECILL-2.1,CECILL-B,CECILL-C,CERN-OHL-1.1,CERN-OHL-1.2,CERN-OHL-P-2.0,CERN-OHL-S-2.0,CERN-OHL-W-2.0,CFITSIO,CMU-Mach,CMU-Mach-nodoc,CNRI-Jython,CNRI-Python,CNRI-Python-GPL-Compatible,COIL-1.0,CPAL-1.0,CPL-1.0,CPOL-1.02,CUA-OPL-1.0,Caldera,Caldera-no-preamble,Catharon,ClArtistic,Clips,Community-Spec-1.0,Condor-1.1,Cornell-Lossless-JPEG,Cronyx,Crossword,CryptoSwift,CrystalStacker,Cube,D-FSL-1.0,DEC-3-Clause,DL-DE-BY-2.0,DL-DE-ZERO-2.0,DOC,DRL-1.0,DRL-1.1,DSDP,DocBook-DTD,DocBook-Schema,DocBook-Stylesheet,DocBook-XML,Dotseqn,ECL-1.0,ECL-2.0,EFL-1.0,EFL-2.0,EPICS,EPL-1.0,EPL-2.0,ESA-PL-permissive-2.4,ESA-PL-strong-copyleft-2.4,ESA-PL-weak-copyleft-2.4,EUDatagrid,EUPL-1.0,EUPL-1.1,EUPL-1.2,Elastic-2.0,Entessa,ErlPL-1.1,Eurosym,FBM,FDK-AAC,FSFAP,FSFAP-no-warranty-disclaimer,FSFUL,FSFULLR,FSFULLRSD,FSFULLRWD,FSL-1.1-ALv2,FSL-1.1-MIT,FTL,Fair,Ferguson-Twofish,Frameworx-1.0,FreeBSD-DOC,FreeImage,Furuseth,GCR-docs,GD,GFDL-1.1-invariants-only,GFDL-1.1-invariants-or-later,GFDL-1.1-no-invariants-only,GFDL-1.1-no-invariants-or-later,GFDL-1.1-only,GFDL-1.1-or-later,GFDL-1.2-invariants-only,GFDL-1.2-invariants-or-later,GFDL-1.2-no-invariants-only,GFDL-1.2-no-invariants-or-later,GFDL-1.2-only,GFDL-1.2-or-later,GFDL-1.3-invariants-only,GFDL-1.3-invariants-or-later,GFDL-1.3-no-invariants-only,GFDL-1.3-no-invariants-or-later,GFDL-1.3-only,GFDL-1.3-or-later,GL2PS,GLWTPL,GPL-1.0-only,GPL-1.0-or-later,GPL-2.0-only,GPL-2.0-or-later,GPL-3.0-only,GPL-3.0-or-later,Game-Programming-Gems,Giftware,Glide,Glulxe,Graphics-Gems,Gutmann,HDF5,HIDAPI,HP-1986,HP-1989,HPND,HPND-DEC,HPND-Fenneberg-Livingston,HPND-INRIA-IMAG,HPND-Intel,HPND-Kevlin-Henney,HPND-MIT-disclaimer,HPND-Markus-Kuhn,HPND-Netrek,HPND-Pbmplus,HPND-SMC,HPND-UC,HPND-UC-export-US,HPND-doc,HPND-doc-sell,HPND-export-US,HPND-export-US-acknowledgement,HPND-export-US-modify,HPND-export2-US,HPND-merchantability-variant,HPND-sell-MIT-disclaimer-xserver,HPND-sell-regexpr,HPND-sell-variant,HPND-sell-variant-MIT-disclaimer,HPND-sell-variant-MIT-disclaimer-rev,HPND-sell-variant-critical-systems,HTMLTIDY,HaskellReport,Hippocratic-2.1,IBM-pibs,ICU,IEC-Code-Components-EULA,IJG,IJG-short,IPA,IPL-1.0,ISC,ISC-Veillard,ISO-permission,ImageMagick,Imlib2,Info-ZIP,Inner-Net-2.0,InnoSetup,Intel,Intel-ACPI,Interbase-1.0,JPL-image,JPNIC,JSON,Jam,JasPer-2.0,Kastrup,Kazlib,Knuth-CTAN,LAL-1.2,LAL-1.3,LGPL-2.0-only,LGPL-2.0-or-later,LGPL-2.1-only,LGPL-2.1-or-later,LGPL-3.0-only,LGPL-3.0-or-later,LGPLLR,LOOP,LPD-document,LPL-1.0,LPL-1.02,LPPL-1.0,LPPL-1.1,LPPL-1.2,LPPL-1.3a,LPPL-1.3c,LZMA-SDK-9.11-to-9.20,LZMA-SDK-9.22,Latex2e,Latex2e-translated-notice,Leptonica,LiLiQ-P-1.1,LiLiQ-R-1.1,LiLiQ-Rplus-1.1,Libpng,Linux-OpenIB,Linux-man-pages-1-para,Linux-man-pages-copyleft,Linux-man-pages-copyleft-2-para,Linux-man-pages-copyleft-var,Lucida-Bitmap-Fonts,MIPS,MIT,MIT-0,MIT-CMU,MIT-Click,MIT-Festival,MIT-Khronos-old,MIT-Modern-Variant,MIT-STK,MIT-Wu,MIT-advertising,MIT-enna,MIT-feh,MIT-open-group,MIT-testregex,MITNFA,MMIXware,MMPL-1.0.1,MPEG-SSG,MPL-1.0,MPL-1.1,MPL-2.0,MPL-2.0-no-copyleft-exception,MS-LPL,MS-PL,MS-RL,MTLL,Mackerras-3-Clause,Mackerras-3-Clause-acknowledgment,MakeIndex,Martin-Birgmeier,McPhee-slideshow,Minpack,MirOS,Motosoto,MulanPSL-1.0,MulanPSL-2.0,Multics,Mup,NAIST-2003,NASA-1.3,NBPL-1.0,NCBI-PD,NCGL-UK-2.0,NCL,NCSA,NGPL,NICTA-1.0,NIST-PD,NIST-PD-TNT,NIST-PD-fallback,NIST-Software,NLOD-1.0,NLOD-2.0,NLPL,NOSL,NPL-1.0,NPL-1.1,NPOSL-3.0,NRL,NTIA-PD,NTP,NTP-0,Naumen,NetCDF,Newsletr,Nokia,Noweb,O-UDA-1.0,OAR,OCCT-PL,OCLC-2.0,ODC-By-1.0,ODbL-1.0,OFFIS,OFL-1.0,OFL-1.0-RFN,OFL-1.0-no-RFN,OFL-1.1,OFL-1.1-RFN,OFL-1.1-no-RFN,OGC-1.0,OGDL-Taiwan-1.0,OGL-Canada-2.0,OGL-UK-1.0,OGL-UK-2.0,OGL-UK-3.0,OGTSL,OLDAP-1.1,OLDAP-1.2,OLDAP-1.3,OLDAP-1.4,OLDAP-2.0,OLDAP-2.0.1,OLDAP-2.1,OLDAP-2.2,OLDAP-2.2.1,OLDAP-2.2.2,OLDAP-2.3,OLDAP-2.4,OLDAP-2.5,OLDAP-2.6,OLDAP-2.7,OLDAP-2.8,OLFL-1.3,OML,OPL-1.0,OPL-UK-3.0,OPUBL-1.0,OSC-1.0,OSET-PL-2.1,OSL-1.0,OSL-1.1,OSL-2.0,OSL-2.1,OSL-3.0,OSSP,OpenMDW-1.0,OpenPBS-2.3,OpenSSL,OpenSSL-standalone,OpenVision,PADL,PDDL-1.0,PHP-3.0,PHP-3.01,PPL,PSF-2.0,ParaType-Free-Font-1.3,Parity-6.0.0,Parity-7.0.0,Pixar,Plexus,PolyForm-Noncommercial-1.0.0,PolyForm-Small-Business-1.0.0,PostgreSQL,Python-2.0,Python-2.0.1,QPL-1.0,QPL-1.0-INRIA-2004,Qhull,RHeCos-1.1,RPL-1.1,RPL-1.5,RPSL-1.0,RSA-MD,RSCPL,Rdisc,Ruby,Ruby-pty,SAX-PD,SAX-PD-2.0,SCEA,SGI-B-1.0,SGI-B-1.1,SGI-B-2.0,SGI-OpenGL,SGMLUG-PM,SGP4,SHL-0.5,SHL-0.51,SISSL,SISSL-1.2,SL,SMAIL-GPL,SMLNJ,SMPPL,SNIA,SOFA,SPL-1.0,SSH-OpenSSH,SSH-short,SSLeay-standalone,SSPL-1.0,SUL-1.0,SWL,Saxpath,SchemeReport,Sendmail,Sendmail-8.23,Sendmail-Open-Source-1.1,SimPL-2.0,Sleepycat,Soundex,Spencer-86,Spencer-94,Spencer-99,SugarCRM-1.1.3,Sun-PPP,Sun-PPP-2000,SunPro,Symlinks,TAPR-OHL-1.0,TCL,TCP-wrappers,TGPPL-1.0,TMate,TORQUE-1.1,TOSL,TPDL,TPL-1.0,TTWL,TTYP0,TU-Berlin-1.0,TU-Berlin-2.0,TekHVC,TermReadKey,ThirdEye,TrustedQSL,UCAR,UCL-1.0,UMich-Merit,UPL-1.0,URT-RLE,Ubuntu-font-1.0,UnRAR,Unicode-3.0,Unicode-DFS-2015,Unicode-DFS-2016,Unicode-TOU,UnixCrypt,Unlicense,Unlicense-libtelnet,Unlicense-libwhirlpool,VOSTROM,VSL-1.0,Vim,Vixie-Cron,W3C,W3C-19980720,W3C-20150513,WTFNMFPL,WTFPL,Watcom-1.0,Widget-Workshop,WordNet,Wsuipa,X11,X11-distribute-modifications-variant,X11-no-permit-persons,X11-swapped,XFree86-1.1,XSkat,Xdebug-1.03,Xerox,Xfig,Xnet,YPL-1.0,YPL-1.1,ZPL-1.1,ZPL-2.0,ZPL-2.1,Zed,Zeeff,Zend-2.0,Zimbra-1.3,Zimbra-1.4,Zlib,any-OSI,any-OSI-perl-modules,bcrypt-Solar-Designer,blessing,bzip2-1.0.6,check-cvs,checkmk,copyleft-next-0.3.0,copyleft-next-0.3.1,curl,cve-tou,diffmark,dtoa,dvipdfm,eGenix,etalab-2.0,fwlw,gSOAP-1.3b,generic-xts,gnuplot,gtkbook,hdparm,hyphen-bulgarian,iMatix,jove,libpng-1.6.35,libpng-2.0,libselinux-1.0,libtiff,libutil-David-Nugent,lsof,magaz,mailprio,man2html,metamail,mpi-permissive,mpich2,mplus,ngrep,pkgconf,pnmstitch,psfrag,psutils,python-ldap,radvd,snprintf,softSurfer,ssh-keyscan,swrule,threeparttable,ulem,w3m,wwl,xinetd,xkeyboard-config-Zinoviev,xlock,xpp,xzoom,zlib-acknowledgement`.split(`,`)})),require_deprecated=__commonJSMin(((L,J)=>{J.exports=`AGPL-1.0,AGPL-3.0,BSD-2-Clause-FreeBSD,BSD-2-Clause-NetBSD,GFDL-1.1,GFDL-1.2,GFDL-1.3,GPL-1.0,GPL-2.0,GPL-2.0-with-GCC-exception,GPL-2.0-with-autoconf-exception,GPL-2.0-with-bison-exception,GPL-2.0-with-classpath-exception,GPL-2.0-with-font-exception,GPL-3.0,GPL-3.0-with-GCC-exception,GPL-3.0-with-autoconf-exception,LGPL-2.0,LGPL-2.1,LGPL-3.0,Net-SNMP,Nunit,StandardML-NJ,bzip2-1.0.5,eCos-2.0,wxWindows`.split(`,`)})),require_spdx_exceptions=__commonJSMin(((L,J)=>{J.exports=`389-exception,Asterisk-exception,Autoconf-exception-2.0,Autoconf-exception-3.0,Autoconf-exception-generic,Autoconf-exception-generic-3.0,Autoconf-exception-macro,Bison-exception-1.24,Bison-exception-2.2,Bootloader-exception,Classpath-exception-2.0,CLISP-exception-2.0,cryptsetup-OpenSSL-exception,DigiRule-FOSS-exception,eCos-exception-2.0,Fawkes-Runtime-exception,FLTK-exception,fmt-exception,Font-exception-2.0,freertos-exception-2.0,GCC-exception-2.0,GCC-exception-2.0-note,GCC-exception-3.1,Gmsh-exception,GNAT-exception,GNOME-examples-exception,GNU-compiler-exception,gnu-javamail-exception,GPL-3.0-interface-exception,GPL-3.0-linking-exception,GPL-3.0-linking-source-exception,GPL-CC-1.0,GStreamer-exception-2005,GStreamer-exception-2008,i2p-gpl-java-exception,KiCad-libraries-exception,LGPL-3.0-linking-exception,libpri-OpenH323-exception,Libtool-exception,Linux-syscall-note,LLGPL,LLVM-exception,LZMA-exception,mif-exception,OCaml-LGPL-linking-exception,OCCT-exception-1.0,OpenJDK-assembly-exception-1.0,openvpn-openssl-exception,PS-or-PDF-font-exception-20170817,QPL-1.0-INRIA-2004-exception,Qt-GPL-exception-1.0,Qt-LGPL-exception-1.1,Qwt-exception-1.0,SANE-exception,SHL-2.0,SHL-2.1,stunnel-exception,SWI-exception,Swift-exception,Texinfo-exception,u-boot-exception-2.0,UBDL-exception,Universal-FOSS-exception-1.0,vsftpd-openssl-exception,WxWindows-exception-3.1,x11vnc-openssl-exception`.split(`,`)})),require_scan$2=__commonJSMin(((L,J)=>{var Y=[].concat(require_spdx_license_ids(),require_deprecated()),X=require_spdx_exceptions();J.exports=function(L){var J=0;function Z(){return J<L.length}function Q(Y){if(Y instanceof RegExp){var X=L.slice(J).match(Y);if(X)return J+=X[0].length,X[0]}else if(L.indexOf(Y,J)===J)return J+=Y.length,Y}function $(){Q(/[ ]*/)}function ee(){for(var Y,X=[`WITH`,`AND`,`OR`,`(`,`)`,`:`,`+`],Z=0;Z<X.length&&(Y=Q(X[Z]),!Y);Z++);if(Y===`+`&&J>1&&L[J-2]===` `)throw Error("Space before `+`");return Y&&{type:`OPERATOR`,string:Y}}function te(){return Q(/[A-Za-z0-9-.]+/)}function ne(){var L=te();if(!L)throw Error(`Expected idstring at offset `+J);return L}function re(){if(Q(`DocumentRef-`))return{type:`DOCUMENTREF`,string:ne()}}function ie(){if(Q(`LicenseRef-`))return{type:`LICENSEREF`,string:ne()}}function ae(){var L=J,Z=te();if(Y.indexOf(Z)!==-1)return{type:`LICENSE`,string:Z};if(X.indexOf(Z)!==-1)return{type:`EXCEPTION`,string:Z};J=L}function oe(){return ee()||re()||ie()||ae()}for(var se=[];Z()&&($(),Z());){var ce=oe();if(!ce)throw Error("Unexpected `"+L[J]+"` at offset "+J);se.push(ce)}return se}})),require_parse$5=__commonJSMin(((L,J)=>{J.exports=function(L){var J=0;function Y(){return J<L.length}function X(){return Y()?L[J]:null}function Z(){if(!Y())throw Error();J++}function Q(L){var J=X();if(J&&J.type===`OPERATOR`&&L===J.string)return Z(),J.string}function $(){if(Q(`WITH`)){var L=X();if(L&&L.type===`EXCEPTION`)return Z(),L.string;throw Error("Expected exception after `WITH`")}}function ee(){var L=J,Y=``,$=X();if($.type===`DOCUMENTREF`&&(Z(),Y+=`DocumentRef-`+$.string+`:`,!Q(`:`)))throw Error("Expected `:` after `DocumentRef-...`");if($=X(),$.type===`LICENSEREF`)return Z(),Y+=`LicenseRef-`+$.string,{license:Y};J=L}function te(){var L=X();if(L&&L.type===`LICENSE`){Z();var J={license:L.string};Q(`+`)&&(J.plus=!0);var Y=$();return Y&&(J.exception=Y),J}}function ne(){if(Q(`(`)){var L=ae();if(!Q(`)`))throw Error("Expected `)`");return L}}function re(){return ne()||ee()||te()}function ie(L,J){return function Y(){var X=J();if(X){if(!Q(L))return X;var Z=Y();if(!Z)throw Error(`Expected expression`);return{left:X,conjunction:L.toLowerCase(),right:Z}}}}var ae=ie(`OR`,ie(`AND`,re)),oe=ae();if(!oe||Y())throw Error(`Syntax error`);return oe}})),require_spdx_expression_parse=__commonJSMin(((L,J)=>{var Y=require_scan$2(),X=require_parse$5();J.exports=function(L){return X(Y(L))}})),require_spdx_correct=__commonJSMin(((L,J)=>{var Y=require_spdx_expression_parse(),X=require_spdx_license_ids();function Z(L){try{return Y(L),!0}catch{return!1}}function Q(L,J){var Y=J[0].length-L[0].length;return Y===0?L[0].toUpperCase().localeCompare(J[0].toUpperCase()):Y}var $=[[`APGL`,`AGPL`],[`Gpl`,`GPL`],[`GLP`,`GPL`],[`APL`,`Apache`],[`ISD`,`ISC`],[`GLP`,`GPL`],[`IST`,`ISC`],[`Claude`,`Clause`],[` or later`,`+`],[` International`,``],[`GNU`,`GPL`],[`GUN`,`GPL`],[`+`,``],[`GNU GPL`,`GPL`],[`GNU LGPL`,`LGPL`],[`GNU/GPL`,`GPL`],[`GNU GLP`,`GPL`],[`GNU LESSER GENERAL PUBLIC LICENSE`,`LGPL`],[`GNU Lesser General Public License`,`LGPL`],[`GNU LESSER GENERAL PUBLIC LICENSE`,`LGPL-2.1`],[`GNU Lesser General Public License`,`LGPL-2.1`],[`LESSER GENERAL PUBLIC LICENSE`,`LGPL`],[`Lesser General Public License`,`LGPL`],[`LESSER GENERAL PUBLIC LICENSE`,`LGPL-2.1`],[`Lesser General Public License`,`LGPL-2.1`],[`GNU General Public License`,`GPL`],[`Gnu public license`,`GPL`],[`GNU Public License`,`GPL`],[`GNU GENERAL PUBLIC LICENSE`,`GPL`],[`MTI`,`MIT`],[`Mozilla Public License`,`MPL`],[`Universal Permissive License`,`UPL`],[`WTH`,`WTF`],[`WTFGPL`,`WTFPL`],[`-License`,``]].sort(Q),ee=0,te=1,ne=[function(L){return L.toUpperCase()},function(L){return L.trim()},function(L){return L.replace(/\./g,``)},function(L){return L.replace(/\s+/g,``)},function(L){return L.replace(/\s+/g,`-`)},function(L){return L.replace(`v`,`-`)},function(L){return L.replace(/,?\s*(\d)/,`-$1`)},function(L){return L.replace(/,?\s*(\d)/,`-$1.0`)},function(L){return L.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,`-$2`)},function(L){return L.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,`-$2.0`)},function(L){return L[0].toUpperCase()+L.slice(1)},function(L){return L.replace(`/`,`-`)},function(L){return L.replace(/\s*V\s*(\d)/,`-$1`).replace(/(\d)$/,`$1.0`)},function(L){return L.indexOf(`3.0`)===-1?L+`-only`:L+`-or-later`},function(L){return L+`only`},function(L){return L.replace(/(\d)$/,`-$1.0`)},function(L){return L.replace(/(-| )?(\d)$/,`-$2-Clause`)},function(L){return L.replace(/(-| )clause(-| )(\d)/,`-$3-Clause`)},function(L){return L.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,`BSD-3-Clause`)},function(L){return L.replace(/\bSimplified(-| )?BSD((-| )License)?/i,`BSD-2-Clause`)},function(L){return L.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,`BSD-2-Clause-$1BSD`)},function(L){return L.replace(/\bClear(-| )?BSD((-| )License)?/i,`BSD-3-Clause-Clear`)},function(L){return L.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,`BSD-4-Clause`)},function(L){return`CC-`+L},function(L){return`CC-`+L+`-4.0`},function(L){return L.replace(`Attribution`,`BY`).replace(`NonCommercial`,`NC`).replace(`NoDerivatives`,`ND`).replace(/ (\d)/,`-$1`).replace(/ ?International/,``)},function(L){return`CC-`+L.replace(`Attribution`,`BY`).replace(`NonCommercial`,`NC`).replace(`NoDerivatives`,`ND`).replace(/ (\d)/,`-$1`).replace(/ ?International/,``)+`-4.0`}],re=X.map(function(L){var J=/^(.*)-\d+\.\d+$/.exec(L);return J?[J[0],J[1]]:[L,null]}).reduce(function(L,J){var Y=J[1];return L[Y]=L[Y]||[],L[Y].push(J[0]),L},{}),ie=Object.keys(re).map(function(L){return[L,re[L]]}).filter(function(L){return L[1].length===1&&L[0]!==null&&L[0]!==`APL`}).map(function(L){return[L[0],L[1][0]]});re=void 0;var ae=[[`UNLI`,`Unlicense`],[`WTF`,`WTFPL`],[`2 CLAUSE`,`BSD-2-Clause`],[`2-CLAUSE`,`BSD-2-Clause`],[`3 CLAUSE`,`BSD-3-Clause`],[`3-CLAUSE`,`BSD-3-Clause`],[`AFFERO`,`AGPL-3.0-or-later`],[`AGPL`,`AGPL-3.0-or-later`],[`APACHE`,`Apache-2.0`],[`ARTISTIC`,`Artistic-2.0`],[`Affero`,`AGPL-3.0-or-later`],[`BEER`,`Beerware`],[`BOOST`,`BSL-1.0`],[`BSD`,`BSD-2-Clause`],[`CDDL`,`CDDL-1.1`],[`ECLIPSE`,`EPL-1.0`],[`FUCK`,`WTFPL`],[`GNU`,`GPL-3.0-or-later`],[`LGPL`,`LGPL-3.0-or-later`],[`GPLV1`,`GPL-1.0-only`],[`GPL-1`,`GPL-1.0-only`],[`GPLV2`,`GPL-2.0-only`],[`GPL-2`,`GPL-2.0-only`],[`GPL`,`GPL-3.0-or-later`],[`MIT +NO-FALSE-ATTRIBS`,`MITNFA`],[`MIT`,`MIT`],[`MPL`,`MPL-2.0`],[`X11`,`X11`],[`ZLIB`,`Zlib`]].concat(ie).sort(Q),oe=0,se=1,ce=function(L){for(var J=0;J<ne.length;J++){var Y=ne[J](L).trim();if(Y!==L&&Z(Y))return Y}return null},le=function(L){for(var J=L.toUpperCase(),Y=0;Y<ae.length;Y++){var X=ae[Y];if(J.indexOf(X[oe])>-1)return X[se]}return null},ue=function(L,J){for(var Y=0;Y<$.length;Y++){var X=$[Y],Z=X[ee];if(L.indexOf(Z)>-1){var Q=J(L.replace(Z,X[te]));if(Q!==null)return Q}}return null};J.exports=function(L,J){J||={};var Y=J.upgrade===void 0?!0:!!J.upgrade;function X(L){return Y?de(L):L}if(!(typeof L==`string`&&L.trim().length!==0))throw Error(`Invalid argument. Expected non-empty string.`);if(L=L.trim(),Z(L))return X(L);var Q=L.replace(/\+$/,``).trim();if(Z(Q))return X(Q);var $=ce(L);return $!==null||($=ue(L,function(L){return Z(L)?L:ce(L)}),$!==null)||($=le(L),$!==null)||($=ue(L,le),$!==null)?X($):null};function de(L){return[`GPL-1.0`,`LGPL-1.0`,`AGPL-1.0`,`GPL-2.0`,`LGPL-2.0`,`AGPL-2.0`,`LGPL-2.1`].indexOf(L)===-1?[`GPL-1.0+`,`GPL-2.0+`,`GPL-3.0+`,`LGPL-2.0+`,`LGPL-2.1+`,`LGPL-3.0+`,`AGPL-1.0+`,`AGPL-3.0+`].indexOf(L)===-1?[`GPL-3.0`,`LGPL-3.0`,`AGPL-3.0`].indexOf(L)===-1?L:L+`-or-later`:L.replace(/\+$/,`-or-later`):L+`-only`}})),require_validate_npm_package_license=__commonJSMin(((L,J)=>{var Y=require_spdx_expression_parse(),X=require_spdx_correct(),Z=`license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"`,Q=/^SEE LICEN[CS]E IN (.+)$/;function $(L,J){return J.slice(0,L.length)===L}function ee(L){if(L.hasOwnProperty(`license`)){var J=L.license;return $(`LicenseRef`,J)||$(`DocumentRef`,J)}else return ee(L.left)||ee(L.right)}J.exports=function(L){var J;try{J=Y(L)}catch{var $;if(L===`UNLICENSED`||L===`UNLICENCED`)return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if($=Q.exec(L))return{validForOldPackages:!0,validForNewPackages:!0,inFile:$[1]};var te={validForOldPackages:!1,validForNewPackages:!1,warnings:[Z]};if(L.trim().length!==0){var ne=X(L);ne&&te.warnings.push(`license is similar to the valid expression "`+ne+`"`)}return te}return ee(J)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[Z]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}})),require_index_min=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.LRUCache=void 0;var J=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,Y=new Set,X=typeof process==`object`&&process?process:{},Z=(L,J,Y,Z)=>{typeof X.emitWarning==`function`?X.emitWarning(L,J,Y,Z):console.error(`[${Y}] ${J}: ${L}`)},Q=globalThis.AbortController,$=globalThis.AbortSignal;if(typeof Q>`u`){$=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(L,J){this._onabort.push(J)}},Q=class{constructor(){J()}signal=new $;abort(L){if(!this.signal.aborted){this.signal.reason=L,this.signal.aborted=!0;for(let J of this.signal._onabort)J(L);this.signal.onabort?.(L)}}};let L=X.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,J=()=>{L&&(L=!1,Z("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,J))}}var ee=L=>!Y.has(L),te=L=>L&&L===Math.floor(L)&&L>0&&isFinite(L),ne=L=>te(L)?L<=2**8?Uint8Array:L<=2**16?Uint16Array:L<=2**32?Uint32Array:L<=2**53-1?re:null:null,re=class extends Array{constructor(L){super(L),this.fill(0)}},ie=class L{heap;length;static#e=!1;static create(J){let Y=ne(J);if(!Y)return[];L.#e=!0;let X=new L(J,Y);return L.#e=!1,X}constructor(J,Y){if(!L.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new Y(J),this.length=0}push(L){this.heap[this.length++]=L}pop(){return this.heap[--this.length]}};L.LRUCache=class L{#e;#t;#n;#r;#i;#a;#o;#s;get perf(){return this.#s}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;#C;#w;#T;#E;static unsafeExposeInternals(L){return{starts:L.#b,ttls:L.#x,autopurgeTimers:L.#S,sizes:L.#y,keyMap:L.#u,keyList:L.#d,valList:L.#f,next:L.#p,prev:L.#m,get head(){return L.#h},get tail(){return L.#g},free:L.#_,isBackgroundFetch:J=>L.#V(J),backgroundFetch:(J,Y,X,Z)=>L.#B(J,Y,X,Z),moveToTail:J=>L.#U(J),indexes:J=>L.#I(J),rindexes:J=>L.#L(J),isStale:J=>L.#j(J)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#o}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(X){let{max:Q=0,ttl:$,ttlResolution:re=1,ttlAutopurge:ae,updateAgeOnGet:oe,updateAgeOnHas:se,allowStale:ce,dispose:le,onInsert:ue,disposeAfter:de,noDisposeOnSet:fe,noUpdateTTL:pe,maxSize:me=0,maxEntrySize:he=0,sizeCalculation:ge,fetchMethod:_e,memoMethod:ve,noDeleteOnFetchRejection:ye,noDeleteOnStaleGet:be,allowStaleOnFetchRejection:xe,allowStaleOnFetchAbort:Se,ignoreFetchAbort:Ce,perf:we}=X;if(we!==void 0&&typeof we?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(this.#s=we??J,Q!==0&&!te(Q))throw TypeError(`max option must be a nonnegative integer`);let Te=Q?ne(Q):Array;if(!Te)throw Error(`invalid max value: `+Q);if(this.#e=Q,this.#t=me,this.maxEntrySize=he||this.#t,this.sizeCalculation=ge,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(ve!==void 0&&typeof ve!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#o=ve,_e!==void 0&&typeof _e!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#a=_e,this.#w=!!_e,this.#u=new Map,this.#d=Array(Q).fill(void 0),this.#f=Array(Q).fill(void 0),this.#p=new Te(Q),this.#m=new Te(Q),this.#h=0,this.#g=0,this.#_=ie.create(Q),this.#c=0,this.#l=0,typeof le==`function`&&(this.#n=le),typeof ue==`function`&&(this.#r=ue),typeof de==`function`?(this.#i=de,this.#v=[]):(this.#i=void 0,this.#v=void 0),this.#C=!!this.#n,this.#E=!!this.#r,this.#T=!!this.#i,this.noDisposeOnSet=!!fe,this.noUpdateTTL=!!pe,this.noDeleteOnFetchRejection=!!ye,this.allowStaleOnFetchRejection=!!xe,this.allowStaleOnFetchAbort=!!Se,this.ignoreFetchAbort=!!Ce,this.maxEntrySize!==0){if(this.#t!==0&&!te(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!te(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#M()}if(this.allowStale=!!ce,this.noDeleteOnStaleGet=!!be,this.updateAgeOnGet=!!oe,this.updateAgeOnHas=!!se,this.ttlResolution=te(re)||re===0?re:1,this.ttlAutopurge=!!ae,this.ttl=$||0,this.ttl){if(!te(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#D()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let J=`LRU_CACHE_UNBOUNDED`;ee(J)&&(Y.add(J),Z(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,J,L))}}getRemainingTTL(L){return this.#u.has(L)?1/0:0}#D(){let L=new re(this.#e),J=new re(this.#e);this.#x=L,this.#b=J;let Y=this.ttlAutopurge?Array(this.#e):void 0;this.#S=Y,this.#A=(X,Z,Q=this.#s.now())=>{if(J[X]=Z===0?0:Q,L[X]=Z,Y?.[X]&&(clearTimeout(Y[X]),Y[X]=void 0),Z!==0&&Y){let L=setTimeout(()=>{this.#j(X)&&this.#W(this.#d[X],`expire`)},Z+1);L.unref&&L.unref(),Y[X]=L}},this.#O=Y=>{J[Y]=L[Y]===0?0:this.#s.now()},this.#k=(Y,Q)=>{if(L[Q]){let $=L[Q],ee=J[Q];if(!$||!ee)return;Y.ttl=$,Y.start=ee,Y.now=X||Z(),Y.remainingTTL=$-(Y.now-ee)}};let X=0,Z=()=>{let L=this.#s.now();if(this.ttlResolution>0){X=L;let J=setTimeout(()=>X=0,this.ttlResolution);J.unref&&J.unref()}return L};this.getRemainingTTL=Y=>{let Q=this.#u.get(Y);if(Q===void 0)return 0;let $=L[Q],ee=J[Q];return!$||!ee?1/0:$-((X||Z())-ee)},this.#j=Y=>{let Q=J[Y],$=L[Y];return!!$&&!!Q&&(X||Z())-Q>$}}#O=()=>{};#k=()=>{};#A=()=>{};#j=()=>!1;#M(){let L=new re(this.#e);this.#l=0,this.#y=L,this.#N=J=>{this.#l-=L[J],L[J]=0},this.#F=(L,J,Y,X)=>{if(this.#V(J))return 0;if(!te(Y))if(X){if(typeof X!=`function`)throw TypeError(`sizeCalculation must be a function`);if(Y=X(J,L),!te(Y))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return Y},this.#P=(J,Y,X)=>{if(L[J]=Y,this.#t){let Y=this.#t-L[J];for(;this.#l>Y;)this.#z(!0)}this.#l+=L[J],X&&(X.entrySize=Y,X.totalCalculatedSize=this.#l)}}#N=L=>{};#P=(L,J,Y)=>{};#F=(L,J,Y,X)=>{if(Y||X)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#I({allowStale:L=this.allowStale}={}){if(this.#c)for(let J=this.#g;!(!this.#R(J)||((L||!this.#j(J))&&(yield J),J===this.#h));)J=this.#m[J]}*#L({allowStale:L=this.allowStale}={}){if(this.#c)for(let J=this.#h;!(!this.#R(J)||((L||!this.#j(J))&&(yield J),J===this.#g));)J=this.#p[J]}#R(L){return L!==void 0&&this.#u.get(this.#d[L])===L}*entries(){for(let L of this.#I())this.#f[L]!==void 0&&this.#d[L]!==void 0&&!this.#V(this.#f[L])&&(yield[this.#d[L],this.#f[L]])}*rentries(){for(let L of this.#L())this.#f[L]!==void 0&&this.#d[L]!==void 0&&!this.#V(this.#f[L])&&(yield[this.#d[L],this.#f[L]])}*keys(){for(let L of this.#I()){let J=this.#d[L];J!==void 0&&!this.#V(this.#f[L])&&(yield J)}}*rkeys(){for(let L of this.#L()){let J=this.#d[L];J!==void 0&&!this.#V(this.#f[L])&&(yield J)}}*values(){for(let L of this.#I())this.#f[L]!==void 0&&!this.#V(this.#f[L])&&(yield this.#f[L])}*rvalues(){for(let L of this.#L())this.#f[L]!==void 0&&!this.#V(this.#f[L])&&(yield this.#f[L])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(L,J={}){for(let Y of this.#I()){let X=this.#f[Y],Z=this.#V(X)?X.__staleWhileFetching:X;if(Z!==void 0&&L(Z,this.#d[Y],this))return this.get(this.#d[Y],J)}}forEach(L,J=this){for(let Y of this.#I()){let X=this.#f[Y],Z=this.#V(X)?X.__staleWhileFetching:X;Z!==void 0&&L.call(J,Z,this.#d[Y],this)}}rforEach(L,J=this){for(let Y of this.#L()){let X=this.#f[Y],Z=this.#V(X)?X.__staleWhileFetching:X;Z!==void 0&&L.call(J,Z,this.#d[Y],this)}}purgeStale(){let L=!1;for(let J of this.#L({allowStale:!0}))this.#j(J)&&(this.#W(this.#d[J],`expire`),L=!0);return L}info(L){let J=this.#u.get(L);if(J===void 0)return;let Y=this.#f[J],X=this.#V(Y)?Y.__staleWhileFetching:Y;if(X===void 0)return;let Z={value:X};if(this.#x&&this.#b){let L=this.#x[J],Y=this.#b[J];L&&Y&&(Z.ttl=L-(this.#s.now()-Y),Z.start=Date.now())}return this.#y&&(Z.size=this.#y[J]),Z}dump(){let L=[];for(let J of this.#I({allowStale:!0})){let Y=this.#d[J],X=this.#f[J],Z=this.#V(X)?X.__staleWhileFetching:X;if(Z===void 0||Y===void 0)continue;let Q={value:Z};if(this.#x&&this.#b){Q.ttl=this.#x[J];let L=this.#s.now()-this.#b[J];Q.start=Math.floor(Date.now()-L)}this.#y&&(Q.size=this.#y[J]),L.unshift([Y,Q])}return L}load(L){this.clear();for(let[J,Y]of L){if(Y.start){let L=Date.now()-Y.start;Y.start=this.#s.now()-L}this.set(J,Y.value,Y)}}set(L,J,Y={}){if(J===void 0)return this.delete(L),this;let{ttl:X=this.ttl,start:Z,noDisposeOnSet:Q=this.noDisposeOnSet,sizeCalculation:$=this.sizeCalculation,status:ee}=Y,{noUpdateTTL:te=this.noUpdateTTL}=Y,ne=this.#F(L,J,Y.size||0,$);if(this.maxEntrySize&&ne>this.maxEntrySize)return ee&&(ee.set=`miss`,ee.maxEntrySizeExceeded=!0),this.#W(L,`set`),this;let re=this.#c===0?void 0:this.#u.get(L);if(re===void 0)re=this.#c===0?this.#g:this.#_.length===0?this.#c===this.#e?this.#z(!1):this.#c:this.#_.pop(),this.#d[re]=L,this.#f[re]=J,this.#u.set(L,re),this.#p[this.#g]=re,this.#m[re]=this.#g,this.#g=re,this.#c++,this.#P(re,ne,ee),ee&&(ee.set=`add`),te=!1,this.#E&&this.#r?.(J,L,`add`);else{this.#U(re);let Y=this.#f[re];if(J!==Y){if(this.#w&&this.#V(Y)){Y.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:J}=Y;J!==void 0&&!Q&&(this.#C&&this.#n?.(J,L,`set`),this.#T&&this.#v?.push([J,L,`set`]))}else Q||(this.#C&&this.#n?.(Y,L,`set`),this.#T&&this.#v?.push([Y,L,`set`]));if(this.#N(re),this.#P(re,ne,ee),this.#f[re]=J,ee){ee.set=`replace`;let L=Y&&this.#V(Y)?Y.__staleWhileFetching:Y;L!==void 0&&(ee.oldValue=L)}}else ee&&(ee.set=`update`);this.#E&&this.onInsert?.(J,L,J===Y?`update`:`replace`)}if(X!==0&&!this.#x&&this.#D(),this.#x&&(te||this.#A(re,X,Z),ee&&this.#k(ee,re)),!Q&&this.#T&&this.#v){let L=this.#v,J;for(;J=L?.shift();)this.#i?.(...J)}return this}pop(){try{for(;this.#c;){let L=this.#f[this.#h];if(this.#z(!0),this.#V(L)){if(L.__staleWhileFetching)return L.__staleWhileFetching}else if(L!==void 0)return L}}finally{if(this.#T&&this.#v){let L=this.#v,J;for(;J=L?.shift();)this.#i?.(...J)}}}#z(L){let J=this.#h,Y=this.#d[J],X=this.#f[J];return this.#w&&this.#V(X)?X.__abortController.abort(Error(`evicted`)):(this.#C||this.#T)&&(this.#C&&this.#n?.(X,Y,`evict`),this.#T&&this.#v?.push([X,Y,`evict`])),this.#N(J),this.#S?.[J]&&(clearTimeout(this.#S[J]),this.#S[J]=void 0),L&&(this.#d[J]=void 0,this.#f[J]=void 0,this.#_.push(J)),this.#c===1?(this.#h=this.#g=0,this.#_.length=0):this.#h=this.#p[J],this.#u.delete(Y),this.#c--,J}has(L,J={}){let{updateAgeOnHas:Y=this.updateAgeOnHas,status:X}=J,Z=this.#u.get(L);if(Z!==void 0){let L=this.#f[Z];if(this.#V(L)&&L.__staleWhileFetching===void 0)return!1;if(this.#j(Z))X&&(X.has=`stale`,this.#k(X,Z));else return Y&&this.#O(Z),X&&(X.has=`hit`,this.#k(X,Z)),!0}else X&&(X.has=`miss`);return!1}peek(L,J={}){let{allowStale:Y=this.allowStale}=J,X=this.#u.get(L);if(X===void 0||!Y&&this.#j(X))return;let Z=this.#f[X];return this.#V(Z)?Z.__staleWhileFetching:Z}#B(L,J,Y,X){let Z=J===void 0?void 0:this.#f[J];if(this.#V(Z))return Z;let $=new Q,{signal:ee}=Y;ee?.addEventListener(`abort`,()=>$.abort(ee.reason),{signal:$.signal});let te={signal:$.signal,options:Y,context:X},ne=(X,Z=!1)=>{let{aborted:Q}=$.signal,ee=Y.ignoreFetchAbort&&X!==void 0,ne=Y.ignoreFetchAbort||!!(Y.allowStaleOnFetchAbort&&X!==void 0);if(Y.status&&(Q&&!Z?(Y.status.fetchAborted=!0,Y.status.fetchError=$.signal.reason,ee&&(Y.status.fetchAbortIgnored=!0)):Y.status.fetchResolved=!0),Q&&!ee&&!Z)return ie($.signal.reason,ne);let re=oe,ae=this.#f[J];return(ae===oe||ee&&Z&&ae===void 0)&&(X===void 0?re.__staleWhileFetching===void 0?this.#W(L,`fetch`):this.#f[J]=re.__staleWhileFetching:(Y.status&&(Y.status.fetchUpdated=!0),this.set(L,X,te.options))),X},re=L=>(Y.status&&(Y.status.fetchRejected=!0,Y.status.fetchError=L),ie(L,!1)),ie=(X,Z)=>{let{aborted:Q}=$.signal,ee=Q&&Y.allowStaleOnFetchAbort,te=ee||Y.allowStaleOnFetchRejection,ne=te||Y.noDeleteOnFetchRejection,re=oe;if(this.#f[J]===oe&&(!ne||!Z&&re.__staleWhileFetching===void 0?this.#W(L,`fetch`):ee||(this.#f[J]=re.__staleWhileFetching)),te)return Y.status&&re.__staleWhileFetching!==void 0&&(Y.status.returnedStale=!0),re.__staleWhileFetching;if(re.__returned===re)throw X},ae=(J,X)=>{let Q=this.#a?.(L,Z,te);Q&&Q instanceof Promise&&Q.then(L=>J(L===void 0?void 0:L),X),$.signal.addEventListener(`abort`,()=>{(!Y.ignoreFetchAbort||Y.allowStaleOnFetchAbort)&&(J(void 0),Y.allowStaleOnFetchAbort&&(J=L=>ne(L,!0)))})};Y.status&&(Y.status.fetchDispatched=!0);let oe=new Promise(ae).then(ne,re),se=Object.assign(oe,{__abortController:$,__staleWhileFetching:Z,__returned:void 0});return J===void 0?(this.set(L,se,{...te.options,status:void 0}),J=this.#u.get(L)):this.#f[J]=se,se}#V(L){if(!this.#w)return!1;let J=L;return!!J&&J instanceof Promise&&J.hasOwnProperty(`__staleWhileFetching`)&&J.__abortController instanceof Q}async fetch(L,J={}){let{allowStale:Y=this.allowStale,updateAgeOnGet:X=this.updateAgeOnGet,noDeleteOnStaleGet:Z=this.noDeleteOnStaleGet,ttl:Q=this.ttl,noDisposeOnSet:$=this.noDisposeOnSet,size:ee=0,sizeCalculation:te=this.sizeCalculation,noUpdateTTL:ne=this.noUpdateTTL,noDeleteOnFetchRejection:re=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:ie=this.allowStaleOnFetchRejection,ignoreFetchAbort:ae=this.ignoreFetchAbort,allowStaleOnFetchAbort:oe=this.allowStaleOnFetchAbort,context:se,forceRefresh:ce=!1,status:le,signal:ue}=J;if(!this.#w)return le&&(le.fetch=`get`),this.get(L,{allowStale:Y,updateAgeOnGet:X,noDeleteOnStaleGet:Z,status:le});let de={allowStale:Y,updateAgeOnGet:X,noDeleteOnStaleGet:Z,ttl:Q,noDisposeOnSet:$,size:ee,sizeCalculation:te,noUpdateTTL:ne,noDeleteOnFetchRejection:re,allowStaleOnFetchRejection:ie,allowStaleOnFetchAbort:oe,ignoreFetchAbort:ae,status:le,signal:ue},fe=this.#u.get(L);if(fe===void 0){le&&(le.fetch=`miss`);let J=this.#B(L,fe,de,se);return J.__returned=J}else{let J=this.#f[fe];if(this.#V(J)){let L=Y&&J.__staleWhileFetching!==void 0;return le&&(le.fetch=`inflight`,L&&(le.returnedStale=!0)),L?J.__staleWhileFetching:J.__returned=J}let Z=this.#j(fe);if(!ce&&!Z)return le&&(le.fetch=`hit`),this.#U(fe),X&&this.#O(fe),le&&this.#k(le,fe),J;let Q=this.#B(L,fe,de,se),$=Q.__staleWhileFetching!==void 0&&Y;return le&&(le.fetch=Z?`stale`:`refresh`,$&&Z&&(le.returnedStale=!0)),$?Q.__staleWhileFetching:Q.__returned=Q}}async forceFetch(L,J={}){let Y=await this.fetch(L,J);if(Y===void 0)throw Error(`fetch() returned undefined`);return Y}memo(L,J={}){let Y=this.#o;if(!Y)throw Error(`no memoMethod provided to constructor`);let{context:X,forceRefresh:Z,...Q}=J,$=this.get(L,Q);if(!Z&&$!==void 0)return $;let ee=Y(L,$,{options:Q,context:X});return this.set(L,ee,Q),ee}get(L,J={}){let{allowStale:Y=this.allowStale,updateAgeOnGet:X=this.updateAgeOnGet,noDeleteOnStaleGet:Z=this.noDeleteOnStaleGet,status:Q}=J,$=this.#u.get(L);if($!==void 0){let J=this.#f[$],ee=this.#V(J);return Q&&this.#k(Q,$),this.#j($)?(Q&&(Q.get=`stale`),ee?(Q&&Y&&J.__staleWhileFetching!==void 0&&(Q.returnedStale=!0),Y?J.__staleWhileFetching:void 0):(Z||this.#W(L,`expire`),Q&&Y&&(Q.returnedStale=!0),Y?J:void 0)):(Q&&(Q.get=`hit`),ee?J.__staleWhileFetching:(this.#U($),X&&this.#O($),J))}else Q&&(Q.get=`miss`)}#H(L,J){this.#m[J]=L,this.#p[L]=J}#U(L){L!==this.#g&&(L===this.#h?this.#h=this.#p[L]:this.#H(this.#m[L],this.#p[L]),this.#H(this.#g,L),this.#g=L)}delete(L){return this.#W(L,`delete`)}#W(L,J){let Y=!1;if(this.#c!==0){let X=this.#u.get(L);if(X!==void 0)if(this.#S?.[X]&&(clearTimeout(this.#S?.[X]),this.#S[X]=void 0),Y=!0,this.#c===1)this.#G(J);else{this.#N(X);let Y=this.#f[X];if(this.#V(Y)?Y.__abortController.abort(Error(`deleted`)):(this.#C||this.#T)&&(this.#C&&this.#n?.(Y,L,J),this.#T&&this.#v?.push([Y,L,J])),this.#u.delete(L),this.#d[X]=void 0,this.#f[X]=void 0,X===this.#g)this.#g=this.#m[X];else if(X===this.#h)this.#h=this.#p[X];else{let L=this.#m[X];this.#p[L]=this.#p[X];let J=this.#p[X];this.#m[J]=this.#m[X]}this.#c--,this.#_.push(X)}}if(this.#T&&this.#v?.length){let L=this.#v,J;for(;J=L?.shift();)this.#i?.(...J)}return Y}clear(){return this.#G(`delete`)}#G(L){for(let J of this.#L({allowStale:!0})){let Y=this.#f[J];if(this.#V(Y))Y.__abortController.abort(Error(`deleted`));else{let X=this.#d[J];this.#C&&this.#n?.(Y,X,L),this.#T&&this.#v?.push([Y,X,L])}}if(this.#u.clear(),this.#f.fill(void 0),this.#d.fill(void 0),this.#x&&this.#b){this.#x.fill(0),this.#b.fill(0);for(let L of this.#S??[])L!==void 0&&clearTimeout(L);this.#S?.fill(void 0)}if(this.#y&&this.#y.fill(0),this.#h=0,this.#g=0,this.#_.length=0,this.#l=0,this.#c=0,this.#T&&this.#v){let L=this.#v,J;for(;J=L?.shift();)this.#i?.(...J)}}}})),require_hosts=__commonJSMin(((L,J)=>{let Y=(...L)=>L.every(L=>L)?L.join(``):``,X=L=>L?encodeURIComponent(L):``,Z=L=>L.toLowerCase().replace(/^\W+/g,``).replace(/(?<!\W)\W+$/,``).replace(/\//g,``).replace(/\W+/g,`-`),Q={sshtemplate:({domain:L,user:J,project:X,committish:Z})=>`git@${L}:${J}/${X}.git${Y(`#`,Z)}`,sshurltemplate:({domain:L,user:J,project:X,committish:Z})=>`git+ssh://git@${L}/${J}/${X}.git${Y(`#`,Z)}`,edittemplate:({domain:L,user:J,project:Z,committish:Q,editpath:$,path:ee})=>`https://${L}/${J}/${Z}${Y(`/`,$,`/`,X(Q||`HEAD`),`/`,ee)}`,browsetemplate:({domain:L,user:J,project:Z,committish:Q,treepath:$})=>`https://${L}/${J}/${Z}${Y(`/`,$,`/`,X(Q))}`,browsetreetemplate:({domain:L,user:J,project:Z,committish:Q,treepath:$,path:ee,fragment:te,hashformat:ne})=>`https://${L}/${J}/${Z}/${$}/${X(Q||`HEAD`)}/${ee}${Y(`#`,ne(te||``))}`,browseblobtemplate:({domain:L,user:J,project:Z,committish:Q,blobpath:$,path:ee,fragment:te,hashformat:ne})=>`https://${L}/${J}/${Z}/${$}/${X(Q||`HEAD`)}/${ee}${Y(`#`,ne(te||``))}`,docstemplate:({domain:L,user:J,project:Z,treepath:Q,committish:$})=>`https://${L}/${J}/${Z}${Y(`/`,Q,`/`,X($))}#readme`,httpstemplate:({auth:L,domain:J,user:X,project:Z,committish:Q})=>`git+https://${Y(L,`@`)}${J}/${X}/${Z}.git${Y(`#`,Q)}`,filetemplate:({domain:L,user:J,project:Y,committish:Z,path:Q})=>`https://${L}/${J}/${Y}/raw/${X(Z||`HEAD`)}/${Q}`,shortcuttemplate:({type:L,user:J,project:X,committish:Z})=>`${L}:${J}/${X}${Y(`#`,Z)}`,pathtemplate:({user:L,project:J,committish:X})=>`${L}/${J}${Y(`#`,X)}`,bugstemplate:({domain:L,user:J,project:Y})=>`https://${L}/${J}/${Y}/issues`,hashformat:Z},$={};$.github={protocols:[`git:`,`http:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`github.com`,treepath:`tree`,blobpath:`blob`,editpath:`edit`,filetemplate:({auth:L,user:J,project:Z,committish:Q,path:$})=>`https://${Y(L,`@`)}raw.githubusercontent.com/${J}/${Z}/${X(Q||`HEAD`)}/${$}`,gittemplate:({auth:L,domain:J,user:X,project:Z,committish:Q})=>`git://${Y(L,`@`)}${J}/${X}/${Z}.git${Y(`#`,Q)}`,tarballtemplate:({domain:L,user:J,project:Y,committish:Z})=>`https://codeload.${L}/${J}/${Y}/tar.gz/${X(Z||`HEAD`)}`,extract:L=>{let[,J,Y,X,Z]=L.pathname.split(`/`,5);if(!(X&&X!==`tree`)&&(X||(Z=L.hash.slice(1)),Y&&Y.endsWith(`.git`)&&(Y=Y.slice(0,-4)),!(!J||!Y)))return{user:J,project:Y,committish:Z}}},$.bitbucket={protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`bitbucket.org`,treepath:`src`,blobpath:`src`,editpath:`?mode=edit`,edittemplate:({domain:L,user:J,project:Z,committish:Q,treepath:$,path:ee,editpath:te})=>`https://${L}/${J}/${Z}${Y(`/`,$,`/`,X(Q||`HEAD`),`/`,ee,te)}`,tarballtemplate:({domain:L,user:J,project:Y,committish:Z})=>`https://${L}/${J}/${Y}/get/${X(Z||`HEAD`)}.tar.gz`,extract:L=>{let[,J,Y,X]=L.pathname.split(`/`,4);if(![`get`].includes(X)&&(Y&&Y.endsWith(`.git`)&&(Y=Y.slice(0,-4)),!(!J||!Y)))return{user:J,project:Y,committish:L.hash.slice(1)}}},$.gitlab={protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gitlab.com`,treepath:`tree`,blobpath:`tree`,editpath:`-/edit`,tarballtemplate:({domain:L,user:J,project:Y,committish:Z})=>`https://${L}/${J}/${Y}/repository/archive.tar.gz?ref=${X(Z||`HEAD`)}`,extract:L=>{let J=L.pathname.slice(1);if(J.includes(`/-/`)||J.includes(`/archive.tar.gz`))return;let Y=J.split(`/`),X=Y.pop();X.endsWith(`.git`)&&(X=X.slice(0,-4));let Z=Y.join(`/`);if(!(!Z||!X))return{user:Z,project:X,committish:L.hash.slice(1)}}},$.gist={protocols:[`git:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gist.github.com`,editpath:`edit`,sshtemplate:({domain:L,project:J,committish:X})=>`git@${L}:${J}.git${Y(`#`,X)}`,sshurltemplate:({domain:L,project:J,committish:X})=>`git+ssh://git@${L}/${J}.git${Y(`#`,X)}`,edittemplate:({domain:L,user:J,project:Z,committish:Q,editpath:$})=>`https://${L}/${J}/${Z}${Y(`/`,X(Q))}/${$}`,browsetemplate:({domain:L,project:J,committish:Z})=>`https://${L}/${J}${Y(`/`,X(Z))}`,browsetreetemplate:({domain:L,project:J,committish:Z,path:Q,hashformat:$})=>`https://${L}/${J}${Y(`/`,X(Z))}${Y(`#`,$(Q))}`,browseblobtemplate:({domain:L,project:J,committish:Z,path:Q,hashformat:$})=>`https://${L}/${J}${Y(`/`,X(Z))}${Y(`#`,$(Q))}`,docstemplate:({domain:L,project:J,committish:Z})=>`https://${L}/${J}${Y(`/`,X(Z))}`,httpstemplate:({domain:L,project:J,committish:X})=>`git+https://${L}/${J}.git${Y(`#`,X)}`,filetemplate:({user:L,project:J,committish:Z,path:Q})=>`https://gist.githubusercontent.com/${L}/${J}/raw${Y(`/`,X(Z))}/${Q}`,shortcuttemplate:({type:L,project:J,committish:X})=>`${L}:${J}${Y(`#`,X)}`,pathtemplate:({project:L,committish:J})=>`${L}${Y(`#`,J)}`,bugstemplate:({domain:L,project:J})=>`https://${L}/${J}`,gittemplate:({domain:L,project:J,committish:X})=>`git://${L}/${J}.git${Y(`#`,X)}`,tarballtemplate:({project:L,committish:J})=>`https://codeload.github.com/gist/${L}/tar.gz/${X(J||`HEAD`)}`,extract:L=>{let[,J,Y,X]=L.pathname.split(`/`,4);if(X!==`raw`){if(!Y){if(!J)return;Y=J,J=null}return Y.endsWith(`.git`)&&(Y=Y.slice(0,-4)),{user:J,project:Y,committish:L.hash.slice(1)}}},hashformat:function(L){return L&&`file-`+Z(L)}},$.sourcehut={protocols:[`git+ssh:`,`https:`],domain:`git.sr.ht`,treepath:`tree`,blobpath:`tree`,filetemplate:({domain:L,user:J,project:Y,committish:Z,path:Q})=>`https://${L}/${J}/${Y}/blob/${X(Z)||`HEAD`}/${Q}`,httpstemplate:({domain:L,user:J,project:X,committish:Z})=>`https://${L}/${J}/${X}.git${Y(`#`,Z)}`,tarballtemplate:({domain:L,user:J,project:Y,committish:Z})=>`https://${L}/${J}/${Y}/archive/${X(Z)||`HEAD`}.tar.gz`,bugstemplate:()=>null,extract:L=>{let[,J,Y,X]=L.pathname.split(`/`,4);if(![`archive`].includes(X)&&(Y&&Y.endsWith(`.git`)&&(Y=Y.slice(0,-4)),!(!J||!Y)))return{user:J,project:Y,committish:L.hash.slice(1)}}};for(let[L,J]of Object.entries($))$[L]=Object.assign({},Q,J);J.exports=$})),require_parse_url=__commonJSMin(((L,J)=>{let Y=__require$1(`url`),X=(L,J,Y)=>{let X=L.indexOf(Y);return L.lastIndexOf(J,X>-1?X:1/0)},Z=L=>{try{return new Y.URL(L)}catch{}},Q=(L,J)=>{let Y=L.indexOf(`:`),X=L.slice(0,Y+1);if(Object.prototype.hasOwnProperty.call(J,X)||L.substr(Y,3)===`://`)return L;let Z=L.indexOf(`@`);return Z>-1?Z>Y?`git+ssh://${L}`:L:`${L.slice(0,Y+1)}//${L.slice(Y+1)}`},$=L=>{let J=X(L,`@`,`#`),Y=X(L,`:`,`#`);return Y>J&&(L=L.slice(0,Y)+`/`+L.slice(Y+1)),X(L,`:`,`#`)===-1&&L.indexOf(`//`)===-1&&(L=`git+ssh://${L}`),L};J.exports=(L,J)=>{let Y=J?Q(L,J):L;return Z(Y)||Z($(Y))}})),require_from_url=__commonJSMin(((L,J)=>{let Y=require_parse_url(),X=L=>{let J=L.indexOf(`#`),Y=L.indexOf(`/`),X=L.indexOf(`/`,Y+1),Z=L.indexOf(`:`),Q=/\s/.exec(L),$=L.indexOf(`@`),ee=!Q||J>-1&&Q.index>J,te=$===-1||J>-1&&$>J,ne=Z===-1||J>-1&&Z>J,re=X===-1||J>-1&&X>J,ie=Y>0,ae=J>-1?L[J-1]!==`/`:!L.endsWith(`/`),oe=!L.startsWith(`.`);return ee&&ie&&ae&&oe&&te&&ne&&re};J.exports=(L,J,{gitHosts:Z,protocols:Q})=>{if(!L)return;let $=Y(X(L)?`github:${L}`:L,Q);if(!$)return;let ee=Z.byShortcut[$.protocol],te=Z.byDomain[$.hostname.startsWith(`www.`)?$.hostname.slice(4):$.hostname],ne=ee||te;if(!ne)return;let re=Z[ee||te],ie=null;Q[$.protocol]?.auth&&($.username||$.password)&&(ie=`${$.username}${$.password?`:`+$.password:``}`);let ae=null,oe=null,se=null,ce=null;try{if(ee){let L=$.pathname.startsWith(`/`)?$.pathname.slice(1):$.pathname,J=L.indexOf(`@`);J>-1&&(L=L.slice(J+1));let Y=L.lastIndexOf(`/`);Y>-1?(oe=decodeURIComponent(L.slice(0,Y)),oe||=null,se=decodeURIComponent(L.slice(Y+1))):se=decodeURIComponent(L),se.endsWith(`.git`)&&(se=se.slice(0,-4)),$.hash&&(ae=decodeURIComponent($.hash.slice(1))),ce=`shortcut`}else{if(!re.protocols.includes($.protocol))return;let L=re.extract($);if(!L)return;oe=L.user&&decodeURIComponent(L.user),se=decodeURIComponent(L.project),ae=decodeURIComponent(L.committish),ce=Q[$.protocol]?.name||$.protocol.slice(0,-1)}}catch(L){if(L instanceof URIError)return;throw L}return[ne,oe,ie,se,ae,ce,J]}})),require_lib$10=__commonJSMin(((L,J)=>{let{LRUCache:Y}=require_index_min(),X=require_hosts(),Z=require_from_url(),Q=require_parse_url(),$=new Y({max:1e3});function ee(L){try{let{protocol:J,hostname:Y,pathname:X}=new URL(L);return Y?`${/(?:git\+)http:$/.test(J)?`http:`:`https:`}//${Y}${X.replace(/\.git$/,``)}`:null}catch{return null}}var te=class L{constructor(J,Y,X,Z,Q,$,ee={}){Object.assign(this,L.#e[J],{type:J,user:Y,auth:X,project:Z,committish:Q,default:$,opts:ee})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:`sshurl`},"ssh:":{name:`sshurl`},"git+https:":{name:`https`,auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(J,Y){L.#e[J]=Y,L.#e.byDomain[Y.domain]=J,L.#e.byShortcut[`${J}:`]=J,L.#t[`${J}:`]={name:J}}static fromUrl(J,Y){if(typeof J!=`string`)return;let X=J+JSON.stringify(Y||{});if(!$.has(X)){let Q=Z(J,Y,{gitHosts:L.#e,protocols:L.#t});$.set(X,Q?new L(...Q):void 0)}return $.get(X)}static fromManifest(J,Y={}){if(!J||typeof J!=`object`)return;let X=J.repository,Z=X&&(typeof X==`string`?X:typeof X==`object`&&typeof X.url==`string`?X.url:null);if(!Z)throw Error(`no repository`);let Q=Z&&L.fromUrl(Z.replace(/^git\+/,``),Y)||null;if(Q)return Q;let $=ee(Z);return L.fromUrl($,Y)||$}static parseUrl(L){return Q(L)}#n(L,J){if(typeof L!=`function`)return null;let Y={...this,...this.opts,...J};Y.path||=``,Y.path.startsWith(`/`)&&(Y.path=Y.path.slice(1)),Y.noCommittish&&(Y.committish=null);let X=L(Y);return Y.noGitPlus&&X.startsWith(`git+`)?X.slice(4):X}hash(){return this.committish?`#${this.committish}`:``}ssh(L){return this.#n(this.sshtemplate,L)}sshurl(L){return this.#n(this.sshurltemplate,L)}browse(L,...J){return typeof L==`string`?typeof J[0]==`string`?this.#n(this.browsetreetemplate,{...J[1],fragment:J[0],path:L}):this.#n(this.browsetreetemplate,{...J[0],path:L}):this.#n(this.browsetemplate,L)}browseFile(L,...J){return typeof J[0]==`string`?this.#n(this.browseblobtemplate,{...J[1],fragment:J[0],path:L}):this.#n(this.browseblobtemplate,{...J[0],path:L})}docs(L){return this.#n(this.docstemplate,L)}bugs(L){return this.#n(this.bugstemplate,L)}https(L){return this.#n(this.httpstemplate,L)}git(L){return this.#n(this.gittemplate,L)}shortcut(L){return this.#n(this.shortcuttemplate,L)}path(L){return this.#n(this.pathtemplate,L)}tarball(L){return this.#n(this.tarballtemplate,{...L,noCommittish:!1})}file(L,J){return this.#n(this.filetemplate,{...J,path:L})}edit(L,J){return this.#n(this.edittemplate,{...J,path:L})}getDefaultRepresentation(){return this.default}toString(L){return this.default&&typeof this[this.default]==`function`?this[this.default](L):this.sshurl(L)}};for(let[L,J]of Object.entries(X))te.addHost(L,J);J.exports=te})),require_extract_description=__commonJSMin(((L,J)=>{J.exports=Y;function Y(L){if(!L||L===`ERROR: No README data found!`)return;L=L.trim().split(`
119
119
  `);let J=0;for(;L[J]&&L[J].trim().match(/^(#|$)/);)J++;let Y=L.length,X=J+1;for(;X<Y&&L[X].trim();)X++;return L.slice(J,X).join(` `).trim()}})),require_typos=__commonJSMin(((L,J)=>{J.exports={topLevel:{dependancies:`dependencies`,dependecies:`dependencies`,depdenencies:`dependencies`,devEependencies:`devDependencies`,depends:`dependencies`,"dev-dependencies":`devDependencies`,devDependences:`devDependencies`,devDepenencies:`devDependencies`,devdependencies:`devDependencies`,repostitory:`repository`,repo:`repository`,prefereGlobal:`preferGlobal`,hompage:`homepage`,hampage:`homepage`,autohr:`author`,autor:`author`,contributers:`contributors`,publicationConfig:`publishConfig`,script:`scripts`},bugs:{web:`url`,name:`url`},script:{server:`start`,tests:`test`}}})),require_fixer=__commonJSMin(((L,J)=>{var{URL:Y}=__require$1(`node:url`),X=require_valid$1(),Z=require_clean(),Q=require_validate_npm_package_license(),$=require_lib$10(),{isBuiltin:ee}=__require$1(`node:module`),te=[`dependencies`,`devDependencies`,`optionalDependencies`],ne=require_extract_description(),re=require_typos(),ie=L=>L.includes(`@`)&&L.indexOf(`@`)<L.lastIndexOf(`.`);J.exports={warn:function(){},fixRepositoryField:function(L){if(L.repositories&&(this.warn(`repositories`),L.repository=L.repositories[0]),!L.repository)return this.warn(`missingRepository`);typeof L.repository==`string`&&(L.repository={type:`git`,url:L.repository});var J=L.repository.url||``;if(J){var Y=$.fromUrl(J);Y&&(J=L.repository.url=Y.getDefaultRepresentation()===`shortcut`?Y.https():Y.toString())}J.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn(`brokenGitUrl`,J)},fixTypos:function(L){Object.keys(re.topLevel).forEach(function(J){Object.prototype.hasOwnProperty.call(L,J)&&this.warn(`typo`,J,re.topLevel[J])},this)},fixScriptsField:function(L){if(L.scripts){if(typeof L.scripts!=`object`){this.warn(`nonObjectScripts`),delete L.scripts;return}Object.keys(L.scripts).forEach(function(J){typeof L.scripts[J]==`string`?re.script[J]&&!L.scripts[re.script[J]]&&this.warn(`typo`,J,re.script[J],`scripts`):(this.warn(`nonStringScript`),delete L.scripts[J])},this)}},fixFilesField:function(L){var J=L.files;J&&!Array.isArray(J)?(this.warn(`nonArrayFiles`),delete L.files):L.files&&=L.files.filter(function(L){return!L||typeof L!=`string`?(this.warn(`invalidFilename`,L),!1):!0},this)},fixBinField:function(L){if(L.bin&&typeof L.bin==`string`){var J={},Y;(Y=L.name.match(/^@[^/]+[/](.*)$/))?J[Y[1]]=L.bin:J[L.name]=L.bin,L.bin=J}},fixManField:function(L){L.man&&typeof L.man==`string`&&(L.man=[L.man])},fixBundleDependenciesField:function(L){var J=`bundledDependencies`,Y=`bundleDependencies`;L[J]&&!L[Y]&&(L[Y]=L[J],delete L[J]),L[Y]&&!Array.isArray(L[Y])?(this.warn(`nonArrayBundleDependencies`),delete L[Y]):L[Y]&&(L[Y]=L[Y].filter(function(J){return!J||typeof J!=`string`?(this.warn(`nonStringBundleDependency`,J),!1):(L.dependencies||={},Object.prototype.hasOwnProperty.call(L.dependencies,J)||(this.warn(`nonDependencyBundleDependency`,J),L.dependencies[J]=`*`),!0)},this))},fixDependencies:function(L){pe(L,this.warn),de(L,this.warn),this.fixBundleDependenciesField(L),[`dependencies`,`devDependencies`].forEach(function(J){if(J in L){if(!L[J]||typeof L[J]!=`object`){this.warn(`nonObjectDependencies`,J),delete L[J];return}Object.keys(L[J]).forEach(function(Y){var X=L[J][Y];typeof X!=`string`&&(this.warn(`nonStringDependency`,Y,JSON.stringify(X)),delete L[J][Y]);var Z=$.fromUrl(L[J][Y]);Z&&(L[J][Y]=Z.toString())},this)}},this)},fixModulesField:function(L){L.modules&&(this.warn(`deprecatedModules`),delete L.modules)},fixKeywordsField:function(L){typeof L.keywords==`string`&&(L.keywords=L.keywords.split(/,\s+/)),L.keywords&&!Array.isArray(L.keywords)?(delete L.keywords,this.warn(`nonArrayKeywords`)):L.keywords&&=L.keywords.filter(function(L){return typeof L!=`string`||!L?(this.warn(`nonStringKeyword`),!1):!0},this)},fixVersionField:function(L,J){var Y=!J;if(!L.version)return L.version=``,!0;if(!X(L.version,Y))throw Error(`Invalid version: "`+L.version+`"`);return L.version=Z(L.version,Y),!0},fixPeople:function(L){ce(L,le),ce(L,ue)},fixNameField:function(L,J){typeof J==`boolean`?J={strict:J}:J===void 0&&(J={});var Y=J.strict;if(!L.name&&!Y){L.name=``;return}if(typeof L.name!=`string`)throw Error(`name field must be a string.`);Y||(L.name=L.name.trim()),se(L.name,Y,J.allowLegacyCase),ee(L.name)&&this.warn(`conflictingName`,L.name)},fixDescriptionField:function(L){L.description&&typeof L.description!=`string`&&(this.warn(`nonStringDescription`),delete L.description),L.readme&&!L.description&&(L.description=ne(L.readme)),L.description===void 0&&delete L.description,L.description||this.warn(`missingDescription`)},fixReadmeField:function(L){L.readme||=(this.warn(`missingReadme`),`ERROR: No README data found!`)},fixBugsField:function(L){if(!L.bugs&&L.repository&&L.repository.url){var J=$.fromUrl(L.repository.url);J&&J.bugs()&&(L.bugs={url:J.bugs()})}else if(L.bugs){if(typeof L.bugs==`string`)ie(L.bugs)?L.bugs={email:L.bugs}:Y.canParse(L.bugs)?L.bugs={url:L.bugs}:this.warn(`nonEmailUrlBugsString`);else{me(L.bugs,this.warn);var X=L.bugs;L.bugs={},X.url&&(Y.canParse(X.url)?L.bugs.url=X.url:this.warn(`nonUrlBugsUrlField`)),X.email&&(typeof X.email==`string`&&ie(X.email)?L.bugs.email=X.email:this.warn(`nonEmailBugsEmailField`))}!L.bugs.email&&!L.bugs.url&&(delete L.bugs,this.warn(`emptyNormalizedBugs`))}},fixHomepageField:function(L){if(!L.homepage&&L.repository&&L.repository.url){var J=$.fromUrl(L.repository.url);J&&J.docs()&&(L.homepage=J.docs())}if(L.homepage){if(typeof L.homepage!=`string`)return this.warn(`nonUrlHomepage`),delete L.homepage;Y.canParse(L.homepage)||(L.homepage=`http://`+L.homepage)}},fixLicenseField:function(L){let J=L.license||L.licence;if(!J)return this.warn(`missingLicense`);if(typeof J!=`string`||J.length<1||J.trim()===``||!Q(J).validForNewPackages)return this.warn(`invalidLicense`)}};function ae(L){if(L.charAt(0)!==`@`)return!1;var J=L.slice(1).split(`/`);return J.length===2?J[0]&&J[1]&&J[0]===encodeURIComponent(J[0])&&J[1]===encodeURIComponent(J[1]):!1}function oe(L){return!L.match(/[/@\s+%:]/)&&L===encodeURIComponent(L)}function se(L,J,Y){if(L.charAt(0)===`.`||!(ae(L)||oe(L))||J&&!Y&&L!==L.toLowerCase()||L.toLowerCase()===`node_modules`||L.toLowerCase()===`favicon.ico`)throw Error(`Invalid name: `+JSON.stringify(L))}function ce(L,J){return L.author&&=J(L.author),[`maintainers`,`contributors`].forEach(function(Y){Array.isArray(L[Y])&&(L[Y]=L[Y].map(J))}),L}function le(L){if(typeof L==`string`)return L;var J=L.name||``,Y=L.url||L.web,X=Y?` (`+Y+`)`:``,Z=L.email||L.mail;return J+(Z?` <`+Z+`>`:``)+X}function ue(L){if(typeof L!=`string`)return L;var J=L.match(/^([^(<]+)/),Y=L.match(/\(([^()]+)\)/),X=L.match(/<([^<>]+)>/),Z={};return J&&J[0].trim()&&(Z.name=J[0].trim()),X&&(Z.email=X[1]),Y&&(Z.url=Y[1]),Z}function de(L){var J=L.optionalDependencies;if(J){var Y=L.dependencies||{};Object.keys(J).forEach(function(L){Y[L]=J[L]}),L.dependencies=Y}}function fe(L,J,Y){if(!L)return{};if(typeof L==`string`&&(L=L.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(L))return L;Y(`deprecatedArrayDependencies`,J);var X={};return L.filter(function(L){return typeof L==`string`}).forEach(function(L){L=L.trim().split(/(:?[@\s><=])/);var J=L.shift(),Y=L.join(``);Y=Y.trim(),Y=Y.replace(/^@/,``),X[J]=Y}),X}function pe(L,J){te.forEach(function(Y){L[Y]&&(L[Y]=fe(L[Y],Y,J))})}function me(L,J){L&&Object.keys(L).forEach(function(Y){re.bugs[Y]&&(J(`typo`,Y,re.bugs[Y],`bugs`),L[re.bugs[Y]]=L[Y],delete L[Y])})}})),require_warning_messages=__commonJSMin(((L,J)=>{J.exports={repositories:`'repositories' (plural) Not supported. Please pick one as the 'repository' field`,missingRepository:`No repository field.`,brokenGitUrl:`Probably broken git url: %s`,nonObjectScripts:`scripts must be an object`,nonStringScript:`script values must be string commands`,nonArrayFiles:`Invalid 'files' member`,invalidFilename:`Invalid filename in 'files' list: %s`,nonArrayBundleDependencies:`Invalid 'bundleDependencies' list. Must be array of package names`,nonStringBundleDependency:`Invalid bundleDependencies member: %s`,nonDependencyBundleDependency:`Non-dependency in bundleDependencies: %s`,nonObjectDependencies:`%s field must be an object`,nonStringDependency:`Invalid dependency: %s %s`,deprecatedArrayDependencies:`specifying %s as array is deprecated`,deprecatedModules:`modules field is deprecated`,nonArrayKeywords:`keywords should be an array of strings`,nonStringKeyword:`keywords should be an array of strings`,conflictingName:`%s is also the name of a node core module.`,nonStringDescription:`'description' field should be a string`,missingDescription:`No description`,missingReadme:`No README data`,missingLicense:`No license field.`,nonEmailUrlBugsString:`Bug string field must be url, email, or {email,url}`,nonUrlBugsUrlField:`bugs.url field must be a string url. Deleted.`,nonEmailBugsEmailField:`bugs.email field must be a string email. Deleted.`,emptyNormalizedBugs:`Normalized value of bugs field is an empty object. Deleted.`,nonUrlHomepage:`homepage field must be a string url. Deleted.`,invalidLicense:`license should be a valid SPDX license expression`,typo:`%s should probably be %s.`}})),require_make_warning=__commonJSMin(((L,J)=>{var Y=__require$1(`util`),X=require_warning_messages();J.exports=function(){var L=Array.prototype.slice.call(arguments,0),J=L.shift();if(J===`typo`)return Z.apply(null,L);var Q=X[J]?X[J]:J+`: '%s'`;return L.unshift(Q),Y.format.apply(null,L)};function Z(L,J,Z){return Z&&(L=Z+`['`+L+`']`,J=Z+`['`+J+`']`),Y.format(X.typo,L,J)}})),require_normalize=__commonJSMin(((L,J)=>{J.exports=ee;var Y=require_fixer();ee.fixer=Y;var X=require_make_warning(),Z=[`name`,`version`,`description`,`repository`,`modules`,`scripts`,`files`,`bin`,`man`,`bugs`,`keywords`,`readme`,`homepage`,`license`],Q=[`dependencies`,`people`,`typos`],$=Z.map(function(L){return te(L)+`Field`});$=$.concat(Q);function ee(L,J,Z){J===!0&&(J=null,Z=!0),Z||=!1,(!J||L.private)&&(J=function(){}),L.scripts&&L.scripts.install===`node-gyp rebuild`&&!L.scripts.preinstall&&(L.gypfile=!0),Y.warn=function(){J(X.apply(null,arguments))},$.forEach(function(J){Y[`fix`+te(J)](L,Z)}),L._id=L.name+`@`+L.version}function te(L){return L.charAt(0).toUpperCase()+L.slice(1)}})),import_normalize=__toESM(require_normalize(),1);const execFileOriginal=promisify(execFile);function toPath$1(L){return L instanceof URL?fileURLToPath$1(L):L}const TEN_MEGABYTES_IN_BYTES=10*1024*1024,getPackagePath=L=>path$1.resolve(toPath$1(L)??`.`,`package.json`),_readPackage=(L,J)=>{let Y=typeof L==`string`?parseJson(L):L;return J&&(0,import_normalize.default)(Y),Y};function readPackageSync({cwd:L,normalize:J=!0}={}){return _readPackage(fs.readFileSync(getPackagePath(L),`utf8`),J)}function parsePackage(L,{normalize:J=!0}={}){let Y=typeof L==`object`&&!!L&&!Array.isArray(L);if(!Y&&typeof L!=`string`)throw TypeError("`packageFile` should be either an `object` or a `string`.");return _readPackage(Y?structuredClone(L):L,J)}function readPackageUpSync(L){let J=findUpSync(`package.json`,L);if(J)return{packageJson:readPackageSync({...L,cwd:path$1.dirname(J)}),path:J}}const defaultColumns=80,defaultRows=24,exec=(L,J,{shell:Y,env:X}={})=>execFileSync(L,J,{encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`],timeout:500,shell:Y,env:X}).trim(),create=(L,J)=>({columns:Number.parseInt(L,10),rows:Number.parseInt(J,10)}),createIfNotDefault=(L,J)=>{let{columns:Y,rows:X}=create(L,J);if(!(Number.isNaN(Y)||Number.isNaN(X))&&!(Y===defaultColumns&&X===defaultRows))return{columns:Y,rows:X}},isForegroundProcess=()=>{if(process$1.platform!==`linux`)return!0;try{let L=fs.readFileSync(`/proc/self/stat`,`utf8`),J=L.lastIndexOf(`) `);if(J===-1)return!1;let Y=L.slice(J+2).trim().split(/\s+/),X=Number.parseInt(Y[2],10),Z=Number.parseInt(Y[5],10);return Number.isNaN(X)||Number.isNaN(Z)||Z<=0?!1:X===Z}catch{return!1}};function terminalSize(){let{env:L,stdout:J,stderr:Y}=process$1;if(J?.columns&&J?.rows)return create(J.columns,J.rows);if(Y?.columns&&Y?.rows)return create(Y.columns,Y.rows);if(L.COLUMNS&&L.LINES)return create(L.COLUMNS,L.LINES);let X={columns:defaultColumns,rows:defaultRows};return process$1.platform===`win32`?tput()??X:process$1.platform===`darwin`?devTty()??tput()??X:devTty()??tput()??resize()??X}const devTty=()=>{try{let L=process$1.platform===`darwin`?fs.constants.O_EVTONLY|fs.constants.O_NONBLOCK:fs.constants.O_NONBLOCK,{columns:J,rows:Y}=tty.WriteStream(fs.openSync(`/dev/tty`,L));return{columns:J,rows:Y}}catch{}},tput=()=>{try{let L=exec(`tput`,[`cols`],{env:{TERM:`dumb`,...process$1.env}}),J=exec(`tput`,[`lines`],{env:{TERM:`dumb`,...process$1.env}});if(L&&J)return createIfNotDefault(L,J)}catch{}},resize=()=>{try{if(!isForegroundProcess())return;let L=exec(`resize`,[`-u`]).match(/\d+/g);if(L.length===2)return createIfNotDefault(L[0],L[1])}catch{}};let homeDirectory,currentUser;function untildify(L){if(typeof L!=`string`)throw TypeError(`Expected a string, got ${typeof L}`);if(homeDirectory===void 0&&(homeDirectory=os.homedir()),homeDirectory&&/^~(?=$|\/|\\)/.test(L))return L.replace(/^~/,homeDirectory);let J=L.match(/^~([^/\\]+)(.*)/);if(J&&(currentUser===void 0&&(currentUser=os.userInfo().username),currentUser)){let L=J[1],Y=J[2];if(L===currentUser)return homeDirectory+Y}return L}var require_enums=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.Frequency=L.KeepLogFiles=void 0,(function(L){L[L.days=1]=`days`,L[L.fileCount=2]=`fileCount`})(L.KeepLogFiles||={}),(function(L){L[L.daily=1]=`daily`,L[L.minutes=2]=`minutes`,L[L.hours=3]=`hours`,L[L.date=4]=`date`,L[L.none=5]=`none`})(L.Frequency||={})})),require_DefaultOptions=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0});let J=require_enums();L.default=class{static fileStreamRotatorOptions(L){return Object.assign(Object.assign({},{filename:``,verbose:!1,end_stream:!1,utc:!1,create_symlink:!1,symlink_name:`current.log`}),L)}static fileOptions(L){return Object.assign(Object.assign({},{flags:`a`}),L)}static auditSettings(L){let Y={keepSettings:{type:J.KeepLogFiles.fileCount,amount:10},auditFilename:`audit.json`,hashType:`md5`,extension:``,files:[]};return Object.assign(Object.assign({},Y),L)}static rotationSettings(L){let Y={filename:``,frequency:J.Frequency.none,utc:!1};return Object.assign(Object.assign({},Y),L)}static extractParam(L,J=!0){let Y=L.toString().match(/(\w)$/),X={number:0};Y?.length==2&&(X.letter=Y[1].toLowerCase());let Z=L.toString().match(/^(\d+)/);return Z?.length==2&&(X.number=Number(Z[1])),X}}})),require_helper=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.Logger=L.makeDirectory=void 0;let J=__require$1(`fs`),Y=__require$1(`path`);function X(L){if(L.trim()!==``){var X=Y.dirname(L);try{J.mkdirSync(X,{recursive:!0})}catch(L){if(L.code!==`EEXIST`)throw L}}}L.makeDirectory=X,L.Logger=class L{constructor(){this.isVerbose=!1,this.allowDebug=!1}static getInstance(J,Y){return L.instance||(L.instance=new L,L.instance.isVerbose=J??!1,L.instance.allowDebug=Y??!1),L.instance}static verbose(...J){L.getInstance().isVerbose&&console.log.apply(null,[new Date,`[FileStreamRotator:VERBOSE]`,...J])}static log(...L){console.log.apply(null,[new Date,`[FileStreamRotator]`,...L])}static debug(...J){L.getInstance().allowDebug&&console.debug.apply(null,[new Date,`[FileStreamRotator:DEBUG]`,...J])}}})),require_Rotator=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0});let J=__require$1(`fs`),Y=require_enums(),X=require_helper();L.default=class L{constructor(L,J){var Z;switch(this.currentSize=0,this.lastDate=``,this.fileIndx=0,this.settings=L,this.settings.frequency){case Y.Frequency.hours:this.settings.amount&&this.settings.amount<13?this.settings.amount&&this.settings.amount>0||(this.settings.amount=1):this.settings.amount=12,this.isFormatValidForHour()||(X.Logger.log(`Date format not suitable for X hours rotation. Changing date format to 'YMDHm'`),this.settings.format=`YMDHm`);break;case Y.Frequency.minutes:this.settings.amount&&this.settings.amount<31?this.settings.amount&&this.settings.amount>0||(this.settings.amount=1):this.settings.amount=30,this.isFormatValidForMinutes()||(this.settings.format=`YMDHm`,X.Logger.log(`Date format not suitable for X minutes rotation. Changing date format to 'YMDHm'`));break;case Y.Frequency.daily:this.isFormatValidForDaily()||(this.settings.format=`YMD`,X.Logger.log(`Date format not suitable for daily rotation. Changing date format to 'YMD'`));break}if(this.settings.frequency!==Y.Frequency.none&&!this.settings.filename.match(`%DATE%`)&&(this.settings.filename+=`.%DATE%`,X.Logger.log(`Appending date to the end of the filename`)),this.lastDate=this.getDateString(),this.settings.maxSize&&J){let L=new Date(J.date),Y=this.settings.extension??``;if(X.Logger.debug(this.getDateString(L)==this.getDateString(new Date),this.getDateString(L),this.getDateString(new Date)),this.getDateString(L)==this.getDateString(new Date)){let Z=J.name.match(RegExp(`(\\d+)`+Y.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)));Z&&(this.fileIndx=Number(Z[1]));var Q=this.getSizeForFile(this.getNewFilename());Q&&(this.currentSize=Q),this.lastDate=this.getDateString(L),X.Logger.debug(`LOADED LAST ENTRY`,this.currentSize,this.lastDate,this.fileIndx)}else{var Q=this.getSizeForFile(this.getNewFilename());Q&&(this.currentSize=Q),X.Logger.debug(`CURRENT FILE:`,this.getNewFilename(),this.currentSize)}}}getSizeForFile(L){try{if(J.existsSync(L)){var Y=J.statSync(this.getNewFilename());if(Y)return Y.size}}catch{return}}hasMaxSizeReached(){return this.settings.maxSize?this.currentSize>this.settings.maxSize:!1}shouldRotate(){let L=this.hasMaxSizeReached();switch(this.settings.frequency){case Y.Frequency.none:return L;case Y.Frequency.hours:case Y.Frequency.minutes:case Y.Frequency.date:case Y.Frequency.daily:default:let J=this.getDateString();return this.lastDate==J?L:!0}}isFormatValidForDaily(){let L=new Date(2022,2,20,1,2,3),J=new Date(2022,2,20,23,55,45),Y=new Date(2022,2,21,2,55,45);return this.getDateString(L)===this.getDateString(J)&&this.getDateString(L)!==this.getDateString(Y)}isFormatValidForHour(){if(!this.settings.amount||this.settings.frequency!=Y.Frequency.hours)return!1;let L=new Date(2022,2,20,1,2,3),J=new Date(2022,2,20,2+this.settings.amount,55,45);return this.getDateString(L)!==this.getDateString(J)}isFormatValidForMinutes(){if(!this.settings.amount||this.settings.frequency!=Y.Frequency.minutes)return!1;let L=new Date(2022,2,20,1,2,3),J=new Date(2022,2,20,1,2+this.settings.amount,45);return this.getDateString(L)!==this.getDateString(J)}getDateString(J){let X=J||new Date,Z=L.getDateComponents(X,this.settings.utc),Q=this.settings.format;if(Q){switch(this.settings.frequency){case Y.Frequency.hours:this.settings.amount&&(Z.hour=Math.floor(Z.hour/this.settings.amount)*this.settings.amount,Z.minute=0,Z.second=0);case Y.Frequency.minutes:this.settings.amount&&(Z.minute=Math.floor(Z.minute/this.settings.amount)*this.settings.amount,Z.second=0)}return Q?.replace(/D+/,Z.day.toString().padStart(2,`0`)).replace(/M+/,Z.month.toString().padStart(2,`0`)).replace(/Y+/,Z.year.toString()).replace(/H+/,Z.hour.toString().padStart(2,`0`)).replace(/m+/,Z.minute.toString().padStart(2,`0`)).replace(/s+/,Z.second.toString().padStart(2,`0`)).replace(/A+/,Z.hour>11?`PM`:`AM`)}return``}getFilename(L,J){return L.replace(`%DATE%`,this.lastDate)+(this.settings.maxSize||this.fileIndx>0?`.`+this.fileIndx:``)+(J||``)}getNewFilename(){return this.getFilename(this.settings.filename,this.settings.extension)}addBytes(L){this.currentSize+=L}rotate(L=!1){return L?(this.fileIndx+=1,this.currentSize=0,this.lastDate=this.getDateString()):this.shouldRotate()&&(this.hasMaxSizeReached()?this.fileIndx+=1:this.fileIndx=0,this.currentSize=0,this.lastDate=this.getDateString()),this.getNewFilename()}static getDateComponents(L,J){return J?{day:L.getUTCDate(),month:L.getUTCMonth()+1,year:L.getUTCFullYear(),hour:L.getUTCHours(),minute:L.getUTCMinutes(),second:L.getUTCSeconds(),utc:J,source:L}:{day:L.getDate(),month:L.getMonth()+1,year:L.getFullYear(),hour:L.getHours(),minute:L.getMinutes(),second:L.getSeconds(),utc:J,source:L}}static createDate(L,J){return J&&new Date(Date.UTC(L.year,L.month,L.day,L.hour,L.minute,L.second)),new Date(L.year,L.month,L.day,L.hour,L.minute,L.second)}}})),require_AuditManager=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0});let J=__require$1(`fs`),Y=__require$1(`path`),X=require_enums(),Z=require_helper(),Q=__require$1(`crypto`);L.default=class{constructor(L,J){this.config=L,this.emitter=J,this.loadLog()}loadLog(){var L;if(!this.config.keepSettings||this.config.keepSettings?.amount==0||!this.config.auditFilename||this.config.auditFilename==``){Z.Logger.verbose(`no existing audit settings found`,this.config);return}try{let L=Y.resolve(this.config.auditFilename),X=JSON.parse(J.readFileSync(L,{encoding:`utf-8`}));this.config.files=X.files}catch(L){if(L.code!==`ENOENT`){Z.Logger.log(`Failed to load config file`,L);return}}}writeLog(){if(this.config.auditFilename)try{(0,Z.makeDirectory)(this.config.auditFilename),J.writeFileSync(this.config.auditFilename,JSON.stringify(this.config,null,4))}catch(L){Z.Logger.verbose(`ERROR: Failed to store log audit`,L)}}addLog(L){var J;if(!this.config.keepSettings||this.config.keepSettings?.amount==0||!this.config.auditFilename||this.config.auditFilename==``){Z.Logger.verbose(`audit log missing`);return}if(this.config.files.findIndex(J=>J.name===L)!==-1){Z.Logger.debug(`file already in the log`,L);return}var Y=Date.now();if(this.config.files.push({date:Y,name:L,hash:Q.createHash(this.config.hashType).update(L+`LOG_FILE`+Y).digest(`hex`)}),Z.Logger.debug(`added file ${L} to log`),this.config.keepSettings&&this.config.keepSettings.amount){if(this.config.keepSettings.type==X.KeepLogFiles.days){let L=Date.now()-86400*this.config.keepSettings.amount*1e3,J=this.config.files.filter(J=>{if(J.date>=L)return!0;this.removeLog(J)});this.config.files=J}else if(this.config.files.length>this.config.keepSettings.amount){var $=this.config.files.splice(-this.config.keepSettings.amount);this.config.files.length>0&&this.config.files.filter(L=>(this.removeLog(L),!1)),this.config.files=$}}this.writeLog()}removeLog(L){if(L.hash===Q.createHash(this.config.hashType).update(L.name+`LOG_FILE`+L.date).digest(`hex`))try{J.existsSync(L.name)&&(Z.Logger.debug(`removing log file`,L.name),J.unlinkSync(L.name),this.emitter.emit(`logRemoved`,L.name))}catch{Z.Logger.verbose(`Could not remove old log file: `,L.name)}else Z.Logger.debug(`incorrect hash`,L.name,L.hash,Q.createHash(this.config.hashType).update(L.name+`LOG_FILE`+L.date).digest(`hex`))}}})),require_FileStreamRotator=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0});let J=__require$1(`node:stream`),Y=__require$1(`fs`),X=__require$1(`path`),Z=require_enums(),Q=require_DefaultOptions(),$=require_Rotator(),ee=require_AuditManager(),te=require_helper();L.default=class L extends J.EventEmitter{constructor(L,J=!1){var Y,X;super(),this.config={},this.config=this.parseOptions(L),te.Logger.getInstance(L.verbose,J),this.auditManager=new ee.default(this.config.auditSettings??Q.default.auditSettings({}),this);let Z=this.auditManager.config.files.slice(-1).shift();this.rotator=new $.default(this.config.rotationSettings??Q.default.rotationSettings({}),Z),this.rotate()}static getStream(J){return new L(J)}parseOptions(L){var J,Y,X,ee;let te={};te.options=Q.default.fileStreamRotatorOptions(L),te.fileOptions=Q.default.fileOptions(L.file_options??{});let ne=Q.default.auditSettings({});if(L.audit_file&&(ne.auditFilename=L.audit_file),L.audit_hash_type&&(ne.hashType=L.audit_hash_type),L.extension&&(ne.extension=L.extension),L.max_logs){let J=Q.default.extractParam(L.max_logs);ne.keepSettings={type:J.letter?.toLowerCase()==`d`?Z.KeepLogFiles.days:Z.KeepLogFiles.fileCount,amount:J.number}}switch(te.auditSettings=ne,te.rotationSettings=Q.default.rotationSettings({filename:L.filename,extension:L.extension}),L.date_format&&!L.frequency?te.rotationSettings.frequency=Z.Frequency.date:te.rotationSettings.frequency=Z.Frequency.none,L.date_format&&(te.rotationSettings.format=L.date_format),te.rotationSettings.utc=L.utc??!1,L.frequency){case`daily`:te.rotationSettings.frequency=Z.Frequency.daily;break;case`custom`:case`date`:te.rotationSettings.frequency=Z.Frequency.date;break;case`test`:te.rotationSettings.frequency=Z.Frequency.minutes,te.rotationSettings.amount=1;break;default:if(L.frequency){let J=Q.default.extractParam(L.frequency);J.letter?.match(/^([mh])$/)&&(te.rotationSettings.frequency=J.letter==`h`?Z.Frequency.hours:Z.Frequency.minutes,te.rotationSettings.amount=J.number)}}if(L.size){let J=Q.default.extractParam(L.size);switch(J.letter){case`k`:te.rotationSettings.maxSize=J.number*1024;break;case`m`:te.rotationSettings.maxSize=J.number*1024*1024;break;case`g`:te.rotationSettings.maxSize=J.number*1024*1024*1024;break}}return this.rotator=new $.default(te.rotationSettings),this.rotator.getNewFilename(),te}rotate(L=!1){var J;let Y=this.currentFile;this.rotator.rotate(L),this.currentFile=this.rotator.getNewFilename(),this.currentFile!=Y&&(this.fs&&(this.config.options?.end_stream===!0?this.fs.end():this.fs.destroy()),Y&&this.auditManager.addLog(Y),this.createNewLog(this.currentFile),this.emit(`new`,this.currentFile),this.emit(`rotate`,Y,this.currentFile,L))}createNewLog(L){var J;(0,te.makeDirectory)(L),this.auditManager.addLog(L);let X={};this.config.fileOptions&&(X=this.config.fileOptions),this.fs=Y.createWriteStream(L,X),this.bubbleEvents(this.fs,L),this.config.options?.create_symlink&&this.createCurrentSymLink(L)}write(L,J){this.fs&&(this.rotator.shouldRotate()&&this.rotate(),this.fs.write(L,J??`utf8`),this.rotator.addBytes(Buffer.byteLength(L,J)),this.rotator.hasMaxSizeReached()&&this.rotate())}end(L){this.fs&&=(this.fs.end(L),void 0)}bubbleEvents(L,J){L.on(`close`,()=>{this.emit(`close`)}),L.on(`finish`,()=>{this.emit(`finish`)}),L.on(`error`,L=>{this.emit(`error`,L)}),L.on(`open`,L=>{this.emit(`open`,J)})}createCurrentSymLink(L){var J,Z;if(!L)return;let Q=this.config.options?.symlink_name??`current.log`,$=X.dirname(L),ee=X.basename(L),ne=$+X.sep+Q;try{if(Y.existsSync(ne)){if(Y.lstatSync(ne).isSymbolicLink()){Y.unlinkSync(ne),Y.symlinkSync(ee,ne);return}te.Logger.verbose(`Could not create symlink file as file with the same name exists: `,ne)}else Y.symlinkSync(ee,ne)}catch(L){te.Logger.verbose(`[Could not create symlink file: `,ne,` -> `,ee),te.Logger.debug(`error creating sym link`,ne,L)}}test(){return{config:this.config,rotator:this.rotator}}}})),require_lib$9=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.getStream=void 0;let J=require_FileStreamRotator();function Y(L){return new J.default(L)}L.getStream=Y})),import_lib$1=__toESM(require_lib$9(),1),LogFileRotationTransport=class L extends LoggerlessTransport{static activeFilenames=new Set;stream;fieldNames;delimiter;timestampFn;levelMap;compressOnRotate;isCompressing;filename;staticData;batchEnabled;batchSize;batchTimeout;batchQueue;batchTimer;isDisposing;callbacks;frequency;verbose;dateFormat;size;maxLogs;auditFile;extension;createSymlink;symlinkName;utc;auditHashType;fileOptions;fileMode;getRotatorOptions(){return{filename:this.filename,frequency:this.frequency,verbose:this.verbose??!1,date_format:this.dateFormat,size:this.size,max_logs:this.maxLogs?.toString(),audit_file:this.auditFile||void 0,end_stream:!0,extension:this.extension,create_symlink:this.createSymlink,symlink_name:this.symlinkName,utc:this.utc,audit_hash_type:this.auditHashType,file_options:{flags:`a`,encoding:`utf8`,mode:this.fileMode??416,...this.fileOptions}}}constructor(J){if(super(J),L.activeFilenames.has(J.filename))throw Error(`LogFileRotationTransport: Filename "${J.filename}" is already in use by another instance. To use the same file for multiple loggers, share the same transport instance between them.`);if(this.filename=J.filename,L.activeFilenames.add(this.filename),this.fieldNames={level:J.fieldNames?.level??`level`,message:J.fieldNames?.message??`message`,timestamp:J.fieldNames?.timestamp??`timestamp`},this.delimiter=J.delimiter??`
120
120
  `,this.timestampFn=J.timestampFn??(()=>new Date().toISOString()),this.levelMap=J.levelMap??{},this.compressOnRotate=J.compressOnRotate??!1,this.isCompressing=!1,this.batchEnabled=!!J.batch,this.batchSize=J.batch?.size??1e3,this.batchTimeout=J.batch?.timeout??5e3,this.batchQueue=[],this.batchTimer=null,this.isDisposing=!1,this.callbacks=J.callbacks,this.frequency=J.frequency,this.verbose=J.verbose,this.dateFormat=J.dateFormat,this.size=J.size,this.maxLogs=J.maxLogs,this.auditFile=J.auditFile,this.extension=J.extension,this.createSymlink=J.createSymlink,this.symlinkName=J.symlinkName,this.utc=J.utc,this.auditHashType=J.auditHashType,this.fileOptions=J.fileOptions,this.fileMode=J.fileMode,this.staticData=J.staticData,this.batchEnabled){process.on(`beforeExit`,()=>{this.isDisposing||this.flush()});let J=J=>{this.isDisposing||(this.flushSync(),L.activeFilenames.delete(this.filename),process.exit(J===`SIGINT`?130:143))};process.on(`SIGINT`,()=>J(`SIGINT`)),process.on(`SIGTERM`,()=>J(`SIGTERM`))}this.batchEnabled||this.initStream(this.getRotatorOptions())}initStream(L){if(this.stream=import_lib$1.default.getStream(L),this.callbacks){let{onRotate:L,onNew:J,onOpen:Y,onClose:X,onError:Z,onFinish:Q,onLogRemoved:$}=this.callbacks;this.compressOnRotate?this.stream.on(`rotate`,async(J,Y)=>{try{this.isCompressing=!0;let X=await this.compressFile(J);await unlink(J),L?.(X,Y)}catch(L){this.callbacks?.onError?.(L)}finally{this.isCompressing=!1}}):L&&this.stream.on(`rotate`,L),J&&this.stream.on(`new`,J),Y&&this.stream.on(`open`,Y),X&&this.stream.on(`close`,X),Z&&this.stream.on(`error`,Z),Q&&this.stream.on(`finish`,Q),$&&this.stream.on(`logRemoved`,$)}}async getUniqueCompressedFilePath(L){let J=`${L}.gz`,Y=0;try{for(;;)try{await access(J),Y++,J=`${L}.${Date.now()}.${Y}.gz`}catch{break}}catch{J=`${L}.${Date.now()}.gz`}return J}async compressFile(L){let J=await this.getUniqueCompressedFilePath(L),Y=createGzip();return await pipeline(createReadStream(L),Y,createWriteStream(J)),J}flush(){if(!this.batchEnabled||this.batchQueue.length===0)return;this.batchTimer&&=(clearTimeout(this.batchTimer),null),this.stream||this.initStream(this.getRotatorOptions());let L=this.batchQueue.join(``);this.stream.write(L),this.batchQueue=[]}flushSync(){if(!this.batchEnabled||this.batchQueue.length===0)return;this.batchTimer&&=(clearTimeout(this.batchTimer),null),this.stream||this.initStream(this.getRotatorOptions());let L=this.batchQueue.join(``),J=this.stream;J.currentFile&&writeFileSync(J.currentFile,L,{flag:`a`}),this.batchQueue=[]}scheduleBatchFlush(){!this.batchTimer&&!this.isDisposing&&(this.batchTimer=setTimeout(()=>{this.flush()},this.batchTimeout),this.batchTimer.unref&&this.batchTimer.unref())}shipToLogger({logLevel:L,messages:J,data:Y,hasData:X}){let Z={[this.fieldNames.level]:this.levelMap[L]??L,[this.fieldNames.message]:J.join(` `)||``,[this.fieldNames.timestamp]:this.timestampFn(),...this.staticData?typeof this.staticData==`function`?this.staticData():this.staticData:{},...X?Y:{}},Q=`${JSON.stringify(Z)}${this.delimiter}`;return this.batchEnabled?(this.batchQueue.push(Q),this.batchQueue.length>=this.batchSize?this.flush():this.scheduleBatchFlush()):this.stream.write(Q),J}[Symbol.dispose](){if(this.stream||this.batchEnabled){this.isDisposing=!0,this.batchTimer&&=(clearTimeout(this.batchTimer),null),this.batchEnabled&&this.flush();let J=()=>{this.isCompressing?setTimeout(J,100):(this.stream&&this.stream.end(),L.activeFilenames.delete(this.filename))};J()}}},HierarchicalContextManager=class L extends DefaultContextManager{clone(){let J=new L;return J.setContext({...this.getContext()}),J}onChildLoggerCreated(L){super.onChildLoggerCreated(L);let J=L.parentLogger.getContext().name??null;L.childContextManager.appendContext({parentNames:[...L.parentLogger.getContext().parentNames??[],J]})}};function paramsToJsonString(L,J){let{staticData:Y,timestampFn:X=()=>new Date().toISOString()}=J??{},{name:Z,parentNames:Q,timestamp:$,...ee}=L.context??{},te=!(`error`in L)||L.error===null||L.error===void 0?void 0:L.error,ne=!(`metadata`in L)||L.metadata===null||L.metadata===void 0||Object.keys(L.metadata).length===0?void 0:L.metadata;return stringify({context:Object.keys(ee).length===0?void 0:ee,error:te,level:L.logLevel,messages:L.messages,metadata:ne,name:Z,parentNames:Q,timestamp:$??X(),...Y?typeof Y==`function`?Y():Y:{}},replacer)??``}function replacer(L,J){return J instanceof Error?serializeError(J):J}const JSON_BASIC_TRANSPORT_CONFIG_DEFAULTS={colorize:!1,consoleDebug:!1,enabled:!0,getTerminalWidth:()=>2**53-1,id:`json-basic-transport`,inspect:defaultInspector,level:`trace`,logger:pickLogTarget(),pretty:!1},MAX_WIDTH$1=120;var JsonBasicTransport=class extends BaseTransport{config;typedTarget;constructor(L){let J=defu(L,JSON_BASIC_TRANSPORT_CONFIG_DEFAULTS);isNoColorSet()&&(J.colorize=!1),isForceColorSet()&&(J.colorize=!0),super(J),this.config=J,this.typedTarget=createLogBasicTypedTarget(this.config.logger)}shipToLogger(L){if(!this.config.enabled)return L.messages;let J=paramsToJsonString(L),Y=this.config.pretty||this.config.colorize?this.config.inspect(JSON.parse(J),{breakLength:this.config.pretty?Math.min(this.config.getTerminalWidth(),MAX_WIDTH$1):2**53-1,colors:this.config.colorize,compact:!this.config.pretty,depth:1/0}):J;switch(this.typedTarget.type){case`Console`:case`ConsoleLike`:switch(L.logLevel){case`debug`:case LogLevel.debug:this.typedTarget.target.debug(Y);break;case`error`:case`fatal`:case LogLevel.error:case LogLevel.fatal:this.typedTarget.target.error(Y);break;case`info`:case LogLevel.info:this.typedTarget.target.info(Y);break;case LogLevel.trace:case`trace`:this.typedTarget.target.trace(Y);break;case LogLevel.warn:case`warn`:this.typedTarget.target.warn(Y);break}break;case`StreamLike`:case`StreamStderr`:case`StreamStdout`:this.typedTarget.target.write(`${Y}\n`);break}return L.messages}};const PRETTY_BASIC_TRANSPORT_CONFIG_DEFAULTS={colorize:!0,consoleDebug:!1,enabled:!0,getTerminalWidth:()=>2**53-1,id:`pretty-basic-transport`,inspect:defaultInspector,level:`trace`,logger:pickLogTarget(),showLevel:!0,showName:!0,showTime:!0},MAX_WIDTH=120;var PrettyBasicTransport=class extends BaseTransport{config;typedTarget;constructor(L){let J=defu(L,PRETTY_BASIC_TRANSPORT_CONFIG_DEFAULTS);isNoColorSet()&&(J.colorize=!1),isForceColorSet()&&(J.colorize=!0),super(J),this.config=J,this.typedTarget=createLogBasicTypedTarget(this.config.logger),this.typedTarget.type===`Console`&&`window`in globalThis&&`chrome`in globalThis.window&&(import_ansi_colors.default.enabled=!0)}shipToLogger(L){if(!this.config.enabled)return L.messages;let{name:J,parentNames:Y,timestamp:X,...Z}=L.context??{},Q=this.config.showTime?formatTime(new Date(X??Date.now()),this.config.colorize):void 0,$=this.config.showLevel?getLogLevelString(L.logLevel,this.config.colorize):void 0,ee=this.config.showName?getNamePrefix(J,Y,this.config.colorize):void 0,te=L.messages.length>0?this.styleMessages(L.messages):void 0,ne=Math.min(this.config.getTerminalWidth(),MAX_WIDTH),re=!(`error`in L)||L.error===null||L.error===void 0?void 0:L.error,ie=!(`metadata`in L)||L.metadata===null||L.metadata===void 0||Object.keys(L.metadata).length===0?void 0:L.metadata,ae=Object.keys(Z).length===0?void 0:Z,oe=[Q,$,ee,te].filter(Boolean),se=oe.length>0?wrapAnsi(oe.join(` `),ne):void 0;switch(this.typedTarget.type){case`Console`:case`ConsoleLike`:{let J=[se,re,ie,ae].filter(Boolean);switch(L.logLevel){case`debug`:case LogLevel.debug:this.typedTarget.target.debug(...J);break;case`error`:case`fatal`:case LogLevel.error:case LogLevel.fatal:this.typedTarget.target.error(...J);break;case`info`:case LogLevel.info:this.typedTarget.target.info(...J);break;case LogLevel.trace:case`trace`:this.typedTarget.target.trace(...J);break;case LogLevel.warn:case`warn`:this.typedTarget.target.warn(...J);break}break}case`StreamLike`:case`StreamStderr`:case`StreamStdout`:{let L=ie?this.config.inspect(ie,{breakLength:ne,colors:this.config.colorize,depth:1/0}):void 0,J=ae?this.config.inspect(ae,{breakLength:ne,colors:this.config.colorize,depth:1/0}):void 0,Y=re?this.config.inspect(re,{breakLength:ne,colors:this.config.colorize,depth:1/0}):void 0,X=[(te===void 0||te.length===0)&&se!==void 0&&(re!==void 0||ie!==void 0||ae!==void 0)?[se,`↴`].join(` `):se,Y,L,J].filter(Boolean).join(`
121
- `);this.typedTarget.target.write(`${X}\n`);break}}return L.messages}style(L){return L===void 0?this.config.colorize?import_ansi_colors.default.gray(`undefined`):`undefined`:L===null?this.config.colorize?import_ansi_colors.default.gray(`null`):`null`:typeof L==`boolean`?this.config.colorize?import_ansi_colors.default.cyan(L.toString()):L.toString():typeof L==`number`?this.config.colorize?import_ansi_colors.default.yellow(L.toString()):L.toString():typeof L==`string`?L:typeof L==`function`?this.config.colorize?import_ansi_colors.default.green(L.name):L.name:typeof L==`object`?this.config.inspect(L,{colors:this.config.colorize,compact:!0,depth:1/0}):String(L)}styleMessages(L){return L.map(L=>this.style(L)).join(` `)}};function formatTime(L,J){let Y=`${L.getHours().toString().padStart(2,`0`)}:${L.getMinutes().toString().padStart(2,`0`)}:${L.getSeconds().toString().padStart(2,`0`)}.${L.getMilliseconds().toString().padStart(3,`0`)}`;return J?import_ansi_colors.default.gray(Y):Y}function getLogLevelString(L,J){switch(L){case`debug`:case LogLevel.debug:return J?import_ansi_colors.default.bold.green(`DEBUG`):`DEBUG`;case`error`:case LogLevel.error:return J?import_ansi_colors.default.bold.red(`ERROR`):`ERROR`;case`fatal`:case LogLevel.fatal:return J?import_ansi_colors.default.bold.red(`FATAL`):`FATAL`;case`info`:case LogLevel.info:return J?import_ansi_colors.default.bold.blue(`INFO `):`INFO `;case LogLevel.trace:case`trace`:return J?import_ansi_colors.default.bold.gray(`TRACE`):`TRACE`;case LogLevel.warn:case`warn`:return J?import_ansi_colors.default.bold.yellow(`WARN `):`WARN `}}function getNamePrefix(L,J,Y){if(L===void 0&&J===void 0)return`|`;let X=[...J??[],...L?[L]:[]].map(L=>`[${L}]`).join(``);return Y?import_ansi_colors.default.bold.gray(X):X}const timestampPlugin={onContextCalled(L){return{...L,timestamp:new Date().toISOString()}}};function pickLogTarget(){return typeof process<`u`?process.stderr:console}let platformAdapter;function setPlatformAdapter(L){platformAdapter=L}const DEFAULT_LOG_OPTIONS={logJsonToConsole:!1,logJsonToFile:!1,logToConsole:!0,get name(){return platformAdapter.getName()},verbose:!1};function getChildLogger(L,J){let Y=L.child();return J&&Y.withContext({name:J}),Y}function createLogger$3(L){let J=defu(typeof L==`string`?{name:L}:L,DEFAULT_LOG_OPTIONS);isDebugSet()&&(J.verbose=!0);let Y=[];if(J.logToConsole&&Y.push(new PrettyBasicTransport(defu(isILogBasic(J.logToConsole)?{logger:J.logToConsole}:typeof J.logToConsole==`boolean`?{logger:pickLogTarget()}:J.logToConsole,{getTerminalWidth:platformAdapter.getTerminalWidth,inspect:platformAdapter.inspect}))),J.logJsonToConsole&&Y.push(new JsonBasicTransport(defu(isILogBasic(J.logJsonToConsole)?{logger:J.logJsonToConsole}:typeof J.logJsonToConsole==`boolean`?{logger:pickLogTarget()}:J.logJsonToConsole,{getTerminalWidth:platformAdapter.getTerminalWidth,inspect:platformAdapter.inspect}))),typeof J.logJsonToFile==`string`||J.logJsonToFile){if(platformAdapter.createFileTransport===void 0)throw Error(`File logging is only supported in Node.js environments.`);Y.push(platformAdapter.createFileTransport(J.name,typeof J.logJsonToFile==`boolean`?void 0:J.logJsonToFile))}platformAdapter.createElectronTransport&&Y.push(platformAdapter.createElectronTransport());let X=new LogLayer({errorSerializer:serializeError,plugins:[timestampPlugin],transport:Y}).withContextManager(new HierarchicalContextManager);return J.name!==void 0&&X.withContext({name:J.name}),J.verbose?X.setLevel(LogLevel.trace):X.setLevel(LogLevel.info),platformAdapter.createElectronListener&&platformAdapter.createElectronListener(X),X}function injectionHelper(L){return L===void 0?new MockLogLayer:isILogLayer(L)?L:createLogger$3({logJsonToFile:!1,logToConsole:L,name:void 0,verbose:!0})}function isILogLayer(L){return typeof L==`object`&&!!L&&`withContext`in L&&`child`in L&&typeof L.withContext==`function`&&typeof L.child==`function`}function isStreamStdout(L){return typeof process<`u`&&L===process.stdout}function isStreamStderr(L){return typeof process<`u`&&L===process.stderr}function isStreamLike(L){return typeof L==`object`&&!!L&&`write`in L&&typeof L.write==`function`}function isConsole(L){return typeof L==`object`&&!!L&&(L===globalThis.console||L.constructor?.name===`Console`)}function isConsoleLike(L){return typeof L==`object`&&!!L&&`debug`in L&&`error`in L&&`info`in L&&`trace`in L&&`warn`in L&&typeof L.debug==`function`&&typeof L.error==`function`&&typeof L.info==`function`&&typeof L.trace==`function`&&typeof L.warn==`function`}function isILogBasic(L){return isStreamStdout(L)||isStreamStderr(L)||isConsole(L)||isConsoleLike(L)||isStreamLike(L)}function createLogBasicTypedTarget(L){if(isStreamStdout(L))return{target:L,type:`StreamStdout`};if(isStreamStderr(L))return{target:L,type:`StreamStderr`};if(isConsole(L))return{target:L,type:`Console`};if(isConsoleLike(L))return{target:L,type:`ConsoleLike`};if(isStreamLike(L))return{target:L,type:`StreamLike`};throw Error(`Unable to identify ILogBasic type`)}let _log,currentOptions=DEFAULT_LOG_OPTIONS;const log$3=new Proxy({},{get(L,J){_log??=createLogger$3(currentOptions);let Y=_log[J];return typeof Y==`function`?Y.bind(_log):Y}});function defaultInspector(L){try{return JSON.stringify(L,void 0,2)}catch{return`Could not inspect object`}}function isEnvDefined(L){return typeof process<`u`?process.env[L]!==void 0:typeof globalThis<`u`&&`process`in globalThis&&`env`in globalThis.process?globalThis.process.env[L]!==void 0:typeof window<`u`&&`process`in window&&`env`in window.process?window.process.env[L]!==void 0:!1}function isNoColorSet(){return isEnvDefined(`NO_COLOR`)}function isForceColorSet(){return isEnvDefined(`FORCE_COLOR`)}function isDebugSet(){return isEnvDefined(`DEBUG`)}function isEmptyObject$1(L){return typeof L==`object`&&!!L&&Object.keys(L).length===0}var JsonFileTransport=class extends LogFileRotationTransport{constructor(L){let J=defu(L,{filename:`default-%DATE%.log`});if(J.filename=untildify(J.filename),super(J),this.fieldNames.timestamp!==`timestamp`||this.fieldNames.message!==`message`&&this.fieldNames.message!==`messages`||this.fieldNames.level!==`level`)throw Error(`Field name customization is not supported`);if(!isEmptyObject$1(this.levelMap))throw Error(`Level map customization is not supported`)}shipToLogger(L){let J=`${paramsToJsonString(L,{staticData:this.staticData,timestampFn:this.timestampFn})}${this.delimiter}`;return this.batchEnabled?(this.batchQueue.push(J),this.batchQueue.length>=this.batchSize?this.flush():this.scheduleBatchFlush()):this.stream.write(J),L.messages}};function getPlatformLogPath(L){let J=os.homedir(),{env:Y}=process$1,X=L??`app`;if(process$1.platform===`darwin`)return path$1.join(J,`Library`,`Logs`,X);if(process$1.platform===`win32`){let L=Y.LOCALAPPDATA??path$1.join(J,`AppData`,`Local`);return path$1.join(L,X,`Log`)}return path$1.join(Y.XDG_STATE_HOME??path$1.join(J,`.local`,`state`),X)}function getName(){return process$1.env.ELECTRON_MAIN?`Main`:readPackageUpSync()?.packageJson.name}const fileTransportsByPath=new Map;function getFileTransportDestinations(){return[...fileTransportsByPath.values()].map(L=>L.stream?.currentFile).filter(L=>L!==void 0)}function createFileTransport(L=`default`,J){let Y=filenamify(L,{replacement:`-`}),{filename:X,...Z}=typeof J==`object`?J:{},Q=untildify(typeof X==`string`?X:path$1.join(typeof J==`string`?J:getPlatformLogPath(Y),`${Y}-%DATE%.log`));return fileTransportsByPath.has(Q)||fileTransportsByPath.set(Q,new JsonFileTransport(defu(Z,{compressOnRotate:!0,dateFormat:`YMD`,filename:Q,frequency:`daily`}))),fileTransportsByPath.get(Q)}function getTerminalWidth(){return terminalSize().columns}setPlatformAdapter({createFileTransport,getFileTransportDestinations,getName,getTerminalWidth,inspect:inspect$1});var import_spdx_correct=__toESM(require_spdx_correct(),1);let log$2=createLogger$3({logToConsole:{showTime:!1},verbose:!1});function setLogger$1(L){log$2=injectionHelper(L)}const toZeroIfInfinity=L=>Number.isFinite(L)?L:0;function parseNumber(L){return{days:Math.trunc(L/864e5),hours:Math.trunc(L/36e5%24),minutes:Math.trunc(L/6e4%60),seconds:Math.trunc(L/1e3%60),milliseconds:Math.trunc(L%1e3),microseconds:Math.trunc(toZeroIfInfinity(L*1e3)%1e3),nanoseconds:Math.trunc(toZeroIfInfinity(L*1e6)%1e3)}}function parseBigint(L){return{days:L/86400000n,hours:L/3600000n%24n,minutes:L/60000n%60n,seconds:L/1000n%60n,milliseconds:L%1000n,microseconds:0n,nanoseconds:0n}}function parseMilliseconds(L){switch(typeof L){case`number`:if(Number.isFinite(L))return parseNumber(L);break;case`bigint`:return parseBigint(L)}throw TypeError(`Expected a finite number or bigint`)}const isZero=L=>L===0||L===0n,pluralize=(L,J)=>J===1||J===1n?L:`${L}s`,SECOND_ROUNDING_EPSILON=1e-7,ONE_DAY_IN_MILLISECONDS=24n*60n*60n*1000n;function prettyMilliseconds(L,J){let Y=typeof L==`bigint`;if(!Y&&!Number.isFinite(L))throw TypeError(`Expected a finite number or bigint`);J={...J};let X=L<0?`-`:``;L=L<0?-L:L,J.colonNotation&&(J.compact=!1,J.formatSubMilliseconds=!1,J.separateMilliseconds=!1,J.verbose=!1),J.compact&&(J.unitCount=1,J.secondsDecimalDigits=0,J.millisecondsDecimalDigits=0);let Z=[],Q=(L,J)=>{let Y=Math.floor(L*10**J+SECOND_ROUNDING_EPSILON);return(Math.round(Y)/10**J).toFixed(J)},$=(L,Y,X,Q)=>{if(!((Z.length===0||!J.colonNotation)&&isZero(L)&&!(J.colonNotation&&X===`m`))){if(Q??=String(L),J.colonNotation){let L=Q.includes(`.`)?Q.split(`.`)[0].length:Q.length,J=Z.length>0?2:1;Q=`0`.repeat(Math.max(0,J-L))+Q}else Q+=J.verbose?` `+pluralize(Y,L):X;Z.push(Q)}},ee=parseMilliseconds(L),te=BigInt(ee.days);if(J.hideYearAndDays?$(BigInt(te)*24n+BigInt(ee.hours),`hour`,`h`):(J.hideYear?$(te,`day`,`d`):($(te/365n,`year`,`y`),$(te%365n,`day`,`d`)),$(Number(ee.hours),`hour`,`h`)),$(Number(ee.minutes),`minute`,`m`),!J.hideSeconds)if(J.separateMilliseconds||J.formatSubMilliseconds||!J.colonNotation&&L<1e3&&!J.subSecondsAsDecimals){let L=Number(ee.seconds),Y=Number(ee.milliseconds),X=Number(ee.microseconds),Z=Number(ee.nanoseconds);if($(L,`second`,`s`),J.formatSubMilliseconds)$(Y,`millisecond`,`ms`),$(X,`microsecond`,`µs`),$(Z,`nanosecond`,`ns`);else{let L=Y+X/1e3+Z/1e6,Q=typeof J.millisecondsDecimalDigits==`number`?J.millisecondsDecimalDigits:0,ee=Q?L.toFixed(Q):L>=1?Math.round(L):Math.ceil(L);$(Number.parseFloat(ee),`millisecond`,`ms`,ee)}}else{let X=Q((Y?Number(L%ONE_DAY_IN_MILLISECONDS):L)/1e3%60,typeof J.secondsDecimalDigits==`number`?J.secondsDecimalDigits:1),Z=J.keepDecimalsOnWholeSeconds?X:X.replace(/\.0+$/,``);$(Number.parseFloat(Z),`second`,`s`,Z)}if(Z.length===0)return X+`0`+(J.verbose?` milliseconds`:`ms`);let ne=J.colonNotation?`:`:` `;return typeof J.unitCount==`number`&&(Z=Z.slice(0,Math.max(J.unitCount,1))),X+Z.join(ne)}function keysOf(L){return Object.keys(L)}const typedArrayTypeNames=[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`];function isTypedArrayName(L){return typedArrayTypeNames.includes(L)}const objectTypeNames=[`Function`,`Generator`,`AsyncGenerator`,`GeneratorFunction`,`AsyncGeneratorFunction`,`AsyncFunction`,`Observable`,`Array`,`Buffer`,`Blob`,`Object`,`RegExp`,`Date`,`Error`,`Map`,`Set`,`WeakMap`,`WeakSet`,`WeakRef`,`ArrayBuffer`,`SharedArrayBuffer`,`DataView`,`Promise`,`URL`,`FormData`,`URLSearchParams`,`HTMLElement`,`NaN`,...typedArrayTypeNames];function isObjectTypeName(L){return objectTypeNames.includes(L)}const primitiveTypeNames=[`null`,`undefined`,`string`,`number`,`bigint`,`boolean`,`symbol`];function isPrimitiveTypeName(L){return primitiveTypeNames.includes(L)}[...objectTypeNames,...primitiveTypeNames];const getObjectType=L=>{let J=Object.prototype.toString.call(L).slice(8,-1);if(/HTML\w+Element/.test(J)&&isHtmlElement(L))return`HTMLElement`;if(isObjectTypeName(J))return J};function detect(L){if(L===null)return`null`;switch(typeof L){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(L)?`NaN`:`number`;case`boolean`:return`boolean`;case`function`:return`Function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;default:}if(isObservable(L))return`Observable`;if(isArray(L))return`Array`;if(isBuffer(L))return`Buffer`;let J=getObjectType(L);if(J&&J!==`Object`)return J;if(hasPromiseApi(L))return`Promise`;if(L instanceof String||L instanceof Boolean||L instanceof Number)throw TypeError(`Please don't use object wrappers for primitive types`);return`Object`}function hasPromiseApi(L){return isFunction(L?.then)&&isFunction(L?.catch)}const is=Object.assign(detect,{all:isAll,any:isAny,array:isArray,arrayBuffer:isArrayBuffer,arrayLike:isArrayLike$1,asyncFunction:isAsyncFunction,asyncGenerator:isAsyncGenerator,asyncGeneratorFunction:isAsyncGeneratorFunction,asyncIterable:isAsyncIterable,bigint:isBigint,bigInt64Array:isBigInt64Array,bigUint64Array:isBigUint64Array,blob:isBlob,boolean:isBoolean,boundFunction:isBoundFunction,buffer:isBuffer,class:isClass,dataView:isDataView,date:isDate,detect,directInstanceOf:isDirectInstanceOf,emptyArray:isEmptyArray,emptyMap:isEmptyMap,emptyObject:isEmptyObject,emptySet:isEmptySet,emptyString:isEmptyString,emptyStringOrWhitespace:isEmptyStringOrWhitespace,enumCase:isEnumCase,error:isError,evenInteger:isEvenInteger,falsy:isFalsy,float32Array:isFloat32Array,float64Array:isFloat64Array,formData:isFormData,function:isFunction,generator:isGenerator,generatorFunction:isGeneratorFunction,htmlElement:isHtmlElement,infinite:isInfinite,inRange:isInRange,int16Array:isInt16Array,int32Array:isInt32Array,int8Array:isInt8Array,integer:isInteger,iterable:isIterable,map:isMap,nan:isNan,nativePromise:isNativePromise,negativeNumber:isNegativeNumber,nodeStream:isNodeStream,nonEmptyArray:isNonEmptyArray,nonEmptyMap:isNonEmptyMap,nonEmptyObject:isNonEmptyObject,nonEmptySet:isNonEmptySet,nonEmptyString:isNonEmptyString$2,nonEmptyStringAndNotWhitespace:isNonEmptyStringAndNotWhitespace,null:isNull,nullOrUndefined:isNullOrUndefined,number:isNumber,numericString:isNumericString,object:isObject$3,observable:isObservable,oddInteger:isOddInteger,plainObject:isPlainObject$6,positiveNumber:isPositiveNumber,primitive:isPrimitive,promise:isPromise,propertyKey:isPropertyKey,regExp:isRegExp,safeInteger:isSafeInteger,set:isSet,sharedArrayBuffer:isSharedArrayBuffer,string:isString$1,symbol:isSymbol,truthy:isTruthy,tupleLike:isTupleLike,typedArray:isTypedArray,uint16Array:isUint16Array,uint32Array:isUint32Array,uint8Array:isUint8Array$2,uint8ClampedArray:isUint8ClampedArray,undefined:isUndefined,urlInstance:isUrlInstance,urlSearchParams:isUrlSearchParams,urlString:isUrlString,optional:isOptional,validDate:isValidDate,validLength:isValidLength,weakMap:isWeakMap,weakRef:isWeakRef,weakSet:isWeakSet,whitespaceString:isWhitespaceString});function isAbsoluteModule2(L){return J=>isInteger(J)&&Math.abs(J%2)===L}function validatePredicateArray(L,J){if(L.length===0){if(!J)throw TypeError(`Invalid predicate array`);return}for(let J of L)if(!isFunction(J))throw TypeError(`Invalid predicate: ${JSON.stringify(J)}`)}function isAll(L,...J){if(Array.isArray(L)){let Y=L;validatePredicateArray(Y,J.length===0);let X=L=>Y.every(J=>J(L));return J.length===0?X:predicateOnArray(Array.prototype.every,X,J)}return predicateOnArray(Array.prototype.every,L,J)}function isAny(L,...J){if(Array.isArray(L)){let Y=L;validatePredicateArray(Y,J.length===0);let X=L=>Y.some(J=>J(L));return J.length===0?X:predicateOnArray(Array.prototype.some,X,J)}return predicateOnArray(Array.prototype.some,L,J)}function isOptional(L,J){return isUndefined(L)||J(L)}function isArray(L,J){return Array.isArray(L)?isFunction(J)?L.every(L=>J(L)):!0:!1}function isArrayBuffer(L){return getObjectType(L)===`ArrayBuffer`}function isArrayLike$1(L){return!isNullOrUndefined(L)&&!isFunction(L)&&isValidLength(L.length)}function isAsyncFunction(L){return getObjectType(L)===`AsyncFunction`}function isAsyncGenerator(L){return isAsyncIterable(L)&&isFunction(L.next)&&isFunction(L.throw)}function isAsyncGeneratorFunction(L){return getObjectType(L)===`AsyncGeneratorFunction`}function isAsyncIterable(L){return isFunction(L?.[Symbol.asyncIterator])}function isBigint(L){return typeof L==`bigint`}function isBigInt64Array(L){return getObjectType(L)===`BigInt64Array`}function isBigUint64Array(L){return getObjectType(L)===`BigUint64Array`}function isBlob(L){return getObjectType(L)===`Blob`}function isBoolean(L){return L===!0||L===!1}function isBoundFunction(L){return isFunction(L)&&!Object.hasOwn(L,`prototype`)}function isBuffer(L){return L?.constructor?.isBuffer?.(L)??!1}function isClass(L){return isFunction(L)&&/^class(\s+|{)/.test(L.toString())}function isDataView(L){return getObjectType(L)===`DataView`}function isDate(L){return getObjectType(L)===`Date`}function isDirectInstanceOf(L,J){return L==null?!1:Object.getPrototypeOf(L)===J.prototype}function isEmptyArray(L){return isArray(L)&&L.length===0}function isEmptyMap(L){return isMap(L)&&L.size===0}function isEmptyObject(L){return isObject$3(L)&&!isMap(L)&&!isSet(L)&&Object.keys(L).length===0}function isEmptySet(L){return isSet(L)&&L.size===0}function isEmptyString(L){return isString$1(L)&&L.length===0}function isEmptyStringOrWhitespace(L){return isEmptyString(L)||isWhitespaceString(L)}function isEnumCase(L,J){return Object.values(J).includes(L)}function isError(L){return getObjectType(L)===`Error`}function isEvenInteger(L){return isAbsoluteModule2(0)(L)}function isFalsy(L){return!L}function isFloat32Array(L){return getObjectType(L)===`Float32Array`}function isFloat64Array(L){return getObjectType(L)===`Float64Array`}function isFormData(L){return getObjectType(L)===`FormData`}function isFunction(L){return typeof L==`function`}function isGenerator(L){return isIterable(L)&&isFunction(L?.next)&&isFunction(L?.throw)}function isGeneratorFunction(L){return getObjectType(L)===`GeneratorFunction`}const NODE_TYPE_ELEMENT=1,DOM_PROPERTIES_TO_CHECK=[`innerHTML`,`ownerDocument`,`style`,`attributes`,`nodeValue`];function isHtmlElement(L){return isObject$3(L)&&L.nodeType===NODE_TYPE_ELEMENT&&isString$1(L.nodeName)&&!isPlainObject$6(L)&&DOM_PROPERTIES_TO_CHECK.every(J=>J in L)}function isInfinite(L){return L===1/0||L===-1/0}function isInRange(L,J){if(isNumber(J))return L>=Math.min(0,J)&&L<=Math.max(J,0);if(isArray(J)&&J.length===2)return L>=Math.min(...J)&&L<=Math.max(...J);throw TypeError(`Invalid range: ${JSON.stringify(J)}`)}function isInt16Array(L){return getObjectType(L)===`Int16Array`}function isInt32Array(L){return getObjectType(L)===`Int32Array`}function isInt8Array(L){return getObjectType(L)===`Int8Array`}function isInteger(L){return Number.isInteger(L)}function isIterable(L){return isFunction(L?.[Symbol.iterator])}function isMap(L){return getObjectType(L)===`Map`}function isNan(L){return Number.isNaN(L)}function isNativePromise(L){return getObjectType(L)===`Promise`}function isNegativeNumber(L){return isNumber(L)&&L<0}function isNodeStream(L){return isObject$3(L)&&isFunction(L.pipe)&&!isObservable(L)}function isNonEmptyArray(L){return isArray(L)&&L.length>0}function isNonEmptyMap(L){return isMap(L)&&L.size>0}function isNonEmptyObject(L){return isObject$3(L)&&!isMap(L)&&!isSet(L)&&Object.keys(L).length>0}function isNonEmptySet(L){return isSet(L)&&L.size>0}function isNonEmptyString$2(L){return isString$1(L)&&L.length>0}function isNonEmptyStringAndNotWhitespace(L){return isString$1(L)&&!isEmptyStringOrWhitespace(L)}function isNull(L){return L===null}function isNullOrUndefined(L){return isNull(L)||isUndefined(L)}function isNumber(L){return typeof L==`number`&&!Number.isNaN(L)}function isNumericString(L){return isString$1(L)&&!isEmptyStringOrWhitespace(L)&&!Number.isNaN(Number(L))}function isObject$3(L){return!isNull(L)&&(typeof L==`object`||isFunction(L))}function isObservable(L){return L?Symbol.observable!==void 0&&L===L[Symbol.observable]?.()||L===L[`@@observable`]?.():!1}function isOddInteger(L){return isAbsoluteModule2(1)(L)}function isPlainObject$6(L){if(typeof L!=`object`||!L)return!1;let J=Object.getPrototypeOf(L);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!(Symbol.toStringTag in L)&&!(Symbol.iterator in L)}function isPositiveNumber(L){return isNumber(L)&&L>0}function isPrimitive(L){return isNull(L)||isPrimitiveTypeName(typeof L)}function isPromise(L){return isNativePromise(L)||hasPromiseApi(L)}function isPropertyKey(L){return isAny([isString$1,isNumber,isSymbol],L)}function isRegExp(L){return getObjectType(L)===`RegExp`}function isSafeInteger(L){return Number.isSafeInteger(L)}function isSet(L){return getObjectType(L)===`Set`}function isSharedArrayBuffer(L){return getObjectType(L)===`SharedArrayBuffer`}function isString$1(L){return typeof L==`string`}function isSymbol(L){return typeof L==`symbol`}function isTruthy(L){return!!L}function isTupleLike(L,J){return isArray(J)&&isArray(L)&&J.length===L.length?J.every((J,Y)=>J(L[Y])):!1}function isTypedArray(L){return isTypedArrayName(getObjectType(L))}function isUint16Array(L){return getObjectType(L)===`Uint16Array`}function isUint32Array(L){return getObjectType(L)===`Uint32Array`}function isUint8Array$2(L){return getObjectType(L)===`Uint8Array`}function isUint8ClampedArray(L){return getObjectType(L)===`Uint8ClampedArray`}function isUndefined(L){return L===void 0}function isUrlInstance(L){return getObjectType(L)===`URL`}function isUrlSearchParams(L){return getObjectType(L)===`URLSearchParams`}function isUrlString(L){if(!isString$1(L))return!1;try{return new URL(L),!0}catch{return!1}}function isValidDate(L){return isDate(L)&&!isNan(Number(L))}function isValidLength(L){return isSafeInteger(L)&&L>=0}function isWeakMap(L){return getObjectType(L)===`WeakMap`}function isWeakRef(L){return getObjectType(L)===`WeakRef`}function isWeakSet(L){return getObjectType(L)===`WeakSet`}function isWhitespaceString(L){return isString$1(L)&&/^\s+$/.test(L)}function predicateOnArray(L,J,Y){if(!isFunction(J))throw TypeError(`Invalid predicate: ${JSON.stringify(J)}`);if(Y.length===0)throw TypeError(`Invalid number of values`);return L.call(Y,J)}const andFormatter=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`}),orFormatter=new Intl.ListFormat(`en`,{style:`long`,type:`disjunction`}),methodTypeMap={isArray:`Array`,isArrayBuffer:`ArrayBuffer`,isArrayLike:`array-like`,isAsyncFunction:`AsyncFunction`,isAsyncGenerator:`AsyncGenerator`,isAsyncGeneratorFunction:`AsyncGeneratorFunction`,isAsyncIterable:`AsyncIterable`,isBigint:`bigint`,isBigInt64Array:`BigInt64Array`,isBigUint64Array:`BigUint64Array`,isBlob:`Blob`,isBoolean:`boolean`,isBoundFunction:`Function`,isBuffer:`Buffer`,isClass:`Class`,isDataView:`DataView`,isDate:`Date`,isDirectInstanceOf:`T`,isEmptyArray:`empty array`,isEmptyMap:`empty map`,isEmptyObject:`empty object`,isEmptySet:`empty set`,isEmptyString:`empty string`,isEmptyStringOrWhitespace:`empty string or whitespace`,isEnumCase:`EnumCase`,isError:`Error`,isEvenInteger:`even integer`,isFalsy:`falsy`,isFloat32Array:`Float32Array`,isFloat64Array:`Float64Array`,isFormData:`FormData`,isFunction:`Function`,isGenerator:`Generator`,isGeneratorFunction:`GeneratorFunction`,isHtmlElement:`HTMLElement`,isInfinite:`infinite number`,isInRange:`in range`,isInt16Array:`Int16Array`,isInt32Array:`Int32Array`,isInt8Array:`Int8Array`,isInteger:`integer`,isIterable:`Iterable`,isMap:`Map`,isNan:`NaN`,isNativePromise:`native Promise`,isNegativeNumber:`negative number`,isNodeStream:`Node.js Stream`,isNonEmptyArray:`non-empty array`,isNonEmptyMap:`non-empty map`,isNonEmptyObject:`non-empty object`,isNonEmptySet:`non-empty set`,isNonEmptyString:`non-empty string`,isNonEmptyStringAndNotWhitespace:`non-empty string and not whitespace`,isNull:`null`,isNullOrUndefined:`null or undefined`,isNumber:`number`,isNumericString:`string with a number`,isObject:`Object`,isObservable:`Observable`,isOddInteger:`odd integer`,isPlainObject:`plain object`,isPositiveNumber:`positive number`,isPrimitive:`primitive`,isPromise:`Promise`,isPropertyKey:`PropertyKey`,isRegExp:`RegExp`,isSafeInteger:`integer`,isSet:`Set`,isSharedArrayBuffer:`SharedArrayBuffer`,isString:`string`,isSymbol:`symbol`,isTruthy:`truthy`,isTupleLike:`tuple-like`,isTypedArray:`TypedArray`,isUint16Array:`Uint16Array`,isUint32Array:`Uint32Array`,isUint8Array:`Uint8Array`,isUint8ClampedArray:`Uint8ClampedArray`,isUndefined:`undefined`,isUrlInstance:`URL`,isUrlSearchParams:`URLSearchParams`,isUrlString:`string with a URL`,isValidDate:`valid Date`,isValidLength:`valid length`,isWeakMap:`WeakMap`,isWeakRef:`WeakRef`,isWeakSet:`WeakSet`,isWhitespaceString:`whitespace string`},isMethodNames=keysOf(methodTypeMap);var require_array$1=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.splitWhen=L.flatten=void 0;function J(L){return L.reduce((L,J)=>[].concat(L,J),[])}L.flatten=J;function Y(L,J){let Y=[[]],X=0;for(let Z of L)J(Z)?(X++,Y[X]=[]):Y[X].push(Z);return Y}L.splitWhen=Y})),require_errno=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.isEnoentCodeError=void 0;function J(L){return L.code===`ENOENT`}L.isEnoentCodeError=J})),require_fs$3=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.createDirentFromStats=void 0;var J=class{constructor(L,J){this.name=L,this.isBlockDevice=J.isBlockDevice.bind(J),this.isCharacterDevice=J.isCharacterDevice.bind(J),this.isDirectory=J.isDirectory.bind(J),this.isFIFO=J.isFIFO.bind(J),this.isFile=J.isFile.bind(J),this.isSocket=J.isSocket.bind(J),this.isSymbolicLink=J.isSymbolicLink.bind(J)}};function Y(L,Y){return new J(L,Y)}L.createDirentFromStats=Y})),require_path=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.convertPosixPathToPattern=L.convertWindowsPathToPattern=L.convertPathToPattern=L.escapePosixPath=L.escapeWindowsPath=L.escape=L.removeLeadingDotSegment=L.makeAbsolute=L.unixify=void 0;let J=__require$1(`os`),Y=__require$1(`path`),X=J.platform()===`win32`,Z=2,Q=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,$=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,ee=/^\\\\([.?])/,te=/\\(?![!()+@[\]{}])/g;function ne(L){return L.replace(/\\/g,`/`)}L.unixify=ne;function re(L,J){return Y.resolve(L,J)}L.makeAbsolute=re;function ie(L){if(L.charAt(0)===`.`){let J=L.charAt(1);if(J===`/`||J===`\\`)return L.slice(2)}return L}L.removeLeadingDotSegment=ie,L.escape=X?ae:oe;function ae(L){return L.replace($,`\\$2`)}L.escapeWindowsPath=ae;function oe(L){return L.replace(Q,`\\$2`)}L.escapePosixPath=oe,L.convertPathToPattern=X?se:ce;function se(L){return ae(L).replace(ee,`//$1`).replace(te,`/`)}L.convertWindowsPathToPattern=se;function ce(L){return oe(L)}L.convertPosixPathToPattern=ce})),require_is_extglob=__commonJSMin(((L,J)=>{
121
+ `);this.typedTarget.target.write(`${X}\n`);break}}return L.messages}style(L){return L===void 0?this.config.colorize?import_ansi_colors.default.gray(`undefined`):`undefined`:L===null?this.config.colorize?import_ansi_colors.default.gray(`null`):`null`:typeof L==`boolean`?this.config.colorize?import_ansi_colors.default.cyan(L.toString()):L.toString():typeof L==`number`?this.config.colorize?import_ansi_colors.default.yellow(L.toString()):L.toString():typeof L==`string`?L:typeof L==`function`?this.config.colorize?import_ansi_colors.default.green(L.name):L.name:typeof L==`object`?this.config.inspect(L,{colors:this.config.colorize,compact:!0,depth:1/0}):String(L)}styleMessages(L){return L.map(L=>this.style(L)).join(` `)}};function formatTime(L,J){let Y=`${L.getHours().toString().padStart(2,`0`)}:${L.getMinutes().toString().padStart(2,`0`)}:${L.getSeconds().toString().padStart(2,`0`)}.${L.getMilliseconds().toString().padStart(3,`0`)}`;return J?import_ansi_colors.default.gray(Y):Y}function getLogLevelString(L,J){switch(L){case`debug`:case LogLevel.debug:return J?import_ansi_colors.default.bold.green(`DEBUG`):`DEBUG`;case`error`:case LogLevel.error:return J?import_ansi_colors.default.bold.red(`ERROR`):`ERROR`;case`fatal`:case LogLevel.fatal:return J?import_ansi_colors.default.bold.red(`FATAL`):`FATAL`;case`info`:case LogLevel.info:return J?import_ansi_colors.default.bold.blue(`INFO `):`INFO `;case LogLevel.trace:case`trace`:return J?import_ansi_colors.default.bold.gray(`TRACE`):`TRACE`;case LogLevel.warn:case`warn`:return J?import_ansi_colors.default.bold.yellow(`WARN `):`WARN `}}function getNamePrefix(L,J,Y){if(L===void 0&&J===void 0)return`|`;let X=[...J??[],...L?[L]:[]].map(L=>`[${L}]`).join(``);return Y?import_ansi_colors.default.bold.gray(X):X}const timestampPlugin={onContextCalled(L){return{...L,timestamp:new Date().toISOString()}}};function pickLogTarget(){return typeof process<`u`?process.stderr:console}let platformAdapter;function setPlatformAdapter(L){platformAdapter=L}const DEFAULT_LOG_OPTIONS={logJsonToConsole:!1,logJsonToFile:!1,logToConsole:!0,get name(){return platformAdapter.getName()},verbose:!1};function getChildLogger(L,J){let Y=L.child();return J&&Y.withContext({name:J}),Y}function createLogger$3(L){let J=defu(typeof L==`string`?{name:L}:L,DEFAULT_LOG_OPTIONS);isDebugSet()&&(J.verbose=!0);let Y=[];if(J.logToConsole&&Y.push(new PrettyBasicTransport(defu(isILogBasic(J.logToConsole)?{logger:J.logToConsole}:typeof J.logToConsole==`boolean`?{logger:pickLogTarget()}:J.logToConsole,{getTerminalWidth:platformAdapter.getTerminalWidth,inspect:platformAdapter.inspect}))),J.logJsonToConsole&&Y.push(new JsonBasicTransport(defu(isILogBasic(J.logJsonToConsole)?{logger:J.logJsonToConsole}:typeof J.logJsonToConsole==`boolean`?{logger:pickLogTarget()}:J.logJsonToConsole,{getTerminalWidth:platformAdapter.getTerminalWidth,inspect:platformAdapter.inspect}))),typeof J.logJsonToFile==`string`||J.logJsonToFile){if(platformAdapter.createFileTransport===void 0)throw Error(`File logging is only supported in Node.js environments.`);Y.push(platformAdapter.createFileTransport(J.name,typeof J.logJsonToFile==`boolean`?void 0:J.logJsonToFile))}platformAdapter.createElectronTransport&&Y.push(platformAdapter.createElectronTransport());let X=new LogLayer({errorSerializer:serializeError,plugins:[timestampPlugin],transport:Y}).withContextManager(new HierarchicalContextManager);return J.name!==void 0&&X.withContext({name:J.name}),J.verbose?X.setLevel(LogLevel.trace):X.setLevel(LogLevel.info),platformAdapter.createElectronListener&&platformAdapter.createElectronListener(X),X}function injectionHelper(L){return L===void 0?new MockLogLayer:isILogLayer(L)?L:createLogger$3({logJsonToFile:!1,logToConsole:L,name:void 0,verbose:!0})}function isILogLayer(L){return typeof L==`object`&&!!L&&`withContext`in L&&`child`in L&&typeof L.withContext==`function`&&typeof L.child==`function`}function isStreamStdout(L){return typeof process<`u`&&L===process.stdout}function isStreamStderr(L){return typeof process<`u`&&L===process.stderr}function isStreamLike(L){return typeof L==`object`&&!!L&&`write`in L&&typeof L.write==`function`}function isConsole(L){return typeof L==`object`&&!!L&&(L===globalThis.console||L.constructor?.name===`Console`)}function isConsoleLike(L){return typeof L==`object`&&!!L&&`debug`in L&&`error`in L&&`info`in L&&`trace`in L&&`warn`in L&&typeof L.debug==`function`&&typeof L.error==`function`&&typeof L.info==`function`&&typeof L.trace==`function`&&typeof L.warn==`function`}function isILogBasic(L){return isStreamStdout(L)||isStreamStderr(L)||isConsole(L)||isConsoleLike(L)||isStreamLike(L)}function createLogBasicTypedTarget(L){if(isStreamStdout(L))return{target:L,type:`StreamStdout`};if(isStreamStderr(L))return{target:L,type:`StreamStderr`};if(isConsole(L))return{target:L,type:`Console`};if(isConsoleLike(L))return{target:L,type:`ConsoleLike`};if(isStreamLike(L))return{target:L,type:`StreamLike`};throw Error(`Unable to identify ILogBasic type`)}let _log,currentOptions=DEFAULT_LOG_OPTIONS;const log$3=new Proxy({},{get(L,J){_log??=createLogger$3(currentOptions);let Y=_log[J];return typeof Y==`function`?Y.bind(_log):Y}});function defaultInspector(L){try{return JSON.stringify(L,void 0,2)}catch{return`Could not inspect object`}}function isEnvDefined(L){return typeof process<`u`?process.env[L]!==void 0:typeof globalThis<`u`&&`process`in globalThis&&`env`in globalThis.process?globalThis.process.env[L]!==void 0:typeof window<`u`&&`process`in window&&`env`in window.process?window.process.env[L]!==void 0:!1}function isNoColorSet(){return isEnvDefined(`NO_COLOR`)}function isForceColorSet(){return isEnvDefined(`FORCE_COLOR`)}function isDebugSet(){return isEnvDefined(`DEBUG`)}function isEmptyObject$1(L){return typeof L==`object`&&!!L&&Object.keys(L).length===0}var JsonFileTransport=class extends LogFileRotationTransport{constructor(L){let J=defu(L,{filename:`default-%DATE%.log`});if(J.filename=untildify(J.filename),super(J),this.fieldNames.timestamp!==`timestamp`||this.fieldNames.message!==`message`&&this.fieldNames.message!==`messages`||this.fieldNames.level!==`level`)throw Error(`Field name customization is not supported`);if(!isEmptyObject$1(this.levelMap))throw Error(`Level map customization is not supported`)}shipToLogger(L){let J=`${paramsToJsonString(L,{staticData:this.staticData,timestampFn:this.timestampFn})}${this.delimiter}`;return this.batchEnabled?(this.batchQueue.push(J),this.batchQueue.length>=this.batchSize?this.flush():this.scheduleBatchFlush()):this.stream.write(J),L.messages}};function getPlatformLogPath(L){let J=os.homedir(),{env:Y}=process$1,X=L??`app`;if(process$1.platform===`darwin`)return path$1.join(J,`Library`,`Logs`,X);if(process$1.platform===`win32`){let L=Y.LOCALAPPDATA??path$1.join(J,`AppData`,`Local`);return path$1.join(L,X,`Log`)}return path$1.join(Y.XDG_STATE_HOME??path$1.join(J,`.local`,`state`),X)}function getName(){return process$1.env.ELECTRON_MAIN?`Main`:readPackageUpSync()?.packageJson.name}const fileTransportsByPath=new Map;function getFileTransportDestinations(){return[...fileTransportsByPath.values()].map(L=>L.stream?.currentFile).filter(L=>L!==void 0)}function createFileTransport(L=`default`,J){let Y=filenamify(L,{replacement:`-`}),{filename:X,...Z}=typeof J==`object`?J:{},Q=untildify(typeof X==`string`?X:path$1.join(typeof J==`string`?J:getPlatformLogPath(Y),`${Y}-%DATE%.log`));return fileTransportsByPath.has(Q)||fileTransportsByPath.set(Q,new JsonFileTransport(defu(Z,{compressOnRotate:!0,dateFormat:`YMD`,filename:Q,frequency:`daily`}))),fileTransportsByPath.get(Q)}function getTerminalWidth(){return terminalSize().columns}setPlatformAdapter({createFileTransport,getFileTransportDestinations,getName,getTerminalWidth,inspect:inspect$1});var import_spdx_correct=__toESM(require_spdx_correct(),1);let log$2=createLogger$3({logToConsole:{showTime:!1},name});function setLogger$1(L){log$2=injectionHelper(L)}const toZeroIfInfinity=L=>Number.isFinite(L)?L:0;function parseNumber(L){return{days:Math.trunc(L/864e5),hours:Math.trunc(L/36e5%24),minutes:Math.trunc(L/6e4%60),seconds:Math.trunc(L/1e3%60),milliseconds:Math.trunc(L%1e3),microseconds:Math.trunc(toZeroIfInfinity(L*1e3)%1e3),nanoseconds:Math.trunc(toZeroIfInfinity(L*1e6)%1e3)}}function parseBigint(L){return{days:L/86400000n,hours:L/3600000n%24n,minutes:L/60000n%60n,seconds:L/1000n%60n,milliseconds:L%1000n,microseconds:0n,nanoseconds:0n}}function parseMilliseconds(L){switch(typeof L){case`number`:if(Number.isFinite(L))return parseNumber(L);break;case`bigint`:return parseBigint(L)}throw TypeError(`Expected a finite number or bigint`)}const isZero=L=>L===0||L===0n,pluralize=(L,J)=>J===1||J===1n?L:`${L}s`,SECOND_ROUNDING_EPSILON=1e-7,ONE_DAY_IN_MILLISECONDS=24n*60n*60n*1000n;function prettyMilliseconds(L,J){let Y=typeof L==`bigint`;if(!Y&&!Number.isFinite(L))throw TypeError(`Expected a finite number or bigint`);J={...J};let X=L<0?`-`:``;L=L<0?-L:L,J.colonNotation&&(J.compact=!1,J.formatSubMilliseconds=!1,J.separateMilliseconds=!1,J.verbose=!1),J.compact&&(J.unitCount=1,J.secondsDecimalDigits=0,J.millisecondsDecimalDigits=0);let Z=[],Q=(L,J)=>{let Y=Math.floor(L*10**J+SECOND_ROUNDING_EPSILON);return(Math.round(Y)/10**J).toFixed(J)},$=(L,Y,X,Q)=>{if(!((Z.length===0||!J.colonNotation)&&isZero(L)&&!(J.colonNotation&&X===`m`))){if(Q??=String(L),J.colonNotation){let L=Q.includes(`.`)?Q.split(`.`)[0].length:Q.length,J=Z.length>0?2:1;Q=`0`.repeat(Math.max(0,J-L))+Q}else Q+=J.verbose?` `+pluralize(Y,L):X;Z.push(Q)}},ee=parseMilliseconds(L),te=BigInt(ee.days);if(J.hideYearAndDays?$(BigInt(te)*24n+BigInt(ee.hours),`hour`,`h`):(J.hideYear?$(te,`day`,`d`):($(te/365n,`year`,`y`),$(te%365n,`day`,`d`)),$(Number(ee.hours),`hour`,`h`)),$(Number(ee.minutes),`minute`,`m`),!J.hideSeconds)if(J.separateMilliseconds||J.formatSubMilliseconds||!J.colonNotation&&L<1e3&&!J.subSecondsAsDecimals){let L=Number(ee.seconds),Y=Number(ee.milliseconds),X=Number(ee.microseconds),Z=Number(ee.nanoseconds);if($(L,`second`,`s`),J.formatSubMilliseconds)$(Y,`millisecond`,`ms`),$(X,`microsecond`,`µs`),$(Z,`nanosecond`,`ns`);else{let L=Y+X/1e3+Z/1e6,Q=typeof J.millisecondsDecimalDigits==`number`?J.millisecondsDecimalDigits:0,ee=Q?L.toFixed(Q):L>=1?Math.round(L):Math.ceil(L);$(Number.parseFloat(ee),`millisecond`,`ms`,ee)}}else{let X=Q((Y?Number(L%ONE_DAY_IN_MILLISECONDS):L)/1e3%60,typeof J.secondsDecimalDigits==`number`?J.secondsDecimalDigits:1),Z=J.keepDecimalsOnWholeSeconds?X:X.replace(/\.0+$/,``);$(Number.parseFloat(Z),`second`,`s`,Z)}if(Z.length===0)return X+`0`+(J.verbose?` milliseconds`:`ms`);let ne=J.colonNotation?`:`:` `;return typeof J.unitCount==`number`&&(Z=Z.slice(0,Math.max(J.unitCount,1))),X+Z.join(ne)}function keysOf(L){return Object.keys(L)}const typedArrayTypeNames=[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`];function isTypedArrayName(L){return typedArrayTypeNames.includes(L)}const objectTypeNames=[`Function`,`Generator`,`AsyncGenerator`,`GeneratorFunction`,`AsyncGeneratorFunction`,`AsyncFunction`,`Observable`,`Array`,`Buffer`,`Blob`,`Object`,`RegExp`,`Date`,`Error`,`Map`,`Set`,`WeakMap`,`WeakSet`,`WeakRef`,`ArrayBuffer`,`SharedArrayBuffer`,`DataView`,`Promise`,`URL`,`FormData`,`URLSearchParams`,`HTMLElement`,`NaN`,...typedArrayTypeNames];function isObjectTypeName(L){return objectTypeNames.includes(L)}const primitiveTypeNames=[`null`,`undefined`,`string`,`number`,`bigint`,`boolean`,`symbol`];function isPrimitiveTypeName(L){return primitiveTypeNames.includes(L)}[...objectTypeNames,...primitiveTypeNames];const getObjectType=L=>{let J=Object.prototype.toString.call(L).slice(8,-1);if(/HTML\w+Element/.test(J)&&isHtmlElement(L))return`HTMLElement`;if(isObjectTypeName(J))return J};function detect(L){if(L===null)return`null`;switch(typeof L){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(L)?`NaN`:`number`;case`boolean`:return`boolean`;case`function`:return`Function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;default:}if(isObservable(L))return`Observable`;if(isArray(L))return`Array`;if(isBuffer(L))return`Buffer`;let J=getObjectType(L);if(J&&J!==`Object`)return J;if(hasPromiseApi(L))return`Promise`;if(L instanceof String||L instanceof Boolean||L instanceof Number)throw TypeError(`Please don't use object wrappers for primitive types`);return`Object`}function hasPromiseApi(L){return isFunction(L?.then)&&isFunction(L?.catch)}const is=Object.assign(detect,{all:isAll,any:isAny,array:isArray,arrayBuffer:isArrayBuffer,arrayLike:isArrayLike$1,asyncFunction:isAsyncFunction,asyncGenerator:isAsyncGenerator,asyncGeneratorFunction:isAsyncGeneratorFunction,asyncIterable:isAsyncIterable,bigint:isBigint,bigInt64Array:isBigInt64Array,bigUint64Array:isBigUint64Array,blob:isBlob,boolean:isBoolean,boundFunction:isBoundFunction,buffer:isBuffer,class:isClass,dataView:isDataView,date:isDate,detect,directInstanceOf:isDirectInstanceOf,emptyArray:isEmptyArray,emptyMap:isEmptyMap,emptyObject:isEmptyObject,emptySet:isEmptySet,emptyString:isEmptyString,emptyStringOrWhitespace:isEmptyStringOrWhitespace,enumCase:isEnumCase,error:isError,evenInteger:isEvenInteger,falsy:isFalsy,float32Array:isFloat32Array,float64Array:isFloat64Array,formData:isFormData,function:isFunction,generator:isGenerator,generatorFunction:isGeneratorFunction,htmlElement:isHtmlElement,infinite:isInfinite,inRange:isInRange,int16Array:isInt16Array,int32Array:isInt32Array,int8Array:isInt8Array,integer:isInteger,iterable:isIterable,map:isMap,nan:isNan,nativePromise:isNativePromise,negativeNumber:isNegativeNumber,nodeStream:isNodeStream,nonEmptyArray:isNonEmptyArray,nonEmptyMap:isNonEmptyMap,nonEmptyObject:isNonEmptyObject,nonEmptySet:isNonEmptySet,nonEmptyString:isNonEmptyString$2,nonEmptyStringAndNotWhitespace:isNonEmptyStringAndNotWhitespace,null:isNull,nullOrUndefined:isNullOrUndefined,number:isNumber,numericString:isNumericString,object:isObject$3,observable:isObservable,oddInteger:isOddInteger,plainObject:isPlainObject$6,positiveNumber:isPositiveNumber,primitive:isPrimitive,promise:isPromise,propertyKey:isPropertyKey,regExp:isRegExp,safeInteger:isSafeInteger,set:isSet,sharedArrayBuffer:isSharedArrayBuffer,string:isString$1,symbol:isSymbol,truthy:isTruthy,tupleLike:isTupleLike,typedArray:isTypedArray,uint16Array:isUint16Array,uint32Array:isUint32Array,uint8Array:isUint8Array$2,uint8ClampedArray:isUint8ClampedArray,undefined:isUndefined,urlInstance:isUrlInstance,urlSearchParams:isUrlSearchParams,urlString:isUrlString,optional:isOptional,validDate:isValidDate,validLength:isValidLength,weakMap:isWeakMap,weakRef:isWeakRef,weakSet:isWeakSet,whitespaceString:isWhitespaceString});function isAbsoluteModule2(L){return J=>isInteger(J)&&Math.abs(J%2)===L}function validatePredicateArray(L,J){if(L.length===0){if(!J)throw TypeError(`Invalid predicate array`);return}for(let J of L)if(!isFunction(J))throw TypeError(`Invalid predicate: ${JSON.stringify(J)}`)}function isAll(L,...J){if(Array.isArray(L)){let Y=L;validatePredicateArray(Y,J.length===0);let X=L=>Y.every(J=>J(L));return J.length===0?X:predicateOnArray(Array.prototype.every,X,J)}return predicateOnArray(Array.prototype.every,L,J)}function isAny(L,...J){if(Array.isArray(L)){let Y=L;validatePredicateArray(Y,J.length===0);let X=L=>Y.some(J=>J(L));return J.length===0?X:predicateOnArray(Array.prototype.some,X,J)}return predicateOnArray(Array.prototype.some,L,J)}function isOptional(L,J){return isUndefined(L)||J(L)}function isArray(L,J){return Array.isArray(L)?isFunction(J)?L.every(L=>J(L)):!0:!1}function isArrayBuffer(L){return getObjectType(L)===`ArrayBuffer`}function isArrayLike$1(L){return!isNullOrUndefined(L)&&!isFunction(L)&&isValidLength(L.length)}function isAsyncFunction(L){return getObjectType(L)===`AsyncFunction`}function isAsyncGenerator(L){return isAsyncIterable(L)&&isFunction(L.next)&&isFunction(L.throw)}function isAsyncGeneratorFunction(L){return getObjectType(L)===`AsyncGeneratorFunction`}function isAsyncIterable(L){return isFunction(L?.[Symbol.asyncIterator])}function isBigint(L){return typeof L==`bigint`}function isBigInt64Array(L){return getObjectType(L)===`BigInt64Array`}function isBigUint64Array(L){return getObjectType(L)===`BigUint64Array`}function isBlob(L){return getObjectType(L)===`Blob`}function isBoolean(L){return L===!0||L===!1}function isBoundFunction(L){return isFunction(L)&&!Object.hasOwn(L,`prototype`)}function isBuffer(L){return L?.constructor?.isBuffer?.(L)??!1}function isClass(L){return isFunction(L)&&/^class(\s+|{)/.test(L.toString())}function isDataView(L){return getObjectType(L)===`DataView`}function isDate(L){return getObjectType(L)===`Date`}function isDirectInstanceOf(L,J){return L==null?!1:Object.getPrototypeOf(L)===J.prototype}function isEmptyArray(L){return isArray(L)&&L.length===0}function isEmptyMap(L){return isMap(L)&&L.size===0}function isEmptyObject(L){return isObject$3(L)&&!isMap(L)&&!isSet(L)&&Object.keys(L).length===0}function isEmptySet(L){return isSet(L)&&L.size===0}function isEmptyString(L){return isString$1(L)&&L.length===0}function isEmptyStringOrWhitespace(L){return isEmptyString(L)||isWhitespaceString(L)}function isEnumCase(L,J){return Object.values(J).includes(L)}function isError(L){return getObjectType(L)===`Error`}function isEvenInteger(L){return isAbsoluteModule2(0)(L)}function isFalsy(L){return!L}function isFloat32Array(L){return getObjectType(L)===`Float32Array`}function isFloat64Array(L){return getObjectType(L)===`Float64Array`}function isFormData(L){return getObjectType(L)===`FormData`}function isFunction(L){return typeof L==`function`}function isGenerator(L){return isIterable(L)&&isFunction(L?.next)&&isFunction(L?.throw)}function isGeneratorFunction(L){return getObjectType(L)===`GeneratorFunction`}const NODE_TYPE_ELEMENT=1,DOM_PROPERTIES_TO_CHECK=[`innerHTML`,`ownerDocument`,`style`,`attributes`,`nodeValue`];function isHtmlElement(L){return isObject$3(L)&&L.nodeType===NODE_TYPE_ELEMENT&&isString$1(L.nodeName)&&!isPlainObject$6(L)&&DOM_PROPERTIES_TO_CHECK.every(J=>J in L)}function isInfinite(L){return L===1/0||L===-1/0}function isInRange(L,J){if(isNumber(J))return L>=Math.min(0,J)&&L<=Math.max(J,0);if(isArray(J)&&J.length===2)return L>=Math.min(...J)&&L<=Math.max(...J);throw TypeError(`Invalid range: ${JSON.stringify(J)}`)}function isInt16Array(L){return getObjectType(L)===`Int16Array`}function isInt32Array(L){return getObjectType(L)===`Int32Array`}function isInt8Array(L){return getObjectType(L)===`Int8Array`}function isInteger(L){return Number.isInteger(L)}function isIterable(L){return isFunction(L?.[Symbol.iterator])}function isMap(L){return getObjectType(L)===`Map`}function isNan(L){return Number.isNaN(L)}function isNativePromise(L){return getObjectType(L)===`Promise`}function isNegativeNumber(L){return isNumber(L)&&L<0}function isNodeStream(L){return isObject$3(L)&&isFunction(L.pipe)&&!isObservable(L)}function isNonEmptyArray(L){return isArray(L)&&L.length>0}function isNonEmptyMap(L){return isMap(L)&&L.size>0}function isNonEmptyObject(L){return isObject$3(L)&&!isMap(L)&&!isSet(L)&&Object.keys(L).length>0}function isNonEmptySet(L){return isSet(L)&&L.size>0}function isNonEmptyString$2(L){return isString$1(L)&&L.length>0}function isNonEmptyStringAndNotWhitespace(L){return isString$1(L)&&!isEmptyStringOrWhitespace(L)}function isNull(L){return L===null}function isNullOrUndefined(L){return isNull(L)||isUndefined(L)}function isNumber(L){return typeof L==`number`&&!Number.isNaN(L)}function isNumericString(L){return isString$1(L)&&!isEmptyStringOrWhitespace(L)&&!Number.isNaN(Number(L))}function isObject$3(L){return!isNull(L)&&(typeof L==`object`||isFunction(L))}function isObservable(L){return L?Symbol.observable!==void 0&&L===L[Symbol.observable]?.()||L===L[`@@observable`]?.():!1}function isOddInteger(L){return isAbsoluteModule2(1)(L)}function isPlainObject$6(L){if(typeof L!=`object`||!L)return!1;let J=Object.getPrototypeOf(L);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!(Symbol.toStringTag in L)&&!(Symbol.iterator in L)}function isPositiveNumber(L){return isNumber(L)&&L>0}function isPrimitive(L){return isNull(L)||isPrimitiveTypeName(typeof L)}function isPromise(L){return isNativePromise(L)||hasPromiseApi(L)}function isPropertyKey(L){return isAny([isString$1,isNumber,isSymbol],L)}function isRegExp(L){return getObjectType(L)===`RegExp`}function isSafeInteger(L){return Number.isSafeInteger(L)}function isSet(L){return getObjectType(L)===`Set`}function isSharedArrayBuffer(L){return getObjectType(L)===`SharedArrayBuffer`}function isString$1(L){return typeof L==`string`}function isSymbol(L){return typeof L==`symbol`}function isTruthy(L){return!!L}function isTupleLike(L,J){return isArray(J)&&isArray(L)&&J.length===L.length?J.every((J,Y)=>J(L[Y])):!1}function isTypedArray(L){return isTypedArrayName(getObjectType(L))}function isUint16Array(L){return getObjectType(L)===`Uint16Array`}function isUint32Array(L){return getObjectType(L)===`Uint32Array`}function isUint8Array$2(L){return getObjectType(L)===`Uint8Array`}function isUint8ClampedArray(L){return getObjectType(L)===`Uint8ClampedArray`}function isUndefined(L){return L===void 0}function isUrlInstance(L){return getObjectType(L)===`URL`}function isUrlSearchParams(L){return getObjectType(L)===`URLSearchParams`}function isUrlString(L){if(!isString$1(L))return!1;try{return new URL(L),!0}catch{return!1}}function isValidDate(L){return isDate(L)&&!isNan(Number(L))}function isValidLength(L){return isSafeInteger(L)&&L>=0}function isWeakMap(L){return getObjectType(L)===`WeakMap`}function isWeakRef(L){return getObjectType(L)===`WeakRef`}function isWeakSet(L){return getObjectType(L)===`WeakSet`}function isWhitespaceString(L){return isString$1(L)&&/^\s+$/.test(L)}function predicateOnArray(L,J,Y){if(!isFunction(J))throw TypeError(`Invalid predicate: ${JSON.stringify(J)}`);if(Y.length===0)throw TypeError(`Invalid number of values`);return L.call(Y,J)}const andFormatter=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`}),orFormatter=new Intl.ListFormat(`en`,{style:`long`,type:`disjunction`}),methodTypeMap={isArray:`Array`,isArrayBuffer:`ArrayBuffer`,isArrayLike:`array-like`,isAsyncFunction:`AsyncFunction`,isAsyncGenerator:`AsyncGenerator`,isAsyncGeneratorFunction:`AsyncGeneratorFunction`,isAsyncIterable:`AsyncIterable`,isBigint:`bigint`,isBigInt64Array:`BigInt64Array`,isBigUint64Array:`BigUint64Array`,isBlob:`Blob`,isBoolean:`boolean`,isBoundFunction:`Function`,isBuffer:`Buffer`,isClass:`Class`,isDataView:`DataView`,isDate:`Date`,isDirectInstanceOf:`T`,isEmptyArray:`empty array`,isEmptyMap:`empty map`,isEmptyObject:`empty object`,isEmptySet:`empty set`,isEmptyString:`empty string`,isEmptyStringOrWhitespace:`empty string or whitespace`,isEnumCase:`EnumCase`,isError:`Error`,isEvenInteger:`even integer`,isFalsy:`falsy`,isFloat32Array:`Float32Array`,isFloat64Array:`Float64Array`,isFormData:`FormData`,isFunction:`Function`,isGenerator:`Generator`,isGeneratorFunction:`GeneratorFunction`,isHtmlElement:`HTMLElement`,isInfinite:`infinite number`,isInRange:`in range`,isInt16Array:`Int16Array`,isInt32Array:`Int32Array`,isInt8Array:`Int8Array`,isInteger:`integer`,isIterable:`Iterable`,isMap:`Map`,isNan:`NaN`,isNativePromise:`native Promise`,isNegativeNumber:`negative number`,isNodeStream:`Node.js Stream`,isNonEmptyArray:`non-empty array`,isNonEmptyMap:`non-empty map`,isNonEmptyObject:`non-empty object`,isNonEmptySet:`non-empty set`,isNonEmptyString:`non-empty string`,isNonEmptyStringAndNotWhitespace:`non-empty string and not whitespace`,isNull:`null`,isNullOrUndefined:`null or undefined`,isNumber:`number`,isNumericString:`string with a number`,isObject:`Object`,isObservable:`Observable`,isOddInteger:`odd integer`,isPlainObject:`plain object`,isPositiveNumber:`positive number`,isPrimitive:`primitive`,isPromise:`Promise`,isPropertyKey:`PropertyKey`,isRegExp:`RegExp`,isSafeInteger:`integer`,isSet:`Set`,isSharedArrayBuffer:`SharedArrayBuffer`,isString:`string`,isSymbol:`symbol`,isTruthy:`truthy`,isTupleLike:`tuple-like`,isTypedArray:`TypedArray`,isUint16Array:`Uint16Array`,isUint32Array:`Uint32Array`,isUint8Array:`Uint8Array`,isUint8ClampedArray:`Uint8ClampedArray`,isUndefined:`undefined`,isUrlInstance:`URL`,isUrlSearchParams:`URLSearchParams`,isUrlString:`string with a URL`,isValidDate:`valid Date`,isValidLength:`valid length`,isWeakMap:`WeakMap`,isWeakRef:`WeakRef`,isWeakSet:`WeakSet`,isWhitespaceString:`whitespace string`},isMethodNames=keysOf(methodTypeMap);var require_array$1=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.splitWhen=L.flatten=void 0;function J(L){return L.reduce((L,J)=>[].concat(L,J),[])}L.flatten=J;function Y(L,J){let Y=[[]],X=0;for(let Z of L)J(Z)?(X++,Y[X]=[]):Y[X].push(Z);return Y}L.splitWhen=Y})),require_errno=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.isEnoentCodeError=void 0;function J(L){return L.code===`ENOENT`}L.isEnoentCodeError=J})),require_fs$3=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.createDirentFromStats=void 0;var J=class{constructor(L,J){this.name=L,this.isBlockDevice=J.isBlockDevice.bind(J),this.isCharacterDevice=J.isCharacterDevice.bind(J),this.isDirectory=J.isDirectory.bind(J),this.isFIFO=J.isFIFO.bind(J),this.isFile=J.isFile.bind(J),this.isSocket=J.isSocket.bind(J),this.isSymbolicLink=J.isSymbolicLink.bind(J)}};function Y(L,Y){return new J(L,Y)}L.createDirentFromStats=Y})),require_path=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.convertPosixPathToPattern=L.convertWindowsPathToPattern=L.convertPathToPattern=L.escapePosixPath=L.escapeWindowsPath=L.escape=L.removeLeadingDotSegment=L.makeAbsolute=L.unixify=void 0;let J=__require$1(`os`),Y=__require$1(`path`),X=J.platform()===`win32`,Z=2,Q=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,$=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,ee=/^\\\\([.?])/,te=/\\(?![!()+@[\]{}])/g;function ne(L){return L.replace(/\\/g,`/`)}L.unixify=ne;function re(L,J){return Y.resolve(L,J)}L.makeAbsolute=re;function ie(L){if(L.charAt(0)===`.`){let J=L.charAt(1);if(J===`/`||J===`\\`)return L.slice(2)}return L}L.removeLeadingDotSegment=ie,L.escape=X?ae:oe;function ae(L){return L.replace($,`\\$2`)}L.escapeWindowsPath=ae;function oe(L){return L.replace(Q,`\\$2`)}L.escapePosixPath=oe,L.convertPathToPattern=X?se:ce;function se(L){return ae(L).replace(ee,`//$1`).replace(te,`/`)}L.convertWindowsPathToPattern=se;function ce(L){return oe(L)}L.convertPosixPathToPattern=ce})),require_is_extglob=__commonJSMin(((L,J)=>{
122
122
  /*!
123
123
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
124
124
  *
@@ -290,11 +290,11 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
290
290
 
291
291
  `)}J.write(`payload.value = newResult;`),J.write(`return payload;`);let ee=J.compile();return(J,Y)=>ee(L,J,Y)},Q,$=isObject$2,ee=!globalConfig.jitless,te=ee&&allowsEval.value,ne=J.catchall,re;L._zod.parse=(ie,ae)=>{re??=X.value;let oe=ie.value;return $(oe)?ee&&te&&ae?.async===!1&&ae.jitless!==!0?(Q||=Z(J.shape),ie=Q(ie,ae),ne?handleCatchall([],oe,ie,ae,re,L):ie):Y(ie,ae):(ie.issues.push({expected:`object`,code:`invalid_type`,input:oe,inst:L}),ie)}});function handleUnionResults(L,J,Y,X){for(let Y of L)if(Y.issues.length===0)return J.value=Y.value,J;let Z=L.filter(L=>!aborted(L));return Z.length===1?(J.value=Z[0].value,Z[0]):(J.issues.push({code:`invalid_union`,input:J.value,inst:Y,errors:L.map(L=>L.issues.map(L=>finalizeIssue(L,X,config())))}),J)}const $ZodUnion=$constructor(`$ZodUnion`,(L,J)=>{$ZodType.init(L,J),defineLazy(L._zod,`optin`,()=>J.options.some(L=>L._zod.optin===`optional`)?`optional`:void 0),defineLazy(L._zod,`optout`,()=>J.options.some(L=>L._zod.optout===`optional`)?`optional`:void 0),defineLazy(L._zod,`values`,()=>{if(J.options.every(L=>L._zod.values))return new Set(J.options.flatMap(L=>Array.from(L._zod.values)))}),defineLazy(L._zod,`pattern`,()=>{if(J.options.every(L=>L._zod.pattern)){let L=J.options.map(L=>L._zod.pattern);return RegExp(`^(${L.map(L=>cleanRegex(L.source)).join(`|`)})$`)}});let Y=J.options.length===1,X=J.options[0]._zod.run;L._zod.parse=(Z,Q)=>{if(Y)return X(Z,Q);let $=!1,ee=[];for(let L of J.options){let J=L._zod.run({value:Z.value,issues:[]},Q);if(J instanceof Promise)ee.push(J),$=!0;else{if(J.issues.length===0)return J;ee.push(J)}}return $?Promise.all(ee).then(J=>handleUnionResults(J,Z,L,Q)):handleUnionResults(ee,Z,L,Q)}}),$ZodIntersection=$constructor(`$ZodIntersection`,(L,J)=>{$ZodType.init(L,J),L._zod.parse=(L,Y)=>{let X=L.value,Z=J.left._zod.run({value:X,issues:[]},Y),Q=J.right._zod.run({value:X,issues:[]},Y);return Z instanceof Promise||Q instanceof Promise?Promise.all([Z,Q]).then(([J,Y])=>handleIntersectionResults(L,J,Y)):handleIntersectionResults(L,Z,Q)}});function mergeValues(L,J){if(L===J||L instanceof Date&&J instanceof Date&&+L==+J)return{valid:!0,data:L};if(isPlainObject$5(L)&&isPlainObject$5(J)){let Y=Object.keys(J),X=Object.keys(L).filter(L=>Y.indexOf(L)!==-1),Z={...L,...J};for(let Y of X){let X=mergeValues(L[Y],J[Y]);if(!X.valid)return{valid:!1,mergeErrorPath:[Y,...X.mergeErrorPath]};Z[Y]=X.data}return{valid:!0,data:Z}}if(Array.isArray(L)&&Array.isArray(J)){if(L.length!==J.length)return{valid:!1,mergeErrorPath:[]};let Y=[];for(let X=0;X<L.length;X++){let Z=L[X],Q=J[X],$=mergeValues(Z,Q);if(!$.valid)return{valid:!1,mergeErrorPath:[X,...$.mergeErrorPath]};Y.push($.data)}return{valid:!0,data:Y}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(L,J,Y){let X=new Map,Z;for(let Y of J.issues)if(Y.code===`unrecognized_keys`){Z??=Y;for(let L of Y.keys)X.has(L)||X.set(L,{}),X.get(L).l=!0}else L.issues.push(Y);for(let J of Y.issues)if(J.code===`unrecognized_keys`)for(let L of J.keys)X.has(L)||X.set(L,{}),X.get(L).r=!0;else L.issues.push(J);let Q=[...X].filter(([,L])=>L.l&&L.r).map(([L])=>L);if(Q.length&&Z&&L.issues.push({...Z,keys:Q}),aborted(L))return L;let $=mergeValues(J.value,Y.value);if(!$.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify($.mergeErrorPath)}`);return L.value=$.data,L}const $ZodRecord=$constructor(`$ZodRecord`,(L,J)=>{$ZodType.init(L,J),L._zod.parse=(Y,X)=>{let Z=Y.value;if(!isPlainObject$5(Z))return Y.issues.push({expected:`record`,code:`invalid_type`,input:Z,inst:L}),Y;let Q=[],$=J.keyType._zod.values;if($){Y.value={};let ee=new Set;for(let L of $)if(typeof L==`string`||typeof L==`number`||typeof L==`symbol`){ee.add(typeof L==`number`?L.toString():L);let $=J.valueType._zod.run({value:Z[L],issues:[]},X);$ instanceof Promise?Q.push($.then(J=>{J.issues.length&&Y.issues.push(...prefixIssues(L,J.issues)),Y.value[L]=J.value})):($.issues.length&&Y.issues.push(...prefixIssues(L,$.issues)),Y.value[L]=$.value)}let te;for(let L in Z)ee.has(L)||(te??=[],te.push(L));te&&te.length>0&&Y.issues.push({code:`unrecognized_keys`,input:Z,inst:L,keys:te})}else{Y.value={};for(let $ of Reflect.ownKeys(Z)){if($===`__proto__`)continue;let ee=J.keyType._zod.run({value:$,issues:[]},X);if(ee instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof $==`string`&&number$1.test($)&&ee.issues.length){let L=J.keyType._zod.run({value:Number($),issues:[]},X);if(L instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);L.issues.length===0&&(ee=L)}if(ee.issues.length){J.mode===`loose`?Y.value[$]=Z[$]:Y.issues.push({code:`invalid_key`,origin:`record`,issues:ee.issues.map(L=>finalizeIssue(L,X,config())),input:$,path:[$],inst:L});continue}let te=J.valueType._zod.run({value:Z[$],issues:[]},X);te instanceof Promise?Q.push(te.then(L=>{L.issues.length&&Y.issues.push(...prefixIssues($,L.issues)),Y.value[ee.value]=L.value})):(te.issues.length&&Y.issues.push(...prefixIssues($,te.issues)),Y.value[ee.value]=te.value)}}return Q.length?Promise.all(Q).then(()=>Y):Y}}),$ZodEnum=$constructor(`$ZodEnum`,(L,J)=>{$ZodType.init(L,J);let Y=getEnumValues(J.entries),X=new Set(Y);L._zod.values=X,L._zod.pattern=RegExp(`^(${Y.filter(L=>propertyKeyTypes.has(typeof L)).map(L=>typeof L==`string`?escapeRegex(L):L.toString()).join(`|`)})$`),L._zod.parse=(J,Z)=>{let Q=J.value;return X.has(Q)||J.issues.push({code:`invalid_value`,values:Y,input:Q,inst:L}),J}}),$ZodTransform=$constructor(`$ZodTransform`,(L,J)=>{$ZodType.init(L,J),L._zod.parse=(Y,X)=>{if(X.direction===`backward`)throw new $ZodEncodeError(L.constructor.name);let Z=J.transform(Y.value,Y);if(X.async)return(Z instanceof Promise?Z:Promise.resolve(Z)).then(L=>(Y.value=L,Y));if(Z instanceof Promise)throw new $ZodAsyncError;return Y.value=Z,Y}});function handleOptionalResult(L,J){return L.issues.length&&J===void 0?{issues:[],value:void 0}:L}const $ZodOptional=$constructor(`$ZodOptional`,(L,J)=>{$ZodType.init(L,J),L._zod.optin=`optional`,L._zod.optout=`optional`,defineLazy(L._zod,`values`,()=>J.innerType._zod.values?new Set([...J.innerType._zod.values,void 0]):void 0),defineLazy(L._zod,`pattern`,()=>{let L=J.innerType._zod.pattern;return L?RegExp(`^(${cleanRegex(L.source)})?$`):void 0}),L._zod.parse=(L,Y)=>{if(J.innerType._zod.optin===`optional`){let X=J.innerType._zod.run(L,Y);return X instanceof Promise?X.then(J=>handleOptionalResult(J,L.value)):handleOptionalResult(X,L.value)}return L.value===void 0?L:J.innerType._zod.run(L,Y)}}),$ZodExactOptional=$constructor(`$ZodExactOptional`,(L,J)=>{$ZodOptional.init(L,J),defineLazy(L._zod,`values`,()=>J.innerType._zod.values),defineLazy(L._zod,`pattern`,()=>J.innerType._zod.pattern),L._zod.parse=(L,Y)=>J.innerType._zod.run(L,Y)}),$ZodNullable=$constructor(`$ZodNullable`,(L,J)=>{$ZodType.init(L,J),defineLazy(L._zod,`optin`,()=>J.innerType._zod.optin),defineLazy(L._zod,`optout`,()=>J.innerType._zod.optout),defineLazy(L._zod,`pattern`,()=>{let L=J.innerType._zod.pattern;return L?RegExp(`^(${cleanRegex(L.source)}|null)$`):void 0}),defineLazy(L._zod,`values`,()=>J.innerType._zod.values?new Set([...J.innerType._zod.values,null]):void 0),L._zod.parse=(L,Y)=>L.value===null?L:J.innerType._zod.run(L,Y)}),$ZodDefault=$constructor(`$ZodDefault`,(L,J)=>{$ZodType.init(L,J),L._zod.optin=`optional`,defineLazy(L._zod,`values`,()=>J.innerType._zod.values),L._zod.parse=(L,Y)=>{if(Y.direction===`backward`)return J.innerType._zod.run(L,Y);if(L.value===void 0)return L.value=J.defaultValue,L;let X=J.innerType._zod.run(L,Y);return X instanceof Promise?X.then(L=>handleDefaultResult(L,J)):handleDefaultResult(X,J)}});function handleDefaultResult(L,J){return L.value===void 0&&(L.value=J.defaultValue),L}const $ZodPrefault=$constructor(`$ZodPrefault`,(L,J)=>{$ZodType.init(L,J),L._zod.optin=`optional`,defineLazy(L._zod,`values`,()=>J.innerType._zod.values),L._zod.parse=(L,Y)=>(Y.direction===`backward`||L.value===void 0&&(L.value=J.defaultValue),J.innerType._zod.run(L,Y))}),$ZodNonOptional=$constructor(`$ZodNonOptional`,(L,J)=>{$ZodType.init(L,J),defineLazy(L._zod,`values`,()=>{let L=J.innerType._zod.values;return L?new Set([...L].filter(L=>L!==void 0)):void 0}),L._zod.parse=(Y,X)=>{let Z=J.innerType._zod.run(Y,X);return Z instanceof Promise?Z.then(J=>handleNonOptionalResult(J,L)):handleNonOptionalResult(Z,L)}});function handleNonOptionalResult(L,J){return!L.issues.length&&L.value===void 0&&L.issues.push({code:`invalid_type`,expected:`nonoptional`,input:L.value,inst:J}),L}const $ZodCatch=$constructor(`$ZodCatch`,(L,J)=>{$ZodType.init(L,J),defineLazy(L._zod,`optin`,()=>J.innerType._zod.optin),defineLazy(L._zod,`optout`,()=>J.innerType._zod.optout),defineLazy(L._zod,`values`,()=>J.innerType._zod.values),L._zod.parse=(L,Y)=>{if(Y.direction===`backward`)return J.innerType._zod.run(L,Y);let X=J.innerType._zod.run(L,Y);return X instanceof Promise?X.then(X=>(L.value=X.value,X.issues.length&&(L.value=J.catchValue({...L,error:{issues:X.issues.map(L=>finalizeIssue(L,Y,config()))},input:L.value}),L.issues=[]),L)):(L.value=X.value,X.issues.length&&(L.value=J.catchValue({...L,error:{issues:X.issues.map(L=>finalizeIssue(L,Y,config()))},input:L.value}),L.issues=[]),L)}}),$ZodPipe=$constructor(`$ZodPipe`,(L,J)=>{$ZodType.init(L,J),defineLazy(L._zod,`values`,()=>J.in._zod.values),defineLazy(L._zod,`optin`,()=>J.in._zod.optin),defineLazy(L._zod,`optout`,()=>J.out._zod.optout),defineLazy(L._zod,`propValues`,()=>J.in._zod.propValues),L._zod.parse=(L,Y)=>{if(Y.direction===`backward`){let X=J.out._zod.run(L,Y);return X instanceof Promise?X.then(L=>handlePipeResult(L,J.in,Y)):handlePipeResult(X,J.in,Y)}let X=J.in._zod.run(L,Y);return X instanceof Promise?X.then(L=>handlePipeResult(L,J.out,Y)):handlePipeResult(X,J.out,Y)}});function handlePipeResult(L,J,Y){return L.issues.length?(L.aborted=!0,L):J._zod.run({value:L.value,issues:L.issues},Y)}const $ZodReadonly=$constructor(`$ZodReadonly`,(L,J)=>{$ZodType.init(L,J),defineLazy(L._zod,`propValues`,()=>J.innerType._zod.propValues),defineLazy(L._zod,`values`,()=>J.innerType._zod.values),defineLazy(L._zod,`optin`,()=>J.innerType?._zod?.optin),defineLazy(L._zod,`optout`,()=>J.innerType?._zod?.optout),L._zod.parse=(L,Y)=>{if(Y.direction===`backward`)return J.innerType._zod.run(L,Y);let X=J.innerType._zod.run(L,Y);return X instanceof Promise?X.then(handleReadonlyResult):handleReadonlyResult(X)}});function handleReadonlyResult(L){return L.value=Object.freeze(L.value),L}const $ZodCustom=$constructor(`$ZodCustom`,(L,J)=>{$ZodCheck.init(L,J),$ZodType.init(L,J),L._zod.parse=(L,J)=>L,L._zod.check=Y=>{let X=Y.value,Z=J.fn(X);if(Z instanceof Promise)return Z.then(J=>handleRefineResult(J,Y,X,L));handleRefineResult(Z,Y,X,L)}});function handleRefineResult(L,J,Y,X){if(!L){let L={code:`custom`,input:Y,inst:X,path:[...X._zod.def.path??[]],continue:!X._zod.def.abort};X._zod.def.params&&(L.params=X._zod.def.params),J.issues.push(issue(L))}}var _a$1,$ZodRegistry=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(L,...J){let Y=J[0];return this._map.set(L,Y),Y&&typeof Y==`object`&&`id`in Y&&this._idmap.set(Y.id,L),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(L){let J=this._map.get(L);return J&&typeof J==`object`&&`id`in J&&this._idmap.delete(J.id),this._map.delete(L),this}get(L){let J=L._zod.parent;if(J){let Y={...this.get(J)??{}};delete Y.id;let X={...Y,...this._map.get(L)};return Object.keys(X).length?X:void 0}return this._map.get(L)}has(L){return this._map.has(L)}};function registry(){return new $ZodRegistry}(_a$1=globalThis).__zod_globalRegistry??(_a$1.__zod_globalRegistry=registry());const globalRegistry=globalThis.__zod_globalRegistry;function _string(L,J){return new L({type:`string`,...normalizeParams(J)})}function _email(L,J){return new L({type:`string`,format:`email`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _guid(L,J){return new L({type:`string`,format:`guid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _uuid(L,J){return new L({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _uuidv4(L,J){return new L({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...normalizeParams(J)})}function _uuidv6(L,J){return new L({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...normalizeParams(J)})}function _uuidv7(L,J){return new L({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...normalizeParams(J)})}function _url(L,J){return new L({type:`string`,format:`url`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _emoji(L,J){return new L({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _nanoid(L,J){return new L({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _cuid(L,J){return new L({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _cuid2(L,J){return new L({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _ulid(L,J){return new L({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _xid(L,J){return new L({type:`string`,format:`xid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _ksuid(L,J){return new L({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _ipv4(L,J){return new L({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _ipv6(L,J){return new L({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _cidrv4(L,J){return new L({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _cidrv6(L,J){return new L({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _base64(L,J){return new L({type:`string`,format:`base64`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _base64url(L,J){return new L({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _e164(L,J){return new L({type:`string`,format:`e164`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _jwt(L,J){return new L({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...normalizeParams(J)})}function _isoDateTime(L,J){return new L({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...normalizeParams(J)})}function _isoDate(L,J){return new L({type:`string`,format:`date`,check:`string_format`,...normalizeParams(J)})}function _isoTime(L,J){return new L({type:`string`,format:`time`,check:`string_format`,precision:null,...normalizeParams(J)})}function _isoDuration(L,J){return new L({type:`string`,format:`duration`,check:`string_format`,...normalizeParams(J)})}function _number(L,J){return new L({type:`number`,checks:[],...normalizeParams(J)})}function _int(L,J){return new L({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...normalizeParams(J)})}function _boolean(L,J){return new L({type:`boolean`,...normalizeParams(J)})}function _unknown(L){return new L({type:`unknown`})}function _never(L,J){return new L({type:`never`,...normalizeParams(J)})}function _lt(L,J){return new $ZodCheckLessThan({check:`less_than`,...normalizeParams(J),value:L,inclusive:!1})}function _lte(L,J){return new $ZodCheckLessThan({check:`less_than`,...normalizeParams(J),value:L,inclusive:!0})}function _gt(L,J){return new $ZodCheckGreaterThan({check:`greater_than`,...normalizeParams(J),value:L,inclusive:!1})}function _gte(L,J){return new $ZodCheckGreaterThan({check:`greater_than`,...normalizeParams(J),value:L,inclusive:!0})}function _multipleOf(L,J){return new $ZodCheckMultipleOf({check:`multiple_of`,...normalizeParams(J),value:L})}function _maxLength(L,J){return new $ZodCheckMaxLength({check:`max_length`,...normalizeParams(J),maximum:L})}function _minLength(L,J){return new $ZodCheckMinLength({check:`min_length`,...normalizeParams(J),minimum:L})}function _length(L,J){return new $ZodCheckLengthEquals({check:`length_equals`,...normalizeParams(J),length:L})}function _regex(L,J){return new $ZodCheckRegex({check:`string_format`,format:`regex`,...normalizeParams(J),pattern:L})}function _lowercase(L){return new $ZodCheckLowerCase({check:`string_format`,format:`lowercase`,...normalizeParams(L)})}function _uppercase(L){return new $ZodCheckUpperCase({check:`string_format`,format:`uppercase`,...normalizeParams(L)})}function _includes(L,J){return new $ZodCheckIncludes({check:`string_format`,format:`includes`,...normalizeParams(J),includes:L})}function _startsWith(L,J){return new $ZodCheckStartsWith({check:`string_format`,format:`starts_with`,...normalizeParams(J),prefix:L})}function _endsWith(L,J){return new $ZodCheckEndsWith({check:`string_format`,format:`ends_with`,...normalizeParams(J),suffix:L})}function _overwrite(L){return new $ZodCheckOverwrite({check:`overwrite`,tx:L})}function _normalize(L){return _overwrite(J=>J.normalize(L))}function _trim(){return _overwrite(L=>L.trim())}function _toLowerCase(){return _overwrite(L=>L.toLowerCase())}function _toUpperCase(){return _overwrite(L=>L.toUpperCase())}function _slugify(){return _overwrite(L=>slugify(L))}function _array(L,J,Y){return new L({type:`array`,element:J,...normalizeParams(Y)})}function _refine(L,J,Y){return new L({type:`custom`,check:`custom`,fn:J,...normalizeParams(Y)})}function _superRefine(L){let J=_check(Y=>(Y.addIssue=L=>{if(typeof L==`string`)Y.issues.push(issue(L,Y.value,J._zod.def));else{let X=L;X.fatal&&(X.continue=!1),X.code??=`custom`,X.input??=Y.value,X.inst??=J,X.continue??=!J._zod.def.abort,Y.issues.push(issue(X))}},L(Y.value,Y)));return J}function _check(L,J){let Y=new $ZodCheck({check:`custom`,...normalizeParams(J)});return Y._zod.check=L,Y}function describe$1(L){let J=new $ZodCheck({check:`describe`});return J._zod.onattach=[J=>{let Y=globalRegistry.get(J)??{};globalRegistry.add(J,{...Y,description:L})}],J._zod.check=()=>{},J}function meta$1(L){let J=new $ZodCheck({check:`meta`});return J._zod.onattach=[J=>{let Y=globalRegistry.get(J)??{};globalRegistry.add(J,{...Y,...L})}],J._zod.check=()=>{},J}function initializeContext(L){let J=L?.target??`draft-2020-12`;return J===`draft-4`&&(J=`draft-04`),J===`draft-7`&&(J=`draft-07`),{processors:L.processors??{},metadataRegistry:L?.metadata??globalRegistry,target:J,unrepresentable:L?.unrepresentable??`throw`,override:L?.override??(()=>{}),io:L?.io??`output`,counter:0,seen:new Map,cycles:L?.cycles??`ref`,reused:L?.reused??`inline`,external:L?.external??void 0}}function process$2(L,J,Y={path:[],schemaPath:[]}){var X;let Z=L._zod.def,Q=J.seen.get(L);if(Q)return Q.count++,Y.schemaPath.includes(L)&&(Q.cycle=Y.path),Q.schema;let $={schema:{},count:1,cycle:void 0,path:Y.path};J.seen.set(L,$);let ee=L._zod.toJSONSchema?.();if(ee)$.schema=ee;else{let X={...Y,schemaPath:[...Y.schemaPath,L],path:Y.path};if(L._zod.processJSONSchema)L._zod.processJSONSchema(J,$.schema,X);else{let Y=$.schema,Q=J.processors[Z.type];if(!Q)throw Error(`[toJSONSchema]: Non-representable type encountered: ${Z.type}`);Q(L,J,Y,X)}let Q=L._zod.parent;Q&&($.ref||=Q,process$2(Q,J,X),J.seen.get(Q).isParent=!0)}let te=J.metadataRegistry.get(L);return te&&Object.assign($.schema,te),J.io===`input`&&isTransforming(L)&&(delete $.schema.examples,delete $.schema.default),J.io===`input`&&$.schema._prefault&&((X=$.schema).default??(X.default=$.schema._prefault)),delete $.schema._prefault,J.seen.get(L).schema}function extractDefs(L,J){let Y=L.seen.get(J);if(!Y)throw Error(`Unprocessed schema. This is a bug in Zod.`);let X=new Map;for(let J of L.seen.entries()){let Y=L.metadataRegistry.get(J[0])?.id;if(Y){let L=X.get(Y);if(L&&L!==J[0])throw Error(`Duplicate schema id "${Y}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);X.set(Y,J[0])}}let Z=J=>{let X=L.target===`draft-2020-12`?`$defs`:`definitions`;if(L.external){let Y=L.external.registry.get(J[0])?.id,Z=L.external.uri??(L=>L);if(Y)return{ref:Z(Y)};let Q=J[1].defId??J[1].schema.id??`schema${L.counter++}`;return J[1].defId=Q,{defId:Q,ref:`${Z(`__shared`)}#/${X}/${Q}`}}if(J[1]===Y)return{ref:`#`};let Z=`#/${X}/`,Q=J[1].schema.id??`__schema${L.counter++}`;return{defId:Q,ref:Z+Q}},Q=L=>{if(L[1].schema.$ref)return;let J=L[1],{ref:Y,defId:X}=Z(L);J.def={...J.schema},X&&(J.defId=X);let Q=J.schema;for(let L in Q)delete Q[L];Q.$ref=Y};if(L.cycles===`throw`)for(let J of L.seen.entries()){let L=J[1];if(L.cycle)throw Error(`Cycle detected: #/${L.cycle?.join(`/`)}/<root>
292
292
 
293
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Y of L.seen.entries()){let X=Y[1];if(J===Y[0]){Q(Y);continue}if(L.external){let X=L.external.registry.get(Y[0])?.id;if(J!==Y[0]&&X){Q(Y);continue}}if(L.metadataRegistry.get(Y[0])?.id){Q(Y);continue}if(X.cycle){Q(Y);continue}if(X.count>1&&L.reused===`ref`){Q(Y);continue}}}function finalize(L,J){let Y=L.seen.get(J);if(!Y)throw Error(`Unprocessed schema. This is a bug in Zod.`);let X=J=>{let Y=L.seen.get(J);if(Y.ref===null)return;let Z=Y.def??Y.schema,Q={...Z},$=Y.ref;if(Y.ref=null,$){X($);let Y=L.seen.get($),ee=Y.schema;if(ee.$ref&&(L.target===`draft-07`||L.target===`draft-04`||L.target===`openapi-3.0`)?(Z.allOf=Z.allOf??[],Z.allOf.push(ee)):Object.assign(Z,ee),Object.assign(Z,Q),J._zod.parent===$)for(let L in Z)L===`$ref`||L===`allOf`||L in Q||delete Z[L];if(ee.$ref&&Y.def)for(let L in Z)L===`$ref`||L===`allOf`||L in Y.def&&JSON.stringify(Z[L])===JSON.stringify(Y.def[L])&&delete Z[L]}let ee=J._zod.parent;if(ee&&ee!==$){X(ee);let J=L.seen.get(ee);if(J?.schema.$ref&&(Z.$ref=J.schema.$ref,J.def))for(let L in Z)L===`$ref`||L===`allOf`||L in J.def&&JSON.stringify(Z[L])===JSON.stringify(J.def[L])&&delete Z[L]}L.override({zodSchema:J,jsonSchema:Z,path:Y.path??[]})};for(let J of[...L.seen.entries()].reverse())X(J[0]);let Z={};if(L.target===`draft-2020-12`?Z.$schema=`https://json-schema.org/draft/2020-12/schema`:L.target===`draft-07`?Z.$schema=`http://json-schema.org/draft-07/schema#`:L.target===`draft-04`?Z.$schema=`http://json-schema.org/draft-04/schema#`:L.target,L.external?.uri){let Y=L.external.registry.get(J)?.id;if(!Y)throw Error("Schema is missing an `id` property");Z.$id=L.external.uri(Y)}Object.assign(Z,Y.def??Y.schema);let Q=L.external?.defs??{};for(let J of L.seen.entries()){let L=J[1];L.def&&L.defId&&(Q[L.defId]=L.def)}L.external||Object.keys(Q).length>0&&(L.target===`draft-2020-12`?Z.$defs=Q:Z.definitions=Q);try{let Y=JSON.parse(JSON.stringify(Z));return Object.defineProperty(Y,`~standard`,{value:{...J[`~standard`],jsonSchema:{input:createStandardJSONSchemaMethod(J,`input`,L.processors),output:createStandardJSONSchemaMethod(J,`output`,L.processors)}},enumerable:!1,writable:!1}),Y}catch{throw Error(`Error converting schema to JSON.`)}}function isTransforming(L,J){let Y=J??{seen:new Set};if(Y.seen.has(L))return!1;Y.seen.add(L);let X=L._zod.def;if(X.type===`transform`)return!0;if(X.type===`array`)return isTransforming(X.element,Y);if(X.type===`set`)return isTransforming(X.valueType,Y);if(X.type===`lazy`)return isTransforming(X.getter(),Y);if(X.type===`promise`||X.type===`optional`||X.type===`nonoptional`||X.type===`nullable`||X.type===`readonly`||X.type===`default`||X.type===`prefault`)return isTransforming(X.innerType,Y);if(X.type===`intersection`)return isTransforming(X.left,Y)||isTransforming(X.right,Y);if(X.type===`record`||X.type===`map`)return isTransforming(X.keyType,Y)||isTransforming(X.valueType,Y);if(X.type===`pipe`)return isTransforming(X.in,Y)||isTransforming(X.out,Y);if(X.type===`object`){for(let L in X.shape)if(isTransforming(X.shape[L],Y))return!0;return!1}if(X.type===`union`){for(let L of X.options)if(isTransforming(L,Y))return!0;return!1}if(X.type===`tuple`){for(let L of X.items)if(isTransforming(L,Y))return!0;return!!(X.rest&&isTransforming(X.rest,Y))}return!1}const createToJSONSchemaMethod=(L,J={})=>Y=>{let X=initializeContext({...Y,processors:J});return process$2(L,X),extractDefs(X,L),finalize(X,L)},createStandardJSONSchemaMethod=(L,J,Y={})=>X=>{let{libraryOptions:Z,target:Q}=X??{},$=initializeContext({...Z??{},target:Q,io:J,processors:Y});return process$2(L,$),extractDefs($,L),finalize($,L)},formatMap={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},stringProcessor=(L,J,Y,X)=>{let Z=Y;Z.type=`string`;let{minimum:Q,maximum:$,format:ee,patterns:te,contentEncoding:ne}=L._zod.bag;if(typeof Q==`number`&&(Z.minLength=Q),typeof $==`number`&&(Z.maxLength=$),ee&&(Z.format=formatMap[ee]??ee,Z.format===``&&delete Z.format,ee===`time`&&delete Z.format),ne&&(Z.contentEncoding=ne),te&&te.size>0){let L=[...te];L.length===1?Z.pattern=L[0].source:L.length>1&&(Z.allOf=[...L.map(L=>({...J.target===`draft-07`||J.target===`draft-04`||J.target===`openapi-3.0`?{type:`string`}:{},pattern:L.source}))])}},numberProcessor=(L,J,Y,X)=>{let Z=Y,{minimum:Q,maximum:$,format:ee,multipleOf:te,exclusiveMaximum:ne,exclusiveMinimum:re}=L._zod.bag;typeof ee==`string`&&ee.includes(`int`)?Z.type=`integer`:Z.type=`number`,typeof re==`number`&&(J.target===`draft-04`||J.target===`openapi-3.0`?(Z.minimum=re,Z.exclusiveMinimum=!0):Z.exclusiveMinimum=re),typeof Q==`number`&&(Z.minimum=Q,typeof re==`number`&&J.target!==`draft-04`&&(re>=Q?delete Z.minimum:delete Z.exclusiveMinimum)),typeof ne==`number`&&(J.target===`draft-04`||J.target===`openapi-3.0`?(Z.maximum=ne,Z.exclusiveMaximum=!0):Z.exclusiveMaximum=ne),typeof $==`number`&&(Z.maximum=$,typeof ne==`number`&&J.target!==`draft-04`&&(ne<=$?delete Z.maximum:delete Z.exclusiveMaximum)),typeof te==`number`&&(Z.multipleOf=te)},booleanProcessor=(L,J,Y,X)=>{Y.type=`boolean`},neverProcessor=(L,J,Y,X)=>{Y.not={}},unknownProcessor=(L,J,Y,X)=>{},enumProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=getEnumValues(Z.entries);Q.every(L=>typeof L==`number`)&&(Y.type=`number`),Q.every(L=>typeof L==`string`)&&(Y.type=`string`),Y.enum=Q},customProcessor=(L,J,Y,X)=>{if(J.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},transformProcessor=(L,J,Y,X)=>{if(J.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},arrayProcessor=(L,J,Y,X)=>{let Z=Y,Q=L._zod.def,{minimum:$,maximum:ee}=L._zod.bag;typeof $==`number`&&(Z.minItems=$),typeof ee==`number`&&(Z.maxItems=ee),Z.type=`array`,Z.items=process$2(Q.element,J,{...X,path:[...X.path,`items`]})},objectProcessor=(L,J,Y,X)=>{let Z=Y,Q=L._zod.def;Z.type=`object`,Z.properties={};let $=Q.shape;for(let L in $)Z.properties[L]=process$2($[L],J,{...X,path:[...X.path,`properties`,L]});let ee=new Set(Object.keys($)),te=new Set([...ee].filter(L=>{let Y=Q.shape[L]._zod;return J.io===`input`?Y.optin===void 0:Y.optout===void 0}));te.size>0&&(Z.required=Array.from(te)),Q.catchall?._zod.def.type===`never`?Z.additionalProperties=!1:Q.catchall?Q.catchall&&(Z.additionalProperties=process$2(Q.catchall,J,{...X,path:[...X.path,`additionalProperties`]})):J.io===`output`&&(Z.additionalProperties=!1)},unionProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=Z.inclusive===!1,$=Z.options.map((L,Y)=>process$2(L,J,{...X,path:[...X.path,Q?`oneOf`:`anyOf`,Y]}));Q?Y.oneOf=$:Y.anyOf=$},intersectionProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=process$2(Z.left,J,{...X,path:[...X.path,`allOf`,0]}),$=process$2(Z.right,J,{...X,path:[...X.path,`allOf`,1]}),ee=L=>`allOf`in L&&Object.keys(L).length===1;Y.allOf=[...ee(Q)?Q.allOf:[Q],...ee($)?$.allOf:[$]]},recordProcessor=(L,J,Y,X)=>{let Z=Y,Q=L._zod.def;Z.type=`object`;let $=Q.keyType,ee=$._zod.bag?.patterns;if(Q.mode===`loose`&&ee&&ee.size>0){let L=process$2(Q.valueType,J,{...X,path:[...X.path,`patternProperties`,`*`]});Z.patternProperties={};for(let J of ee)Z.patternProperties[J.source]=L}else (J.target===`draft-07`||J.target===`draft-2020-12`)&&(Z.propertyNames=process$2(Q.keyType,J,{...X,path:[...X.path,`propertyNames`]})),Z.additionalProperties=process$2(Q.valueType,J,{...X,path:[...X.path,`additionalProperties`]});let te=$._zod.values;if(te){let L=[...te].filter(L=>typeof L==`string`||typeof L==`number`);L.length>0&&(Z.required=L)}},nullableProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=process$2(Z.innerType,J,X),$=J.seen.get(L);J.target===`openapi-3.0`?($.ref=Z.innerType,Y.nullable=!0):Y.anyOf=[Q,{type:`null`}]},nonoptionalProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType},defaultProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType,Y.default=JSON.parse(JSON.stringify(Z.defaultValue))},prefaultProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType,J.io===`input`&&(Y._prefault=JSON.parse(JSON.stringify(Z.defaultValue)))},catchProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType;let $;try{$=Z.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}Y.default=$},pipeProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=J.io===`input`?Z.in._zod.def.type===`transform`?Z.out:Z.in:Z.out;process$2(Q,J,X);let $=J.seen.get(L);$.ref=Q},readonlyProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType,Y.readOnly=!0},optionalProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType},ZodISODateTime=$constructor(`ZodISODateTime`,(L,J)=>{$ZodISODateTime.init(L,J),ZodStringFormat.init(L,J)});function datetime(L){return _isoDateTime(ZodISODateTime,L)}const ZodISODate=$constructor(`ZodISODate`,(L,J)=>{$ZodISODate.init(L,J),ZodStringFormat.init(L,J)});function date(L){return _isoDate(ZodISODate,L)}const ZodISOTime=$constructor(`ZodISOTime`,(L,J)=>{$ZodISOTime.init(L,J),ZodStringFormat.init(L,J)});function time(L){return _isoTime(ZodISOTime,L)}const ZodISODuration=$constructor(`ZodISODuration`,(L,J)=>{$ZodISODuration.init(L,J),ZodStringFormat.init(L,J)});function duration(L){return _isoDuration(ZodISODuration,L)}const initializer=(L,J)=>{$ZodError.init(L,J),L.name=`ZodError`,Object.defineProperties(L,{format:{value:J=>formatError(L,J)},flatten:{value:J=>flattenError(L,J)},addIssue:{value:J=>{L.issues.push(J),L.message=JSON.stringify(L.issues,jsonStringifyReplacer,2)}},addIssues:{value:J=>{L.issues.push(...J),L.message=JSON.stringify(L.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return L.issues.length===0}}})},ZodError=$constructor(`ZodError`,initializer),ZodRealError=$constructor(`ZodError`,initializer,{Parent:Error}),parse$25=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse$1=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode$2=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor(`ZodType`,(L,J)=>($ZodType.init(L,J),Object.assign(L[`~standard`],{jsonSchema:{input:createStandardJSONSchemaMethod(L,`input`),output:createStandardJSONSchemaMethod(L,`output`)}}),L.toJSONSchema=createToJSONSchemaMethod(L,{}),L.def=J,L.type=J.type,Object.defineProperty(L,`_def`,{value:J}),L.check=(...Y)=>L.clone(mergeDefs(J,{checks:[...J.checks??[],...Y.map(L=>typeof L==`function`?{_zod:{check:L,def:{check:`custom`},onattach:[]}}:L)]}),{parent:!0}),L.with=L.check,L.clone=(J,Y)=>clone(L,J,Y),L.brand=()=>L,L.register=((J,Y)=>(J.add(L,Y),L)),L.parse=(J,Y)=>parse$25(L,J,Y,{callee:L.parse}),L.safeParse=(J,Y)=>safeParse$1(L,J,Y),L.parseAsync=async(J,Y)=>parseAsync(L,J,Y,{callee:L.parseAsync}),L.safeParseAsync=async(J,Y)=>safeParseAsync(L,J,Y),L.spa=L.safeParseAsync,L.encode=(J,Y)=>encode(L,J,Y),L.decode=(J,Y)=>decode$2(L,J,Y),L.encodeAsync=async(J,Y)=>encodeAsync(L,J,Y),L.decodeAsync=async(J,Y)=>decodeAsync(L,J,Y),L.safeEncode=(J,Y)=>safeEncode(L,J,Y),L.safeDecode=(J,Y)=>safeDecode(L,J,Y),L.safeEncodeAsync=async(J,Y)=>safeEncodeAsync(L,J,Y),L.safeDecodeAsync=async(J,Y)=>safeDecodeAsync(L,J,Y),L.refine=(J,Y)=>L.check(refine(J,Y)),L.superRefine=J=>L.check(superRefine(J)),L.overwrite=J=>L.check(_overwrite(J)),L.optional=()=>optional(L),L.exactOptional=()=>exactOptional(L),L.nullable=()=>nullable(L),L.nullish=()=>optional(nullable(L)),L.nonoptional=J=>nonoptional(L,J),L.array=()=>array(L),L.or=J=>union([L,J]),L.and=J=>intersection(L,J),L.transform=J=>pipe(L,transform(J)),L.default=J=>_default(L,J),L.prefault=J=>prefault(L,J),L.catch=J=>_catch(L,J),L.pipe=J=>pipe(L,J),L.readonly=()=>readonly(L),L.describe=J=>{let Y=L.clone();return globalRegistry.add(Y,{description:J}),Y},Object.defineProperty(L,`description`,{get(){return globalRegistry.get(L)?.description},configurable:!0}),L.meta=(...J)=>{if(J.length===0)return globalRegistry.get(L);let Y=L.clone();return globalRegistry.add(Y,J[0]),Y},L.isOptional=()=>L.safeParse(void 0).success,L.isNullable=()=>L.safeParse(null).success,L.apply=J=>J(L),L)),_ZodString=$constructor(`_ZodString`,(L,J)=>{$ZodString.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>stringProcessor(L,J,Y,X);let Y=L._zod.bag;L.format=Y.format??null,L.minLength=Y.minimum??null,L.maxLength=Y.maximum??null,L.regex=(...J)=>L.check(_regex(...J)),L.includes=(...J)=>L.check(_includes(...J)),L.startsWith=(...J)=>L.check(_startsWith(...J)),L.endsWith=(...J)=>L.check(_endsWith(...J)),L.min=(...J)=>L.check(_minLength(...J)),L.max=(...J)=>L.check(_maxLength(...J)),L.length=(...J)=>L.check(_length(...J)),L.nonempty=(...J)=>L.check(_minLength(1,...J)),L.lowercase=J=>L.check(_lowercase(J)),L.uppercase=J=>L.check(_uppercase(J)),L.trim=()=>L.check(_trim()),L.normalize=(...J)=>L.check(_normalize(...J)),L.toLowerCase=()=>L.check(_toLowerCase()),L.toUpperCase=()=>L.check(_toUpperCase()),L.slugify=()=>L.check(_slugify())}),ZodString=$constructor(`ZodString`,(L,J)=>{$ZodString.init(L,J),_ZodString.init(L,J),L.email=J=>L.check(_email(ZodEmail,J)),L.url=J=>L.check(_url(ZodURL,J)),L.jwt=J=>L.check(_jwt(ZodJWT,J)),L.emoji=J=>L.check(_emoji(ZodEmoji,J)),L.guid=J=>L.check(_guid(ZodGUID,J)),L.uuid=J=>L.check(_uuid(ZodUUID,J)),L.uuidv4=J=>L.check(_uuidv4(ZodUUID,J)),L.uuidv6=J=>L.check(_uuidv6(ZodUUID,J)),L.uuidv7=J=>L.check(_uuidv7(ZodUUID,J)),L.nanoid=J=>L.check(_nanoid(ZodNanoID,J)),L.guid=J=>L.check(_guid(ZodGUID,J)),L.cuid=J=>L.check(_cuid(ZodCUID,J)),L.cuid2=J=>L.check(_cuid2(ZodCUID2,J)),L.ulid=J=>L.check(_ulid(ZodULID,J)),L.base64=J=>L.check(_base64(ZodBase64,J)),L.base64url=J=>L.check(_base64url(ZodBase64URL,J)),L.xid=J=>L.check(_xid(ZodXID,J)),L.ksuid=J=>L.check(_ksuid(ZodKSUID,J)),L.ipv4=J=>L.check(_ipv4(ZodIPv4,J)),L.ipv6=J=>L.check(_ipv6(ZodIPv6,J)),L.cidrv4=J=>L.check(_cidrv4(ZodCIDRv4,J)),L.cidrv6=J=>L.check(_cidrv6(ZodCIDRv6,J)),L.e164=J=>L.check(_e164(ZodE164,J)),L.datetime=J=>L.check(datetime(J)),L.date=J=>L.check(date(J)),L.time=J=>L.check(time(J)),L.duration=J=>L.check(duration(J))});function string$2(L){return _string(ZodString,L)}const ZodStringFormat=$constructor(`ZodStringFormat`,(L,J)=>{$ZodStringFormat.init(L,J),_ZodString.init(L,J)}),ZodEmail=$constructor(`ZodEmail`,(L,J)=>{$ZodEmail.init(L,J),ZodStringFormat.init(L,J)}),ZodGUID=$constructor(`ZodGUID`,(L,J)=>{$ZodGUID.init(L,J),ZodStringFormat.init(L,J)}),ZodUUID=$constructor(`ZodUUID`,(L,J)=>{$ZodUUID.init(L,J),ZodStringFormat.init(L,J)}),ZodURL=$constructor(`ZodURL`,(L,J)=>{$ZodURL.init(L,J),ZodStringFormat.init(L,J)}),ZodEmoji=$constructor(`ZodEmoji`,(L,J)=>{$ZodEmoji.init(L,J),ZodStringFormat.init(L,J)}),ZodNanoID=$constructor(`ZodNanoID`,(L,J)=>{$ZodNanoID.init(L,J),ZodStringFormat.init(L,J)}),ZodCUID=$constructor(`ZodCUID`,(L,J)=>{$ZodCUID.init(L,J),ZodStringFormat.init(L,J)}),ZodCUID2=$constructor(`ZodCUID2`,(L,J)=>{$ZodCUID2.init(L,J),ZodStringFormat.init(L,J)}),ZodULID=$constructor(`ZodULID`,(L,J)=>{$ZodULID.init(L,J),ZodStringFormat.init(L,J)}),ZodXID=$constructor(`ZodXID`,(L,J)=>{$ZodXID.init(L,J),ZodStringFormat.init(L,J)}),ZodKSUID=$constructor(`ZodKSUID`,(L,J)=>{$ZodKSUID.init(L,J),ZodStringFormat.init(L,J)}),ZodIPv4=$constructor(`ZodIPv4`,(L,J)=>{$ZodIPv4.init(L,J),ZodStringFormat.init(L,J)}),ZodIPv6=$constructor(`ZodIPv6`,(L,J)=>{$ZodIPv6.init(L,J),ZodStringFormat.init(L,J)}),ZodCIDRv4=$constructor(`ZodCIDRv4`,(L,J)=>{$ZodCIDRv4.init(L,J),ZodStringFormat.init(L,J)}),ZodCIDRv6=$constructor(`ZodCIDRv6`,(L,J)=>{$ZodCIDRv6.init(L,J),ZodStringFormat.init(L,J)}),ZodBase64=$constructor(`ZodBase64`,(L,J)=>{$ZodBase64.init(L,J),ZodStringFormat.init(L,J)}),ZodBase64URL=$constructor(`ZodBase64URL`,(L,J)=>{$ZodBase64URL.init(L,J),ZodStringFormat.init(L,J)}),ZodE164=$constructor(`ZodE164`,(L,J)=>{$ZodE164.init(L,J),ZodStringFormat.init(L,J)}),ZodJWT=$constructor(`ZodJWT`,(L,J)=>{$ZodJWT.init(L,J),ZodStringFormat.init(L,J)}),ZodNumber=$constructor(`ZodNumber`,(L,J)=>{$ZodNumber.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>numberProcessor(L,J,Y,X),L.gt=(J,Y)=>L.check(_gt(J,Y)),L.gte=(J,Y)=>L.check(_gte(J,Y)),L.min=(J,Y)=>L.check(_gte(J,Y)),L.lt=(J,Y)=>L.check(_lt(J,Y)),L.lte=(J,Y)=>L.check(_lte(J,Y)),L.max=(J,Y)=>L.check(_lte(J,Y)),L.int=J=>L.check(int(J)),L.safe=J=>L.check(int(J)),L.positive=J=>L.check(_gt(0,J)),L.nonnegative=J=>L.check(_gte(0,J)),L.negative=J=>L.check(_lt(0,J)),L.nonpositive=J=>L.check(_lte(0,J)),L.multipleOf=(J,Y)=>L.check(_multipleOf(J,Y)),L.step=(J,Y)=>L.check(_multipleOf(J,Y)),L.finite=()=>L;let Y=L._zod.bag;L.minValue=Math.max(Y.minimum??-1/0,Y.exclusiveMinimum??-1/0)??null,L.maxValue=Math.min(Y.maximum??1/0,Y.exclusiveMaximum??1/0)??null,L.isInt=(Y.format??``).includes(`int`)||Number.isSafeInteger(Y.multipleOf??.5),L.isFinite=!0,L.format=Y.format??null});function number(L){return _number(ZodNumber,L)}const ZodNumberFormat=$constructor(`ZodNumberFormat`,(L,J)=>{$ZodNumberFormat.init(L,J),ZodNumber.init(L,J)});function int(L){return _int(ZodNumberFormat,L)}const ZodBoolean=$constructor(`ZodBoolean`,(L,J)=>{$ZodBoolean.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>booleanProcessor(L,J,Y,X)});function boolean(L){return _boolean(ZodBoolean,L)}const ZodUnknown=$constructor(`ZodUnknown`,(L,J)=>{$ZodUnknown.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(L,J,Y)=>void 0});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor(`ZodNever`,(L,J)=>{$ZodNever.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>neverProcessor(L,J,Y,X)});function never$1(L){return _never(ZodNever,L)}const ZodArray=$constructor(`ZodArray`,(L,J)=>{$ZodArray.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>arrayProcessor(L,J,Y,X),L.element=J.element,L.min=(J,Y)=>L.check(_minLength(J,Y)),L.nonempty=J=>L.check(_minLength(1,J)),L.max=(J,Y)=>L.check(_maxLength(J,Y)),L.length=(J,Y)=>L.check(_length(J,Y)),L.unwrap=()=>L.element});function array(L,J){return _array(ZodArray,L,J)}const ZodObject=$constructor(`ZodObject`,(L,J)=>{$ZodObjectJIT.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>objectProcessor(L,J,Y,X),defineLazy(L,`shape`,()=>J.shape),L.keyof=()=>_enum(Object.keys(L._zod.def.shape)),L.catchall=J=>L.clone({...L._zod.def,catchall:J}),L.passthrough=()=>L.clone({...L._zod.def,catchall:unknown()}),L.loose=()=>L.clone({...L._zod.def,catchall:unknown()}),L.strict=()=>L.clone({...L._zod.def,catchall:never$1()}),L.strip=()=>L.clone({...L._zod.def,catchall:void 0}),L.extend=J=>extend$1(L,J),L.safeExtend=J=>safeExtend(L,J),L.merge=J=>merge$1(L,J),L.pick=J=>pick$1(L,J),L.omit=J=>omit$1(L,J),L.partial=(...J)=>partial(ZodOptional,L,J[0]),L.required=(...J)=>required(ZodNonOptional,L,J[0])});function object(L,J){return new ZodObject({type:`object`,shape:L??{},...normalizeParams(J)})}const ZodUnion=$constructor(`ZodUnion`,(L,J)=>{$ZodUnion.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>unionProcessor(L,J,Y,X),L.options=J.options});function union(L,J){return new ZodUnion({type:`union`,options:L,...normalizeParams(J)})}const ZodIntersection=$constructor(`ZodIntersection`,(L,J)=>{$ZodIntersection.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>intersectionProcessor(L,J,Y,X)});function intersection(L,J){return new ZodIntersection({type:`intersection`,left:L,right:J})}const ZodRecord=$constructor(`ZodRecord`,(L,J)=>{$ZodRecord.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>recordProcessor(L,J,Y,X),L.keyType=J.keyType,L.valueType=J.valueType});function record(L,J,Y){return new ZodRecord({type:`record`,keyType:L,valueType:J,...normalizeParams(Y)})}const ZodEnum=$constructor(`ZodEnum`,(L,J)=>{$ZodEnum.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>enumProcessor(L,J,Y,X),L.enum=J.entries,L.options=Object.values(J.entries);let Y=new Set(Object.keys(J.entries));L.extract=(L,X)=>{let Z={};for(let X of L)if(Y.has(X))Z[X]=J.entries[X];else throw Error(`Key ${X} not found in enum`);return new ZodEnum({...J,checks:[],...normalizeParams(X),entries:Z})},L.exclude=(L,X)=>{let Z={...J.entries};for(let J of L)if(Y.has(J))delete Z[J];else throw Error(`Key ${J} not found in enum`);return new ZodEnum({...J,checks:[],...normalizeParams(X),entries:Z})}});function _enum(L,J){return new ZodEnum({type:`enum`,entries:Array.isArray(L)?Object.fromEntries(L.map(L=>[L,L])):L,...normalizeParams(J)})}const ZodTransform=$constructor(`ZodTransform`,(L,J)=>{$ZodTransform.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>transformProcessor(L,J,Y,X),L._zod.parse=(Y,X)=>{if(X.direction===`backward`)throw new $ZodEncodeError(L.constructor.name);Y.addIssue=X=>{if(typeof X==`string`)Y.issues.push(issue(X,Y.value,J));else{let J=X;J.fatal&&(J.continue=!1),J.code??=`custom`,J.input??=Y.value,J.inst??=L,Y.issues.push(issue(J))}};let Z=J.transform(Y.value,Y);return Z instanceof Promise?Z.then(L=>(Y.value=L,Y)):(Y.value=Z,Y)}});function transform(L){return new ZodTransform({type:`transform`,transform:L})}const ZodOptional=$constructor(`ZodOptional`,(L,J)=>{$ZodOptional.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>optionalProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function optional(L){return new ZodOptional({type:`optional`,innerType:L})}const ZodExactOptional=$constructor(`ZodExactOptional`,(L,J)=>{$ZodExactOptional.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>optionalProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function exactOptional(L){return new ZodExactOptional({type:`optional`,innerType:L})}const ZodNullable=$constructor(`ZodNullable`,(L,J)=>{$ZodNullable.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>nullableProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function nullable(L){return new ZodNullable({type:`nullable`,innerType:L})}const ZodDefault=$constructor(`ZodDefault`,(L,J)=>{$ZodDefault.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>defaultProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType,L.removeDefault=L.unwrap});function _default(L,J){return new ZodDefault({type:`default`,innerType:L,get defaultValue(){return typeof J==`function`?J():shallowClone(J)}})}const ZodPrefault=$constructor(`ZodPrefault`,(L,J)=>{$ZodPrefault.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>prefaultProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function prefault(L,J){return new ZodPrefault({type:`prefault`,innerType:L,get defaultValue(){return typeof J==`function`?J():shallowClone(J)}})}const ZodNonOptional=$constructor(`ZodNonOptional`,(L,J)=>{$ZodNonOptional.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>nonoptionalProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function nonoptional(L,J){return new ZodNonOptional({type:`nonoptional`,innerType:L,...normalizeParams(J)})}const ZodCatch=$constructor(`ZodCatch`,(L,J)=>{$ZodCatch.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>catchProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType,L.removeCatch=L.unwrap});function _catch(L,J){return new ZodCatch({type:`catch`,innerType:L,catchValue:typeof J==`function`?J:()=>J})}const ZodPipe=$constructor(`ZodPipe`,(L,J)=>{$ZodPipe.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>pipeProcessor(L,J,Y,X),L.in=J.in,L.out=J.out});function pipe(L,J){return new ZodPipe({type:`pipe`,in:L,out:J})}const ZodReadonly=$constructor(`ZodReadonly`,(L,J)=>{$ZodReadonly.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>readonlyProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function readonly(L){return new ZodReadonly({type:`readonly`,innerType:L})}const ZodCustom=$constructor(`ZodCustom`,(L,J)=>{$ZodCustom.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>customProcessor(L,J,Y,X)});function refine(L,J={}){return _refine(ZodCustom,L,J)}function superRefine(L){return _superRefine(L)}const describe=describe$1,meta=meta$1;function preprocess$1(L,J){return pipe(transform(L),J)}function parseProperties(L){let J={};for(let Y of L.split(/\r?\n/)){let L=Y.trim();if(L.length===0||L.startsWith(`#`))continue;let X=L.indexOf(`=`);if(X===-1)continue;let Z=L.slice(0,X).trim(),Q=L.slice(X+1).trim();Z.length>0&&(J[Z]=Q)}return J}function formatPath(L,J,Y=DEFAULT_GET_METADATA_OPTIONS.absolute){if(/^[a-z]+:\/\//i.test(L))return L;if(Y)return L.replaceAll(`\\`,`/`);let X=relative$1(J,L).replaceAll(`\\`,`/`);return X===``?`.`:X}async function batchMap(L,J,Y=50){let X=[];for(let Z=0;Z<L.length;Z+=Y){let Q=L.slice(Z,Z+Y),$=await Promise.all(Q.map(async L=>J(L)));X.push(...$)}return X}function defineSource(L){return{...L,async extract(J){let Y=await L.discover(J);if(Y.length===0)return;let X=[];for(let Z of Y)try{let Y=await L.parse(Z,J);Y&&(Y.source=formatPath(Y.source,J.options.path,J.options.absolute),X.push(Y))}catch(L){log$2.warn(`Failed to process "${Z}": ${L instanceof Error?L.message:String(L)}`)}if(X.length!==0)return X.length===1?X[0]:X}}}const nonEmptyString=preprocess$1(L=>{if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0},string$2().optional()),optionalUrl=nonEmptyString.describe(`A URL string`),stringArray=preprocess$1(L=>Array.isArray(L)?L.filter(L=>typeof L==`string`&&L.trim().length>0):[],array(string$2()));function parseJsonRecord(L){try{let J=JSON.parse(L);return is.plainObject(J)?J:void 0}catch{return}}const arduinoLibraryPropertiesPersonEntrySchema=object({email:string$2().optional(),name:string$2()}),arduinoLibraryPropertiesDependencyEntrySchema=object({name:string$2(),versionConstraint:string$2().optional()}),CANONICAL_CATEGORIES$1=[`Communication`,`Data Processing`,`Data Storage`,`Device Control`,`Display`,`Other`,`Sensors`,`Signal Input/Output`,`Timing`,`Uncategorized`],CATEGORY_MAP$1=new Map(CANONICAL_CATEGORIES$1.map(L=>[L.replaceAll(/[^a-z]/gi,``).toLowerCase(),L]));CATEGORY_MAP$1.set(`sensor`,`Sensors`);const arduinoLibraryPropertiesSchema=object({architectures:stringArray,authors:array(arduinoLibraryPropertiesPersonEntrySchema),category:_enum(CANONICAL_CATEGORIES$1).optional(),depends:array(arduinoLibraryPropertiesDependencyEntrySchema),email:nonEmptyString,includes:stringArray,license:nonEmptyString,maintainer:arduinoLibraryPropertiesPersonEntrySchema.optional(),name:nonEmptyString,paragraph:nonEmptyString,raw:record(string$2(),string$2()),repository:optionalUrl,sentence:nonEmptyString,url:optionalUrl,version:nonEmptyString});function parse$24(L){let J=parseProperties(L),Y=get$3(J,`includes`);return arduinoLibraryPropertiesSchema.parse({architectures:splitTrimmed(get$3(J,`architectures`)??`*`),authors:parsePersonList(get$3(J,`author`)??``),category:normalizeCategory(get$3(J,`category`)),depends:parseDependencies$4(get$3(J,`depends`)??get$3(J,`dependencies`)??``),email:nonEmpty$5(get$3(J,`email`)),includes:Y?splitTrimmed(Y):[],license:nonEmpty$5(get$3(J,`license`)),maintainer:parsePersonList(get$3(J,`maintainer`)??``)[0],name:nonEmpty$5(get$3(J,`name`)),paragraph:nonEmpty$5(get$3(J,`paragraph`)),raw:J,repository:nonEmpty$5(get$3(J,`repository`)),sentence:nonEmpty$5(get$3(J,`sentence`)),url:nonEmpty$5(get$3(J,`url`)),version:nonEmpty$5(get$3(J,`version`))})}function get$3(L,J){return L[J]}function nonEmpty$5(L){if(L===void 0)return;let J=L.trim();return J.length>0?J:void 0}function normalizeCategory(L){if(L===void 0)return;let J=L.trim();if(J.length!==0)for(let L of J.split(`,`)){let J=L.replaceAll(/[^a-z]/gi,``).toLowerCase();if(J.length===0)continue;let Y=CATEGORY_MAP$1.get(J);if(Y)return Y}}function parsePersonList(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let L of J.split(`,`)){let J=L.trim(),X=J.indexOf(`<`);if(X!==-1){let L=J.indexOf(`>`,X);if(L!==-1){let Z=J.slice(0,X).trim(),Q=J.slice(X+1,L).trim();(Z.length>0||Q.length>0)&&Y.push({email:Q.length>0?Q:void 0,name:Z});continue}}J.length>0&&Y.push({email:void 0,name:J})}return Y}function parseDependencies$4(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let L of J.split(`,`)){let J=L.trim();if(J.length===0)continue;let X=J.indexOf(`(`);if(X!==-1){let L=J.indexOf(`)`,X);if(L!==-1){let Z=J.slice(0,X).trim(),Q=J.slice(X+1,L).trim();if(Z.length>0){Y.push({name:Z,versionConstraint:Q.length>0?Q:void 0});continue}}}Y.push({name:J,versionConstraint:void 0})}return Y}function splitTrimmed(L){return L.split(`,`).map(L=>L.trim()).filter(L=>L.length>0)}const ARDUINO_SPECIFIC_FIELDS=new Set([`architectures`,`depends`,`dot_a_linkage`,`maintainer`]),PROCESSING_EXCLUSIVE_FIELDS=new Set([`authors`,`minrevision`,`prettyversion`]);function isArduinoLibraryProperties(L){let J=parseProperties(L),Y=new Set(Object.keys(J));if(!Y.has(`name`)||!Y.has(`version`)||!Y.has(`author`))return!1;for(let L of ARDUINO_SPECIFIC_FIELDS)if(Y.has(L))return!0;for(let L of PROCESSING_EXCLUSIVE_FIELDS)if(Y.has(L))return!1;return!0}const arduinoLibraryPropertiesSource=defineSource({async discover(L){return getMatches(L.options,[`library.properties`])},key:`arduinoLibraryProperties`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`);if(isArduinoLibraryProperties(Y))return{data:parse$24(Y),source:L}},phase:1}),nameStartChar=`:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD`;nameStartChar+``;const nameRegexp=`[`+nameStartChar+`][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*`,regexName=RegExp(`^`+nameRegexp+`$`);function getAllMatches(L,J){let Y=[],X=J.exec(L);for(;X;){let Z=[];Z.startIndex=J.lastIndex-X[0].length;let Q=X.length;for(let L=0;L<Q;L++)Z.push(X[L]);Y.push(Z),X=J.exec(L)}return Y}const isName=function(L){return regexName.exec(L)!=null};function isExist(L){return L!==void 0}const defaultOptions$2={allowBooleanAttributes:!1,unpairedTags:[]};function validate$1(L,J){J=Object.assign({},defaultOptions$2,J);let Y=[],X=!1,Z=!1;L[0]===``&&(L=L.substr(1));for(let Q=0;Q<L.length;Q++)if(L[Q]===`<`&&L[Q+1]===`?`){if(Q+=2,Q=readPI(L,Q),Q.err)return Q}else if(L[Q]===`<`){let $=Q;if(Q++,L[Q]===`!`){Q=readCommentAndCDATA(L,Q);continue}else{let ee=!1;L[Q]===`/`&&(ee=!0,Q++);let te=``;for(;Q<L.length&&L[Q]!==`>`&&L[Q]!==` `&&L[Q]!==` `&&L[Q]!==`
293
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let Y of L.seen.entries()){let X=Y[1];if(J===Y[0]){Q(Y);continue}if(L.external){let X=L.external.registry.get(Y[0])?.id;if(J!==Y[0]&&X){Q(Y);continue}}if(L.metadataRegistry.get(Y[0])?.id){Q(Y);continue}if(X.cycle){Q(Y);continue}if(X.count>1&&L.reused===`ref`){Q(Y);continue}}}function finalize(L,J){let Y=L.seen.get(J);if(!Y)throw Error(`Unprocessed schema. This is a bug in Zod.`);let X=J=>{let Y=L.seen.get(J);if(Y.ref===null)return;let Z=Y.def??Y.schema,Q={...Z},$=Y.ref;if(Y.ref=null,$){X($);let Y=L.seen.get($),ee=Y.schema;if(ee.$ref&&(L.target===`draft-07`||L.target===`draft-04`||L.target===`openapi-3.0`)?(Z.allOf=Z.allOf??[],Z.allOf.push(ee)):Object.assign(Z,ee),Object.assign(Z,Q),J._zod.parent===$)for(let L in Z)L===`$ref`||L===`allOf`||L in Q||delete Z[L];if(ee.$ref&&Y.def)for(let L in Z)L===`$ref`||L===`allOf`||L in Y.def&&JSON.stringify(Z[L])===JSON.stringify(Y.def[L])&&delete Z[L]}let ee=J._zod.parent;if(ee&&ee!==$){X(ee);let J=L.seen.get(ee);if(J?.schema.$ref&&(Z.$ref=J.schema.$ref,J.def))for(let L in Z)L===`$ref`||L===`allOf`||L in J.def&&JSON.stringify(Z[L])===JSON.stringify(J.def[L])&&delete Z[L]}L.override({zodSchema:J,jsonSchema:Z,path:Y.path??[]})};for(let J of[...L.seen.entries()].reverse())X(J[0]);let Z={};if(L.target===`draft-2020-12`?Z.$schema=`https://json-schema.org/draft/2020-12/schema`:L.target===`draft-07`?Z.$schema=`http://json-schema.org/draft-07/schema#`:L.target===`draft-04`?Z.$schema=`http://json-schema.org/draft-04/schema#`:L.target,L.external?.uri){let Y=L.external.registry.get(J)?.id;if(!Y)throw Error("Schema is missing an `id` property");Z.$id=L.external.uri(Y)}Object.assign(Z,Y.def??Y.schema);let Q=L.external?.defs??{};for(let J of L.seen.entries()){let L=J[1];L.def&&L.defId&&(Q[L.defId]=L.def)}L.external||Object.keys(Q).length>0&&(L.target===`draft-2020-12`?Z.$defs=Q:Z.definitions=Q);try{let Y=JSON.parse(JSON.stringify(Z));return Object.defineProperty(Y,`~standard`,{value:{...J[`~standard`],jsonSchema:{input:createStandardJSONSchemaMethod(J,`input`,L.processors),output:createStandardJSONSchemaMethod(J,`output`,L.processors)}},enumerable:!1,writable:!1}),Y}catch{throw Error(`Error converting schema to JSON.`)}}function isTransforming(L,J){let Y=J??{seen:new Set};if(Y.seen.has(L))return!1;Y.seen.add(L);let X=L._zod.def;if(X.type===`transform`)return!0;if(X.type===`array`)return isTransforming(X.element,Y);if(X.type===`set`)return isTransforming(X.valueType,Y);if(X.type===`lazy`)return isTransforming(X.getter(),Y);if(X.type===`promise`||X.type===`optional`||X.type===`nonoptional`||X.type===`nullable`||X.type===`readonly`||X.type===`default`||X.type===`prefault`)return isTransforming(X.innerType,Y);if(X.type===`intersection`)return isTransforming(X.left,Y)||isTransforming(X.right,Y);if(X.type===`record`||X.type===`map`)return isTransforming(X.keyType,Y)||isTransforming(X.valueType,Y);if(X.type===`pipe`)return isTransforming(X.in,Y)||isTransforming(X.out,Y);if(X.type===`object`){for(let L in X.shape)if(isTransforming(X.shape[L],Y))return!0;return!1}if(X.type===`union`){for(let L of X.options)if(isTransforming(L,Y))return!0;return!1}if(X.type===`tuple`){for(let L of X.items)if(isTransforming(L,Y))return!0;return!!(X.rest&&isTransforming(X.rest,Y))}return!1}const createToJSONSchemaMethod=(L,J={})=>Y=>{let X=initializeContext({...Y,processors:J});return process$2(L,X),extractDefs(X,L),finalize(X,L)},createStandardJSONSchemaMethod=(L,J,Y={})=>X=>{let{libraryOptions:Z,target:Q}=X??{},$=initializeContext({...Z??{},target:Q,io:J,processors:Y});return process$2(L,$),extractDefs($,L),finalize($,L)},formatMap={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},stringProcessor=(L,J,Y,X)=>{let Z=Y;Z.type=`string`;let{minimum:Q,maximum:$,format:ee,patterns:te,contentEncoding:ne}=L._zod.bag;if(typeof Q==`number`&&(Z.minLength=Q),typeof $==`number`&&(Z.maxLength=$),ee&&(Z.format=formatMap[ee]??ee,Z.format===``&&delete Z.format,ee===`time`&&delete Z.format),ne&&(Z.contentEncoding=ne),te&&te.size>0){let L=[...te];L.length===1?Z.pattern=L[0].source:L.length>1&&(Z.allOf=[...L.map(L=>({...J.target===`draft-07`||J.target===`draft-04`||J.target===`openapi-3.0`?{type:`string`}:{},pattern:L.source}))])}},numberProcessor=(L,J,Y,X)=>{let Z=Y,{minimum:Q,maximum:$,format:ee,multipleOf:te,exclusiveMaximum:ne,exclusiveMinimum:re}=L._zod.bag;typeof ee==`string`&&ee.includes(`int`)?Z.type=`integer`:Z.type=`number`,typeof re==`number`&&(J.target===`draft-04`||J.target===`openapi-3.0`?(Z.minimum=re,Z.exclusiveMinimum=!0):Z.exclusiveMinimum=re),typeof Q==`number`&&(Z.minimum=Q,typeof re==`number`&&J.target!==`draft-04`&&(re>=Q?delete Z.minimum:delete Z.exclusiveMinimum)),typeof ne==`number`&&(J.target===`draft-04`||J.target===`openapi-3.0`?(Z.maximum=ne,Z.exclusiveMaximum=!0):Z.exclusiveMaximum=ne),typeof $==`number`&&(Z.maximum=$,typeof ne==`number`&&J.target!==`draft-04`&&(ne<=$?delete Z.maximum:delete Z.exclusiveMaximum)),typeof te==`number`&&(Z.multipleOf=te)},booleanProcessor=(L,J,Y,X)=>{Y.type=`boolean`},neverProcessor=(L,J,Y,X)=>{Y.not={}},unknownProcessor=(L,J,Y,X)=>{},enumProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=getEnumValues(Z.entries);Q.every(L=>typeof L==`number`)&&(Y.type=`number`),Q.every(L=>typeof L==`string`)&&(Y.type=`string`),Y.enum=Q},customProcessor=(L,J,Y,X)=>{if(J.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},transformProcessor=(L,J,Y,X)=>{if(J.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},arrayProcessor=(L,J,Y,X)=>{let Z=Y,Q=L._zod.def,{minimum:$,maximum:ee}=L._zod.bag;typeof $==`number`&&(Z.minItems=$),typeof ee==`number`&&(Z.maxItems=ee),Z.type=`array`,Z.items=process$2(Q.element,J,{...X,path:[...X.path,`items`]})},objectProcessor=(L,J,Y,X)=>{let Z=Y,Q=L._zod.def;Z.type=`object`,Z.properties={};let $=Q.shape;for(let L in $)Z.properties[L]=process$2($[L],J,{...X,path:[...X.path,`properties`,L]});let ee=new Set(Object.keys($)),te=new Set([...ee].filter(L=>{let Y=Q.shape[L]._zod;return J.io===`input`?Y.optin===void 0:Y.optout===void 0}));te.size>0&&(Z.required=Array.from(te)),Q.catchall?._zod.def.type===`never`?Z.additionalProperties=!1:Q.catchall?Q.catchall&&(Z.additionalProperties=process$2(Q.catchall,J,{...X,path:[...X.path,`additionalProperties`]})):J.io===`output`&&(Z.additionalProperties=!1)},unionProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=Z.inclusive===!1,$=Z.options.map((L,Y)=>process$2(L,J,{...X,path:[...X.path,Q?`oneOf`:`anyOf`,Y]}));Q?Y.oneOf=$:Y.anyOf=$},intersectionProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=process$2(Z.left,J,{...X,path:[...X.path,`allOf`,0]}),$=process$2(Z.right,J,{...X,path:[...X.path,`allOf`,1]}),ee=L=>`allOf`in L&&Object.keys(L).length===1;Y.allOf=[...ee(Q)?Q.allOf:[Q],...ee($)?$.allOf:[$]]},recordProcessor=(L,J,Y,X)=>{let Z=Y,Q=L._zod.def;Z.type=`object`;let $=Q.keyType,ee=$._zod.bag?.patterns;if(Q.mode===`loose`&&ee&&ee.size>0){let L=process$2(Q.valueType,J,{...X,path:[...X.path,`patternProperties`,`*`]});Z.patternProperties={};for(let J of ee)Z.patternProperties[J.source]=L}else (J.target===`draft-07`||J.target===`draft-2020-12`)&&(Z.propertyNames=process$2(Q.keyType,J,{...X,path:[...X.path,`propertyNames`]})),Z.additionalProperties=process$2(Q.valueType,J,{...X,path:[...X.path,`additionalProperties`]});let te=$._zod.values;if(te){let L=[...te].filter(L=>typeof L==`string`||typeof L==`number`);L.length>0&&(Z.required=L)}},nullableProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=process$2(Z.innerType,J,X),$=J.seen.get(L);J.target===`openapi-3.0`?($.ref=Z.innerType,Y.nullable=!0):Y.anyOf=[Q,{type:`null`}]},nonoptionalProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType},defaultProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType,Y.default=JSON.parse(JSON.stringify(Z.defaultValue))},prefaultProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType,J.io===`input`&&(Y._prefault=JSON.parse(JSON.stringify(Z.defaultValue)))},catchProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType;let $;try{$=Z.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}Y.default=$},pipeProcessor=(L,J,Y,X)=>{let Z=L._zod.def,Q=J.io===`input`?Z.in._zod.def.type===`transform`?Z.out:Z.in:Z.out;process$2(Q,J,X);let $=J.seen.get(L);$.ref=Q},readonlyProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType,Y.readOnly=!0},optionalProcessor=(L,J,Y,X)=>{let Z=L._zod.def;process$2(Z.innerType,J,X);let Q=J.seen.get(L);Q.ref=Z.innerType},ZodISODateTime=$constructor(`ZodISODateTime`,(L,J)=>{$ZodISODateTime.init(L,J),ZodStringFormat.init(L,J)});function datetime(L){return _isoDateTime(ZodISODateTime,L)}const ZodISODate=$constructor(`ZodISODate`,(L,J)=>{$ZodISODate.init(L,J),ZodStringFormat.init(L,J)});function date(L){return _isoDate(ZodISODate,L)}const ZodISOTime=$constructor(`ZodISOTime`,(L,J)=>{$ZodISOTime.init(L,J),ZodStringFormat.init(L,J)});function time(L){return _isoTime(ZodISOTime,L)}const ZodISODuration=$constructor(`ZodISODuration`,(L,J)=>{$ZodISODuration.init(L,J),ZodStringFormat.init(L,J)});function duration(L){return _isoDuration(ZodISODuration,L)}const initializer=(L,J)=>{$ZodError.init(L,J),L.name=`ZodError`,Object.defineProperties(L,{format:{value:J=>formatError(L,J)},flatten:{value:J=>flattenError(L,J)},addIssue:{value:J=>{L.issues.push(J),L.message=JSON.stringify(L.issues,jsonStringifyReplacer,2)}},addIssues:{value:J=>{L.issues.push(...J),L.message=JSON.stringify(L.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return L.issues.length===0}}})},ZodError=$constructor(`ZodError`,initializer),ZodRealError=$constructor(`ZodError`,initializer,{Parent:Error}),parse$25=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse$1=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode$2=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(ZodRealError),ZodType=$constructor(`ZodType`,(L,J)=>($ZodType.init(L,J),Object.assign(L[`~standard`],{jsonSchema:{input:createStandardJSONSchemaMethod(L,`input`),output:createStandardJSONSchemaMethod(L,`output`)}}),L.toJSONSchema=createToJSONSchemaMethod(L,{}),L.def=J,L.type=J.type,Object.defineProperty(L,`_def`,{value:J}),L.check=(...Y)=>L.clone(mergeDefs(J,{checks:[...J.checks??[],...Y.map(L=>typeof L==`function`?{_zod:{check:L,def:{check:`custom`},onattach:[]}}:L)]}),{parent:!0}),L.with=L.check,L.clone=(J,Y)=>clone(L,J,Y),L.brand=()=>L,L.register=((J,Y)=>(J.add(L,Y),L)),L.parse=(J,Y)=>parse$25(L,J,Y,{callee:L.parse}),L.safeParse=(J,Y)=>safeParse$1(L,J,Y),L.parseAsync=async(J,Y)=>parseAsync(L,J,Y,{callee:L.parseAsync}),L.safeParseAsync=async(J,Y)=>safeParseAsync(L,J,Y),L.spa=L.safeParseAsync,L.encode=(J,Y)=>encode(L,J,Y),L.decode=(J,Y)=>decode$2(L,J,Y),L.encodeAsync=async(J,Y)=>encodeAsync(L,J,Y),L.decodeAsync=async(J,Y)=>decodeAsync(L,J,Y),L.safeEncode=(J,Y)=>safeEncode(L,J,Y),L.safeDecode=(J,Y)=>safeDecode(L,J,Y),L.safeEncodeAsync=async(J,Y)=>safeEncodeAsync(L,J,Y),L.safeDecodeAsync=async(J,Y)=>safeDecodeAsync(L,J,Y),L.refine=(J,Y)=>L.check(refine(J,Y)),L.superRefine=J=>L.check(superRefine(J)),L.overwrite=J=>L.check(_overwrite(J)),L.optional=()=>optional(L),L.exactOptional=()=>exactOptional(L),L.nullable=()=>nullable(L),L.nullish=()=>optional(nullable(L)),L.nonoptional=J=>nonoptional(L,J),L.array=()=>array(L),L.or=J=>union([L,J]),L.and=J=>intersection(L,J),L.transform=J=>pipe(L,transform(J)),L.default=J=>_default(L,J),L.prefault=J=>prefault(L,J),L.catch=J=>_catch(L,J),L.pipe=J=>pipe(L,J),L.readonly=()=>readonly(L),L.describe=J=>{let Y=L.clone();return globalRegistry.add(Y,{description:J}),Y},Object.defineProperty(L,`description`,{get(){return globalRegistry.get(L)?.description},configurable:!0}),L.meta=(...J)=>{if(J.length===0)return globalRegistry.get(L);let Y=L.clone();return globalRegistry.add(Y,J[0]),Y},L.isOptional=()=>L.safeParse(void 0).success,L.isNullable=()=>L.safeParse(null).success,L.apply=J=>J(L),L)),_ZodString=$constructor(`_ZodString`,(L,J)=>{$ZodString.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>stringProcessor(L,J,Y,X);let Y=L._zod.bag;L.format=Y.format??null,L.minLength=Y.minimum??null,L.maxLength=Y.maximum??null,L.regex=(...J)=>L.check(_regex(...J)),L.includes=(...J)=>L.check(_includes(...J)),L.startsWith=(...J)=>L.check(_startsWith(...J)),L.endsWith=(...J)=>L.check(_endsWith(...J)),L.min=(...J)=>L.check(_minLength(...J)),L.max=(...J)=>L.check(_maxLength(...J)),L.length=(...J)=>L.check(_length(...J)),L.nonempty=(...J)=>L.check(_minLength(1,...J)),L.lowercase=J=>L.check(_lowercase(J)),L.uppercase=J=>L.check(_uppercase(J)),L.trim=()=>L.check(_trim()),L.normalize=(...J)=>L.check(_normalize(...J)),L.toLowerCase=()=>L.check(_toLowerCase()),L.toUpperCase=()=>L.check(_toUpperCase()),L.slugify=()=>L.check(_slugify())}),ZodString=$constructor(`ZodString`,(L,J)=>{$ZodString.init(L,J),_ZodString.init(L,J),L.email=J=>L.check(_email(ZodEmail,J)),L.url=J=>L.check(_url(ZodURL,J)),L.jwt=J=>L.check(_jwt(ZodJWT,J)),L.emoji=J=>L.check(_emoji(ZodEmoji,J)),L.guid=J=>L.check(_guid(ZodGUID,J)),L.uuid=J=>L.check(_uuid(ZodUUID,J)),L.uuidv4=J=>L.check(_uuidv4(ZodUUID,J)),L.uuidv6=J=>L.check(_uuidv6(ZodUUID,J)),L.uuidv7=J=>L.check(_uuidv7(ZodUUID,J)),L.nanoid=J=>L.check(_nanoid(ZodNanoID,J)),L.guid=J=>L.check(_guid(ZodGUID,J)),L.cuid=J=>L.check(_cuid(ZodCUID,J)),L.cuid2=J=>L.check(_cuid2(ZodCUID2,J)),L.ulid=J=>L.check(_ulid(ZodULID,J)),L.base64=J=>L.check(_base64(ZodBase64,J)),L.base64url=J=>L.check(_base64url(ZodBase64URL,J)),L.xid=J=>L.check(_xid(ZodXID,J)),L.ksuid=J=>L.check(_ksuid(ZodKSUID,J)),L.ipv4=J=>L.check(_ipv4(ZodIPv4,J)),L.ipv6=J=>L.check(_ipv6(ZodIPv6,J)),L.cidrv4=J=>L.check(_cidrv4(ZodCIDRv4,J)),L.cidrv6=J=>L.check(_cidrv6(ZodCIDRv6,J)),L.e164=J=>L.check(_e164(ZodE164,J)),L.datetime=J=>L.check(datetime(J)),L.date=J=>L.check(date(J)),L.time=J=>L.check(time(J)),L.duration=J=>L.check(duration(J))});function string$2(L){return _string(ZodString,L)}const ZodStringFormat=$constructor(`ZodStringFormat`,(L,J)=>{$ZodStringFormat.init(L,J),_ZodString.init(L,J)}),ZodEmail=$constructor(`ZodEmail`,(L,J)=>{$ZodEmail.init(L,J),ZodStringFormat.init(L,J)}),ZodGUID=$constructor(`ZodGUID`,(L,J)=>{$ZodGUID.init(L,J),ZodStringFormat.init(L,J)}),ZodUUID=$constructor(`ZodUUID`,(L,J)=>{$ZodUUID.init(L,J),ZodStringFormat.init(L,J)}),ZodURL=$constructor(`ZodURL`,(L,J)=>{$ZodURL.init(L,J),ZodStringFormat.init(L,J)}),ZodEmoji=$constructor(`ZodEmoji`,(L,J)=>{$ZodEmoji.init(L,J),ZodStringFormat.init(L,J)}),ZodNanoID=$constructor(`ZodNanoID`,(L,J)=>{$ZodNanoID.init(L,J),ZodStringFormat.init(L,J)}),ZodCUID=$constructor(`ZodCUID`,(L,J)=>{$ZodCUID.init(L,J),ZodStringFormat.init(L,J)}),ZodCUID2=$constructor(`ZodCUID2`,(L,J)=>{$ZodCUID2.init(L,J),ZodStringFormat.init(L,J)}),ZodULID=$constructor(`ZodULID`,(L,J)=>{$ZodULID.init(L,J),ZodStringFormat.init(L,J)}),ZodXID=$constructor(`ZodXID`,(L,J)=>{$ZodXID.init(L,J),ZodStringFormat.init(L,J)}),ZodKSUID=$constructor(`ZodKSUID`,(L,J)=>{$ZodKSUID.init(L,J),ZodStringFormat.init(L,J)}),ZodIPv4=$constructor(`ZodIPv4`,(L,J)=>{$ZodIPv4.init(L,J),ZodStringFormat.init(L,J)}),ZodIPv6=$constructor(`ZodIPv6`,(L,J)=>{$ZodIPv6.init(L,J),ZodStringFormat.init(L,J)}),ZodCIDRv4=$constructor(`ZodCIDRv4`,(L,J)=>{$ZodCIDRv4.init(L,J),ZodStringFormat.init(L,J)}),ZodCIDRv6=$constructor(`ZodCIDRv6`,(L,J)=>{$ZodCIDRv6.init(L,J),ZodStringFormat.init(L,J)}),ZodBase64=$constructor(`ZodBase64`,(L,J)=>{$ZodBase64.init(L,J),ZodStringFormat.init(L,J)}),ZodBase64URL=$constructor(`ZodBase64URL`,(L,J)=>{$ZodBase64URL.init(L,J),ZodStringFormat.init(L,J)}),ZodE164=$constructor(`ZodE164`,(L,J)=>{$ZodE164.init(L,J),ZodStringFormat.init(L,J)}),ZodJWT=$constructor(`ZodJWT`,(L,J)=>{$ZodJWT.init(L,J),ZodStringFormat.init(L,J)}),ZodNumber=$constructor(`ZodNumber`,(L,J)=>{$ZodNumber.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>numberProcessor(L,J,Y,X),L.gt=(J,Y)=>L.check(_gt(J,Y)),L.gte=(J,Y)=>L.check(_gte(J,Y)),L.min=(J,Y)=>L.check(_gte(J,Y)),L.lt=(J,Y)=>L.check(_lt(J,Y)),L.lte=(J,Y)=>L.check(_lte(J,Y)),L.max=(J,Y)=>L.check(_lte(J,Y)),L.int=J=>L.check(int(J)),L.safe=J=>L.check(int(J)),L.positive=J=>L.check(_gt(0,J)),L.nonnegative=J=>L.check(_gte(0,J)),L.negative=J=>L.check(_lt(0,J)),L.nonpositive=J=>L.check(_lte(0,J)),L.multipleOf=(J,Y)=>L.check(_multipleOf(J,Y)),L.step=(J,Y)=>L.check(_multipleOf(J,Y)),L.finite=()=>L;let Y=L._zod.bag;L.minValue=Math.max(Y.minimum??-1/0,Y.exclusiveMinimum??-1/0)??null,L.maxValue=Math.min(Y.maximum??1/0,Y.exclusiveMaximum??1/0)??null,L.isInt=(Y.format??``).includes(`int`)||Number.isSafeInteger(Y.multipleOf??.5),L.isFinite=!0,L.format=Y.format??null});function number(L){return _number(ZodNumber,L)}const ZodNumberFormat=$constructor(`ZodNumberFormat`,(L,J)=>{$ZodNumberFormat.init(L,J),ZodNumber.init(L,J)});function int(L){return _int(ZodNumberFormat,L)}const ZodBoolean=$constructor(`ZodBoolean`,(L,J)=>{$ZodBoolean.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>booleanProcessor(L,J,Y,X)});function boolean(L){return _boolean(ZodBoolean,L)}const ZodUnknown=$constructor(`ZodUnknown`,(L,J)=>{$ZodUnknown.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(L,J,Y)=>void 0});function unknown(){return _unknown(ZodUnknown)}const ZodNever=$constructor(`ZodNever`,(L,J)=>{$ZodNever.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>neverProcessor(L,J,Y,X)});function never$1(L){return _never(ZodNever,L)}const ZodArray=$constructor(`ZodArray`,(L,J)=>{$ZodArray.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>arrayProcessor(L,J,Y,X),L.element=J.element,L.min=(J,Y)=>L.check(_minLength(J,Y)),L.nonempty=J=>L.check(_minLength(1,J)),L.max=(J,Y)=>L.check(_maxLength(J,Y)),L.length=(J,Y)=>L.check(_length(J,Y)),L.unwrap=()=>L.element});function array(L,J){return _array(ZodArray,L,J)}const ZodObject=$constructor(`ZodObject`,(L,J)=>{$ZodObjectJIT.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>objectProcessor(L,J,Y,X),defineLazy(L,`shape`,()=>J.shape),L.keyof=()=>_enum(Object.keys(L._zod.def.shape)),L.catchall=J=>L.clone({...L._zod.def,catchall:J}),L.passthrough=()=>L.clone({...L._zod.def,catchall:unknown()}),L.loose=()=>L.clone({...L._zod.def,catchall:unknown()}),L.strict=()=>L.clone({...L._zod.def,catchall:never$1()}),L.strip=()=>L.clone({...L._zod.def,catchall:void 0}),L.extend=J=>extend$1(L,J),L.safeExtend=J=>safeExtend(L,J),L.merge=J=>merge$1(L,J),L.pick=J=>pick$1(L,J),L.omit=J=>omit$1(L,J),L.partial=(...J)=>partial(ZodOptional,L,J[0]),L.required=(...J)=>required(ZodNonOptional,L,J[0])});function object(L,J){return new ZodObject({type:`object`,shape:L??{},...normalizeParams(J)})}const ZodUnion=$constructor(`ZodUnion`,(L,J)=>{$ZodUnion.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>unionProcessor(L,J,Y,X),L.options=J.options});function union(L,J){return new ZodUnion({type:`union`,options:L,...normalizeParams(J)})}const ZodIntersection=$constructor(`ZodIntersection`,(L,J)=>{$ZodIntersection.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>intersectionProcessor(L,J,Y,X)});function intersection(L,J){return new ZodIntersection({type:`intersection`,left:L,right:J})}const ZodRecord=$constructor(`ZodRecord`,(L,J)=>{$ZodRecord.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>recordProcessor(L,J,Y,X),L.keyType=J.keyType,L.valueType=J.valueType});function record(L,J,Y){return new ZodRecord({type:`record`,keyType:L,valueType:J,...normalizeParams(Y)})}const ZodEnum=$constructor(`ZodEnum`,(L,J)=>{$ZodEnum.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>enumProcessor(L,J,Y,X),L.enum=J.entries,L.options=Object.values(J.entries);let Y=new Set(Object.keys(J.entries));L.extract=(L,X)=>{let Z={};for(let X of L)if(Y.has(X))Z[X]=J.entries[X];else throw Error(`Key ${X} not found in enum`);return new ZodEnum({...J,checks:[],...normalizeParams(X),entries:Z})},L.exclude=(L,X)=>{let Z={...J.entries};for(let J of L)if(Y.has(J))delete Z[J];else throw Error(`Key ${J} not found in enum`);return new ZodEnum({...J,checks:[],...normalizeParams(X),entries:Z})}});function _enum(L,J){return new ZodEnum({type:`enum`,entries:Array.isArray(L)?Object.fromEntries(L.map(L=>[L,L])):L,...normalizeParams(J)})}const ZodTransform=$constructor(`ZodTransform`,(L,J)=>{$ZodTransform.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>transformProcessor(L,J,Y,X),L._zod.parse=(Y,X)=>{if(X.direction===`backward`)throw new $ZodEncodeError(L.constructor.name);Y.addIssue=X=>{if(typeof X==`string`)Y.issues.push(issue(X,Y.value,J));else{let J=X;J.fatal&&(J.continue=!1),J.code??=`custom`,J.input??=Y.value,J.inst??=L,Y.issues.push(issue(J))}};let Z=J.transform(Y.value,Y);return Z instanceof Promise?Z.then(L=>(Y.value=L,Y)):(Y.value=Z,Y)}});function transform(L){return new ZodTransform({type:`transform`,transform:L})}const ZodOptional=$constructor(`ZodOptional`,(L,J)=>{$ZodOptional.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>optionalProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function optional(L){return new ZodOptional({type:`optional`,innerType:L})}const ZodExactOptional=$constructor(`ZodExactOptional`,(L,J)=>{$ZodExactOptional.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>optionalProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function exactOptional(L){return new ZodExactOptional({type:`optional`,innerType:L})}const ZodNullable=$constructor(`ZodNullable`,(L,J)=>{$ZodNullable.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>nullableProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function nullable(L){return new ZodNullable({type:`nullable`,innerType:L})}const ZodDefault=$constructor(`ZodDefault`,(L,J)=>{$ZodDefault.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>defaultProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType,L.removeDefault=L.unwrap});function _default(L,J){return new ZodDefault({type:`default`,innerType:L,get defaultValue(){return typeof J==`function`?J():shallowClone(J)}})}const ZodPrefault=$constructor(`ZodPrefault`,(L,J)=>{$ZodPrefault.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>prefaultProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function prefault(L,J){return new ZodPrefault({type:`prefault`,innerType:L,get defaultValue(){return typeof J==`function`?J():shallowClone(J)}})}const ZodNonOptional=$constructor(`ZodNonOptional`,(L,J)=>{$ZodNonOptional.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>nonoptionalProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function nonoptional(L,J){return new ZodNonOptional({type:`nonoptional`,innerType:L,...normalizeParams(J)})}const ZodCatch=$constructor(`ZodCatch`,(L,J)=>{$ZodCatch.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>catchProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType,L.removeCatch=L.unwrap});function _catch(L,J){return new ZodCatch({type:`catch`,innerType:L,catchValue:typeof J==`function`?J:()=>J})}const ZodPipe=$constructor(`ZodPipe`,(L,J)=>{$ZodPipe.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>pipeProcessor(L,J,Y,X),L.in=J.in,L.out=J.out});function pipe(L,J){return new ZodPipe({type:`pipe`,in:L,out:J})}const ZodReadonly=$constructor(`ZodReadonly`,(L,J)=>{$ZodReadonly.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>readonlyProcessor(L,J,Y,X),L.unwrap=()=>L._zod.def.innerType});function readonly(L){return new ZodReadonly({type:`readonly`,innerType:L})}const ZodCustom=$constructor(`ZodCustom`,(L,J)=>{$ZodCustom.init(L,J),ZodType.init(L,J),L._zod.processJSONSchema=(J,Y,X)=>customProcessor(L,J,Y,X)});function refine(L,J={}){return _refine(ZodCustom,L,J)}function superRefine(L){return _superRefine(L)}const describe=describe$1,meta=meta$1;function preprocess$1(L,J){return pipe(transform(L),J)}function parseProperties(L){let J={};for(let Y of L.split(/\r?\n/)){let L=Y.trim();if(L.length===0||L.startsWith(`#`))continue;let X=L.indexOf(`=`);if(X===-1)continue;let Z=L.slice(0,X).trim(),Q=L.slice(X+1).trim();Z.length>0&&(J[Z]=Q)}return J}function formatPath(L,J,Y=DEFAULT_GET_METADATA_OPTIONS.absolute){if(/^[a-z]+:\/\//i.test(L))return L;if(Y)return L.replaceAll(`\\`,`/`);let X=relative$1(J,L).replaceAll(`\\`,`/`);return X===``?`.`:X}async function batchMap(L,J,Y=50){let X=[];for(let Z=0;Z<L.length;Z+=Y){let Q=L.slice(Z,Z+Y),$=await Promise.all(Q.map(async L=>J(L)));X.push(...$)}return X}function defineSource(L){return{...L,async extract(J){let Y=await L.discover(J);if(Y.length===0)return;let X=[];for(let Z of Y)try{let Y=await L.parse(Z,J);Y&&(Y.source=formatPath(Y.source,J.options.path,J.options.absolute),X.push(Y))}catch(L){log$2.warn(`Failed to process "${Z}": ${L instanceof Error?L.message:String(L)}`)}if(X.length!==0)return X.length===1?X[0]:X}}}const nonEmptyString=preprocess$1(L=>{if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0},string$2().optional()),optionalUrl=nonEmptyString.describe(`A URL string`),stringArray=preprocess$1(L=>Array.isArray(L)?L.filter(L=>typeof L==`string`&&L.trim().length>0):[],array(string$2()));function parseJsonRecord(L){try{let J=JSON.parse(L);return is.plainObject(J)?J:void 0}catch{return}}function getDefaultExportFromCjs(L){return L&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,`default`)?L.default:L}var ansis={exports:{}},hasRequiredAnsis;function requireAnsis(){if(hasRequiredAnsis)return ansis.exports;hasRequiredAnsis=1;let L,J,Y,{defineProperty:X,setPrototypeOf:Z,create:Q,keys:$}=Object,ee=``,{round:te,max:ne}=Math,re=L=>{let J=/([a-f\d]{3,6})/i.exec(L)?.[1],Y=J?.length,X=parseInt(6^Y?3^Y?`0`:J[0]+J[0]+J[1]+J[1]+J[2]+J[2]:J,16);return[X>>16&255,X>>8&255,255&X]},ie=(L,J,Y)=>L^J||J^Y?16+36*te(L/51)+6*te(J/51)+te(Y/51):8>L?16:L>248?231:te(24*(L-8)/247)+232,ae=L=>{let J,Y,X,Z,Q;return 8>L?30+L:16>L?L-8+90:(232>L?(Q=(L-=16)%36,J=(L/36|0)/5,Y=(Q/6|0)/5,X=Q%6/5):J=Y=X=(10*(L-232)+8)/255,Z=2*ne(J,Y,X),Z?30+(te(X)<<2|te(Y)<<1|te(J))+(2^Z?0:60):30)},oe=(()=>{let Y=L=>Q.some((J=>L.test(J))),X=globalThis,Z=X.process??{},Q=Z.argv??[],ee=Z.env??{},te=-1;try{L=`,`+$(ee).join(`,`)}catch{ee={},te=0}let ne=`FORCE_COLOR`,re={false:0,0:0,1:1,2:2,3:3}[ee[ne]]??-1,ie=ne in ee&&re||Y(/^--color=?(true|always)?$/);return ie&&(te=re),~te||(te=((Y,X,Z)=>(J=Y.TERM,{"24bit":3,truecolor:3,ansi256:2,ansi:1}[Y.COLORTERM]||(Y.CI?/,GITHUB/.test(L)?3:1:X&&J!==`dumb`?Z?3:/-256/.test(J)?2:1:0)))(ee,!!ee.PM2_HOME||ee.NEXT_RUNTIME?.includes(`edge`)||!!Z.stdout?.isTTY,Z.platform===`win32`)),!re||ee.NO_COLOR||Y(/^--(no-color|color=(false|never))$/)?0:X.window?.chrome||ie&&!te?3:te})(),se={open:``,close:``},ce=39,le=49,ue={},de=({p:L},{open:J,close:X})=>{let Q=(L,...Y)=>{if(!L){if(J&&J===X)return J;if((L??``)===``)return``}let Z,$=L.raw?String.raw({raw:L},...Y):``+L,ee=Q.p,te=ee.o,ne=ee.c;if($.includes(`\x1B`))for(;ee;ee=ee.p){let{open:L,close:J}=ee,Y=J.length,X=``,Q=0;if(Y)for(;~(Z=$.indexOf(J,Q));Q=Z+Y)X+=$.slice(Q,Z)+L;$=X+$.slice(Q)}return te+($.includes(`
294
+ `)?$.replace(/(\r?\n)/g,ne+`$1`+te):$)+ne},$=J,ee=X;return L&&($=L.o+J,ee=X+L.c),Z(Q,Y),Q.p={open:J,close:X,o:$,c:ee,p:L},Q.open=$,Q.close=ee,Q},fe=new function L(J=oe){let $={Ansis:L,level:J,isSupported:()=>te,strip:L=>L.replace(/[›][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,``),extend(L){for(let J in L){let Y=L[J],X=(typeof Y)[0];X===`s`?(ee(J,me(...re(Y))),ee(be(J),he(...re(Y)))):ee(J,Y,X===`f`)}return Y=Q({},ue),Z($,Y),$}},ee=(L,J,Y)=>{ue[L]={get(){let Z=Y?(...L)=>de(this,J(...L)):de(this,J);return X(this,L,{value:Z}),Z}}},te=J>0,ne=(L,J)=>te?{open:`[${L}m`,close:`[${J}m`}:se,ce=L=>J=>L(...re(J)),le=(L,J)=>(Y,X,Z)=>ne(`${L}8;2;${Y};${X};${Z}`,J),fe=(L,J)=>(Y,X,Z)=>ne(((L,J,Y)=>ae(ie(L,J,Y)))(Y,X,Z)+L,J),pe=L=>(J,Y,X)=>L(ie(J,Y,X)),me=le(3,39),he=le(4,49),ge=L=>ne(`38;5;`+L,39),_e=L=>ne(`48;5;`+L,49);J===2?(me=pe(ge),he=pe(_e)):J===1&&(me=fe(0,39),he=fe(10,49),ge=L=>ne(ae(L),39),_e=L=>ne(ae(L)+10,49));let ve,ye={fg:ge,bg:_e,rgb:me,bgRgb:he,hex:ce(me),bgHex:ce(he),visible:se,reset:ne(0,0),bold:ne(1,22),dim:ne(2,22),italic:ne(3,23),underline:ne(4,24),inverse:ne(7,27),hidden:ne(8,28),strikethrough:ne(9,29)},be=L=>`bg`+L[0].toUpperCase()+L.slice(1),xe=`Bright`;return`black,red,green,yellow,blue,magenta,cyan,white,gray`.split(`,`).map(((L,J)=>{ve=be(L),8>J?(ye[L+xe]=ne(90+J,39),ye[ve+xe]=ne(100+J,49)):J=60,ye[L]=ne(30+J,39),ye[ve]=ne(40+J,49)})),$.extend(ye)};return ansis.exports=fe,fe.default=fe,ansis.exports}const a$1=getDefaultExportFromCjs(requireAnsis()),{Ansis,fg,bg,rgb,bgRgb,hex,bgHex,reset,inverse,hidden,visible,bold,dim,italic,underline,strikethrough,black,red,green,yellow,blue,magenta,cyan,white,gray,redBright,greenBright,yellowBright,blueBright,magentaBright,cyanBright,whiteBright,bgBlack,bgRed,bgGreen,bgYellow,bgBlue,bgMagenta,bgCyan,bgWhite,bgGray,bgRedBright,bgGreenBright,bgYellowBright,bgBlueBright,bgMagentaBright,bgCyanBright,bgWhiteBright}=a$1,IGNORE_REGEX=/@case-police-ignore\s+(.*)/g,UTF8_RANGE=`[€-￿]`;function buildRegex(L){let J=Object.keys(L);return RegExp(`\\b(${J.join(`|`).replace(/\+/g,`\\+`)})\\b`,`gi`)}function replaceCore(L,J,Y=[],X,Z){Z||=buildRegex(J),Array.from(L.matchAll(IGNORE_REGEX)).forEach(L=>{let J=L[1].trim().replace(/\s*-->$/,``);Y.push(...J.split(`,`).map(L=>L.trim().toLowerCase()).filter(Boolean))});let Q=!1;if(L=L.replace(Z,(Z,$,ee)=>{if(containsUTF8(L,$,ee)||!$.match(/[A-Z]/)||!$.match(/[a-z]/))return Z;let te=$.toLowerCase();if(Y.includes(te))return Z;let ne=J[te];return!ne||ne===$?Z:(Q=!0,X?.(L,ee,$,ne),ne)}),Q)return L}function containsUTF8(L,J,Y){let X=RegExp(`${UTF8_RANGE}`),Z=L.charAt(Y-1),Q=L.charAt(Y+J.length);return X.test(Z)||X.test(Q)}var abbreviates_default={abi:`ABI`,amd:`AMD`,api:`API`,ast:`AST`,bom:`BOM`,bsd:`BSD`,cdn:`CDN`,cjs:`CJS`,cli:`CLI`,cncf:`CNCF`,cors:`CORS`,cpu:`CPU`,crud:`CRUD`,csrf:`CSRF`,css:`CSS`,csv:`CSV`,db2:`DB2`,dns:`DNS`,dom:`DOM`,dos:`DOS`,es6:`ES6`,esm:`ESM`,fbi:`FBI`,ftp:`FTP`,ftps:`FTPS`,gcc:`GCC`,gcp:`GCP`,glsl:`GLSL`,gorm:`GORM`,gpl:`GPL`,gps:`GPS`,gpu:`GPU`,gre:`GRE`,gui:`GUI`,hdmi:`HDMI`,hmr:`HMR`,html:`HTML`,http:`HTTP`,https:`HTTPS`,iife:`IIFE`,iot:`IoT`,ipc:`IPC`,ipfs:`IPFS`,ipmi:`IPMI`,jdbc:`JDBC`,jdk:`JDK`,jit:`JIT`,jpeg:`JPEG`,jpg:`JPG`,jre:`JRE`,jsf:`JSF`,json:`JSON`,jsonp:`JSONP`,jsp:`JSP`,jwt:`JWT`,kcp:`KCP`,kde:`KDE`,kpi:`KPI`,lfu:`LFU`,llvm:`LLVM`,lru:`LRU`,lts:`LTS`,mdn:`MDN`,mdx:`MDX`,mvc:`MVC`,mvp:`MVP`,mvvm:`MVVM`,nft:`NFT`,odbc:`ODBC`,ont:`ONT`,orm:`ORM`,oss:`OSS`,pdf:`PDF`,pdo:`PDO`,posix:`POSIX`,pwa:`PWA`,qemu:`QEMU`,qgis:`QGIS`,quic:`QUIC`,rfc:`RFC`,rom:`ROM`,rpc:`RPC`,rss:`RSS`,rss3:`RSS3`,sdk:`SDK`,seo:`SEO`,sip:`SIP`,smtp:`SMTP`,sql:`SQL`,sre:`SRE`,ssg:`SSG`,ssh:`SSH`,sso:`SSO`,ssr:`SSR`,stp:`STP`,svg:`SVG`,svn:`SVN`,tcp:`TCP`,tls:`TLS`,toml:`TOML`,tsc:`TSC`,udp:`UDP`,umd:`UMD`,uri:`URI`,url:`URL`,usb:`USB`,vlan:`VLAN`,vnc:`VNC`,vpn:`VPN`,vps:`VPS`,wgsl:`WGSL`,wlan:`WLAN`,wsa:`WSA`,wsl:`WSL`,xhtml:`XHTML`,xml:`XML`,xss:`XSS`,yaml:`YAML`},brands_default={airbnb:`Airbnb`,alphago:`AlphaGo`,bitbucket:`Bitbucket`,bytedance:`ByteDance`,circleci:`CircleCI`,cloudflare:`Cloudflare`,freecodecamp:`freeCodeCamp`,gitea:`Gitea`,gitee:`Gitee`,github:`GitHub`,gitlab:`GitLab`,gitops:`GitOps`,gitpod:`Gitpod`,hp:`HP`,ibm:`IBM`,jsdelivr:`jsDelivr`,kfc:`KFC`,leetcode:`LeetCode`,linkedin:`LinkedIn`,mcdonald:`McDonald`,nvidia:`NVIDIA`,pagerduty:`PagerDuty`,producthunt:`Product Hunt`,stackblitz:`StackBlitz`,stackit:`STACKIT`,stackoverflow:`Stack Overflow`,unjs:`UnJS`,v2ex:`V2EX`,vuefes:`Vue Fes`,youtube:`YouTube`},general_default={aiaas:`AIaaS`,baas:`BaaS`,caas:`CaaS`,daas:`DaaS`,ddos:`DDoS`,devops:`DevOps`,devtools:`DevTools`,esim:`eSIM`,faas:`FaaS`,iac:`IaC`,iaas:`IaaS`,ioc:`IoC`,ipsec:`IPsec`,mpaas:`mPaaS`,paas:`PaaS`,saas:`SaaS`,wifi:`Wi-Fi`,xaas:`XaaS`},products_default={airdrop:`AirDrop`,airpods:`AirPods`,airtag:`AirTag`,homekit:`HomeKit`,homepod:`HomePod`,imac:`iMac`,ipad:`iPad`,iphone:`iPhone`,ipod:`iPod`,macbook:`MacBook`,"macbook air":`MacBook Air`,"macbook pro":`MacBook Pro`,yubikey:`YubiKey`},softwares_default={"1password":`1Password`,"3dtiles":`3DTiles`,actionscript:`ActionScript`,adblock:`AdBlock`,ajax:`AJAX`,alipay:`Alipay`,amap:`AMap`,angularjs:`AngularJS`,"ant design":`Ant Design`,"ant design vue":`Ant Design Vue`,antd:`AntD`,antdesign:`AntDesign`,antdesignvue:`AntDesignVue`,antv:`AntV`,apifox:`Apifox`,"app store":`App Store`,"apple pay":`Apple Pay`,applescript:`AppleScript`,appletalk:`AppleTalk`,arangodb:`ArangoDB`,arcgis:`ArcGIS`,arcmap:`ArcMap`,arcobjects:`ArcObjects`,beego:`Beego`,bittorrent:`BitTorrent`,bluesky:`Bluesky`,busybox:`BusyBox`,centos:`CentOS`,cesiumjs:`CesiumJS`,chatgpt:`ChatGPT`,citygml:`CityGML`,cityjson:`CityJSON`,ckeditor:`CKEditor`,clashx:`ClashX`,clickhouse:`ClickHouse`,cloudfront:`CloudFront`,cmake:`CMake`,cockroachdb:`CockroachDB`,cocoapods:`CocoaPods`,codepen:`CodePen`,codesandbox:`CodeSandbox`,coffeescript:`CoffeeScript`,commonjs:`CommonJS`,"composition api":`Composition API`,compositionapi:`CompositionAPI`,coredns:`CoreDNS`,"css modules":`CSS Modules`,dapr:`Dapr`,datadog:`Datadog`,datagrip:`DataGrip`,dbase:`dBase`,definitelytyped:`DefinitelyTyped`,denodeploy:`DenoDeploy`,"digital ocean":`DigitalOcean`,digitalocean:`DigitalOcean`,dingtalk:`DingTalk`,directx:`DirectX`,django:`Django`,duckduckgo:`DuckDuckGo`,dynamodb:`DynamoDB`,echarts:`ECharts`,ecmascript:`ECMAScript`,edgedb:`EdgeDB`,eggjs:`Egg.js`,elasticsearch:`Elasticsearch`,"element plus":`Element Plus`,elementui:`ElementUI`,esbuild:`esbuild`,eslint:`ESLint`,esxi:`ESXi`,etcd:`etcd`,facetime:`FaceTime`,fastapi:`FastAPI`,ffmpeg:`FFmpeg`,filezilla:`FileZilla`,firefox:`Firefox`,freemarker:`FreeMarker`,gdnative:`GDNative`,gdscript:`GDScript`,geforce:`GeForce`,geojson:`GeoJSON`,geopackage:`GeoPackage`,geopandas:`GeoPandas`,geoserver:`GeoServer`,gitbook:`GitBook`,gitkraken:`GitKraken`,gltf:`glTF`,gnome:`GNOME`,gnu:`GNU`,gnupg:`GnuPG`,goland:`GoLand`,"google pay":`Google Pay`,"graph rag":`Graph RAG`,graphql:`GraphQL`,graphrag:`GraphRAG`,greensock:`GreenSock`,grpc:`gRPC`,hackernews:`Hacker News`,hacpai:`HacPai`,hbase:`HBase`,hbuilderx:`HBuilderX`,ibook:`iBook`,icloud:`iCloud`,idrac:`iDRAC`,ilo:`iLO`,imessage:`iMessage`,imovie:`iMovie`,imtoken:`imToken`,influxdb:`InfluxDB`,intellij:`IntelliJ`,"intellij idea":`IntelliJ IDEA`,ios:`iOS`,ipados:`iPadOS`,iphoto:`iPhoto`,iscsi:`iSCSI`,iterm:`iTerm`,itunes:`iTunes`,iwork:`iWork`,javascript:`JavaScript`,jetbrains:`JetBrains`,jquery:`jQuery`,jsdoc:`JSDoc`,jupyterlab:`JupyterLab`,katex:`KaTeX`,kubernetes:`Kubernetes`,latex:`LaTeX`,less:`Less`,libreoffice:`LibreOffice`,"line pay":`LINE Pay`,lineageos:`LineageOS`,macos:`macOS`,mariadb:`MariaDB`,markdown:`Markdown`,markdownlint:`MarkdownLint`,mathjax:`MathJax`,mathml:`MathML`,mathtype:`MathType`,matlab:`MATLAB`,mediawiki:`MediaWiki`,memcached:`Memcached`,messagepack:`MessagePack`,metamask:`MetaMask`,mkdocs:`MkDocs`,mlaas:`MLaaS`,mlops:`MLOps`,mobx:`MobX`,mongodb:`MongoDB`,mongoose:`Mongoose`,"ms-dos":`MS-DOS`,mybatis:`MyBatis`,mysql:`MySQL`,"naive ui":`Naive UI`,naiveui:`NaiveUI`,neo4j:`Neo4j`,nestjs:`NestJS`,netbeans:`NetBeans`,netbios:`NetBIOS`,nextjs:`Next.js`,nixos:`NixOS`,nocodb:`NocoDB`,"node.js":`Node.js`,nosql:`NoSQL`,"notepad ++":`Notepad++`,npm:`npm`,numpy:`NumPy`,nuxtjs:`NuxtJS`,oauth:`OAuth`,obs:`OBS`,ocaml:`OCaml`,onedrive:`OneDrive`,onenote:`OneNote`,openai:`OpenAI`,openapi:`OpenAPI`,opencv:`OpenCV`,openfaas:`OpenFaaS`,openflow:`OpenFlow`,opengauss:`openGauss`,opengl:`OpenGL`,"opengl es":`OpenGL ES`,openjdk:`OpenJDK`,openlayers:`OpenLayers`,openpgp:`OpenPGP`,opensea:`OpenSea`,openssl:`OpenSSL`,openstack:`OpenStack`,openstreetmap:`OpenStreetMap`,opensuse:`openSUSE`,openvino:`OpenVINO`,openwrt:`OpenWrt`,opnsense:`OPNsense`,pagp:`PAgP`,paypal:`PayPal`,photoshop:`Photoshop`,php:`PHP`,phpstorm:`PhpStorm`,pihole:`Pi-hole`,planetscale:`PlanetScale`,postcss:`PostCSS`,postgis:`PostGIS`,postgresql:`PostgreSQL`,potplayer:`PotPlayer`,powerpoint:`PowerPoint`,powershell:`PowerShell`,premid:`PreMiD`,primevue:`PrimeVue`,protobuf:`Protobuf`,pycharm:`PyCharm`,pytorch:`PyTorch`,qtscript:`QtScript`,raii:`RAII`,"react native":`React Native`,redhat:`RedHat`,redisearch:`RediSearch`,redisjson:`RedisJSON`,rescript:`ReScript`,restful:`RESTful`,rethinkdb:`RethinkDB`,rsshub:`RSSHub`,rust:`Rust`,rxdb:`RxDB`,rxjs:`RxJS`,"samsung pay":`Samsung Pay`,sass:`Sass`,scss:`SCSS`,segmentfault:`SegmentFault`,"socket.io":`Socket.IO`,solarwinds:`SolarWinds`,spatiallite:`SpatialLite`,"spir-v":`SPIR-V`,springboot:`SpringBoot`,springcloud:`SpringCloud`,springmvc:`SpringMVC`,sqlite:`SQLite`,sqlserver:`SQLServer`,storybook:`Storybook`,stylus:`Stylus`,"sublime text":`Sublime Text`,surrealdb:`SurrealDB`,sveltekit:`SvelteKit`,"tailwind css":`Tailwind CSS`,tailwindcss:`TailwindCSS`,teamviewer:`TeamViewer`,tensorflow:`TensorFlow`,testflight:`TestFlight`,tex:`TeX`,threejs:`ThreeJS`,tianocore:`TianoCore`,tidb:`TiDB`,tiflash:`TiFlash`,tiktok:`TikTok`,tikv:`TiKV`,"travis ci":`Travis CI`,trpc:`tRPC`,tsconfig:`TSConfig`,tsdoc:`TSDoc`,tsdx:`TSdx`,turbopack:`Turbopack`,turborepo:`Turborepo`,typeorm:`TypeORM`,typescript:`TypeScript`,uniapp:`uniapp`,unifi:`UniFi`,unix:`UNIX`,unocss:`UnoCSS`,upnp:`UPnP`,vercel:`Vercel`,videolan:`VideoLAN`,vim:`Vim`,virtualbox:`VirtualBox`,"visual studio":`Visual Studio`,"visual studio code":`Visual Studio Code`,vitepress:`VitePress`,vividcortex:`VividCortex`,vlc:`VLC`,vmware:`VMware`,voip:`VoIP`,"vs code":`VS Code`,"vs codium":`VSCodium`,vscode:`VS Code`,vscodium:`VSCodium`,"vue cli":`Vue CLI`,vuepress:`VuePress`,vueuse:`VueUse`,vulkan:`Vulkan`,w3c:`W3C`,wasm:`Wasm`,watchos:`watchOS`,"web assembly":`WebAssembly`,webar:`WebAR`,webassembly:`WebAssembly`,webgl:`WebGL`,webgpu:`WebGPU`,webkit:`WebKit`,webpack:`webpack`,webrtc:`WebRTC`,websocket:`WebSocket`,webstorm:`WebStorm`,webvr:`WebVR`,webxr:`WebXR`,wechat:`WeChat`,"wechat pay":`WeChat Pay`,whatsapp:`WhatsApp`,"windi css":`Windi CSS`,windicss:`WindiCSS`,wireguard:`WireGuard`,wordpress:`WordPress`,xmind:`XMind`,xstate:`XState`,yapi:`YApi`};const NUMBER_CHAR_RE=/\d/,STR_SPLITTERS=[`-`,`_`,`/`,`.`];function isUppercase(L=``){if(!NUMBER_CHAR_RE.test(L))return L!==L.toLowerCase()}function splitByCase(L,J){let Y=J??STR_SPLITTERS,X=[];if(!L||typeof L!=`string`)return X;let Z=``,Q,$;for(let J of L){let L=Y.includes(J);if(L===!0){X.push(Z),Z=``,Q=void 0;continue}let ee=isUppercase(J);if($===!1){if(Q===!1&&ee===!0){X.push(Z),Z=J,Q=ee;continue}if(Q===!0&&ee===!1&&Z.length>1){let L=Z.at(-1);X.push(Z.slice(0,Math.max(0,Z.length-1))),Z=L+J,Q=ee;continue}}Z+=J,Q=ee,$=L}return X.push(Z),X}function upperFirst(L){return L?L[0].toUpperCase()+L.slice(1):``}const titleCaseExceptions=/^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;function titleCase(L,J){return(Array.isArray(L)?L:splitByCase(L)).filter(Boolean).map(L=>titleCaseExceptions.test(L)?L.toLowerCase():upperFirst(J?.normalize?L.toLowerCase():L)).join(` `)}const casePoliceDict={...abbreviates_default,...brands_default,...general_default,...products_default,...softwares_default};function firstOf(L){if(L!==void 0)return Array.isArray(L)?L[0]:L}function ensureArray(L){return L==null?[]:Array.isArray(L)?L:[L]}function collectField(L,J){return L===void 0?[]:(Array.isArray(L)?L:[L]).map(L=>J(L.data)).filter(L=>L!==void 0)}function collectArrayField(L,J){return L===void 0?[]:(Array.isArray(L)?L:[L]).flatMap(L=>J(L.data)??[])}function nonEmpty$5(L){return L.length>0?L:void 0}function splitCommaSeparated(L){return L===void 0?[]:L.split(`,`).map(L=>L.trim()).filter(L=>L.length>0)}function toDelimitedString(L,J=`, `){if(L!==void 0){if(Array.isArray(L)){let Y=L.filter(L=>L!==void 0);return Y.length>0?Y.join(J):void 0}return L}}function toMb(L){if(is.positiveNumber(L))return Math.round(L/1e3/1e3*100)/100}function stripNamespace(L){return path$1.basename(L)}function toAlias(L){if(is.nonEmptyString(L)){let J=titleCase(stripNamespace(L)).replaceAll(/ {2,}/g,` `).trim();return replaceCore(J,casePoliceDict)??J}}function escapeRegExp(L){return L.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}const REPLACEMENTS=new Map([[`javascript`,`JavaScript`],[`typescript`,`TypeScript`]]);function mixedStringsToArray(L,J){if(L===void 0)return;let Y=ensureArray(L).filter(L=>typeof L==`string`&&L.trim().length>0).map(L=>{if(!J)return L;let Y=L;for(let[L,X]of J){let J=new RegExp(escapeRegExp(L),`gi`);Y=Y.replace(J,X)}return Y});return Y.length>0?Y:void 0}function toLocalUrl(L,J){if(L===void 0||J===void 0)return;let Y=path$1.join(J,path$1.basename(L)).replaceAll(`\\`,`/`);return`file://${Y.startsWith(`/`)?``:`/`}${Y}`}function stripUndefined(L){if(Array.isArray(L)){let J=L.filter(L=>L!==void 0).map(L=>stripUndefined(L)).filter(L=>L!==void 0);return J.length>0?J:void 0}if(is.plainObject(L)){let J={},Y=!1;for(let[X,Z]of Object.entries(L))if(Z!==void 0){let L=stripUndefined(Z);L!==void 0&&(J[X]=L,Y=!0)}return Y?J:void 0}return L}function toBasicLicense(L){if(L!==void 0)return L.replace(`http://spdx.org/licenses/`,``).replace(`https://spdx.org/licenses/`,``)}function toBasicLicenses(...L){let J=L.flat().filter(L=>L!==void 0).map(L=>toBasicLicense(L)).filter(L=>L!==void 0);return J.length===0?void 0:J}function toBasicName(L){if(L!==void 0)return L.name===void 0?toDelimitedString([L.givenName,L.familyName],` `):L.name}function toBasicNames(L){if(L===void 0)return;let J=L.map(L=>toBasicName(L)).filter(L=>L!==void 0);return J.length>0?J:void 0}function hasDependencyWithId(L,J){return[...J.softwareSuggestions??[],...J.softwareRequirements??[]].some(({identifier:J,name:Y})=>J===L||Y===L)}function dependencyNames(L,J=`all`){return nonEmpty$5([...new Set([...J===`prod`?[]:L.softwareSuggestions??[],...J===`dev`?[]:L.softwareRequirements??[]].map(L=>L.name??L.identifier??void 0).filter(L=>L!==void 0))].toSorted())}function usesPnpm(L){let J=firstOf(L);return J?J.data.packageManager?.toLowerCase().startsWith(`pnpm`)??Object.hasOwn(J.data.engines??{},`pnpm`):!1}function isAuthoredBy(L,J){if(L===void 0||J===void 0||is.emptyArray(L)||is.emptyArray(J))return;let Y=new Set(ensureArray(J).map(L=>L.toLocaleLowerCase().trim()));return(toBasicNames(ensureArray(L))?.map(L=>L.toLocaleLowerCase().trim()))?.some(L=>Y.has(L))}function isOnGithubAccountOf(L,J){if(L===void 0||J===void 0)return;let Y=L.toLocaleLowerCase().trim();return Y.includes(`github.com/`)?ensureArray(J).some(L=>Y.includes(`/${L.toLocaleLowerCase().trim()}/`)):!1}function toStatusLegacy(L,J,Y,X){if(L===void 0||Y===void 0||X===void 0)return;let Z=isAuthoredBy(J,Y),Q=isOnGithubAccountOf(L,X);if(!(Z===void 0||Q===void 0))return!Z&&Q?`fork`:Z?`source`:`unmaintained`}function toStatus(L,J,Y,X,Z,Q){let $=isAuthoredBy(J,Z),ee=isAuthoredBy(Y,Z),te=isOnGithubAccountOf(L,Q),ne=te===void 0?`missing`:te?X?`my-fork`:`my-source`:X?`their-fork`:`their-source`,re=$===!0?`author`:ee===!0?`maintainer`:`missing`;return ne===`missing`&&re===`author`?`author`:ne===`missing`&&re===`maintainer`?`maintainer`:ne===`missing`&&re===`missing`?`unknown`:ne===`my-fork`&&re===`author`||ne===`my-fork`&&re===`maintainer`?`maintainer`:ne===`my-fork`&&re===`missing`?`observer`:ne===`my-source`&&re===`author`?`author`:ne===`my-source`&&re===`maintainer`?`maintainer`:ne===`my-source`&&re===`missing`?`author`:ne===`their-fork`&&re===`author`||ne===`their-fork`&&re===`maintainer`?`maintainer`:ne===`their-fork`&&re===`missing`?`observer`:ne===`their-source`&&re===`author`?`author`:ne===`their-source`&&re===`maintainer`?`maintainer`:ne===`their-source`&&re===`missing`?`observer`:`unknown`}function isValidUrl(L){return is.urlString(L)}const arduinoLibraryPropertiesPersonEntrySchema=object({email:string$2().optional(),name:string$2()}),arduinoLibraryPropertiesDependencyEntrySchema=object({name:string$2(),versionConstraint:string$2().optional()}),CANONICAL_CATEGORIES$1=[`Communication`,`Data Processing`,`Data Storage`,`Device Control`,`Display`,`Other`,`Sensors`,`Signal Input/Output`,`Timing`,`Uncategorized`],CATEGORY_MAP$1=new Map(CANONICAL_CATEGORIES$1.map(L=>[L.replaceAll(/[^a-z]/gi,``).toLowerCase(),L]));CATEGORY_MAP$1.set(`sensor`,`Sensors`);const arduinoLibraryPropertiesSchema=object({architectures:stringArray,authors:array(arduinoLibraryPropertiesPersonEntrySchema),category:_enum(CANONICAL_CATEGORIES$1).optional(),depends:array(arduinoLibraryPropertiesDependencyEntrySchema),email:nonEmptyString,includes:stringArray,license:nonEmptyString,maintainer:arduinoLibraryPropertiesPersonEntrySchema.optional(),name:nonEmptyString,paragraph:nonEmptyString,raw:record(string$2(),string$2()),repository:optionalUrl,sentence:nonEmptyString,url:optionalUrl,version:nonEmptyString});function parse$24(L){let J=parseProperties(L),Y=get$3(J,`includes`);return arduinoLibraryPropertiesSchema.parse({architectures:splitCommaSeparated(get$3(J,`architectures`)??`*`),authors:parsePersonList(get$3(J,`author`)??``),category:normalizeCategory(get$3(J,`category`)),depends:parseDependencies$4(get$3(J,`depends`)??get$3(J,`dependencies`)??``),email:nonEmpty$4(get$3(J,`email`)),includes:Y?splitCommaSeparated(Y):[],license:nonEmpty$4(get$3(J,`license`)),maintainer:parsePersonList(get$3(J,`maintainer`)??``)[0],name:nonEmpty$4(get$3(J,`name`)),paragraph:nonEmpty$4(get$3(J,`paragraph`)),raw:J,repository:nonEmpty$4(get$3(J,`repository`)),sentence:nonEmpty$4(get$3(J,`sentence`)),url:nonEmpty$4(get$3(J,`url`)),version:nonEmpty$4(get$3(J,`version`))})}function get$3(L,J){return L[J]}function nonEmpty$4(L){if(L===void 0)return;let J=L.trim();return J.length>0?J:void 0}function normalizeCategory(L){if(L===void 0)return;let J=L.trim();if(J.length!==0)for(let L of J.split(`,`)){let J=L.replaceAll(/[^a-z]/gi,``).toLowerCase();if(J.length===0)continue;let Y=CATEGORY_MAP$1.get(J);if(Y)return Y}}function parsePersonList(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let L of J.split(`,`)){let J=L.trim(),X=J.indexOf(`<`);if(X!==-1){let L=J.indexOf(`>`,X);if(L!==-1){let Z=J.slice(0,X).trim(),Q=J.slice(X+1,L).trim();(Z.length>0||Q.length>0)&&Y.push({email:Q.length>0?Q:void 0,name:Z});continue}}J.length>0&&Y.push({email:void 0,name:J})}return Y}function parseDependencies$4(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let L of J.split(`,`)){let J=L.trim();if(J.length===0)continue;let X=J.indexOf(`(`);if(X!==-1){let L=J.indexOf(`)`,X);if(L!==-1){let Z=J.slice(0,X).trim(),Q=J.slice(X+1,L).trim();if(Z.length>0){Y.push({name:Z,versionConstraint:Q.length>0?Q:void 0});continue}}}Y.push({name:J,versionConstraint:void 0})}return Y}const ARDUINO_SPECIFIC_FIELDS=new Set([`architectures`,`depends`,`dot_a_linkage`,`maintainer`]),PROCESSING_EXCLUSIVE_FIELDS=new Set([`authors`,`minrevision`,`prettyversion`]);function isArduinoLibraryProperties(L){let J=parseProperties(L),Y=new Set(Object.keys(J));if(!Y.has(`name`)||!Y.has(`version`)||!Y.has(`author`))return!1;for(let L of ARDUINO_SPECIFIC_FIELDS)if(Y.has(L))return!0;for(let L of PROCESSING_EXCLUSIVE_FIELDS)if(Y.has(L))return!1;return!0}const arduinoLibraryPropertiesSource=defineSource({async discover(L){return getMatches(L.options,[`library.properties`])},key:`arduinoLibraryProperties`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`);if(isArduinoLibraryProperties(Y))return{data:parse$24(Y),source:L}},phase:1}),nameStartChar=`:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD`;nameStartChar+``;const nameRegexp=`[`+nameStartChar+`][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*`,regexName=RegExp(`^`+nameRegexp+`$`);function getAllMatches(L,J){let Y=[],X=J.exec(L);for(;X;){let Z=[];Z.startIndex=J.lastIndex-X[0].length;let Q=X.length;for(let L=0;L<Q;L++)Z.push(X[L]);Y.push(Z),X=J.exec(L)}return Y}const isName=function(L){return regexName.exec(L)!=null};function isExist(L){return L!==void 0}const defaultOptions$2={allowBooleanAttributes:!1,unpairedTags:[]};function validate$1(L,J){J=Object.assign({},defaultOptions$2,J);let Y=[],X=!1,Z=!1;L[0]===``&&(L=L.substr(1));for(let Q=0;Q<L.length;Q++)if(L[Q]===`<`&&L[Q+1]===`?`){if(Q+=2,Q=readPI(L,Q),Q.err)return Q}else if(L[Q]===`<`){let $=Q;if(Q++,L[Q]===`!`){Q=readCommentAndCDATA(L,Q);continue}else{let ee=!1;L[Q]===`/`&&(ee=!0,Q++);let te=``;for(;Q<L.length&&L[Q]!==`>`&&L[Q]!==` `&&L[Q]!==` `&&L[Q]!==`
294
295
  `&&L[Q]!==`\r`;Q++)te+=L[Q];if(te=te.trim(),te[te.length-1]===`/`&&(te=te.substring(0,te.length-1),Q--),!validateTagName(te)){let J;return J=te.trim().length===0?`Invalid space after '<'.`:`Tag '`+te+`' is an invalid name.`,getErrorObject(`InvalidTag`,J,getLineNumberForPosition(L,Q))}let ne=readAttributeStr(L,Q);if(ne===!1)return getErrorObject(`InvalidAttr`,`Attributes for '`+te+`' have open quote.`,getLineNumberForPosition(L,Q));let re=ne.value;if(Q=ne.index,re[re.length-1]===`/`){let Y=Q-re.length;re=re.substring(0,re.length-1);let Z=validateAttributeString(re,J);if(Z===!0)X=!0;else return getErrorObject(Z.err.code,Z.err.msg,getLineNumberForPosition(L,Y+Z.err.line))}else if(ee){if(!ne.tagClosed)return getErrorObject(`InvalidTag`,`Closing tag '`+te+`' doesn't have proper closing.`,getLineNumberForPosition(L,Q));if(re.trim().length>0)return getErrorObject(`InvalidTag`,`Closing tag '`+te+`' can't have attributes or invalid starting.`,getLineNumberForPosition(L,$));if(Y.length===0)return getErrorObject(`InvalidTag`,`Closing tag '`+te+`' has not been opened.`,getLineNumberForPosition(L,$));{let J=Y.pop();if(te!==J.tagName){let Y=getLineNumberForPosition(L,J.tagStartPos);return getErrorObject(`InvalidTag`,`Expected closing tag '`+J.tagName+`' (opened in line `+Y.line+`, col `+Y.col+`) instead of closing tag '`+te+`'.`,getLineNumberForPosition(L,$))}Y.length==0&&(Z=!0)}}else{let ee=validateAttributeString(re,J);if(ee!==!0)return getErrorObject(ee.err.code,ee.err.msg,getLineNumberForPosition(L,Q-re.length+ee.err.line));if(Z===!0)return getErrorObject(`InvalidXml`,`Multiple possible root nodes found.`,getLineNumberForPosition(L,Q));J.unpairedTags.indexOf(te)!==-1||Y.push({tagName:te,tagStartPos:$}),X=!0}for(Q++;Q<L.length;Q++)if(L[Q]===`<`)if(L[Q+1]===`!`){Q++,Q=readCommentAndCDATA(L,Q);continue}else if(L[Q+1]===`?`){if(Q=readPI(L,++Q),Q.err)return Q}else break;else if(L[Q]===`&`){let J=validateAmpersand(L,Q);if(J==-1)return getErrorObject(`InvalidChar`,`char '&' is not expected.`,getLineNumberForPosition(L,Q));Q=J}else if(Z===!0&&!isWhiteSpace(L[Q]))return getErrorObject(`InvalidXml`,`Extra text at the end`,getLineNumberForPosition(L,Q));L[Q]===`<`&&Q--}}else{if(isWhiteSpace(L[Q]))continue;return getErrorObject(`InvalidChar`,`char '`+L[Q]+`' is not expected.`,getLineNumberForPosition(L,Q))}return X?Y.length==1?getErrorObject(`InvalidTag`,`Unclosed tag '`+Y[0].tagName+`'.`,getLineNumberForPosition(L,Y[0].tagStartPos)):Y.length>0?getErrorObject(`InvalidXml`,`Invalid '`+JSON.stringify(Y.map(L=>L.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):!0:getErrorObject(`InvalidXml`,`Start tag expected.`,1)}function isWhiteSpace(L){return L===` `||L===` `||L===`
295
296
  `||L===`\r`}function readPI(L,J){let Y=J;for(;J<L.length;J++)if(L[J]==`?`||L[J]==` `){let X=L.substr(Y,J-Y);if(J>5&&X===`xml`)return getErrorObject(`InvalidXml`,`XML declaration allowed only at the start of the document.`,getLineNumberForPosition(L,J));if(L[J]==`?`&&L[J+1]==`>`){J++;break}else continue}return J}function readCommentAndCDATA(L,J){if(L.length>J+5&&L[J+1]===`-`&&L[J+2]===`-`){for(J+=3;J<L.length;J++)if(L[J]===`-`&&L[J+1]===`-`&&L[J+2]===`>`){J+=2;break}}else if(L.length>J+8&&L[J+1]===`D`&&L[J+2]===`O`&&L[J+3]===`C`&&L[J+4]===`T`&&L[J+5]===`Y`&&L[J+6]===`P`&&L[J+7]===`E`){let Y=1;for(J+=8;J<L.length;J++)if(L[J]===`<`)Y++;else if(L[J]===`>`&&(Y--,Y===0))break}else if(L.length>J+9&&L[J+1]===`[`&&L[J+2]===`C`&&L[J+3]===`D`&&L[J+4]===`A`&&L[J+5]===`T`&&L[J+6]===`A`&&L[J+7]===`[`){for(J+=8;J<L.length;J++)if(L[J]===`]`&&L[J+1]===`]`&&L[J+2]===`>`){J+=2;break}}return J}const doubleQuote=`"`,singleQuote=`'`;function readAttributeStr(L,J){let Y=``,X=``,Z=!1;for(;J<L.length;J++){if(L[J]===doubleQuote||L[J]===singleQuote)X===``?X=L[J]:X!==L[J]||(X=``);else if(L[J]===`>`&&X===``){Z=!0;break}Y+=L[J]}return X===``?{value:Y,index:J,tagClosed:Z}:!1}const validAttrStrRegxp=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function validateAttributeString(L,J){let Y=getAllMatches(L,validAttrStrRegxp),X={};for(let L=0;L<Y.length;L++){if(Y[L][1].length===0)return getErrorObject(`InvalidAttr`,`Attribute '`+Y[L][2]+`' has no space in starting.`,getPositionFromMatch(Y[L]));if(Y[L][3]!==void 0&&Y[L][4]===void 0)return getErrorObject(`InvalidAttr`,`Attribute '`+Y[L][2]+`' is without value.`,getPositionFromMatch(Y[L]));if(Y[L][3]===void 0&&!J.allowBooleanAttributes)return getErrorObject(`InvalidAttr`,`boolean attribute '`+Y[L][2]+`' is not allowed.`,getPositionFromMatch(Y[L]));let Z=Y[L][2];if(!validateAttrName(Z))return getErrorObject(`InvalidAttr`,`Attribute '`+Z+`' is an invalid name.`,getPositionFromMatch(Y[L]));if(!Object.prototype.hasOwnProperty.call(X,Z))X[Z]=1;else return getErrorObject(`InvalidAttr`,`Attribute '`+Z+`' is repeated.`,getPositionFromMatch(Y[L]))}return!0}function validateNumberAmpersand(L,J){let Y=/\d/;for(L[J]===`x`&&(J++,Y=/[\da-fA-F]/);J<L.length;J++){if(L[J]===`;`)return J;if(!L[J].match(Y))break}return-1}function validateAmpersand(L,J){if(J++,L[J]===`;`)return-1;if(L[J]===`#`)return J++,validateNumberAmpersand(L,J);let Y=0;for(;J<L.length;J++,Y++)if(!(L[J].match(/\w/)&&Y<20)){if(L[J]===`;`)break;return-1}return J}function getErrorObject(L,J,Y){return{err:{code:L,msg:J,line:Y.line||Y,col:Y.col}}}function validateAttrName(L){return isName(L)}function validateTagName(L){return isName(L)}function getLineNumberForPosition(L,J){let Y=L.substring(0,J).split(/\r?\n/);return{line:Y.length,col:Y[Y.length-1].length+1}}function getPositionFromMatch(L){return L.startIndex+L[1].length}const defaultOptions$1={preserveOrder:!1,attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(L,J){return J},attributeValueProcessor:function(L,J){return J},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(L,J,Y){return L},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0};function normalizeProcessEntities(L){return typeof L==`boolean`?{enabled:L,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof L==`object`&&L?{enabled:L.enabled!==!1,maxEntitySize:L.maxEntitySize??1e4,maxExpansionDepth:L.maxExpansionDepth??10,maxTotalExpansions:L.maxTotalExpansions??1e3,maxExpandedLength:L.maxExpandedLength??1e5,maxEntityCount:L.maxEntityCount??100,allowedTags:L.allowedTags??null,tagFilter:L.tagFilter??null}:normalizeProcessEntities(!0)}const buildOptions=function(L){let J=Object.assign({},defaultOptions$1,L);return J.processEntities=normalizeProcessEntities(J.processEntities),J.stopNodes&&Array.isArray(J.stopNodes)&&(J.stopNodes=J.stopNodes.map(L=>typeof L==`string`&&L.startsWith(`*.`)?`..`+L.substring(2):L)),J};let METADATA_SYMBOL$1;METADATA_SYMBOL$1=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var XmlNode=class{constructor(L){this.tagname=L,this.child=[],this[`:@`]=Object.create(null)}add(L,J){L===`__proto__`&&(L=`#__proto__`),this.child.push({[L]:J})}addChild(L,J){L.tagname===`__proto__`&&(L.tagname=`#__proto__`),L[`:@`]&&Object.keys(L[`:@`]).length>0?this.child.push({[L.tagname]:L.child,":@":L[`:@`]}):this.child.push({[L.tagname]:L.child}),J!==void 0&&(this.child[this.child.length-1][METADATA_SYMBOL$1]={startIndex:J})}static getMetaDataSymbol(){return METADATA_SYMBOL$1}},DocTypeReader=class{constructor(L){this.suppressValidationErr=!L,this.options=L}readDocType(L,J){let Y=Object.create(null),X=0;if(L[J+3]===`O`&&L[J+4]===`C`&&L[J+5]===`T`&&L[J+6]===`Y`&&L[J+7]===`P`&&L[J+8]===`E`){J+=9;let Z=1,Q=!1,$=!1,ee=``;for(;J<L.length;J++)if(L[J]===`<`&&!$){if(Q&&hasSeq(L,`!ENTITY`,J)){J+=7;let Z,Q;if([Z,Q,J]=this.readEntityExp(L,J+1,this.suppressValidationErr),Q.indexOf(`&`)===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&X>=this.options.maxEntityCount)throw Error(`Entity count (${X+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let L=Z.replace(/[.\-+*:]/g,`\\.`);Y[Z]={regx:RegExp(`&${L};`,`g`),val:Q},X++}}else if(Q&&hasSeq(L,`!ELEMENT`,J)){J+=8;let{index:Y}=this.readElementExp(L,J+1);J=Y}else if(Q&&hasSeq(L,`!ATTLIST`,J))J+=8;else if(Q&&hasSeq(L,`!NOTATION`,J)){J+=9;let{index:Y}=this.readNotationExp(L,J+1,this.suppressValidationErr);J=Y}else if(hasSeq(L,`!--`,J))$=!0;else throw Error(`Invalid DOCTYPE`);Z++,ee=``}else if(L[J]===`>`){if($?L[J-1]===`-`&&L[J-2]===`-`&&($=!1,Z--):Z--,Z===0)break}else L[J]===`[`?Q=!0:ee+=L[J];if(Z!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:Y,i:J}}readEntityExp(L,J){J=skipWhitespace(L,J);let Y=``;for(;J<L.length&&!/\s/.test(L[J])&&L[J]!==`"`&&L[J]!==`'`;)Y+=L[J],J++;if(validateEntityName(Y),J=skipWhitespace(L,J),!this.suppressValidationErr){if(L.substring(J,J+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(L[J]===`%`)throw Error(`Parameter entities are not supported`)}let X=``;if([J,X]=this.readIdentifierVal(L,J,`entity`),this.options.enabled!==!1&&this.options.maxEntitySize&&X.length>this.options.maxEntitySize)throw Error(`Entity "${Y}" size (${X.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return J--,[Y,X,J]}readNotationExp(L,J){J=skipWhitespace(L,J);let Y=``;for(;J<L.length&&!/\s/.test(L[J]);)Y+=L[J],J++;!this.suppressValidationErr&&validateEntityName(Y),J=skipWhitespace(L,J);let X=L.substring(J,J+6).toUpperCase();if(!this.suppressValidationErr&&X!==`SYSTEM`&&X!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${X}"`);J+=X.length,J=skipWhitespace(L,J);let Z=null,Q=null;if(X===`PUBLIC`)[J,Z]=this.readIdentifierVal(L,J,`publicIdentifier`),J=skipWhitespace(L,J),(L[J]===`"`||L[J]===`'`)&&([J,Q]=this.readIdentifierVal(L,J,`systemIdentifier`));else if(X===`SYSTEM`&&([J,Q]=this.readIdentifierVal(L,J,`systemIdentifier`),!this.suppressValidationErr&&!Q))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:Y,publicIdentifier:Z,systemIdentifier:Q,index:--J}}readIdentifierVal(L,J,Y){let X=``,Z=L[J];if(Z!==`"`&&Z!==`'`)throw Error(`Expected quoted string, found "${Z}"`);for(J++;J<L.length&&L[J]!==Z;)X+=L[J],J++;if(L[J]!==Z)throw Error(`Unterminated ${Y} value`);return J++,[J,X]}readElementExp(L,J){J=skipWhitespace(L,J);let Y=``;for(;J<L.length&&!/\s/.test(L[J]);)Y+=L[J],J++;if(!this.suppressValidationErr&&!isName(Y))throw Error(`Invalid element name: "${Y}"`);J=skipWhitespace(L,J);let X=``;if(L[J]===`E`&&hasSeq(L,`MPTY`,J))J+=4;else if(L[J]===`A`&&hasSeq(L,`NY`,J))J+=2;else if(L[J]===`(`){for(J++;J<L.length&&L[J]!==`)`;)X+=L[J],J++;if(L[J]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${L[J]}"`);return{elementName:Y,contentModel:X.trim(),index:J}}readAttlistExp(L,J){J=skipWhitespace(L,J);let Y=``;for(;J<L.length&&!/\s/.test(L[J]);)Y+=L[J],J++;validateEntityName(Y),J=skipWhitespace(L,J);let X=``;for(;J<L.length&&!/\s/.test(L[J]);)X+=L[J],J++;if(!validateEntityName(X))throw Error(`Invalid attribute name: "${X}"`);J=skipWhitespace(L,J);let Z=``;if(L.substring(J,J+8).toUpperCase()===`NOTATION`){if(Z=`NOTATION`,J+=8,J=skipWhitespace(L,J),L[J]!==`(`)throw Error(`Expected '(', found "${L[J]}"`);J++;let Y=[];for(;J<L.length&&L[J]!==`)`;){let X=``;for(;J<L.length&&L[J]!==`|`&&L[J]!==`)`;)X+=L[J],J++;if(X=X.trim(),!validateEntityName(X))throw Error(`Invalid notation name: "${X}"`);Y.push(X),L[J]===`|`&&(J++,J=skipWhitespace(L,J))}if(L[J]!==`)`)throw Error(`Unterminated list of notations`);J++,Z+=` (`+Y.join(`|`)+`)`}else{for(;J<L.length&&!/\s/.test(L[J]);)Z+=L[J],J++;if(!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(Z.toUpperCase()))throw Error(`Invalid attribute type: "${Z}"`)}J=skipWhitespace(L,J);let Q=``;return L.substring(J,J+8).toUpperCase()===`#REQUIRED`?(Q=`#REQUIRED`,J+=8):L.substring(J,J+7).toUpperCase()===`#IMPLIED`?(Q=`#IMPLIED`,J+=7):[J,Q]=this.readIdentifierVal(L,J,`ATTLIST`),{elementName:Y,attributeName:X,attributeType:Z,defaultValue:Q,index:J}}};const skipWhitespace=(L,J)=>{for(;J<L.length&&/\s/.test(L[J]);)J++;return J};function hasSeq(L,J,Y){for(let X=0;X<J.length;X++)if(J[X]!==L[Y+X+1])return!1;return!0}function validateEntityName(L){if(isName(L))return L;throw Error(`Invalid entity name ${L}`)}const hexRegex=/^[-+]?0x[a-fA-F0-9]+$/,numRegex=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,consider={hex:!0,leadingZeros:!0,decimalPoint:`.`,eNotation:!0,infinity:`original`};function toNumber$1(L,J={}){if(J=Object.assign({},consider,J),!L||typeof L!=`string`)return L;let Y=L.trim();if(J.skipLike!==void 0&&J.skipLike.test(Y))return L;if(L===`0`)return 0;if(J.hex&&hexRegex.test(Y))return parse_int(Y,16);if(!isFinite(Y))return handleInfinity(L,Number(Y),J);if(Y.includes(`e`)||Y.includes(`E`))return resolveEnotation(L,Y,J);{let X=numRegex.exec(Y);if(X){let Z=X[1]||``,Q=X[2],$=trimZeros(X[3]),ee=Z?L[Q.length+1]===`.`:L[Q.length]===`.`;if(!J.leadingZeros&&(Q.length>1||Q.length===1&&!ee))return L;{let X=Number(Y),ee=String(X);if(X===0)return X;if(ee.search(/[eE]/)!==-1)return J.eNotation?X:L;if(Y.indexOf(`.`)!==-1)return ee===`0`||ee===$||ee===`${Z}${$}`?X:L;let te=Q?$:Y;return Q?te===ee||Z+te===ee?X:L:te===ee||te===Z+ee?X:L}}else return L}}const eNotationRegx=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function resolveEnotation(L,J,Y){if(!Y.eNotation)return L;let X=J.match(eNotationRegx);if(X){let Z=X[1]||``,Q=X[3].indexOf(`e`)===-1?`E`:`e`,$=X[2],ee=Z?L[$.length+1]===Q:L[$.length]===Q;return $.length>1&&ee?L:$.length===1&&(X[3].startsWith(`.${Q}`)||X[3][0]===Q)?Number(J):Y.leadingZeros&&!ee?(J=(X[1]||``)+X[3],Number(J)):L}else return L}function trimZeros(L){return L&&L.indexOf(`.`)!==-1?(L=L.replace(/0+$/,``),L===`.`?L=`0`:L[0]===`.`?L=`0`+L:L[L.length-1]===`.`&&(L=L.substring(0,L.length-1)),L):L}function parse_int(L,J){if(parseInt)return parseInt(L,J);if(Number.parseInt)return Number.parseInt(L,J);if(window&&window.parseInt)return window.parseInt(L,J);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function handleInfinity(L,J,Y){let X=J===1/0;switch(Y.infinity.toLowerCase()){case`null`:return null;case`infinity`:return J;case`string`:return X?`Infinity`:`-Infinity`;default:return L}}function getIgnoreAttributesFn(L){return typeof L==`function`?L:Array.isArray(L)?J=>{for(let Y of L)if(typeof Y==`string`&&J===Y||Y instanceof RegExp&&Y.test(J))return!0}:()=>!1}var Expression=class{constructor(L,J={}){this.pattern=L,this.separator=J.separator||`.`,this.segments=this._parse(L),this._hasDeepWildcard=this.segments.some(L=>L.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(L=>L.attrName!==void 0),this._hasPositionSelector=this.segments.some(L=>L.position!==void 0)}_parse(L){let J=[],Y=0,X=``;for(;Y<L.length;)L[Y]===this.separator?Y+1<L.length&&L[Y+1]===this.separator?(X.trim()&&(J.push(this._parseSegment(X.trim())),X=``),J.push({type:`deep-wildcard`}),Y+=2):(X.trim()&&J.push(this._parseSegment(X.trim())),X=``,Y++):(X+=L[Y],Y++);return X.trim()&&J.push(this._parseSegment(X.trim())),J}_parseSegment(L){let J={type:`tag`},Y=null,X=L,Z=L.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(Z&&(X=Z[1]+Z[3],Z[2])){let L=Z[2].slice(1,-1);L&&(Y=L)}let Q,$=X;if(X.includes(`::`)){let J=X.indexOf(`::`);if(Q=X.substring(0,J).trim(),$=X.substring(J+2).trim(),!Q)throw Error(`Invalid namespace in pattern: ${L}`)}let ee,te=null;if($.includes(`:`)){let L=$.lastIndexOf(`:`),J=$.substring(0,L).trim(),Y=$.substring(L+1).trim();[`first`,`last`,`odd`,`even`].includes(Y)||/^nth\(\d+\)$/.test(Y)?(ee=J,te=Y):ee=$}else ee=$;if(!ee)throw Error(`Invalid segment pattern: ${L}`);if(J.tag=ee,Q&&(J.namespace=Q),Y)if(Y.includes(`=`)){let L=Y.indexOf(`=`);J.attrName=Y.substring(0,L).trim(),J.attrValue=Y.substring(L+1).trim()}else J.attrName=Y.trim();if(te){let L=te.match(/^nth\((\d+)\)$/);L?(J.position=`nth`,J.positionValue=parseInt(L[1],10)):J.position=te}return J}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}},Matcher=class{constructor(L={}){this.separator=L.separator||`.`,this.path=[],this.siblingStacks=[]}push(L,J=null,Y=null){if(this.path.length>0){let L=this.path[this.path.length-1];L.values=void 0}let X=this.path.length;this.siblingStacks[X]||(this.siblingStacks[X]=new Map);let Z=this.siblingStacks[X],Q=Y?`${Y}:${L}`:L,$=Z.get(Q)||0,ee=0;for(let L of Z.values())ee+=L;Z.set(Q,$+1);let te={tag:L,position:ee,counter:$};Y!=null&&(te.namespace=Y),J!=null&&(te.values=J),this.path.push(te)}pop(){if(this.path.length===0)return;let L=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),L}updateCurrent(L){if(this.path.length>0){let J=this.path[this.path.length-1];L!=null&&(J.values=L)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(L){if(this.path.length!==0)return this.path[this.path.length-1].values?.[L]}hasAttr(L){if(this.path.length===0)return!1;let J=this.path[this.path.length-1];return J.values!==void 0&&L in J.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(L,J=!0){let Y=L||this.separator;return this.path.map(L=>J&&L.namespace?`${L.namespace}:${L.tag}`:L.tag).join(Y)}toArray(){return this.path.map(L=>L.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(L){let J=L.segments;return J.length===0?!1:L.hasDeepWildcard()?this._matchWithDeepWildcard(J):this._matchSimple(J)}_matchSimple(L){if(this.path.length!==L.length)return!1;for(let J=0;J<L.length;J++){let Y=L[J],X=this.path[J],Z=J===this.path.length-1;if(!this._matchSegment(Y,X,Z))return!1}return!0}_matchWithDeepWildcard(L){let J=this.path.length-1,Y=L.length-1;for(;Y>=0&&J>=0;){let X=L[Y];if(X.type===`deep-wildcard`){if(Y--,Y<0)return!0;let X=L[Y],Z=!1;for(let L=J;L>=0;L--){let Q=L===this.path.length-1;if(this._matchSegment(X,this.path[L],Q)){J=L-1,Y--,Z=!0;break}}if(!Z)return!1}else{let L=J===this.path.length-1;if(!this._matchSegment(X,this.path[J],L))return!1;J--,Y--}}return Y<0}_matchSegment(L,J,Y){if(L.tag!==`*`&&L.tag!==J.tag||L.namespace!==void 0&&L.namespace!==`*`&&L.namespace!==J.namespace)return!1;if(L.attrName!==void 0){if(!Y||!J.values||!(L.attrName in J.values))return!1;if(L.attrValue!==void 0){let Y=J.values[L.attrName];if(String(Y)!==String(L.attrValue))return!1}}if(L.position!==void 0){if(!Y)return!1;let X=J.counter??0;if(L.position===`first`&&X!==0||L.position===`odd`&&X%2!=1||L.position===`even`&&X%2!=0||L.position===`nth`&&X!==L.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(L=>({...L})),siblingStacks:this.siblingStacks.map(L=>new Map(L))}}restore(L){this.path=L.path.map(L=>({...L})),this.siblingStacks=L.siblingStacks.map(L=>new Map(L))}};function extractRawAttributes(L,J){if(!L)return{};let Y=J.attributesGroupName?L[J.attributesGroupName]:L;if(!Y)return{};let X={};for(let L in Y)if(L.startsWith(J.attributeNamePrefix)){let Z=L.substring(J.attributeNamePrefix.length);X[Z]=Y[L]}else X[L]=Y[L];return X}function extractNamespace(L){if(!L||typeof L!=`string`)return;let J=L.indexOf(`:`);if(J!==-1&&J>0){let Y=L.substring(0,J);if(Y!==`xmlns`)return Y}}var OrderedObjParser=class{constructor(L){if(this.options=L,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:`'`},gt:{regex:/&(gt|#62|#x3E);/g,val:`>`},lt:{regex:/&(lt|#60|#x3C);/g,val:`<`},quot:{regex:/&(quot|#34|#x22);/g,val:`"`}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:`&`},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:` `},cent:{regex:/&(cent|#162);/g,val:`¢`},pound:{regex:/&(pound|#163);/g,val:`£`},yen:{regex:/&(yen|#165);/g,val:`¥`},euro:{regex:/&(euro|#8364);/g,val:`€`},copyright:{regex:/&(copy|#169);/g,val:`©`},reg:{regex:/&(reg|#174);/g,val:`®`},inr:{regex:/&(inr|#8377);/g,val:`₹`},num_dec:{regex:/&#([0-9]{1,7});/g,val:(L,J)=>fromCodePoint(J,10,`&#`)},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(L,J)=>fromCodePoint(J,16,`&#x`)}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new Matcher,this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let L=0;L<this.options.stopNodes.length;L++){let J=this.options.stopNodes[L];typeof J==`string`?this.stopNodeExpressions.push(new Expression(J)):J instanceof Expression&&this.stopNodeExpressions.push(J)}}}};function addExternalEntities(L){let J=Object.keys(L);for(let Y=0;Y<J.length;Y++){let X=J[Y],Z=X.replace(/[.\-+*:]/g,`\\.`);this.lastEntities[X]={regex:RegExp(`&`+Z+`;`,`g`),val:L[X]}}}function parseTextData(L,J,Y,X,Z,Q,$){if(L!==void 0&&(this.options.trimValues&&!X&&(L=L.trim()),L.length>0)){$||(L=this.replaceEntitiesValue(L,J,Y));let X=this.options.jPath?Y.toString():Y,ee=this.options.tagValueProcessor(J,L,X,Z,Q);return ee==null?L:typeof ee!=typeof L||ee!==L?ee:this.options.trimValues||L.trim()===L?parseValue$1(L,this.options.parseTagValue,this.options.numberParseOptions):L}}function resolveNameSpace(L){if(this.options.removeNSPrefix){let J=L.split(`:`),Y=L.charAt(0)===`/`?`/`:``;if(J[0]===`xmlns`)return``;J.length===2&&(L=Y+J[1])}return L}const attrsRegx=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function buildAttributesMap(L,J,Y){if(this.options.ignoreAttributes!==!0&&typeof L==`string`){let X=getAllMatches(L,attrsRegx),Z=X.length,Q={},$={};for(let L=0;L<Z;L++){let Z=this.resolveNameSpace(X[L][1]),Q=X[L][4];if(Z.length&&Q!==void 0){let L=Q;this.options.trimValues&&(L=L.trim()),L=this.replaceEntitiesValue(L,Y,J),$[Z]=L}}Object.keys($).length>0&&typeof J==`object`&&J.updateCurrent&&J.updateCurrent($);for(let L=0;L<Z;L++){let Z=this.resolveNameSpace(X[L][1]),$=this.options.jPath?J.toString():J;if(this.ignoreAttributesFn(Z,$))continue;let ee=X[L][4],te=this.options.attributeNamePrefix+Z;if(Z.length)if(this.options.transformAttributeName&&(te=this.options.transformAttributeName(te)),te===`__proto__`&&(te=`#__proto__`),ee!==void 0){this.options.trimValues&&(ee=ee.trim()),ee=this.replaceEntitiesValue(ee,Y,J);let L=this.options.jPath?J.toString():J,X=this.options.attributeValueProcessor(Z,ee,L);X==null?Q[te]=ee:typeof X!=typeof ee||X!==ee?Q[te]=X:Q[te]=parseValue$1(ee,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(Q[te]=!0)}if(!Object.keys(Q).length)return;if(this.options.attributesGroupName){let L={};return L[this.options.attributesGroupName]=Q,L}return Q}}const parseXml=function(L){L=L.replace(/\r\n?/g,`
296
- `);let J=new XmlNode(`!xml`),Y=J,X=``;this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let Z=new DocTypeReader(this.options.processEntities);for(let Q=0;Q<L.length;Q++)if(L[Q]===`<`)if(L[Q+1]===`/`){let J=findClosingIndex(L,`>`,Q,`Closing Tag is not closed.`),Z=L.substring(Q+2,J).trim();if(this.options.removeNSPrefix){let L=Z.indexOf(`:`);L!==-1&&(Z=Z.substr(L+1))}this.options.transformTagName&&(Z=this.options.transformTagName(Z)),Y&&(X=this.saveTextToParentTag(X,Y,this.matcher));let $=this.matcher.getCurrentTag();if(Z&&this.options.unpairedTags.indexOf(Z)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${Z}>`);$&&this.options.unpairedTags.indexOf($)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,Y=this.tagsNodeStack.pop(),X=``,Q=J}else if(L[Q+1]===`?`){let J=readTagExp(L,Q,!1,`?>`);if(!J)throw Error(`Pi Tag is not closed.`);if(X=this.saveTextToParentTag(X,Y,this.matcher),!(this.options.ignoreDeclaration&&J.tagName===`?xml`||this.options.ignorePiTags)){let L=new XmlNode(J.tagName);L.add(this.options.textNodeName,``),J.tagName!==J.tagExp&&J.attrExpPresent&&(L[`:@`]=this.buildAttributesMap(J.tagExp,this.matcher,J.tagName)),this.addChild(Y,L,this.matcher,Q)}Q=J.closeIndex+1}else if(L.substr(Q+1,3)===`!--`){let J=findClosingIndex(L,`-->`,Q+4,`Comment is not closed.`);if(this.options.commentPropName){let Z=L.substring(Q+4,J-2);X=this.saveTextToParentTag(X,Y,this.matcher),Y.add(this.options.commentPropName,[{[this.options.textNodeName]:Z}])}Q=J}else if(L.substr(Q+1,2)===`!D`){let J=Z.readDocType(L,Q);this.docTypeEntities=J.entities,Q=J.i}else if(L.substr(Q+1,2)===`![`){let J=findClosingIndex(L,`]]>`,Q,`CDATA is not closed.`)-2,Z=L.substring(Q+9,J);X=this.saveTextToParentTag(X,Y,this.matcher);let $=this.parseTextData(Z,Y.tagname,this.matcher,!0,!1,!0,!0);$??=``,this.options.cdataPropName?Y.add(this.options.cdataPropName,[{[this.options.textNodeName]:Z}]):Y.add(this.options.textNodeName,$),Q=J+2}else{let Z=readTagExp(L,Q,this.options.removeNSPrefix);if(!Z){let J=L.substring(Math.max(0,Q-50),Math.min(L.length,Q+50));throw Error(`readTagExp returned undefined at position ${Q}. Context: "${J}"`)}let $=Z.tagName,ee=Z.rawTagName,te=Z.tagExp,ne=Z.attrExpPresent,re=Z.closeIndex;if(this.options.transformTagName){let L=this.options.transformTagName($);te===$&&(te=L),$=L}if(this.options.strictReservedNames&&($===this.options.commentPropName||$===this.options.cdataPropName))throw Error(`Invalid tag name: ${$}`);Y&&X&&Y.tagname!==`!xml`&&(X=this.saveTextToParentTag(X,Y,this.matcher,!1));let ie=Y;ie&&this.options.unpairedTags.indexOf(ie.tagname)!==-1&&(Y=this.tagsNodeStack.pop(),this.matcher.pop());let ae=!1;te.length>0&&te.lastIndexOf(`/`)===te.length-1&&(ae=!0,$[$.length-1]===`/`?($=$.substr(0,$.length-1),te=$):te=te.substr(0,te.length-1),ne=$!==te);let oe=null,se;se=extractNamespace(ee),$!==J.tagname&&this.matcher.push($,{},se),$!==te&&ne&&(oe=this.buildAttributesMap(te,this.matcher,$),oe&&extractRawAttributes(oe,this.options)),$!==J.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let ce=Q;if(this.isCurrentNodeStopNode){let J=``;if(ae)Q=Z.closeIndex;else if(this.options.unpairedTags.indexOf($)!==-1)Q=Z.closeIndex;else{let Y=this.readStopNodeData(L,ee,re+1);if(!Y)throw Error(`Unexpected end of ${ee}`);Q=Y.i,J=Y.tagContent}let X=new XmlNode($);oe&&(X[`:@`]=oe),X.add(this.options.textNodeName,J),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(Y,X,this.matcher,ce)}else{if(ae){if(this.options.transformTagName){let L=this.options.transformTagName($);te===$&&(te=L),$=L}let L=new XmlNode($);oe&&(L[`:@`]=oe),this.addChild(Y,L,this.matcher,ce),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf($)!==-1){let L=new XmlNode($);oe&&(L[`:@`]=oe),this.addChild(Y,L,this.matcher,ce),this.matcher.pop(),this.isCurrentNodeStopNode=!1,Q=Z.closeIndex;continue}else{let L=new XmlNode($);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(Y),oe&&(L[`:@`]=oe),this.addChild(Y,L,this.matcher,ce),Y=L}X=``,Q=re}}else X+=L[Q];return J.child};function addChild(L,J,Y,X){this.options.captureMetaData||(X=void 0);let Z=this.options.jPath?Y.toString():Y,Q=this.options.updateTag(J.tagname,Z,J[`:@`]);Q===!1||(typeof Q==`string`&&(J.tagname=Q),L.addChild(J,X))}function replaceEntitiesValue(L,J,Y){let X=this.options.processEntities;if(!X||!X.enabled)return L;if(X.allowedTags){let Z=this.options.jPath?Y.toString():Y;if(!(Array.isArray(X.allowedTags)?X.allowedTags.includes(J):X.allowedTags(J,Z)))return L}if(X.tagFilter){let Z=this.options.jPath?Y.toString():Y;if(!X.tagFilter(J,Z))return L}for(let J in this.docTypeEntities){let Y=this.docTypeEntities[J],Z=L.match(Y.regx);if(Z){if(this.entityExpansionCount+=Z.length,X.maxTotalExpansions&&this.entityExpansionCount>X.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${X.maxTotalExpansions}`);let J=L.length;if(L=L.replace(Y.regx,Y.val),X.maxExpandedLength&&(this.currentExpandedLength+=L.length-J,this.currentExpandedLength>X.maxExpandedLength))throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${X.maxExpandedLength}`)}}if(L.indexOf(`&`)===-1)return L;for(let J in this.lastEntities){let Y=this.lastEntities[J];L=L.replace(Y.regex,Y.val)}if(L.indexOf(`&`)===-1)return L;if(this.options.htmlEntities)for(let J in this.htmlEntities){let Y=this.htmlEntities[J];L=L.replace(Y.regex,Y.val)}return L=L.replace(this.ampEntity.regex,this.ampEntity.val),L}function saveTextToParentTag(L,J,Y,X){return L&&=(X===void 0&&(X=J.child.length===0),L=this.parseTextData(L,J.tagname,Y,!1,J[`:@`]?Object.keys(J[`:@`]).length!==0:!1,X),L!==void 0&&L!==``&&J.add(this.options.textNodeName,L),``),L}function isItStopNode(L,J){if(!L||L.length===0)return!1;for(let Y=0;Y<L.length;Y++)if(J.matches(L[Y]))return!0;return!1}function tagExpWithClosingIndex(L,J,Y=`>`){let X,Z=``;for(let Q=J;Q<L.length;Q++){let J=L[Q];if(X)J===X&&(X=``);else if(J===`"`||J===`'`)X=J;else if(J===Y[0])if(Y[1]){if(L[Q+1]===Y[1])return{data:Z,index:Q}}else return{data:Z,index:Q};else J===` `&&(J=` `);Z+=J}}function findClosingIndex(L,J,Y,X){let Z=L.indexOf(J,Y);if(Z===-1)throw Error(X);return Z+J.length-1}function readTagExp(L,J,Y,X=`>`){let Z=tagExpWithClosingIndex(L,J+1,X);if(!Z)return;let Q=Z.data,$=Z.index,ee=Q.search(/\s/),te=Q,ne=!0;ee!==-1&&(te=Q.substring(0,ee),Q=Q.substring(ee+1).trimStart());let re=te;if(Y){let L=te.indexOf(`:`);L!==-1&&(te=te.substr(L+1),ne=te!==Z.data.substr(L+1))}return{tagName:te,tagExp:Q,closeIndex:$,attrExpPresent:ne,rawTagName:re}}function readStopNodeData(L,J,Y){let X=Y,Z=1;for(;Y<L.length;Y++)if(L[Y]===`<`)if(L[Y+1]===`/`){let Q=findClosingIndex(L,`>`,Y,`${J} is not closed`);if(L.substring(Y+2,Q).trim()===J&&(Z--,Z===0))return{tagContent:L.substring(X,Y),i:Q};Y=Q}else if(L[Y+1]===`?`)Y=findClosingIndex(L,`?>`,Y+1,`StopNode is not closed.`);else if(L.substr(Y+1,3)===`!--`)Y=findClosingIndex(L,`-->`,Y+3,`StopNode is not closed.`);else if(L.substr(Y+1,2)===`![`)Y=findClosingIndex(L,`]]>`,Y,`StopNode is not closed.`)-2;else{let X=readTagExp(L,Y,`>`);X&&((X&&X.tagName)===J&&X.tagExp[X.tagExp.length-1]!==`/`&&Z++,Y=X.closeIndex)}}function parseValue$1(L,J,Y){if(J&&typeof L==`string`){let J=L.trim();return J===`true`?!0:J===`false`?!1:toNumber$1(L,Y)}else if(isExist(L))return L;else return``}function fromCodePoint(L,J,Y){let X=Number.parseInt(L,J);return X>=0&&X<=1114111?String.fromCodePoint(X):Y+L+`;`}const METADATA_SYMBOL=XmlNode.getMetaDataSymbol();function stripAttributePrefix(L,J){if(!L||typeof L!=`object`)return{};if(!J)return L;let Y={};for(let X in L)if(X.startsWith(J)){let Z=X.substring(J.length);Y[Z]=L[X]}else Y[X]=L[X];return Y}function prettify(L,J,Y){return compress(L,J,Y)}function compress(L,J,Y){let X,Z={};for(let Q=0;Q<L.length;Q++){let $=L[Q],ee=propName($);if(ee!==void 0&&ee!==J.textNodeName){let L=stripAttributePrefix($[`:@`]||{},J.attributeNamePrefix);Y.push(ee,L)}if(ee===J.textNodeName)X===void 0?X=$[ee]:X+=``+$[ee];else if(ee===void 0)continue;else if($[ee]){let L=compress($[ee],J,Y),X=isLeafTag(L,J);if($[`:@`]?assignAttributes(L,$[`:@`],Y,J):Object.keys(L).length===1&&L[J.textNodeName]!==void 0&&!J.alwaysCreateTextNode?L=L[J.textNodeName]:Object.keys(L).length===0&&(J.alwaysCreateTextNode?L[J.textNodeName]=``:L=``),$[METADATA_SYMBOL]!==void 0&&typeof L==`object`&&L&&(L[METADATA_SYMBOL]=$[METADATA_SYMBOL]),Z[ee]!==void 0&&Object.prototype.hasOwnProperty.call(Z,ee))Array.isArray(Z[ee])||(Z[ee]=[Z[ee]]),Z[ee].push(L);else{let Q=J.jPath?Y.toString():Y;J.isArray(ee,Q,X)?Z[ee]=[L]:Z[ee]=L}ee!==void 0&&ee!==J.textNodeName&&Y.pop()}}return typeof X==`string`?X.length>0&&(Z[J.textNodeName]=X):X!==void 0&&(Z[J.textNodeName]=X),Z}function propName(L){let J=Object.keys(L);for(let L=0;L<J.length;L++){let Y=J[L];if(Y!==`:@`)return Y}}function assignAttributes(L,J,Y,X){if(J){let Z=Object.keys(J),Q=Z.length;for(let $=0;$<Q;$++){let Q=Z[$],ee=Q.startsWith(X.attributeNamePrefix)?Q.substring(X.attributeNamePrefix.length):Q,te=X.jPath?Y.toString()+`.`+ee:Y;X.isArray(Q,te,!0,!0)?L[Q]=[J[Q]]:L[Q]=J[Q]}}}function isLeafTag(L,J){let{textNodeName:Y}=J,X=Object.keys(L).length;return!!(X===0||X===1&&(L[Y]||typeof L[Y]==`boolean`||L[Y]===0))}var XMLParser=class{constructor(L){this.externalEntities={},this.options=buildOptions(L)}parse(L,J){if(typeof L!=`string`&&L.toString)L=L.toString();else if(typeof L!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(J){J===!0&&(J={});let Y=validate$1(L,J);if(Y!==!0)throw Error(`${Y.err.msg}:${Y.err.line}:${Y.err.col}`)}let Y=new OrderedObjParser(this.options);Y.addExternalEntities(this.externalEntities);let X=Y.parseXml(L);return this.options.preserveOrder||X===void 0?X:prettify(X,this.options,Y.matcher)}addEntity(L,J){if(J.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(L.indexOf(`&`)!==-1||L.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'`);if(J===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[L]=J}static getMetaDataSymbol(){return XmlNode.getMetaDataSymbol()}};function getDefaultExportFromCjs(L){return L&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,`default`)?L.default:L}var ansis={exports:{}},hasRequiredAnsis;function requireAnsis(){if(hasRequiredAnsis)return ansis.exports;hasRequiredAnsis=1;let L,J,Y,{defineProperty:X,setPrototypeOf:Z,create:Q,keys:$}=Object,ee=``,{round:te,max:ne}=Math,re=L=>{let J=/([a-f\d]{3,6})/i.exec(L)?.[1],Y=J?.length,X=parseInt(6^Y?3^Y?`0`:J[0]+J[0]+J[1]+J[1]+J[2]+J[2]:J,16);return[X>>16&255,X>>8&255,255&X]},ie=(L,J,Y)=>L^J||J^Y?16+36*te(L/51)+6*te(J/51)+te(Y/51):8>L?16:L>248?231:te(24*(L-8)/247)+232,ae=L=>{let J,Y,X,Z,Q;return 8>L?30+L:16>L?L-8+90:(232>L?(Q=(L-=16)%36,J=(L/36|0)/5,Y=(Q/6|0)/5,X=Q%6/5):J=Y=X=(10*(L-232)+8)/255,Z=2*ne(J,Y,X),Z?30+(te(X)<<2|te(Y)<<1|te(J))+(2^Z?0:60):30)},oe=(()=>{let Y=L=>Q.some((J=>L.test(J))),X=globalThis,Z=X.process??{},Q=Z.argv??[],ee=Z.env??{},te=-1;try{L=`,`+$(ee).join(`,`)}catch{ee={},te=0}let ne=`FORCE_COLOR`,re={false:0,0:0,1:1,2:2,3:3}[ee[ne]]??-1,ie=ne in ee&&re||Y(/^--color=?(true|always)?$/);return ie&&(te=re),~te||(te=((Y,X,Z)=>(J=Y.TERM,{"24bit":3,truecolor:3,ansi256:2,ansi:1}[Y.COLORTERM]||(Y.CI?/,GITHUB/.test(L)?3:1:X&&J!==`dumb`?Z?3:/-256/.test(J)?2:1:0)))(ee,!!ee.PM2_HOME||ee.NEXT_RUNTIME?.includes(`edge`)||!!Z.stdout?.isTTY,Z.platform===`win32`)),!re||ee.NO_COLOR||Y(/^--(no-color|color=(false|never))$/)?0:X.window?.chrome||ie&&!te?3:te})(),se={open:``,close:``},ce=39,le=49,ue={},de=({p:L},{open:J,close:X})=>{let Q=(L,...Y)=>{if(!L){if(J&&J===X)return J;if((L??``)===``)return``}let Z,$=L.raw?String.raw({raw:L},...Y):``+L,ee=Q.p,te=ee.o,ne=ee.c;if($.includes(`\x1B`))for(;ee;ee=ee.p){let{open:L,close:J}=ee,Y=J.length,X=``,Q=0;if(Y)for(;~(Z=$.indexOf(J,Q));Q=Z+Y)X+=$.slice(Q,Z)+L;$=X+$.slice(Q)}return te+($.includes(`
297
- `)?$.replace(/(\r?\n)/g,ne+`$1`+te):$)+ne},$=J,ee=X;return L&&($=L.o+J,ee=X+L.c),Z(Q,Y),Q.p={open:J,close:X,o:$,c:ee,p:L},Q.open=$,Q.close=ee,Q},fe=new function L(J=oe){let $={Ansis:L,level:J,isSupported:()=>te,strip:L=>L.replace(/[›][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,``),extend(L){for(let J in L){let Y=L[J],X=(typeof Y)[0];X===`s`?(ee(J,me(...re(Y))),ee(be(J),he(...re(Y)))):ee(J,Y,X===`f`)}return Y=Q({},ue),Z($,Y),$}},ee=(L,J,Y)=>{ue[L]={get(){let Z=Y?(...L)=>de(this,J(...L)):de(this,J);return X(this,L,{value:Z}),Z}}},te=J>0,ne=(L,J)=>te?{open:`[${L}m`,close:`[${J}m`}:se,ce=L=>J=>L(...re(J)),le=(L,J)=>(Y,X,Z)=>ne(`${L}8;2;${Y};${X};${Z}`,J),fe=(L,J)=>(Y,X,Z)=>ne(((L,J,Y)=>ae(ie(L,J,Y)))(Y,X,Z)+L,J),pe=L=>(J,Y,X)=>L(ie(J,Y,X)),me=le(3,39),he=le(4,49),ge=L=>ne(`38;5;`+L,39),_e=L=>ne(`48;5;`+L,49);J===2?(me=pe(ge),he=pe(_e)):J===1&&(me=fe(0,39),he=fe(10,49),ge=L=>ne(ae(L),39),_e=L=>ne(ae(L)+10,49));let ve,ye={fg:ge,bg:_e,rgb:me,bgRgb:he,hex:ce(me),bgHex:ce(he),visible:se,reset:ne(0,0),bold:ne(1,22),dim:ne(2,22),italic:ne(3,23),underline:ne(4,24),inverse:ne(7,27),hidden:ne(8,28),strikethrough:ne(9,29)},be=L=>`bg`+L[0].toUpperCase()+L.slice(1),xe=`Bright`;return`black,red,green,yellow,blue,magenta,cyan,white,gray`.split(`,`).map(((L,J)=>{ve=be(L),8>J?(ye[L+xe]=ne(90+J,39),ye[ve+xe]=ne(100+J,49)):J=60,ye[L]=ne(30+J,39),ye[ve]=ne(40+J,49)})),$.extend(ye)};return ansis.exports=fe,fe.default=fe,ansis.exports}const a$1=getDefaultExportFromCjs(requireAnsis()),{Ansis,fg,bg,rgb,bgRgb,hex,bgHex,reset,inverse,hidden,visible,bold,dim,italic,underline,strikethrough,black,red,green,yellow,blue,magenta,cyan,white,gray,redBright,greenBright,yellowBright,blueBright,magentaBright,cyanBright,whiteBright,bgBlack,bgRed,bgGreen,bgYellow,bgBlue,bgMagenta,bgCyan,bgWhite,bgGray,bgRedBright,bgGreenBright,bgYellowBright,bgBlueBright,bgMagentaBright,bgCyanBright,bgWhiteBright}=a$1,IGNORE_REGEX=/@case-police-ignore\s+(.*)/g,UTF8_RANGE=`[€-￿]`;function buildRegex(L){let J=Object.keys(L);return RegExp(`\\b(${J.join(`|`).replace(/\+/g,`\\+`)})\\b`,`gi`)}function replaceCore(L,J,Y=[],X,Z){Z||=buildRegex(J),Array.from(L.matchAll(IGNORE_REGEX)).forEach(L=>{let J=L[1].trim().replace(/\s*-->$/,``);Y.push(...J.split(`,`).map(L=>L.trim().toLowerCase()).filter(Boolean))});let Q=!1;if(L=L.replace(Z,(Z,$,ee)=>{if(containsUTF8(L,$,ee)||!$.match(/[A-Z]/)||!$.match(/[a-z]/))return Z;let te=$.toLowerCase();if(Y.includes(te))return Z;let ne=J[te];return!ne||ne===$?Z:(Q=!0,X?.(L,ee,$,ne),ne)}),Q)return L}function containsUTF8(L,J,Y){let X=RegExp(`${UTF8_RANGE}`),Z=L.charAt(Y-1),Q=L.charAt(Y+J.length);return X.test(Z)||X.test(Q)}var abbreviates_default={abi:`ABI`,amd:`AMD`,api:`API`,ast:`AST`,bom:`BOM`,bsd:`BSD`,cdn:`CDN`,cjs:`CJS`,cli:`CLI`,cncf:`CNCF`,cors:`CORS`,cpu:`CPU`,crud:`CRUD`,csrf:`CSRF`,css:`CSS`,csv:`CSV`,db2:`DB2`,dns:`DNS`,dom:`DOM`,dos:`DOS`,es6:`ES6`,esm:`ESM`,fbi:`FBI`,ftp:`FTP`,ftps:`FTPS`,gcc:`GCC`,gcp:`GCP`,glsl:`GLSL`,gorm:`GORM`,gpl:`GPL`,gps:`GPS`,gpu:`GPU`,gre:`GRE`,gui:`GUI`,hdmi:`HDMI`,hmr:`HMR`,html:`HTML`,http:`HTTP`,https:`HTTPS`,iife:`IIFE`,iot:`IoT`,ipc:`IPC`,ipfs:`IPFS`,ipmi:`IPMI`,jdbc:`JDBC`,jdk:`JDK`,jit:`JIT`,jpeg:`JPEG`,jpg:`JPG`,jre:`JRE`,jsf:`JSF`,json:`JSON`,jsonp:`JSONP`,jsp:`JSP`,jwt:`JWT`,kcp:`KCP`,kde:`KDE`,kpi:`KPI`,lfu:`LFU`,llvm:`LLVM`,lru:`LRU`,lts:`LTS`,mdn:`MDN`,mdx:`MDX`,mvc:`MVC`,mvp:`MVP`,mvvm:`MVVM`,nft:`NFT`,odbc:`ODBC`,ont:`ONT`,orm:`ORM`,oss:`OSS`,pdf:`PDF`,pdo:`PDO`,posix:`POSIX`,pwa:`PWA`,qemu:`QEMU`,qgis:`QGIS`,quic:`QUIC`,rfc:`RFC`,rom:`ROM`,rpc:`RPC`,rss:`RSS`,rss3:`RSS3`,sdk:`SDK`,seo:`SEO`,sip:`SIP`,smtp:`SMTP`,sql:`SQL`,sre:`SRE`,ssg:`SSG`,ssh:`SSH`,sso:`SSO`,ssr:`SSR`,stp:`STP`,svg:`SVG`,svn:`SVN`,tcp:`TCP`,tls:`TLS`,toml:`TOML`,tsc:`TSC`,udp:`UDP`,umd:`UMD`,uri:`URI`,url:`URL`,usb:`USB`,vlan:`VLAN`,vnc:`VNC`,vpn:`VPN`,vps:`VPS`,wgsl:`WGSL`,wlan:`WLAN`,wsa:`WSA`,wsl:`WSL`,xhtml:`XHTML`,xml:`XML`,xss:`XSS`,yaml:`YAML`},brands_default={airbnb:`Airbnb`,alphago:`AlphaGo`,bitbucket:`Bitbucket`,bytedance:`ByteDance`,circleci:`CircleCI`,cloudflare:`Cloudflare`,freecodecamp:`freeCodeCamp`,gitea:`Gitea`,gitee:`Gitee`,github:`GitHub`,gitlab:`GitLab`,gitops:`GitOps`,gitpod:`Gitpod`,hp:`HP`,ibm:`IBM`,jsdelivr:`jsDelivr`,kfc:`KFC`,leetcode:`LeetCode`,linkedin:`LinkedIn`,mcdonald:`McDonald`,nvidia:`NVIDIA`,pagerduty:`PagerDuty`,producthunt:`Product Hunt`,stackblitz:`StackBlitz`,stackit:`STACKIT`,stackoverflow:`Stack Overflow`,unjs:`UnJS`,v2ex:`V2EX`,vuefes:`Vue Fes`,youtube:`YouTube`},general_default={aiaas:`AIaaS`,baas:`BaaS`,caas:`CaaS`,daas:`DaaS`,ddos:`DDoS`,devops:`DevOps`,devtools:`DevTools`,esim:`eSIM`,faas:`FaaS`,iac:`IaC`,iaas:`IaaS`,ioc:`IoC`,ipsec:`IPsec`,mpaas:`mPaaS`,paas:`PaaS`,saas:`SaaS`,wifi:`Wi-Fi`,xaas:`XaaS`},products_default={airdrop:`AirDrop`,airpods:`AirPods`,airtag:`AirTag`,homekit:`HomeKit`,homepod:`HomePod`,imac:`iMac`,ipad:`iPad`,iphone:`iPhone`,ipod:`iPod`,macbook:`MacBook`,"macbook air":`MacBook Air`,"macbook pro":`MacBook Pro`,yubikey:`YubiKey`},softwares_default={"1password":`1Password`,"3dtiles":`3DTiles`,actionscript:`ActionScript`,adblock:`AdBlock`,ajax:`AJAX`,alipay:`Alipay`,amap:`AMap`,angularjs:`AngularJS`,"ant design":`Ant Design`,"ant design vue":`Ant Design Vue`,antd:`AntD`,antdesign:`AntDesign`,antdesignvue:`AntDesignVue`,antv:`AntV`,apifox:`Apifox`,"app store":`App Store`,"apple pay":`Apple Pay`,applescript:`AppleScript`,appletalk:`AppleTalk`,arangodb:`ArangoDB`,arcgis:`ArcGIS`,arcmap:`ArcMap`,arcobjects:`ArcObjects`,beego:`Beego`,bittorrent:`BitTorrent`,bluesky:`Bluesky`,busybox:`BusyBox`,centos:`CentOS`,cesiumjs:`CesiumJS`,chatgpt:`ChatGPT`,citygml:`CityGML`,cityjson:`CityJSON`,ckeditor:`CKEditor`,clashx:`ClashX`,clickhouse:`ClickHouse`,cloudfront:`CloudFront`,cmake:`CMake`,cockroachdb:`CockroachDB`,cocoapods:`CocoaPods`,codepen:`CodePen`,codesandbox:`CodeSandbox`,coffeescript:`CoffeeScript`,commonjs:`CommonJS`,"composition api":`Composition API`,compositionapi:`CompositionAPI`,coredns:`CoreDNS`,"css modules":`CSS Modules`,dapr:`Dapr`,datadog:`Datadog`,datagrip:`DataGrip`,dbase:`dBase`,definitelytyped:`DefinitelyTyped`,denodeploy:`DenoDeploy`,"digital ocean":`DigitalOcean`,digitalocean:`DigitalOcean`,dingtalk:`DingTalk`,directx:`DirectX`,django:`Django`,duckduckgo:`DuckDuckGo`,dynamodb:`DynamoDB`,echarts:`ECharts`,ecmascript:`ECMAScript`,edgedb:`EdgeDB`,eggjs:`Egg.js`,elasticsearch:`Elasticsearch`,"element plus":`Element Plus`,elementui:`ElementUI`,esbuild:`esbuild`,eslint:`ESLint`,esxi:`ESXi`,etcd:`etcd`,facetime:`FaceTime`,fastapi:`FastAPI`,ffmpeg:`FFmpeg`,filezilla:`FileZilla`,firefox:`Firefox`,freemarker:`FreeMarker`,gdnative:`GDNative`,gdscript:`GDScript`,geforce:`GeForce`,geojson:`GeoJSON`,geopackage:`GeoPackage`,geopandas:`GeoPandas`,geoserver:`GeoServer`,gitbook:`GitBook`,gitkraken:`GitKraken`,gltf:`glTF`,gnome:`GNOME`,gnu:`GNU`,gnupg:`GnuPG`,goland:`GoLand`,"google pay":`Google Pay`,"graph rag":`Graph RAG`,graphql:`GraphQL`,graphrag:`GraphRAG`,greensock:`GreenSock`,grpc:`gRPC`,hackernews:`Hacker News`,hacpai:`HacPai`,hbase:`HBase`,hbuilderx:`HBuilderX`,ibook:`iBook`,icloud:`iCloud`,idrac:`iDRAC`,ilo:`iLO`,imessage:`iMessage`,imovie:`iMovie`,imtoken:`imToken`,influxdb:`InfluxDB`,intellij:`IntelliJ`,"intellij idea":`IntelliJ IDEA`,ios:`iOS`,ipados:`iPadOS`,iphoto:`iPhoto`,iscsi:`iSCSI`,iterm:`iTerm`,itunes:`iTunes`,iwork:`iWork`,javascript:`JavaScript`,jetbrains:`JetBrains`,jquery:`jQuery`,jsdoc:`JSDoc`,jupyterlab:`JupyterLab`,katex:`KaTeX`,kubernetes:`Kubernetes`,latex:`LaTeX`,less:`Less`,libreoffice:`LibreOffice`,"line pay":`LINE Pay`,lineageos:`LineageOS`,macos:`macOS`,mariadb:`MariaDB`,markdown:`Markdown`,markdownlint:`MarkdownLint`,mathjax:`MathJax`,mathml:`MathML`,mathtype:`MathType`,matlab:`MATLAB`,mediawiki:`MediaWiki`,memcached:`Memcached`,messagepack:`MessagePack`,metamask:`MetaMask`,mkdocs:`MkDocs`,mlaas:`MLaaS`,mlops:`MLOps`,mobx:`MobX`,mongodb:`MongoDB`,mongoose:`Mongoose`,"ms-dos":`MS-DOS`,mybatis:`MyBatis`,mysql:`MySQL`,"naive ui":`Naive UI`,naiveui:`NaiveUI`,neo4j:`Neo4j`,nestjs:`NestJS`,netbeans:`NetBeans`,netbios:`NetBIOS`,nextjs:`Next.js`,nixos:`NixOS`,nocodb:`NocoDB`,"node.js":`Node.js`,nosql:`NoSQL`,"notepad ++":`Notepad++`,npm:`npm`,numpy:`NumPy`,nuxtjs:`NuxtJS`,oauth:`OAuth`,obs:`OBS`,ocaml:`OCaml`,onedrive:`OneDrive`,onenote:`OneNote`,openai:`OpenAI`,openapi:`OpenAPI`,opencv:`OpenCV`,openfaas:`OpenFaaS`,openflow:`OpenFlow`,opengauss:`openGauss`,opengl:`OpenGL`,"opengl es":`OpenGL ES`,openjdk:`OpenJDK`,openlayers:`OpenLayers`,openpgp:`OpenPGP`,opensea:`OpenSea`,openssl:`OpenSSL`,openstack:`OpenStack`,openstreetmap:`OpenStreetMap`,opensuse:`openSUSE`,openvino:`OpenVINO`,openwrt:`OpenWrt`,opnsense:`OPNsense`,pagp:`PAgP`,paypal:`PayPal`,photoshop:`Photoshop`,php:`PHP`,phpstorm:`PhpStorm`,pihole:`Pi-hole`,planetscale:`PlanetScale`,postcss:`PostCSS`,postgis:`PostGIS`,postgresql:`PostgreSQL`,potplayer:`PotPlayer`,powerpoint:`PowerPoint`,powershell:`PowerShell`,premid:`PreMiD`,primevue:`PrimeVue`,protobuf:`Protobuf`,pycharm:`PyCharm`,pytorch:`PyTorch`,qtscript:`QtScript`,raii:`RAII`,"react native":`React Native`,redhat:`RedHat`,redisearch:`RediSearch`,redisjson:`RedisJSON`,rescript:`ReScript`,restful:`RESTful`,rethinkdb:`RethinkDB`,rsshub:`RSSHub`,rust:`Rust`,rxdb:`RxDB`,rxjs:`RxJS`,"samsung pay":`Samsung Pay`,sass:`Sass`,scss:`SCSS`,segmentfault:`SegmentFault`,"socket.io":`Socket.IO`,solarwinds:`SolarWinds`,spatiallite:`SpatialLite`,"spir-v":`SPIR-V`,springboot:`SpringBoot`,springcloud:`SpringCloud`,springmvc:`SpringMVC`,sqlite:`SQLite`,sqlserver:`SQLServer`,storybook:`Storybook`,stylus:`Stylus`,"sublime text":`Sublime Text`,surrealdb:`SurrealDB`,sveltekit:`SvelteKit`,"tailwind css":`Tailwind CSS`,tailwindcss:`TailwindCSS`,teamviewer:`TeamViewer`,tensorflow:`TensorFlow`,testflight:`TestFlight`,tex:`TeX`,threejs:`ThreeJS`,tianocore:`TianoCore`,tidb:`TiDB`,tiflash:`TiFlash`,tiktok:`TikTok`,tikv:`TiKV`,"travis ci":`Travis CI`,trpc:`tRPC`,tsconfig:`TSConfig`,tsdoc:`TSDoc`,tsdx:`TSdx`,turbopack:`Turbopack`,turborepo:`Turborepo`,typeorm:`TypeORM`,typescript:`TypeScript`,uniapp:`uniapp`,unifi:`UniFi`,unix:`UNIX`,unocss:`UnoCSS`,upnp:`UPnP`,vercel:`Vercel`,videolan:`VideoLAN`,vim:`Vim`,virtualbox:`VirtualBox`,"visual studio":`Visual Studio`,"visual studio code":`Visual Studio Code`,vitepress:`VitePress`,vividcortex:`VividCortex`,vlc:`VLC`,vmware:`VMware`,voip:`VoIP`,"vs code":`VS Code`,"vs codium":`VSCodium`,vscode:`VS Code`,vscodium:`VSCodium`,"vue cli":`Vue CLI`,vuepress:`VuePress`,vueuse:`VueUse`,vulkan:`Vulkan`,w3c:`W3C`,wasm:`Wasm`,watchos:`watchOS`,"web assembly":`WebAssembly`,webar:`WebAR`,webassembly:`WebAssembly`,webgl:`WebGL`,webgpu:`WebGPU`,webkit:`WebKit`,webpack:`webpack`,webrtc:`WebRTC`,websocket:`WebSocket`,webstorm:`WebStorm`,webvr:`WebVR`,webxr:`WebXR`,wechat:`WeChat`,"wechat pay":`WeChat Pay`,whatsapp:`WhatsApp`,"windi css":`Windi CSS`,windicss:`WindiCSS`,wireguard:`WireGuard`,wordpress:`WordPress`,xmind:`XMind`,xstate:`XState`,yapi:`YApi`};const NUMBER_CHAR_RE=/\d/,STR_SPLITTERS=[`-`,`_`,`/`,`.`];function isUppercase(L=``){if(!NUMBER_CHAR_RE.test(L))return L!==L.toLowerCase()}function splitByCase(L,J){let Y=J??STR_SPLITTERS,X=[];if(!L||typeof L!=`string`)return X;let Z=``,Q,$;for(let J of L){let L=Y.includes(J);if(L===!0){X.push(Z),Z=``,Q=void 0;continue}let ee=isUppercase(J);if($===!1){if(Q===!1&&ee===!0){X.push(Z),Z=J,Q=ee;continue}if(Q===!0&&ee===!1&&Z.length>1){let L=Z.at(-1);X.push(Z.slice(0,Math.max(0,Z.length-1))),Z=L+J,Q=ee;continue}}Z+=J,Q=ee,$=L}return X.push(Z),X}function upperFirst(L){return L?L[0].toUpperCase()+L.slice(1):``}const titleCaseExceptions=/^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;function titleCase(L,J){return(Array.isArray(L)?L:splitByCase(L)).filter(Boolean).map(L=>titleCaseExceptions.test(L)?L.toLowerCase():upperFirst(J?.normalize?L.toLowerCase():L)).join(` `)}const casePoliceDict={...abbreviates_default,...brands_default,...general_default,...products_default,...softwares_default};function firstOf(L){if(L!==void 0)return Array.isArray(L)?L[0]:L}function ensureArray(L){return L==null?[]:Array.isArray(L)?L:[L]}function collectField(L,J){return L===void 0?[]:(Array.isArray(L)?L:[L]).map(L=>J(L.data)).filter(L=>L!==void 0)}function collectArrayField(L,J){return L===void 0?[]:(Array.isArray(L)?L:[L]).flatMap(L=>J(L.data)??[])}function nonEmpty$4(L){return L.length>0?L:void 0}function toDelimitedString(L,J=`, `){if(L!==void 0){if(Array.isArray(L)){let Y=L.filter(L=>L!==void 0);return Y.length>0?Y.join(J):void 0}return L}}function toMb(L){if(is.positiveNumber(L))return Math.round(L/1024/1024)}function stripNamespace(L){return path$1.basename(L)}function toAlias(L){if(is.nonEmptyString(L)){let J=titleCase(stripNamespace(L));return replaceCore(J,casePoliceDict)??J}}function escapeRegExp(L){return L.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}const REPLACEMENTS=new Map([[`javascript`,`JavaScript`],[`typescript`,`TypeScript`]]);function mixedStringsToArray(L,J){if(L===void 0)return;let Y=ensureArray(L).filter(L=>typeof L==`string`&&L.trim().length>0).map(L=>{if(!J)return L;let Y=L;for(let[L,X]of J){let J=new RegExp(escapeRegExp(L),`gi`);Y=Y.replace(J,X)}return Y});return Y.length>0?Y:void 0}function toLocalUrl(L,J){if(L===void 0||J===void 0)return;let Y=path$1.join(J,path$1.basename(L)).replaceAll(`\\`,`/`);return`file://${Y.startsWith(`/`)?``:`/`}${Y}`}function stripUndefined(L){if(Array.isArray(L)){let J=L.filter(L=>L!==void 0).map(L=>stripUndefined(L)).filter(L=>L!==void 0);return J.length>0?J:void 0}if(is.plainObject(L)){let J={},Y=!1;for(let[X,Z]of Object.entries(L))if(Z!==void 0){let L=stripUndefined(Z);L!==void 0&&(J[X]=L,Y=!0)}return Y?J:void 0}return L}function toBasicLicense(L){if(L!==void 0)return L.replace(`http://spdx.org/licenses/`,``).replace(`https://spdx.org/licenses/`,``)}function toBasicLicenses(...L){let J=L.flat().filter(L=>L!==void 0).map(L=>toBasicLicense(L)).filter(L=>L!==void 0);return J.length===0?void 0:J}function toBasicName(L){if(L!==void 0)return L.name===void 0?toDelimitedString([L.givenName,L.familyName],` `):L.name}function toBasicNames(L){if(L===void 0)return;let J=L.map(L=>toBasicName(L)).filter(L=>L!==void 0);return J.length>0?J:void 0}function hasDependencyWithId(L,J){return[...J.softwareSuggestions??[],...J.softwareRequirements??[]].some(({identifier:J})=>J===L)}function usesSharedConfig(L){return hasDependencyWithId(`@kitschpatrol/shared-config`,L)}function usesPnpm(L){let J=firstOf(L);return J?J.data.packageManager?.toLowerCase().startsWith(`pnpm`)??Object.hasOwn(J.data.engines??{},`pnpm`):!1}function isAuthoredBy(L,J){if(L===void 0||J===void 0||is.emptyArray(L)||is.emptyArray(J))return;let Y=new Set(ensureArray(J).map(L=>L.toLocaleLowerCase().trim()));return(toBasicNames(ensureArray(L))?.map(L=>L.toLocaleLowerCase().trim()))?.some(L=>Y.has(L))}function isOnGithubAccountOf(L,J){if(L===void 0||J===void 0)return;let Y=L.toLocaleLowerCase().trim();return Y.includes(`github.com/`)?ensureArray(J).some(L=>Y.includes(`/${L.toLocaleLowerCase().trim()}/`)):!1}function toStatus(L,J,Y,X){if(L===void 0||Y===void 0||X===void 0)return;let Z=isAuthoredBy(J,Y),Q=isOnGithubAccountOf(L,X);if(!(Z===void 0||Q===void 0))return!Z&&Q?`fork`:Z?`source`:`unmaintained`}const cinderCinderblockSchema=object({author:nonEmptyString,git:optionalUrl,id:nonEmptyString,library:optionalUrl,license:nonEmptyString,name:nonEmptyString,requires:stringArray,summary:nonEmptyString,supports:stringArray,url:optionalUrl,version:nonEmptyString}),OS_MAP={ios:`iOS`,linux:`Linux`,macosx:`macOS`,msw:`Windows`};function parse$23(L){let J=new XMLParser({attributeNamePrefix:`@_`,ignoreAttributes:!1,parseTagValue:!1}),Y;try{let X=J.parse(L);if(!is.plainObject(X))return;Y=X}catch{return}if(!is.plainObject(Y.cinder))return;let{cinder:X}=Y;if(!is.plainObject(X.block))return;let{block:Z}=X;return cinderCinderblockSchema.parse({author:getAttribute(Z,`author`),git:getAttribute(Z,`git`),id:getAttribute(Z,`id`),library:getAttribute(Z,`library`)??getAttribute(Z,`libraryUrl`),license:getAttribute(Z,`license`),name:getAttribute(Z,`name`),requires:parseDependencies$3(Z),summary:getAttribute(Z,`summary`),supports:parseOperatingSystems$3(Z),url:getAttribute(Z,`url`),version:getAttribute(Z,`version`)})}function getAttribute(L,J){let Y=L[`@_${J}`];if(typeof Y!=`string`)return;let X=Y.trim();return X.length>0?X:void 0}function parseOperatingSystems$3(L){let J=[],Y=new Set;for(let X of ensureArray(L.supports)){if(!is.plainObject(X))continue;let L=getAttribute(X,`os`);if(L){let X=OS_MAP[L.toLowerCase()]??L;Y.has(X)||(Y.add(X),J.push(X))}}return J}function parseDependencies$3(L){let J=[];for(let Y of ensureArray(L.requires)){if(typeof Y!=`string`)continue;let L=Y.trim();L.length>0&&J.push(L)}return J}const cinderCinderblockXmlSource=defineSource({async discover(L){return getMatches(L.options,[`cinderblock.xml`])},key:`cinderCinderblockXml`,async parse(L,J){let Y=parse$23(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});async function getStatistics(L,J){let Y=(await tokei({include:[L],noIgnore:!J.respectIgnored,noIgnoreDot:!J.respectIgnored,noIgnoreVcs:!J.respectIgnored})).toSorted((L,J)=>J.code-L.code);return{data:{perLanguage:Y,total:{blanks:Y.reduce((L,J)=>L+J.blanks,0),code:Y.reduce((L,J)=>L+J.code,0),comments:Y.reduce((L,J)=>L+J.comments,0),files:Y.reduce((L,J)=>L+J.files,0),languages:Y.map(L=>L.language),lines:Y.reduce((L,J)=>L+J.lines,0)}},source:L}}const codeStatsSource=defineSource({async discover(L){return[L.options.path,...getWorkspaces(L.options.path,L.options.workspaces)]},key:`codeStats`,async parse(L,J){return log$2.debug(`Extracting lines of code via tokei...`),getStatistics(L,J.options)},phase:1}),codeMetaString=preprocess$1(L=>{if(typeof L==`string`)return L;if(is.plainObject(L)&&typeof L[`@value`]==`string`)return L[`@value`]},nonEmptyString),codeMetaUrl=preprocess$1(L=>{if(typeof L==`string`)return L;if(is.plainObject(L)&&typeof L[`@value`]==`string`)return L[`@value`]},optionalUrl),codeMetaStringArray=preprocess$1(L=>{if(L!=null){if(typeof L==`string`)return L.includes(`,`)?L.split(`,`).map(L=>L.trim()).filter(Boolean):[L];if(Array.isArray(L))return L.map(L=>typeof L==`string`?L.trim():is.plainObject(L)?typeof L.name==`string`?L.name.trim():``:(log$2.warn(`Invalid type found in codemeta json parser`),``)).filter(L=>L.length>0)}},array(string$2()).optional()).optional(),codeMetaLicense=preprocess$1(L=>{if(typeof L==`string`)return L;if(Array.isArray(L)){let J=L.filter(L=>typeof L==`string`);return J.length>0?J:void 0}},union([string$2(),array(string$2())]).optional()).optional(),codeMetaPersonOrOrgSchema=object({affiliation:nonEmptyString,email:nonEmptyString,familyName:nonEmptyString,givenName:nonEmptyString,id:nonEmptyString,name:nonEmptyString,type:_enum([`Organization`,`Person`]).optional(),url:optionalUrl});function preprocessPersonOrOrg(L){if(typeof L==`string`)return{name:L};if(!is.plainObject(L))return;let J={};if(typeof L[`@type`]==`string`){let Y=L[`@type`].toLowerCase();Y===`person`?J.type=`Person`:Y===`organization`&&(J.type=`Organization`)}if(typeof L[`@id`]==`string`&&(J.id=L[`@id`]),typeof L.name==`string`&&(J.name=L.name),typeof L.givenName==`string`&&(J.givenName=L.givenName),typeof L.familyName==`string`&&(J.familyName=L.familyName),typeof L.email==`string`&&(J.email=L.email),typeof L.url==`string`&&(J.url=L.url),typeof L.affiliation==`string`?J.affiliation=L.affiliation:is.plainObject(L.affiliation)&&typeof L.affiliation.name==`string`&&(J.affiliation=L.affiliation.name),J.name??J.givenName??J.familyName??J.email)return J}const codeMetaPersonArray=preprocess$1(L=>{if(L==null)return;let J=(Array.isArray(L)?L:[L]).map(L=>preprocessPersonOrOrg(L)).filter(L=>L!==void 0);return J.length>0?J:void 0},array(codeMetaPersonOrOrgSchema).optional()).optional(),codeMetaDependencySchema=object({identifier:nonEmptyString,name:nonEmptyString,runtimePlatform:nonEmptyString,version:nonEmptyString});function preprocessDependency(L){if(typeof L==`string`)return{name:L};if(!is.plainObject(L))return;let J={};if(typeof L.name==`string`&&(J.name=L.name),typeof L.identifier==`string`&&(J.identifier=L.identifier),typeof L.version==`string`&&(J.version=L.version),typeof L.runtimePlatform==`string`&&(J.runtimePlatform=L.runtimePlatform),J.name??J.identifier)return J}const codeMetaDependencyArray=preprocess$1(L=>{if(L==null)return;let J=(Array.isArray(L)?L:[L]).map(L=>preprocessDependency(L)).filter(L=>L!==void 0);return J.length>0?J:void 0},array(codeMetaDependencySchema).optional()).optional(),codeMetaJsonDataSchema=object({applicationCategory:codeMetaString,applicationSubCategory:codeMetaString,author:codeMetaPersonArray,buildInstructions:codeMetaUrl,codeRepository:codeMetaUrl,continuousIntegration:codeMetaUrl,contributor:codeMetaPersonArray,copyrightHolder:codeMetaPersonArray,copyrightYear:preprocess$1(L=>{if(typeof L==`number`)return L;if(typeof L==`string`){let J=Number.parseInt(L,10);return Number.isNaN(J)?void 0:J}},number().optional()),dateCreated:codeMetaString,dateModified:codeMetaString,datePublished:codeMetaString,description:codeMetaString,developmentStatus:codeMetaString,downloadUrl:codeMetaUrl,funder:codeMetaPersonArray,funding:codeMetaString,identifier:codeMetaString,installUrl:codeMetaUrl,isAccessibleForFree:boolean().optional(),issueTracker:codeMetaUrl,keywords:codeMetaStringArray,license:codeMetaLicense,maintainer:codeMetaPersonArray,name:codeMetaString,operatingSystem:codeMetaStringArray,programmingLanguage:codeMetaStringArray,readme:codeMetaUrl,relatedLink:codeMetaLicense,releaseNotes:codeMetaString,runtimePlatform:codeMetaStringArray,softwareHelp:codeMetaUrl,softwareRequirements:codeMetaDependencyArray,softwareSuggestions:codeMetaDependencyArray,softwareVersion:codeMetaString,url:codeMetaUrl,version:codeMetaString}),v1PropertyMap={agents:`author`,contIntegration:`continuousIntegration`,depends:`softwareRequirements`,suggests:`softwareSuggestions`,title:`name`};function parse$22(L){let J=parseJsonRecord(L);if(!J)return;let Y=migrateV1Properties(J);return Y.datePublished===void 0&&typeof Y.dateReleased==`string`&&(Y.datePublished=Y.dateReleased),codeMetaJsonDataSchema.parse(Y)}function migrateV1Properties(L){let J={};for(let[Y,X]of Object.entries(L)){if(Y.startsWith(`@`))continue;let L=v1PropertyMap[Y]??Y;L in J||(J[L]=X)}return J}const codemetaJsonSource=defineSource({async discover(L){return getMatches(L.options,[`codemeta.json`])},key:`codemetaJson`,async parse(L,J){let Y=parse$22(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});var require_inc=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X,Z,Q)=>{typeof X==`string`&&(Q=Z,Z=X,X=void 0);try{return new Y(L instanceof Y?L.version:L,X).inc(J,Z,Q).version}catch{return null}}})),require_diff=__commonJSMin(((L,J)=>{let Y=require_parse$6();J.exports=(L,J)=>{let X=Y(L,null,!0),Z=Y(J,null,!0),Q=X.compare(Z);if(Q===0)return null;let $=Q>0,ee=$?X:Z,te=$?Z:X,ne=!!ee.prerelease.length;if(te.prerelease.length&&!ne){if(!te.patch&&!te.minor)return`major`;if(te.compareMain(ee)===0)return te.minor&&!te.patch?`minor`:`patch`}let re=ne?`pre`:``;return X.major===Z.major?X.minor===Z.minor?X.patch===Z.patch?`prerelease`:re+`patch`:re+`minor`:re+`major`}})),require_major=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J)=>new Y(L,J).major})),require_minor=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J)=>new Y(L,J).minor})),require_patch=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J)=>new Y(L,J).patch})),require_prerelease=__commonJSMin(((L,J)=>{let Y=require_parse$6();J.exports=(L,J)=>{let X=Y(L,J);return X&&X.prerelease.length?X.prerelease:null}})),require_compare=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X)=>new Y(L,X).compare(new Y(J,X))})),require_rcompare=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(J,L,X)})),require_compare_loose=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J)=>Y(L,J,!0)})),require_compare_build=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X)=>{let Z=new Y(L,X),Q=new Y(J,X);return Z.compare(Q)||Z.compareBuild(Q)}})),require_sort=__commonJSMin(((L,J)=>{let Y=require_compare_build();J.exports=(L,J)=>L.sort((L,X)=>Y(L,X,J))})),require_rsort=__commonJSMin(((L,J)=>{let Y=require_compare_build();J.exports=(L,J)=>L.sort((L,X)=>Y(X,L,J))})),require_gt=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)>0})),require_lt=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)<0})),require_eq=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)===0})),require_neq=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)!==0})),require_gte=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)>=0})),require_lte=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)<=0})),require_cmp=__commonJSMin(((L,J)=>{let Y=require_eq(),X=require_neq(),Z=require_gt(),Q=require_gte(),$=require_lt(),ee=require_lte();J.exports=(L,J,te,ne)=>{switch(J){case`===`:return typeof L==`object`&&(L=L.version),typeof te==`object`&&(te=te.version),L===te;case`!==`:return typeof L==`object`&&(L=L.version),typeof te==`object`&&(te=te.version),L!==te;case``:case`=`:case`==`:return Y(L,te,ne);case`!=`:return X(L,te,ne);case`>`:return Z(L,te,ne);case`>=`:return Q(L,te,ne);case`<`:return $(L,te,ne);case`<=`:return ee(L,te,ne);default:throw TypeError(`Invalid operator: ${J}`)}}})),require_coerce=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_parse$6(),{safeRe:Z,t:Q}=require_re();J.exports=(L,J)=>{if(L instanceof Y)return L;if(typeof L==`number`&&(L=String(L)),typeof L!=`string`)return null;J||={};let $=null;if(!J.rtl)$=L.match(J.includePrerelease?Z[Q.COERCEFULL]:Z[Q.COERCE]);else{let Y=J.includePrerelease?Z[Q.COERCERTLFULL]:Z[Q.COERCERTL],X;for(;(X=Y.exec(L))&&(!$||$.index+$[0].length!==L.length);)(!$||X.index+X[0].length!==$.index+$[0].length)&&($=X),Y.lastIndex=X.index+X[1].length+X[2].length;Y.lastIndex=-1}if($===null)return null;let ee=$[2];return X(`${ee}.${$[3]||`0`}.${$[4]||`0`}${J.includePrerelease&&$[5]?`-${$[5]}`:``}${J.includePrerelease&&$[6]?`+${$[6]}`:``}`,J)}})),require_lrucache=__commonJSMin(((L,J)=>{J.exports=class{constructor(){this.max=1e3,this.map=new Map}get(L){let J=this.map.get(L);if(J!==void 0)return this.map.delete(L),this.map.set(L,J),J}delete(L){return this.map.delete(L)}set(L,J){if(!this.delete(L)&&J!==void 0){if(this.map.size>=this.max){let L=this.map.keys().next().value;this.delete(L)}this.map.set(L,J)}return this}}})),require_range=__commonJSMin(((L,J)=>{let Y=/\s+/g;J.exports=class L{constructor(J,X){if(X=Z(X),J instanceof L)return J.loose===!!X.loose&&J.includePrerelease===!!X.includePrerelease?J:new L(J.raw,X);if(J instanceof Q)return this.raw=J.value,this.set=[[J]],this.formatted=void 0,this;if(this.options=X,this.loose=!!X.loose,this.includePrerelease=!!X.includePrerelease,this.raw=J.trim().replace(Y,` `),this.set=this.raw.split(`||`).map(L=>this.parseRange(L.trim())).filter(L=>L.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let L=this.set[0];if(this.set=this.set.filter(L=>!ce(L[0])),this.set.length===0)this.set=[L];else if(this.set.length>1){for(let L of this.set)if(L.length===1&&le(L[0])){this.set=[L];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let L=0;L<this.set.length;L++){L>0&&(this.formatted+=`||`);let J=this.set[L];for(let L=0;L<J.length;L++)L>0&&(this.formatted+=` `),this.formatted+=J[L].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(L){let J=((this.options.includePrerelease&&oe)|(this.options.loose&&se))+`:`+L,Y=X.get(J);if(Y)return Y;let Z=this.options.loose,ee=Z?te[ne.HYPHENRANGELOOSE]:te[ne.HYPHENRANGE];L=L.replace(ee,xe(this.options.includePrerelease)),$(`hyphen replace`,L),L=L.replace(te[ne.COMPARATORTRIM],re),$(`comparator trim`,L),L=L.replace(te[ne.TILDETRIM],ie),$(`tilde trim`,L),L=L.replace(te[ne.CARETTRIM],ae),$(`caret trim`,L);let le=L.split(` `).map(L=>de(L,this.options)).join(` `).split(/\s+/).map(L=>be(L,this.options));Z&&(le=le.filter(L=>($(`loose invalid filter`,L,this.options),!!L.match(te[ne.COMPARATORLOOSE])))),$(`range list`,le);let ue=new Map,fe=le.map(L=>new Q(L,this.options));for(let L of fe){if(ce(L))return[L];ue.set(L.value,L)}ue.size>1&&ue.has(``)&&ue.delete(``);let pe=[...ue.values()];return X.set(J,pe),pe}intersects(J,Y){if(!(J instanceof L))throw TypeError(`a Range is required`);return this.set.some(L=>ue(L,Y)&&J.set.some(J=>ue(J,Y)&&L.every(L=>J.every(J=>L.intersects(J,Y)))))}test(L){if(!L)return!1;if(typeof L==`string`)try{L=new ee(L,this.options)}catch{return!1}for(let J=0;J<this.set.length;J++)if(Se(this.set[J],L,this.options))return!0;return!1}};let X=new(require_lrucache()),Z=require_parse_options(),Q=require_comparator(),$=require_debug(),ee=require_semver$1(),{safeRe:te,t:ne,comparatorTrimReplace:re,tildeTrimReplace:ie,caretTrimReplace:ae}=require_re(),{FLAG_INCLUDE_PRERELEASE:oe,FLAG_LOOSE:se}=require_constants$5(),ce=L=>L.value===`<0.0.0-0`,le=L=>L.value===``,ue=(L,J)=>{let Y=!0,X=L.slice(),Z=X.pop();for(;Y&&X.length;)Y=X.every(L=>Z.intersects(L,J)),Z=X.pop();return Y},de=(L,J)=>(L=L.replace(te[ne.BUILD],``),$(`comp`,L,J),L=he(L,J),$(`caret`,L),L=pe(L,J),$(`tildes`,L),L=_e(L,J),$(`xrange`,L),L=ye(L,J),$(`stars`,L),L),fe=L=>!L||L.toLowerCase()===`x`||L===`*`,pe=(L,J)=>L.trim().split(/\s+/).map(L=>me(L,J)).join(` `),me=(L,J)=>{let Y=J.loose?te[ne.TILDELOOSE]:te[ne.TILDE];return L.replace(Y,(J,Y,X,Z,Q)=>{$(`tilde`,L,J,Y,X,Z,Q);let ee;return fe(Y)?ee=``:fe(X)?ee=`>=${Y}.0.0 <${+Y+1}.0.0-0`:fe(Z)?ee=`>=${Y}.${X}.0 <${Y}.${+X+1}.0-0`:Q?($(`replaceTilde pr`,Q),ee=`>=${Y}.${X}.${Z}-${Q} <${Y}.${+X+1}.0-0`):ee=`>=${Y}.${X}.${Z} <${Y}.${+X+1}.0-0`,$(`tilde return`,ee),ee})},he=(L,J)=>L.trim().split(/\s+/).map(L=>ge(L,J)).join(` `),ge=(L,J)=>{$(`caret`,L,J);let Y=J.loose?te[ne.CARETLOOSE]:te[ne.CARET],X=J.includePrerelease?`-0`:``;return L.replace(Y,(J,Y,Z,Q,ee)=>{$(`caret`,L,J,Y,Z,Q,ee);let te;return fe(Y)?te=``:fe(Z)?te=`>=${Y}.0.0${X} <${+Y+1}.0.0-0`:fe(Q)?te=Y===`0`?`>=${Y}.${Z}.0${X} <${Y}.${+Z+1}.0-0`:`>=${Y}.${Z}.0${X} <${+Y+1}.0.0-0`:ee?($(`replaceCaret pr`,ee),te=Y===`0`?Z===`0`?`>=${Y}.${Z}.${Q}-${ee} <${Y}.${Z}.${+Q+1}-0`:`>=${Y}.${Z}.${Q}-${ee} <${Y}.${+Z+1}.0-0`:`>=${Y}.${Z}.${Q}-${ee} <${+Y+1}.0.0-0`):($(`no pr`),te=Y===`0`?Z===`0`?`>=${Y}.${Z}.${Q}${X} <${Y}.${Z}.${+Q+1}-0`:`>=${Y}.${Z}.${Q}${X} <${Y}.${+Z+1}.0-0`:`>=${Y}.${Z}.${Q} <${+Y+1}.0.0-0`),$(`caret return`,te),te})},_e=(L,J)=>($(`replaceXRanges`,L,J),L.split(/\s+/).map(L=>ve(L,J)).join(` `)),ve=(L,J)=>{L=L.trim();let Y=J.loose?te[ne.XRANGELOOSE]:te[ne.XRANGE];return L.replace(Y,(Y,X,Z,Q,ee,te)=>{$(`xRange`,L,Y,X,Z,Q,ee,te);let ne=fe(Z),re=ne||fe(Q),ie=re||fe(ee),ae=ie;return X===`=`&&ae&&(X=``),te=J.includePrerelease?`-0`:``,ne?Y=X===`>`||X===`<`?`<0.0.0-0`:`*`:X&&ae?(re&&(Q=0),ee=0,X===`>`?(X=`>=`,re?(Z=+Z+1,Q=0,ee=0):(Q=+Q+1,ee=0)):X===`<=`&&(X=`<`,re?Z=+Z+1:Q=+Q+1),X===`<`&&(te=`-0`),Y=`${X+Z}.${Q}.${ee}${te}`):re?Y=`>=${Z}.0.0${te} <${+Z+1}.0.0-0`:ie&&(Y=`>=${Z}.${Q}.0${te} <${Z}.${+Q+1}.0-0`),$(`xRange return`,Y),Y})},ye=(L,J)=>($(`replaceStars`,L,J),L.trim().replace(te[ne.STAR],``)),be=(L,J)=>($(`replaceGTE0`,L,J),L.trim().replace(te[J.includePrerelease?ne.GTE0PRE:ne.GTE0],``)),xe=L=>(J,Y,X,Z,Q,$,ee,te,ne,re,ie,ae)=>(Y=fe(X)?``:fe(Z)?`>=${X}.0.0${L?`-0`:``}`:fe(Q)?`>=${X}.${Z}.0${L?`-0`:``}`:$?`>=${Y}`:`>=${Y}${L?`-0`:``}`,te=fe(ne)?``:fe(re)?`<${+ne+1}.0.0-0`:fe(ie)?`<${ne}.${+re+1}.0-0`:ae?`<=${ne}.${re}.${ie}-${ae}`:L?`<${ne}.${re}.${+ie+1}-0`:`<=${te}`,`${Y} ${te}`.trim()),Se=(L,J,Y)=>{for(let Y=0;Y<L.length;Y++)if(!L[Y].test(J))return!1;if(J.prerelease.length&&!Y.includePrerelease){for(let Y=0;Y<L.length;Y++)if($(L[Y].semver),L[Y].semver!==Q.ANY&&L[Y].semver.prerelease.length>0){let X=L[Y].semver;if(X.major===J.major&&X.minor===J.minor&&X.patch===J.patch)return!0}return!1}return!0}})),require_comparator=__commonJSMin(((L,J)=>{let Y=Symbol(`SemVer ANY`);J.exports=class L{static get ANY(){return Y}constructor(J,Z){if(Z=X(Z),J instanceof L){if(J.loose===!!Z.loose)return J;J=J.value}J=J.trim().split(/\s+/).join(` `),ee(`comparator`,J,Z),this.options=Z,this.loose=!!Z.loose,this.parse(J),this.semver===Y?this.value=``:this.value=this.operator+this.semver.version,ee(`comp`,this)}parse(L){let J=this.options.loose?Z[Q.COMPARATORLOOSE]:Z[Q.COMPARATOR],X=L.match(J);if(!X)throw TypeError(`Invalid comparator: ${L}`);this.operator=X[1]===void 0?``:X[1],this.operator===`=`&&(this.operator=``),X[2]?this.semver=new te(X[2],this.options.loose):this.semver=Y}toString(){return this.value}test(L){if(ee(`Comparator.test`,L,this.options.loose),this.semver===Y||L===Y)return!0;if(typeof L==`string`)try{L=new te(L,this.options)}catch{return!1}return $(L,this.operator,this.semver,this.options)}intersects(J,Y){if(!(J instanceof L))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new ne(J.value,Y).test(this.value):J.operator===``?J.value===``?!0:new ne(this.value,Y).test(J.semver):(Y=X(Y),Y.includePrerelease&&(this.value===`<0.0.0-0`||J.value===`<0.0.0-0`)||!Y.includePrerelease&&(this.value.startsWith(`<0.0.0`)||J.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&J.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&J.operator.startsWith(`<`)||this.semver.version===J.semver.version&&this.operator.includes(`=`)&&J.operator.includes(`=`)||$(this.semver,`<`,J.semver,Y)&&this.operator.startsWith(`>`)&&J.operator.startsWith(`<`)||$(this.semver,`>`,J.semver,Y)&&this.operator.startsWith(`<`)&&J.operator.startsWith(`>`)))}};let X=require_parse_options(),{safeRe:Z,t:Q}=require_re(),$=require_cmp(),ee=require_debug(),te=require_semver$1(),ne=require_range()})),require_satisfies=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J,X)=>{try{J=new Y(J,X)}catch{return!1}return J.test(L)}})),require_to_comparators=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J)=>new Y(L,J).set.map(L=>L.map(L=>L.value).join(` `).trim().split(` `))})),require_max_satisfying=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_range();J.exports=(L,J,Z)=>{let Q=null,$=null,ee=null;try{ee=new X(J,Z)}catch{return null}return L.forEach(L=>{ee.test(L)&&(!Q||$.compare(L)===-1)&&(Q=L,$=new Y(Q,Z))}),Q}})),require_min_satisfying=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_range();J.exports=(L,J,Z)=>{let Q=null,$=null,ee=null;try{ee=new X(J,Z)}catch{return null}return L.forEach(L=>{ee.test(L)&&(!Q||$.compare(L)===1)&&(Q=L,$=new Y(Q,Z))}),Q}})),require_min_version=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_range(),Z=require_gt();J.exports=(L,J)=>{L=new X(L,J);let Q=new Y(`0.0.0`);if(L.test(Q)||(Q=new Y(`0.0.0-0`),L.test(Q)))return Q;Q=null;for(let J=0;J<L.set.length;++J){let X=L.set[J],$=null;X.forEach(L=>{let J=new Y(L.semver.version);switch(L.operator){case`>`:J.prerelease.length===0?J.patch++:J.prerelease.push(0),J.raw=J.format();case``:case`>=`:(!$||Z(J,$))&&($=J);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${L.operator}`)}}),$&&(!Q||Z(Q,$))&&(Q=$)}return Q&&L.test(Q)?Q:null}})),require_valid=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J)=>{try{return new Y(L,J).range||`*`}catch{return null}}})),require_outside=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_comparator(),{ANY:Z}=X,Q=require_range(),$=require_satisfies(),ee=require_gt(),te=require_lt(),ne=require_lte(),re=require_gte();J.exports=(L,J,ie,ae)=>{L=new Y(L,ae),J=new Q(J,ae);let oe,se,ce,le,ue;switch(ie){case`>`:oe=ee,se=ne,ce=te,le=`>`,ue=`>=`;break;case`<`:oe=te,se=re,ce=ee,le=`<`,ue=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if($(L,J,ae))return!1;for(let Y=0;Y<J.set.length;++Y){let Q=J.set[Y],$=null,ee=null;if(Q.forEach(L=>{L.semver===Z&&(L=new X(`>=0.0.0`)),$||=L,ee||=L,oe(L.semver,$.semver,ae)?$=L:ce(L.semver,ee.semver,ae)&&(ee=L)}),$.operator===le||$.operator===ue||(!ee.operator||ee.operator===le)&&se(L,ee.semver)||ee.operator===ue&&ce(L,ee.semver))return!1}return!0}})),require_gtr=__commonJSMin(((L,J)=>{let Y=require_outside();J.exports=(L,J,X)=>Y(L,J,`>`,X)})),require_ltr=__commonJSMin(((L,J)=>{let Y=require_outside();J.exports=(L,J,X)=>Y(L,J,`<`,X)})),require_intersects=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J,X)=>(L=new Y(L,X),J=new Y(J,X),L.intersects(J,X))})),require_simplify=__commonJSMin(((L,J)=>{let Y=require_satisfies(),X=require_compare();J.exports=(L,J,Z)=>{let Q=[],$=null,ee=null,te=L.sort((L,J)=>X(L,J,Z));for(let L of te)Y(L,J,Z)?(ee=L,$||=L):(ee&&Q.push([$,ee]),ee=null,$=null);$&&Q.push([$,null]);let ne=[];for(let[L,J]of Q)L===J?ne.push(L):!J&&L===te[0]?ne.push(`*`):J?L===te[0]?ne.push(`<=${J}`):ne.push(`${L} - ${J}`):ne.push(`>=${L}`);let re=ne.join(` || `),ie=typeof J.raw==`string`?J.raw:String(J);return re.length<ie.length?re:J}})),require_subset=__commonJSMin(((L,J)=>{let Y=require_range(),X=require_comparator(),{ANY:Z}=X,Q=require_satisfies(),$=require_compare(),ee=(L,J,X={})=>{if(L===J)return!0;L=new Y(L,X),J=new Y(J,X);let Z=!1;OUTER:for(let Y of L.set){for(let L of J.set){let J=re(Y,L,X);if(Z||=J!==null,J)continue OUTER}if(Z)return!1}return!0},te=[new X(`>=0.0.0-0`)],ne=[new X(`>=0.0.0`)],re=(L,J,Y)=>{if(L===J)return!0;if(L.length===1&&L[0].semver===Z){if(J.length===1&&J[0].semver===Z)return!0;L=Y.includePrerelease?te:ne}if(J.length===1&&J[0].semver===Z){if(Y.includePrerelease)return!0;J=ne}let X=new Set,ee,re;for(let J of L)J.operator===`>`||J.operator===`>=`?ee=ie(ee,J,Y):J.operator===`<`||J.operator===`<=`?re=ae(re,J,Y):X.add(J.semver);if(X.size>1)return null;let oe;if(ee&&re&&(oe=$(ee.semver,re.semver,Y),oe>0||oe===0&&(ee.operator!==`>=`||re.operator!==`<=`)))return null;for(let L of X){if(ee&&!Q(L,String(ee),Y)||re&&!Q(L,String(re),Y))return null;for(let X of J)if(!Q(L,String(X),Y))return!1;return!0}let se,ce,le,ue,de=re&&!Y.includePrerelease&&re.semver.prerelease.length?re.semver:!1,fe=ee&&!Y.includePrerelease&&ee.semver.prerelease.length?ee.semver:!1;de&&de.prerelease.length===1&&re.operator===`<`&&de.prerelease[0]===0&&(de=!1);for(let L of J){if(ue=ue||L.operator===`>`||L.operator===`>=`,le=le||L.operator===`<`||L.operator===`<=`,ee){if(fe&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===fe.major&&L.semver.minor===fe.minor&&L.semver.patch===fe.patch&&(fe=!1),L.operator===`>`||L.operator===`>=`){if(se=ie(ee,L,Y),se===L&&se!==ee)return!1}else if(ee.operator===`>=`&&!Q(ee.semver,String(L),Y))return!1}if(re){if(de&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===de.major&&L.semver.minor===de.minor&&L.semver.patch===de.patch&&(de=!1),L.operator===`<`||L.operator===`<=`){if(ce=ae(re,L,Y),ce===L&&ce!==re)return!1}else if(re.operator===`<=`&&!Q(re.semver,String(L),Y))return!1}if(!L.operator&&(re||ee)&&oe!==0)return!1}return!(ee&&le&&!re&&oe!==0||re&&ue&&!ee&&oe!==0||fe||de)},ie=(L,J,Y)=>{if(!L)return J;let X=$(L.semver,J.semver,Y);return X>0?L:X<0||J.operator===`>`&&L.operator===`>=`?J:L},ae=(L,J,Y)=>{if(!L)return J;let X=$(L.semver,J.semver,Y);return X<0?L:X>0||J.operator===`<`&&L.operator===`<=`?J:L};J.exports=ee})),require_semver=__commonJSMin(((L,J)=>{let Y=require_re(),X=require_constants$5(),Z=require_semver$1(),Q=require_identifiers();J.exports={parse:require_parse$6(),valid:require_valid$1(),clean:require_clean(),inc:require_inc(),diff:require_diff(),major:require_major(),minor:require_minor(),patch:require_patch(),prerelease:require_prerelease(),compare:require_compare(),rcompare:require_rcompare(),compareLoose:require_compare_loose(),compareBuild:require_compare_build(),sort:require_sort(),rsort:require_rsort(),gt:require_gt(),lt:require_lt(),eq:require_eq(),neq:require_neq(),gte:require_gte(),lte:require_lte(),cmp:require_cmp(),coerce:require_coerce(),Comparator:require_comparator(),Range:require_range(),satisfies:require_satisfies(),toComparators:require_to_comparators(),maxSatisfying:require_max_satisfying(),minSatisfying:require_min_satisfying(),minVersion:require_min_version(),validRange:require_valid(),outside:require_outside(),gtr:require_gtr(),ltr:require_ltr(),intersects:require_intersects(),simplifyRange:require_simplify(),subset:require_subset(),SemVer:Z,re:Y.re,src:Y.src,tokens:Y.t,SEMVER_SPEC_VERSION:X.SEMVER_SPEC_VERSION,RELEASE_TYPES:X.RELEASE_TYPES,compareIdentifiers:Q.compareIdentifiers,rcompareIdentifiers:Q.rcompareIdentifiers}})),import_semver=__toESM(require_semver(),1);const depSchema=object({age:string$2().optional(),info:string$2().optional(),new:string$2(),old:string$2()}),updatesOutputSchema=object({results:record(string$2(),record(string$2(),record(string$2(),depSchema)))});function resolveUpdatesBinary(){let L=createRequire(import.meta.url),J=L.resolve(`updates/package.json`),Y=L(J),X=typeof Y==`object`&&Y&&`bin`in Y&&typeof Y.bin==`string`?Y.bin:void 0;if(!X)throw Error(`Could not resolve updates binary path`);return join$1(dirname$1(J),X)}function parseAgeToYears(L){if(L===`now`)return 0;let J=/^(\d+)\s+(\w+)$/.exec(L.trim());if(!J)return 0;let Y=Number(J[1]);switch(J[2]){case`day`:case`days`:return Y/365.25;case`hour`:case`hours`:return Y/(365.25*24);case`min`:case`mins`:return Y/(365.25*24*60);case`month`:case`months`:return Y/12;case`sec`:case`secs`:return Y/(365.25*24*60*60);case`week`:case`weeks`:return Y*7/365.25;case`year`:case`years`:return Y;default:return 0}}function classifyBump(L,J){let Y=(0,import_semver.coerce)(L),X=(0,import_semver.coerce)(J);if(!Y||!X)return`major`;let Z=(0,import_semver.diff)(Y,X);return!Z||Z.startsWith(`major`)||Z===`premajor`?`major`:Z.startsWith(`minor`)||Z===`preminor`?`minor`:`patch`}const dependencyUpdatesSource=defineSource({async discover(L){return[L.options.path]},key:`dependencyUpdates`,async parse(L){log$2.debug(`Extracting dependency update information via updates...`);let J=await q(`node`,[resolveUpdatesBinary(),`--file`,L,`--json`]),Y;try{Y=updatesOutputSchema.parse(JSON.parse(J.stdout))}catch{log$2.debug(`No dependency files found for updates analysis.`);return}let X=[],Z=[],Q=[],$=0;for(let L of Object.values(Y.results))for(let J of Object.values(L))for(let[L,Y]of Object.entries(J)){if(L===`@types/node`)continue;Y.age&&($+=parseAgeToYears(Y.age));let J={name:L,new:Y.new,old:Y.old};switch(Y.age&&(J.age=Y.age),Y.info&&(J.info=Y.info),classifyBump(Y.old,Y.new)){case`major`:X.push(J);break;case`minor`:Z.push(J);break;case`patch`:Q.push(J);break}}return{data:{major:X,minor:Z,patch:Q},extra:{libyears:Math.round($*10)/10,total:X.length+Z.length+Q.length},source:L}},phase:1}),fileStatsSource=defineSource({async discover(L){return[L.options.path,...getWorkspaces(L.options.path,L.options.workspaces)]},key:`fileStats`,async parse(L,J){log$2.debug(`Extracting file statistics metadata...`);let Y=await getMatches({...J.options,path:L,recursive:!1,workspaces:!1},[`**`]),X=Y.length,Z=new Set;for(let J of Y){let Y=dirname$1(J);Y!==L&&Z.add(Y)}return{data:{totalDirectoryCount:Z.size,totalFileCount:X,totalSizeBytes:(await batchMap(Y,async L=>{try{return(await stat(L)).size}catch{return 0}},100)).reduce((L,J)=>L+J,0)},source:L}},phase:1}),_DRIVE_LETTER_START_RE=/^[A-Za-z]:\//;function normalizeWindowsPath(L=``){return L&&L.replace(/\\/g,`/`).replace(_DRIVE_LETTER_START_RE,L=>L.toUpperCase())}const _UNC_REGEX=/^[/\\]{2}/,_IS_ABSOLUTE_RE=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,_DRIVE_LETTER_RE=/^[A-Za-z]:$/,normalize$2=function(L){if(L.length===0)return`.`;L=normalizeWindowsPath(L);let J=L.match(_UNC_REGEX),Y=isAbsolute(L),X=L[L.length-1]===`/`;return L=normalizeString(L,!Y),L.length===0?Y?`/`:X?`./`:`.`:(X&&(L+=`/`),_DRIVE_LETTER_RE.test(L)&&(L+=`/`),J?Y?`//${L}`:`//./${L}`:Y&&!isAbsolute(L)?`/${L}`:L)},join$3=function(...L){let J=``;for(let Y of L)if(Y)if(J.length>0){let L=J[J.length-1]===`/`,X=Y[0]===`/`;L&&X?J+=Y.slice(1):J+=L||X?Y:`/${Y}`}else J+=Y;return normalize$2(J)};function cwd$1(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const resolve$2=function(...L){L=L.map(L=>normalizeWindowsPath(L));let J=``,Y=!1;for(let X=L.length-1;X>=-1&&!Y;X--){let Z=X>=0?L[X]:cwd$1();!Z||Z.length===0||(J=`${Z}/${J}`,Y=isAbsolute(Z))}return J=normalizeString(J,!Y),Y&&!isAbsolute(J)?`/${J}`:J.length>0?J:`.`};function normalizeString(L,J){let Y=``,X=0,Z=-1,Q=0,$=null;for(let ee=0;ee<=L.length;++ee){if(ee<L.length)$=L[ee];else if($===`/`)break;else $=`/`;if($===`/`){if(!(Z===ee-1||Q===1))if(Q===2){if(Y.length<2||X!==2||Y[Y.length-1]!==`.`||Y[Y.length-2]!==`.`){if(Y.length>2){let L=Y.lastIndexOf(`/`);L===-1?(Y=``,X=0):(Y=Y.slice(0,L),X=Y.length-1-Y.lastIndexOf(`/`)),Z=ee,Q=0;continue}else if(Y.length>0){Y=``,X=0,Z=ee,Q=0;continue}}J&&(Y+=Y.length>0?`/..`:`..`,X=2)}else Y.length>0?Y+=`/${L.slice(Z+1,ee)}`:Y=L.slice(Z+1,ee),X=ee-Z-1;Z=ee,Q=0}else $===`.`&&Q!==-1?++Q:Q=-1}return Y}const isAbsolute=function(L){return _IS_ABSOLUTE_RE.test(L)};var e=Object.create,t$2=Object.defineProperty,n$1=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(L,J)=>()=>(J||L((J={exports:{}}).exports,J),J.exports),s=(L,J,Y,X)=>{if(J&&typeof J==`object`||typeof J==`function`)for(var Z=r(J),Q=0,$=Z.length,ee;Q<$;Q++)ee=Z[Q],!a.call(L,ee)&&ee!==Y&&t$2(L,ee,{get:(L=>J[L]).bind(null,ee),enumerable:!(X=n$1(J,ee))||X.enumerable});return L},c$1=(L,J,Y)=>(Y=L==null?{}:e(i(L)),s(J||!L||!L.__esModule?t$2(Y,`default`,{value:L,enumerable:!0}):Y,L)),t$1=o(((L,J)=>{let{hasOwnProperty:Y}=Object.prototype,X=(L,J={})=>{typeof J==`string`&&(J={section:J}),J.align=J.align===!0,J.newline=J.newline===!0,J.sort=J.sort===!0,J.whitespace=J.whitespace===!0||J.align===!0,J.platform=J.platform||typeof process<`u`&&process.platform,J.bracketedArray=J.bracketedArray!==!1;let Y=J.platform===`win32`?`\r
297
+ `);let J=new XmlNode(`!xml`),Y=J,X=``;this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let Z=new DocTypeReader(this.options.processEntities);for(let Q=0;Q<L.length;Q++)if(L[Q]===`<`)if(L[Q+1]===`/`){let J=findClosingIndex(L,`>`,Q,`Closing Tag is not closed.`),Z=L.substring(Q+2,J).trim();if(this.options.removeNSPrefix){let L=Z.indexOf(`:`);L!==-1&&(Z=Z.substr(L+1))}this.options.transformTagName&&(Z=this.options.transformTagName(Z)),Y&&(X=this.saveTextToParentTag(X,Y,this.matcher));let $=this.matcher.getCurrentTag();if(Z&&this.options.unpairedTags.indexOf(Z)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${Z}>`);$&&this.options.unpairedTags.indexOf($)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,Y=this.tagsNodeStack.pop(),X=``,Q=J}else if(L[Q+1]===`?`){let J=readTagExp(L,Q,!1,`?>`);if(!J)throw Error(`Pi Tag is not closed.`);if(X=this.saveTextToParentTag(X,Y,this.matcher),!(this.options.ignoreDeclaration&&J.tagName===`?xml`||this.options.ignorePiTags)){let L=new XmlNode(J.tagName);L.add(this.options.textNodeName,``),J.tagName!==J.tagExp&&J.attrExpPresent&&(L[`:@`]=this.buildAttributesMap(J.tagExp,this.matcher,J.tagName)),this.addChild(Y,L,this.matcher,Q)}Q=J.closeIndex+1}else if(L.substr(Q+1,3)===`!--`){let J=findClosingIndex(L,`-->`,Q+4,`Comment is not closed.`);if(this.options.commentPropName){let Z=L.substring(Q+4,J-2);X=this.saveTextToParentTag(X,Y,this.matcher),Y.add(this.options.commentPropName,[{[this.options.textNodeName]:Z}])}Q=J}else if(L.substr(Q+1,2)===`!D`){let J=Z.readDocType(L,Q);this.docTypeEntities=J.entities,Q=J.i}else if(L.substr(Q+1,2)===`![`){let J=findClosingIndex(L,`]]>`,Q,`CDATA is not closed.`)-2,Z=L.substring(Q+9,J);X=this.saveTextToParentTag(X,Y,this.matcher);let $=this.parseTextData(Z,Y.tagname,this.matcher,!0,!1,!0,!0);$??=``,this.options.cdataPropName?Y.add(this.options.cdataPropName,[{[this.options.textNodeName]:Z}]):Y.add(this.options.textNodeName,$),Q=J+2}else{let Z=readTagExp(L,Q,this.options.removeNSPrefix);if(!Z){let J=L.substring(Math.max(0,Q-50),Math.min(L.length,Q+50));throw Error(`readTagExp returned undefined at position ${Q}. Context: "${J}"`)}let $=Z.tagName,ee=Z.rawTagName,te=Z.tagExp,ne=Z.attrExpPresent,re=Z.closeIndex;if(this.options.transformTagName){let L=this.options.transformTagName($);te===$&&(te=L),$=L}if(this.options.strictReservedNames&&($===this.options.commentPropName||$===this.options.cdataPropName))throw Error(`Invalid tag name: ${$}`);Y&&X&&Y.tagname!==`!xml`&&(X=this.saveTextToParentTag(X,Y,this.matcher,!1));let ie=Y;ie&&this.options.unpairedTags.indexOf(ie.tagname)!==-1&&(Y=this.tagsNodeStack.pop(),this.matcher.pop());let ae=!1;te.length>0&&te.lastIndexOf(`/`)===te.length-1&&(ae=!0,$[$.length-1]===`/`?($=$.substr(0,$.length-1),te=$):te=te.substr(0,te.length-1),ne=$!==te);let oe=null,se;se=extractNamespace(ee),$!==J.tagname&&this.matcher.push($,{},se),$!==te&&ne&&(oe=this.buildAttributesMap(te,this.matcher,$),oe&&extractRawAttributes(oe,this.options)),$!==J.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let ce=Q;if(this.isCurrentNodeStopNode){let J=``;if(ae)Q=Z.closeIndex;else if(this.options.unpairedTags.indexOf($)!==-1)Q=Z.closeIndex;else{let Y=this.readStopNodeData(L,ee,re+1);if(!Y)throw Error(`Unexpected end of ${ee}`);Q=Y.i,J=Y.tagContent}let X=new XmlNode($);oe&&(X[`:@`]=oe),X.add(this.options.textNodeName,J),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(Y,X,this.matcher,ce)}else{if(ae){if(this.options.transformTagName){let L=this.options.transformTagName($);te===$&&(te=L),$=L}let L=new XmlNode($);oe&&(L[`:@`]=oe),this.addChild(Y,L,this.matcher,ce),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf($)!==-1){let L=new XmlNode($);oe&&(L[`:@`]=oe),this.addChild(Y,L,this.matcher,ce),this.matcher.pop(),this.isCurrentNodeStopNode=!1,Q=Z.closeIndex;continue}else{let L=new XmlNode($);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(Y),oe&&(L[`:@`]=oe),this.addChild(Y,L,this.matcher,ce),Y=L}X=``,Q=re}}else X+=L[Q];return J.child};function addChild(L,J,Y,X){this.options.captureMetaData||(X=void 0);let Z=this.options.jPath?Y.toString():Y,Q=this.options.updateTag(J.tagname,Z,J[`:@`]);Q===!1||(typeof Q==`string`&&(J.tagname=Q),L.addChild(J,X))}function replaceEntitiesValue(L,J,Y){let X=this.options.processEntities;if(!X||!X.enabled)return L;if(X.allowedTags){let Z=this.options.jPath?Y.toString():Y;if(!(Array.isArray(X.allowedTags)?X.allowedTags.includes(J):X.allowedTags(J,Z)))return L}if(X.tagFilter){let Z=this.options.jPath?Y.toString():Y;if(!X.tagFilter(J,Z))return L}for(let J in this.docTypeEntities){let Y=this.docTypeEntities[J],Z=L.match(Y.regx);if(Z){if(this.entityExpansionCount+=Z.length,X.maxTotalExpansions&&this.entityExpansionCount>X.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${X.maxTotalExpansions}`);let J=L.length;if(L=L.replace(Y.regx,Y.val),X.maxExpandedLength&&(this.currentExpandedLength+=L.length-J,this.currentExpandedLength>X.maxExpandedLength))throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${X.maxExpandedLength}`)}}if(L.indexOf(`&`)===-1)return L;for(let J in this.lastEntities){let Y=this.lastEntities[J];L=L.replace(Y.regex,Y.val)}if(L.indexOf(`&`)===-1)return L;if(this.options.htmlEntities)for(let J in this.htmlEntities){let Y=this.htmlEntities[J];L=L.replace(Y.regex,Y.val)}return L=L.replace(this.ampEntity.regex,this.ampEntity.val),L}function saveTextToParentTag(L,J,Y,X){return L&&=(X===void 0&&(X=J.child.length===0),L=this.parseTextData(L,J.tagname,Y,!1,J[`:@`]?Object.keys(J[`:@`]).length!==0:!1,X),L!==void 0&&L!==``&&J.add(this.options.textNodeName,L),``),L}function isItStopNode(L,J){if(!L||L.length===0)return!1;for(let Y=0;Y<L.length;Y++)if(J.matches(L[Y]))return!0;return!1}function tagExpWithClosingIndex(L,J,Y=`>`){let X,Z=``;for(let Q=J;Q<L.length;Q++){let J=L[Q];if(X)J===X&&(X=``);else if(J===`"`||J===`'`)X=J;else if(J===Y[0])if(Y[1]){if(L[Q+1]===Y[1])return{data:Z,index:Q}}else return{data:Z,index:Q};else J===` `&&(J=` `);Z+=J}}function findClosingIndex(L,J,Y,X){let Z=L.indexOf(J,Y);if(Z===-1)throw Error(X);return Z+J.length-1}function readTagExp(L,J,Y,X=`>`){let Z=tagExpWithClosingIndex(L,J+1,X);if(!Z)return;let Q=Z.data,$=Z.index,ee=Q.search(/\s/),te=Q,ne=!0;ee!==-1&&(te=Q.substring(0,ee),Q=Q.substring(ee+1).trimStart());let re=te;if(Y){let L=te.indexOf(`:`);L!==-1&&(te=te.substr(L+1),ne=te!==Z.data.substr(L+1))}return{tagName:te,tagExp:Q,closeIndex:$,attrExpPresent:ne,rawTagName:re}}function readStopNodeData(L,J,Y){let X=Y,Z=1;for(;Y<L.length;Y++)if(L[Y]===`<`)if(L[Y+1]===`/`){let Q=findClosingIndex(L,`>`,Y,`${J} is not closed`);if(L.substring(Y+2,Q).trim()===J&&(Z--,Z===0))return{tagContent:L.substring(X,Y),i:Q};Y=Q}else if(L[Y+1]===`?`)Y=findClosingIndex(L,`?>`,Y+1,`StopNode is not closed.`);else if(L.substr(Y+1,3)===`!--`)Y=findClosingIndex(L,`-->`,Y+3,`StopNode is not closed.`);else if(L.substr(Y+1,2)===`![`)Y=findClosingIndex(L,`]]>`,Y,`StopNode is not closed.`)-2;else{let X=readTagExp(L,Y,`>`);X&&((X&&X.tagName)===J&&X.tagExp[X.tagExp.length-1]!==`/`&&Z++,Y=X.closeIndex)}}function parseValue$1(L,J,Y){if(J&&typeof L==`string`){let J=L.trim();return J===`true`?!0:J===`false`?!1:toNumber$1(L,Y)}else if(isExist(L))return L;else return``}function fromCodePoint(L,J,Y){let X=Number.parseInt(L,J);return X>=0&&X<=1114111?String.fromCodePoint(X):Y+L+`;`}const METADATA_SYMBOL=XmlNode.getMetaDataSymbol();function stripAttributePrefix(L,J){if(!L||typeof L!=`object`)return{};if(!J)return L;let Y={};for(let X in L)if(X.startsWith(J)){let Z=X.substring(J.length);Y[Z]=L[X]}else Y[X]=L[X];return Y}function prettify(L,J,Y){return compress(L,J,Y)}function compress(L,J,Y){let X,Z={};for(let Q=0;Q<L.length;Q++){let $=L[Q],ee=propName($);if(ee!==void 0&&ee!==J.textNodeName){let L=stripAttributePrefix($[`:@`]||{},J.attributeNamePrefix);Y.push(ee,L)}if(ee===J.textNodeName)X===void 0?X=$[ee]:X+=``+$[ee];else if(ee===void 0)continue;else if($[ee]){let L=compress($[ee],J,Y),X=isLeafTag(L,J);if($[`:@`]?assignAttributes(L,$[`:@`],Y,J):Object.keys(L).length===1&&L[J.textNodeName]!==void 0&&!J.alwaysCreateTextNode?L=L[J.textNodeName]:Object.keys(L).length===0&&(J.alwaysCreateTextNode?L[J.textNodeName]=``:L=``),$[METADATA_SYMBOL]!==void 0&&typeof L==`object`&&L&&(L[METADATA_SYMBOL]=$[METADATA_SYMBOL]),Z[ee]!==void 0&&Object.prototype.hasOwnProperty.call(Z,ee))Array.isArray(Z[ee])||(Z[ee]=[Z[ee]]),Z[ee].push(L);else{let Q=J.jPath?Y.toString():Y;J.isArray(ee,Q,X)?Z[ee]=[L]:Z[ee]=L}ee!==void 0&&ee!==J.textNodeName&&Y.pop()}}return typeof X==`string`?X.length>0&&(Z[J.textNodeName]=X):X!==void 0&&(Z[J.textNodeName]=X),Z}function propName(L){let J=Object.keys(L);for(let L=0;L<J.length;L++){let Y=J[L];if(Y!==`:@`)return Y}}function assignAttributes(L,J,Y,X){if(J){let Z=Object.keys(J),Q=Z.length;for(let $=0;$<Q;$++){let Q=Z[$],ee=Q.startsWith(X.attributeNamePrefix)?Q.substring(X.attributeNamePrefix.length):Q,te=X.jPath?Y.toString()+`.`+ee:Y;X.isArray(Q,te,!0,!0)?L[Q]=[J[Q]]:L[Q]=J[Q]}}}function isLeafTag(L,J){let{textNodeName:Y}=J,X=Object.keys(L).length;return!!(X===0||X===1&&(L[Y]||typeof L[Y]==`boolean`||L[Y]===0))}var XMLParser=class{constructor(L){this.externalEntities={},this.options=buildOptions(L)}parse(L,J){if(typeof L!=`string`&&L.toString)L=L.toString();else if(typeof L!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(J){J===!0&&(J={});let Y=validate$1(L,J);if(Y!==!0)throw Error(`${Y.err.msg}:${Y.err.line}:${Y.err.col}`)}let Y=new OrderedObjParser(this.options);Y.addExternalEntities(this.externalEntities);let X=Y.parseXml(L);return this.options.preserveOrder||X===void 0?X:prettify(X,this.options,Y.matcher)}addEntity(L,J){if(J.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(L.indexOf(`&`)!==-1||L.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'`);if(J===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[L]=J}static getMetaDataSymbol(){return XmlNode.getMetaDataSymbol()}};const cinderCinderblockSchema=object({author:stringArray,git:optionalUrl,id:nonEmptyString,library:optionalUrl,license:nonEmptyString,name:nonEmptyString,requires:stringArray,summary:nonEmptyString,supports:stringArray,url:optionalUrl,version:nonEmptyString}),OS_MAP={ios:`iOS`,linux:`Linux`,macosx:`macOS`,msw:`Windows`};function parse$23(L){let J=new XMLParser({attributeNamePrefix:`@_`,ignoreAttributes:!1,parseTagValue:!1}),Y;try{let X=J.parse(L);if(!is.plainObject(X))return;Y=X}catch{return}if(!is.plainObject(Y.cinder))return;let{cinder:X}=Y;if(!is.plainObject(X.block))return;let{block:Z}=X;return cinderCinderblockSchema.parse({author:splitCommaSeparated(getAttribute(Z,`author`)),git:getAttribute(Z,`git`),id:getAttribute(Z,`id`),library:getAttribute(Z,`library`)??getAttribute(Z,`libraryUrl`),license:getAttribute(Z,`license`),name:getAttribute(Z,`name`),requires:parseDependencies$3(Z),summary:getAttribute(Z,`summary`),supports:parseOperatingSystems$3(Z),url:getAttribute(Z,`url`),version:getAttribute(Z,`version`)})}function getAttribute(L,J){let Y=L[`@_${J}`];if(typeof Y!=`string`)return;let X=Y.trim();return X.length>0?X:void 0}function parseOperatingSystems$3(L){let J=[],Y=new Set;for(let X of ensureArray(L.supports)){if(!is.plainObject(X))continue;let L=getAttribute(X,`os`);if(L){let X=OS_MAP[L.toLowerCase()]??L;Y.has(X)||(Y.add(X),J.push(X))}}return J}function parseDependencies$3(L){let J=[];for(let Y of ensureArray(L.requires)){if(typeof Y!=`string`)continue;let L=Y.trim();L.length>0&&J.push(L)}return J}const cinderCinderblockXmlSource=defineSource({async discover(L){return getMatches(L.options,[`cinderblock.xml`])},key:`cinderCinderblockXml`,async parse(L,J){let Y=parse$23(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});async function getStatistics(L,J){let Y=(await tokei({include:[L],noIgnore:!J.respectIgnored,noIgnoreDot:!J.respectIgnored,noIgnoreVcs:!J.respectIgnored})).toSorted((L,J)=>J.code-L.code);return{data:{perLanguage:Y,total:{blanks:Y.reduce((L,J)=>L+J.blanks,0),code:Y.reduce((L,J)=>L+J.code,0),comments:Y.reduce((L,J)=>L+J.comments,0),files:Y.reduce((L,J)=>L+J.files,0),languages:Y.map(L=>L.language),lines:Y.reduce((L,J)=>L+J.lines,0)}},source:L}}const codeStatsSource=defineSource({async discover(L){return[L.options.path,...getWorkspaces(L.options.path,L.options.workspaces)]},key:`codeStats`,async parse(L,J){return log$2.debug(`Extracting lines of code via tokei...`),getStatistics(L,J.options)},phase:1}),codeMetaString=preprocess$1(L=>{if(typeof L==`string`)return L;if(is.plainObject(L)&&typeof L[`@value`]==`string`)return L[`@value`]},nonEmptyString),codeMetaUrl=preprocess$1(L=>{if(typeof L==`string`)return L;if(is.plainObject(L)&&typeof L[`@value`]==`string`)return L[`@value`]},optionalUrl),codeMetaStringArray=preprocess$1(L=>{if(L!=null){if(typeof L==`string`)return L.includes(`,`)?splitCommaSeparated(L):[L];if(Array.isArray(L))return L.map(L=>typeof L==`string`?L.trim():is.plainObject(L)?typeof L.name==`string`?L.name.trim():``:(log$2.warn(`Invalid type found in codemeta json parser`),``)).filter(L=>L.length>0)}},array(string$2()).optional()).optional(),codeMetaLicense=preprocess$1(L=>{if(typeof L==`string`)return L;if(Array.isArray(L)){let J=L.filter(L=>typeof L==`string`);return J.length>0?J:void 0}},union([string$2(),array(string$2())]).optional()).optional(),codeMetaPersonOrOrgSchema=object({affiliation:nonEmptyString,email:nonEmptyString,familyName:nonEmptyString,givenName:nonEmptyString,id:nonEmptyString,name:nonEmptyString,type:_enum([`Organization`,`Person`]).optional(),url:optionalUrl});function preprocessPersonOrOrg(L){if(typeof L==`string`)return{name:L};if(!is.plainObject(L))return;let J={};if(typeof L[`@type`]==`string`){let Y=L[`@type`].toLowerCase();Y===`person`?J.type=`Person`:Y===`organization`&&(J.type=`Organization`)}if(typeof L[`@id`]==`string`&&(J.id=L[`@id`]),typeof L.name==`string`&&(J.name=L.name),typeof L.givenName==`string`&&(J.givenName=L.givenName),typeof L.familyName==`string`&&(J.familyName=L.familyName),typeof L.email==`string`&&(J.email=L.email),typeof L.url==`string`&&(J.url=L.url),typeof L.affiliation==`string`?J.affiliation=L.affiliation:is.plainObject(L.affiliation)&&typeof L.affiliation.name==`string`&&(J.affiliation=L.affiliation.name),J.name??J.givenName??J.familyName??J.email)return J}const codeMetaPersonArray=preprocess$1(L=>{if(L==null)return;let J=(Array.isArray(L)?L:[L]).map(L=>preprocessPersonOrOrg(L)).filter(L=>L!==void 0);return J.length>0?J:void 0},array(codeMetaPersonOrOrgSchema).optional()).optional(),codeMetaDependencySchema=object({identifier:nonEmptyString,name:nonEmptyString,runtimePlatform:nonEmptyString,version:nonEmptyString});function preprocessDependency(L){if(typeof L==`string`)return{name:L};if(!is.plainObject(L))return;let J={};if(typeof L.name==`string`&&(J.name=L.name),typeof L.identifier==`string`&&(J.identifier=L.identifier),typeof L.version==`string`&&(J.version=L.version),typeof L.runtimePlatform==`string`&&(J.runtimePlatform=L.runtimePlatform),J.name??J.identifier)return J}const codeMetaDependencyArray=preprocess$1(L=>{if(L==null)return;let J=(Array.isArray(L)?L:[L]).map(L=>preprocessDependency(L)).filter(L=>L!==void 0);return J.length>0?J:void 0},array(codeMetaDependencySchema).optional()).optional(),codeMetaJsonDataSchema=object({applicationCategory:codeMetaString,applicationSubCategory:codeMetaString,author:codeMetaPersonArray,buildInstructions:codeMetaUrl,codeRepository:codeMetaUrl,continuousIntegration:codeMetaUrl,contributor:codeMetaPersonArray,copyrightHolder:codeMetaPersonArray,copyrightYear:preprocess$1(L=>{if(typeof L==`number`)return L;if(typeof L==`string`){let J=Number.parseInt(L,10);return Number.isNaN(J)?void 0:J}},number().optional()),dateCreated:codeMetaString,dateModified:codeMetaString,datePublished:codeMetaString,description:codeMetaString,developmentStatus:codeMetaString,downloadUrl:codeMetaUrl,funder:codeMetaPersonArray,funding:codeMetaString,identifier:codeMetaString,installUrl:codeMetaUrl,isAccessibleForFree:boolean().optional(),issueTracker:codeMetaUrl,keywords:codeMetaStringArray,license:codeMetaLicense,maintainer:codeMetaPersonArray,name:codeMetaString,operatingSystem:codeMetaStringArray,programmingLanguage:codeMetaStringArray,readme:codeMetaUrl,relatedLink:codeMetaLicense,releaseNotes:codeMetaString,runtimePlatform:codeMetaStringArray,softwareHelp:codeMetaUrl,softwareRequirements:codeMetaDependencyArray,softwareSuggestions:codeMetaDependencyArray,softwareVersion:codeMetaString,url:codeMetaUrl,version:codeMetaString}),v1PropertyMap={agents:`author`,contIntegration:`continuousIntegration`,depends:`softwareRequirements`,suggests:`softwareSuggestions`,title:`name`};function parse$22(L){let J=parseJsonRecord(L);if(!J)return;let Y=migrateV1Properties(J);return Y.datePublished===void 0&&typeof Y.dateReleased==`string`&&(Y.datePublished=Y.dateReleased),codeMetaJsonDataSchema.parse(Y)}function migrateV1Properties(L){let J={};for(let[Y,X]of Object.entries(L)){if(Y.startsWith(`@`))continue;let L=v1PropertyMap[Y]??Y;L in J||(J[L]=X)}return J}const codemetaJsonSource=defineSource({async discover(L){return getMatches(L.options,[`codemeta.json`])},key:`codemetaJson`,async parse(L,J){let Y=parse$22(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});var require_inc=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X,Z,Q)=>{typeof X==`string`&&(Q=Z,Z=X,X=void 0);try{return new Y(L instanceof Y?L.version:L,X).inc(J,Z,Q).version}catch{return null}}})),require_diff=__commonJSMin(((L,J)=>{let Y=require_parse$6();J.exports=(L,J)=>{let X=Y(L,null,!0),Z=Y(J,null,!0),Q=X.compare(Z);if(Q===0)return null;let $=Q>0,ee=$?X:Z,te=$?Z:X,ne=!!ee.prerelease.length;if(te.prerelease.length&&!ne){if(!te.patch&&!te.minor)return`major`;if(te.compareMain(ee)===0)return te.minor&&!te.patch?`minor`:`patch`}let re=ne?`pre`:``;return X.major===Z.major?X.minor===Z.minor?X.patch===Z.patch?`prerelease`:re+`patch`:re+`minor`:re+`major`}})),require_major=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J)=>new Y(L,J).major})),require_minor=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J)=>new Y(L,J).minor})),require_patch=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J)=>new Y(L,J).patch})),require_prerelease=__commonJSMin(((L,J)=>{let Y=require_parse$6();J.exports=(L,J)=>{let X=Y(L,J);return X&&X.prerelease.length?X.prerelease:null}})),require_compare=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X)=>new Y(L,X).compare(new Y(J,X))})),require_rcompare=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(J,L,X)})),require_compare_loose=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J)=>Y(L,J,!0)})),require_compare_build=__commonJSMin(((L,J)=>{let Y=require_semver$1();J.exports=(L,J,X)=>{let Z=new Y(L,X),Q=new Y(J,X);return Z.compare(Q)||Z.compareBuild(Q)}})),require_sort=__commonJSMin(((L,J)=>{let Y=require_compare_build();J.exports=(L,J)=>L.sort((L,X)=>Y(L,X,J))})),require_rsort=__commonJSMin(((L,J)=>{let Y=require_compare_build();J.exports=(L,J)=>L.sort((L,X)=>Y(X,L,J))})),require_gt=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)>0})),require_lt=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)<0})),require_eq=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)===0})),require_neq=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)!==0})),require_gte=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)>=0})),require_lte=__commonJSMin(((L,J)=>{let Y=require_compare();J.exports=(L,J,X)=>Y(L,J,X)<=0})),require_cmp=__commonJSMin(((L,J)=>{let Y=require_eq(),X=require_neq(),Z=require_gt(),Q=require_gte(),$=require_lt(),ee=require_lte();J.exports=(L,J,te,ne)=>{switch(J){case`===`:return typeof L==`object`&&(L=L.version),typeof te==`object`&&(te=te.version),L===te;case`!==`:return typeof L==`object`&&(L=L.version),typeof te==`object`&&(te=te.version),L!==te;case``:case`=`:case`==`:return Y(L,te,ne);case`!=`:return X(L,te,ne);case`>`:return Z(L,te,ne);case`>=`:return Q(L,te,ne);case`<`:return $(L,te,ne);case`<=`:return ee(L,te,ne);default:throw TypeError(`Invalid operator: ${J}`)}}})),require_coerce=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_parse$6(),{safeRe:Z,t:Q}=require_re();J.exports=(L,J)=>{if(L instanceof Y)return L;if(typeof L==`number`&&(L=String(L)),typeof L!=`string`)return null;J||={};let $=null;if(!J.rtl)$=L.match(J.includePrerelease?Z[Q.COERCEFULL]:Z[Q.COERCE]);else{let Y=J.includePrerelease?Z[Q.COERCERTLFULL]:Z[Q.COERCERTL],X;for(;(X=Y.exec(L))&&(!$||$.index+$[0].length!==L.length);)(!$||X.index+X[0].length!==$.index+$[0].length)&&($=X),Y.lastIndex=X.index+X[1].length+X[2].length;Y.lastIndex=-1}if($===null)return null;let ee=$[2];return X(`${ee}.${$[3]||`0`}.${$[4]||`0`}${J.includePrerelease&&$[5]?`-${$[5]}`:``}${J.includePrerelease&&$[6]?`+${$[6]}`:``}`,J)}})),require_lrucache=__commonJSMin(((L,J)=>{J.exports=class{constructor(){this.max=1e3,this.map=new Map}get(L){let J=this.map.get(L);if(J!==void 0)return this.map.delete(L),this.map.set(L,J),J}delete(L){return this.map.delete(L)}set(L,J){if(!this.delete(L)&&J!==void 0){if(this.map.size>=this.max){let L=this.map.keys().next().value;this.delete(L)}this.map.set(L,J)}return this}}})),require_range=__commonJSMin(((L,J)=>{let Y=/\s+/g;J.exports=class L{constructor(J,X){if(X=Z(X),J instanceof L)return J.loose===!!X.loose&&J.includePrerelease===!!X.includePrerelease?J:new L(J.raw,X);if(J instanceof Q)return this.raw=J.value,this.set=[[J]],this.formatted=void 0,this;if(this.options=X,this.loose=!!X.loose,this.includePrerelease=!!X.includePrerelease,this.raw=J.trim().replace(Y,` `),this.set=this.raw.split(`||`).map(L=>this.parseRange(L.trim())).filter(L=>L.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let L=this.set[0];if(this.set=this.set.filter(L=>!ce(L[0])),this.set.length===0)this.set=[L];else if(this.set.length>1){for(let L of this.set)if(L.length===1&&le(L[0])){this.set=[L];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let L=0;L<this.set.length;L++){L>0&&(this.formatted+=`||`);let J=this.set[L];for(let L=0;L<J.length;L++)L>0&&(this.formatted+=` `),this.formatted+=J[L].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(L){let J=((this.options.includePrerelease&&oe)|(this.options.loose&&se))+`:`+L,Y=X.get(J);if(Y)return Y;let Z=this.options.loose,ee=Z?te[ne.HYPHENRANGELOOSE]:te[ne.HYPHENRANGE];L=L.replace(ee,xe(this.options.includePrerelease)),$(`hyphen replace`,L),L=L.replace(te[ne.COMPARATORTRIM],re),$(`comparator trim`,L),L=L.replace(te[ne.TILDETRIM],ie),$(`tilde trim`,L),L=L.replace(te[ne.CARETTRIM],ae),$(`caret trim`,L);let le=L.split(` `).map(L=>de(L,this.options)).join(` `).split(/\s+/).map(L=>be(L,this.options));Z&&(le=le.filter(L=>($(`loose invalid filter`,L,this.options),!!L.match(te[ne.COMPARATORLOOSE])))),$(`range list`,le);let ue=new Map,fe=le.map(L=>new Q(L,this.options));for(let L of fe){if(ce(L))return[L];ue.set(L.value,L)}ue.size>1&&ue.has(``)&&ue.delete(``);let pe=[...ue.values()];return X.set(J,pe),pe}intersects(J,Y){if(!(J instanceof L))throw TypeError(`a Range is required`);return this.set.some(L=>ue(L,Y)&&J.set.some(J=>ue(J,Y)&&L.every(L=>J.every(J=>L.intersects(J,Y)))))}test(L){if(!L)return!1;if(typeof L==`string`)try{L=new ee(L,this.options)}catch{return!1}for(let J=0;J<this.set.length;J++)if(Se(this.set[J],L,this.options))return!0;return!1}};let X=new(require_lrucache()),Z=require_parse_options(),Q=require_comparator(),$=require_debug(),ee=require_semver$1(),{safeRe:te,t:ne,comparatorTrimReplace:re,tildeTrimReplace:ie,caretTrimReplace:ae}=require_re(),{FLAG_INCLUDE_PRERELEASE:oe,FLAG_LOOSE:se}=require_constants$5(),ce=L=>L.value===`<0.0.0-0`,le=L=>L.value===``,ue=(L,J)=>{let Y=!0,X=L.slice(),Z=X.pop();for(;Y&&X.length;)Y=X.every(L=>Z.intersects(L,J)),Z=X.pop();return Y},de=(L,J)=>(L=L.replace(te[ne.BUILD],``),$(`comp`,L,J),L=he(L,J),$(`caret`,L),L=pe(L,J),$(`tildes`,L),L=_e(L,J),$(`xrange`,L),L=ye(L,J),$(`stars`,L),L),fe=L=>!L||L.toLowerCase()===`x`||L===`*`,pe=(L,J)=>L.trim().split(/\s+/).map(L=>me(L,J)).join(` `),me=(L,J)=>{let Y=J.loose?te[ne.TILDELOOSE]:te[ne.TILDE];return L.replace(Y,(J,Y,X,Z,Q)=>{$(`tilde`,L,J,Y,X,Z,Q);let ee;return fe(Y)?ee=``:fe(X)?ee=`>=${Y}.0.0 <${+Y+1}.0.0-0`:fe(Z)?ee=`>=${Y}.${X}.0 <${Y}.${+X+1}.0-0`:Q?($(`replaceTilde pr`,Q),ee=`>=${Y}.${X}.${Z}-${Q} <${Y}.${+X+1}.0-0`):ee=`>=${Y}.${X}.${Z} <${Y}.${+X+1}.0-0`,$(`tilde return`,ee),ee})},he=(L,J)=>L.trim().split(/\s+/).map(L=>ge(L,J)).join(` `),ge=(L,J)=>{$(`caret`,L,J);let Y=J.loose?te[ne.CARETLOOSE]:te[ne.CARET],X=J.includePrerelease?`-0`:``;return L.replace(Y,(J,Y,Z,Q,ee)=>{$(`caret`,L,J,Y,Z,Q,ee);let te;return fe(Y)?te=``:fe(Z)?te=`>=${Y}.0.0${X} <${+Y+1}.0.0-0`:fe(Q)?te=Y===`0`?`>=${Y}.${Z}.0${X} <${Y}.${+Z+1}.0-0`:`>=${Y}.${Z}.0${X} <${+Y+1}.0.0-0`:ee?($(`replaceCaret pr`,ee),te=Y===`0`?Z===`0`?`>=${Y}.${Z}.${Q}-${ee} <${Y}.${Z}.${+Q+1}-0`:`>=${Y}.${Z}.${Q}-${ee} <${Y}.${+Z+1}.0-0`:`>=${Y}.${Z}.${Q}-${ee} <${+Y+1}.0.0-0`):($(`no pr`),te=Y===`0`?Z===`0`?`>=${Y}.${Z}.${Q}${X} <${Y}.${Z}.${+Q+1}-0`:`>=${Y}.${Z}.${Q}${X} <${Y}.${+Z+1}.0-0`:`>=${Y}.${Z}.${Q} <${+Y+1}.0.0-0`),$(`caret return`,te),te})},_e=(L,J)=>($(`replaceXRanges`,L,J),L.split(/\s+/).map(L=>ve(L,J)).join(` `)),ve=(L,J)=>{L=L.trim();let Y=J.loose?te[ne.XRANGELOOSE]:te[ne.XRANGE];return L.replace(Y,(Y,X,Z,Q,ee,te)=>{$(`xRange`,L,Y,X,Z,Q,ee,te);let ne=fe(Z),re=ne||fe(Q),ie=re||fe(ee),ae=ie;return X===`=`&&ae&&(X=``),te=J.includePrerelease?`-0`:``,ne?Y=X===`>`||X===`<`?`<0.0.0-0`:`*`:X&&ae?(re&&(Q=0),ee=0,X===`>`?(X=`>=`,re?(Z=+Z+1,Q=0,ee=0):(Q=+Q+1,ee=0)):X===`<=`&&(X=`<`,re?Z=+Z+1:Q=+Q+1),X===`<`&&(te=`-0`),Y=`${X+Z}.${Q}.${ee}${te}`):re?Y=`>=${Z}.0.0${te} <${+Z+1}.0.0-0`:ie&&(Y=`>=${Z}.${Q}.0${te} <${Z}.${+Q+1}.0-0`),$(`xRange return`,Y),Y})},ye=(L,J)=>($(`replaceStars`,L,J),L.trim().replace(te[ne.STAR],``)),be=(L,J)=>($(`replaceGTE0`,L,J),L.trim().replace(te[J.includePrerelease?ne.GTE0PRE:ne.GTE0],``)),xe=L=>(J,Y,X,Z,Q,$,ee,te,ne,re,ie,ae)=>(Y=fe(X)?``:fe(Z)?`>=${X}.0.0${L?`-0`:``}`:fe(Q)?`>=${X}.${Z}.0${L?`-0`:``}`:$?`>=${Y}`:`>=${Y}${L?`-0`:``}`,te=fe(ne)?``:fe(re)?`<${+ne+1}.0.0-0`:fe(ie)?`<${ne}.${+re+1}.0-0`:ae?`<=${ne}.${re}.${ie}-${ae}`:L?`<${ne}.${re}.${+ie+1}-0`:`<=${te}`,`${Y} ${te}`.trim()),Se=(L,J,Y)=>{for(let Y=0;Y<L.length;Y++)if(!L[Y].test(J))return!1;if(J.prerelease.length&&!Y.includePrerelease){for(let Y=0;Y<L.length;Y++)if($(L[Y].semver),L[Y].semver!==Q.ANY&&L[Y].semver.prerelease.length>0){let X=L[Y].semver;if(X.major===J.major&&X.minor===J.minor&&X.patch===J.patch)return!0}return!1}return!0}})),require_comparator=__commonJSMin(((L,J)=>{let Y=Symbol(`SemVer ANY`);J.exports=class L{static get ANY(){return Y}constructor(J,Z){if(Z=X(Z),J instanceof L){if(J.loose===!!Z.loose)return J;J=J.value}J=J.trim().split(/\s+/).join(` `),ee(`comparator`,J,Z),this.options=Z,this.loose=!!Z.loose,this.parse(J),this.semver===Y?this.value=``:this.value=this.operator+this.semver.version,ee(`comp`,this)}parse(L){let J=this.options.loose?Z[Q.COMPARATORLOOSE]:Z[Q.COMPARATOR],X=L.match(J);if(!X)throw TypeError(`Invalid comparator: ${L}`);this.operator=X[1]===void 0?``:X[1],this.operator===`=`&&(this.operator=``),X[2]?this.semver=new te(X[2],this.options.loose):this.semver=Y}toString(){return this.value}test(L){if(ee(`Comparator.test`,L,this.options.loose),this.semver===Y||L===Y)return!0;if(typeof L==`string`)try{L=new te(L,this.options)}catch{return!1}return $(L,this.operator,this.semver,this.options)}intersects(J,Y){if(!(J instanceof L))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new ne(J.value,Y).test(this.value):J.operator===``?J.value===``?!0:new ne(this.value,Y).test(J.semver):(Y=X(Y),Y.includePrerelease&&(this.value===`<0.0.0-0`||J.value===`<0.0.0-0`)||!Y.includePrerelease&&(this.value.startsWith(`<0.0.0`)||J.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&J.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&J.operator.startsWith(`<`)||this.semver.version===J.semver.version&&this.operator.includes(`=`)&&J.operator.includes(`=`)||$(this.semver,`<`,J.semver,Y)&&this.operator.startsWith(`>`)&&J.operator.startsWith(`<`)||$(this.semver,`>`,J.semver,Y)&&this.operator.startsWith(`<`)&&J.operator.startsWith(`>`)))}};let X=require_parse_options(),{safeRe:Z,t:Q}=require_re(),$=require_cmp(),ee=require_debug(),te=require_semver$1(),ne=require_range()})),require_satisfies=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J,X)=>{try{J=new Y(J,X)}catch{return!1}return J.test(L)}})),require_to_comparators=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J)=>new Y(L,J).set.map(L=>L.map(L=>L.value).join(` `).trim().split(` `))})),require_max_satisfying=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_range();J.exports=(L,J,Z)=>{let Q=null,$=null,ee=null;try{ee=new X(J,Z)}catch{return null}return L.forEach(L=>{ee.test(L)&&(!Q||$.compare(L)===-1)&&(Q=L,$=new Y(Q,Z))}),Q}})),require_min_satisfying=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_range();J.exports=(L,J,Z)=>{let Q=null,$=null,ee=null;try{ee=new X(J,Z)}catch{return null}return L.forEach(L=>{ee.test(L)&&(!Q||$.compare(L)===1)&&(Q=L,$=new Y(Q,Z))}),Q}})),require_min_version=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_range(),Z=require_gt();J.exports=(L,J)=>{L=new X(L,J);let Q=new Y(`0.0.0`);if(L.test(Q)||(Q=new Y(`0.0.0-0`),L.test(Q)))return Q;Q=null;for(let J=0;J<L.set.length;++J){let X=L.set[J],$=null;X.forEach(L=>{let J=new Y(L.semver.version);switch(L.operator){case`>`:J.prerelease.length===0?J.patch++:J.prerelease.push(0),J.raw=J.format();case``:case`>=`:(!$||Z(J,$))&&($=J);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${L.operator}`)}}),$&&(!Q||Z(Q,$))&&(Q=$)}return Q&&L.test(Q)?Q:null}})),require_valid=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J)=>{try{return new Y(L,J).range||`*`}catch{return null}}})),require_outside=__commonJSMin(((L,J)=>{let Y=require_semver$1(),X=require_comparator(),{ANY:Z}=X,Q=require_range(),$=require_satisfies(),ee=require_gt(),te=require_lt(),ne=require_lte(),re=require_gte();J.exports=(L,J,ie,ae)=>{L=new Y(L,ae),J=new Q(J,ae);let oe,se,ce,le,ue;switch(ie){case`>`:oe=ee,se=ne,ce=te,le=`>`,ue=`>=`;break;case`<`:oe=te,se=re,ce=ee,le=`<`,ue=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if($(L,J,ae))return!1;for(let Y=0;Y<J.set.length;++Y){let Q=J.set[Y],$=null,ee=null;if(Q.forEach(L=>{L.semver===Z&&(L=new X(`>=0.0.0`)),$||=L,ee||=L,oe(L.semver,$.semver,ae)?$=L:ce(L.semver,ee.semver,ae)&&(ee=L)}),$.operator===le||$.operator===ue||(!ee.operator||ee.operator===le)&&se(L,ee.semver)||ee.operator===ue&&ce(L,ee.semver))return!1}return!0}})),require_gtr=__commonJSMin(((L,J)=>{let Y=require_outside();J.exports=(L,J,X)=>Y(L,J,`>`,X)})),require_ltr=__commonJSMin(((L,J)=>{let Y=require_outside();J.exports=(L,J,X)=>Y(L,J,`<`,X)})),require_intersects=__commonJSMin(((L,J)=>{let Y=require_range();J.exports=(L,J,X)=>(L=new Y(L,X),J=new Y(J,X),L.intersects(J,X))})),require_simplify=__commonJSMin(((L,J)=>{let Y=require_satisfies(),X=require_compare();J.exports=(L,J,Z)=>{let Q=[],$=null,ee=null,te=L.sort((L,J)=>X(L,J,Z));for(let L of te)Y(L,J,Z)?(ee=L,$||=L):(ee&&Q.push([$,ee]),ee=null,$=null);$&&Q.push([$,null]);let ne=[];for(let[L,J]of Q)L===J?ne.push(L):!J&&L===te[0]?ne.push(`*`):J?L===te[0]?ne.push(`<=${J}`):ne.push(`${L} - ${J}`):ne.push(`>=${L}`);let re=ne.join(` || `),ie=typeof J.raw==`string`?J.raw:String(J);return re.length<ie.length?re:J}})),require_subset=__commonJSMin(((L,J)=>{let Y=require_range(),X=require_comparator(),{ANY:Z}=X,Q=require_satisfies(),$=require_compare(),ee=(L,J,X={})=>{if(L===J)return!0;L=new Y(L,X),J=new Y(J,X);let Z=!1;OUTER:for(let Y of L.set){for(let L of J.set){let J=re(Y,L,X);if(Z||=J!==null,J)continue OUTER}if(Z)return!1}return!0},te=[new X(`>=0.0.0-0`)],ne=[new X(`>=0.0.0`)],re=(L,J,Y)=>{if(L===J)return!0;if(L.length===1&&L[0].semver===Z){if(J.length===1&&J[0].semver===Z)return!0;L=Y.includePrerelease?te:ne}if(J.length===1&&J[0].semver===Z){if(Y.includePrerelease)return!0;J=ne}let X=new Set,ee,re;for(let J of L)J.operator===`>`||J.operator===`>=`?ee=ie(ee,J,Y):J.operator===`<`||J.operator===`<=`?re=ae(re,J,Y):X.add(J.semver);if(X.size>1)return null;let oe;if(ee&&re&&(oe=$(ee.semver,re.semver,Y),oe>0||oe===0&&(ee.operator!==`>=`||re.operator!==`<=`)))return null;for(let L of X){if(ee&&!Q(L,String(ee),Y)||re&&!Q(L,String(re),Y))return null;for(let X of J)if(!Q(L,String(X),Y))return!1;return!0}let se,ce,le,ue,de=re&&!Y.includePrerelease&&re.semver.prerelease.length?re.semver:!1,fe=ee&&!Y.includePrerelease&&ee.semver.prerelease.length?ee.semver:!1;de&&de.prerelease.length===1&&re.operator===`<`&&de.prerelease[0]===0&&(de=!1);for(let L of J){if(ue=ue||L.operator===`>`||L.operator===`>=`,le=le||L.operator===`<`||L.operator===`<=`,ee){if(fe&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===fe.major&&L.semver.minor===fe.minor&&L.semver.patch===fe.patch&&(fe=!1),L.operator===`>`||L.operator===`>=`){if(se=ie(ee,L,Y),se===L&&se!==ee)return!1}else if(ee.operator===`>=`&&!Q(ee.semver,String(L),Y))return!1}if(re){if(de&&L.semver.prerelease&&L.semver.prerelease.length&&L.semver.major===de.major&&L.semver.minor===de.minor&&L.semver.patch===de.patch&&(de=!1),L.operator===`<`||L.operator===`<=`){if(ce=ae(re,L,Y),ce===L&&ce!==re)return!1}else if(re.operator===`<=`&&!Q(re.semver,String(L),Y))return!1}if(!L.operator&&(re||ee)&&oe!==0)return!1}return!(ee&&le&&!re&&oe!==0||re&&ue&&!ee&&oe!==0||fe||de)},ie=(L,J,Y)=>{if(!L)return J;let X=$(L.semver,J.semver,Y);return X>0?L:X<0||J.operator===`>`&&L.operator===`>=`?J:L},ae=(L,J,Y)=>{if(!L)return J;let X=$(L.semver,J.semver,Y);return X<0?L:X>0||J.operator===`<`&&L.operator===`<=`?J:L};J.exports=ee})),require_semver=__commonJSMin(((L,J)=>{let Y=require_re(),X=require_constants$5(),Z=require_semver$1(),Q=require_identifiers();J.exports={parse:require_parse$6(),valid:require_valid$1(),clean:require_clean(),inc:require_inc(),diff:require_diff(),major:require_major(),minor:require_minor(),patch:require_patch(),prerelease:require_prerelease(),compare:require_compare(),rcompare:require_rcompare(),compareLoose:require_compare_loose(),compareBuild:require_compare_build(),sort:require_sort(),rsort:require_rsort(),gt:require_gt(),lt:require_lt(),eq:require_eq(),neq:require_neq(),gte:require_gte(),lte:require_lte(),cmp:require_cmp(),coerce:require_coerce(),Comparator:require_comparator(),Range:require_range(),satisfies:require_satisfies(),toComparators:require_to_comparators(),maxSatisfying:require_max_satisfying(),minSatisfying:require_min_satisfying(),minVersion:require_min_version(),validRange:require_valid(),outside:require_outside(),gtr:require_gtr(),ltr:require_ltr(),intersects:require_intersects(),simplifyRange:require_simplify(),subset:require_subset(),SemVer:Z,re:Y.re,src:Y.src,tokens:Y.t,SEMVER_SPEC_VERSION:X.SEMVER_SPEC_VERSION,RELEASE_TYPES:X.RELEASE_TYPES,compareIdentifiers:Q.compareIdentifiers,rcompareIdentifiers:Q.rcompareIdentifiers}})),import_semver=__toESM(require_semver(),1);const depSchema=object({age:string$2().optional(),info:string$2().optional(),new:string$2(),old:string$2()}),updatesOutputSchema=object({results:record(string$2(),record(string$2(),record(string$2(),depSchema)))});function resolveUpdatesBinary(){let L=createRequire(import.meta.url),J=L.resolve(`updates/package.json`),Y=L(J),X=typeof Y==`object`&&Y&&`bin`in Y&&typeof Y.bin==`string`?Y.bin:void 0;if(!X)throw Error(`Could not resolve updates binary path`);return join$1(dirname$1(J),X)}function parseAgeToYears(L){if(L===`now`)return 0;let J=/^(\d+)\s+(\w+)$/.exec(L.trim());if(!J)return 0;let Y=Number(J[1]);switch(J[2]){case`day`:case`days`:return Y/365.25;case`hour`:case`hours`:return Y/(365.25*24);case`min`:case`mins`:return Y/(365.25*24*60);case`month`:case`months`:return Y/12;case`sec`:case`secs`:return Y/(365.25*24*60*60);case`week`:case`weeks`:return Y*7/365.25;case`year`:case`years`:return Y;default:return 0}}function classifyBump(L,J){let Y=(0,import_semver.coerce)(L),X=(0,import_semver.coerce)(J);if(!Y||!X)return`major`;let Z=(0,import_semver.diff)(Y,X);return!Z||Z.startsWith(`major`)||Z===`premajor`?`major`:Z.startsWith(`minor`)||Z===`preminor`?`minor`:`patch`}const dependencyUpdatesSource=defineSource({async discover(L){return[L.options.path]},key:`dependencyUpdates`,async parse(L){log$2.debug(`Extracting dependency update information via updates...`);let J=await q(`node`,[resolveUpdatesBinary(),`--file`,L,`--json`]),Y;try{Y=updatesOutputSchema.parse(JSON.parse(J.stdout))}catch{log$2.debug(`No dependency files found for updates analysis.`);return}let X=[],Z=[],Q=[],$=0;for(let L of Object.values(Y.results))for(let J of Object.values(L))for(let[L,Y]of Object.entries(J)){if(L===`@types/node`)continue;Y.age&&($+=parseAgeToYears(Y.age));let J={name:L,new:Y.new,old:Y.old};switch(Y.age&&(J.age=Y.age),Y.info&&(J.info=Y.info),classifyBump(Y.old,Y.new)){case`major`:X.push(J);break;case`minor`:Z.push(J);break;case`patch`:Q.push(J);break}}return{data:{major:X,minor:Z,patch:Q},extra:{libyears:Math.round($*10)/10,total:X.length+Z.length+Q.length},source:L}},phase:1}),fileStatsSource=defineSource({async discover(L){return[L.options.path,...getWorkspaces(L.options.path,L.options.workspaces)]},key:`fileStats`,async parse(L,J){log$2.debug(`Extracting file statistics metadata...`);let Y=await getMatches({...J.options,path:L,recursive:!1,workspaces:!1},[`**`]),X=Y.length,Z=new Set;for(let J of Y){let Y=dirname$1(J);Y!==L&&Z.add(Y)}let Q=Z.size,$=(await batchMap(Y,async L=>{try{return(await stat(L)).size}catch{return 0}},100)).reduce((L,J)=>L+J,0);return{data:{folderName:L.split(path$1.sep).at(-1),totalDirectoryCount:Q,totalFileCount:X,totalSizeBytes:$},source:L}},phase:1}),_DRIVE_LETTER_START_RE=/^[A-Za-z]:\//;function normalizeWindowsPath(L=``){return L&&L.replace(/\\/g,`/`).replace(_DRIVE_LETTER_START_RE,L=>L.toUpperCase())}const _UNC_REGEX=/^[/\\]{2}/,_IS_ABSOLUTE_RE=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,_DRIVE_LETTER_RE=/^[A-Za-z]:$/,normalize$2=function(L){if(L.length===0)return`.`;L=normalizeWindowsPath(L);let J=L.match(_UNC_REGEX),Y=isAbsolute(L),X=L[L.length-1]===`/`;return L=normalizeString(L,!Y),L.length===0?Y?`/`:X?`./`:`.`:(X&&(L+=`/`),_DRIVE_LETTER_RE.test(L)&&(L+=`/`),J?Y?`//${L}`:`//./${L}`:Y&&!isAbsolute(L)?`/${L}`:L)},join$3=function(...L){let J=``;for(let Y of L)if(Y)if(J.length>0){let L=J[J.length-1]===`/`,X=Y[0]===`/`;L&&X?J+=Y.slice(1):J+=L||X?Y:`/${Y}`}else J+=Y;return normalize$2(J)};function cwd$1(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const resolve$2=function(...L){L=L.map(L=>normalizeWindowsPath(L));let J=``,Y=!1;for(let X=L.length-1;X>=-1&&!Y;X--){let Z=X>=0?L[X]:cwd$1();!Z||Z.length===0||(J=`${Z}/${J}`,Y=isAbsolute(Z))}return J=normalizeString(J,!Y),Y&&!isAbsolute(J)?`/${J}`:J.length>0?J:`.`};function normalizeString(L,J){let Y=``,X=0,Z=-1,Q=0,$=null;for(let ee=0;ee<=L.length;++ee){if(ee<L.length)$=L[ee];else if($===`/`)break;else $=`/`;if($===`/`){if(!(Z===ee-1||Q===1))if(Q===2){if(Y.length<2||X!==2||Y[Y.length-1]!==`.`||Y[Y.length-2]!==`.`){if(Y.length>2){let L=Y.lastIndexOf(`/`);L===-1?(Y=``,X=0):(Y=Y.slice(0,L),X=Y.length-1-Y.lastIndexOf(`/`)),Z=ee,Q=0;continue}else if(Y.length>0){Y=``,X=0,Z=ee,Q=0;continue}}J&&(Y+=Y.length>0?`/..`:`..`,X=2)}else Y.length>0?Y+=`/${L.slice(Z+1,ee)}`:Y=L.slice(Z+1,ee),X=ee-Z-1;Z=ee,Q=0}else $===`.`&&Q!==-1?++Q:Q=-1}return Y}const isAbsolute=function(L){return _IS_ABSOLUTE_RE.test(L)};var e=Object.create,t$2=Object.defineProperty,n$1=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(L,J)=>()=>(J||L((J={exports:{}}).exports,J),J.exports),s=(L,J,Y,X)=>{if(J&&typeof J==`object`||typeof J==`function`)for(var Z=r(J),Q=0,$=Z.length,ee;Q<$;Q++)ee=Z[Q],!a.call(L,ee)&&ee!==Y&&t$2(L,ee,{get:(L=>J[L]).bind(null,ee),enumerable:!(X=n$1(J,ee))||X.enumerable});return L},c$1=(L,J,Y)=>(Y=L==null?{}:e(i(L)),s(J||!L||!L.__esModule?t$2(Y,`default`,{value:L,enumerable:!0}):Y,L)),t$1=o(((L,J)=>{let{hasOwnProperty:Y}=Object.prototype,X=(L,J={})=>{typeof J==`string`&&(J={section:J}),J.align=J.align===!0,J.newline=J.newline===!0,J.sort=J.sort===!0,J.whitespace=J.whitespace===!0||J.align===!0,J.platform=J.platform||typeof process<`u`&&process.platform,J.bracketedArray=J.bracketedArray!==!1;let Y=J.platform===`win32`?`\r
298
298
  `:`
299
299
  `,Q=J.whitespace?` = `:`=`,$=[],te=J.sort?Object.keys(L).sort():Object.keys(L),ne=0;J.align&&(ne=ee(te.filter(J=>L[J]===null||Array.isArray(L[J])||typeof L[J]!=`object`).map(J=>Array.isArray(L[J])?`${J}[]`:J).concat([``]).reduce((L,J)=>ee(L).length>=ee(J).length?L:J)).length);let re=``,ie=J.bracketedArray?`[]`:``;for(let J of te){let X=L[J];if(X&&Array.isArray(X))for(let L of X)re+=ee(`${J}${ie}`).padEnd(ne,` `)+Q+ee(L)+Y;else X&&typeof X==`object`?$.push(J):re+=ee(J).padEnd(ne,` `)+Q+ee(X)+Y}J.section&&re.length&&(re=`[`+ee(J.section)+`]`+(J.newline?Y+Y:Y)+re);for(let Q of $){let $=Z(Q,`.`).join(`\\.`),ee=(J.section?J.section+`.`:``)+$,te=X(L[Q],{...J,section:ee});re.length&&te.length&&(re+=Y),re+=te}return re};function Z(L,J){var Y=0,X=0,Z=0,Q=[];do if(Z=L.indexOf(J,Y),Z!==-1){if(Y=Z+J.length,Z>0&&L[Z-1]===`\\`)continue;Q.push(L.slice(X,Z)),X=Z+J.length}while(Z!==-1);return Q.push(L.slice(X)),Q}let Q=(L,J={})=>{J.bracketedArray=J.bracketedArray!==!1;let X=Object.create(null),Q=X,$=null,ee=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,ne=L.split(/[\r\n]+/g),re={};for(let L of ne){if(!L||L.match(/^\s*[;#]/)||L.match(/^\s*$/))continue;let Z=L.match(ee);if(!Z)continue;if(Z[1]!==void 0){if($=te(Z[1]),$===`__proto__`){Q=Object.create(null);continue}Q=X[$]=X[$]||Object.create(null);continue}let ne=te(Z[2]),ie;J.bracketedArray?ie=ne.length>2&&ne.slice(-2)===`[]`:(re[ne]=(re?.[ne]||0)+1,ie=re[ne]>1);let ae=ie&&ne.endsWith(`[]`)?ne.slice(0,-2):ne;if(ae===`__proto__`)continue;let oe=Z[3]?te(Z[4]):!0,se=oe===`true`||oe===`false`||oe===`null`?JSON.parse(oe):oe;ie&&(Y.call(Q,ae)?Array.isArray(Q[ae])||(Q[ae]=[Q[ae]]):Q[ae]=[]),Array.isArray(Q[ae])?Q[ae].push(se):Q[ae]=se}let ie=[];for(let L of Object.keys(X)){if(!Y.call(X,L)||typeof X[L]!=`object`||Array.isArray(X[L]))continue;let J=Z(L,`.`);Q=X;let $=J.pop(),ee=$.replace(/\\\./g,`.`);for(let L of J)L!==`__proto__`&&((!Y.call(Q,L)||typeof Q[L]!=`object`)&&(Q[L]=Object.create(null)),Q=Q[L]);Q===X&&ee===$||(Q[ee]=X[L],ie.push(L))}for(let L of ie)delete X[L];return X},$=L=>L.startsWith(`"`)&&L.endsWith(`"`)||L.startsWith(`'`)&&L.endsWith(`'`),ee=L=>typeof L!=`string`||L.match(/[=\r\n]/)||L.match(/^\[/)||L.length>1&&$(L)||L!==L.trim()?JSON.stringify(L):L.split(`;`).join(`\\;`).split(`#`).join(`\\#`),te=L=>{if(L=(L||``).trim(),$(L)){L.charAt(0)===`'`&&(L=L.slice(1,-1));try{L=JSON.parse(L)}catch{}}else{let J=!1,Y=``;for(let X=0,Z=L.length;X<Z;X++){let Z=L.charAt(X);if(J)`\\;#`.indexOf(Z)===-1?Y+=`\\`+Z:Y+=Z,J=!1;else if(`;#`.indexOf(Z)!==-1)break;else Z===`\\`?J=!0:Y+=Z}return J&&(Y+=`\\`),Y.trim()}return L};J.exports={parse:Q,decode:Q,stringify:X,encode:X,safe:ee,unsafe:te}})),t=t$1();function n(L,J){return(0,t.parse)(L,J)}const defaultFindOptions={startingFrom:`.`,rootPattern:/^node_modules$/,reverse:!1,test:L=>{try{if(statSync$1(L).isFile())return!0}catch{}}};async function findFile(L,J={}){let Y=Array.isArray(L)?L:[L],X={...defaultFindOptions,...J},Z=resolve$2(X.startingFrom),Q=Z[0]===`/`,$=Z.split(`/`).filter(Boolean);if(Y.includes($.at(-1))&&await X.test(Z))return Z;Q&&($[0]=`/`+$[0]);let ee=$.findIndex(L=>L.match(X.rootPattern));if(ee===-1&&(ee=0),X.reverse)for(let L=ee+1;L<=$.length;L++)for(let J of Y){let Y=join$3(...$.slice(0,L),J);if(await X.test(Y))return Y}else for(let L=$.length;L>ee;L--)for(let J of Y){let Y=join$3(...$.slice(0,L),J);if(await X.test(Y))return Y}throw Error(`Cannot find matching ${L} in ${X.startingFrom} or parent directories`)}function findNearestFile(L,J={}){return findFile(L,J)}async function resolveGitConfig(L,J){return findNearestFile(`.git/config`,{...J,startingFrom:L})}async function readGitConfig(L,J){return parseGitConfig(await readFile(await resolveGitConfig(L,J),`utf8`))}function parseGitConfig(L){return n(L.replaceAll(/^\[(\w+) "(.+)"\]$/gm,`[$1.$2]`))}const gitConfigSource=defineSource({async discover(L){return getMatches(L.options,[`.git/config`])},key:`gitConfig`,async parse(L){return log$2.debug(`Extracting git config metadata...`),{data:{...await readGitConfig(L)},source:L}},phase:1});var require_ms=__commonJSMin(((L,J)=>{var Y=1e3,X=Y*60,Z=X*60,Q=Z*24,$=Q*7,ee=Q*365.25;J.exports=function(L,J){J||={};var Y=typeof L;if(Y===`string`&&L.length>0)return te(L);if(Y===`number`&&isFinite(L))return J.long?re(L):ne(L);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(L))};function te(L){if(L=String(L),!(L.length>100)){var J=/^(-?(?:\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(J){var te=parseFloat(J[1]);switch((J[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return te*ee;case`weeks`:case`week`:case`w`:return te*$;case`days`:case`day`:case`d`:return te*Q;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return te*Z;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return te*X;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return te*Y;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return te;default:return}}}}function ne(L){var J=Math.abs(L);return J>=Q?Math.round(L/Q)+`d`:J>=Z?Math.round(L/Z)+`h`:J>=X?Math.round(L/X)+`m`:J>=Y?Math.round(L/Y)+`s`:L+`ms`}function re(L){var J=Math.abs(L);return J>=Q?ie(L,J,Q,`day`):J>=Z?ie(L,J,Z,`hour`):J>=X?ie(L,J,X,`minute`):J>=Y?ie(L,J,Y,`second`):L+` ms`}function ie(L,J,Y,X){var Z=J>=Y*1.5;return Math.round(L/Y)+` `+X+(Z?`s`:``)}})),require_common=__commonJSMin(((L,J)=>{function Y(L){Y.debug=Y,Y.default=Y,Y.coerce=te,Y.disable=$,Y.enable=Z,Y.enabled=ee,Y.humanize=require_ms(),Y.destroy=ne,Object.keys(L).forEach(J=>{Y[J]=L[J]}),Y.names=[],Y.skips=[],Y.formatters={};function J(L){let J=0;for(let Y=0;Y<L.length;Y++)J=(J<<5)-J+L.charCodeAt(Y),J|=0;return Y.colors[Math.abs(J)%Y.colors.length]}Y.selectColor=J;function Y(L){let J,Z=null,Q,$;function ee(...L){if(!ee.enabled)return;let X=ee,Z=Number(new Date);X.diff=Z-(J||Z),X.prev=J,X.curr=Z,J=Z,L[0]=Y.coerce(L[0]),typeof L[0]!=`string`&&L.unshift(`%O`);let Q=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(J,Z)=>{if(J===`%%`)return`%`;Q++;let $=Y.formatters[Z];if(typeof $==`function`){let Y=L[Q];J=$.call(X,Y),L.splice(Q,1),Q--}return J}),Y.formatArgs.call(X,L),(X.log||Y.log).apply(X,L)}return ee.namespace=L,ee.useColors=Y.useColors(),ee.color=Y.selectColor(L),ee.extend=X,ee.destroy=Y.destroy,Object.defineProperty(ee,`enabled`,{enumerable:!0,configurable:!1,get:()=>Z===null?(Q!==Y.namespaces&&(Q=Y.namespaces,$=Y.enabled(L)),$):Z,set:L=>{Z=L}}),typeof Y.init==`function`&&Y.init(ee),ee}function X(L,J){let X=Y(this.namespace+(J===void 0?`:`:J)+L);return X.log=this.log,X}function Z(L){Y.save(L),Y.namespaces=L,Y.names=[],Y.skips=[];let J=(typeof L==`string`?L:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let L of J)L[0]===`-`?Y.skips.push(L.slice(1)):Y.names.push(L)}function Q(L,J){let Y=0,X=0,Z=-1,Q=0;for(;Y<L.length;)if(X<J.length&&(J[X]===L[Y]||J[X]===`*`))J[X]===`*`?(Z=X,Q=Y,X++):(Y++,X++);else if(Z!==-1)X=Z+1,Q++,Y=Q;else return!1;for(;X<J.length&&J[X]===`*`;)X++;return X===J.length}function $(){let L=[...Y.names,...Y.skips.map(L=>`-`+L)].join(`,`);return Y.enable(``),L}function ee(L){for(let J of Y.skips)if(Q(L,J))return!1;for(let J of Y.names)if(Q(L,J))return!0;return!1}function te(L){return L instanceof Error?L.stack||L.message:L}function ne(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Y.enable(Y.load()),Y}J.exports=Y})),require_browser=__commonJSMin(((L,J)=>{L.formatArgs=X,L.save=Z,L.load=Q,L.useColors=Y,L.storage=$(),L.destroy=(()=>{let L=!1;return()=>{L||(L=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),L.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function Y(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let L;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(L=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(L[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function X(L){if(L[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+L[0]+(this.useColors?`%c `:` `)+`+`+J.exports.humanize(this.diff),!this.useColors)return;let Y=`color: `+this.color;L.splice(1,0,Y,`color: inherit`);let X=0,Z=0;L[0].replace(/%[a-zA-Z%]/g,L=>{L!==`%%`&&(X++,L===`%c`&&(Z=X))}),L.splice(Z,0,Y)}L.log=console.debug||console.log||(()=>{});function Z(J){try{J?L.storage.setItem(`debug`,J):L.storage.removeItem(`debug`)}catch{}}function Q(){let J;try{J=L.storage.getItem(`debug`)||L.storage.getItem(`DEBUG`)}catch{}return!J&&typeof process<`u`&&`env`in process&&(J=process.env.DEBUG),J}function $(){try{return localStorage}catch{}}J.exports=require_common()(L);let{formatters:ee}=J.exports;ee.j=function(L){try{return JSON.stringify(L)}catch(L){return`[UnexpectedJSONParseError]: `+L.message}}})),supports_color_exports=__exportAll({createSupportsColor:()=>createSupportsColor,default:()=>supportsColor});function hasFlag(L,J=globalThis.Deno?globalThis.Deno.args:process$1.argv){let Y=L.startsWith(`-`)?``:L.length===1?`-`:`--`,X=J.indexOf(Y+L),Z=J.indexOf(`--`);return X!==-1&&(Z===-1||X<Z)}function envForceColor(){if(!(`FORCE_COLOR`in env))return;if(env.FORCE_COLOR===`true`)return 1;if(env.FORCE_COLOR===`false`)return 0;if(env.FORCE_COLOR.length===0)return 1;let L=Math.min(Number.parseInt(env.FORCE_COLOR,10),3);if([0,1,2,3].includes(L))return L}function translateLevel(L){return L===0?!1:{level:L,hasBasic:!0,has256:L>=2,has16m:L>=3}}function _supportsColor(L,{streamIsTTY:J,sniffFlags:Y=!0}={}){let X=envForceColor();X!==void 0&&(flagForceColor=X);let Z=Y?flagForceColor:X;if(Z===0)return 0;if(Y){if(hasFlag(`color=16m`)||hasFlag(`color=full`)||hasFlag(`color=truecolor`))return 3;if(hasFlag(`color=256`))return 2}if(`TF_BUILD`in env&&`AGENT_NAME`in env)return 1;if(L&&!J&&Z===void 0)return 0;let Q=Z||0;if(env.TERM===`dumb`)return Q;if(process$1.platform===`win32`){let L=os.release().split(`.`);return Number(L[0])>=10&&Number(L[2])>=10586?Number(L[2])>=14931?3:2:1}if(`CI`in env)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(L=>L in env)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(L=>L in env)||env.CI_NAME===`codeship`?1:Q;if(`TEAMCITY_VERSION`in env)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if(env.COLORTERM===`truecolor`||env.TERM===`xterm-kitty`||env.TERM===`xterm-ghostty`||env.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in env){let L=Number.parseInt((env.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(env.TERM_PROGRAM){case`iTerm.app`:return L>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)||`COLORTERM`in env?1:Q}function createSupportsColor(L,J={}){return translateLevel(_supportsColor(L,{streamIsTTY:L&&L.isTTY,...J}))}var env,flagForceColor,supportsColor,init_supports_color=__esmMin((()=>{({env}=process$1),hasFlag(`no-color`)||hasFlag(`no-colors`)||hasFlag(`color=false`)||hasFlag(`color=never`)?flagForceColor=0:(hasFlag(`color`)||hasFlag(`colors`)||hasFlag(`color=true`)||hasFlag(`color=always`))&&(flagForceColor=1),supportsColor={stdout:createSupportsColor({isTTY:tty.isatty(1)}),stderr:createSupportsColor({isTTY:tty.isatty(2)})}})),require_node=__commonJSMin(((L,J)=>{let Y=__require$1(`tty`),X=__require$1(`util`);L.init=re,L.log=ee,L.formatArgs=Q,L.save=te,L.load=ne,L.useColors=Z,L.destroy=X.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),L.colors=[6,2,3,4,5,1];try{let J=(init_supports_color(),__toCommonJS$1(supports_color_exports));J&&(J.stderr||J).level>=2&&(L.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}L.inspectOpts=Object.keys(process.env).filter(L=>/^debug_/i.test(L)).reduce((L,J)=>{let Y=J.substring(6).toLowerCase().replace(/_([a-z])/g,(L,J)=>J.toUpperCase()),X=process.env[J];return X=/^(yes|on|true|enabled)$/i.test(X)?!0:/^(no|off|false|disabled)$/i.test(X)?!1:X===`null`?null:Number(X),L[Y]=X,L},{});function Z(){return`colors`in L.inspectOpts?!!L.inspectOpts.colors:Y.isatty(process.stderr.fd)}function Q(L){let{namespace:Y,useColors:X}=this;if(X){let X=this.color,Z=`\x1B[3`+(X<8?X:`8;5;`+X),Q=` ${Z};1m${Y} \u001B[0m`;L[0]=Q+L[0].split(`
300
300
  `).join(`
@@ -308,7 +308,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
308
308
  `).filter(L=>!L.startsWith(`commit `)).at(-1)??void 0),Y.raw([`ls-files`]).then(L=>L.trim().split(`
309
309
  `).filter(Boolean)),Y.getRemotes(),Y.raw([`submodule`,`status`]).then(L=>{let J=L.trim().split(`
310
310
  `).filter(Boolean).length;return J>0?J:void 0}).catch(()=>void 0),Y.raw([`lfs`,`ls-files`]).then(L=>L.trim().length>0?!0:void 0).catch(()=>void 0)]),ae=(await batchMap(te,async L=>{try{return(await stat(join$1(J.options.path,L))).size}catch{return 0}})).reduce((L,J)=>L+J,0),oe=new Set(Z.all.map(L=>L.author_email)),se,ce=$.latest??void 0;if(ce)try{se=(await Y.raw([`log`,`-1`,`--format=%aI`,ce])).trim()||void 0}catch{}let le=/^v?\d+(?:\.\d+){1,2}$/,ue,de,fe;try{let L=(await Y.raw([`tag`,`--sort=-creatordate`])).trim().split(`
311
- `).filter(Boolean).filter(L=>le.test(L));ue=L.length>0?L.length:void 0;let J=L[0];if(J){let L=await Y.raw([`log`,`-1`,`--format=%aI`,J]);de=J.replace(/^v/,``),fe=L.trim()||void 0}}catch{}let pe=await Promise.all(ne.map(async L=>{for(let J of[`main`,`master`]){let X=`${L.name}/${J}`;try{let[J,Z]=(await Y.raw([`rev-list`,`--left-right`,`--count`,`HEAD...${X}`])).trim().split(` `).map(Number);return[L.name,{ahead:J,behind:Z}]}catch{}}})),me={};for(let L of pe)L&&(me[L[0]]=L[1]);let he=Object.values(me),ge=he.length>0?he.reduce((L,J)=>L+J.ahead,0):void 0,_e=he.length>0?he.reduce((L,J)=>L+J.behind,0):void 0;return{data:{branchCount:Q.all.length,branchCurrent:Q.current,commitCount:Z.total,commitDateFirst:ee,commitDateLast:Z.latest?.date??void 0,contributorCount:oe.size,hasLfs:ie,isClean:X.isClean(),isDirty:!X.isClean(),isRemoteAhead:Object.values(me).some(L=>L.behind>0)||void 0,remoteCount:ne.length,remoteStatus:Object.keys(me).length>0?me:void 0,submoduleCount:re,tagCount:$.all.length,tagDateLatest:se,tagNameLatest:ce,tagReleaseCount:ue,tagVersionDateLatest:fe,tagVersionLatest:de,totalAhead:ge,totalBehind:_e,trackedFileCount:te.length,trackedSizeBytes:ae,uncommittedFileCount:X.files.length>0?X.files.length:void 0},source:L}},phase:1});var require_lib$8=__commonJSMin(((L,J)=>{J.exports=function(L,J){J===!0&&(J=0);var Y=``;if(typeof L==`string`)try{Y=new URL(L).protocol}catch{}else L&&L.constructor===URL&&(Y=L.protocol);var X=Y.split(/\:|\+/).filter(Boolean);return typeof J==`number`?X[J]:X}})),require_lib$7=__commonJSMin(((L,J)=>{var Y=require_lib$8();function X(L){var J={protocols:[],protocol:null,port:null,resource:``,host:``,user:``,password:``,pathname:``,hash:``,search:``,href:L,query:{},parse_failed:!1};try{var X=new URL(L);J.protocols=Y(X),J.protocol=J.protocols[0],J.port=X.port,J.resource=X.hostname,J.host=X.host,J.user=X.username||``,J.password=X.password||``,J.pathname=X.pathname,J.hash=X.hash.slice(1),J.search=X.search.slice(1),J.href=X.href,J.query=Object.fromEntries(X.searchParams)}catch{J.protocols=[`file`],J.protocol=J.protocols[0],J.port=``,J.resource=``,J.user=``,J.pathname=``,J.hash=``,J.search=``,J.href=L,J.query={},J.parse_failed=!0}return J}J.exports=X})),require_dist$2=__commonJSMin(((L,J)=>{var Y=require_lib$7();function X(L){return L&&typeof L==`object`&&`default`in L?L:{default:L}}var Z=X(Y);function Q(L){if(L.__esModule)return L;var J=L.default;if(typeof J==`function`){var Y=function L(){if(this instanceof L){var Y=[null];return Y.push.apply(Y,arguments),new(Function.bind.apply(J,Y))}return J.apply(this,arguments)};Y.prototype=J.prototype}else Y={};return Object.defineProperty(Y,`__esModule`,{value:!0}),Object.keys(L).forEach(function(J){var X=Object.getOwnPropertyDescriptor(L,J);Object.defineProperty(Y,J,X.get?X:{enumerable:!0,get:function(){return L[J]}})}),Y}var $={};let ee=`text/plain`,te=`us-ascii`,ne=(L,J)=>J.some(J=>J instanceof RegExp?J.test(L):J===L),re=(L,{stripHash:J})=>{let Y=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(L);if(!Y)throw Error(`Invalid URL: ${L}`);let{type:X,data:Z,hash:Q}=Y.groups,$=X.split(`;`);Q=J?``:Q;let ee=!1;$[$.length-1]===`base64`&&($.pop(),ee=!0);let te=($.shift()||``).toLowerCase(),ne=[...$.map(L=>{let[J,Y=``]=L.split(`=`).map(L=>L.trim());return J===`charset`&&(Y=Y.toLowerCase(),Y===`us-ascii`)?``:`${J}${Y?`=${Y}`:``}`}).filter(Boolean)];return ee&&ne.push(`base64`),(ne.length>0||te&&te!==`text/plain`)&&ne.unshift(te),`data:${ne.join(`;`)},${ee?Z.trim():Z}${Q?`#${Q}`:``}`};function ie(L,J){if(J={defaultProtocol:`http:`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...J},L=L.trim(),/^data:/i.test(L))return re(L,J);if(/^view-source:/i.test(L))throw Error("`view-source:` is not supported as it is a non-standard protocol");let Y=L.startsWith(`//`);!Y&&/^\.*\//.test(L)||(L=L.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,J.defaultProtocol));let X=new URL(L);if(J.forceHttp&&J.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(J.forceHttp&&X.protocol===`https:`&&(X.protocol=`http:`),J.forceHttps&&X.protocol===`http:`&&(X.protocol=`https:`),J.stripAuthentication&&(X.username=``,X.password=``),J.stripHash?X.hash=``:J.stripTextFragment&&(X.hash=X.hash.replace(/#?:~:text.*?$/i,``)),X.pathname){let L=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,J=0,Y=``;for(;;){let Z=L.exec(X.pathname);if(!Z)break;let Q=Z[0],$=Z.index,ee=X.pathname.slice(J,$);Y+=ee.replace(/\/{2,}/g,`/`),Y+=Q,J=$+Q.length}let Z=X.pathname.slice(J,X.pathname.length);Y+=Z.replace(/\/{2,}/g,`/`),X.pathname=Y}if(X.pathname)try{X.pathname=decodeURI(X.pathname)}catch{}if(J.removeDirectoryIndex===!0&&(J.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(J.removeDirectoryIndex)&&J.removeDirectoryIndex.length>0){let L=X.pathname.split(`/`),Y=L[L.length-1];ne(Y,J.removeDirectoryIndex)&&(L=L.slice(0,-1),X.pathname=L.slice(1).join(`/`)+`/`)}if(X.hostname&&(X.hostname=X.hostname.replace(/\.$/,``),J.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(X.hostname)&&(X.hostname=X.hostname.replace(/^www\./,``))),Array.isArray(J.removeQueryParameters))for(let L of[...X.searchParams.keys()])ne(L,J.removeQueryParameters)&&X.searchParams.delete(L);if(J.removeQueryParameters===!0&&(X.search=``),J.sortQueryParameters){X.searchParams.sort();try{X.search=decodeURIComponent(X.search)}catch{}}J.removeTrailingSlash&&(X.pathname=X.pathname.replace(/\/$/,``));let Z=L;return L=X.toString(),!J.removeSingleSlash&&X.pathname===`/`&&!Z.endsWith(`/`)&&X.hash===``&&(L=L.replace(/\/$/,``)),(J.removeTrailingSlash||X.pathname===`/`)&&X.hash===``&&J.removeSingleSlash&&(L=L.replace(/\/$/,``)),Y&&!J.normalizeProtocol&&(L=L.replace(/^http:\/\//,`//`)),J.stripProtocol&&(L=L.replace(/^(?:https?:)?\/\//,``)),L}var ae=Q(Object.freeze({__proto__:null,default:ie}));Object.defineProperty($,`__esModule`,{value:!0});var oe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(L){return typeof L}:function(L){return L&&typeof Symbol==`function`&&L.constructor===Symbol&&L!==Symbol.prototype?`symbol`:typeof L},se=ue(ae),ce=Z.default,le=ue(ce);function ue(L){return L&&L.__esModule?L:{default:L}}var de=function L(J){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=/^(?:([a-zA-Z_][a-zA-Z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:](([\~,\.\w,\-,\_,\/,\s]|%[0-9A-Fa-f]{2})+?(?:\.git|\/)?)$/,Z=function(L){var Y=Error(L);throw Y.subject_url=J,Y};(typeof J!=`string`||!J.trim())&&Z(`Invalid url.`),J.length>L.MAX_INPUT_LENGTH&&Z(`Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH.`),Y&&((Y===void 0?`undefined`:oe(Y))!==`object`&&(Y={stripHash:!1}),J=(0,se.default)(J,Y));var Q=(0,le.default)(J);if(Q.parse_failed){var $=Q.href.match(X);$?(Q.protocols=[`ssh`],Q.protocol=`ssh`,Q.resource=$[2],Q.host=$[2],Q.user=$[1],Q.pathname=`/`+$[3],Q.parse_failed=!1):Z(`URL parsing failed.`)}return Q};de.MAX_INPUT_LENGTH=2048,J.exports=$.default=de})),require_lib$6=__commonJSMin(((L,J)=>{var Y=require_lib$8();function X(L){if(Array.isArray(L))return L.indexOf(`ssh`)!==-1||L.indexOf(`rsync`)!==-1;if(typeof L!=`string`)return!1;var J=Y(L);if(L=L.substring(L.indexOf(`://`)+3),X(J))return!0;var Z=RegExp(`.([a-zA-Z\\d]+):(\\d+)/`);return!L.match(Z)&&L.indexOf(`@`)<L.indexOf(`:`)}J.exports=X})),require_lib$5=__commonJSMin(((L,J)=>{let Y=require_dist$2(),X=require_lib$6();function Z(L){let J=Y(L);return J.token=``,J.password===`x-oauth-basic`?J.token=J.user:J.user===`x-token-auth`&&(J.token=J.password),X(J.protocols)||J.protocols.length===0&&X(L)?J.protocol=`ssh`:J.protocols.length?J.protocol=J.protocols[0]:(J.protocol=`file`,J.protocols=[`file`]),J.href=J.href.replace(/\/$/,``),J}J.exports=Z})),require_lib$4=__commonJSMin(((L,J)=>{var Y=require_lib$5();function X(L,J){if(J||=[],typeof L!=`string`)throw Error(`The url must be a string.`);if(!J.every(function(L){return typeof L==`string`}))throw Error(`The refs should contain only strings`);/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(L)&&(L=`https://github.com/`+L);var Z=Y(L),Q=Z.resource.split(`.`),ee=null;switch(Z.toString=function(L){return X.stringify(this,L)},Z.source=Q.length>2?Q.slice(1-Q.length).join(`.`):Z.source=Z.resource,Z.git_suffix=/\.git$/.test(Z.pathname),Z.name=decodeURIComponent((Z.pathname||Z.href).replace(/(^\/)|(\/$)/g,``).replace(/\.git$/,``)),Z.owner=decodeURIComponent(Z.user),Z.source){case`git.cloudforge.com`:Z.owner=Z.user,Z.organization=Q[0],Z.source=`cloudforge.com`;break;case`visualstudio.com`:if(Z.resource===`vs-ssh.visualstudio.com`){ee=Z.name.split(`/`),ee.length===4&&(Z.organization=ee[1],Z.owner=ee[2],Z.name=ee[3],Z.full_name=ee[2]+`/`+ee[3]);break}else{ee=Z.name.split(`/`),ee.length===2?(Z.owner=ee[1],Z.name=ee[1],Z.full_name=`_git/`+Z.name):ee.length===3?(Z.name=ee[2],ee[0]===`DefaultCollection`?(Z.owner=ee[2],Z.organization=ee[0],Z.full_name=Z.organization+`/_git/`+Z.name):(Z.owner=ee[0],Z.full_name=Z.owner+`/_git/`+Z.name)):ee.length===4&&(Z.organization=ee[0],Z.owner=ee[1],Z.name=ee[3],Z.full_name=Z.organization+`/`+Z.owner+`/_git/`+Z.name);break}case`dev.azure.com`:case`azure.com`:if(Z.resource===`ssh.dev.azure.com`){ee=Z.name.split(`/`),ee.length===4&&(Z.organization=ee[1],Z.owner=ee[2],Z.name=ee[3]);break}else{ee=Z.name.split(`/`),ee.length===5?(Z.organization=ee[0],Z.owner=ee[1],Z.name=ee[4],Z.full_name=`_git/`+Z.name):ee.length===3?(Z.name=ee[2],ee[0]===`DefaultCollection`?(Z.owner=ee[2],Z.organization=ee[0],Z.full_name=Z.organization+`/_git/`+Z.name):(Z.owner=ee[0],Z.full_name=Z.owner+`/_git/`+Z.name)):ee.length===4&&(Z.organization=ee[0],Z.owner=ee[1],Z.name=ee[3],Z.full_name=Z.organization+`/`+Z.owner+`/_git/`+Z.name),Z.query&&Z.query.path&&(Z.filepath=Z.query.path.replace(/^\/+/g,``)),Z.query&&Z.query.version&&(Z.ref=Z.query.version.replace(/^GB/,``));break}default:ee=Z.name.split(`/`);var te=ee.length-1;if(ee.length>=2){var ne=ee.indexOf(`-`,2),re=ee.indexOf(`blob`,2),ie=ee.indexOf(`tree`,2),ae=ee.indexOf(`commit`,2),oe=ee.indexOf(`issues`,2),se=ee.indexOf(`src`,2),ce=ee.indexOf(`raw`,2),le=ee.indexOf(`edit`,2);te=ne>0?ne-1:re>0&&ie>0?Math.min(re-1,ie-1):re>0?re-1:oe>0?oe-1:ie>0?ie-1:ae>0?ae-1:se>0?se-1:ce>0?ce-1:le>0?le-1:te,Z.owner=ee.slice(0,te).join(`/`),Z.name=ee[te],ae&&oe<0&&(Z.commit=ee[te+2])}Z.ref=``,Z.filepathtype=``,Z.filepath=``;var ue=ee.length>te&&ee[te+1]===`-`?te+1:te;ee.length>ue+2&&[`raw`,`src`,`blob`,`tree`,`edit`].indexOf(ee[ue+1])>=0&&(Z.filepathtype=ee[ue+1],Z.ref=ee[ue+2],ee.length>ue+3&&(Z.filepath=ee.slice(ue+3).join(`/`))),Z.organization=Z.owner;break}Z.full_name||(Z.full_name=Z.owner,Z.name&&(Z.full_name&&(Z.full_name+=`/`),Z.full_name+=Z.name)),Z.owner.startsWith(`scm/`)&&(Z.source=`bitbucket-server`,Z.owner=Z.owner.replace(`scm/`,``),Z.organization=Z.owner,Z.full_name=Z.owner+`/`+Z.name);var de=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(Z.pathname);return de!=null&&(Z.source=`bitbucket-server`,de[1]===`users`?Z.owner=`~`+de[2]:Z.owner=de[2],Z.organization=Z.owner,Z.name=de[3],ee=de[4].split(`/`),ee.length>1&&([`raw`,`browse`].indexOf(ee[1])>=0?(Z.filepathtype=ee[1],ee.length>2&&(Z.filepath=ee.slice(2).join(`/`))):ee[1]===`commits`&&ee.length>2&&(Z.commit=ee[2])),Z.full_name=Z.owner+`/`+Z.name,Z.query.at?Z.ref=Z.query.at:Z.ref=``),J.length!==0&&Z.ref&&(Z.ref=$(Z.href,J)||Z.ref,Z.filepath=Z.href.split(Z.ref+`/`)[1]),Z}X.stringify=function(L,J){J||=L.protocols&&L.protocols.length?L.protocols.join(`+`):L.protocol;var Y=L.port?`:`+L.port:``,X=L.user||`git`,$=L.git_suffix?`.git`:``;switch(J){case`ssh`:return Y?`ssh://`+X+`@`+L.resource+Y+`/`+L.full_name+$:X+`@`+L.resource+`:`+L.full_name+$;case`git+ssh`:case`ssh+git`:case`ftp`:case`ftps`:return J+`://`+X+`@`+L.resource+Y+`/`+L.full_name+$;case`http`:case`https`:var ee=L.token?Z(L):L.user&&(L.protocols.includes(`http`)||L.protocols.includes(`https`))?L.user+`@`:``;return J+`://`+ee+L.resource+Y+`/`+Q(L)+$;default:return L.href}};
311
+ `).filter(Boolean).filter(L=>le.test(L));ue=L.length>0?L.length:void 0;let J=L[0];if(J){let L=await Y.raw([`log`,`-1`,`--format=%aI`,J]);de=J.replace(/^v/,``),fe=L.trim()||void 0}}catch{}let pe=await Promise.all(ne.map(async L=>{for(let J of[`main`,`master`]){let X=`${L.name}/${J}`;try{let[J,Z]=(await Y.raw([`rev-list`,`--left-right`,`--count`,`HEAD...${X}`])).trim().split(` `).map(Number);return[L.name,{ahead:J,behind:Z}]}catch{}}})),me={};for(let L of pe)L&&(me[L[0]]=L[1]);let he=Object.values(me),ge=he.length>0?he.reduce((L,J)=>L+J.ahead,0):void 0,_e=he.length>0?he.reduce((L,J)=>L+J.behind,0):void 0;return{data:{branchCount:Q.all.length,branchCurrent:Q.current,commitCount:Z.total,commitDateFirst:ee,commitDateLast:Z.latest?.date??void 0,contributorCount:oe.size,hasLfs:ie,isClean:X.isClean(),isDirty:!X.isClean(),isRemoteAhead:Object.values(me).some(L=>L.behind>0)||void 0,remoteCount:ne.length,remoteStatus:Object.keys(me).length>0?me:void 0,submoduleCount:re,tagCount:$.all.length,tagDateLatest:se,tagNameLatest:ce,tagReleaseCount:ue,tagVersionDateLatest:fe,tagVersionLatest:de,totalAhead:ge,totalBehind:_e,trackedFileCount:te.length,trackedSizeBytes:ae,uncommittedFileCount:X.files.length},source:L}},phase:1});var require_lib$8=__commonJSMin(((L,J)=>{J.exports=function(L,J){J===!0&&(J=0);var Y=``;if(typeof L==`string`)try{Y=new URL(L).protocol}catch{}else L&&L.constructor===URL&&(Y=L.protocol);var X=Y.split(/\:|\+/).filter(Boolean);return typeof J==`number`?X[J]:X}})),require_lib$7=__commonJSMin(((L,J)=>{var Y=require_lib$8();function X(L){var J={protocols:[],protocol:null,port:null,resource:``,host:``,user:``,password:``,pathname:``,hash:``,search:``,href:L,query:{},parse_failed:!1};try{var X=new URL(L);J.protocols=Y(X),J.protocol=J.protocols[0],J.port=X.port,J.resource=X.hostname,J.host=X.host,J.user=X.username||``,J.password=X.password||``,J.pathname=X.pathname,J.hash=X.hash.slice(1),J.search=X.search.slice(1),J.href=X.href,J.query=Object.fromEntries(X.searchParams)}catch{J.protocols=[`file`],J.protocol=J.protocols[0],J.port=``,J.resource=``,J.user=``,J.pathname=``,J.hash=``,J.search=``,J.href=L,J.query={},J.parse_failed=!0}return J}J.exports=X})),require_dist$2=__commonJSMin(((L,J)=>{var Y=require_lib$7();function X(L){return L&&typeof L==`object`&&`default`in L?L:{default:L}}var Z=X(Y);function Q(L){if(L.__esModule)return L;var J=L.default;if(typeof J==`function`){var Y=function L(){if(this instanceof L){var Y=[null];return Y.push.apply(Y,arguments),new(Function.bind.apply(J,Y))}return J.apply(this,arguments)};Y.prototype=J.prototype}else Y={};return Object.defineProperty(Y,`__esModule`,{value:!0}),Object.keys(L).forEach(function(J){var X=Object.getOwnPropertyDescriptor(L,J);Object.defineProperty(Y,J,X.get?X:{enumerable:!0,get:function(){return L[J]}})}),Y}var $={};let ee=`text/plain`,te=`us-ascii`,ne=(L,J)=>J.some(J=>J instanceof RegExp?J.test(L):J===L),re=(L,{stripHash:J})=>{let Y=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(L);if(!Y)throw Error(`Invalid URL: ${L}`);let{type:X,data:Z,hash:Q}=Y.groups,$=X.split(`;`);Q=J?``:Q;let ee=!1;$[$.length-1]===`base64`&&($.pop(),ee=!0);let te=($.shift()||``).toLowerCase(),ne=[...$.map(L=>{let[J,Y=``]=L.split(`=`).map(L=>L.trim());return J===`charset`&&(Y=Y.toLowerCase(),Y===`us-ascii`)?``:`${J}${Y?`=${Y}`:``}`}).filter(Boolean)];return ee&&ne.push(`base64`),(ne.length>0||te&&te!==`text/plain`)&&ne.unshift(te),`data:${ne.join(`;`)},${ee?Z.trim():Z}${Q?`#${Q}`:``}`};function ie(L,J){if(J={defaultProtocol:`http:`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...J},L=L.trim(),/^data:/i.test(L))return re(L,J);if(/^view-source:/i.test(L))throw Error("`view-source:` is not supported as it is a non-standard protocol");let Y=L.startsWith(`//`);!Y&&/^\.*\//.test(L)||(L=L.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,J.defaultProtocol));let X=new URL(L);if(J.forceHttp&&J.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(J.forceHttp&&X.protocol===`https:`&&(X.protocol=`http:`),J.forceHttps&&X.protocol===`http:`&&(X.protocol=`https:`),J.stripAuthentication&&(X.username=``,X.password=``),J.stripHash?X.hash=``:J.stripTextFragment&&(X.hash=X.hash.replace(/#?:~:text.*?$/i,``)),X.pathname){let L=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,J=0,Y=``;for(;;){let Z=L.exec(X.pathname);if(!Z)break;let Q=Z[0],$=Z.index,ee=X.pathname.slice(J,$);Y+=ee.replace(/\/{2,}/g,`/`),Y+=Q,J=$+Q.length}let Z=X.pathname.slice(J,X.pathname.length);Y+=Z.replace(/\/{2,}/g,`/`),X.pathname=Y}if(X.pathname)try{X.pathname=decodeURI(X.pathname)}catch{}if(J.removeDirectoryIndex===!0&&(J.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(J.removeDirectoryIndex)&&J.removeDirectoryIndex.length>0){let L=X.pathname.split(`/`),Y=L[L.length-1];ne(Y,J.removeDirectoryIndex)&&(L=L.slice(0,-1),X.pathname=L.slice(1).join(`/`)+`/`)}if(X.hostname&&(X.hostname=X.hostname.replace(/\.$/,``),J.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(X.hostname)&&(X.hostname=X.hostname.replace(/^www\./,``))),Array.isArray(J.removeQueryParameters))for(let L of[...X.searchParams.keys()])ne(L,J.removeQueryParameters)&&X.searchParams.delete(L);if(J.removeQueryParameters===!0&&(X.search=``),J.sortQueryParameters){X.searchParams.sort();try{X.search=decodeURIComponent(X.search)}catch{}}J.removeTrailingSlash&&(X.pathname=X.pathname.replace(/\/$/,``));let Z=L;return L=X.toString(),!J.removeSingleSlash&&X.pathname===`/`&&!Z.endsWith(`/`)&&X.hash===``&&(L=L.replace(/\/$/,``)),(J.removeTrailingSlash||X.pathname===`/`)&&X.hash===``&&J.removeSingleSlash&&(L=L.replace(/\/$/,``)),Y&&!J.normalizeProtocol&&(L=L.replace(/^http:\/\//,`//`)),J.stripProtocol&&(L=L.replace(/^(?:https?:)?\/\//,``)),L}var ae=Q(Object.freeze({__proto__:null,default:ie}));Object.defineProperty($,`__esModule`,{value:!0});var oe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(L){return typeof L}:function(L){return L&&typeof Symbol==`function`&&L.constructor===Symbol&&L!==Symbol.prototype?`symbol`:typeof L},se=ue(ae),ce=Z.default,le=ue(ce);function ue(L){return L&&L.__esModule?L:{default:L}}var de=function L(J){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=/^(?:([a-zA-Z_][a-zA-Z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:](([\~,\.\w,\-,\_,\/,\s]|%[0-9A-Fa-f]{2})+?(?:\.git|\/)?)$/,Z=function(L){var Y=Error(L);throw Y.subject_url=J,Y};(typeof J!=`string`||!J.trim())&&Z(`Invalid url.`),J.length>L.MAX_INPUT_LENGTH&&Z(`Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH.`),Y&&((Y===void 0?`undefined`:oe(Y))!==`object`&&(Y={stripHash:!1}),J=(0,se.default)(J,Y));var Q=(0,le.default)(J);if(Q.parse_failed){var $=Q.href.match(X);$?(Q.protocols=[`ssh`],Q.protocol=`ssh`,Q.resource=$[2],Q.host=$[2],Q.user=$[1],Q.pathname=`/`+$[3],Q.parse_failed=!1):Z(`URL parsing failed.`)}return Q};de.MAX_INPUT_LENGTH=2048,J.exports=$.default=de})),require_lib$6=__commonJSMin(((L,J)=>{var Y=require_lib$8();function X(L){if(Array.isArray(L))return L.indexOf(`ssh`)!==-1||L.indexOf(`rsync`)!==-1;if(typeof L!=`string`)return!1;var J=Y(L);if(L=L.substring(L.indexOf(`://`)+3),X(J))return!0;var Z=RegExp(`.([a-zA-Z\\d]+):(\\d+)/`);return!L.match(Z)&&L.indexOf(`@`)<L.indexOf(`:`)}J.exports=X})),require_lib$5=__commonJSMin(((L,J)=>{let Y=require_dist$2(),X=require_lib$6();function Z(L){let J=Y(L);return J.token=``,J.password===`x-oauth-basic`?J.token=J.user:J.user===`x-token-auth`&&(J.token=J.password),X(J.protocols)||J.protocols.length===0&&X(L)?J.protocol=`ssh`:J.protocols.length?J.protocol=J.protocols[0]:(J.protocol=`file`,J.protocols=[`file`]),J.href=J.href.replace(/\/$/,``),J}J.exports=Z})),require_lib$4=__commonJSMin(((L,J)=>{var Y=require_lib$5();function X(L,J){if(J||=[],typeof L!=`string`)throw Error(`The url must be a string.`);if(!J.every(function(L){return typeof L==`string`}))throw Error(`The refs should contain only strings`);/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(L)&&(L=`https://github.com/`+L);var Z=Y(L),Q=Z.resource.split(`.`),ee=null;switch(Z.toString=function(L){return X.stringify(this,L)},Z.source=Q.length>2?Q.slice(1-Q.length).join(`.`):Z.source=Z.resource,Z.git_suffix=/\.git$/.test(Z.pathname),Z.name=decodeURIComponent((Z.pathname||Z.href).replace(/(^\/)|(\/$)/g,``).replace(/\.git$/,``)),Z.owner=decodeURIComponent(Z.user),Z.source){case`git.cloudforge.com`:Z.owner=Z.user,Z.organization=Q[0],Z.source=`cloudforge.com`;break;case`visualstudio.com`:if(Z.resource===`vs-ssh.visualstudio.com`){ee=Z.name.split(`/`),ee.length===4&&(Z.organization=ee[1],Z.owner=ee[2],Z.name=ee[3],Z.full_name=ee[2]+`/`+ee[3]);break}else{ee=Z.name.split(`/`),ee.length===2?(Z.owner=ee[1],Z.name=ee[1],Z.full_name=`_git/`+Z.name):ee.length===3?(Z.name=ee[2],ee[0]===`DefaultCollection`?(Z.owner=ee[2],Z.organization=ee[0],Z.full_name=Z.organization+`/_git/`+Z.name):(Z.owner=ee[0],Z.full_name=Z.owner+`/_git/`+Z.name)):ee.length===4&&(Z.organization=ee[0],Z.owner=ee[1],Z.name=ee[3],Z.full_name=Z.organization+`/`+Z.owner+`/_git/`+Z.name);break}case`dev.azure.com`:case`azure.com`:if(Z.resource===`ssh.dev.azure.com`){ee=Z.name.split(`/`),ee.length===4&&(Z.organization=ee[1],Z.owner=ee[2],Z.name=ee[3]);break}else{ee=Z.name.split(`/`),ee.length===5?(Z.organization=ee[0],Z.owner=ee[1],Z.name=ee[4],Z.full_name=`_git/`+Z.name):ee.length===3?(Z.name=ee[2],ee[0]===`DefaultCollection`?(Z.owner=ee[2],Z.organization=ee[0],Z.full_name=Z.organization+`/_git/`+Z.name):(Z.owner=ee[0],Z.full_name=Z.owner+`/_git/`+Z.name)):ee.length===4&&(Z.organization=ee[0],Z.owner=ee[1],Z.name=ee[3],Z.full_name=Z.organization+`/`+Z.owner+`/_git/`+Z.name),Z.query&&Z.query.path&&(Z.filepath=Z.query.path.replace(/^\/+/g,``)),Z.query&&Z.query.version&&(Z.ref=Z.query.version.replace(/^GB/,``));break}default:ee=Z.name.split(`/`);var te=ee.length-1;if(ee.length>=2){var ne=ee.indexOf(`-`,2),re=ee.indexOf(`blob`,2),ie=ee.indexOf(`tree`,2),ae=ee.indexOf(`commit`,2),oe=ee.indexOf(`issues`,2),se=ee.indexOf(`src`,2),ce=ee.indexOf(`raw`,2),le=ee.indexOf(`edit`,2);te=ne>0?ne-1:re>0&&ie>0?Math.min(re-1,ie-1):re>0?re-1:oe>0?oe-1:ie>0?ie-1:ae>0?ae-1:se>0?se-1:ce>0?ce-1:le>0?le-1:te,Z.owner=ee.slice(0,te).join(`/`),Z.name=ee[te],ae&&oe<0&&(Z.commit=ee[te+2])}Z.ref=``,Z.filepathtype=``,Z.filepath=``;var ue=ee.length>te&&ee[te+1]===`-`?te+1:te;ee.length>ue+2&&[`raw`,`src`,`blob`,`tree`,`edit`].indexOf(ee[ue+1])>=0&&(Z.filepathtype=ee[ue+1],Z.ref=ee[ue+2],ee.length>ue+3&&(Z.filepath=ee.slice(ue+3).join(`/`))),Z.organization=Z.owner;break}Z.full_name||(Z.full_name=Z.owner,Z.name&&(Z.full_name&&(Z.full_name+=`/`),Z.full_name+=Z.name)),Z.owner.startsWith(`scm/`)&&(Z.source=`bitbucket-server`,Z.owner=Z.owner.replace(`scm/`,``),Z.organization=Z.owner,Z.full_name=Z.owner+`/`+Z.name);var de=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(Z.pathname);return de!=null&&(Z.source=`bitbucket-server`,de[1]===`users`?Z.owner=`~`+de[2]:Z.owner=de[2],Z.organization=Z.owner,Z.name=de[3],ee=de[4].split(`/`),ee.length>1&&([`raw`,`browse`].indexOf(ee[1])>=0?(Z.filepathtype=ee[1],ee.length>2&&(Z.filepath=ee.slice(2).join(`/`))):ee[1]===`commits`&&ee.length>2&&(Z.commit=ee[2])),Z.full_name=Z.owner+`/`+Z.name,Z.query.at?Z.ref=Z.query.at:Z.ref=``),J.length!==0&&Z.ref&&(Z.ref=$(Z.href,J)||Z.ref,Z.filepath=Z.href.split(Z.ref+`/`)[1]),Z}X.stringify=function(L,J){J||=L.protocols&&L.protocols.length?L.protocols.join(`+`):L.protocol;var Y=L.port?`:`+L.port:``,X=L.user||`git`,$=L.git_suffix?`.git`:``;switch(J){case`ssh`:return Y?`ssh://`+X+`@`+L.resource+Y+`/`+L.full_name+$:X+`@`+L.resource+`:`+L.full_name+$;case`git+ssh`:case`ssh+git`:case`ftp`:case`ftps`:return J+`://`+X+`@`+L.resource+Y+`/`+L.full_name+$;case`http`:case`https`:var ee=L.token?Z(L):L.user&&(L.protocols.includes(`http`)||L.protocols.includes(`https`))?L.user+`@`:``;return J+`://`+ee+L.resource+Y+`/`+Q(L)+$;default:return L.href}};
312
312
  /*!
313
313
  * buildToken
314
314
  * Builds OAuth token prefix (helper function)
@@ -433,7 +433,7 @@ function Z(L){switch(L.source){case`bitbucket.org`:return`x-token-auth:`+L.token
433
433
  }
434
434
  }
435
435
  }
436
- `;async function checkHasPages(L,J,Y){try{return(await L.rest.repos.get({owner:J,repo:Y})).data.has_pages}catch{return!1}}async function getUpstreamComparison(L,J,Y,X,Z){let Q=Z.defaultBranchRef?.name;if(Q)try{let $=await L.rest.repos.compareCommitsWithBasehead({basehead:`${Z.owner.login}:${Q}...${J}:${X}`,owner:J,repo:Y});return{ahead:$.data.ahead_by,behind:$.data.behind_by}}catch{return}}function countSubmodules(L){return L?L.match(/\[submodule\s/g)?.length??0:0}function detectLfs(L){return L?L.includes(`filter=lfs`):!1}function extractLanguages(L){let J={};if(L.languages?.edges)for(let Y of L.languages.edges)J[Y.node.name]=Y.size;return J}function mapRepoData(L,J){let Y=(L.latestRelease?.releaseAssets.nodes.reduce((L,J)=>L+J.downloadCount,0)??0)||void 0;return{archivedAt:L.archivedAt??void 0,codeOfConduct:L.codeOfConduct?.name??void 0,commitsAheadUpstream:J.commitsAheadUpstream,commitsBehindUpstream:J.commitsBehindUpstream,contributorCount:L.contributorCount,createdAt:L.createdAt,databaseId:L.databaseId,defaultBranch:L.defaultBranchRef?.name??void 0,description:L.description??void 0,discussionCount:L.discussions.totalCount,diskUsageBytes:L.diskUsage===null?void 0:L.diskUsage*1024,forkCount:L.forkCount,forkedFrom:L.parent?.url??void 0,fundingLinks:L.fundingLinks.length>0?L.fundingLinks.map(L=>({platform:L.platform,url:L.url})):void 0,hasContributing:L.contributingGuidelines!==null,hasDiscussionsEnabled:L.hasDiscussionsEnabled,hasIssuesEnabled:L.hasIssuesEnabled,hasLfs:detectLfs(L.gitattributes?.text??void 0),hasPages:J.hasPages,hasProjectsEnabled:L.hasProjectsEnabled,hasSponsorshipsEnabled:L.hasSponsorshipsEnabled,hasVulnerabilityAlertsEnabled:L.hasVulnerabilityAlertsEnabled,hasWikiEnabled:L.hasWikiEnabled,homepageUrl:L.homepageUrl===``?void 0:L.homepageUrl??void 0,isArchived:L.isArchived,isDisabled:L.isDisabled,isFork:L.isFork,isInOrganization:L.isInOrganization,isMirror:L.isMirror,isPrivate:L.isPrivate,isSecurityPolicyEnabled:L.isSecurityPolicyEnabled,issueCountClosed:L.closedIssues.totalCount,issueCountOpen:L.openIssues.totalCount,isTemplate:L.isTemplate,languages:extractLanguages(L),license:void 0,licenseKey:L.licenseInfo?.key??void 0,licenseName:L.licenseInfo?.name??void 0,licenseSpdxId:L.licenseInfo?.spdxId??void 0,licenseUrl:L.licenseInfo?.url??void 0,mirrorUrl:L.mirrorUrl??void 0,name:L.name,nameWithOwner:L.nameWithOwner,openGraphImageUrl:L.openGraphImageUrl,ownerLogin:L.owner.login,ownerType:L.owner.__typename,parentNameWithOwner:L.parent?.nameWithOwner??void 0,primaryLanguage:L.primaryLanguage?.name??void 0,pullRequestCountClosed:L.closedPullRequests.totalCount,pullRequestCountMerged:L.mergedPullRequests.totalCount,pullRequestCountOpen:L.openPullRequests.totalCount,pushedAt:L.pushedAt??void 0,releaseCount:L.releases.totalCount||void 0,releaseDateLatest:L.latestRelease?.createdAt??void 0,releaseDownloadCount:Y,releaseVersionLatest:L.latestRelease?.tagName??void 0,securityPolicyUrl:L.securityPolicyUrl??void 0,settings:{allowUpdateBranch:L.allowUpdateBranch,autoMergeAllowed:L.autoMergeAllowed,deleteBranchOnMerge:L.deleteBranchOnMerge,forkingAllowed:L.forkingAllowed,mergeCommitAllowed:L.mergeCommitAllowed,mergeCommitMessage:L.mergeCommitMessage,mergeCommitTitle:L.mergeCommitTitle,rebaseMergeAllowed:L.rebaseMergeAllowed,squashMergeAllowed:L.squashMergeAllowed,squashMergeCommitMessage:L.squashMergeCommitMessage,squashMergeCommitTitle:L.squashMergeCommitTitle,webCommitSignoffRequired:L.webCommitSignoffRequired},sshUrl:L.sshUrl,stargazerCount:L.stargazerCount,submoduleCount:countSubmodules(L.gitmodules?.text??void 0),templateFrom:L.templateRepository?.url??void 0,topics:L.repositoryTopics.nodes.map(L=>L.topic.name),updatedAt:L.updatedAt,url:L.url,usesCustomOpenGraphImage:L.usesCustomOpenGraphImage,visibility:L.visibility,vulnerabilityAlertCount:L.vulnerabilityAlerts?.totalCount??void 0,watcherCount:L.watchers.totalCount}}const githubSource=defineSource({async discover(L){let J=ensureArray(L.metadata?.gitConfig).map(L=>L.data.remote).filter(L=>L!==void 0);return J.length===0&&!L.completedSources?.has(`gitConfig`)&&(log$2.warn(`Missing gitConfig in source context metadata for ${L.options.path}, extracting it now...`),J=ensureArray(await gitConfigSource.extract(L)).map(L=>L.data.remote).filter(L=>L!==void 0)),[...new Set(J.map(L=>getGitHubRemoteFromConfig(L)).filter(L=>L!==void 0).map(L=>`${L.owner}/${L.repo}`))]},key:`github`,async parse(L,J){log$2.debug(`Extracting GitHub metadata...`);let[Y,X]=L.split(`/`),Z=new Octokit(J.options.credentials?.githubToken?{auth:J.options.credentials.githubToken}:void 0),[Q,$]=await Promise.all([Z.graphql(graphqlQuery,{owner:Y,repo:X}),checkHasPages(Z,Y,X)]),ee=gitHubRepoSchema.parse(Q).repository,te,ne;if(ee.isFork&&ee.parent&&ee.defaultBranchRef){let L=await getUpstreamComparison(Z,Y,X,ee.defaultBranchRef.name,ee.parent);te=L?.ahead,ne=L?.behind}return{data:mapRepoData(ee,{commitsAheadUpstream:te,commitsBehindUpstream:ne,hasPages:$}),source:`https://github.com/${Y}/${X}`}},phase:2}),HOST_SEGMENTS={"bitbucket.com":3,"bitbucket.org":3,"codeberg.org":3,"git.sr.ht":3,"github.com":3,"gitlab.com":3};function moduleToRepoUrl(L){let J=L.split(`/`),Y=J[0];if(!Y)return;let X=HOST_SEGMENTS[Y];if(!X||J.length<X)return;let Z=J.slice(0,X).join(`/`);return Z=Z.replace(/\/v\d+$/,``),`https://${Z}`}function stripComment(L){let J=L.indexOf(`//`);return J===-1?L.trim():L.slice(0,J).trim()}function isIndirect(L){return/\/\/\s*indirect/.test(L)}function parseRequireLine(L){let J=isIndirect(L),Y=stripComment(L),X=/^(\S+)\s+(\S+)/.exec(Y);if(!X)return;let Z=X[2].replace(/\+incompatible$/,``);return{indirect:J,module:X[1],version:Z}}function parseReplaceLine(L){let J=stripComment(L).split(`=>`);if(J.length!==2)return;let Y=J[0].trim().split(/\s+/),X=J[1].trim().split(/\s+/),Z=Y[0];if(!Z||X.length===0)return;let Q=X[0];if(Q)return Q.startsWith(`./`)||Q.startsWith(`../`)||Q.startsWith(`/`)?{from:Z,to:`local`}:{from:Z,to:{module:Q,version:(X[1]??``).replace(/\+incompatible$/,``)}}}function parseToolLine(L){let J=stripComment(L).trim();if(J.length!==0)return J.split(/\s+/)[0]||void 0}function parseGoMod(L){let J={dependencies:[],go_version:void 0,module:void 0,repository_url:void 0,tool_dependencies:[]},Y={},X=[],Z=new Map,Q=`none`;for(let $ of L.split(`
436
+ `;async function checkHasPages(L,J,Y){try{return(await L.rest.repos.get({owner:J,repo:Y})).data.has_pages}catch{return!1}}async function getUpstreamComparison(L,J,Y,X,Z){let Q=Z.defaultBranchRef?.name;if(Q)try{let $=await L.rest.repos.compareCommitsWithBasehead({basehead:`${Z.owner.login}:${Q}...${J}:${X}`,owner:J,repo:Y});return{ahead:$.data.ahead_by,behind:$.data.behind_by}}catch{return}}function countSubmodules(L){return L?L.match(/\[submodule\s/g)?.length??0:0}function detectLfs(L){return L?L.includes(`filter=lfs`):!1}function extractLanguages(L){let J={};if(L.languages?.edges)for(let Y of L.languages.edges)J[Y.node.name]=Y.size;return J}function mapRepoData(L,J){let Y=(L.latestRelease?.releaseAssets.nodes.reduce((L,J)=>L+J.downloadCount,0)??0)||void 0;return{archivedAt:L.archivedAt??void 0,codeOfConduct:L.codeOfConduct?.name??void 0,commitsAheadUpstream:J.commitsAheadUpstream,commitsBehindUpstream:J.commitsBehindUpstream,contributorCount:L.contributorCount,createdAt:L.createdAt,databaseId:L.databaseId,defaultBranch:L.defaultBranchRef?.name??void 0,description:L.description??void 0,discussionCount:L.discussions.totalCount,diskUsageBytes:L.diskUsage===null?void 0:L.diskUsage*1e3,forkCount:L.forkCount,forkedFrom:L.parent?.url??void 0,fundingLinks:L.fundingLinks.length>0?L.fundingLinks.map(L=>({platform:L.platform,url:L.url})):void 0,hasContributing:L.contributingGuidelines!==null,hasDiscussionsEnabled:L.hasDiscussionsEnabled,hasIssuesEnabled:L.hasIssuesEnabled,hasLfs:detectLfs(L.gitattributes?.text??void 0),hasPages:J.hasPages,hasProjectsEnabled:L.hasProjectsEnabled,hasSponsorshipsEnabled:L.hasSponsorshipsEnabled,hasVulnerabilityAlertsEnabled:L.hasVulnerabilityAlertsEnabled,hasWikiEnabled:L.hasWikiEnabled,homepageUrl:L.homepageUrl===``?void 0:L.homepageUrl??void 0,isArchived:L.isArchived,isDisabled:L.isDisabled,isFork:L.isFork,isInOrganization:L.isInOrganization,isMirror:L.isMirror,isPrivate:L.isPrivate,isSecurityPolicyEnabled:L.isSecurityPolicyEnabled,issueCountClosed:L.closedIssues.totalCount,issueCountOpen:L.openIssues.totalCount,isTemplate:L.isTemplate,languages:extractLanguages(L),licenseKey:L.licenseInfo?.key??void 0,licenseName:L.licenseInfo?.name??void 0,licenseSpdxId:L.licenseInfo?.spdxId===`NOASSERTION`?void 0:L.licenseInfo?.spdxId??void 0,licenseUrl:L.licenseInfo?.url??void 0,mirrorUrl:L.mirrorUrl??void 0,name:L.name,nameWithOwner:L.nameWithOwner,openGraphImageUrl:L.openGraphImageUrl,ownerLogin:L.owner.login,ownerType:L.owner.__typename,parentNameWithOwner:L.parent?.nameWithOwner??void 0,primaryLanguage:L.primaryLanguage?.name??void 0,pullRequestCountClosed:L.closedPullRequests.totalCount,pullRequestCountMerged:L.mergedPullRequests.totalCount,pullRequestCountOpen:L.openPullRequests.totalCount,pushedAt:L.pushedAt??void 0,releaseCount:L.releases.totalCount||void 0,releaseDateLatest:L.latestRelease?.createdAt??void 0,releaseDownloadCount:Y,releaseVersionLatest:L.latestRelease?.tagName??void 0,securityPolicyUrl:L.securityPolicyUrl??void 0,settings:{allowUpdateBranch:L.allowUpdateBranch,autoMergeAllowed:L.autoMergeAllowed,deleteBranchOnMerge:L.deleteBranchOnMerge,forkingAllowed:L.forkingAllowed,mergeCommitAllowed:L.mergeCommitAllowed,mergeCommitMessage:L.mergeCommitMessage,mergeCommitTitle:L.mergeCommitTitle,rebaseMergeAllowed:L.rebaseMergeAllowed,squashMergeAllowed:L.squashMergeAllowed,squashMergeCommitMessage:L.squashMergeCommitMessage,squashMergeCommitTitle:L.squashMergeCommitTitle,webCommitSignoffRequired:L.webCommitSignoffRequired},sshUrl:L.sshUrl,stargazerCount:L.stargazerCount,submoduleCount:countSubmodules(L.gitmodules?.text??void 0),templateFrom:L.templateRepository?.url??void 0,topics:L.repositoryTopics.nodes.map(L=>L.topic.name),updatedAt:L.updatedAt,url:L.url,usesCustomOpenGraphImage:L.usesCustomOpenGraphImage,visibility:L.visibility,vulnerabilityAlertCount:L.vulnerabilityAlerts?.totalCount??void 0,watcherCount:L.watchers.totalCount}}const githubSource=defineSource({async discover(L){let J=ensureArray(L.metadata?.gitConfig).map(L=>L.data.remote).filter(L=>L!==void 0);return J.length===0&&!L.completedSources?.has(`gitConfig`)&&(log$2.warn(`Missing gitConfig in source context metadata for ${L.options.path}, extracting it now...`),J=ensureArray(await gitConfigSource.extract(L)).map(L=>L.data.remote).filter(L=>L!==void 0)),[...new Set(J.map(L=>getGitHubRemoteFromConfig(L)).filter(L=>L!==void 0).map(L=>`${L.owner}/${L.repo}`))]},key:`github`,async parse(L,J){log$2.debug(`Extracting GitHub metadata...`);let[Y,X]=L.split(`/`),Z=new Octokit(J.options.credentials?.githubToken?{auth:J.options.credentials.githubToken}:void 0),[Q,$]=await Promise.all([Z.graphql(graphqlQuery,{owner:Y,repo:X}),checkHasPages(Z,Y,X)]),ee=gitHubRepoSchema.parse(Q).repository,te,ne;if(ee.isFork&&ee.parent&&ee.defaultBranchRef){let L=await getUpstreamComparison(Z,Y,X,ee.defaultBranchRef.name,ee.parent);te=L?.ahead,ne=L?.behind}return{data:mapRepoData(ee,{commitsAheadUpstream:te,commitsBehindUpstream:ne,hasPages:$}),source:`https://github.com/${Y}/${X}`}},phase:2}),HOST_SEGMENTS={"bitbucket.com":3,"bitbucket.org":3,"codeberg.org":3,"git.sr.ht":3,"github.com":3,"gitlab.com":3};function moduleToRepoUrl(L){let J=L.split(`/`),Y=J[0];if(!Y)return;let X=HOST_SEGMENTS[Y];if(!X||J.length<X)return;let Z=J.slice(0,X).join(`/`);return Z=Z.replace(/\/v\d+$/,``),`https://${Z}`}function stripComment(L){let J=L.indexOf(`//`);return J===-1?L.trim():L.slice(0,J).trim()}function isIndirect(L){return/\/\/\s*indirect/.test(L)}function parseRequireLine(L){let J=isIndirect(L),Y=stripComment(L),X=/^(\S+)\s+(\S+)/.exec(Y);if(!X)return;let Z=X[2].replace(/\+incompatible$/,``);return{indirect:J,module:X[1],version:Z}}function parseReplaceLine(L){let J=stripComment(L).split(`=>`);if(J.length!==2)return;let Y=J[0].trim().split(/\s+/),X=J[1].trim().split(/\s+/),Z=Y[0];if(!Z||X.length===0)return;let Q=X[0];if(Q)return Q.startsWith(`./`)||Q.startsWith(`../`)||Q.startsWith(`/`)?{from:Z,to:`local`}:{from:Z,to:{module:Q,version:(X[1]??``).replace(/\+incompatible$/,``)}}}function parseToolLine(L){let J=stripComment(L).trim();if(J.length!==0)return J.split(/\s+/)[0]||void 0}function parseGoMod(L){let J={dependencies:[],go_version:void 0,module:void 0,repository_url:void 0,tool_dependencies:[]},Y={},X=[],Z=new Map,Q=`none`;for(let $ of L.split(`
437
437
  `)){let L=$.trim();if(!(L===``||L.startsWith(`//`)&&Q===`none`)){if(L===`)`||L.startsWith(`)`)){Q=`none`;continue}if(Q!==`none`){switch(Q){case`replace`:{let J=parseReplaceLine(L);J&&Z.set(J.from,J.to);break}case`require`:{let J=parseRequireLine(L);J&&!J.indirect&&(Y[J.module]=J.version);break}case`skip`:break;case`tool`:{let J=parseToolLine(L);J&&X.push(J);break}}continue}if(L.startsWith(`module `))J.module=L.slice(7).trim();else if(L.startsWith(`go `))J.go_version=L.slice(3).trim();else if(L.startsWith(`require `))if(L.includes(`(`))Q=`require`;else{let J=parseRequireLine(L.slice(8));J&&!J.indirect&&(Y[J.module]=J.version)}else if(L.startsWith(`replace `))if(L.includes(`(`))Q=`replace`;else{let J=parseReplaceLine(L.slice(8));J&&Z.set(J.from,J.to)}else if(L.startsWith(`tool `))if(L.includes(`(`))Q=`tool`;else{let J=parseToolLine(L.slice(5));J&&X.push(J)}else (L.startsWith(`exclude `)||L.startsWith(`retract `)||L.startsWith(`godebug `)||L.startsWith(`toolchain `))&&L.includes(`(`)&&(Q=`skip`)}}for(let[L,J]of Z)L in Y&&(delete Y[L],J!==`local`&&(Y[J.module]=J.version));return J.dependencies=Object.entries(Y).map(([L,J])=>({module:L,version:J})),J.tool_dependencies=X,J.module&&(J.repository_url=moduleToRepoUrl(J.module)),J}const goModDependencySchema=object({module:string$2(),version:string$2()}),goModDataSchema=object({dependencies:array(goModDependencySchema),go_version:nonEmptyString,module:nonEmptyString,repository_url:optionalUrl,tool_dependencies:stringArray});function parse$20(L){return goModDataSchema.parse(parseGoMod(L))}const goGoModSource=defineSource({async discover(L){return getMatches(L.options,[`go.mod`])},key:`goGoMod`,async parse(L,J){return{data:parse$20(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1});var import_dist=require_dist$6();const goreleaserDataSchema=object({description:nonEmptyString,homepage:optionalUrl,license:nonEmptyString,maintainer:nonEmptyString,operating_systems:stringArray,project_name:nonEmptyString,repository_url:optionalUrl,vendor:nonEmptyString}),GOOS_MAP={aix:`AIX`,android:`Android`,darwin:`macOS`,dragonfly:`DragonFly BSD`,freebsd:`FreeBSD`,illumos:`illumos`,ios:`iOS`,js:`JavaScript`,linux:`Linux`,netbsd:`NetBSD`,openbsd:`OpenBSD`,plan9:`Plan 9`,solaris:`Solaris`,wasip1:`WASI`,windows:`Windows`};function isPlainObject$2(L){return typeof L==`object`&&!!L&&!Array.isArray(L)}function isNonEmptyString$1(L){return typeof L==`string`&&L.trim().length>0}function firstString(L,J){for(let Y of L)if(isPlainObject$2(Y)){let L=Y[J];if(isNonEmptyString$1(L)&&!L.includes(`{{`))return L.trim()}}function collectSections(L,...J){let Y=[];for(let X of J){let J=L[X];is.array(J)?Y.push(...J):isPlainObject$2(J)&&Y.push(J)}return Y}function parse$19(L){let J;try{J=(0,import_dist.parse)(L)}catch{return}if(!isPlainObject$2(J))return;let Y={description:void 0,homepage:void 0,license:void 0,maintainer:void 0,operating_systems:[],project_name:void 0,repository_url:void 0,vendor:void 0};isNonEmptyString$1(J.project_name)&&(Y.project_name=J.project_name);let X=collectSections(J,`nfpms`,`nfpm`),Z=collectSections(J,`brews`,`brew`,`homebrew_casks`),Q=collectSections(J,`snapcrafts`,`snapcraft`),$=collectSections(J,`scoops`,`scoop`),ee=collectSections(J,`chocolateys`,`chocolatey`),te=collectSections(J,`winget`),ne=collectSections(J,`aurs`,`aur`),re=collectSections(J,`krews`,`krew`),ie=[...X,...Z,...Q,...$,...ee,...te,...ne,...re];if(Y.description=firstString(ie,`description`)??firstString(Q,`summary`)??firstString(ee,`summary`)??firstString(te,`short_description`),Y.homepage=firstString(ie,`homepage`)??firstString(ee,`project_url`),Y.license=firstString(ie,`license`),Y.maintainer=firstString(X,`maintainer`)??firstString(ne,`maintainer`),Y.vendor=firstString(X,`vendor`)??firstString(ee,`owners`)??firstString(te,`publisher`),isPlainObject$2(J.release)){let{release:L}=J;if(isPlainObject$2(L.github)){let J=L.github;typeof J.owner==`string`&&typeof J.name==`string`&&(Y.repository_url=`https://github.com/${J.owner}/${J.name}`)}else if(isPlainObject$2(L.gitlab)){let J=L.gitlab;typeof J.owner==`string`&&typeof J.name==`string`&&(Y.repository_url=`https://gitlab.com/${J.owner}/${J.name}`)}}let ae=new Set,oe=collectSections(J,`builds`,`build`);for(let L of oe)if(isPlainObject$2(L)){let{goos:J}=L;if(Array.isArray(J))for(let L of J)typeof L==`string`&&ae.add(L.toLowerCase())}return Y.operating_systems=[...ae].map(L=>GOOS_MAP[L]??L.charAt(0).toUpperCase()+L.slice(1)),goreleaserDataSchema.parse(Y)}const goGoreleaserYamlSource=defineSource({async discover(L){return getMatches(L.options,[`.goreleaser.yml`,`.goreleaser.yaml`])},key:`goGoreleaserYaml`,async parse(L,J){let Y=parse$19(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1}),pomXmlPersonEntrySchema=object({email:string$2().optional(),name:string$2(),organization:string$2().optional(),url:string$2().optional()}),pomXmlLicenseEntrySchema=object({name:string$2().optional(),url:string$2().optional()}),pomXmlDependencyEntrySchema=object({artifactId:string$2(),groupId:string$2(),version:string$2().optional()}),pomXmlOrganizationSchema=object({name:string$2(),url:string$2().optional()}),pomXmlSchema=object({artifactId:nonEmptyString,ciManagementUrl:optionalUrl,contributors:array(pomXmlPersonEntrySchema),dependencies:array(pomXmlDependencyEntrySchema),description:nonEmptyString,devDependencies:array(pomXmlDependencyEntrySchema),developers:array(pomXmlPersonEntrySchema),groupId:nonEmptyString,identifier:nonEmptyString,inceptionYear:nonEmptyString,issueManagementUrl:optionalUrl,javaVersion:nonEmptyString,licenses:array(pomXmlLicenseEntrySchema),name:nonEmptyString,organization:pomXmlOrganizationSchema.optional(),scmUrl:optionalUrl,url:optionalUrl,version:nonEmptyString});function parse$18(L){let J=new XMLParser({ignoreAttributes:!0,parseTagValue:!1,removeNSPrefix:!0}),Y;try{let X=J.parse(L);if(!is.plainObject(X))return;Y=X}catch{return}if(!is.plainObject(Y.project))return;let{project:X}=Y,Z=getString$2(X.groupId),Q=getString$2(X.artifactId),{dependencies:$,devDependencies:ee}=parseDependencies$2(X);return pomXmlSchema.parse({artifactId:Q,ciManagementUrl:getNestedUrl(X.ciManagement),contributors:parsePersonEntries(X.contributors,`contributor`),dependencies:$,description:getString$2(X.description),devDependencies:ee,developers:parsePersonEntries(X.developers,`developer`),groupId:Z,identifier:Z&&Q?`${Z}.${Q}`:void 0,inceptionYear:getString$2(X.inceptionYear),issueManagementUrl:getNestedUrl(X.issueManagement),javaVersion:parseJavaVersion(X),licenses:parseLicenses(X),name:resolveName(X,Z,Q),organization:parseOrganization(X),scmUrl:parseScmUrl(X),url:getString$2(X.url),version:getString$2(X.version)})}function getString$2(L){if(typeof L!=`string`)return;let J=L.trim();if(J.length!==0)return J}function getCleanString(L){let J=getString$2(L);if(!J?.includes(`$`))return J}function resolveName(L,J,Y){let X=getString$2(L.name);if(!X)return;let Z=X;return J&&(Z=Z.replaceAll("${project.groupId}",J)),Y&&(Z=Z.replaceAll("${project.artifactId}",Y)),Z}function getNestedUrl(L){if(is.plainObject(L))return getCleanString(L.url)}function parsePersonEntries(L,J){if(!is.plainObject(L))return[];let Y=L[J],X=[];for(let L of ensureArray(Y)){if(!is.plainObject(L))continue;let J=getString$2(L.name);J&&X.push({email:getString$2(L.email),name:J,organization:getString$2(L.organization),url:getString$2(L.url)})}return X}function parseLicenses(L){if(!is.plainObject(L.licenses))return[];let J=[];for(let Y of ensureArray(L.licenses.license)){if(!is.plainObject(Y))continue;let L=getString$2(Y.name),X=getString$2(Y.url);(L??X)&&J.push({name:L,url:X})}return J}function parseDependencies$2(L){let J=[],Y=[];if(!is.plainObject(L.dependencies))return{dependencies:J,devDependencies:Y};for(let X of ensureArray(L.dependencies.dependency)){if(!is.plainObject(X))continue;let L=getString$2(X.groupId),Z=getString$2(X.artifactId);if(!L||!Z)continue;let Q={artifactId:Z,groupId:L,version:getCleanString(X.version)};getString$2(X.scope)===`test`?Y.push(Q):J.push(Q)}return{dependencies:J,devDependencies:Y}}function parseScmUrl(L){if(is.plainObject(L.scm))return getCleanString(L.scm.url)}function parseOrganization(L){if(!is.plainObject(L.organization))return;let J=getString$2(L.organization.name);if(J)return{name:J,url:getString$2(L.organization.url)}}function parseJavaVersion(L){if(is.plainObject(L.properties))return getCleanString(L.properties[`java.version`])??getCleanString(L.properties[`maven.compiler.source`])??getCleanString(L.properties[`java.compiler.source`])}const javaPomXmlSource=defineSource({async discover(L){return getMatches(L.options,[`pom.xml`])},key:`javaPomXml`,async parse(L,J){let Y=parse$18(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});var require_spdx_full=__commonJSMin(((L,J)=>{J.exports={X11:{name:`X11 License`,url:`http://www.xfree86.org/3.3.6/COPYRIGHT2.html#3`,osiApproved:!1,licenseText:`X11 License
438
438
 
439
439
  Copyright (C) 1996 X Consortium
@@ -45579,7 +45579,7 @@ The terms "reproduce," "reproduction," "derivative works," and "distribution" ha
45579
45579
 
45580
45580
  (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
45581
45581
 
45582
- (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.`}}})),require_full=__commonJSMin(((L,J)=>{J.exports=require_spdx_full()})),import_full=__toESM(require_full(),1);const CONFIDENCE_THRESHOLD=.75;function identifyLicense(L){let J=identifyByHeader(L);if(J)return J;let Y=normalizeInput(L);if(Y.length<2)return;let X=computeBigrams(Y),Z=Y.length-1,Q,$=0;for(let{bigramsMap:L,normalized:J,spdxId:ee,totalBigrams:te}of getNormalizedLicenses()){if(Y===J)return{confidence:1,spdxId:ee};let ne=diceCoefficientCached(X,Z,L,te);ne>$&&($=ne,Q={confidence:ne,spdxId:ee})}if(Q&&Q.confidence>=CONFIDENCE_THRESHOLD)return Q}function stripFrontMatter(L){if(L.startsWith(`---`)){let J=L.indexOf(`---`,3);if(J!==-1)return L.slice(J+3)}return L}function normalizeText(L){return L.replaceAll(/^#+\s+/gm,``).replaceAll(/^copyright.*$/gim,``).replaceAll(/^\|.*\|$/gm,``).replaceAll(/^[-|:\s]+$/gm,``).replaceAll(/https?:\/\/\S+/g,``).replaceAll(/\S+@\S+/g,``).replaceAll(/[[\]()]/g,` `).replaceAll(/\s+/g,` `).trim().toLowerCase()}function normalizeInput(L){return normalizeText(stripFrontMatter(L))}function computeBigrams(L){let J=new Map;for(let Y=0;Y<L.length-1;Y++){let X=L.slice(Y,Y+2);J.set(X,(J.get(X)??0)+1)}return J}let normalizedLicenses;function getNormalizedLicenses(){return normalizedLicenses??=Object.entries(import_full.default).map(([L,J])=>{let Y=normalizeText(J.licenseText);return{bigramsMap:computeBigrams(Y),normalized:Y,spdxId:L,totalBigrams:Y.length-1}}),normalizedLicenses}function diceCoefficientCached(L,J,Y,X){let Z=0;for(let[J,X]of L){let L=Y.get(J);L!==void 0&&(Z+=Math.min(X,L))}return 2*Z/(J+X)}const HEADER_PATTERNS=[{pattern:/gnu lesser general public license\s+version 3/i,spdxId:`LGPL-3.0-only`},{pattern:/gnu lesser general public license\s+version 2\.1/i,spdxId:`LGPL-2.1-only`},{pattern:/gnu lesser general public license\s+version 2(?:\.0)?(?!\.\d)/i,spdxId:`LGPL-2.0-only`},{pattern:/gnu affero general public license\s+version 3/i,spdxId:`AGPL-3.0-only`}];function identifyByHeader(L){let J=L.slice(0,500);for(let{pattern:L,spdxId:Y}of HEADER_PATTERNS)if(L.test(J))return{confidence:1,spdxId:Y}}const licenseFileSource=defineSource({async discover(L){return getMatches(L.options,[`{,un}licen{c,s}e{,.*}`,`copying{,.lesser}{,.*}`])},key:`licenseFile`,async parse(L,J){let Y=identifyLicense(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y)return{data:{confidence:Y.confidence,spdxId:Y.spdxId},source:L}},phase:1}),metadataSchema=object({description:nonEmptyString,homepage:optionalUrl,keywords:stringArray,repository:optionalUrl});function parse$17(L,J){let Y;if(J===`json`)Y=parseJsonRecord(L);else try{let J=(0,import_dist.parse)(L);Y=is.plainObject(J)?J:void 0}catch{return}if(Y===void 0)return;let X=isString(Y.repository)?normalizeRepoUrl(Y.repository):void 0,Z=nonEmpty$3(Y.homepage)??nonEmpty$3(Y.url)??X??nonEmpty$3(Y.website),Q=parseKeywords(Y.keywords)??parseKeywords(Y.tags)??parseKeywords(Y.topics)??[];return metadataSchema.parse({description:Y.description,homepage:Z,keywords:Q,repository:X})}function nonEmpty$3(L){if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0}function isString(L){return typeof L==`string`}function normalizeRepoUrl(L){let J=L;return J.startsWith(`git+`)&&(J=J.slice(4)),J.endsWith(`.git`)&&(J=J.slice(0,-4)),J}function parseKeywords(L){if(typeof L==`string`){let J=L.split(`,`).map(L=>L.trim()).filter(Boolean);return J.length>0?J:void 0}if(Array.isArray(L)){let J=L.filter(L=>typeof L==`string`);return J.length>0?J:void 0}}function getFormat(L){if(L.endsWith(`.json`))return`json`;if(L.endsWith(`.yaml`)||L.endsWith(`.yml`))return`yaml`}const metadataFileSource=defineSource({async discover(L){return getMatches(L.options,[`metadata.json`,`metadata.yaml`,`metadata.yml`])},key:`metadataFile`,async parse(L,J){let Y=getFormat(L);if(Y!==void 0){let X=parse$17(await readFile(resolve$1(J.options.path,L),`utf8`),Y);if(X!==void 0)return{data:X,source:L}}},phase:1}),metascopeSource=defineSource({async discover(L){return[L.options.path]},key:`metascope`,async parse(L,J){let{absolute:Y,offline:X,path:Z,recursive:Q,respectIgnored:$,templateData:ee,workspaces:te}=J.options;return{data:{durationMs:0,options:{absolute:Y,offline:X,path:formatPath(Z,Z,Y),recursive:Q,respectIgnored:$,templateData:ee,workspaces:te},scannedAt:new Date().toISOString(),version:version$1,workspaceDirectories:getWorkspaces(Z,te).map(L=>formatPath(L,Z,Y))},source:L}},phase:1});var HTTPError=class extends Error{response;request;options;constructor(L,J,Y){let X=`${L.status||L.status===0?L.status:``} ${L.statusText??``}`.trim(),Z=X?`status code ${X}`:`an unknown error`;super(`Request failed with ${Z}: ${J.method} ${J.url}`),this.name=`HTTPError`,this.response=L,this.request=J,this.options=Y}},NonError=class extends Error{name=`NonError`;value;constructor(L){let J=`Non-error value was thrown`;try{typeof L==`string`?J=L:L&&typeof L==`object`&&`message`in L&&typeof L.message==`string`&&(J=L.message)}catch{}super(J),this.value=L}},ForceRetryError=class extends Error{name=`ForceRetryError`;customDelay;code;customRequest;constructor(L){let J=L?.cause?L.cause instanceof Error?L.cause:new NonError(L.cause):void 0;super(L?.code?`Forced retry: ${L.code}`:`Forced retry`,J?{cause:J}:void 0),this.customDelay=L?.delay,this.code=L?.code,this.customRequest=L?.request}};const supportsRequestStreams=(()=>{let L=!1,J=!1,Y=typeof globalThis.ReadableStream==`function`,X=typeof globalThis.Request==`function`;if(Y&&X)try{J=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return L=!0,`half`}}).headers.has(`Content-Type`)}catch(L){if(L instanceof Error&&L.message===`unsupported BodyInit type`)return!1;throw L}return L&&!J})(),supportsAbortController=typeof globalThis.AbortController==`function`,supportsAbortSignal=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,supportsResponseStreams=typeof globalThis.ReadableStream==`function`,supportsFormData=typeof globalThis.FormData==`function`,requestMethods=[`get`,`post`,`put`,`patch`,`head`,`delete`],validate=()=>void 0,responseTypes={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},maxSafeTimeout=2147483647,usualFormBoundarySize=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,stop=Symbol(`stop`);var RetryMarker=class{options;constructor(L){this.options=L}};const retry=L=>new RetryMarker(L),kyOptionKeys={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},vendorSpecificOptions={next:!0},requestOptionsRegistry={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},getBodySize=L=>{if(!L)return 0;if(L instanceof FormData){let J=0;for(let[Y,X]of L)J+=usualFormBoundarySize,J+=new TextEncoder().encode(`Content-Disposition: form-data; name="${Y}"`).length,J+=typeof X==`string`?new TextEncoder().encode(X).length:X.size;return J}if(L instanceof Blob)return L.size;if(L instanceof ArrayBuffer)return L.byteLength;if(typeof L==`string`)return new TextEncoder().encode(L).length;if(L instanceof URLSearchParams)return new TextEncoder().encode(L.toString()).length;if(`byteLength`in L)return L.byteLength;if(typeof L==`object`&&L)try{let J=JSON.stringify(L);return new TextEncoder().encode(J).length}catch{return 0}return 0},withProgress=(L,J,Y)=>{let X,Z=0;return L.pipeThrough(new TransformStream({transform(L,Q){if(Q.enqueue(L),X){Z+=X.byteLength;let L=J===0?0:Z/J;L>=1&&(L=1-2**-52),Y?.({percent:L,totalBytes:Math.max(J,Z),transferredBytes:Z},X)}X=L},flush(){X&&(Z+=X.byteLength,Y?.({percent:1,totalBytes:Math.max(J,Z),transferredBytes:Z},X))}}))},streamResponse=(L,J)=>{if(!L.body)return L;if(L.status===204)return new Response(null,{status:L.status,statusText:L.statusText,headers:L.headers});let Y=Math.max(0,Number(L.headers.get(`content-length`))||0);return new Response(withProgress(L.body,Y,J),{status:L.status,statusText:L.statusText,headers:L.headers})},streamRequest=(L,J,Y)=>{if(!L.body)return L;let X=getBodySize(Y??L.body);return new Request(L,{duplex:`half`,body:withProgress(L.body,X,J)})},isObject=L=>typeof L==`object`&&!!L,validateAndMerge=(...L)=>{for(let J of L)if((!isObject(J)||Array.isArray(J))&&J!==void 0)throw TypeError("The `options` argument must be an object");return deepMerge({},...L)},mergeHeaders=(L={},J={})=>{let Y=new globalThis.Headers(L),X=J instanceof globalThis.Headers,Z=new globalThis.Headers(J);for(let[L,J]of Z.entries())X&&J===`undefined`||J===void 0?Y.delete(L):Y.set(L,J);return Y};function newHookValue(L,J,Y){return Object.hasOwn(J,Y)&&J[Y]===void 0?[]:deepMerge(L[Y]??[],J[Y]??[])}const mergeHooks=(L={},J={})=>({beforeRequest:newHookValue(L,J,`beforeRequest`),beforeRetry:newHookValue(L,J,`beforeRetry`),afterResponse:newHookValue(L,J,`afterResponse`),beforeError:newHookValue(L,J,`beforeError`)}),appendSearchParameters=(L,J)=>{let Y=new URLSearchParams;for(let X of[L,J])if(X!==void 0)if(X instanceof URLSearchParams)for(let[L,J]of X.entries())Y.append(L,J);else if(Array.isArray(X))for(let L of X){if(!Array.isArray(L)||L.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);Y.append(String(L[0]),String(L[1]))}else if(isObject(X))for(let[L,J]of Object.entries(X))J!==void 0&&Y.append(L,String(J));else{let L=new URLSearchParams(X);for(let[J,X]of L.entries())Y.append(J,X)}return Y},deepMerge=(...L)=>{let J={},Y={},X={},Z,Q=[];for(let $ of L)if(Array.isArray($))Array.isArray(J)||(J=[]),J=[...J,...$];else if(isObject($)){for(let[L,Y]of Object.entries($)){if(L===`signal`&&Y instanceof globalThis.AbortSignal){Q.push(Y);continue}if(L===`context`){if(Y!=null&&(!isObject(Y)||Array.isArray(Y)))throw TypeError("The `context` option must be an object");J={...J,context:Y==null?{}:{...J.context,...Y}};continue}if(L===`searchParams`){Z=Y==null?void 0:Z===void 0?Y:appendSearchParameters(Z,Y);continue}isObject(Y)&&L in J&&(Y=deepMerge(J[L],Y)),J={...J,[L]:Y}}isObject($.hooks)&&(X=mergeHooks(X,$.hooks),J.hooks=X),isObject($.headers)&&(Y=mergeHeaders(Y,$.headers),J.headers=Y)}return Z!==void 0&&(J.searchParams=Z),Q.length>0&&(Q.length===1?J.signal=Q[0]:supportsAbortSignal?J.signal=AbortSignal.any(Q):J.signal=Q.at(-1)),J},normalizeRequestMethod=L=>requestMethods.includes(L)?L.toUpperCase():L,defaultRetryOptions={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:L=>.3*2**(L-1)*1e3,jitter:void 0,retryOnTimeout:!1},normalizeRetryOptions=(L={})=>{if(typeof L==`number`)return{...defaultRetryOptions,limit:L};if(L.methods&&!Array.isArray(L.methods))throw Error(`retry.methods must be an array`);if(L.methods&&=L.methods.map(L=>L.toLowerCase()),L.statusCodes&&!Array.isArray(L.statusCodes))throw Error(`retry.statusCodes must be an array`);let J=Object.fromEntries(Object.entries(L).filter(([,L])=>L!==void 0));return{...defaultRetryOptions,...J}};var TimeoutError=class extends Error{request;constructor(L){super(`Request timed out: ${L.method} ${L.url}`),this.name=`TimeoutError`,this.request=L}};async function timeout(L,J,Y,X){return new Promise((Z,Q)=>{let $=setTimeout(()=>{Y&&Y.abort(),Q(new TimeoutError(L))},X.timeout);X.fetch(L,J).then(Z).catch(Q).then(()=>{clearTimeout($)})})}async function delay(L,{signal:J}){return new Promise((Y,X)=>{J&&(J.throwIfAborted(),J.addEventListener(`abort`,Z,{once:!0}));function Z(){clearTimeout(Q),X(J.reason)}let Q=setTimeout(()=>{J?.removeEventListener(`abort`,Z),Y()},L)})}const findUnknownOptions=(L,J)=>{let Y={};for(let X in J)Object.hasOwn(J,X)&&!(X in requestOptionsRegistry)&&!(X in kyOptionKeys)&&(!(X in L)||X in vendorSpecificOptions)&&(Y[X]=J[X]);return Y},hasSearchParameters=L=>L===void 0?!1:Array.isArray(L)?L.length>0:L instanceof URLSearchParams?L.size>0:typeof L==`object`?Object.keys(L).length>0:typeof L==`string`?L.trim().length>0:!!L;function isHTTPError(L){return L instanceof HTTPError||L?.name===HTTPError.name}function isTimeoutError(L){return L instanceof TimeoutError||L?.name===TimeoutError.name}var Ky=class L{static create(J,Y){let X=new L(J,Y),Z=X.#p(async()=>{if(typeof X.#i.timeout==`number`&&X.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${maxSafeTimeout}`);await Promise.resolve();let L=await X.#m();for(let J of X.#i.hooks.afterResponse){let Y=X.#u(L.clone()),Z;try{Z=await J(X.request,X.#h(),Y,{retryCount:X.#n})}catch(J){throw X.#f(Y),X.#f(L),J}if(Z instanceof RetryMarker)throw X.#f(Y),X.#f(L),new ForceRetryError(Z.options);let Q=Z instanceof globalThis.Response?Z:L;Y!==Q&&X.#f(Y),L!==Q&&X.#f(L),L=Q}if(X.#u(L),!L.ok&&(typeof X.#i.throwHttpErrors==`function`?X.#i.throwHttpErrors(L.status):X.#i.throwHttpErrors)){let J=new HTTPError(L,X.request,X.#h());for(let L of X.#i.hooks.beforeError)J=await L(J,{retryCount:X.#n});throw J}if(X.#i.onDownloadProgress){if(typeof X.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!supportsResponseStreams)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let J=L.clone();return X.#f(L),streamResponse(J,X.#i.onDownloadProgress)}return L}).finally(()=>{let L=X.#a;X.#d(L?.body??void 0),X.#d(X.request.body??void 0)});for(let[L,J]of Object.entries(responseTypes))L===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(Z[L]=async()=>{X.request.headers.set(`accept`,X.request.headers.get(`accept`)||J);let Q=await Z;if(L===`json`){if(Q.status===204)return``;let L=await Q.text();return L===``?``:Y.parseJson?Y.parseJson(L):JSON.parse(L)}return Q[L]()});return Z}static#e(L){return L&&typeof L==`object`&&!Array.isArray(L)&&!(L instanceof URLSearchParams)?Object.fromEntries(Object.entries(L).filter(([,L])=>L!==void 0)):L}request;#t;#n=0;#r;#i;#a;#o;#s;constructor(J,Y={}){if(this.#r=J,this.#i={...Y,headers:mergeHeaders(this.#r.headers,Y.headers),hooks:mergeHooks({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},Y.hooks),method:normalizeRequestMethod(Y.method??this.#r.method??`GET`),prefixUrl:String(Y.prefixUrl||``),retry:normalizeRetryOptions(Y.retry),throwHttpErrors:Y.throwHttpErrors??!0,timeout:Y.timeout??1e4,fetch:Y.fetch??globalThis.fetch.bind(globalThis),context:Y.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this.#i.prefixUrl&&typeof this.#r==`string`){if(this.#r.startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#i.prefixUrl.endsWith(`/`)||(this.#i.prefixUrl+=`/`),this.#r=this.#i.prefixUrl+this.#r}supportsAbortController&&supportsAbortSignal&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal),supportsRequestStreams&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let X=Y.headers&&new globalThis.Headers(Y.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(supportsFormData&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!X&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),hasSearchParameters(this.#i.searchParams)){let J=`?`+(typeof this.#i.searchParams==`string`?this.#i.searchParams.replace(/^\?/,``):new URLSearchParams(L.#e(this.#i.searchParams)).toString()),Y=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,J);this.request=new globalThis.Request(Y,this.#i)}if(this.#i.onUploadProgress){if(typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!supportsRequestStreams)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#_(this.request,this.#i.body??void 0)}}#c(){let L=this.#i.retry.delay(this.#n),J=L;this.#i.retry.jitter===!0?J=Math.random()*L:typeof this.#i.retry.jitter==`function`&&(J=this.#i.retry.jitter(L),(!Number.isFinite(J)||J<0)&&(J=L));let Y=this.#i.retry.backoffLimit??1/0;return Math.min(Y,J)}async#l(L){if(this.#n++,this.#n>this.#i.retry.limit)throw L;let J=L instanceof Error?L:new NonError(L);if(J instanceof ForceRetryError)return J.customDelay??this.#c();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw L;if(this.#i.retry.shouldRetry!==void 0){let Y=await this.#i.retry.shouldRetry({error:J,retryCount:this.#n});if(Y===!1)throw L;if(Y===!0)return this.#c()}if(isTimeoutError(L)&&!this.#i.retry.retryOnTimeout)throw L;if(isHTTPError(L)){if(!this.#i.retry.statusCodes.includes(L.response.status))throw L;let J=L.response.headers.get(`Retry-After`)??L.response.headers.get(`RateLimit-Reset`)??L.response.headers.get(`X-RateLimit-Retry-After`)??L.response.headers.get(`X-RateLimit-Reset`)??L.response.headers.get(`X-Rate-Limit-Reset`);if(J&&this.#i.retry.afterStatusCodes.includes(L.response.status)){let L=Number(J)*1e3;Number.isNaN(L)?L=Date.parse(J)-Date.now():L>=Date.parse(`2024-01-01`)&&(L-=Date.now());let Y=this.#i.retry.maxRetryAfter??L;return L<Y?L:Y}if(L.response.status===413)throw L}return this.#c()}#u(L){return this.#i.parseJson&&(L.json=async()=>this.#i.parseJson(await L.text())),L}#d(L){L&&L.cancel().catch(()=>void 0)}#f(L){this.#d(L.body??void 0)}async#p(L){try{return await L()}catch(J){let Y=Math.min(await this.#l(J),maxSafeTimeout);if(this.#n<1)throw J;if(await delay(Y,this.#o?{signal:this.#o}:{}),J instanceof ForceRetryError&&J.customRequest){let L=this.#i.signal?new globalThis.Request(J.customRequest,{signal:this.#i.signal}):new globalThis.Request(J.customRequest);this.#g(L)}for(let L of this.#i.hooks.beforeRetry){let Y=await L({request:this.request,options:this.#h(),error:J,retryCount:this.#n});if(Y instanceof globalThis.Request){this.#g(Y);break}if(Y instanceof globalThis.Response)return Y;if(Y===stop)return}return this.#p(L)}}async#m(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal,this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));for(let L of this.#i.hooks.beforeRequest){let J=await L(this.request,this.#h(),{retryCount:this.#n});if(J instanceof Response)return J;if(J instanceof globalThis.Request){this.#g(J);break}}let L=findUnknownOptions(this.request,this.#i);return this.#a=this.request,this.request=this.#a.clone(),this.#i.timeout===!1?this.#i.fetch(this.#a,L):timeout(this.#a,L,this.#t,this.#i)}#h(){if(!this.#s){let{hooks:L,...J}=this.#i;this.#s=Object.freeze(J)}return this.#s}#g(L){this.#s=void 0,this.request=this.#_(L)}#_(L,J){return!this.#i.onUploadProgress||!L.body?L:streamRequest(L,this.#i.onUploadProgress,J??this.#i.body??void 0)}};
45582
+ (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.`}}})),require_full=__commonJSMin(((L,J)=>{J.exports=require_spdx_full()})),import_full=__toESM(require_full(),1);const CONFIDENCE_THRESHOLD=.75;function identifyLicense(L){let J=identifyByHeader(L);if(J)return J;let Y=normalizeInput(L);if(Y.length<2)return;let X=computeBigrams(Y),Z=Y.length-1,Q,$=0;for(let{bigramsMap:L,normalized:J,spdxId:ee,totalBigrams:te}of getNormalizedLicenses()){if(Y===J)return{confidence:1,spdxId:ee};let ne=diceCoefficientCached(X,Z,L,te);ne>$&&($=ne,Q={confidence:ne,spdxId:ee})}if(Q&&Q.confidence>=CONFIDENCE_THRESHOLD)return Q}function stripFrontMatter(L){if(L.startsWith(`---`)){let J=L.indexOf(`---`,3);if(J!==-1)return L.slice(J+3)}return L}function normalizeText(L){return L.replaceAll(/^#+\s+/gm,``).replaceAll(/^copyright.*$/gim,``).replaceAll(/^\|.*\|$/gm,``).replaceAll(/^[-|:\s]+$/gm,``).replaceAll(/https?:\/\/\S+/g,``).replaceAll(/\S+@\S+/g,``).replaceAll(/[[\]()]/g,` `).replaceAll(/\s+/g,` `).trim().toLowerCase()}function normalizeInput(L){return normalizeText(stripFrontMatter(L))}function computeBigrams(L){let J=new Map;for(let Y=0;Y<L.length-1;Y++){let X=L.slice(Y,Y+2);J.set(X,(J.get(X)??0)+1)}return J}let normalizedLicenses;function getNormalizedLicenses(){return normalizedLicenses??=Object.entries(import_full.default).map(([L,J])=>{let Y=normalizeText(J.licenseText);return{bigramsMap:computeBigrams(Y),normalized:Y,spdxId:L,totalBigrams:Y.length-1}}),normalizedLicenses}function diceCoefficientCached(L,J,Y,X){let Z=0;for(let[J,X]of L){let L=Y.get(J);L!==void 0&&(Z+=Math.min(X,L))}return 2*Z/(J+X)}const HEADER_PATTERNS=[{pattern:/gnu lesser general public license\s+version 3/i,spdxId:`LGPL-3.0-only`},{pattern:/gnu lesser general public license\s+version 2\.1/i,spdxId:`LGPL-2.1-only`},{pattern:/gnu lesser general public license\s+version 2(?:\.0)?(?!\.\d)/i,spdxId:`LGPL-2.0-only`},{pattern:/gnu affero general public license\s+version 3/i,spdxId:`AGPL-3.0-only`}];function identifyByHeader(L){let J=L.slice(0,500);for(let{pattern:L,spdxId:Y}of HEADER_PATTERNS)if(L.test(J))return{confidence:1,spdxId:Y}}const licenseFileSource=defineSource({async discover(L){return getMatches(L.options,[`{,un}licen{c,s}e{,.*}`,`copying{,.lesser}{,.*}`])},key:`licenseFile`,async parse(L,J){let Y=identifyLicense(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y)return{data:{confidence:Y.confidence,spdxId:Y.spdxId},source:L}},phase:1}),metadataSchema=object({description:nonEmptyString,homepage:optionalUrl,keywords:stringArray,repository:optionalUrl});function parse$17(L,J){let Y;if(J===`json`)Y=parseJsonRecord(L);else try{let J=(0,import_dist.parse)(L);Y=is.plainObject(J)?J:void 0}catch{return}if(Y===void 0)return;let X=isString(Y.repository)?normalizeRepoUrl(Y.repository):void 0,Z=nonEmpty$3(Y.homepage)??nonEmpty$3(Y.url)??X??nonEmpty$3(Y.website),Q=parseKeywords(Y.keywords)??parseKeywords(Y.tags)??parseKeywords(Y.topics)??[];return metadataSchema.parse({description:Y.description,homepage:Z,keywords:Q,repository:X})}function nonEmpty$3(L){if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0}function isString(L){return typeof L==`string`}function normalizeRepoUrl(L){let J=L;return J.startsWith(`git+`)&&(J=J.slice(4)),J.endsWith(`.git`)&&(J=J.slice(0,-4)),J}function parseKeywords(L){if(typeof L==`string`){let J=splitCommaSeparated(L);return J.length>0?J:void 0}if(Array.isArray(L)){let J=L.filter(L=>typeof L==`string`);return J.length>0?J:void 0}}function getFormat(L){if(L.endsWith(`.json`))return`json`;if(L.endsWith(`.yaml`)||L.endsWith(`.yml`))return`yaml`}const metadataFileSource=defineSource({async discover(L){return getMatches(L.options,[`metadata.json`,`metadata.yaml`,`metadata.yml`])},key:`metadataFile`,async parse(L,J){let Y=getFormat(L);if(Y!==void 0){let X=parse$17(await readFile(resolve$1(J.options.path,L),`utf8`),Y);if(X!==void 0)return{data:X,source:L}}},phase:1}),metascopeSource=defineSource({async discover(L){return[L.options.path]},key:`metascope`,async parse(L,J){let{absolute:Y,offline:X,path:Z,recursive:Q,respectIgnored:$,templateData:ee,workspaces:te}=J.options;return{data:{durationMs:0,options:{absolute:Y,offline:X,path:formatPath(Z,Z,Y),recursive:Q,respectIgnored:$,templateData:ee,workspaces:te},scannedAt:new Date().toISOString(),version:version$1,workspaceDirectories:getWorkspaces(Z,te).map(L=>formatPath(L,Z,Y))},source:L}},phase:1});var HTTPError=class extends Error{response;request;options;constructor(L,J,Y){let X=`${L.status||L.status===0?L.status:``} ${L.statusText??``}`.trim(),Z=X?`status code ${X}`:`an unknown error`;super(`Request failed with ${Z}: ${J.method} ${J.url}`),this.name=`HTTPError`,this.response=L,this.request=J,this.options=Y}},NonError=class extends Error{name=`NonError`;value;constructor(L){let J=`Non-error value was thrown`;try{typeof L==`string`?J=L:L&&typeof L==`object`&&`message`in L&&typeof L.message==`string`&&(J=L.message)}catch{}super(J),this.value=L}},ForceRetryError=class extends Error{name=`ForceRetryError`;customDelay;code;customRequest;constructor(L){let J=L?.cause?L.cause instanceof Error?L.cause:new NonError(L.cause):void 0;super(L?.code?`Forced retry: ${L.code}`:`Forced retry`,J?{cause:J}:void 0),this.customDelay=L?.delay,this.code=L?.code,this.customRequest=L?.request}};const supportsRequestStreams=(()=>{let L=!1,J=!1,Y=typeof globalThis.ReadableStream==`function`,X=typeof globalThis.Request==`function`;if(Y&&X)try{J=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return L=!0,`half`}}).headers.has(`Content-Type`)}catch(L){if(L instanceof Error&&L.message===`unsupported BodyInit type`)return!1;throw L}return L&&!J})(),supportsAbortController=typeof globalThis.AbortController==`function`,supportsAbortSignal=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,supportsResponseStreams=typeof globalThis.ReadableStream==`function`,supportsFormData=typeof globalThis.FormData==`function`,requestMethods=[`get`,`post`,`put`,`patch`,`head`,`delete`],validate=()=>void 0,responseTypes={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},maxSafeTimeout=2147483647,usualFormBoundarySize=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,stop=Symbol(`stop`);var RetryMarker=class{options;constructor(L){this.options=L}};const retry=L=>new RetryMarker(L),kyOptionKeys={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},vendorSpecificOptions={next:!0},requestOptionsRegistry={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},getBodySize=L=>{if(!L)return 0;if(L instanceof FormData){let J=0;for(let[Y,X]of L)J+=usualFormBoundarySize,J+=new TextEncoder().encode(`Content-Disposition: form-data; name="${Y}"`).length,J+=typeof X==`string`?new TextEncoder().encode(X).length:X.size;return J}if(L instanceof Blob)return L.size;if(L instanceof ArrayBuffer)return L.byteLength;if(typeof L==`string`)return new TextEncoder().encode(L).length;if(L instanceof URLSearchParams)return new TextEncoder().encode(L.toString()).length;if(`byteLength`in L)return L.byteLength;if(typeof L==`object`&&L)try{let J=JSON.stringify(L);return new TextEncoder().encode(J).length}catch{return 0}return 0},withProgress=(L,J,Y)=>{let X,Z=0;return L.pipeThrough(new TransformStream({transform(L,Q){if(Q.enqueue(L),X){Z+=X.byteLength;let L=J===0?0:Z/J;L>=1&&(L=1-2**-52),Y?.({percent:L,totalBytes:Math.max(J,Z),transferredBytes:Z},X)}X=L},flush(){X&&(Z+=X.byteLength,Y?.({percent:1,totalBytes:Math.max(J,Z),transferredBytes:Z},X))}}))},streamResponse=(L,J)=>{if(!L.body)return L;if(L.status===204)return new Response(null,{status:L.status,statusText:L.statusText,headers:L.headers});let Y=Math.max(0,Number(L.headers.get(`content-length`))||0);return new Response(withProgress(L.body,Y,J),{status:L.status,statusText:L.statusText,headers:L.headers})},streamRequest=(L,J,Y)=>{if(!L.body)return L;let X=getBodySize(Y??L.body);return new Request(L,{duplex:`half`,body:withProgress(L.body,X,J)})},isObject=L=>typeof L==`object`&&!!L,validateAndMerge=(...L)=>{for(let J of L)if((!isObject(J)||Array.isArray(J))&&J!==void 0)throw TypeError("The `options` argument must be an object");return deepMerge({},...L)},mergeHeaders=(L={},J={})=>{let Y=new globalThis.Headers(L),X=J instanceof globalThis.Headers,Z=new globalThis.Headers(J);for(let[L,J]of Z.entries())X&&J===`undefined`||J===void 0?Y.delete(L):Y.set(L,J);return Y};function newHookValue(L,J,Y){return Object.hasOwn(J,Y)&&J[Y]===void 0?[]:deepMerge(L[Y]??[],J[Y]??[])}const mergeHooks=(L={},J={})=>({beforeRequest:newHookValue(L,J,`beforeRequest`),beforeRetry:newHookValue(L,J,`beforeRetry`),afterResponse:newHookValue(L,J,`afterResponse`),beforeError:newHookValue(L,J,`beforeError`)}),appendSearchParameters=(L,J)=>{let Y=new URLSearchParams;for(let X of[L,J])if(X!==void 0)if(X instanceof URLSearchParams)for(let[L,J]of X.entries())Y.append(L,J);else if(Array.isArray(X))for(let L of X){if(!Array.isArray(L)||L.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);Y.append(String(L[0]),String(L[1]))}else if(isObject(X))for(let[L,J]of Object.entries(X))J!==void 0&&Y.append(L,String(J));else{let L=new URLSearchParams(X);for(let[J,X]of L.entries())Y.append(J,X)}return Y},deepMerge=(...L)=>{let J={},Y={},X={},Z,Q=[];for(let $ of L)if(Array.isArray($))Array.isArray(J)||(J=[]),J=[...J,...$];else if(isObject($)){for(let[L,Y]of Object.entries($)){if(L===`signal`&&Y instanceof globalThis.AbortSignal){Q.push(Y);continue}if(L===`context`){if(Y!=null&&(!isObject(Y)||Array.isArray(Y)))throw TypeError("The `context` option must be an object");J={...J,context:Y==null?{}:{...J.context,...Y}};continue}if(L===`searchParams`){Z=Y==null?void 0:Z===void 0?Y:appendSearchParameters(Z,Y);continue}isObject(Y)&&L in J&&(Y=deepMerge(J[L],Y)),J={...J,[L]:Y}}isObject($.hooks)&&(X=mergeHooks(X,$.hooks),J.hooks=X),isObject($.headers)&&(Y=mergeHeaders(Y,$.headers),J.headers=Y)}return Z!==void 0&&(J.searchParams=Z),Q.length>0&&(Q.length===1?J.signal=Q[0]:supportsAbortSignal?J.signal=AbortSignal.any(Q):J.signal=Q.at(-1)),J},normalizeRequestMethod=L=>requestMethods.includes(L)?L.toUpperCase():L,defaultRetryOptions={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:L=>.3*2**(L-1)*1e3,jitter:void 0,retryOnTimeout:!1},normalizeRetryOptions=(L={})=>{if(typeof L==`number`)return{...defaultRetryOptions,limit:L};if(L.methods&&!Array.isArray(L.methods))throw Error(`retry.methods must be an array`);if(L.methods&&=L.methods.map(L=>L.toLowerCase()),L.statusCodes&&!Array.isArray(L.statusCodes))throw Error(`retry.statusCodes must be an array`);let J=Object.fromEntries(Object.entries(L).filter(([,L])=>L!==void 0));return{...defaultRetryOptions,...J}};var TimeoutError=class extends Error{request;constructor(L){super(`Request timed out: ${L.method} ${L.url}`),this.name=`TimeoutError`,this.request=L}};async function timeout(L,J,Y,X){return new Promise((Z,Q)=>{let $=setTimeout(()=>{Y&&Y.abort(),Q(new TimeoutError(L))},X.timeout);X.fetch(L,J).then(Z).catch(Q).then(()=>{clearTimeout($)})})}async function delay(L,{signal:J}){return new Promise((Y,X)=>{J&&(J.throwIfAborted(),J.addEventListener(`abort`,Z,{once:!0}));function Z(){clearTimeout(Q),X(J.reason)}let Q=setTimeout(()=>{J?.removeEventListener(`abort`,Z),Y()},L)})}const findUnknownOptions=(L,J)=>{let Y={};for(let X in J)Object.hasOwn(J,X)&&!(X in requestOptionsRegistry)&&!(X in kyOptionKeys)&&(!(X in L)||X in vendorSpecificOptions)&&(Y[X]=J[X]);return Y},hasSearchParameters=L=>L===void 0?!1:Array.isArray(L)?L.length>0:L instanceof URLSearchParams?L.size>0:typeof L==`object`?Object.keys(L).length>0:typeof L==`string`?L.trim().length>0:!!L;function isHTTPError(L){return L instanceof HTTPError||L?.name===HTTPError.name}function isTimeoutError(L){return L instanceof TimeoutError||L?.name===TimeoutError.name}var Ky=class L{static create(J,Y){let X=new L(J,Y),Z=X.#p(async()=>{if(typeof X.#i.timeout==`number`&&X.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${maxSafeTimeout}`);await Promise.resolve();let L=await X.#m();for(let J of X.#i.hooks.afterResponse){let Y=X.#u(L.clone()),Z;try{Z=await J(X.request,X.#h(),Y,{retryCount:X.#n})}catch(J){throw X.#f(Y),X.#f(L),J}if(Z instanceof RetryMarker)throw X.#f(Y),X.#f(L),new ForceRetryError(Z.options);let Q=Z instanceof globalThis.Response?Z:L;Y!==Q&&X.#f(Y),L!==Q&&X.#f(L),L=Q}if(X.#u(L),!L.ok&&(typeof X.#i.throwHttpErrors==`function`?X.#i.throwHttpErrors(L.status):X.#i.throwHttpErrors)){let J=new HTTPError(L,X.request,X.#h());for(let L of X.#i.hooks.beforeError)J=await L(J,{retryCount:X.#n});throw J}if(X.#i.onDownloadProgress){if(typeof X.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!supportsResponseStreams)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let J=L.clone();return X.#f(L),streamResponse(J,X.#i.onDownloadProgress)}return L}).finally(()=>{let L=X.#a;X.#d(L?.body??void 0),X.#d(X.request.body??void 0)});for(let[L,J]of Object.entries(responseTypes))L===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(Z[L]=async()=>{X.request.headers.set(`accept`,X.request.headers.get(`accept`)||J);let Q=await Z;if(L===`json`){if(Q.status===204)return``;let L=await Q.text();return L===``?``:Y.parseJson?Y.parseJson(L):JSON.parse(L)}return Q[L]()});return Z}static#e(L){return L&&typeof L==`object`&&!Array.isArray(L)&&!(L instanceof URLSearchParams)?Object.fromEntries(Object.entries(L).filter(([,L])=>L!==void 0)):L}request;#t;#n=0;#r;#i;#a;#o;#s;constructor(J,Y={}){if(this.#r=J,this.#i={...Y,headers:mergeHeaders(this.#r.headers,Y.headers),hooks:mergeHooks({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},Y.hooks),method:normalizeRequestMethod(Y.method??this.#r.method??`GET`),prefixUrl:String(Y.prefixUrl||``),retry:normalizeRetryOptions(Y.retry),throwHttpErrors:Y.throwHttpErrors??!0,timeout:Y.timeout??1e4,fetch:Y.fetch??globalThis.fetch.bind(globalThis),context:Y.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this.#i.prefixUrl&&typeof this.#r==`string`){if(this.#r.startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#i.prefixUrl.endsWith(`/`)||(this.#i.prefixUrl+=`/`),this.#r=this.#i.prefixUrl+this.#r}supportsAbortController&&supportsAbortSignal&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal),supportsRequestStreams&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let X=Y.headers&&new globalThis.Headers(Y.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(supportsFormData&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!X&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),hasSearchParameters(this.#i.searchParams)){let J=`?`+(typeof this.#i.searchParams==`string`?this.#i.searchParams.replace(/^\?/,``):new URLSearchParams(L.#e(this.#i.searchParams)).toString()),Y=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,J);this.request=new globalThis.Request(Y,this.#i)}if(this.#i.onUploadProgress){if(typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!supportsRequestStreams)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#_(this.request,this.#i.body??void 0)}}#c(){let L=this.#i.retry.delay(this.#n),J=L;this.#i.retry.jitter===!0?J=Math.random()*L:typeof this.#i.retry.jitter==`function`&&(J=this.#i.retry.jitter(L),(!Number.isFinite(J)||J<0)&&(J=L));let Y=this.#i.retry.backoffLimit??1/0;return Math.min(Y,J)}async#l(L){if(this.#n++,this.#n>this.#i.retry.limit)throw L;let J=L instanceof Error?L:new NonError(L);if(J instanceof ForceRetryError)return J.customDelay??this.#c();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw L;if(this.#i.retry.shouldRetry!==void 0){let Y=await this.#i.retry.shouldRetry({error:J,retryCount:this.#n});if(Y===!1)throw L;if(Y===!0)return this.#c()}if(isTimeoutError(L)&&!this.#i.retry.retryOnTimeout)throw L;if(isHTTPError(L)){if(!this.#i.retry.statusCodes.includes(L.response.status))throw L;let J=L.response.headers.get(`Retry-After`)??L.response.headers.get(`RateLimit-Reset`)??L.response.headers.get(`X-RateLimit-Retry-After`)??L.response.headers.get(`X-RateLimit-Reset`)??L.response.headers.get(`X-Rate-Limit-Reset`);if(J&&this.#i.retry.afterStatusCodes.includes(L.response.status)){let L=Number(J)*1e3;Number.isNaN(L)?L=Date.parse(J)-Date.now():L>=Date.parse(`2024-01-01`)&&(L-=Date.now());let Y=this.#i.retry.maxRetryAfter??L;return L<Y?L:Y}if(L.response.status===413)throw L}return this.#c()}#u(L){return this.#i.parseJson&&(L.json=async()=>this.#i.parseJson(await L.text())),L}#d(L){L&&L.cancel().catch(()=>void 0)}#f(L){this.#d(L.body??void 0)}async#p(L){try{return await L()}catch(J){let Y=Math.min(await this.#l(J),maxSafeTimeout);if(this.#n<1)throw J;if(await delay(Y,this.#o?{signal:this.#o}:{}),J instanceof ForceRetryError&&J.customRequest){let L=this.#i.signal?new globalThis.Request(J.customRequest,{signal:this.#i.signal}):new globalThis.Request(J.customRequest);this.#g(L)}for(let L of this.#i.hooks.beforeRetry){let Y=await L({request:this.request,options:this.#h(),error:J,retryCount:this.#n});if(Y instanceof globalThis.Request){this.#g(Y);break}if(Y instanceof globalThis.Response)return Y;if(Y===stop)return}return this.#p(L)}}async#m(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal,this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));for(let L of this.#i.hooks.beforeRequest){let J=await L(this.request,this.#h(),{retryCount:this.#n});if(J instanceof Response)return J;if(J instanceof globalThis.Request){this.#g(J);break}}let L=findUnknownOptions(this.request,this.#i);return this.#a=this.request,this.request=this.#a.clone(),this.#i.timeout===!1?this.#i.fetch(this.#a,L):timeout(this.#a,L,this.#t,this.#i)}#h(){if(!this.#s){let{hooks:L,...J}=this.#i;this.#s=Object.freeze(J)}return this.#s}#g(L){this.#s=void 0,this.request=this.#_(L)}#_(L,J){return!this.#i.onUploadProgress||!L.body?L:streamRequest(L,this.#i.onUploadProgress,J??this.#i.body??void 0)}};
45583
45583
  /*! MIT License © Sindre Sorhus */
45584
45584
  const createInstance=L=>{let J=(J,Y)=>Ky.create(J,validateAndMerge(L,Y));for(let Y of requestMethods)J[Y]=(J,X)=>Ky.create(J,validateAndMerge(L,X,{method:Y}));return J.create=L=>createInstance(validateAndMerge(L)),J.extend=J=>(typeof J==`function`&&(J=J(L??{})),createInstance(validateAndMerge(L,J))),J.stop=stop,J.retry=retry,J},ky=createInstance();var require_ini=__commonJSMin((L=>{L.parse=L.decode=Z,L.stringify=L.encode=Y,L.safe=$,L.unsafe=ee;var J=typeof process<`u`&&process.platform===`win32`?`\r
45585
45585
  `:`
@@ -45593,12 +45593,12 @@ GFS4: `),console.error(L)}),Y[ee]||(re(Y,global[ee]||[]),Y.close=(function(L){fu
45593
45593
 
45594
45594
  `)?L.split(`
45595
45595
 
45596
- `):L.split(`,`)}switch(L){case`hoist-pattern`:case`public-hoist-pattern`:return Y(J)}return J}J.exports=te})),require_defaults=__commonJSMin((L=>{let J=__require$1(`os`),Y=__require$1(`path`),X=J.tmpdir(),Z=process.getuid?process.getuid():process.pid,Q=()=>!0,$=process.platform===`win32`,ee={editor:()=>process.env.EDITOR||process.env.VISUAL||($?`notepad.exe`:`vi`),shell:()=>$?process.env.COMSPEC||`cmd.exe`:process.env.SHELL||`/bin/bash`},te={fromString:()=>process.umask()},ne=J.homedir();ne?process.env.HOME=ne:ne=Y.resolve(X,`npm-`+Z);let re=process.platform===`win32`?`npm-cache`:`.npm`,ie=process.platform===`win32`&&process.env.APPDATA||ne,ae=Y.resolve(ie,re),oe,se;Object.defineProperty(L,`defaults`,{get:function(){return oe||(process.env.PREFIX?se=process.env.PREFIX:process.platform===`win32`?se=Y.dirname(process.execPath):(se=Y.dirname(Y.dirname(process.execPath)),process.env.DESTDIR&&(se=Y.join(process.env.DESTDIR,se))),oe={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":`legacy`,"bin-links":!0,browser:null,ca:null,cafile:null,cache:ae,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:ee.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:`git`,"git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Y.resolve(se,`etc`,`npmrc`),"global-style":!1,group:process.platform===`win32`?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:`npm`,"if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Y.resolve(ne,`.npm-init.js`),"init-author-name":``,"init-author-email":``,"init-author-url":``,"init-version":`1.0.0`,"init-license":`ISC`,json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:`notice`,logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:`%s`,"metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:se,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":`npm/{npm-version} node/{node-version} {platform} {arch}`,"read-only":!1,"rebuild-bundle":!0,registry:`https://registry.npmjs.org/`,rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":`^`,"save-prod":!1,scope:``,"script-shell":null,"scripts-prepend-node-path":`warn-only`,searchopts:``,searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:ee.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":`oauth`,"strict-ssl":!0,tag:`latest`,"tag-version-prefix":`v`,timing:!1,tmp:X,unicode:Q(),"unsafe-perm":process.platform===`win32`||process.platform===`cygwin`||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform===`win32`?0:`nobody`,userconfig:Y.resolve(ne,`.npmrc`),umask:process.umask?process.umask():te.fromString(`022`),version:!1,versions:!1,viewer:process.platform===`win32`?`browser`:`man`,_exit:!0},oe)}})})),require_npm_conf=__commonJSMin(((L,J)=>{let Y=__require$1(`path`),X=require_conf(),Z=require_defaults();J.exports=(L,J,Q)=>{let $=new X(Object.assign({},Z.defaults,Q),J);$.add(Object.assign({},L),`cli`);let ee=[],te=!1;if(__require$1.resolve.paths){let L=__require$1.resolve.paths(`npm`),J;try{J=__require$1.resolve(`npm`,{paths:L.slice(-1)})}catch{te=!0}J&&ee.push($.addFile(Y.resolve(Y.dirname(J),`..`,`npmrc`),`builtin`))}$.addEnv(),$.loadPrefix();let ne=Y.resolve($.localPrefix,`.npmrc`),re=$.get(`userconfig`);if(!$.get(`global`)&&ne!==re?ee.push($.addFile(ne,`project`)):$.add({},`project`),$.get(`workspace-prefix`)&&$.get(`workspace-prefix`)!==ne){let L=Y.resolve($.get(`workspace-prefix`),`.npmrc`);ee.push($.addFile(L,`workspace`))}if(ee.push($.addFile($.get(`userconfig`),`user`)),$.get(`prefix`)){let L=Y.resolve($.get(`prefix`),`etc`);$.root.globalconfig=Y.resolve(L,`npmrc`),$.root.globalignorefile=Y.resolve(L,`npmignore`)}ee.push($.addFile($.get(`globalconfig`),`global`)),$.loadUser();let ie=$.get(`cafile`);return ie&&$.loadCAFile(ie),{config:$,warnings:ee.filter(Boolean),failedToLoadBuiltInConfig:te}},Object.defineProperty(J.exports,`defaults`,{get(){return Z.defaults},enumerable:!0})})),require_registry_auth_token=__commonJSMin(((L,J)=>{let Y=require_npm_conf(),X=`:_authToken`,Z=`:_auth`,Q=`:username`,$=`:_password`;J.exports=function(){let L,J;arguments.length>=2?(L=arguments[0],J=Object.assign({},arguments[1])):typeof arguments[0]==`string`?L=arguments[0]:J=Object.assign({},arguments[0]),J||={};let X=J.npmrc;return J.npmrc=(J.npmrc?{config:{get:L=>X[L]}}:Y()).config,L=L||J.npmrc.get(`registry`)||Y.defaults.registry,te(L,J)||ne(J.npmrc)};function ee(L,J){let Y=new URL(J,new URL(L.startsWith(`//`)?`./${L}`:L,`resolve://`));if(Y.protocol===`resolve:`){let{pathname:L,search:J,hash:X}=Y;return L+J+X}return Y.toString()}function te(L,J){let Y=L instanceof URL?L:new URL(L.startsWith(`//`)?`http:${L}`:L),X;for(;X!==`/`&&Y.pathname!==X;){X=Y.pathname||`/`;let Z=ie(`//`+Y.host+X.replace(/\/$/,``),J.npmrc);if(Z)return Z;if(!J.recursive)return/\/$/.test(L)?void 0:te(new URL(`./`,Y),J);Y.pathname=ee(re(X),`..`)||`/`}}function ne(L){if(L.get(`_auth`))return{token:ae(L.get(`_auth`)),type:`Basic`}}function re(L){return L[L.length-1]===`/`?L:L+`/`}function ie(L,J){let Y=oe(J.get(L+`:_authToken`)||J.get(L+`/:_authToken`));if(Y)return Y;let X=se(J.get(L+`:username`)||J.get(L+`/:username`),J.get(L+`:_password`)||J.get(L+`/:_password`));if(X)return X;let Z=ce(J.get(L+`:_auth`)||J.get(L+`/:_auth`));if(Z)return Z}function ae(L){return L.replace(/^\$\{?([^}]*)\}?$/,function(L,J){return process.env[J]})}function oe(L){if(L)return{token:ae(L),type:`Bearer`}}function se(L,J){if(!L||!J)return;let Y=Buffer.from(ae(J),`base64`).toString(`utf8`);return{token:Buffer.from(L+`:`+Y,`utf8`).toString(`base64`),type:`Basic`,password:Y,username:L}}function ce(L){if(L)return{token:ae(L),type:`Basic`}}})),import_registry_auth_token=__toESM(require_registry_auth_token(),1),PackageNotFoundError=class extends Error{constructor(L){super(`Package \`${L}\` could not be found`),this.name=`PackageNotFoundError`}},VersionNotFoundError=class extends Error{constructor(L,J){super(`Version \`${J}\` for package \`${L}\` could not be found`),this.name=`VersionNotFoundError`}};async function packageJson(L,J={}){let{version:Y=`latest`}=J,{omitDeprecated:X=!0}=J,Z=L.split(`/`)[0],Q=J.registryUrl??registryUrl(Z),$=new URL(encodeURIComponent(L).replace(/^%40/,`@`),Q),ee=(0,import_registry_auth_token.default)(Q.toString(),{recursive:!0}),te={accept:`application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`};J.fullMetadata&&delete te.accept,ee&&(te.authorization=`${ee.type} ${ee.token}`);let ne;try{ne=await ky($,{headers:te,keepalive:!0}).json()}catch(J){throw J?.response?.status===404?new PackageNotFoundError(L):J}if(J.allVersions)return ne;let re=new VersionNotFoundError(L,Y);if(ne[`dist-tags`][Y]){let{time:L}=ne;ne=ne.versions[ne[`dist-tags`][Y]],ne.time=L}else if(Y){let L=!!ne.versions[Y];if(X&&!L)for(let[L,J]of Object.entries(ne.versions))J.deprecated&&delete ne.versions[L];if(!L){let L=Object.keys(ne.versions);if(Y=import_semver.default.maxSatisfying(L,Y),!Y)throw re}let{time:J}=ne;if(ne=ne.versions[Y],ne.time=J,!ne)throw re}return ne}function parse$16(L){return parsePackage(L)}const nodePackageJsonSource=defineSource({async discover(L){return getMatches(L.options,[`package.json`])},key:`nodePackageJson`,async parse(L,J){return{data:parse$16(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),nodeNpmRegistrySource=defineSource({async discover(L){if(L.options.offline)return log$2.warn(`Skipping Node NPM registry data source since we're in offline mode`),[];let J=ensureArray(L.metadata?.nodePackageJson).map(L=>L.data.name);return J.length===0&&!L.completedSources?.has(`nodePackageJson`)&&(log$2.warn(`Missing nodePackageJson in source context metadata for ${L.options.path}, extracting it now...`),J=ensureArray(await nodePackageJsonSource.extract(L)).map(L=>L.data.name)),J},key:`nodeNpmRegistry`,async parse(L){log$2.debug(`Extracting npm metadata...`);let J=L,[Y,X,Z,Q,$]=await Promise.all([packageJson(J,{fullMetadata:!0}).catch(()=>void 0),fetchDownloads(J,`last-week`),fetchDownloads(J,`last-month`),fetchDownloads(J,`last-year`),fetchDownloads(J,`2005-01-01:3000-01-01`)]);if(!Y)return;let ee=!!(Y.types??Y.typings??(is.plainObject(Y)?Y.exports:void 0)),te=is.plainObject(Y.dist)?Y.dist:void 0,ne=is.plainObject(Y.time)?Y.time:void 0;return{data:{deprecated:typeof Y.deprecated==`string`?Y.deprecated:void 0,downloadsMonthly:Z,downloadsTotal:$||void 0,downloadsWeekly:X,downloadsYearly:Q,fileCount:typeof te?.fileCount==`number`?te.fileCount:void 0,hasTypes:ee,publishDateLatest:typeof ne?.modified==`string`?ne.modified:void 0,unpackedSizeBytes:typeof te?.unpackedSize==`number`?te.unpackedSize:void 0,url:`https://www.npmjs.com/package/${encodeURIComponent(J)}`,versionLatest:Y.version},source:`https://www.npmjs.com/package/${encodeURIComponent(J)}`}},phase:2}),npmDownloadsSchema=object({downloads:number()});async function fetchDownloads(L,J){try{let Y=await fetch(`https://api.npmjs.org/downloads/point/${J}/${encodeURIComponent(L)}`);return Y.ok?npmDownloadsSchema.parse(await Y.json()).downloads:void 0}catch{return}}const manifestSchema=object({author:string$2().optional(),authorUrl:string$2().optional(),description:string$2().optional(),fundingUrl:string$2().optional(),id:string$2(),isDesktopOnly:boolean().optional(),minAppVersion:string$2().optional(),name:string$2().optional(),version:string$2().optional()}),obsidianPluginManifestJsonSource=defineSource({async discover(L){return getMatches(L.options,[`manifest.json`])},key:`obsidianPluginManifestJson`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`),X=manifestSchema.safeParse(JSON.parse(Y));if(X.success)return{data:X.data,source:L}},phase:1}),communityPluginsUrl=`https://raw.githubusercontent.com/obsidianmd/obsidian-releases/master/community-plugin-stats.json`,pluginStatsSchema=record(string$2(),record(string$2(),number())),obsidianPluginRegistrySource=defineSource({async discover(L){if(L.options.offline)return log$2.warn(`Skipping Obsidian plugin registry data source since we're in offline mode`),[];let J=ensureArray(L.metadata?.obsidianPluginManifestJson).map(L=>L.data.id);return J.length===0&&!L.completedSources?.has(`obsidianPluginManifestJson`)&&(log$2.warn(`Missing obsidianPluginManifestJson in source context metadata for ${L.options.path}, extracting it now...`),J=ensureArray(await obsidianPluginManifestJsonSource.extract(L)).map(L=>L.data.id)),J},key:`obsidianPluginRegistry`,async parse(L){log$2.debug(`Extracting Obsidian plugin registry metadata...`);let J=L,Y=`https://obsidian.md/plugins?id=${encodeURIComponent(J)}`,X=await fetch(communityPluginsUrl);return X.ok?{data:{downloadCount:pluginStatsSchema.parse(await X.json())[J]?.downloads||void 0,url:Y},source:Y}:{data:{url:Y},source:Y}},phase:2}),SECTION_RE=/^[\w/][\w/-]*:$/,ASSIGNMENT_RE=/^(\w+)\s*(\+?=)\s*(.*)/,NON_PLATFORM_SECTIONS=new Set([`all`,`common`,`meta`]);function parseMakefileConfig(L){let J=new Map,Y=[],X=new Set,Z=``,Q=!1;for(let $ of L.split(`
45597
- `)){let L=$.replace(/#.*$/,``).trim();if(L.length===0)continue;if(SECTION_RE.test(L)){Q&&!NON_PLATFORM_SECTIONS.has(Z)&&X.add(Z),Z=L.slice(0,-1),Q=!1;continue}let ee=ASSIGNMENT_RE.exec(L);if(!ee)continue;let[,te,ne,re]=ee;if(Q=!0,Z===`meta`){let L=tokenizeValues(re);if(ne===`+=`){let Y=J.get(te)??[];J.set(te,[...Y,...L])}else J.set(te,L)}else if(Z===`common`&&te===`ADDON_DEPENDENCIES`){let L=tokenizeValues(re);ne===`+=`||(Y.length=0),Y.push(...L)}}return Q&&!NON_PLATFORM_SECTIONS.has(Z)&&X.add(Z),{author:singleValue(J,`ADDON_AUTHOR`),dependencies:Y,description:singleValue(J,`ADDON_DESCRIPTION`),name:singleValue(J,`ADDON_NAME`),platformSections:[...X],tags:J.get(`ADDON_TAGS`)??[],url:singleValue(J,`ADDON_URL`)}}function singleValue(L,J){let Y=L.get(J);if(!Y||Y.length===0)return;let X=Y.join(` `).trim();return X.length>0?X:void 0}function tokenizeValues(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let[,L,X]of J.matchAll(/"([^"]+)"|(\S+)/g)){let J=L||X;J.length>0&&Y.push(J)}return Y}const openframeworksAddonConfigSchema=object({author:nonEmptyString,dependencies:stringArray,description:nonEmptyString,name:nonEmptyString,platformSections:stringArray,tags:stringArray,url:optionalUrl});function parse$15(L){let J=parseMakefileConfig(L);return openframeworksAddonConfigSchema.parse(J)}const openframeworksAddonConfigMkSource=defineSource({async discover(L){return getMatches(L.options,[`addon_config.mk`])},key:`openframeworksAddonConfigMk`,async parse(L,J){return{data:parse$15(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),openframeworksInstallXmlSchema=object({author:nonEmptyString,codeUrl:optionalUrl,description:nonEmptyString,downloadUrl:optionalUrl,name:nonEmptyString,operatingSystems:stringArray,requirements:stringArray,siteUrl:optionalUrl,url:optionalUrl,version:nonEmptyString}),LIB_OS_MAP={linux:`Linux`,mac:`macOS`,win32:`Windows`};function parse$14(L){if(!L.toLowerCase().includes(`addons`))return;let J=L.replaceAll(`<[CDATA[`,`<![CDATA[`),Y=new XMLParser({attributeNamePrefix:`@_`,ignoreAttributes:!1,parseTagValue:!1}),X;try{let L=Y.parse(J);if(!is.plainObject(L))return;X=L}catch{return}if(!is.plainObject(X.install))return;let{install:Z}=X;return openframeworksInstallXmlSchema.parse({author:getString$1(Z.author),codeUrl:getString$1(Z.code_url),description:getString$1(Z.description),downloadUrl:getString$1(Z.download_url),name:getString$1(Z.name),operatingSystems:parseOperatingSystems$2(Z),requirements:parseRequirements(Z),siteUrl:getString$1(Z.site_url),url:getString$1(Z.url),version:getString$1(Z.version)})}function getString$1(L){if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0}function parseRequirements(L){let{requires:J}=L;if(J==null)return[];if(typeof J==`string`){let L=J.trim();return L.length>0?[L]:[]}if(is.plainObject(J)){let L=[];for(let Y of ensureArray(J.addon)){let J=getString$1(Y);J&&L.push(J)}return L}return[]}function parseOperatingSystems$2(L){if(!is.plainObject(L.add))return[];let{add:J}=L;if(!is.plainObject(J.link))return[];let{link:Y}=J,X=[],Z=new Set;for(let L of ensureArray(Y.lib)){if(!is.plainObject(L))continue;let J=getString$1(L[`@_os`]);if(J){let L=LIB_OS_MAP[J.toLowerCase()]??J;Z.has(L)||(Z.add(L),X.push(L))}}return X}const openframeworksInstallXmlSource=defineSource({async discover(L){return getMatches(L.options,[`install.xml`])},key:`openframeworksInstallXml`,async parse(L,J){let Y=parse$14(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1}),processingLibraryPropertiesAuthorEntrySchema=object({name:string$2(),url:string$2().optional()}),CANONICAL_CATEGORIES=[`3D`,`Animation`,`Compilations`,`Data`,`Fabrication`,`Geometry`,`GUI`,`Hardware`,`I/O`,`Language`,`Math`,`Simulation`,`Sound`,`Utilities`,`Typography`,`Video & Vision`],CATEGORY_MAP=new Map(CANONICAL_CATEGORIES.map(L=>[L.replaceAll(/[^a-z]/gi,``).toLowerCase(),L]));CATEGORY_MAP.set(`3d`,`3D`);const processingLibraryPropertiesSchema=object({authors:array(processingLibraryPropertiesAuthorEntrySchema),categories:array(_enum(CANONICAL_CATEGORIES)),download:optionalUrl,id:nonEmptyString,maxRevision:number(),minRevision:number(),name:nonEmptyString,paragraph:nonEmptyString,prettyVersion:nonEmptyString,raw:record(string$2(),string$2()),sentence:nonEmptyString,type:nonEmptyString,url:optionalUrl,version:number()});function parse$13(L){let J=parseProperties(L),Y=get(J,`version`)??`0`,X=Number.parseInt(Y,10),Z=get(J,`prettyVersion`),Q=Z?stripInlineComment$1(Z):void 0,$=get(J,`minRevision`),ee=$?Number.parseInt($,10):0,te=get(J,`maxRevision`),ne=te?Number.parseInt(te,10):0;return processingLibraryPropertiesSchema.parse({authors:parseAuthors$2(get(J,`authors`)??get(J,`authorList`)??``),categories:parseCategories(get(J,`categories`)??get(J,`category`)??``),download:nonEmpty$2(get(J,`download`)),id:nonEmpty$2(get(J,`id`)),maxRevision:Number.isNaN(ne)?0:ne,minRevision:Number.isNaN(ee)?0:ee,name:nonEmpty$2(get(J,`name`)),paragraph:nonEmpty$2(get(J,`paragraph`)),prettyVersion:nonEmpty$2(Q),raw:J,sentence:nonEmpty$2(get(J,`sentence`)),type:nonEmpty$2(get(J,`type`)),url:nonEmpty$2(unescapeUrl$1(get(J,`url`)??``)),version:Number.isNaN(X)?0:X})}function get(L,J){return L[J]}function nonEmpty$2(L){if(L===void 0)return;let J=L.trim();return J.length>0?J:void 0}function stripInlineComment$1(L){let J=L.indexOf(` # `);return J===-1?L:L.slice(0,J).trim()}function unescapeUrl$1(L){return L.replaceAll(String.raw`\:`,`:`)}function parseAuthors$2(L){let J=L.trim();if(J.length===0)return[];let Y=[],X=0;for(;X<J.length;){let L=J.indexOf(`[`,X);if(L===-1){addPlainAuthors$1(J.slice(X),Y);break}L>X&&addPlainAuthors$1(J.slice(X,L),Y);let Z=J.indexOf(`]`,L);if(Z===-1){addPlainAuthors$1(J.slice(L),Y);break}let Q=J.indexOf(`(`,Z);if(Q===-1||Q!==Z+1){addPlainAuthors$1(J.slice(L,Z+1),Y),X=Z+1;continue}let $=J.indexOf(`)`,Q);if($===-1){addPlainAuthors$1(J.slice(L),Y);break}let ee=J.slice(L+1,Z).trim(),te=nonEmpty$2(unescapeUrl$1(J.slice(Q+1,$).trim())),ne=ee.split(`,`).map(L=>L.trim()).filter(L=>L.length>0);for(let L of ne)Y.push({name:L,url:te});X=$+1}return Y}function addPlainAuthors$1(L,J){let Y=L.split(/\band\b|,|&/).map(L=>L.trim()).filter(L=>L.length>0&&L.toLowerCase()!==`others`);for(let L of Y)J.push({name:L,url:void 0})}function parseCategories(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let L of J.split(`,`)){let J=L.trim().replaceAll(/^"|"$/g,``).trim();if(J.length===0)continue;let X=J.replaceAll(/[^a-z0-9]/gi,``).toLowerCase();if(X.length===0)continue;let Z=CATEGORY_MAP.get(X);Z&&!Y.includes(Z)&&Y.push(Z)}return Y}const PROCESSING_SPECIFIC_FIELDS=new Set([`authorList`,`authors`,`dependencies`,`minrevision`,`prettyversion`]),ARDUINO_EXCLUSIVE_FIELDS=new Set([`architectures`,`depends`,`maintainer`]);function isProcessingLibraryProperties(L){let J=parseProperties(L),Y=new Set(Object.keys(J).map(L=>L.toLowerCase()));if(!Y.has(`name`)||!Y.has(`version`))return!1;for(let L of ARDUINO_EXCLUSIVE_FIELDS)if(Y.has(L))return!1;for(let L of PROCESSING_SPECIFIC_FIELDS)if(Y.has(L))return!0;return!1}const processingLibraryPropertiesSource=defineSource({async discover(L){return getMatches(L.options,[`library.properties`])},key:`processingLibraryProperties`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`);if(isProcessingLibraryProperties(Y))return{data:parse$13(Y),source:L}},phase:1}),processingSketchPropertiesAuthorEntrySchema=object({name:string$2(),url:string$2().optional()}),processingSketchPropertiesSchema=object({authors:array(processingSketchPropertiesAuthorEntrySchema),component:nonEmptyString,download:optionalUrl,main:nonEmptyString,manifestLabel:nonEmptyString,manifestOrientation:nonEmptyString,manifestPackage:nonEmptyString,manifestPermissions:array(string$2()),manifestSdkMin:number().optional(),manifestSdkTarget:number().optional(),manifestVersionCode:number().optional(),manifestVersionName:nonEmptyString,maxRevision:number(),minRevision:number(),mode:nonEmptyString,modeId:nonEmptyString,name:nonEmptyString,paragraph:nonEmptyString,prettyVersion:nonEmptyString,raw:record(string$2(),string$2()),sentence:nonEmptyString,templates:nonEmptyString,url:optionalUrl,version:number(),zipfilename:nonEmptyString});function parse$12(L){let J=parseProperties(L),Y=J.version??`0`,X=Number.parseInt(Y,10),Z=J.prettyVersion,Q=Z?stripInlineComment(Z):void 0,$=J.minRevision,ee=$?Number.parseInt($,10):0,te=J.maxRevision,ne=te?Number.parseInt(te,10):0,re=J[`manifest.version.code`],ie=re?Number.parseInt(re,10):void 0,ae=J[`manifest.sdk.target`],oe=ae?Number.parseInt(ae,10):void 0,se=J[`manifest.sdk.min`],ce=se?Number.parseInt(se,10):void 0,le=(J[`manifest.permissions`]??``).split(`,`).map(L=>L.trim()).filter(L=>L.length>0);return processingSketchPropertiesSchema.parse({authors:parseAuthors$1(J.authors??J.authorList??``),component:nonEmpty$1(J.component),download:nonEmpty$1(unescapeUrl(J.download??``)),main:nonEmpty$1(J.main),manifestLabel:nonEmpty$1(J[`manifest.label`]),manifestOrientation:nonEmpty$1(J[`manifest.orientation`]),manifestPackage:nonEmpty$1(J[`manifest.package`]),manifestPermissions:le,manifestSdkMin:Number.isNaN(ce)?void 0:ce,manifestSdkTarget:Number.isNaN(oe)?void 0:oe,manifestVersionCode:Number.isNaN(ie)?void 0:ie,manifestVersionName:nonEmpty$1(J[`manifest.version.name`]),maxRevision:Number.isNaN(ne)?0:ne,minRevision:Number.isNaN(ee)?0:ee,mode:nonEmpty$1(J.mode),modeId:nonEmpty$1(J[`mode.id`]),name:nonEmpty$1(J.name),paragraph:nonEmpty$1(J.paragraph),prettyVersion:nonEmpty$1(Q),raw:J,sentence:nonEmpty$1(J.sentence),templates:nonEmpty$1(J.templates),url:nonEmpty$1(unescapeUrl(J.url??``)),version:Number.isNaN(X)?0:X,zipfilename:nonEmpty$1(J.zipfilename)})}function nonEmpty$1(L){if(L===void 0)return;let J=L.trim();return J.length>0?J:void 0}function stripInlineComment(L){let J=L.indexOf(` # `);return J===-1?L:L.slice(0,J).trim()}function unescapeUrl(L){return L.replaceAll(String.raw`\:`,`:`)}function parseAuthors$1(L){let J=L.trim();if(J.length===0)return[];let Y=[],X=0;for(;X<J.length;){let L=J.indexOf(`[`,X);if(L===-1){addPlainAuthors(J.slice(X),Y);break}L>X&&addPlainAuthors(J.slice(X,L),Y);let Z=J.indexOf(`]`,L);if(Z===-1){addPlainAuthors(J.slice(L),Y);break}let Q=J.indexOf(`(`,Z);if(Q===-1||Q!==Z+1){addPlainAuthors(J.slice(L,Z+1),Y),X=Z+1;continue}let $=J.indexOf(`)`,Q);if($===-1){addPlainAuthors(J.slice(L),Y);break}let ee=J.slice(L+1,Z).trim(),te=nonEmpty$1(unescapeUrl(J.slice(Q+1,$).trim())),ne=ee.split(`,`).map(L=>L.trim()).filter(L=>L.length>0);for(let L of ne)Y.push({name:L,url:te});X=$+1}return Y}function addPlainAuthors(L,J){let Y=L.split(/\band\b|,|&/).map(L=>L.trim()).filter(L=>L.length>0&&L.toLowerCase()!==`others`);for(let L of Y)J.push({name:L,url:void 0})}function isProcessingSketchProperties(L){let J=parseProperties(L);return Object.keys(J).some(L=>L===`main`||L===`mode`||L===`mode.id`||L.startsWith(`manifest.`))}const processingSketchPropertiesSource=defineSource({async discover(L){return getMatches(L.options,[`sketch.properties`])},key:`processingSketchProperties`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`);if(isProcessingSketchProperties(Y))return{data:parse$12(Y),source:L}},phase:1}),publiccodeContactEntrySchema=object({affiliation:string$2().optional(),email:string$2().optional(),name:string$2(),phone:string$2().optional()}),publiccodeContractorEntrySchema=object({name:string$2(),until:string$2().optional(),website:string$2().optional()}),publiccodeDependencyEntrySchema=object({category:_enum([`hardware`,`open`,`proprietary`]),name:string$2(),optional:boolean().optional(),version:string$2().optional(),versionMax:string$2().optional(),versionMin:string$2().optional()}),publiccodeDescriptionSchema=object({documentation:string$2().optional(),features:array(string$2()),genericName:string$2().optional(),localisedName:string$2().optional(),longDescription:string$2().optional(),shortDescription:string$2().optional()}),publiccodeSchema=object({applicationSuite:nonEmptyString,availableLanguages:stringArray,categories:stringArray,contacts:array(publiccodeContactEntrySchema),contractors:array(publiccodeContractorEntrySchema),dependencies:array(publiccodeDependencyEntrySchema),description:publiccodeDescriptionSchema.optional(),descriptions:record(string$2(),publiccodeDescriptionSchema),developmentStatus:nonEmptyString,inputTypes:stringArray,isBasedOn:optionalUrl,landingUrl:optionalUrl,license:nonEmptyString,localisationReady:boolean().optional(),logo:optionalUrl,mainCopyrightOwner:nonEmptyString,maintenanceType:nonEmptyString,monochromeLogo:optionalUrl,name:nonEmptyString,outputTypes:stringArray,platforms:stringArray,publiccodeYmlVersion:nonEmptyString,releaseDate:nonEmptyString,repoOwner:nonEmptyString,roadmap:optionalUrl,softwareType:nonEmptyString,softwareVersion:nonEmptyString,url:optionalUrl,usedBy:stringArray});function toString$1(L){if(typeof L==`string`)return L;if(typeof L==`number`)return String(L);if(L instanceof Date)return L.toISOString().slice(0,10)}function isNonEmptyString(L){return typeof L==`string`&&L.trim().length>0}function isPlainObject$1(L){return typeof L==`object`&&!!L&&!Array.isArray(L)&&!(L instanceof Date)}function toStringArray$1(L){return Array.isArray(L)?L.filter(L=>typeof L==`string`):[]}function parseDescription(L){let J=[];if(Array.isArray(L.features)){for(let Y of L.features)if(typeof Y==`string`)J.push(Y);else if(isPlainObject$1(Y))for(let[L,X]of Object.entries(Y))J.push(typeof X==`string`?`${L}: ${X}`:L)}return{...isNonEmptyString(L.documentation)?{documentation:L.documentation}:{},features:J,...isNonEmptyString(L.genericName)?{genericName:L.genericName}:{},...isNonEmptyString(L.localisedName)?{localisedName:L.localisedName}:{},...isNonEmptyString(L.longDescription)?{longDescription:L.longDescription.trim()}:{},...isNonEmptyString(L.shortDescription)?{shortDescription:L.shortDescription.trim()}:{}}}function parse$11(L){let J;try{J=(0,import_dist.parse)(L)}catch{return}if(!isPlainObject$1(J)||!isNonEmptyString(J.name)&&!isNonEmptyString(J.url))return;let Y={},X;if(isPlainObject$1(J.description)){let L=J.description;for(let[J,X]of Object.entries(L))isPlainObject$1(X)&&(Y[J]=parseDescription(X));let Z=`en`in Y?`en`:Object.keys(Y)[0];Z&&(X=Y[Z])}let Z=[];if(isPlainObject$1(J.maintenance)){let{maintenance:L}=J;if(Array.isArray(L.contacts)){for(let J of L.contacts)if(isPlainObject$1(J)&&isNonEmptyString(J.name)){let L={name:J.name};isNonEmptyString(J.email)&&(L.email=J.email),isNonEmptyString(J.phone)&&(L.phone=J.phone),isNonEmptyString(J.affiliation)&&(L.affiliation=J.affiliation),Z.push(L)}}}let Q=[];if(isPlainObject$1(J.maintenance)){let{maintenance:L}=J;if(Array.isArray(L.contractors)){for(let J of L.contractors)if(isPlainObject$1(J)&&isNonEmptyString(J.name)){let L={name:J.name},Y=toString$1(J.until);Y&&(L.until=Y),isNonEmptyString(J.website)&&(L.website=J.website),Q.push(L)}}}let $=[];if(isPlainObject$1(J.dependsOn)){let{dependsOn:L}=J;for(let J of[`open`,`proprietary`,`hardware`]){let Y=L[J];if(Array.isArray(Y)){for(let L of Y)if(isPlainObject$1(L)&&isNonEmptyString(L.name)){let Y={category:J,name:L.name},X=toString$1(L.version);X&&(Y.version=X);let Z=toString$1(L.versionMin);Z&&(Y.versionMin=Z);let Q=toString$1(L.versionMax);Q&&(Y.versionMax=Q),typeof L.optional==`boolean`&&(Y.optional=L.optional),$.push(Y)}}}}let ee=[],te;if(isPlainObject$1(J.localisation)){let L=J.localisation;ee=toStringArray$1(L.availableLanguages),typeof L.localisationReady==`boolean`&&(te=L.localisationReady)}let ne,re,ie;if(isPlainObject$1(J.legal)){let{legal:L}=J;isNonEmptyString(L.license)&&(ne=L.license),isNonEmptyString(L.mainCopyrightOwner)&&(re=L.mainCopyrightOwner),isNonEmptyString(L.repoOwner)&&(ie=L.repoOwner)}let ae=toString$1(J.softwareVersion),oe=toString$1(J.releaseDate);return publiccodeSchema.parse({...isNonEmptyString(J.applicationSuite)?{applicationSuite:J.applicationSuite}:{},availableLanguages:ee,categories:toStringArray$1(J.categories),contacts:Z,contractors:Q,dependencies:$,...X?{description:X}:{},descriptions:Y,...isNonEmptyString(J.developmentStatus)?{developmentStatus:J.developmentStatus}:{},inputTypes:toStringArray$1(J.inputTypes),...isNonEmptyString(J.isBasedOn)?{isBasedOn:J.isBasedOn}:{},...isNonEmptyString(J.landingURL)?{landingUrl:J.landingURL}:{},...ne?{license:ne}:{},...te===void 0?{}:{localisationReady:te},...isNonEmptyString(J.logo)?{logo:J.logo}:{},...re?{mainCopyrightOwner:re}:{},...isPlainObject$1(J.maintenance)&&isNonEmptyString(J.maintenance.type)?{maintenanceType:J.maintenance.type}:{},...isNonEmptyString(J.monochromeLogo)?{monochromeLogo:J.monochromeLogo}:{},...isNonEmptyString(J.name)?{name:J.name}:{},outputTypes:toStringArray$1(J.outputTypes),platforms:toStringArray$1(J.platforms),...isNonEmptyString(J.publiccodeYmlVersion)?{publiccodeYmlVersion:J.publiccodeYmlVersion}:toString$1(J.publiccodeYmlVersion)?{publiccodeYmlVersion:toString$1(J.publiccodeYmlVersion)}:{},...oe?{releaseDate:oe}:{},...ie?{repoOwner:ie}:{},...isNonEmptyString(J.roadmap)?{roadmap:J.roadmap}:{},...isNonEmptyString(J.softwareType)?{softwareType:J.softwareType}:{},...ae?{softwareVersion:ae}:{},...isNonEmptyString(J.url)?{url:J.url}:{},usedBy:toStringArray$1(J.usedBy)})}const publiccodeYamlSource=defineSource({async discover(L){return getMatches(L.options,[`publiccode.yml`,`publiccode.yaml`])},key:`publiccodeYaml`,async parse(L,J){let Y=parse$11(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1}),MULTI_VALUE_HEADERS=new Set([`Classifier`,`Platform`,`Project-URL`,`Requires-Dist`,`Requires-External`,`Supported-Platform`]);function parseRfc822Headers(L){let J={},Y=``;for(let X of L.split(`
45596
+ `):L.split(`,`)}switch(L){case`hoist-pattern`:case`public-hoist-pattern`:return Y(J)}return J}J.exports=te})),require_defaults=__commonJSMin((L=>{let J=__require$1(`os`),Y=__require$1(`path`),X=J.tmpdir(),Z=process.getuid?process.getuid():process.pid,Q=()=>!0,$=process.platform===`win32`,ee={editor:()=>process.env.EDITOR||process.env.VISUAL||($?`notepad.exe`:`vi`),shell:()=>$?process.env.COMSPEC||`cmd.exe`:process.env.SHELL||`/bin/bash`},te={fromString:()=>process.umask()},ne=J.homedir();ne?process.env.HOME=ne:ne=Y.resolve(X,`npm-`+Z);let re=process.platform===`win32`?`npm-cache`:`.npm`,ie=process.platform===`win32`&&process.env.APPDATA||ne,ae=Y.resolve(ie,re),oe,se;Object.defineProperty(L,`defaults`,{get:function(){return oe||(process.env.PREFIX?se=process.env.PREFIX:process.platform===`win32`?se=Y.dirname(process.execPath):(se=Y.dirname(Y.dirname(process.execPath)),process.env.DESTDIR&&(se=Y.join(process.env.DESTDIR,se))),oe={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":`legacy`,"bin-links":!0,browser:null,ca:null,cafile:null,cache:ae,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:ee.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:`git`,"git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Y.resolve(se,`etc`,`npmrc`),"global-style":!1,group:process.platform===`win32`?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:`npm`,"if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Y.resolve(ne,`.npm-init.js`),"init-author-name":``,"init-author-email":``,"init-author-url":``,"init-version":`1.0.0`,"init-license":`ISC`,json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:`notice`,logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:`%s`,"metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:se,production:!1,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":`npm/{npm-version} node/{node-version} {platform} {arch}`,"read-only":!1,"rebuild-bundle":!0,registry:`https://registry.npmjs.org/`,rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":`^`,"save-prod":!1,scope:``,"script-shell":null,"scripts-prepend-node-path":`warn-only`,searchopts:``,searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:ee.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":`oauth`,"strict-ssl":!0,tag:`latest`,"tag-version-prefix":`v`,timing:!1,tmp:X,unicode:Q(),"unsafe-perm":process.platform===`win32`||process.platform===`cygwin`||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform===`win32`?0:`nobody`,userconfig:Y.resolve(ne,`.npmrc`),umask:process.umask?process.umask():te.fromString(`022`),version:!1,versions:!1,viewer:process.platform===`win32`?`browser`:`man`,_exit:!0},oe)}})})),require_npm_conf=__commonJSMin(((L,J)=>{let Y=__require$1(`path`),X=require_conf(),Z=require_defaults();J.exports=(L,J,Q)=>{let $=new X(Object.assign({},Z.defaults,Q),J);$.add(Object.assign({},L),`cli`);let ee=[],te=!1;if(__require$1.resolve.paths){let L=__require$1.resolve.paths(`npm`),J;try{J=__require$1.resolve(`npm`,{paths:L.slice(-1)})}catch{te=!0}J&&ee.push($.addFile(Y.resolve(Y.dirname(J),`..`,`npmrc`),`builtin`))}$.addEnv(),$.loadPrefix();let ne=Y.resolve($.localPrefix,`.npmrc`),re=$.get(`userconfig`);if(!$.get(`global`)&&ne!==re?ee.push($.addFile(ne,`project`)):$.add({},`project`),$.get(`workspace-prefix`)&&$.get(`workspace-prefix`)!==ne){let L=Y.resolve($.get(`workspace-prefix`),`.npmrc`);ee.push($.addFile(L,`workspace`))}if(ee.push($.addFile($.get(`userconfig`),`user`)),$.get(`prefix`)){let L=Y.resolve($.get(`prefix`),`etc`);$.root.globalconfig=Y.resolve(L,`npmrc`),$.root.globalignorefile=Y.resolve(L,`npmignore`)}ee.push($.addFile($.get(`globalconfig`),`global`)),$.loadUser();let ie=$.get(`cafile`);return ie&&$.loadCAFile(ie),{config:$,warnings:ee.filter(Boolean),failedToLoadBuiltInConfig:te}},Object.defineProperty(J.exports,`defaults`,{get(){return Z.defaults},enumerable:!0})})),require_registry_auth_token=__commonJSMin(((L,J)=>{let Y=require_npm_conf(),X=`:_authToken`,Z=`:_auth`,Q=`:username`,$=`:_password`;J.exports=function(){let L,J;arguments.length>=2?(L=arguments[0],J=Object.assign({},arguments[1])):typeof arguments[0]==`string`?L=arguments[0]:J=Object.assign({},arguments[0]),J||={};let X=J.npmrc;return J.npmrc=(J.npmrc?{config:{get:L=>X[L]}}:Y()).config,L=L||J.npmrc.get(`registry`)||Y.defaults.registry,te(L,J)||ne(J.npmrc)};function ee(L,J){let Y=new URL(J,new URL(L.startsWith(`//`)?`./${L}`:L,`resolve://`));if(Y.protocol===`resolve:`){let{pathname:L,search:J,hash:X}=Y;return L+J+X}return Y.toString()}function te(L,J){let Y=L instanceof URL?L:new URL(L.startsWith(`//`)?`http:${L}`:L),X;for(;X!==`/`&&Y.pathname!==X;){X=Y.pathname||`/`;let Z=ie(`//`+Y.host+X.replace(/\/$/,``),J.npmrc);if(Z)return Z;if(!J.recursive)return/\/$/.test(L)?void 0:te(new URL(`./`,Y),J);Y.pathname=ee(re(X),`..`)||`/`}}function ne(L){if(L.get(`_auth`))return{token:ae(L.get(`_auth`)),type:`Basic`}}function re(L){return L[L.length-1]===`/`?L:L+`/`}function ie(L,J){let Y=oe(J.get(L+`:_authToken`)||J.get(L+`/:_authToken`));if(Y)return Y;let X=se(J.get(L+`:username`)||J.get(L+`/:username`),J.get(L+`:_password`)||J.get(L+`/:_password`));if(X)return X;let Z=ce(J.get(L+`:_auth`)||J.get(L+`/:_auth`));if(Z)return Z}function ae(L){return L.replace(/^\$\{?([^}]*)\}?$/,function(L,J){return process.env[J]})}function oe(L){if(L)return{token:ae(L),type:`Bearer`}}function se(L,J){if(!L||!J)return;let Y=Buffer.from(ae(J),`base64`).toString(`utf8`);return{token:Buffer.from(L+`:`+Y,`utf8`).toString(`base64`),type:`Basic`,password:Y,username:L}}function ce(L){if(L)return{token:ae(L),type:`Basic`}}})),import_registry_auth_token=__toESM(require_registry_auth_token(),1),PackageNotFoundError=class extends Error{constructor(L){super(`Package \`${L}\` could not be found`),this.name=`PackageNotFoundError`}},VersionNotFoundError=class extends Error{constructor(L,J){super(`Version \`${J}\` for package \`${L}\` could not be found`),this.name=`VersionNotFoundError`}};async function packageJson(L,J={}){let{version:Y=`latest`}=J,{omitDeprecated:X=!0}=J,Z=L.split(`/`)[0],Q=J.registryUrl??registryUrl(Z),$=new URL(encodeURIComponent(L).replace(/^%40/,`@`),Q),ee=(0,import_registry_auth_token.default)(Q.toString(),{recursive:!0}),te={accept:`application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`};J.fullMetadata&&delete te.accept,ee&&(te.authorization=`${ee.type} ${ee.token}`);let ne;try{ne=await ky($,{headers:te,keepalive:!0}).json()}catch(J){throw J?.response?.status===404?new PackageNotFoundError(L):J}if(J.allVersions)return ne;let re=new VersionNotFoundError(L,Y);if(ne[`dist-tags`][Y]){let{time:L}=ne;ne=ne.versions[ne[`dist-tags`][Y]],ne.time=L}else if(Y){let L=!!ne.versions[Y];if(X&&!L)for(let[L,J]of Object.entries(ne.versions))J.deprecated&&delete ne.versions[L];if(!L){let L=Object.keys(ne.versions);if(Y=import_semver.default.maxSatisfying(L,Y),!Y)throw re}let{time:J}=ne;if(ne=ne.versions[Y],ne.time=J,!ne)throw re}return ne}async function fetchWithRetry(L,J,Y=5){let X;for(let Z=0;Z<=Y;Z++)try{let X=await fetch(L,J);if((X.status===429||X.status>=500)&&Z<Y){let J=getDelay(Z,X);log$2.warn(`Fetch ${L} returned ${X.status}, retrying in ${J}ms (attempt ${Z+1}/${Y})`),await sleep(J);continue}return X}catch(J){if(X=J,Z<Y){let X=getDelay(Z);log$2.warn(`Fetch ${L} failed: ${J instanceof Error?J.message:String(J)}, retrying in ${X}ms (attempt ${Z+1}/${Y})`),await sleep(X)}}throw X}function getDelay(L,J){let Y=1e3*2**L,X=J?.headers.get(`retry-after`);if(X){let L=Number(X);if(!Number.isNaN(L))return Math.max(L*1e3,Y)}return Y}async function sleep(L){return new Promise(J=>{setTimeout(J,L)})}function parse$16(L){return parsePackage(L)}const nodePackageJsonSource=defineSource({async discover(L){return getMatches(L.options,[`package.json`])},key:`nodePackageJson`,async parse(L,J){return{data:parse$16(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),nodeNpmRegistrySource=defineSource({async discover(L){if(L.options.offline)return log$2.warn(`Skipping Node NPM registry data source since we're in offline mode`),[];let J=ensureArray(L.metadata?.nodePackageJson);return J.length===0&&!L.completedSources?.has(`nodePackageJson`)&&(log$2.warn(`Missing nodePackageJson in source context metadata for ${L.options.path}, extracting it now...`),J=ensureArray(await nodePackageJsonSource.extract(L))),J.filter(J=>J.data.private===!0||J.data.publishConfig?.access===`restricted`?(log$2.debug(`Skipping NPM registry lookup for "${J.data.name}" in "${L.options.path}" because it is a private package`),!1):!0).map(L=>L.data.name)},key:`nodeNpmRegistry`,async parse(L){log$2.debug(`Extracting npm metadata...`);let J=L,[Y,X,Z,Q,$]=await Promise.all([packageJson(J,{fullMetadata:!0}).catch(()=>void 0),fetchDownloads(J,`last-week`),fetchDownloads(J,`last-month`),fetchDownloads(J,`last-year`),fetchDownloads(J,`2005-01-01:3000-01-01`)]);if(!Y)return;let ee=!!(Y.types??Y.typings??(is.plainObject(Y)?Y.exports:void 0)),te=is.plainObject(Y.dist)?Y.dist:void 0,ne=is.plainObject(Y.time)?Y.time:void 0;return{data:{deprecated:typeof Y.deprecated==`string`?Y.deprecated:void 0,downloadsMonthly:Z,downloadsTotal:$||void 0,downloadsWeekly:X,downloadsYearly:Q,fileCount:typeof te?.fileCount==`number`?te.fileCount:void 0,hasTypes:ee,publishDateLatest:typeof ne?.modified==`string`?ne.modified:void 0,unpackedSizeBytes:typeof te?.unpackedSize==`number`?te.unpackedSize:void 0,url:`https://www.npmjs.com/package/${encodeURIComponent(J)}`,versionLatest:Y.version},source:`https://www.npmjs.com/package/${encodeURIComponent(J)}`}},phase:2}),npmDownloadsSchema=object({downloads:number()});async function fetchDownloads(L,J){try{let Y=await fetchWithRetry(`https://api.npmjs.org/downloads/point/${J}/${encodeURIComponent(L)}`);return Y.ok?npmDownloadsSchema.parse(await Y.json()).downloads:void 0}catch{return}}const manifestSchema=object({author:string$2().optional(),authorUrl:string$2().optional(),description:string$2().optional(),fundingUrl:string$2().optional(),id:string$2(),isDesktopOnly:boolean().optional(),minAppVersion:string$2().optional(),name:string$2().optional(),version:string$2().optional()}),obsidianPluginManifestJsonSource=defineSource({async discover(L){return getMatches(L.options,[`manifest.json`])},key:`obsidianPluginManifestJson`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`),X=manifestSchema.safeParse(JSON.parse(Y));if(X.success)return{data:X.data,source:L}},phase:1}),communityPluginsUrl=`https://raw.githubusercontent.com/obsidianmd/obsidian-releases/master/community-plugin-stats.json`,pluginStatsSchema=record(string$2(),record(string$2(),number())),obsidianPluginRegistrySource=defineSource({async discover(L){if(L.options.offline)return log$2.warn(`Skipping Obsidian plugin registry data source since we're in offline mode`),[];let J=ensureArray(L.metadata?.obsidianPluginManifestJson).map(L=>L.data.id);return J.length===0&&!L.completedSources?.has(`obsidianPluginManifestJson`)&&(log$2.warn(`Missing obsidianPluginManifestJson in source context metadata for ${L.options.path}, extracting it now...`),J=ensureArray(await obsidianPluginManifestJsonSource.extract(L)).map(L=>L.data.id)),J},key:`obsidianPluginRegistry`,async parse(L){log$2.debug(`Extracting Obsidian plugin registry metadata...`);let J=L,Y=`https://obsidian.md/plugins?id=${encodeURIComponent(J)}`,X=await fetchWithRetry(communityPluginsUrl);return X.ok?{data:{downloadCount:pluginStatsSchema.parse(await X.json())[J]?.downloads||void 0,url:Y},source:Y}:{data:{url:Y},source:Y}},phase:2}),SECTION_RE=/^[\w/][\w/-]*:$/,ASSIGNMENT_RE=/^(\w+)\s*(\+?=)\s*(.*)/,NON_PLATFORM_SECTIONS=new Set([`all`,`common`,`meta`]);function parseMakefileConfig(L){let J=new Map,Y=[],X=new Set,Z=``,Q=!1;for(let $ of L.split(`
45597
+ `)){let L=$.replace(/#.*$/,``).trim();if(L.length===0)continue;if(SECTION_RE.test(L)){Q&&!NON_PLATFORM_SECTIONS.has(Z)&&X.add(Z),Z=L.slice(0,-1),Q=!1;continue}let ee=ASSIGNMENT_RE.exec(L);if(!ee)continue;let[,te,ne,re]=ee;if(Q=!0,Z===`meta`){let L=tokenizeValues(re);if(ne===`+=`){let Y=J.get(te)??[];J.set(te,[...Y,...L])}else J.set(te,L)}else if(Z===`common`&&te===`ADDON_DEPENDENCIES`){let L=tokenizeValues(re);ne===`+=`||(Y.length=0),Y.push(...L)}}return Q&&!NON_PLATFORM_SECTIONS.has(Z)&&X.add(Z),{author:singleValue(J,`ADDON_AUTHOR`),dependencies:Y,description:singleValue(J,`ADDON_DESCRIPTION`),name:singleValue(J,`ADDON_NAME`),platformSections:[...X],tags:J.get(`ADDON_TAGS`)??[],url:singleValue(J,`ADDON_URL`)}}function singleValue(L,J){let Y=L.get(J);if(!Y||Y.length===0)return;let X=Y.join(` `).trim();return X.length>0?X:void 0}function tokenizeValues(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let[,L,X]of J.matchAll(/"([^"]+)"|(\S+)/g)){let J=L||X;J.length>0&&Y.push(J)}return Y}const openframeworksAddonConfigSchema=object({author:nonEmptyString,dependencies:stringArray,description:nonEmptyString,name:nonEmptyString,platformSections:stringArray,tags:stringArray,url:optionalUrl});function parse$15(L){let J=parseMakefileConfig(L);return openframeworksAddonConfigSchema.parse(J)}const openframeworksAddonConfigMkSource=defineSource({async discover(L){return getMatches(L.options,[`addon_config.mk`])},key:`openframeworksAddonConfigMk`,async parse(L,J){return{data:parse$15(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),openframeworksInstallXmlSchema=object({author:nonEmptyString,codeUrl:optionalUrl,description:nonEmptyString,downloadUrl:optionalUrl,name:nonEmptyString,operatingSystems:stringArray,requirements:stringArray,siteUrl:optionalUrl,url:optionalUrl,version:nonEmptyString}),LIB_OS_MAP={linux:`Linux`,mac:`macOS`,win32:`Windows`};function parse$14(L){if(!L.toLowerCase().includes(`addons`))return;let J=L.replaceAll(`<[CDATA[`,`<![CDATA[`),Y=new XMLParser({attributeNamePrefix:`@_`,ignoreAttributes:!1,parseTagValue:!1}),X;try{let L=Y.parse(J);if(!is.plainObject(L))return;X=L}catch{return}if(!is.plainObject(X.install))return;let{install:Z}=X;return openframeworksInstallXmlSchema.parse({author:getString$1(Z.author),codeUrl:getString$1(Z.code_url),description:getString$1(Z.description),downloadUrl:getString$1(Z.download_url),name:getString$1(Z.name),operatingSystems:parseOperatingSystems$2(Z),requirements:parseRequirements(Z),siteUrl:getString$1(Z.site_url),url:getString$1(Z.url),version:getString$1(Z.version)})}function getString$1(L){if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0}function parseRequirements(L){let{requires:J}=L;if(J==null)return[];if(typeof J==`string`){let L=J.trim();return L.length>0?[L]:[]}if(is.plainObject(J)){let L=[];for(let Y of ensureArray(J.addon)){let J=getString$1(Y);J&&L.push(J)}return L}return[]}function parseOperatingSystems$2(L){if(!is.plainObject(L.add))return[];let{add:J}=L;if(!is.plainObject(J.link))return[];let{link:Y}=J,X=[],Z=new Set;for(let L of ensureArray(Y.lib)){if(!is.plainObject(L))continue;let J=getString$1(L[`@_os`]);if(J){let L=LIB_OS_MAP[J.toLowerCase()]??J;Z.has(L)||(Z.add(L),X.push(L))}}return X}const openframeworksInstallXmlSource=defineSource({async discover(L){return getMatches(L.options,[`install.xml`])},key:`openframeworksInstallXml`,async parse(L,J){let Y=parse$14(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1}),processingLibraryPropertiesAuthorEntrySchema=object({name:string$2(),url:string$2().optional()}),CANONICAL_CATEGORIES=[`3D`,`Animation`,`Compilations`,`Data`,`Fabrication`,`Geometry`,`GUI`,`Hardware`,`I/O`,`Language`,`Math`,`Simulation`,`Sound`,`Utilities`,`Typography`,`Video & Vision`],CATEGORY_MAP=new Map(CANONICAL_CATEGORIES.map(L=>[L.replaceAll(/[^a-z]/gi,``).toLowerCase(),L]));CATEGORY_MAP.set(`3d`,`3D`);const processingLibraryPropertiesSchema=object({authors:array(processingLibraryPropertiesAuthorEntrySchema),categories:array(_enum(CANONICAL_CATEGORIES)),download:optionalUrl,id:nonEmptyString,maxRevision:number(),minRevision:number(),name:nonEmptyString,paragraph:nonEmptyString,prettyVersion:nonEmptyString,raw:record(string$2(),string$2()),sentence:nonEmptyString,type:nonEmptyString,url:optionalUrl,version:number()});function parse$13(L){let J=parseProperties(L),Y=get(J,`version`)??`0`,X=Number.parseInt(Y,10),Z=get(J,`prettyVersion`),Q=Z?stripInlineComment$1(Z):void 0,$=get(J,`minRevision`),ee=$?Number.parseInt($,10):0,te=get(J,`maxRevision`),ne=te?Number.parseInt(te,10):0;return processingLibraryPropertiesSchema.parse({authors:parseAuthors$2(get(J,`authors`)??get(J,`authorList`)??``),categories:parseCategories(get(J,`categories`)??get(J,`category`)??``),download:nonEmpty$2(get(J,`download`)),id:nonEmpty$2(get(J,`id`)),maxRevision:Number.isNaN(ne)?0:ne,minRevision:Number.isNaN(ee)?0:ee,name:nonEmpty$2(get(J,`name`)),paragraph:nonEmpty$2(get(J,`paragraph`)),prettyVersion:nonEmpty$2(Q),raw:J,sentence:nonEmpty$2(get(J,`sentence`)),type:nonEmpty$2(get(J,`type`)),url:nonEmpty$2(unescapeUrl$1(get(J,`url`)??``)),version:Number.isNaN(X)?0:X})}function get(L,J){return L[J]}function nonEmpty$2(L){if(L===void 0)return;let J=L.trim();return J.length>0?J:void 0}function stripInlineComment$1(L){let J=L.indexOf(` # `);return J===-1?L:L.slice(0,J).trim()}function unescapeUrl$1(L){return L.replaceAll(String.raw`\:`,`:`)}function parseAuthors$2(L){let J=L.trim();if(J.length===0)return[];let Y=[],X=0;for(;X<J.length;){let L=J.indexOf(`[`,X);if(L===-1){addPlainAuthors$1(J.slice(X),Y);break}L>X&&addPlainAuthors$1(J.slice(X,L),Y);let Z=J.indexOf(`]`,L);if(Z===-1){addPlainAuthors$1(J.slice(L),Y);break}let Q=J.indexOf(`(`,Z);if(Q===-1||Q!==Z+1){addPlainAuthors$1(J.slice(L,Z+1),Y),X=Z+1;continue}let $=J.indexOf(`)`,Q);if($===-1){addPlainAuthors$1(J.slice(L),Y);break}let ee=J.slice(L+1,Z).trim(),te=nonEmpty$2(unescapeUrl$1(J.slice(Q+1,$).trim())),ne=splitCommaSeparated(ee);for(let L of ne)Y.push({name:L,url:te});X=$+1}return Y}function addPlainAuthors$1(L,J){let Y=L.split(/\band\b|,|&/).map(L=>L.trim()).filter(L=>L.length>0&&L.toLowerCase()!==`others`);for(let L of Y)J.push({name:L,url:void 0})}function parseCategories(L){let J=L.trim();if(J.length===0)return[];let Y=[];for(let L of J.split(`,`)){let J=L.trim().replaceAll(/^"|"$/g,``).trim();if(J.length===0)continue;let X=J.replaceAll(/[^a-z0-9]/gi,``).toLowerCase();if(X.length===0)continue;let Z=CATEGORY_MAP.get(X);Z&&!Y.includes(Z)&&Y.push(Z)}return Y}const PROCESSING_SPECIFIC_FIELDS=new Set([`authorList`,`authors`,`dependencies`,`minrevision`,`prettyversion`]),ARDUINO_EXCLUSIVE_FIELDS=new Set([`architectures`,`depends`,`maintainer`]);function isProcessingLibraryProperties(L){let J=parseProperties(L),Y=new Set(Object.keys(J).map(L=>L.toLowerCase()));if(!Y.has(`name`)||!Y.has(`version`))return!1;for(let L of ARDUINO_EXCLUSIVE_FIELDS)if(Y.has(L))return!1;for(let L of PROCESSING_SPECIFIC_FIELDS)if(Y.has(L))return!0;return!1}const processingLibraryPropertiesSource=defineSource({async discover(L){return getMatches(L.options,[`library.properties`])},key:`processingLibraryProperties`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`);if(isProcessingLibraryProperties(Y))return{data:parse$13(Y),source:L}},phase:1}),processingSketchPropertiesAuthorEntrySchema=object({name:string$2(),url:string$2().optional()}),processingSketchPropertiesSchema=object({authors:array(processingSketchPropertiesAuthorEntrySchema),component:nonEmptyString,download:optionalUrl,main:nonEmptyString,manifestLabel:nonEmptyString,manifestOrientation:nonEmptyString,manifestPackage:nonEmptyString,manifestPermissions:array(string$2()),manifestSdkMin:number().optional(),manifestSdkTarget:number().optional(),manifestVersionCode:number().optional(),manifestVersionName:nonEmptyString,maxRevision:number(),minRevision:number(),mode:nonEmptyString,modeId:nonEmptyString,name:nonEmptyString,paragraph:nonEmptyString,prettyVersion:nonEmptyString,raw:record(string$2(),string$2()),sentence:nonEmptyString,templates:nonEmptyString,url:optionalUrl,version:number(),zipfilename:nonEmptyString});function parse$12(L){let J=parseProperties(L),Y=J.version??`0`,X=Number.parseInt(Y,10),Z=J.prettyVersion,Q=Z?stripInlineComment(Z):void 0,$=J.minRevision,ee=$?Number.parseInt($,10):0,te=J.maxRevision,ne=te?Number.parseInt(te,10):0,re=J[`manifest.version.code`],ie=re?Number.parseInt(re,10):void 0,ae=J[`manifest.sdk.target`],oe=ae?Number.parseInt(ae,10):void 0,se=J[`manifest.sdk.min`],ce=se?Number.parseInt(se,10):void 0,le=splitCommaSeparated(J[`manifest.permissions`]??``);return processingSketchPropertiesSchema.parse({authors:parseAuthors$1(J.authors??J.authorList??``),component:nonEmpty$1(J.component),download:nonEmpty$1(unescapeUrl(J.download??``)),main:nonEmpty$1(J.main),manifestLabel:nonEmpty$1(J[`manifest.label`]),manifestOrientation:nonEmpty$1(J[`manifest.orientation`]),manifestPackage:nonEmpty$1(J[`manifest.package`]),manifestPermissions:le,manifestSdkMin:Number.isNaN(ce)?void 0:ce,manifestSdkTarget:Number.isNaN(oe)?void 0:oe,manifestVersionCode:Number.isNaN(ie)?void 0:ie,manifestVersionName:nonEmpty$1(J[`manifest.version.name`]),maxRevision:Number.isNaN(ne)?0:ne,minRevision:Number.isNaN(ee)?0:ee,mode:nonEmpty$1(J.mode),modeId:nonEmpty$1(J[`mode.id`]),name:nonEmpty$1(J.name),paragraph:nonEmpty$1(J.paragraph),prettyVersion:nonEmpty$1(Q),raw:J,sentence:nonEmpty$1(J.sentence),templates:nonEmpty$1(J.templates),url:nonEmpty$1(unescapeUrl(J.url??``)),version:Number.isNaN(X)?0:X,zipfilename:nonEmpty$1(J.zipfilename)})}function nonEmpty$1(L){if(L===void 0)return;let J=L.trim();return J.length>0?J:void 0}function stripInlineComment(L){let J=L.indexOf(` # `);return J===-1?L:L.slice(0,J).trim()}function unescapeUrl(L){return L.replaceAll(String.raw`\:`,`:`)}function parseAuthors$1(L){let J=L.trim();if(J.length===0)return[];let Y=[],X=0;for(;X<J.length;){let L=J.indexOf(`[`,X);if(L===-1){addPlainAuthors(J.slice(X),Y);break}L>X&&addPlainAuthors(J.slice(X,L),Y);let Z=J.indexOf(`]`,L);if(Z===-1){addPlainAuthors(J.slice(L),Y);break}let Q=J.indexOf(`(`,Z);if(Q===-1||Q!==Z+1){addPlainAuthors(J.slice(L,Z+1),Y),X=Z+1;continue}let $=J.indexOf(`)`,Q);if($===-1){addPlainAuthors(J.slice(L),Y);break}let ee=J.slice(L+1,Z).trim(),te=nonEmpty$1(unescapeUrl(J.slice(Q+1,$).trim())),ne=splitCommaSeparated(ee);for(let L of ne)Y.push({name:L,url:te});X=$+1}return Y}function addPlainAuthors(L,J){let Y=L.split(/\band\b|,|&/).map(L=>L.trim()).filter(L=>L.length>0&&L.toLowerCase()!==`others`);for(let L of Y)J.push({name:L,url:void 0})}function isProcessingSketchProperties(L){let J=parseProperties(L);return Object.keys(J).some(L=>L===`main`||L===`mode`||L===`mode.id`||L.startsWith(`manifest.`))}const processingSketchPropertiesSource=defineSource({async discover(L){return getMatches(L.options,[`sketch.properties`])},key:`processingSketchProperties`,async parse(L,J){let Y=await readFile(resolve$1(J.options.path,L),`utf8`);if(isProcessingSketchProperties(Y))return{data:parse$12(Y),source:L}},phase:1}),publiccodeContactEntrySchema=object({affiliation:string$2().optional(),email:string$2().optional(),name:string$2(),phone:string$2().optional()}),publiccodeContractorEntrySchema=object({name:string$2(),until:string$2().optional(),website:string$2().optional()}),publiccodeDependencyEntrySchema=object({category:_enum([`hardware`,`open`,`proprietary`]),name:string$2(),optional:boolean().optional(),version:string$2().optional(),versionMax:string$2().optional(),versionMin:string$2().optional()}),publiccodeDescriptionSchema=object({documentation:string$2().optional(),features:array(string$2()),genericName:string$2().optional(),localisedName:string$2().optional(),longDescription:string$2().optional(),shortDescription:string$2().optional()}),publiccodeSchema=object({applicationSuite:nonEmptyString,availableLanguages:stringArray,categories:stringArray,contacts:array(publiccodeContactEntrySchema),contractors:array(publiccodeContractorEntrySchema),dependencies:array(publiccodeDependencyEntrySchema),description:publiccodeDescriptionSchema.optional(),descriptions:record(string$2(),publiccodeDescriptionSchema),developmentStatus:nonEmptyString,inputTypes:stringArray,isBasedOn:optionalUrl,landingUrl:optionalUrl,license:nonEmptyString,localisationReady:boolean().optional(),logo:optionalUrl,mainCopyrightOwner:nonEmptyString,maintenanceType:nonEmptyString,monochromeLogo:optionalUrl,name:nonEmptyString,outputTypes:stringArray,platforms:stringArray,publiccodeYmlVersion:nonEmptyString,releaseDate:nonEmptyString,repoOwner:nonEmptyString,roadmap:optionalUrl,softwareType:nonEmptyString,softwareVersion:nonEmptyString,url:optionalUrl,usedBy:stringArray});function toString$1(L){if(typeof L==`string`)return L;if(typeof L==`number`)return String(L);if(L instanceof Date)return L.toISOString().slice(0,10)}function isNonEmptyString(L){return typeof L==`string`&&L.trim().length>0}function isPlainObject$1(L){return typeof L==`object`&&!!L&&!Array.isArray(L)&&!(L instanceof Date)}function toStringArray$1(L){return Array.isArray(L)?L.filter(L=>typeof L==`string`):[]}function parseDescription(L){let J=[];if(Array.isArray(L.features)){for(let Y of L.features)if(typeof Y==`string`)J.push(Y);else if(isPlainObject$1(Y))for(let[L,X]of Object.entries(Y))J.push(typeof X==`string`?`${L}: ${X}`:L)}return{...isNonEmptyString(L.documentation)?{documentation:L.documentation}:{},features:J,...isNonEmptyString(L.genericName)?{genericName:L.genericName}:{},...isNonEmptyString(L.localisedName)?{localisedName:L.localisedName}:{},...isNonEmptyString(L.longDescription)?{longDescription:L.longDescription.trim()}:{},...isNonEmptyString(L.shortDescription)?{shortDescription:L.shortDescription.trim()}:{}}}function parse$11(L){let J;try{J=(0,import_dist.parse)(L)}catch{return}if(!isPlainObject$1(J)||!isNonEmptyString(J.name)&&!isNonEmptyString(J.url))return;let Y={},X;if(isPlainObject$1(J.description)){let L=J.description;for(let[J,X]of Object.entries(L))isPlainObject$1(X)&&(Y[J]=parseDescription(X));let Z=`en`in Y?`en`:Object.keys(Y)[0];Z&&(X=Y[Z])}let Z=[];if(isPlainObject$1(J.maintenance)){let{maintenance:L}=J;if(Array.isArray(L.contacts)){for(let J of L.contacts)if(isPlainObject$1(J)&&isNonEmptyString(J.name)){let L={name:J.name};isNonEmptyString(J.email)&&(L.email=J.email),isNonEmptyString(J.phone)&&(L.phone=J.phone),isNonEmptyString(J.affiliation)&&(L.affiliation=J.affiliation),Z.push(L)}}}let Q=[];if(isPlainObject$1(J.maintenance)){let{maintenance:L}=J;if(Array.isArray(L.contractors)){for(let J of L.contractors)if(isPlainObject$1(J)&&isNonEmptyString(J.name)){let L={name:J.name},Y=toString$1(J.until);Y&&(L.until=Y),isNonEmptyString(J.website)&&(L.website=J.website),Q.push(L)}}}let $=[];if(isPlainObject$1(J.dependsOn)){let{dependsOn:L}=J;for(let J of[`open`,`proprietary`,`hardware`]){let Y=L[J];if(Array.isArray(Y)){for(let L of Y)if(isPlainObject$1(L)&&isNonEmptyString(L.name)){let Y={category:J,name:L.name},X=toString$1(L.version);X&&(Y.version=X);let Z=toString$1(L.versionMin);Z&&(Y.versionMin=Z);let Q=toString$1(L.versionMax);Q&&(Y.versionMax=Q),typeof L.optional==`boolean`&&(Y.optional=L.optional),$.push(Y)}}}}let ee=[],te;if(isPlainObject$1(J.localisation)){let L=J.localisation;ee=toStringArray$1(L.availableLanguages),typeof L.localisationReady==`boolean`&&(te=L.localisationReady)}let ne,re,ie;if(isPlainObject$1(J.legal)){let{legal:L}=J;isNonEmptyString(L.license)&&(ne=L.license),isNonEmptyString(L.mainCopyrightOwner)&&(re=L.mainCopyrightOwner),isNonEmptyString(L.repoOwner)&&(ie=L.repoOwner)}let ae=toString$1(J.softwareVersion),oe=toString$1(J.releaseDate);return publiccodeSchema.parse({...isNonEmptyString(J.applicationSuite)?{applicationSuite:J.applicationSuite}:{},availableLanguages:ee,categories:toStringArray$1(J.categories),contacts:Z,contractors:Q,dependencies:$,...X?{description:X}:{},descriptions:Y,...isNonEmptyString(J.developmentStatus)?{developmentStatus:J.developmentStatus}:{},inputTypes:toStringArray$1(J.inputTypes),...isNonEmptyString(J.isBasedOn)?{isBasedOn:J.isBasedOn}:{},...isNonEmptyString(J.landingURL)?{landingUrl:J.landingURL}:{},...ne?{license:ne}:{},...te===void 0?{}:{localisationReady:te},...isNonEmptyString(J.logo)?{logo:J.logo}:{},...re?{mainCopyrightOwner:re}:{},...isPlainObject$1(J.maintenance)&&isNonEmptyString(J.maintenance.type)?{maintenanceType:J.maintenance.type}:{},...isNonEmptyString(J.monochromeLogo)?{monochromeLogo:J.monochromeLogo}:{},...isNonEmptyString(J.name)?{name:J.name}:{},outputTypes:toStringArray$1(J.outputTypes),platforms:toStringArray$1(J.platforms),...isNonEmptyString(J.publiccodeYmlVersion)?{publiccodeYmlVersion:J.publiccodeYmlVersion}:toString$1(J.publiccodeYmlVersion)?{publiccodeYmlVersion:toString$1(J.publiccodeYmlVersion)}:{},...oe?{releaseDate:oe}:{},...ie?{repoOwner:ie}:{},...isNonEmptyString(J.roadmap)?{roadmap:J.roadmap}:{},...isNonEmptyString(J.softwareType)?{softwareType:J.softwareType}:{},...ae?{softwareVersion:ae}:{},...isNonEmptyString(J.url)?{url:J.url}:{},usedBy:toStringArray$1(J.usedBy)})}const publiccodeYamlSource=defineSource({async discover(L){return getMatches(L.options,[`publiccode.yml`,`publiccode.yaml`])},key:`publiccodeYaml`,async parse(L,J){let Y=parse$11(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1}),MULTI_VALUE_HEADERS=new Set([`Classifier`,`Platform`,`Project-URL`,`Requires-Dist`,`Requires-External`,`Supported-Platform`]);function parseRfc822Headers(L){let J={},Y=``;for(let X of L.split(`
45598
45598
  `)){if(X.trim()===``)break;if(/^\s/.test(X)&&Y){let L=X.trim();L&&(J[Y]=`${J[Y]}\n${L}`);continue}let L=X.indexOf(`: `);if(L>0){let Z=X.slice(0,L),Q=X.slice(L+2).trim();J[Z]=MULTI_VALUE_HEADERS.has(Z)&&J[Z]?`${J[Z]}\n${Q}`:Q,Y=Z}}return J}function extractRfc822Body(L){let J=L.indexOf(`
45599
45599
 
45600
45600
  `);if(J!==-1)return L.slice(J+2).trim()||void 0}function splitMultiValues(L){return L?L.split(`
45601
- `).map(L=>L.trim()).filter(L=>L.length>0):[]}const pkgInfoDataSchema=object({author:nonEmptyString,author_email:nonEmptyString,classifiers:stringArray,description:nonEmptyString,description_content_type:nonEmptyString,download_url:optionalUrl,home_page:optionalUrl,keywords:array(string$2()).optional(),license:nonEmptyString,long_description:nonEmptyString,maintainer:nonEmptyString,maintainer_email:nonEmptyString,metadata_version:nonEmptyString,name:nonEmptyString,platforms:stringArray,project_urls:record(string$2(),string$2()),requires_dist:stringArray,requires_python:nonEmptyString,summary:nonEmptyString,version:nonEmptyString}),HEADER_MAP={Author:`author`,"Author-email":`author_email`,"Description-Content-Type":`description_content_type`,"Download-URL":`download_url`,"Home-Page":`home_page`,"Home-page":`home_page`,License:`license`,Maintainer:`maintainer`,"Maintainer-email":`maintainer_email`,"Metadata-Version":`metadata_version`,Name:`name`,"Requires-Python":`requires_python`,Summary:`summary`,Version:`version`};function parse$10(L){let J=parseRfc822Headers(L),Y={author:void 0,author_email:void 0,classifiers:[],description:void 0,description_content_type:void 0,download_url:void 0,home_page:void 0,keywords:void 0,license:void 0,long_description:void 0,maintainer:void 0,maintainer_email:void 0,metadata_version:void 0,name:void 0,platforms:[],project_urls:{},requires_dist:[],requires_python:void 0,summary:void 0,version:void 0};for(let[L,X]of Object.entries(HEADER_MAP)){let Z=J[L];Z&&Z!==`UNKNOWN`&&Object.assign(Y,{[X]:Z})}if(J.Summary&&J.Summary!==`UNKNOWN`&&(Y.description=J.Summary),J.Keywords&&J.Keywords!==`UNKNOWN`&&(Y.keywords=J.Keywords.split(`,`).map(L=>L.trim()).filter(Boolean)),Y.classifiers=splitMultiValues(J.Classifier),Y.platforms=splitMultiValues(J.Platform),Y.requires_dist=splitMultiValues(J[`Requires-Dist`]),J[`Project-URL`])for(let L of splitMultiValues(J[`Project-URL`])){let J=L.indexOf(`, `);if(J>0){let X=L.slice(0,J).trim(),Z=L.slice(J+2).trim();Z&&(Y.project_urls[X]=Z)}}return Y.long_description=extractRfc822Body(L),pkgInfoDataSchema.parse(Y)}const pythonPkgInfoSource=defineSource({async discover(L){return getMatches(L.options,[`PKG-INFO`])},key:`pythonPkgInfo`,async parse(L,J){return{data:parse$10(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1});
45601
+ `).map(L=>L.trim()).filter(L=>L.length>0):[]}const pkgInfoDataSchema=object({author:nonEmptyString,author_email:nonEmptyString,classifiers:stringArray,description:nonEmptyString,description_content_type:nonEmptyString,download_url:optionalUrl,home_page:optionalUrl,keywords:array(string$2()).optional(),license:nonEmptyString,long_description:nonEmptyString,maintainer:nonEmptyString,maintainer_email:nonEmptyString,metadata_version:nonEmptyString,name:nonEmptyString,platforms:stringArray,project_urls:record(string$2(),string$2()),requires_dist:stringArray,requires_python:nonEmptyString,summary:nonEmptyString,version:nonEmptyString}),HEADER_MAP={Author:`author`,"Author-email":`author_email`,"Description-Content-Type":`description_content_type`,"Download-URL":`download_url`,"Home-Page":`home_page`,"Home-page":`home_page`,License:`license`,Maintainer:`maintainer`,"Maintainer-email":`maintainer_email`,"Metadata-Version":`metadata_version`,Name:`name`,"Requires-Python":`requires_python`,Summary:`summary`,Version:`version`};function parse$10(L){let J=parseRfc822Headers(L),Y={author:void 0,author_email:void 0,classifiers:[],description:void 0,description_content_type:void 0,download_url:void 0,home_page:void 0,keywords:void 0,license:void 0,long_description:void 0,maintainer:void 0,maintainer_email:void 0,metadata_version:void 0,name:void 0,platforms:[],project_urls:{},requires_dist:[],requires_python:void 0,summary:void 0,version:void 0};for(let[L,X]of Object.entries(HEADER_MAP)){let Z=J[L];Z&&Z!==`UNKNOWN`&&Object.assign(Y,{[X]:Z})}if(J.Summary&&J.Summary!==`UNKNOWN`&&(Y.description=J.Summary),J.Keywords&&J.Keywords!==`UNKNOWN`&&(Y.keywords=splitCommaSeparated(J.Keywords)),Y.classifiers=splitMultiValues(J.Classifier),Y.platforms=splitMultiValues(J.Platform),Y.requires_dist=splitMultiValues(J[`Requires-Dist`]),J[`Project-URL`])for(let L of splitMultiValues(J[`Project-URL`])){let J=L.indexOf(`, `);if(J>0){let X=L.slice(0,J).trim(),Z=L.slice(J+2).trim();Z&&(Y.project_urls[X]=Z)}}return Y.long_description=extractRfc822Body(L),pkgInfoDataSchema.parse(Y)}const pythonPkgInfoSource=defineSource({async discover(L){return getMatches(L.options,[`PKG-INFO`])},key:`pythonPkgInfo`,async parse(L,J){return{data:parse$10(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1});
45602
45602
  /*!
45603
45603
  * Copyright (c) Squirrel Chat et al., All rights reserved.
45604
45604
  * SPDX-License-Identifier: BSD-3-Clause
@@ -45816,11 +45816,11 @@ function peekTable(L,J,Y,X){let Z=J,Q=Y,$,ee=!1,te;for(let J=0;J<L.length;J++){i
45816
45816
  `&&L[ee]!==`\r`)throw new TomlError(`each key-value declaration must be followed by an end-of-line`,{toml:L,ptr:ee});ee=skipVoid(L,ee)}return X}var require_spdx_expression_validate=__commonJSMin(((L,J)=>{var Y=require_spdx_expression_parse(),X=/\s{2,}/;J.exports=function(L){if(L.trim()!==L||X.test(L))return!1;try{return Y(L),!0}catch{return!1}}})),import_spdx_expression_validate=__toESM(require_spdx_expression_validate(),1),PyprojectError=class extends Error{filePath;name=`PyprojectError`;constructor(L,J){super(L,J?.cause?{cause:J.cause}:void 0),this.filePath=J?.filePath}};let log=createLogger$3();function setLogger(L){injectionHelper(L)}const RECORD_PATHS=new Set(`dependencyGroups,project.entryPoints,project.guiScripts,project.optionalDependencies,project.scripts,project.urls,tool.cibuildwheel.environment,tool.coverage.paths,tool.hatch.envs,tool.pdm.devDependencies,tool.pixi.dependencies,tool.pixi.environments,tool.pixi.feature,tool.pixi.pypiDependencies,tool.pixi.tasks,tool.poe.env,tool.poe.poetryHooks,tool.poe.tasks,tool.poetry.dependencies,tool.poetry.devDependencies,tool.poetry.extras,tool.poetry.group,tool.poetry.plugins,tool.poetry.scripts,tool.poetry.urls,tool.pyright.defineConstant,tool.ruff.lint.perFileIgnores,tool.ruff.perFileIgnores,tool.setuptools.packageData,tool.setuptools.packageDir,tool.uv.extraBuildDependencies,tool.uv.sources`.split(`,`));function toCamelCase(L){let J=L.replaceAll(/[-_]([a-z])/g,(L,J)=>J.toUpperCase());return/^[A-Z]/.test(J)&&(J=J[0].toLowerCase()+J.slice(1)),J}function deepCamelCaseKeys(L,J=``){if(Array.isArray(L))return L.map(L=>deepCamelCaseKeys(L,J));if(typeof L==`object`&&L){let Y={};for(let[X,Z]of Object.entries(L)){let L=toCamelCase(X),Q=J?`${J}.${L}`:L;Y[L]=RECORD_PATHS.has(Q)?Z:deepCamelCaseKeys(Z,Q)}return Y}return L}const buildSystemRawShape={"backend-path":array(string$2()).optional(),"build-backend":string$2().optional(),requires:array(string$2()).optional()};function createBuildSystemSchema(L){let J=object(buildSystemRawShape);return L===`error`?J.strict():L===`strip`?J:J.loose()}function normalizePep503Name(L){return L.toLowerCase().replaceAll(/[-_.]+/g,`-`)}function correctSpdx(L){if((0,import_spdx_expression_validate.default)(L))return L;let J=(0,import_spdx_correct.default)(L);if(J)return J;throw new PyprojectError(`Invalid SPDX license expression: "${L}"`)}function transformReadme(L){if(L!==void 0){if(typeof L==`string`)return L;if(L.file!==void 0)return L.file;if(L.text!==void 0){let J=L[`content-type`];return J?{contentType:J,text:L.text}:{text:L.text}}}}function transformLicense(L){if(L!==void 0){if(typeof L==`string`)return{spdx:correctSpdx(L)};if(L.file!==void 0)return{file:L.file};if(L.text!==void 0)return{text:L.text}}}function createProjectSchema(L){let J=object({email:string$2().optional(),name:string$2().optional()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=object({"content-type":string$2().optional(),file:string$2().optional(),text:string$2().optional()}),Z=L===`error`?X.strict():L===`strip`?X:X.loose(),Q=union([string$2(),Z]),$=object({file:string$2().optional(),text:string$2().optional()}),ee=L===`error`?$.strict():L===`strip`?$:$.loose(),te=union([string$2(),ee]),ne=object({authors:array(union([Y,string$2()])).optional(),classifiers:array(string$2()).optional(),dependencies:array(string$2()).optional(),description:string$2().optional(),dynamic:array(string$2()).optional(),"entry-points":record(string$2(),record(string$2(),string$2())).optional(),"gui-scripts":record(string$2(),string$2()).optional(),keywords:array(string$2()).optional(),license:te.optional(),"license-files":array(string$2()).optional(),maintainers:array(union([Y,string$2()])).optional(),name:string$2().optional(),"optional-dependencies":record(string$2(),array(string$2())).optional(),readme:Q.optional(),"requires-python":string$2().optional(),scripts:record(string$2(),string$2()).optional(),urls:record(string$2(),string$2()).optional(),version:string$2().optional()});return(L===`error`?ne.strict():L===`strip`?ne:ne.loose()).transform(({license:L,name:J,readme:Y,...X})=>({...X,license:transformLicense(L),name:J?normalizePep503Name(J):void 0,rawName:J,readme:transformReadme(Y)}))}function createAutopep8Schema(L){let J=object({aggressive:number().optional(),ignore:union([string$2(),array(string$2())]).optional(),max_line_length:number().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createBanditSchema(L){let J=object({exclude:union([string$2(),array(string$2())]).optional(),exclude_dirs:array(string$2()).optional(),skips:array(string$2()).optional(),targets:array(string$2()).optional(),tests:array(string$2()).optional()});return L===`strip`?J:J.loose()}function createBlackSchema(L){let J=union([boolean(),string$2()]),Y=object({color:boolean().optional(),exclude:string$2().optional(),"extend-exclude":string$2().optional(),"force-exclude":string$2().optional(),include:string$2().optional(),"line-length":number().optional(),line_length:number().optional(),preview:boolean().optional(),"python-version":union([string$2(),array(string$2())]).optional(),quiet:boolean().optional(),"required-version":string$2().optional(),required_version:string$2().optional(),"skip-magic-trailing-comma":boolean().optional(),"skip-numeric-underscore-normalization":J.optional(),"skip-string-normalization":J.optional(),skip_string_normalization:J.optional(),"target-version":array(string$2()).optional(),target_version:array(string$2()).optional(),workers:number().optional()});return(L===`error`?Y.strict():L===`strip`?Y:Y.loose()).transform(({"line-length":L,line_length:J,"required-version":Y,required_version:X,"skip-string-normalization":Z,skip_string_normalization:Q,"target-version":$,target_version:ee,...te})=>({...te,"line-length":L??J,"required-version":Y??X,"skip-string-normalization":Z??Q,"target-version":$??ee}))}function createBumpversionSchema(L){let J=object({exclude_bumps:array(string$2()).optional(),filename:string$2().optional(),glob:string$2().optional(),glob_exclude:array(string$2()).optional(),ignore_missing_file:boolean().optional(),ignore_missing_version:boolean().optional(),include_bumps:array(string$2()).optional(),parse:string$2().optional(),regex:boolean().optional(),replace:string$2().optional(),search:string$2().optional(),serialize:array(string$2()).optional()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=object({allow_dirty:boolean().optional(),commit:boolean().optional(),commit_args:string$2().optional(),current_version:string$2().optional(),files:array(Y).optional(),ignore_missing_files:boolean().optional(),ignore_missing_version:boolean().optional(),message:string$2().optional(),parse:string$2().optional(),post_commit_hooks:array(string$2()).optional(),pre_commit_hooks:array(string$2()).optional(),regex:boolean().optional(),replace:string$2().optional(),search:string$2().optional(),serialize:array(string$2()).optional(),sign_tags:boolean().optional(),tag:boolean().optional(),tag_message:string$2().optional(),tag_name:string$2().optional()});return L===`error`?X.strict():L===`strip`?X:X.loose()}function createCheckWheelContentsSchema(L){let J=object({ignore:array(string$2()).optional(),package:string$2().optional(),"src-dir":string$2().optional(),toplevel:union([string$2(),array(string$2())]).optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createCibuildwheelSchema(L){let J=object({}).loose(),Y=object({archs:union([string$2(),array(string$2())]).optional(),"before-all":union([string$2(),array(string$2())]).optional(),"before-build":union([string$2(),array(string$2())]).optional(),"before-test":union([string$2(),array(string$2())]).optional(),build:union([string$2(),array(string$2())]).optional(),"build-frontend":union([string$2(),object({}).loose()]).optional(),environment:record(string$2(),string$2()).optional(),linux:J.optional(),macos:J.optional(),skip:union([string$2(),array(string$2())]).optional(),"test-command":union([string$2(),array(string$2())]).optional(),"test-extras":union([string$2(),array(string$2())]).optional(),"test-requires":union([string$2(),array(string$2())]).optional(),"test-skip":union([string$2(),array(string$2())]).optional(),windows:J.optional()});return L===`error`?Y.strict():L===`strip`?Y:Y.loose()}const multiString$4=union([string$2(),array(string$2())]);function createCodespellSchema(L){let J=object({"after-context":number().optional(),"before-context":number().optional(),builtin:string$2().optional(),"check-filenames":boolean().optional(),"check-hidden":boolean().optional(),context:number().optional(),count:boolean().optional(),dictionary:multiString$4.optional(),"exclude-file":multiString$4.optional(),"ignore-multiline-regex":string$2().optional(),"ignore-regex":string$2().optional(),"ignore-words":multiString$4.optional(),"ignore-words-list":multiString$4.optional(),interactive:number().optional(),"quiet-level":number().optional(),regex:string$2().optional(),skip:multiString$4.optional(),"uri-ignore-words-list":multiString$4.optional(),"uri-regex":string$2().optional(),"write-changes":boolean().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createComfySchema(L){let J=object({DisplayName:string$2().optional(),Icon:string$2().optional(),includes:array(string$2()).optional(),PublisherId:string$2().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createCommitizenSchema(L){let J=object({allowed_prefixes:array(string$2()).optional(),annotated_tag:boolean().optional(),breaking_change_exclamation_in_title:boolean().optional(),bump_message:string$2().optional(),changelog_file:string$2().optional(),changelog_format:string$2().optional(),changelog_incremental:boolean().optional(),encoding:string$2().optional(),gpg_sign:boolean().optional(),major_version_zero:boolean().optional(),message_length_limit:number().optional(),name:string$2().optional(),post_bump_hooks:array(string$2()).optional(),pre_bump_hooks:array(string$2()).optional(),prerelease_offset:number().optional(),style:array(unknown()).optional(),tag_format:string$2().optional(),update_changelog_on_bump:boolean().optional(),version:string$2().optional(),version_files:array(string$2()).optional(),version_provider:string$2().optional(),version_scheme:string$2().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}const multiString$3=union([string$2(),array(string$2())]);function createCoverageSchema(L){let J=object({branch:boolean().optional(),command_line:string$2().optional(),concurrency:multiString$3.optional(),context:string$2().optional(),core:string$2().optional(),cover_pylib:boolean().optional(),data_file:string$2().optional(),debug:multiString$3.optional(),debug_file:string$2().optional(),disable_warnings:multiString$3.optional(),dynamic_context:string$2().optional(),include:multiString$3.optional(),omit:multiString$3.optional(),parallel:boolean().optional(),patch:multiString$3.optional(),plugins:multiString$3.optional(),relative_files:boolean().optional(),sigterm:boolean().optional(),source:multiString$3.optional(),source_dirs:multiString$3.optional(),source_pkgs:multiString$3.optional(),timid:boolean().optional()}),Y=object({exclude_also:multiString$3.optional(),exclude_lines:multiString$3.optional(),fail_under:number().optional(),format:string$2().optional(),ignore_errors:boolean().optional(),include:multiString$3.optional(),include_namespace_packages:boolean().optional(),omit:multiString$3.optional(),partial_also:multiString$3.optional(),partial_branches:multiString$3.optional(),precision:number().optional(),show_missing:boolean().optional(),skip_covered:boolean().optional(),skip_empty:boolean().optional(),sort:string$2().optional()}),X=object({directory:string$2().optional(),extra_css:string$2().optional(),show_contexts:boolean().optional(),skip_covered:boolean().optional(),skip_empty:boolean().optional(),title:string$2().optional()}),Z=object({output:string$2().optional(),package_depth:number().optional()}),Q=object({output:string$2().optional(),pretty_print:boolean().optional(),show_contexts:boolean().optional()}),$=object({line_checksums:boolean().optional(),output:string$2().optional()}),ee=record(string$2(),array(string$2())),te=L===`error`?J.strict():L===`strip`?J:J.loose(),ne=L===`error`?Y.strict():L===`strip`?Y:Y.loose(),re=L===`error`?X.strict():L===`strip`?X:X.loose(),ie=L===`error`?Z.strict():L===`strip`?Z:Z.loose(),ae=L===`error`?Q.strict():L===`strip`?Q:Q.loose(),oe=L===`error`?$.strict():L===`strip`?$:$.loose(),se=object({html:re.optional(),json:ae.optional(),lcov:oe.optional(),paths:ee.optional(),report:ne.optional(),run:te.optional(),xml:ie.optional()});return L===`error`?se.strict():L===`strip`?se:se.loose()}function createDagsterSchema(L){let J=object({module_name:string$2().optional(),project_name:string$2().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createDistutilsSchema(L){let J=object({python_tag:string$2().optional(),universal:union([boolean(),number()]).optional()}),Y=object({bdist_wheel:(L===`error`?J.strict():L===`strip`?J:J.loose()).optional(),sdist:object({}).loose().optional()});return L===`error`?Y.strict():L===`strip`?Y:Y.loose()}const multiString$2=union([string$2(),array(string$2())]);function createDocformatterSchema(L){let J=object({black:boolean().optional(),blank:boolean().optional(),"close-quotes-on-newline":boolean().optional(),exclude:multiString$2.optional(),"in-place":boolean().optional(),"pre-summary-newline":boolean().optional(),"pre-summary-space":boolean().optional(),recursive:boolean().optional(),"rest-section-adorns":string$2().optional(),style:string$2().optional(),"wrap-descriptions":number().optional(),"wrap-summaries":number().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}const multiString$1=union([string$2(),array(string$2())]);function createFlake8Schema(L){let J=object({builtins:multiString$1.optional(),"copyright-check":boolean().optional(),count:boolean().optional(),"disable-noqa":boolean().optional(),doctests:boolean().optional(),"enable-extensions":multiString$1.optional(),exclude:multiString$1.optional(),"extend-exclude":multiString$1.optional(),"extend-ignore":multiString$1.optional(),"extend-select":multiString$1.optional(),filename:multiString$1.optional(),format:string$2().optional(),"hang-closing":boolean().optional(),ignore:multiString$1.optional(),"indent-size":number().optional(),jobs:number().optional(),"max-complexity":number().optional(),"max-doc-length":number().optional(),"max-line-length":number().optional(),"per-file-ignores":multiString$1.optional(),quiet:boolean().optional(),"require-plugins":multiString$1.optional(),select:multiString$1.optional(),"show-source":boolean().optional(),statistics:boolean().optional(),tee:boolean().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createFlitSchema(L){let J=object({name:string$2().optional()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=object({exclude:array(string$2()).optional(),include:array(string$2()).optional()}),Z=L===`error`?X.strict():L===`strip`?X:X.loose(),Q=object({module:Y.optional(),sdist:Z.optional()});return L===`error`?Q.strict():L===`strip`?Q:Q.loose()}function createHatchSchema(L){let J=object({targets:object({}).loose().optional()}),Y=L===`strip`?J:J.loose(),X=object({path:string$2().optional(),source:string$2().optional()}),Z=L===`strip`?X:X.loose(),Q=object({build:Y.optional(),envs:record(string$2(),unknown()).optional(),metadata:object({}).loose().optional(),version:Z.optional()});return L===`error`?Q.strict():L===`strip`?Q:Q.loose()}const looseBoolean=union([boolean(),string$2()]);function createIsortSchema(L){let J=union([string$2(),array(string$2())]),Y=object({add_imports:J.optional(),atomic:looseBoolean.optional(),color_output:looseBoolean.optional(),combine_as_imports:looseBoolean.optional(),default_section:string$2().optional(),ensure_newline_before_comments:looseBoolean.optional(),extend_skip:J.optional(),force_alphabetical_sort_within_sections:looseBoolean.optional(),force_grid_wrap:number().optional(),force_single_line:looseBoolean.optional(),force_sort_within_sections:looseBoolean.optional(),forced_separate:array(string$2()).optional(),ignore_whitespace:looseBoolean.optional(),include_trailing_comma:looseBoolean.optional(),indent:union([number(),string$2()]).optional(),known_first_party:J.optional(),known_third_party:J.optional(),length_sort:looseBoolean.optional(),line_length:number().optional(),lines_after_imports:number().optional(),lines_between_sections:number().optional(),lines_between_types:number().optional(),multi_line_output:number().optional(),order_by_type:looseBoolean.optional(),profile:string$2().optional(),py_version:union([string$2(),number()]).optional(),sections:J.optional(),skip:J.optional(),skip_gitignore:looseBoolean.optional(),skip_glob:J.optional(),split_on_trailing_comma:looseBoolean.optional(),src_paths:array(string$2()).optional(),use_parentheses:looseBoolean.optional()});return L===`strip`?Y:Y.loose()}function createJupyterReleaserSchema(L){let J=object({"before-build-npm":array(string$2()).optional(),"before-build-python":array(string$2()).optional()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=object({}).loose(),Z=object({hooks:Y.optional(),options:X.optional()});return L===`error`?Z.strict():L===`strip`?Z:Z.loose()}function createMypySchema(L){let J=object({}).loose(),Y=object({allow_redefinition:boolean().optional(),allow_subclassing_any:boolean().optional(),allow_untyped_globals:boolean().optional(),check_untyped_defs:boolean().optional(),color_output:boolean().optional(),disable_error_code:union([string$2(),array(string$2())]).optional(),disallow_any_decorated:boolean().optional(),disallow_any_generics:boolean().optional(),disallow_any_unimported:boolean().optional(),disallow_incomplete_defs:boolean().optional(),disallow_subclassing_any:boolean().optional(),disallow_untyped_calls:boolean().optional(),disallow_untyped_decorators:boolean().optional(),disallow_untyped_defs:boolean().optional(),enable_error_code:union([string$2(),array(string$2())]).optional(),error_summary:boolean().optional(),exclude:union([string$2(),array(string$2())]).optional(),exclude_gitignore:boolean().optional(),explicit_package_bases:boolean().optional(),files:union([string$2(),array(string$2())]).optional(),follow_imports:string$2().optional(),ignore_errors:boolean().optional(),ignore_missing_imports:boolean().optional(),implicit_reexport:boolean().optional(),local_partial_types:boolean().optional(),mypy_path:union([string$2(),array(string$2())]).optional(),namespace_packages:boolean().optional(),no_implicit_optional:boolean().optional(),no_implicit_reexport:boolean().optional(),no_site_packages:boolean().optional(),overrides:array(J).optional(),packages:union([string$2(),array(string$2())]).optional(),plugins:array(string$2()).optional(),pretty:boolean().optional(),python_version:union([string$2(),number()]).optional(),show_column_numbers:boolean().optional(),show_error_codes:boolean().optional(),show_error_context:boolean().optional(),show_traceback:boolean().optional(),strict:boolean().optional(),strict_concatenate:boolean().optional(),strict_equality:boolean().optional(),strict_optional:boolean().optional(),warn_no_return:boolean().optional(),warn_redundant_casts:boolean().optional(),warn_return_any:boolean().optional(),warn_unreachable:boolean().optional(),warn_unused_configs:boolean().optional(),warn_unused_ignores:boolean().optional()});return L===`error`?Y.strict():L===`strip`?Y:Y.loose()}function createPdmSchema(L){let J=object({name:string$2().optional(),url:string$2().optional()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=object({build:object({}).loose().optional(),"dev-dependencies":record(string$2(),array(string$2())).optional(),distribution:boolean().optional(),source:array(Y).optional()});return L===`error`?X.strict():L===`strip`?X:X.loose()}function createPixiSchema(L){let J=object({dependencies:record(string$2(),unknown()).optional(),environments:record(string$2(),unknown()).optional(),feature:record(string$2(),unknown()).optional(),"pypi-dependencies":record(string$2(),unknown()).optional(),tasks:record(string$2(),unknown()).optional(),workspace:object({}).loose().optional()});return L===`strip`?J:J.loose()}const multiString=union([string$2(),array(string$2())]);function createPoeSchema(L){let J=object({"default-array-item-task-type":string$2().optional(),"default-array-task-type":string$2().optional(),"default-task-type":string$2().optional(),env:record(string$2(),string$2()).optional(),envfile:multiString.optional(),executor:union([string$2(),object({type:string$2()}).loose()]).optional(),include:union([string$2(),array(union([string$2(),record(string$2(),string$2())]))]).optional(),"poetry-command":string$2().optional(),"poetry-hooks":record(string$2(),string$2()).optional(),"shell-interpreter":multiString.optional(),tasks:record(string$2(),unknown()).optional(),verbosity:number().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createPoetrySchema(L){let J=object({authors:array(string$2()).optional(),build:union([object({}).loose(),string$2()]).optional(),classifiers:array(string$2()).optional(),dependencies:record(string$2(),unknown()).optional(),description:string$2().optional(),"dev-dependencies":record(string$2(),unknown()).optional(),documentation:string$2().optional(),exclude:union([string$2(),array(string$2())]).optional(),extras:record(string$2(),array(string$2())).optional(),group:record(string$2(),unknown()).optional(),homepage:string$2().optional(),include:union([string$2(),array(union([string$2(),object({}).loose()]))]).optional(),keywords:array(string$2()).optional(),license:string$2().optional(),maintainers:array(string$2()).optional(),name:string$2().optional(),"package-mode":boolean().optional(),packages:array(object({include:string$2()}).loose()).optional(),plugins:record(string$2(),unknown()).optional(),readme:union([string$2(),array(string$2())]).optional(),repository:string$2().optional(),"requires-plugins":union([array(string$2()),record(string$2(),unknown())]).optional(),scripts:record(string$2(),string$2()).optional(),source:array(object({name:string$2(),url:string$2()}).loose()).optional(),urls:record(string$2(),string$2()).optional(),version:string$2().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createPydocstyleSchema(L){let J=union([string$2(),array(string$2())]),Y=object({add_ignore:J.optional(),add_select:J.optional(),convention:string$2().optional(),ignore:J.optional(),ignore_decorators:string$2().optional(),match:string$2().optional(),match_dir:string$2().optional(),select:J.optional()});return L===`error`?Y.strict():L===`strip`?Y:Y.loose()}function createPylintSchema(L){let J=object({disable:union([string$2(),array(string$2())]).optional(),enable:union([string$2(),array(string$2())]).optional(),"fail-on":union([string$2(),array(string$2())]).optional(),"good-names":union([string$2(),array(string$2())]).optional(),"ignore-paths":array(string$2()).optional(),"ignore-patterns":array(string$2()).optional(),jobs:number().optional(),"load-plugins":array(string$2()).optional(),"max-args":number().optional(),"max-branches":number().optional(),"max-line-length":union([number(),string$2()]).optional(),"max-locals":number().optional(),"max-nested-blocks":number().optional(),"max-positional-arguments":number().optional(),"max-statements":number().optional(),"py-version":union([string$2(),array(number())]).optional()});return L===`strip`?J:J.loose()}const diagnosticSeverity=union([_enum([`none`,`warning`,`error`,`information`]),boolean()]);function createPyrightSchema(L){let J=object({defineConstant:record(string$2(),union([boolean(),string$2()])).optional(),exclude:array(string$2()).optional(),executionEnvironments:array(record(string$2(),unknown())).optional(),extends:string$2().optional(),extraPaths:array(string$2()).optional(),ignore:array(string$2()).optional(),include:array(string$2()).optional(),pythonPlatform:string$2().optional(),pythonVersion:string$2().optional(),reportAssertAlwaysTrue:diagnosticSeverity.optional(),reportConstantRedefinition:diagnosticSeverity.optional(),reportDeprecated:diagnosticSeverity.optional(),reportDuplicateImport:diagnosticSeverity.optional(),reportFunctionMemberAccess:diagnosticSeverity.optional(),reportGeneralTypeIssues:diagnosticSeverity.optional(),reportIncompatibleMethodOverride:diagnosticSeverity.optional(),reportIncompatibleVariableOverride:diagnosticSeverity.optional(),reportIncompleteStub:diagnosticSeverity.optional(),reportInconsistentConstructor:diagnosticSeverity.optional(),reportInvalidStringEscapeSequence:diagnosticSeverity.optional(),reportInvalidStubStatement:diagnosticSeverity.optional(),reportInvalidTypeVarUse:diagnosticSeverity.optional(),reportMatchNotExhaustive:diagnosticSeverity.optional(),reportMissingImports:diagnosticSeverity.optional(),reportMissingModuleSource:diagnosticSeverity.optional(),reportMissingParameterType:diagnosticSeverity.optional(),reportMissingTypeArgument:diagnosticSeverity.optional(),reportMissingTypeStubs:diagnosticSeverity.optional(),reportOverlappingOverload:diagnosticSeverity.optional(),reportPrivateImportUsage:diagnosticSeverity.optional(),reportPrivateUsage:diagnosticSeverity.optional(),reportSelfClsParameterName:diagnosticSeverity.optional(),reportTypeCommentUsage:diagnosticSeverity.optional(),reportUnboundVariable:diagnosticSeverity.optional(),reportUnknownArgumentType:diagnosticSeverity.optional(),reportUnknownLambdaType:diagnosticSeverity.optional(),reportUnknownMemberType:diagnosticSeverity.optional(),reportUnknownParameterType:diagnosticSeverity.optional(),reportUnknownVariableType:diagnosticSeverity.optional(),reportUnnecessaryCast:diagnosticSeverity.optional(),reportUnnecessaryComparison:diagnosticSeverity.optional(),reportUnnecessaryContains:diagnosticSeverity.optional(),reportUnnecessaryIsInstance:diagnosticSeverity.optional(),reportUnnecessaryTypeIgnoreComment:diagnosticSeverity.optional(),reportUnsupportedDunderAll:diagnosticSeverity.optional(),reportUntypedBaseClass:diagnosticSeverity.optional(),reportUntypedClassDecorator:diagnosticSeverity.optional(),reportUntypedFunctionDecorator:diagnosticSeverity.optional(),reportUntypedNamedTuple:diagnosticSeverity.optional(),reportUnusedClass:diagnosticSeverity.optional(),reportUnusedExpression:diagnosticSeverity.optional(),reportUnusedFunction:diagnosticSeverity.optional(),reportUnusedImport:diagnosticSeverity.optional(),reportUnusedVariable:diagnosticSeverity.optional(),reportWildcardImportFromLibrary:diagnosticSeverity.optional(),strict:array(string$2()).optional(),strictDictionaryInference:boolean().optional(),strictListInference:boolean().optional(),strictSetInference:boolean().optional(),stubPath:string$2().optional(),typeCheckingMode:string$2().optional(),typeshedPath:string$2().optional(),useLibraryCodeForTypes:boolean().optional(),venv:string$2().optional(),venvPath:string$2().optional(),verboseOutput:boolean().optional()});return L===`strip`?J:J.loose()}function createPytestSchema(L){let J=union([string$2(),array(string$2())]),Y=object({ini_options:object({addopts:J.optional(),asyncio_mode:string$2().optional(),consider_namespace_packages:boolean().optional(),console_output_style:string$2().optional(),doctest_optionflags:J.optional(),env:array(string$2()).optional(),filterwarnings:array(string$2()).optional(),junit_family:string$2().optional(),log_cli:union([boolean(),string$2()]).optional(),log_cli_level:string$2().optional(),markers:J.optional(),minversion:union([string$2(),number()]).optional(),norecursedirs:J.optional(),python_classes:J.optional(),python_files:J.optional(),python_functions:J.optional(),pythonpath:J.optional(),qt_api:string$2().optional(),testpaths:J.optional()}).loose().optional()});return L===`strip`?Y:Y.loose()}function createRuffSchema(L){let J=object({"extend-select":array(string$2()).optional(),fixable:array(string$2()).optional(),ignore:array(string$2()).optional(),isort:object({}).loose().optional(),"per-file-ignores":record(string$2(),array(string$2())).optional(),select:array(string$2()).optional()}),Y=L===`strip`?J:J.loose(),X=object({"docstring-code-format":boolean().optional(),"indent-style":string$2().optional(),"line-ending":string$2().optional(),"quote-style":string$2().optional()}),Z=L===`strip`?X:X.loose(),Q=object({}).loose().optional(),$=object({builtins:array(string$2()).optional(),exclude:array(string$2()).optional(),"extend-exclude":array(string$2()).optional(),"extend-fixable":array(string$2()).optional(),"extend-select":array(string$2()).optional(),fix:boolean().optional(),fixable:array(string$2()).optional(),"flake8-quotes":Q,"flake8-tidy-imports":Q,format:Z.optional(),ignore:array(string$2()).optional(),"ignore-init-module-imports":boolean().optional(),include:array(string$2()).optional(),"indent-width":number().optional(),isort:object({}).loose().optional(),"line-length":number().optional(),lint:Y.optional(),mccabe:Q,"output-format":string$2().optional(),"per-file-ignores":record(string$2(),array(string$2())).optional(),preview:boolean().optional(),pyupgrade:Q,select:array(string$2()).optional(),"show-fixes":boolean().optional(),src:array(string$2()).optional(),"target-version":string$2().optional(),unfixable:array(string$2()).optional()});return L===`error`?$.strict():L===`strip`?$:$.loose()}function createSetuptoolsSchema(L){let J=object({dynamic:object({}).loose().optional(),"include-package-data":boolean().optional(),"package-data":record(string$2(),array(string$2())).optional(),"package-dir":record(string$2(),string$2()).optional(),packages:union([array(string$2()),object({find:object({}).loose().optional()}).loose()]).optional(),platforms:array(string$2()).optional(),"py-modules":array(string$2()).optional(),"script-files":array(string$2()).optional(),"zip-safe":boolean().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createSetuptoolsScmSchema(L){let J=object({dist_name:string$2().optional(),fallback_root:string$2().optional(),fallback_version:string$2().optional(),local_scheme:string$2().optional(),normalize:boolean().optional(),parentdir_prefix_version:string$2().optional(),relative_to:string$2().optional(),root:string$2().optional(),search_parent_directories:boolean().optional(),tag_regex:string$2().optional(),version_cls:string$2().optional(),version_file:string$2().optional(),version_file_template:string$2().optional(),version_scheme:string$2().optional(),write_to:string$2().optional(),write_to_template:string$2().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createTbumpSchema(L){let J=object({}).loose(),Y=object({current:string$2().optional(),regex:string$2().optional()}),X=L===`error`?Y.strict():L===`strip`?Y:Y.loose(),Z=object({message_template:string$2().optional(),push_remote:string$2().optional(),tag_template:string$2().optional()}),Q=L===`error`?Z.strict():L===`strip`?Z:Z.loose(),$=object({before_commit:array(object({}).loose()).optional(),file:array(J).optional(),git:Q.optional(),github_url:string$2().optional(),version:X.optional()});return L===`error`?$.strict():L===`strip`?$:$.loose()}function createTowncrierSchema(L){let J=object({check:boolean().optional(),directory:string$2().optional(),name:string$2().optional(),showcontent:boolean().optional()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=object({all_bullets:boolean().optional(),create_add_extension:boolean().optional(),create_eof_newline:boolean().optional(),directory:string$2().optional(),filename:string$2().optional(),ignore:array(string$2()).optional(),issue_format:string$2().optional(),issue_pattern:string$2().optional(),name:string$2().optional(),orphan_prefix:string$2().optional(),package:string$2().optional(),package_dir:string$2().optional(),single_file:boolean().optional(),start_string:string$2().optional(),template:string$2().optional(),title_format:union([string$2(),boolean()]).optional(),type:array(Y).optional(),underlines:array(string$2()).optional(),version:string$2().optional(),wrap:boolean().optional()});return L===`error`?X.strict():L===`strip`?X:X.loose()}function createUvSchema(L){let J=object({"build-backend":object({}).loose().optional(),"build-constraint-dependencies":array(string$2()).optional(),conflicts:array(unknown()).optional(),"constraint-dependencies":array(string$2()).optional(),"dependency-metadata":array(object({}).loose()).optional(),"dev-dependencies":array(string$2()).optional(),"extra-build-dependencies":record(string$2(),array(unknown())).optional(),"extra-index-url":union([string$2(),array(string$2())]).optional(),"find-links":array(string$2()).optional(),index:array(object({name:string$2().optional(),url:string$2().optional()}).loose()).optional(),"index-url":string$2().optional(),managed:boolean().optional(),"no-build-isolation-package":array(string$2()).optional(),"override-dependencies":array(string$2()).optional(),package:boolean().optional(),"python-downloads":string$2().optional(),"python-preference":string$2().optional(),"required-environments":array(string$2()).optional(),sources:record(string$2(),unknown()).optional(),workspace:object({}).loose().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createYapfSchema(L){let J=object({allow_split_before_dict_value:boolean().optional(),based_on_style:string$2().optional(),coalesce_brackets:boolean().optional(),column_limit:number().optional(),continuation_indent_width:number().optional(),dedent_closing_brackets:boolean().optional(),indent_width:number().optional(),space_between_ending_comma_and_closing_bracket:boolean().optional(),spaces_around_power_operator:boolean().optional(),spaces_before_comment:number().optional(),split_before_closing_bracket:boolean().optional(),split_before_first_argument:boolean().optional(),split_before_logical_operator:boolean().optional()});return L===`error`?J.strict():L===`strip`?J:J.loose()}function createPyprojectSchema(L){let J=object({"include-group":string$2()}),Y=L===`error`?J.strict():L===`strip`?J:J.loose(),X=union([string$2(),Y]),Z=record(string$2(),union([array(X),unknown()])),Q=object({autopep8:createAutopep8Schema(L).optional(),bandit:createBanditSchema(L).optional(),black:createBlackSchema(L).optional(),bumpversion:createBumpversionSchema(L).optional(),"check-wheel-contents":createCheckWheelContentsSchema(L).optional(),cibuildwheel:createCibuildwheelSchema(L).optional(),codespell:createCodespellSchema(L).optional(),comfy:createComfySchema(L).optional(),commitizen:createCommitizenSchema(L).optional(),coverage:createCoverageSchema(L).optional(),dagster:createDagsterSchema(L).optional(),distutils:createDistutilsSchema(L).optional(),docformatter:createDocformatterSchema(L).optional(),flake8:createFlake8Schema(L).optional(),flit:createFlitSchema(L).optional(),hatch:createHatchSchema(L).optional(),isort:createIsortSchema(L).optional(),"jupyter-releaser":createJupyterReleaserSchema(L).optional(),mypy:createMypySchema(L).optional(),pdm:createPdmSchema(L).optional(),pixi:createPixiSchema(L).optional(),poe:createPoeSchema(L).optional(),poetry:createPoetrySchema(L).optional(),pydocstyle:createPydocstyleSchema(L).optional(),pylint:createPylintSchema(L).optional(),pyright:createPyrightSchema(L).optional(),pytest:createPytestSchema(L).optional(),ruff:createRuffSchema(L).optional(),setuptools:createSetuptoolsSchema(L).optional(),setuptools_scm:createSetuptoolsScmSchema(L).optional(),tbump:createTbumpSchema(L).optional(),towncrier:createTowncrierSchema(L).optional(),uv:createUvSchema(L).optional(),yapf:createYapfSchema(L).optional()}),$=L===`error`?Q.strict():L===`strip`?Q:Q.loose(),ee=object({"build-system":createBuildSystemSchema(L).optional(),"dependency-groups":Z.optional(),project:createProjectSchema(L).optional(),tool:$.optional()});return L===`error`?ee.strict():L===`strip`?ee:ee.loose()}function parsePyproject(L,J={}){let{camelCase:Y=!0,unknownKeyPolicy:X=`passthrough`}=J,Z;try{Z=parse$9(L)}catch(L){throw new PyprojectError(`Invalid TOML: ${L instanceof Error?L.message:String(L)}`,{cause:L instanceof Error?L:Error(String(L))})}let Q=createPyprojectSchema(X),$;try{$=Q.safeParse(Z)}catch(L){throw L instanceof PyprojectError?L:new PyprojectError(`Validation failed: ${L instanceof Error?L.message:String(L)}`,{cause:L instanceof Error?L:Error(String(L))})}if(!$.success)throw new PyprojectError(`Validation failed:\n${$.error.issues.map(L=>` - ${L.path.join(`.`)}: ${L.message}`).join(`
45817
45817
  `)}`,{cause:$.error});return Y?deepCamelCaseKeys($.data):$.data}function parse$8(L){return parsePyproject(L,{camelCase:!0,unknownKeyPolicy:`strip`})}const pythonPyprojectTomlSource=defineSource({async discover(L){return getMatches(L.options,[`pyproject.toml`])},key:`pythonPyprojectToml`,async parse(L,J){return{data:parse$8(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1});function parseConfigparser(L){let J={},Y=``,X=``;for(let Z of L.split(`
45818
45818
  `)){let L=Z.trimEnd();if(L===``||L.startsWith(`#`)||L.startsWith(`;`))continue;let Q=/^\[([^\]]+)\]/.exec(L);if(Q){Y=Q[1],J[Y]??={},X=``;continue}if(/^\s/.test(Z)&&X&&Y){let Z=J[Y][X],Q=L.trim();Q&&(J[Y][X]=Z?`${Z}\n${Q}`:Q);continue}let $=/^([^=:]+)[=:](.*)$/.exec(L);if($&&Y){let L=$[1].trim(),Z=$[2].trim();J[Y]??={},J[Y][L]=Z,X=L}}return J}function splitMultiline(L){return L.split(`
45819
- `).map(L=>L.trim()).filter(L=>L.length>0)}const setupCfgDataSchema=object({author:nonEmptyString,author_email:nonEmptyString,classifiers:stringArray,description:nonEmptyString,download_url:optionalUrl,extras_require:record(string$2(),array(string$2())),install_requires:stringArray,keywords:array(string$2()).optional(),license:nonEmptyString,long_description:nonEmptyString,maintainer:nonEmptyString,maintainer_email:nonEmptyString,name:nonEmptyString,project_urls:record(string$2(),string$2()),python_requires:nonEmptyString,url:optionalUrl,version:nonEmptyString}),STRING_ATTRS$1=new Set([`author`,`author_email`,`description`,`download_url`,`license`,`long_description`,`maintainer`,`maintainer_email`,`name`,`url`,`version`]);function parse$7(L){let J=parseConfigparser(L),Y=J.metadata??{},X=J.options??{},Z={author:void 0,author_email:void 0,classifiers:[],description:void 0,download_url:void 0,extras_require:{},install_requires:[],keywords:void 0,license:void 0,long_description:void 0,maintainer:void 0,maintainer_email:void 0,name:void 0,project_urls:{},python_requires:void 0,url:void 0,version:void 0};for(let L of STRING_ATTRS$1){let J=Y[L];J&&Object.assign(Z,{[L]:J})}if(Y.classifiers&&(Z.classifiers=splitMultiline(Y.classifiers)),Y.keywords&&(Z.keywords=Y.keywords.split(`,`).map(L=>L.trim()).filter(Boolean)),Y.project_urls)for(let L of splitMultiline(Y.project_urls)){let J=L.indexOf(`=`);if(J>0){let Y=L.slice(0,J).trim(),X=L.slice(J+1).trim();X&&(Z.project_urls[Y]=X)}}X.install_requires&&(Z.install_requires=splitMultiline(X.install_requires)),X.python_requires&&(Z.python_requires=X.python_requires);let Q=J[`options.extras_require`];if(Q)for(let[L,J]of Object.entries(Q))Z.extras_require[L]=splitMultiline(J);return setupCfgDataSchema.parse(Z)}const pythonSetupCfgSource=defineSource({async discover(L){return getMatches(L.options,[`setup.cfg`])},key:`pythonSetupCfg`,async parse(L,J){return{data:parse$7(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1});var __defProp=Object.defineProperty,__name=(L,J)=>__defProp(L,`name`,{value:J,configurable:!0}),Edit=class{static{__name(this,`Edit`)}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:L,oldEndIndex:J,newEndIndex:Y,startPosition:X,oldEndPosition:Z,newEndPosition:Q}){this.startIndex=L>>>0,this.oldEndIndex=J>>>0,this.newEndIndex=Y>>>0,this.startPosition=X,this.oldEndPosition=Z,this.newEndPosition=Q}editPoint(L,J){let Y=J,X={...L};if(J>=this.oldEndIndex){Y=this.newEndIndex+(J-this.oldEndIndex);let Z=L.row;X.row=this.newEndPosition.row+(L.row-this.oldEndPosition.row),X.column=Z===this.oldEndPosition.row?this.newEndPosition.column+(L.column-this.oldEndPosition.column):L.column}else J>this.startIndex&&(Y=this.newEndIndex,X.row=this.newEndPosition.row,X.column=this.newEndPosition.column);return{point:X,index:Y}}editRange(L){let J={startIndex:L.startIndex,startPosition:{...L.startPosition},endIndex:L.endIndex,endPosition:{...L.endPosition}};return L.endIndex>=this.oldEndIndex?L.endIndex!==2**53-1&&(J.endIndex=this.newEndIndex+(L.endIndex-this.oldEndIndex),J.endPosition={row:this.newEndPosition.row+(L.endPosition.row-this.oldEndPosition.row),column:L.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(L.endPosition.column-this.oldEndPosition.column):L.endPosition.column},J.endIndex<this.newEndIndex&&(J.endIndex=2**53-1,J.endPosition={row:2**53-1,column:2**53-1})):L.endIndex>this.startIndex&&(J.endIndex=this.startIndex,J.endPosition={...this.startPosition}),L.startIndex>=this.oldEndIndex?(J.startIndex=this.newEndIndex+(L.startIndex-this.oldEndIndex),J.startPosition={row:this.newEndPosition.row+(L.startPosition.row-this.oldEndPosition.row),column:L.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(L.startPosition.column-this.oldEndPosition.column):L.startPosition.column},J.startIndex<this.newEndIndex&&(J.startIndex=2**53-1,J.startPosition={row:2**53-1,column:2**53-1})):L.startIndex>this.startIndex&&(J.startIndex=this.startIndex,J.startPosition={...this.startPosition}),J}},SIZE_OF_SHORT=2,SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},INTERNAL=Symbol(`INTERNAL`);function assertInternal(L){if(L!==INTERNAL)throw Error(`Illegal constructor`)}__name(assertInternal,`assertInternal`);function isPoint(L){return!!L&&typeof L.row==`number`&&typeof L.column==`number`}__name(isPoint,`isPoint`);function setModule(L){C=L}__name(setModule,`setModule`);var C,LookaheadIterator=class{static{__name(this,`LookaheadIterator`)}0=0;language;constructor(L,J,Y){assertInternal(L),this[0]=J,this.language=Y}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||`ERROR`}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(L,J){return C._ts_lookahead_iterator_reset(this[0],L[0],J)?(this.language=L,!0):!1}resetState(L){return!!C._ts_lookahead_iterator_reset_state(this[0],L)}[Symbol.iterator](){return{next:__name(()=>C._ts_lookahead_iterator_next(this[0])?{done:!1,value:this.currentType}:{done:!0,value:``},`next`)}}};function getText(L,J,Y,X){let Z=Y-J,Q=L.textCallback(J,X);if(Q){for(J+=Q.length;J<Y;){let Y=L.textCallback(J,X);if(Y&&Y.length>0)J+=Y.length,Q+=Y;else break}J>Y&&(Q=Q.slice(0,Z))}return Q??``}__name(getText,`getText`);var Tree=class L{static{__name(this,`Tree`)}0=0;textCallback;language;constructor(L,J,Y,X){assertInternal(L),this[0]=J,this.language=Y,this.textCallback=X}copy(){return new L(INTERNAL,C._ts_tree_copy(this[0]),this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(L,J){let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(Y,L,`i32`),marshalPoint(Y+SIZE_OF_INT,J),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}edit(L){marshalEdit(L),C._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(J){if(!(J instanceof L))throw TypeError(`Argument must be a Tree`);C._ts_tree_get_changed_ranges_wasm(this[0],J[0]);let Y=C.getValue(TRANSFER_BUFFER,`i32`),X=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Z=Array(Y);if(Y>0){let L=X;for(let J=0;J<Y;J++)Z[J]=unmarshalRange(L),L+=SIZE_OF_RANGE;C._free(X)}return Z}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Y=Array(L);if(L>0){let X=J;for(let J=0;J<L;J++)Y[J]=unmarshalRange(X),X+=SIZE_OF_RANGE;C._free(J)}return Y}},TreeCursor=class L{static{__name(this,`TreeCursor`)}0=0;1=0;2=0;3=0;tree;constructor(L,J){assertInternal(L),this.tree=J,unmarshalTreeCursor(this)}copy(){let J=new L(INTERNAL,this.tree);return C._ts_tree_cursor_copy_wasm(this.tree[0]),unmarshalTreeCursor(J),J}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||`ERROR`}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){marshalTreeCursor(this);let L=C._ts_tree_cursor_start_index_wasm(this.tree[0]),J=C._ts_tree_cursor_end_index_wasm(this.tree[0]);C._ts_tree_cursor_start_position_wasm(this.tree[0]);let Y=unmarshalPoint(TRANSFER_BUFFER);return getText(this.tree,L,J,Y)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoLastChild(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoParent(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoNextSibling(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoPreviousSibling(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoDescendant(L){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],L),unmarshalTreeCursor(this)}gotoFirstChildForIndex(L){marshalTreeCursor(this),C.setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,L,`i32`);let J=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),J===1}gotoFirstChildForPosition(L){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,L);let J=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),J===1}reset(L){marshalNode(L),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(L){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(L,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],L.tree[0]),unmarshalTreeCursor(this)}},Node=class{static{__name(this,`Node`)}0=0;_children;_namedChildren;constructor(L,{id:J,tree:Y,startIndex:X,startPosition:Z,other:Q}){assertInternal(L),this[0]=Q,this.id=J,this.tree=Y,this.startIndex=X,this.startPosition=Z}id;startIndex;startPosition;tree;get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||`ERROR`}get grammarType(){return this.tree.language.types[this.grammarId]||`ERROR`}get isNamed(){return marshalNode(this),C._ts_node_is_named_wasm(this.tree[0])===1}get isExtra(){return marshalNode(this),C._ts_node_is_extra_wasm(this.tree[0])===1}get isError(){return marshalNode(this),C._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return marshalNode(this),C._ts_node_is_missing_wasm(this.tree[0])===1}get hasChanges(){return marshalNode(this),C._ts_node_has_changes_wasm(this.tree[0])===1}get hasError(){return marshalNode(this),C._ts_node_has_error_wasm(this.tree[0])===1}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get text(){return getText(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}equals(L){return this.tree===L.tree&&this.id===L.id}child(L){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],L),unmarshalNode(this.tree)}namedChild(L){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],L),unmarshalNode(this.tree)}childForFieldId(L){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],L),unmarshalNode(this.tree)}childForFieldName(L){let J=this.tree.language.fields.indexOf(L);return J===-1?null:this.childForFieldId(J)}fieldNameForChild(L){marshalNode(this);let J=C._ts_node_field_name_for_child_wasm(this.tree[0],L);return J?C.AsciiToString(J):null}fieldNameForNamedChild(L){marshalNode(this);let J=C._ts_node_field_name_for_named_child_wasm(this.tree[0],L);return J?C.AsciiToString(J):null}childrenForFieldName(L){let J=this.tree.language.fields.indexOf(L);return J!==-1&&J!==0?this.childrenForFieldId(J):[]}childrenForFieldId(L){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],L);let J=C.getValue(TRANSFER_BUFFER,`i32`),Y=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),X=Array(J);if(J>0){let L=Y;for(let Y=0;Y<J;Y++)X[Y]=unmarshalNode(this.tree,L),L+=SIZE_OF_NODE;C._free(Y)}return X}firstChildForIndex(L){marshalNode(this);let J=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(J,L,`i32`),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(L){marshalNode(this);let J=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(J,L,`i32`),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`);if(this._children=Array(L),L>0){let Y=J;for(let J=0;J<L;J++)this._children[J]=unmarshalNode(this.tree,Y),Y+=SIZE_OF_NODE;C._free(J)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`);if(this._namedChildren=Array(L),L>0){let Y=J;for(let J=0;J<L;J++)this._namedChildren[J]=unmarshalNode(this.tree,Y),Y+=SIZE_OF_NODE;C._free(J)}}return this._namedChildren}descendantsOfType(L,J=ZERO_POINT,Y=ZERO_POINT){Array.isArray(L)||(L=[L]);let X=[],Z=this.tree.language.types;for(let J of L)J==`ERROR`&&X.push(65535);for(let J=0,Y=Z.length;J<Y;J++)L.includes(Z[J])&&X.push(J);let Q=C._malloc(SIZE_OF_INT*X.length);for(let L=0,J=X.length;L<J;L++)C.setValue(Q+L*SIZE_OF_INT,X[L],`i32`);marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],Q,X.length,J.row,J.column,Y.row,Y.column);let $=C.getValue(TRANSFER_BUFFER,`i32`),ee=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),te=Array($);if($>0){let L=ee;for(let J=0;J<$;J++)te[J]=unmarshalNode(this.tree,L),L+=SIZE_OF_NODE}return C._free(ee),C._free(Q),te}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}childWithDescendant(L){return marshalNode(this),marshalNode(L,1),C._ts_node_child_with_descendant_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(L,J=L){if(typeof L!=`number`||typeof J!=`number`)throw Error(`Arguments must be numbers`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(Y,L,`i32`),C.setValue(Y+SIZE_OF_INT,J,`i32`),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(L,J=L){if(typeof L!=`number`||typeof J!=`number`)throw Error(`Arguments must be numbers`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(Y,L,`i32`),C.setValue(Y+SIZE_OF_INT,J,`i32`),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(L,J=L){if(!isPoint(L)||!isPoint(J))throw Error(`Arguments must be {row, column} objects`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(Y,L),marshalPoint(Y+SIZE_OF_POINT,J),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(L,J=L){if(!isPoint(L)||!isPoint(J))throw Error(`Arguments must be {row, column} objects`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(Y,L),marshalPoint(Y+SIZE_OF_POINT,J),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}edit(L){if(this.startIndex>=L.oldEndIndex){this.startIndex=L.newEndIndex+(this.startIndex-L.oldEndIndex);let J,Y;this.startPosition.row>L.oldEndPosition.row?(J=this.startPosition.row-L.oldEndPosition.row,Y=this.startPosition.column):(J=0,Y=this.startPosition.column,this.startPosition.column>=L.oldEndPosition.column&&(Y=this.startPosition.column-L.oldEndPosition.column)),J>0?(this.startPosition.row+=J,this.startPosition.column=Y):this.startPosition.column+=Y}else this.startIndex>L.startIndex&&(this.startIndex=L.newEndIndex,this.startPosition.row=L.newEndPosition.row,this.startPosition.column=L.newEndPosition.column)}toString(){marshalNode(this);let L=C._ts_node_to_string_wasm(this.tree[0]),J=C.AsciiToString(L);return C._free(L),J}};function unmarshalCaptures(L,J,Y,X,Z){for(let Q=0,$=Z.length;Q<$;Q++){let $=C.getValue(Y,`i32`);Y+=SIZE_OF_INT;let ee=unmarshalNode(J,Y);Y+=SIZE_OF_NODE,Z[Q]={patternIndex:X,name:L.captureNames[$],node:ee}}return Y}__name(unmarshalCaptures,`unmarshalCaptures`);function marshalNode(L,J=0){let Y=TRANSFER_BUFFER+J*SIZE_OF_NODE;C.setValue(Y,L.id,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L.startIndex,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L.startPosition.row,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L.startPosition.column,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L[0],`i32`)}__name(marshalNode,`marshalNode`);function unmarshalNode(L,J=TRANSFER_BUFFER){let Y=C.getValue(J,`i32`);if(J+=SIZE_OF_INT,Y===0)return null;let X=C.getValue(J,`i32`);J+=SIZE_OF_INT;let Z=C.getValue(J,`i32`);J+=SIZE_OF_INT;let Q=C.getValue(J,`i32`);J+=SIZE_OF_INT;let $=C.getValue(J,`i32`);return new Node(INTERNAL,{id:Y,tree:L,startIndex:X,startPosition:{row:Z,column:Q},other:$})}__name(unmarshalNode,`unmarshalNode`);function marshalTreeCursor(L,J=TRANSFER_BUFFER){C.setValue(J+0*SIZE_OF_INT,L[0],`i32`),C.setValue(J+1*SIZE_OF_INT,L[1],`i32`),C.setValue(J+2*SIZE_OF_INT,L[2],`i32`),C.setValue(J+3*SIZE_OF_INT,L[3],`i32`)}__name(marshalTreeCursor,`marshalTreeCursor`);function unmarshalTreeCursor(L){L[0]=C.getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,`i32`),L[1]=C.getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,`i32`),L[2]=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,`i32`),L[3]=C.getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,`i32`)}__name(unmarshalTreeCursor,`unmarshalTreeCursor`);function marshalPoint(L,J){C.setValue(L,J.row,`i32`),C.setValue(L+SIZE_OF_INT,J.column,`i32`)}__name(marshalPoint,`marshalPoint`);function unmarshalPoint(L){return{row:C.getValue(L,`i32`)>>>0,column:C.getValue(L+SIZE_OF_INT,`i32`)>>>0}}__name(unmarshalPoint,`unmarshalPoint`);function marshalRange(L,J){marshalPoint(L,J.startPosition),L+=SIZE_OF_POINT,marshalPoint(L,J.endPosition),L+=SIZE_OF_POINT,C.setValue(L,J.startIndex,`i32`),L+=SIZE_OF_INT,C.setValue(L,J.endIndex,`i32`),L+=SIZE_OF_INT}__name(marshalRange,`marshalRange`);function unmarshalRange(L){let J={};return J.startPosition=unmarshalPoint(L),L+=SIZE_OF_POINT,J.endPosition=unmarshalPoint(L),L+=SIZE_OF_POINT,J.startIndex=C.getValue(L,`i32`)>>>0,L+=SIZE_OF_INT,J.endIndex=C.getValue(L,`i32`)>>>0,J}__name(unmarshalRange,`unmarshalRange`);function marshalEdit(L,J=TRANSFER_BUFFER){marshalPoint(J,L.startPosition),J+=SIZE_OF_POINT,marshalPoint(J,L.oldEndPosition),J+=SIZE_OF_POINT,marshalPoint(J,L.newEndPosition),J+=SIZE_OF_POINT,C.setValue(J,L.startIndex,`i32`),J+=SIZE_OF_INT,C.setValue(J,L.oldEndIndex,`i32`),J+=SIZE_OF_INT,C.setValue(J,L.newEndIndex,`i32`),J+=SIZE_OF_INT}__name(marshalEdit,`marshalEdit`);function unmarshalLanguageMetadata(L){return{major_version:C.getValue(L,`i32`),minor_version:C.getValue(L+=SIZE_OF_INT,`i32`),patch_version:C.getValue(L+=SIZE_OF_INT,`i32`)}}__name(unmarshalLanguageMetadata,`unmarshalLanguageMetadata`);var LANGUAGE_FUNCTION_REGEX=/^tree_sitter_\w+$/,Language=class L{static{__name(this,`Language`)}0=0;types;fields;constructor(L,J){assertInternal(L),this[0]=J,this.types=Array(C._ts_language_symbol_count(this[0]));for(let L=0,J=this.types.length;L<J;L++)C._ts_language_symbol_type(this[0],L)<2&&(this.types[L]=C.UTF8ToString(C._ts_language_symbol_name(this[0],L)));this.fields=Array(C._ts_language_field_count(this[0])+1);for(let L=0,J=this.fields.length;L<J;L++){let J=C._ts_language_field_name_for_id(this[0],L);J===0?this.fields[L]=null:this.fields[L]=C.UTF8ToString(J)}}get name(){let L=C._ts_language_name(this[0]);return L===0?null:C.UTF8ToString(L)}get abiVersion(){return C._ts_language_abi_version(this[0])}get metadata(){return C._ts_language_metadata_wasm(this[0]),C.getValue(TRANSFER_BUFFER,`i32`)===0?null:unmarshalLanguageMetadata(TRANSFER_BUFFER+SIZE_OF_INT)}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(L){let J=this.fields.indexOf(L);return J===-1?null:J}fieldNameForId(L){return this.fields[L]??null}idForNodeType(L,J){let Y=C.lengthBytesUTF8(L),X=C._malloc(Y+1);C.stringToUTF8(L,X,Y+1);let Z=C._ts_language_symbol_for_name(this[0],X,Y,J?1:0);return C._free(X),Z||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(L){let J=C._ts_language_symbol_name(this[0],L);return J?C.UTF8ToString(J):null}nodeTypeIsNamed(L){return!!C._ts_language_type_is_named_wasm(this[0],L)}nodeTypeIsVisible(L){return!!C._ts_language_type_is_visible_wasm(this[0],L)}get supertypes(){C._ts_language_supertypes_wasm(this[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Y=Array(L);if(L>0){let X=J;for(let J=0;J<L;J++)Y[J]=C.getValue(X,`i16`),X+=SIZE_OF_SHORT}return Y}subtypes(L){C._ts_language_subtypes_wasm(this[0],L);let J=C.getValue(TRANSFER_BUFFER,`i32`),Y=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),X=Array(J);if(J>0){let L=Y;for(let Y=0;Y<J;Y++)X[Y]=C.getValue(L,`i16`),L+=SIZE_OF_SHORT}return X}nextState(L,J){return C._ts_language_next_state(this[0],L,J)}lookaheadIterator(L){let J=C._ts_lookahead_iterator_new(this[0],L);return J?new LookaheadIterator(INTERNAL,J,this):null}static async load(J){let Y;if(J instanceof Uint8Array)Y=J;else if(globalThis.process?.versions.node)Y=await(await import(`fs/promises`)).readFile(J);else{let L=await fetch(J);if(!L.ok){let J=await L.text();throw Error(`Language.load failed with status ${L.status}.
45819
+ `).map(L=>L.trim()).filter(L=>L.length>0)}const setupCfgDataSchema=object({author:nonEmptyString,author_email:nonEmptyString,classifiers:stringArray,description:nonEmptyString,download_url:optionalUrl,extras_require:record(string$2(),array(string$2())),install_requires:stringArray,keywords:array(string$2()).optional(),license:nonEmptyString,long_description:nonEmptyString,maintainer:nonEmptyString,maintainer_email:nonEmptyString,name:nonEmptyString,project_urls:record(string$2(),string$2()),python_requires:nonEmptyString,url:optionalUrl,version:nonEmptyString}),STRING_ATTRS$1=new Set([`author`,`author_email`,`description`,`download_url`,`license`,`long_description`,`maintainer`,`maintainer_email`,`name`,`url`,`version`]);function parse$7(L){let J=parseConfigparser(L),Y=J.metadata??{},X=J.options??{},Z={author:void 0,author_email:void 0,classifiers:[],description:void 0,download_url:void 0,extras_require:{},install_requires:[],keywords:void 0,license:void 0,long_description:void 0,maintainer:void 0,maintainer_email:void 0,name:void 0,project_urls:{},python_requires:void 0,url:void 0,version:void 0};for(let L of STRING_ATTRS$1){let J=Y[L];J&&Object.assign(Z,{[L]:J})}if(Y.classifiers&&(Z.classifiers=splitMultiline(Y.classifiers)),Y.keywords&&(Z.keywords=splitCommaSeparated(Y.keywords)),Y.project_urls)for(let L of splitMultiline(Y.project_urls)){let J=L.indexOf(`=`);if(J>0){let Y=L.slice(0,J).trim(),X=L.slice(J+1).trim();X&&(Z.project_urls[Y]=X)}}X.install_requires&&(Z.install_requires=splitMultiline(X.install_requires)),X.python_requires&&(Z.python_requires=X.python_requires);let Q=J[`options.extras_require`];if(Q)for(let[L,J]of Object.entries(Q))Z.extras_require[L]=splitMultiline(J);return setupCfgDataSchema.parse(Z)}const pythonSetupCfgSource=defineSource({async discover(L){return getMatches(L.options,[`setup.cfg`])},key:`pythonSetupCfg`,async parse(L,J){return{data:parse$7(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1});var __defProp=Object.defineProperty,__name=(L,J)=>__defProp(L,`name`,{value:J,configurable:!0}),Edit=class{static{__name(this,`Edit`)}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:L,oldEndIndex:J,newEndIndex:Y,startPosition:X,oldEndPosition:Z,newEndPosition:Q}){this.startIndex=L>>>0,this.oldEndIndex=J>>>0,this.newEndIndex=Y>>>0,this.startPosition=X,this.oldEndPosition=Z,this.newEndPosition=Q}editPoint(L,J){let Y=J,X={...L};if(J>=this.oldEndIndex){Y=this.newEndIndex+(J-this.oldEndIndex);let Z=L.row;X.row=this.newEndPosition.row+(L.row-this.oldEndPosition.row),X.column=Z===this.oldEndPosition.row?this.newEndPosition.column+(L.column-this.oldEndPosition.column):L.column}else J>this.startIndex&&(Y=this.newEndIndex,X.row=this.newEndPosition.row,X.column=this.newEndPosition.column);return{point:X,index:Y}}editRange(L){let J={startIndex:L.startIndex,startPosition:{...L.startPosition},endIndex:L.endIndex,endPosition:{...L.endPosition}};return L.endIndex>=this.oldEndIndex?L.endIndex!==2**53-1&&(J.endIndex=this.newEndIndex+(L.endIndex-this.oldEndIndex),J.endPosition={row:this.newEndPosition.row+(L.endPosition.row-this.oldEndPosition.row),column:L.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(L.endPosition.column-this.oldEndPosition.column):L.endPosition.column},J.endIndex<this.newEndIndex&&(J.endIndex=2**53-1,J.endPosition={row:2**53-1,column:2**53-1})):L.endIndex>this.startIndex&&(J.endIndex=this.startIndex,J.endPosition={...this.startPosition}),L.startIndex>=this.oldEndIndex?(J.startIndex=this.newEndIndex+(L.startIndex-this.oldEndIndex),J.startPosition={row:this.newEndPosition.row+(L.startPosition.row-this.oldEndPosition.row),column:L.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(L.startPosition.column-this.oldEndPosition.column):L.startPosition.column},J.startIndex<this.newEndIndex&&(J.startIndex=2**53-1,J.startPosition={row:2**53-1,column:2**53-1})):L.startIndex>this.startIndex&&(J.startIndex=this.startIndex,J.startPosition={...this.startPosition}),J}},SIZE_OF_SHORT=2,SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},INTERNAL=Symbol(`INTERNAL`);function assertInternal(L){if(L!==INTERNAL)throw Error(`Illegal constructor`)}__name(assertInternal,`assertInternal`);function isPoint(L){return!!L&&typeof L.row==`number`&&typeof L.column==`number`}__name(isPoint,`isPoint`);function setModule(L){C=L}__name(setModule,`setModule`);var C,LookaheadIterator=class{static{__name(this,`LookaheadIterator`)}0=0;language;constructor(L,J,Y){assertInternal(L),this[0]=J,this.language=Y}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||`ERROR`}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(L,J){return C._ts_lookahead_iterator_reset(this[0],L[0],J)?(this.language=L,!0):!1}resetState(L){return!!C._ts_lookahead_iterator_reset_state(this[0],L)}[Symbol.iterator](){return{next:__name(()=>C._ts_lookahead_iterator_next(this[0])?{done:!1,value:this.currentType}:{done:!0,value:``},`next`)}}};function getText(L,J,Y,X){let Z=Y-J,Q=L.textCallback(J,X);if(Q){for(J+=Q.length;J<Y;){let Y=L.textCallback(J,X);if(Y&&Y.length>0)J+=Y.length,Q+=Y;else break}J>Y&&(Q=Q.slice(0,Z))}return Q??``}__name(getText,`getText`);var Tree=class L{static{__name(this,`Tree`)}0=0;textCallback;language;constructor(L,J,Y,X){assertInternal(L),this[0]=J,this.language=Y,this.textCallback=X}copy(){return new L(INTERNAL,C._ts_tree_copy(this[0]),this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(L,J){let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(Y,L,`i32`),marshalPoint(Y+SIZE_OF_INT,J),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}edit(L){marshalEdit(L),C._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(J){if(!(J instanceof L))throw TypeError(`Argument must be a Tree`);C._ts_tree_get_changed_ranges_wasm(this[0],J[0]);let Y=C.getValue(TRANSFER_BUFFER,`i32`),X=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Z=Array(Y);if(Y>0){let L=X;for(let J=0;J<Y;J++)Z[J]=unmarshalRange(L),L+=SIZE_OF_RANGE;C._free(X)}return Z}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Y=Array(L);if(L>0){let X=J;for(let J=0;J<L;J++)Y[J]=unmarshalRange(X),X+=SIZE_OF_RANGE;C._free(J)}return Y}},TreeCursor=class L{static{__name(this,`TreeCursor`)}0=0;1=0;2=0;3=0;tree;constructor(L,J){assertInternal(L),this.tree=J,unmarshalTreeCursor(this)}copy(){let J=new L(INTERNAL,this.tree);return C._ts_tree_cursor_copy_wasm(this.tree[0]),unmarshalTreeCursor(J),J}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||`ERROR`}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){marshalTreeCursor(this);let L=C._ts_tree_cursor_start_index_wasm(this.tree[0]),J=C._ts_tree_cursor_end_index_wasm(this.tree[0]);C._ts_tree_cursor_start_position_wasm(this.tree[0]);let Y=unmarshalPoint(TRANSFER_BUFFER);return getText(this.tree,L,J,Y)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoLastChild(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoParent(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoNextSibling(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoPreviousSibling(){marshalTreeCursor(this);let L=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),L===1}gotoDescendant(L){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],L),unmarshalTreeCursor(this)}gotoFirstChildForIndex(L){marshalTreeCursor(this),C.setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,L,`i32`);let J=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),J===1}gotoFirstChildForPosition(L){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,L);let J=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),J===1}reset(L){marshalNode(L),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(L){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(L,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],L.tree[0]),unmarshalTreeCursor(this)}},Node=class{static{__name(this,`Node`)}0=0;_children;_namedChildren;constructor(L,{id:J,tree:Y,startIndex:X,startPosition:Z,other:Q}){assertInternal(L),this[0]=Q,this.id=J,this.tree=Y,this.startIndex=X,this.startPosition=Z}id;startIndex;startPosition;tree;get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||`ERROR`}get grammarType(){return this.tree.language.types[this.grammarId]||`ERROR`}get isNamed(){return marshalNode(this),C._ts_node_is_named_wasm(this.tree[0])===1}get isExtra(){return marshalNode(this),C._ts_node_is_extra_wasm(this.tree[0])===1}get isError(){return marshalNode(this),C._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return marshalNode(this),C._ts_node_is_missing_wasm(this.tree[0])===1}get hasChanges(){return marshalNode(this),C._ts_node_has_changes_wasm(this.tree[0])===1}get hasError(){return marshalNode(this),C._ts_node_has_error_wasm(this.tree[0])===1}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get text(){return getText(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}equals(L){return this.tree===L.tree&&this.id===L.id}child(L){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],L),unmarshalNode(this.tree)}namedChild(L){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],L),unmarshalNode(this.tree)}childForFieldId(L){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],L),unmarshalNode(this.tree)}childForFieldName(L){let J=this.tree.language.fields.indexOf(L);return J===-1?null:this.childForFieldId(J)}fieldNameForChild(L){marshalNode(this);let J=C._ts_node_field_name_for_child_wasm(this.tree[0],L);return J?C.AsciiToString(J):null}fieldNameForNamedChild(L){marshalNode(this);let J=C._ts_node_field_name_for_named_child_wasm(this.tree[0],L);return J?C.AsciiToString(J):null}childrenForFieldName(L){let J=this.tree.language.fields.indexOf(L);return J!==-1&&J!==0?this.childrenForFieldId(J):[]}childrenForFieldId(L){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],L);let J=C.getValue(TRANSFER_BUFFER,`i32`),Y=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),X=Array(J);if(J>0){let L=Y;for(let Y=0;Y<J;Y++)X[Y]=unmarshalNode(this.tree,L),L+=SIZE_OF_NODE;C._free(Y)}return X}firstChildForIndex(L){marshalNode(this);let J=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(J,L,`i32`),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(L){marshalNode(this);let J=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(J,L,`i32`),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`);if(this._children=Array(L),L>0){let Y=J;for(let J=0;J<L;J++)this._children[J]=unmarshalNode(this.tree,Y),Y+=SIZE_OF_NODE;C._free(J)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`);if(this._namedChildren=Array(L),L>0){let Y=J;for(let J=0;J<L;J++)this._namedChildren[J]=unmarshalNode(this.tree,Y),Y+=SIZE_OF_NODE;C._free(J)}}return this._namedChildren}descendantsOfType(L,J=ZERO_POINT,Y=ZERO_POINT){Array.isArray(L)||(L=[L]);let X=[],Z=this.tree.language.types;for(let J of L)J==`ERROR`&&X.push(65535);for(let J=0,Y=Z.length;J<Y;J++)L.includes(Z[J])&&X.push(J);let Q=C._malloc(SIZE_OF_INT*X.length);for(let L=0,J=X.length;L<J;L++)C.setValue(Q+L*SIZE_OF_INT,X[L],`i32`);marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],Q,X.length,J.row,J.column,Y.row,Y.column);let $=C.getValue(TRANSFER_BUFFER,`i32`),ee=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),te=Array($);if($>0){let L=ee;for(let J=0;J<$;J++)te[J]=unmarshalNode(this.tree,L),L+=SIZE_OF_NODE}return C._free(ee),C._free(Q),te}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}childWithDescendant(L){return marshalNode(this),marshalNode(L,1),C._ts_node_child_with_descendant_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(L,J=L){if(typeof L!=`number`||typeof J!=`number`)throw Error(`Arguments must be numbers`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(Y,L,`i32`),C.setValue(Y+SIZE_OF_INT,J,`i32`),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(L,J=L){if(typeof L!=`number`||typeof J!=`number`)throw Error(`Arguments must be numbers`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(Y,L,`i32`),C.setValue(Y+SIZE_OF_INT,J,`i32`),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(L,J=L){if(!isPoint(L)||!isPoint(J))throw Error(`Arguments must be {row, column} objects`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(Y,L),marshalPoint(Y+SIZE_OF_POINT,J),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(L,J=L){if(!isPoint(L)||!isPoint(J))throw Error(`Arguments must be {row, column} objects`);marshalNode(this);let Y=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(Y,L),marshalPoint(Y+SIZE_OF_POINT,J),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}edit(L){if(this.startIndex>=L.oldEndIndex){this.startIndex=L.newEndIndex+(this.startIndex-L.oldEndIndex);let J,Y;this.startPosition.row>L.oldEndPosition.row?(J=this.startPosition.row-L.oldEndPosition.row,Y=this.startPosition.column):(J=0,Y=this.startPosition.column,this.startPosition.column>=L.oldEndPosition.column&&(Y=this.startPosition.column-L.oldEndPosition.column)),J>0?(this.startPosition.row+=J,this.startPosition.column=Y):this.startPosition.column+=Y}else this.startIndex>L.startIndex&&(this.startIndex=L.newEndIndex,this.startPosition.row=L.newEndPosition.row,this.startPosition.column=L.newEndPosition.column)}toString(){marshalNode(this);let L=C._ts_node_to_string_wasm(this.tree[0]),J=C.AsciiToString(L);return C._free(L),J}};function unmarshalCaptures(L,J,Y,X,Z){for(let Q=0,$=Z.length;Q<$;Q++){let $=C.getValue(Y,`i32`);Y+=SIZE_OF_INT;let ee=unmarshalNode(J,Y);Y+=SIZE_OF_NODE,Z[Q]={patternIndex:X,name:L.captureNames[$],node:ee}}return Y}__name(unmarshalCaptures,`unmarshalCaptures`);function marshalNode(L,J=0){let Y=TRANSFER_BUFFER+J*SIZE_OF_NODE;C.setValue(Y,L.id,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L.startIndex,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L.startPosition.row,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L.startPosition.column,`i32`),Y+=SIZE_OF_INT,C.setValue(Y,L[0],`i32`)}__name(marshalNode,`marshalNode`);function unmarshalNode(L,J=TRANSFER_BUFFER){let Y=C.getValue(J,`i32`);if(J+=SIZE_OF_INT,Y===0)return null;let X=C.getValue(J,`i32`);J+=SIZE_OF_INT;let Z=C.getValue(J,`i32`);J+=SIZE_OF_INT;let Q=C.getValue(J,`i32`);J+=SIZE_OF_INT;let $=C.getValue(J,`i32`);return new Node(INTERNAL,{id:Y,tree:L,startIndex:X,startPosition:{row:Z,column:Q},other:$})}__name(unmarshalNode,`unmarshalNode`);function marshalTreeCursor(L,J=TRANSFER_BUFFER){C.setValue(J+0*SIZE_OF_INT,L[0],`i32`),C.setValue(J+1*SIZE_OF_INT,L[1],`i32`),C.setValue(J+2*SIZE_OF_INT,L[2],`i32`),C.setValue(J+3*SIZE_OF_INT,L[3],`i32`)}__name(marshalTreeCursor,`marshalTreeCursor`);function unmarshalTreeCursor(L){L[0]=C.getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,`i32`),L[1]=C.getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,`i32`),L[2]=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,`i32`),L[3]=C.getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,`i32`)}__name(unmarshalTreeCursor,`unmarshalTreeCursor`);function marshalPoint(L,J){C.setValue(L,J.row,`i32`),C.setValue(L+SIZE_OF_INT,J.column,`i32`)}__name(marshalPoint,`marshalPoint`);function unmarshalPoint(L){return{row:C.getValue(L,`i32`)>>>0,column:C.getValue(L+SIZE_OF_INT,`i32`)>>>0}}__name(unmarshalPoint,`unmarshalPoint`);function marshalRange(L,J){marshalPoint(L,J.startPosition),L+=SIZE_OF_POINT,marshalPoint(L,J.endPosition),L+=SIZE_OF_POINT,C.setValue(L,J.startIndex,`i32`),L+=SIZE_OF_INT,C.setValue(L,J.endIndex,`i32`),L+=SIZE_OF_INT}__name(marshalRange,`marshalRange`);function unmarshalRange(L){let J={};return J.startPosition=unmarshalPoint(L),L+=SIZE_OF_POINT,J.endPosition=unmarshalPoint(L),L+=SIZE_OF_POINT,J.startIndex=C.getValue(L,`i32`)>>>0,L+=SIZE_OF_INT,J.endIndex=C.getValue(L,`i32`)>>>0,J}__name(unmarshalRange,`unmarshalRange`);function marshalEdit(L,J=TRANSFER_BUFFER){marshalPoint(J,L.startPosition),J+=SIZE_OF_POINT,marshalPoint(J,L.oldEndPosition),J+=SIZE_OF_POINT,marshalPoint(J,L.newEndPosition),J+=SIZE_OF_POINT,C.setValue(J,L.startIndex,`i32`),J+=SIZE_OF_INT,C.setValue(J,L.oldEndIndex,`i32`),J+=SIZE_OF_INT,C.setValue(J,L.newEndIndex,`i32`),J+=SIZE_OF_INT}__name(marshalEdit,`marshalEdit`);function unmarshalLanguageMetadata(L){return{major_version:C.getValue(L,`i32`),minor_version:C.getValue(L+=SIZE_OF_INT,`i32`),patch_version:C.getValue(L+=SIZE_OF_INT,`i32`)}}__name(unmarshalLanguageMetadata,`unmarshalLanguageMetadata`);var LANGUAGE_FUNCTION_REGEX=/^tree_sitter_\w+$/,Language=class L{static{__name(this,`Language`)}0=0;types;fields;constructor(L,J){assertInternal(L),this[0]=J,this.types=Array(C._ts_language_symbol_count(this[0]));for(let L=0,J=this.types.length;L<J;L++)C._ts_language_symbol_type(this[0],L)<2&&(this.types[L]=C.UTF8ToString(C._ts_language_symbol_name(this[0],L)));this.fields=Array(C._ts_language_field_count(this[0])+1);for(let L=0,J=this.fields.length;L<J;L++){let J=C._ts_language_field_name_for_id(this[0],L);J===0?this.fields[L]=null:this.fields[L]=C.UTF8ToString(J)}}get name(){let L=C._ts_language_name(this[0]);return L===0?null:C.UTF8ToString(L)}get abiVersion(){return C._ts_language_abi_version(this[0])}get metadata(){return C._ts_language_metadata_wasm(this[0]),C.getValue(TRANSFER_BUFFER,`i32`)===0?null:unmarshalLanguageMetadata(TRANSFER_BUFFER+SIZE_OF_INT)}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(L){let J=this.fields.indexOf(L);return J===-1?null:J}fieldNameForId(L){return this.fields[L]??null}idForNodeType(L,J){let Y=C.lengthBytesUTF8(L),X=C._malloc(Y+1);C.stringToUTF8(L,X,Y+1);let Z=C._ts_language_symbol_for_name(this[0],X,Y,J?1:0);return C._free(X),Z||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(L){let J=C._ts_language_symbol_name(this[0],L);return J?C.UTF8ToString(J):null}nodeTypeIsNamed(L){return!!C._ts_language_type_is_named_wasm(this[0],L)}nodeTypeIsVisible(L){return!!C._ts_language_type_is_visible_wasm(this[0],L)}get supertypes(){C._ts_language_supertypes_wasm(this[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Y=Array(L);if(L>0){let X=J;for(let J=0;J<L;J++)Y[J]=C.getValue(X,`i16`),X+=SIZE_OF_SHORT}return Y}subtypes(L){C._ts_language_subtypes_wasm(this[0],L);let J=C.getValue(TRANSFER_BUFFER,`i32`),Y=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),X=Array(J);if(J>0){let L=Y;for(let Y=0;Y<J;Y++)X[Y]=C.getValue(L,`i16`),L+=SIZE_OF_SHORT}return X}nextState(L,J){return C._ts_language_next_state(this[0],L,J)}lookaheadIterator(L){let J=C._ts_lookahead_iterator_new(this[0],L);return J?new LookaheadIterator(INTERNAL,J,this):null}static async load(J){let Y;if(J instanceof Uint8Array)Y=J;else if(globalThis.process?.versions.node)Y=await(await import(`fs/promises`)).readFile(J);else{let L=await fetch(J);if(!L.ok){let J=await L.text();throw Error(`Language.load failed with status ${L.status}.
45820
45820
 
45821
45821
  ${J}`)}let X=L.clone();try{Y=await WebAssembly.compileStreaming(L)}catch(L){console.error(`wasm streaming compile failed:`,L),console.error(`falling back to ArrayBuffer instantiation`),Y=new Uint8Array(await X.arrayBuffer())}}let X=await C.loadWebAssemblyModule(Y,{loadAsync:!0}),Z=Object.keys(X),Q=Z.find(L=>LANGUAGE_FUNCTION_REGEX.test(L)&&!L.includes(`external_scanner_`));if(!Q)throw console.log(`Couldn't find language function in Wasm file. Symbols:
45822
45822
  ${JSON.stringify(Z,null,2)}`),Error(`Language.load failed: no language function found in Wasm file`);return new L(INTERNAL,X[Q]())}};async function Module2(moduleArg={}){var moduleRtn,Module=moduleArg,ENVIRONMENT_IS_WEB=typeof window==`object`,ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope<`u`,ENVIRONMENT_IS_NODE=typeof process==`object`&&process.versions?.node&&process.type!=`renderer`;if(ENVIRONMENT_IS_NODE){let{createRequire:L}=await import(`module`);var require=L(import.meta.url)}Module.currentQueryProgressCallback=null,Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null;var arguments_=[],thisProgram=`./this.program`,quit_=__name((L,J)=>{throw J},`quit_`),_scriptName=import.meta.url,scriptDirectory=``;function locateFile(L){return Module.locateFile?Module.locateFile(L,scriptDirectory):scriptDirectory+L}__name(locateFile,`locateFile`);var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require(`fs`);_scriptName.startsWith(`file:`)&&(scriptDirectory=require(`path`).dirname(require(`url`).fileURLToPath(_scriptName))+`/`),readBinary=__name(L=>(L=isFileURI(L)?new URL(L):L,fs.readFileSync(L)),`readBinary`),readAsync=__name(async(L,J=!0)=>(L=isFileURI(L)?new URL(L):L,fs.readFileSync(L,J?void 0:`utf8`)),`readAsync`),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,`/`)),arguments_=process.argv.slice(2),quit_=__name((L,J)=>{throw process.exitCode=L,J},`quit_`)}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(`.`,_scriptName).href}catch{}ENVIRONMENT_IS_WORKER&&(readBinary=__name(L=>{var J=new XMLHttpRequest;return J.open(`GET`,L,!1),J.responseType=`arraybuffer`,J.send(null),new Uint8Array(J.response)},`readBinary`)),readAsync=__name(async L=>{if(isFileURI(L))return new Promise((J,Y)=>{var X=new XMLHttpRequest;X.open(`GET`,L,!0),X.responseType=`arraybuffer`,X.onload=()=>{if(X.status==200||X.status==0&&X.response){J(X.response);return}Y(X.status)},X.onerror=Y,X.send(null)});var J=await fetch(L,{credentials:`same-origin`});if(J.ok)return J.arrayBuffer();throw Error(J.status+` : `+J.url)},`readAsync`)}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=__name(L=>L.startsWith(`file://`),`isFileURI`),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,HEAP_DATA_VIEW,runtimeInitialized=!1;function updateMemoryViews(){var L=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(L),Module.HEAP16=new Int16Array(L),Module.HEAPU8=HEAPU8=new Uint8Array(L),Module.HEAPU16=HEAPU16=new Uint16Array(L),Module.HEAP32=new Int32Array(L),Module.HEAPU32=HEAPU32=new Uint32Array(L),Module.HEAPF32=new Float32Array(L),Module.HEAPF64=new Float64Array(L),Module.HEAP64=new BigInt64Array(L),Module.HEAPU64=new BigUint64Array(L),Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(L),LE_HEAP_UPDATE()}__name(updateMemoryViews,`updateMemoryViews`);function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var L=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:L/65536,maximum:32768})}updateMemoryViews()}__name(initMemory,`initMemory`);var __RELOC_FUNCS__=[];function preRun(){if(Module.preRun)for(typeof Module.preRun==`function`&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}__name(preRun,`preRun`);function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}__name(initRuntime,`initRuntime`);function preMain(){}__name(preMain,`preMain`);function postRun(){if(Module.postRun)for(typeof Module.postRun==`function`&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}__name(postRun,`postRun`);function abort(L){Module.onAbort?.(L),L=`Aborted(`+L+`)`,err(L),ABORT=!0,L+=`. Build with -sASSERTIONS for more info.`;var J=new WebAssembly.RuntimeError(L);throw readyPromiseReject?.(J),J}__name(abort,`abort`);var wasmBinaryFile;function findWasmBinary(){return Module.locateFile?locateFile(`web-tree-sitter.wasm`):new URL(`web-tree-sitter.wasm`,import.meta.url).href}__name(findWasmBinary,`findWasmBinary`);function getBinarySync(L){if(L==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(L);throw`both async and sync fetching of the wasm failed`}__name(getBinarySync,`getBinarySync`);async function getWasmBinary(L){if(!wasmBinary)try{var J=await readAsync(L);return new Uint8Array(J)}catch{}return getBinarySync(L)}__name(getWasmBinary,`getWasmBinary`);async function instantiateArrayBuffer(L,J){try{var Y=await getWasmBinary(L);return await WebAssembly.instantiate(Y,J)}catch(L){err(`failed to asynchronously prepare wasm: ${L}`),abort(L)}}__name(instantiateArrayBuffer,`instantiateArrayBuffer`);async function instantiateAsync(L,J,Y){if(!L&&!isFileURI(J)&&!ENVIRONMENT_IS_NODE)try{var X=fetch(J,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(X,Y)}catch(L){err(`wasm streaming compile failed: ${L}`),err(`falling back to ArrayBuffer instantiation`)}return instantiateArrayBuffer(J,Y)}__name(instantiateAsync,`instantiateAsync`);function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}__name(getWasmImports,`getWasmImports`);async function createWasm(){function L(L,J){wasmExports=L.exports,wasmExports=relocateExports(wasmExports,1024);var Y=getDylinkMetadata(J);return Y.neededDynlibs&&(dynamicLibraries=Y.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,`main`),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}__name(L,`receiveInstance`);function J(J){return L(J.instance,J.module)}__name(J,`receiveInstantiationResult`);var Y=getWasmImports();return Module.instantiateWasm?new Promise((J,X)=>{Module.instantiateWasm(Y,(Y,X)=>{J(L(Y,X))})}):(wasmBinaryFile??=findWasmBinary(),J(await instantiateAsync(wasmBinary,wasmBinaryFile,Y)))}__name(createWasm,`createWasm`);class ExitStatus{static{__name(this,`ExitStatus`)}name=`ExitStatus`;constructor(L){this.message=`Program terminated with exit(${L})`,this.status=L}}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(L,J){var Y=GOT[J];return Y||=GOT[J]=new WebAssembly.Global({value:`i32`,mutable:!0}),currentModuleWeakSymbols.has(J)||(Y.required=!0),Y}},LE_ATOMICS_NATIVE_BYTE_ORDER=[],LE_HEAP_LOAD_F32=__name(L=>HEAP_DATA_VIEW.getFloat32(L,!0),`LE_HEAP_LOAD_F32`),LE_HEAP_LOAD_F64=__name(L=>HEAP_DATA_VIEW.getFloat64(L,!0),`LE_HEAP_LOAD_F64`),LE_HEAP_LOAD_I16=__name(L=>HEAP_DATA_VIEW.getInt16(L,!0),`LE_HEAP_LOAD_I16`),LE_HEAP_LOAD_I32=__name(L=>HEAP_DATA_VIEW.getInt32(L,!0),`LE_HEAP_LOAD_I32`),LE_HEAP_LOAD_I64=__name(L=>HEAP_DATA_VIEW.getBigInt64(L,!0),`LE_HEAP_LOAD_I64`),LE_HEAP_LOAD_U32=__name(L=>HEAP_DATA_VIEW.getUint32(L,!0),`LE_HEAP_LOAD_U32`),LE_HEAP_STORE_F32=__name((L,J)=>HEAP_DATA_VIEW.setFloat32(L,J,!0),`LE_HEAP_STORE_F32`),LE_HEAP_STORE_F64=__name((L,J)=>HEAP_DATA_VIEW.setFloat64(L,J,!0),`LE_HEAP_STORE_F64`),LE_HEAP_STORE_I16=__name((L,J)=>HEAP_DATA_VIEW.setInt16(L,J,!0),`LE_HEAP_STORE_I16`),LE_HEAP_STORE_I32=__name((L,J)=>HEAP_DATA_VIEW.setInt32(L,J,!0),`LE_HEAP_STORE_I32`),LE_HEAP_STORE_I64=__name((L,J)=>HEAP_DATA_VIEW.setBigInt64(L,J,!0),`LE_HEAP_STORE_I64`),LE_HEAP_STORE_U32=__name((L,J)=>HEAP_DATA_VIEW.setUint32(L,J,!0),`LE_HEAP_STORE_U32`),callRuntimeCallbacks=__name(L=>{for(;L.length>0;)L.shift()(Module)},`callRuntimeCallbacks`),onPostRuns=[],addOnPostRun=__name(L=>onPostRuns.push(L),`addOnPostRun`),onPreRuns=[],addOnPreRun=__name(L=>onPreRuns.push(L),`addOnPreRun`),UTF8Decoder=typeof TextDecoder<`u`?new TextDecoder:void 0,findStringEnd=__name((L,J,Y,X)=>{var Z=J+Y;if(X)return Z;for(;L[J]&&!(J>=Z);)++J;return J},`findStringEnd`),UTF8ArrayToString=__name((L,J=0,Y,X)=>{var Z=findStringEnd(L,J,Y,X);if(Z-J>16&&L.buffer&&UTF8Decoder)return UTF8Decoder.decode(L.subarray(J,Z));for(var Q=``;J<Z;){var $=L[J++];if(!($&128)){Q+=String.fromCharCode($);continue}var ee=L[J++]&63;if(($&224)==192){Q+=String.fromCharCode(($&31)<<6|ee);continue}var te=L[J++]&63;if($=($&240)==224?($&15)<<12|ee<<6|te:($&7)<<18|ee<<12|te<<6|L[J++]&63,$<65536)Q+=String.fromCharCode($);else{var ne=$-65536;Q+=String.fromCharCode(55296|ne>>10,56320|ne&1023)}}return Q},`UTF8ArrayToString`),getDylinkMetadata=__name(L=>{var J=0,Y=0;function X(){return L[J++]}__name(X,`getU8`);function Z(){for(var Y=0,X=1;;){var Z=L[J++];if(Y+=(Z&127)*X,X*=128,!(Z&128))break}return Y}__name(Z,`getLEB`);function Q(){var Y=Z();return J+=Y,UTF8ArrayToString(L,J-Y,Y)}__name(Q,`getString`);function $(){for(var L=Z(),J=[];L--;)J.push(Q());return J}__name($,`getStringList`);function ee(L,J){if(L)throw Error(J)}if(__name(ee,`failIf`),L instanceof WebAssembly.Module){var te=WebAssembly.Module.customSections(L,`dylink.0`);ee(te.length===0,`need dylink section`),L=new Uint8Array(te[0]),Y=L.length}else{var ne=new Uint32Array(new Uint8Array(L.subarray(0,24)).buffer);ee(!(ne[0]==1836278016||ne[0]==6386541),`need to see wasm magic number`),ee(L[8]!==0,`need the dylink section to be first`),J=9;var re=Z();Y=J+re,ee(Q()!==`dylink.0`)}for(var ie={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},ae=1,oe=2,se=3,ce=4,le=5,ue=256,de=3,fe=1;J<Y;){var pe=X(),me=Z();if(pe===ae)ie.memorySize=Z(),ie.memoryAlign=Z(),ie.tableSize=Z(),ie.tableAlign=Z();else if(pe===oe)ie.neededDynlibs=$();else if(pe===se)for(var he=Z();he--;){var ge=Q(),_e=Z();_e&ue&&ie.tlsExports.add(ge)}else if(pe===ce)for(var he=Z();he--;){var ve=Q(),ge=Q(),_e=Z();(_e&de)==fe&&ie.weakImports.add(ge)}else pe===le?ie.runtimePaths=$():J+=me}return ie},`getDylinkMetadata`);function getValue(L,J=`i8`){switch(J.endsWith(`*`)&&(J=`*`),J){case`i1`:return HEAP8[L];case`i8`:return HEAP8[L];case`i16`:return LE_HEAP_LOAD_I16((L>>1)*2);case`i32`:return LE_HEAP_LOAD_I32((L>>2)*4);case`i64`:return LE_HEAP_LOAD_I64((L>>3)*8);case`float`:return LE_HEAP_LOAD_F32((L>>2)*4);case`double`:return LE_HEAP_LOAD_F64((L>>3)*8);case`*`:return LE_HEAP_LOAD_U32((L>>2)*4);default:abort(`invalid type for getValue: ${J}`)}}__name(getValue,`getValue`);var newDSO=__name((L,J,Y)=>{var X={refcount:1/0,name:L,exports:Y,global:!0};return LDSO.loadedLibsByName[L]=X,J!=null&&(LDSO.loadedLibsByHandle[J]=X),X},`newDSO`),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO(`__main__`,0,wasmImports)}},___heap_base=78240,alignMemory=__name((L,J)=>Math.ceil(L/J)*J,`alignMemory`),getMemory=__name(L=>{if(runtimeInitialized)return _calloc(L,1);var J=___heap_base,Y=J+alignMemory(L,16);return ___heap_base=Y,GOT.__heap_base.value=Y,J},`getMemory`),isInternalSym=__name(L=>[`__cpp_exception`,`__c_longjmp`,`__wasm_apply_data_relocs`,`__dso_handle`,`__tls_size`,`__tls_align`,`__set_stack_limits`,`_emscripten_tls_init`,`__wasm_init_tls`,`__wasm_call_ctors`,`__start_em_asm`,`__stop_em_asm`,`__start_em_js`,`__stop_em_js`].includes(L)||L.startsWith(`__em_js__`),`isInternalSym`),uleb128EncodeWithLen=__name(L=>{let J=L.length;return[J%128|128,J>>7,...L]},`uleb128EncodeWithLen`),wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=__name(L=>uleb128EncodeWithLen(Array.from(L,L=>wasmTypeCodes[L])),`generateTypePack`),convertJsFunctionToWasm=__name((L,J)=>{var Y=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(J.slice(1)),...generateTypePack(J[0]===`v`?``:J[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),X=new WebAssembly.Module(Y);return new WebAssembly.Instance(X,{e:{f:L}}).exports.f},`convertJsFunctionToWasm`),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:31,element:`anyfunc`}),getWasmTableEntry=__name(L=>{var J=wasmTableMirror[L];return J||(wasmTableMirror[L]=J=wasmTable.get(L)),J},`getWasmTableEntry`),updateTableMap=__name((L,J)=>{if(functionsInTableMap)for(var Y=L;Y<L+J;Y++){var X=getWasmTableEntry(Y);X&&functionsInTableMap.set(X,Y)}},`updateTableMap`),functionsInTableMap,getFunctionAddress=__name(L=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(L)||0),`getFunctionAddress`),freeTableIndexes=[],getEmptyTableSlot=__name(()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),`getEmptyTableSlot`),setWasmTableEntry=__name((L,J)=>{wasmTable.set(L,J),wasmTableMirror[L]=wasmTable.get(L)},`setWasmTableEntry`),addFunction=__name((L,J)=>{var Y=getFunctionAddress(L);if(Y)return Y;var X=getEmptyTableSlot();try{setWasmTableEntry(X,L)}catch(Y){if(!(Y instanceof TypeError))throw Y;setWasmTableEntry(X,convertJsFunctionToWasm(L,J))}return functionsInTableMap.set(L,X),X},`addFunction`),updateGOT=__name((L,J)=>{for(var Y in L)if(!isInternalSym(Y)){var X=L[Y];GOT[Y]||=new WebAssembly.Global({value:`i32`,mutable:!0}),(J||GOT[Y].value==0)&&(typeof X==`function`?GOT[Y].value=addFunction(X):typeof X==`number`?GOT[Y].value=X:err(`unhandled export type for '${Y}': ${typeof X}`))}},`updateGOT`),relocateExports=__name((L,J,Y)=>{var X={};for(var Z in L){var Q=L[Z];typeof Q==`object`&&(Q=Q.value),typeof Q==`number`&&(Q+=J),X[Z]=Q}return updateGOT(X,Y),X},`relocateExports`),isSymbolDefined=__name(L=>{var J=wasmImports[L];return!(!J||J.stub)},`isSymbolDefined`),dynCall=__name((L,J,Y=[],X=!1)=>{var Z=getWasmTableEntry(J)(...Y);function Q(L){return L}return __name(Q,`convert`),Q(Z)},`dynCall`),stackSave=__name(()=>_emscripten_stack_get_current(),`stackSave`),stackRestore=__name(L=>__emscripten_stack_restore(L),`stackRestore`),createInvokeFunction=__name(L=>(J,...Y)=>{var X=stackSave();try{return dynCall(L,J,Y)}catch(J){if(stackRestore(X),J!==J+0)throw J;if(_setThrew(1,0),L[0]==`j`)return 0n}},`createInvokeFunction`),resolveGlobalSymbol=__name((L,J=!1)=>{var Y;return isSymbolDefined(L)?Y=wasmImports[L]:L.startsWith(`invoke_`)&&(Y=wasmImports[L]=createInvokeFunction(L.split(`_`)[1])),{sym:Y,name:L}},`resolveGlobalSymbol`),onPostCtors=[],addOnPostCtor=__name(L=>onPostCtors.push(L),`addOnPostCtor`),UTF8ToString=__name((L,J,Y)=>L?UTF8ArrayToString(HEAPU8,L,J,Y):``,`UTF8ToString`),loadWebAssemblyModule=__name((binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=2**metadata.memoryAlign,memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize)),metadata.tableSize&&wasmTable.grow(metadata.tableSize);var moduleExports;function resolveSymbol(L){var J=resolveGlobalSymbol(L).sym;return!J&&localScope&&(J=localScope[L]),J||=moduleExports[L],J}__name(resolveSymbol,`resolveSymbol`);var proxyHandler={get(L,J){switch(J){case`__memory_base`:return memoryBase;case`__table_base`:return tableBase}if(J in wasmImports&&!wasmImports[J].stub)return wasmImports[J];if(!(J in L)){var Y;L[J]=(...L)=>(Y||=resolveSymbol(J),Y(...L))}return L[J]}},proxy=new Proxy({},proxyHandler);currentModuleWeakSymbols=metadata.weakImports;var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf(`$`+arity)!=-1;arity++)args.push(`$`+arity);args=args.join(`,`);var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if(__name(addEmAsm,`addEmAsm`),`__start_em_asm`in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),cSig!=`void`)for(var i in cSig=cSig.split(`,`),cSig){var jsArg=cSig[i].split(` `).pop();jsArgs.push(jsArg.replace(`*`,``))}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in __name(addEmJs,`addEmJs`),moduleExports)if(name.startsWith(`__em_js__`)){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split(`<::>`);addEmJs(name.replace(`__em_js__`,``),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():addOnPostCtor(init)),moduleExports}if(__name(postInstantiation,`postInstantiation`),flags.loadAsync)return(async()=>{var L;return binary instanceof WebAssembly.Module?L=new WebAssembly.Instance(binary,info):{module:binary,instance:L}=await WebAssembly.instantiate(binary,info),postInstantiation(binary,L)})();var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return __name(loadModule,`loadModule`),flags={...flags,rpath:{parentLibPath:libName,paths:metadata.runtimePaths}},flags.loadAsync?metadata.neededDynlibs.reduce((L,J)=>L.then(()=>loadDynamicLibrary(J,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(L=>loadDynamicLibrary(L,flags,localScope)),loadModule())},`loadWebAssemblyModule`),mergeLibSymbols=__name((L,J)=>{for(var[Y,X]of Object.entries(L)){let L=__name(L=>{isSymbolDefined(L)||(wasmImports[L]=X)},`setImport`);L(Y);let J=`__main_argc_argv`;Y==`main`&&L(J),Y==J&&L(`main`)}},`mergeLibSymbols`),asyncLoad=__name(async L=>{var J=await readAsync(L);return new Uint8Array(J)},`asyncLoad`);function loadDynamicLibrary(L,J={global:!0,nodelete:!0},Y,X){var Z=LDSO.loadedLibsByName[L];if(Z)return J.global?Z.global||(Z.global=!0,mergeLibSymbols(Z.exports,L)):Y&&Object.assign(Y,Z.exports),J.nodelete&&Z.refcount!==1/0&&(Z.refcount=1/0),Z.refcount++,X&&(LDSO.loadedLibsByHandle[X]=Z),J.loadAsync?Promise.resolve(!0):!0;Z=newDSO(L,X,`loading`),Z.refcount=J.nodelete?1/0:1,Z.global=J.global;function Q(){if(X){var Y=LE_HEAP_LOAD_U32((X+28>>2)*4),Z=LE_HEAP_LOAD_U32((X+32>>2)*4);if(Y&&Z){var Q=HEAP8.slice(Y,Y+Z);return J.loadAsync?Promise.resolve(Q):Q}}var $=locateFile(L);if(J.loadAsync)return asyncLoad($);if(!readBinary)throw Error(`${$}: file not found, and synchronous loading of external files is not available`);return readBinary($)}__name(Q,`loadLibData`);function $(){return J.loadAsync?Q().then(Z=>loadWebAssemblyModule(Z,J,L,Y,X)):loadWebAssemblyModule(Q(),J,L,Y,X)}__name($,`getExports`);function ee(J){Z.global?mergeLibSymbols(J,L):Y&&Object.assign(Y,J),Z.exports=J}return __name(ee,`moduleLoaded`),J.loadAsync?$().then(L=>(ee(L),!0)):(ee($()),!0)}__name(loadDynamicLibrary,`loadDynamicLibrary`);var reportUndefinedSymbols=__name(()=>{for(var[L,J]of Object.entries(GOT))if(J.value==0){var Y=resolveGlobalSymbol(L,!0).sym;if(!Y&&!J.required)continue;if(typeof Y==`function`)J.value=addFunction(Y,Y.sig);else if(typeof Y==`number`)J.value=Y;else throw Error(`bad export type for '${L}': ${typeof Y}`)}},`reportUndefinedSymbols`),runDependencies=0,dependenciesFulfilled=null,removeRunDependency=__name(L=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var J=dependenciesFulfilled;dependenciesFulfilled=null,J()}},`removeRunDependency`),addRunDependency=__name(L=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},`addRunDependency`),loadDylibs=__name(async()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency(`loadDylibs`);for(var L of dynamicLibraries)await loadDynamicLibrary(L,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0});reportUndefinedSymbols(),removeRunDependency(`loadDylibs`)},`loadDylibs`),noExitRuntime=!0;function setValue(L,J,Y=`i8`){switch(Y.endsWith(`*`)&&(Y=`*`),Y){case`i1`:HEAP8[L]=J;break;case`i8`:HEAP8[L]=J;break;case`i16`:LE_HEAP_STORE_I16((L>>1)*2,J);break;case`i32`:LE_HEAP_STORE_I32((L>>2)*4,J);break;case`i64`:LE_HEAP_STORE_I64((L>>3)*8,BigInt(J));break;case`float`:LE_HEAP_STORE_F32((L>>2)*4,J);break;case`double`:LE_HEAP_STORE_F64((L>>3)*8,J);break;case`*`:LE_HEAP_STORE_U32((L>>2)*4,J);break;default:abort(`invalid type for setValue: ${Y}`)}}__name(setValue,`setValue`);var ___memory_base=new WebAssembly.Global({value:`i32`,mutable:!1},1024),___stack_high=78240,___stack_low=12704,___stack_pointer=new WebAssembly.Global({value:`i32`,mutable:!0},78240),___table_base=new WebAssembly.Global({value:`i32`,mutable:!1},1),__abort_js=__name(()=>abort(``),`__abort_js`);__abort_js.sig=`v`;var getHeapMax=__name(()=>2147483648,`getHeapMax`),growMemory=__name(L=>{var J=(L-wasmMemory.buffer.byteLength+65535)/65536|0;try{return wasmMemory.grow(J),updateMemoryViews(),1}catch{}},`growMemory`),_emscripten_resize_heap=__name(L=>{var J=HEAPU8.length;L>>>=0;var Y=getHeapMax();if(L>Y)return!1;for(var X=1;X<=4;X*=2){var Z=J*(1+.2/X);if(Z=Math.min(Z,L+100663296),growMemory(Math.min(Y,alignMemory(Math.max(L,Z),65536))))return!0}return!1},`_emscripten_resize_heap`);_emscripten_resize_heap.sig=`ip`;var _fd_close=__name(L=>52,`_fd_close`);_fd_close.sig=`ii`;var INT53_MAX=9007199254740992,INT53_MIN=-9007199254740992,bigintToI53Checked=__name(L=>L<INT53_MIN||L>INT53_MAX?NaN:Number(L),`bigintToI53Checked`);function _fd_seek(L,J,Y,X){return J=bigintToI53Checked(J),70}__name(_fd_seek,`_fd_seek`),_fd_seek.sig=`iijip`;var printCharBuffers=[null,[],[]],printChar=__name((L,J)=>{var Y=printCharBuffers[L];J===0||J===10?((L===1?out:err)(UTF8ArrayToString(Y)),Y.length=0):Y.push(J)},`printChar`),_fd_write=__name((L,J,Y,X)=>{for(var Z=0,Q=0;Q<Y;Q++){var $=LE_HEAP_LOAD_U32((J>>2)*4),ee=LE_HEAP_LOAD_U32((J+4>>2)*4);J+=8;for(var te=0;te<ee;te++)printChar(L,HEAPU8[$+te]);Z+=ee}return LE_HEAP_STORE_U32((X>>2)*4,Z),0},`_fd_write`);_fd_write.sig=`iippp`;function _tree_sitter_log_callback(L,J){if(Module.currentLogCallback){let Y=UTF8ToString(J);Module.currentLogCallback(Y,L!==0)}}__name(_tree_sitter_log_callback,`_tree_sitter_log_callback`);function _tree_sitter_parse_callback(L,J,Y,X,Z){let Q=10*1024,$=Module.currentParseCallback(J,{row:Y,column:X});typeof $==`string`?(setValue(Z,$.length,`i32`),stringToUTF16($,L,10240)):setValue(Z,0,`i32`)}__name(_tree_sitter_parse_callback,`_tree_sitter_parse_callback`);function _tree_sitter_progress_callback(L,J){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:L,hasError:J}):!1}__name(_tree_sitter_progress_callback,`_tree_sitter_progress_callback`);function _tree_sitter_query_progress_callback(L){return Module.currentQueryProgressCallback?Module.currentQueryProgressCallback({currentOffset:L}):!1}__name(_tree_sitter_query_progress_callback,`_tree_sitter_query_progress_callback`);var runtimeKeepaliveCounter=0,keepRuntimeAlive=__name(()=>noExitRuntime||runtimeKeepaliveCounter>0,`keepRuntimeAlive`),_proc_exit=__name(L=>{EXITSTATUS=L,keepRuntimeAlive()||(Module.onExit?.(L),ABORT=!0),quit_(L,new ExitStatus(L))},`_proc_exit`);_proc_exit.sig=`vi`;var exitJS=__name((L,J)=>{EXITSTATUS=L,_proc_exit(L)},`exitJS`),handleException=__name(L=>{if(L instanceof ExitStatus||L==`unwind`)return EXITSTATUS;quit_(1,L)},`handleException`),lengthBytesUTF8=__name(L=>{for(var J=0,Y=0;Y<L.length;++Y){var X=L.charCodeAt(Y);X<=127?J++:X<=2047?J+=2:X>=55296&&X<=57343?(J+=4,++Y):J+=3}return J},`lengthBytesUTF8`),stringToUTF8Array=__name((L,J,Y,X)=>{if(!(X>0))return 0;for(var Z=Y,Q=Y+X-1,$=0;$<L.length;++$){var ee=L.codePointAt($);if(ee<=127){if(Y>=Q)break;J[Y++]=ee}else if(ee<=2047){if(Y+1>=Q)break;J[Y++]=192|ee>>6,J[Y++]=128|ee&63}else if(ee<=65535){if(Y+2>=Q)break;J[Y++]=224|ee>>12,J[Y++]=128|ee>>6&63,J[Y++]=128|ee&63}else{if(Y+3>=Q)break;J[Y++]=240|ee>>18,J[Y++]=128|ee>>12&63,J[Y++]=128|ee>>6&63,J[Y++]=128|ee&63,$++}}return J[Y]=0,Y-Z},`stringToUTF8Array`),stringToUTF8=__name((L,J,Y)=>stringToUTF8Array(L,HEAPU8,J,Y),`stringToUTF8`),stackAlloc=__name(L=>__emscripten_stack_alloc(L),`stackAlloc`),stringToUTF8OnStack=__name(L=>{var J=lengthBytesUTF8(L)+1,Y=stackAlloc(J);return stringToUTF8(L,Y,J),Y},`stringToUTF8OnStack`),AsciiToString=__name(L=>{for(var J=``;;){var Y=HEAPU8[L++];if(!Y)return J;J+=String.fromCharCode(Y)}},`AsciiToString`),stringToUTF16=__name((L,J,Y)=>{if(Y??=2147483647,Y<2)return 0;Y-=2;for(var X=J,Z=Y<L.length*2?Y/2:L.length,Q=0;Q<Z;++Q){var $=L.charCodeAt(Q);LE_HEAP_STORE_I16((J>>1)*2,$),J+=2}return LE_HEAP_STORE_I16((J>>1)*2,0),J-X},`stringToUTF16`);LE_ATOMICS_NATIVE_BYTE_ORDER=new Int8Array(new Int16Array([1]).buffer)[0]===1?[(L=>L),(L=>L),void 0,(L=>L)]:[(L=>L),(L=>((L&65280)<<8|(L&255)<<24)>>16),void 0,(L=>L>>24&255|L>>8&65280|(L&65280)<<8|(L&255)<<24)];function LE_HEAP_UPDATE(){HEAPU16.unsigned=(L=>L&65535),HEAPU32.unsigned=(L=>L>>>0)}if(__name(LE_HEAP_UPDATE,`LE_HEAP_UPDATE`),initMemory(),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.dynamicLibraries&&(dynamicLibraries=Module.dynamicLibraries),Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.preInit)for(typeof Module.preInit==`function`&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();Module.setValue=setValue,Module.getValue=getValue,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,Module.loadWebAssemblyModule=loadWebAssemblyModule,Module.LE_HEAP_STORE_I64=LE_HEAP_STORE_I64;var ASM_CONSTS={},_malloc,_calloc,_realloc,_free,_ts_range_edit,_memcmp,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_next_state,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_ts_lookahead_iterator_new,_ts_lookahead_iterator_delete,_ts_lookahead_iterator_reset_state,_ts_lookahead_iterator_reset,_ts_lookahead_iterator_next,_ts_lookahead_iterator_current_symbol,_ts_point_edit,_ts_parser_delete,_ts_parser_reset,_ts_parser_set_language,_ts_parser_set_included_ranges,_ts_query_new,_ts_query_delete,_iswspace,_iswalnum,_ts_query_pattern_count,_ts_query_capture_count,_ts_query_string_count,_ts_query_capture_name_for_id,_ts_query_capture_quantifier_for_id,_ts_query_string_value_for_id,_ts_query_predicates_for_pattern,_ts_query_start_byte_for_pattern,_ts_query_end_byte_for_pattern,_ts_query_is_pattern_rooted,_ts_query_is_pattern_non_local,_ts_query_is_pattern_guaranteed_at_step,_ts_query_disable_capture,_ts_query_disable_pattern,_ts_tree_copy,_ts_tree_delete,_ts_init,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_wasm,_ts_parser_included_ranges_wasm,_ts_language_type_is_named_wasm,_ts_language_type_is_visible_wasm,_ts_language_metadata_wasm,_ts_language_supertypes_wasm,_ts_language_subtypes_wasm,_ts_tree_root_node_wasm,_ts_tree_root_node_with_offset_wasm,_ts_tree_edit_wasm,_ts_tree_included_ranges_wasm,_ts_tree_get_changed_ranges_wasm,_ts_tree_cursor_new_wasm,_ts_tree_cursor_copy_wasm,_ts_tree_cursor_delete_wasm,_ts_tree_cursor_reset_wasm,_ts_tree_cursor_reset_to_wasm,_ts_tree_cursor_goto_first_child_wasm,_ts_tree_cursor_goto_last_child_wasm,_ts_tree_cursor_goto_first_child_for_index_wasm,_ts_tree_cursor_goto_first_child_for_position_wasm,_ts_tree_cursor_goto_next_sibling_wasm,_ts_tree_cursor_goto_previous_sibling_wasm,_ts_tree_cursor_goto_descendant_wasm,_ts_tree_cursor_goto_parent_wasm,_ts_tree_cursor_current_node_type_id_wasm,_ts_tree_cursor_current_node_state_id_wasm,_ts_tree_cursor_current_node_is_named_wasm,_ts_tree_cursor_current_node_is_missing_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_start_index_wasm,_ts_tree_cursor_end_index_wasm,_ts_tree_cursor_current_field_id_wasm,_ts_tree_cursor_current_depth_wasm,_ts_tree_cursor_current_descendant_index_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_symbol_wasm,_ts_node_field_name_for_child_wasm,_ts_node_field_name_for_named_child_wasm,_ts_node_children_by_field_id_wasm,_ts_node_first_child_for_byte_wasm,_ts_node_first_named_child_for_byte_wasm,_ts_node_grammar_symbol_wasm,_ts_node_child_count_wasm,_ts_node_named_child_count_wasm,_ts_node_child_wasm,_ts_node_named_child_wasm,_ts_node_child_by_field_id_wasm,_ts_node_next_sibling_wasm,_ts_node_prev_sibling_wasm,_ts_node_next_named_sibling_wasm,_ts_node_prev_named_sibling_wasm,_ts_node_descendant_count_wasm,_ts_node_parent_wasm,_ts_node_child_with_descendant_wasm,_ts_node_descendant_for_index_wasm,_ts_node_named_descendant_for_index_wasm,_ts_node_descendant_for_position_wasm,_ts_node_named_descendant_for_position_wasm,_ts_node_start_point_wasm,_ts_node_end_point_wasm,_ts_node_start_index_wasm,_ts_node_end_index_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_ts_node_is_named_wasm,_ts_node_has_changes_wasm,_ts_node_has_error_wasm,_ts_node_is_error_wasm,_ts_node_is_missing_wasm,_ts_node_is_extra_wasm,_ts_node_parse_state_wasm,_ts_node_next_parse_state_wasm,_ts_query_matches_wasm,_ts_query_captures_wasm,_memset,_memcpy,_memmove,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswupper,_iswxdigit,_memchr,_strlen,_strcmp,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(L){Module._malloc=L.malloc,Module._calloc=_calloc=L.calloc,Module._realloc=L.realloc,Module._free=L.free,Module._ts_range_edit=L.ts_range_edit,Module._memcmp=L.memcmp,Module._ts_language_symbol_count=L.ts_language_symbol_count,Module._ts_language_state_count=L.ts_language_state_count,Module._ts_language_abi_version=L.ts_language_abi_version,Module._ts_language_name=L.ts_language_name,Module._ts_language_field_count=L.ts_language_field_count,Module._ts_language_next_state=L.ts_language_next_state,Module._ts_language_symbol_name=L.ts_language_symbol_name,Module._ts_language_symbol_for_name=L.ts_language_symbol_for_name,Module._strncmp=L.strncmp,Module._ts_language_symbol_type=L.ts_language_symbol_type,Module._ts_language_field_name_for_id=L.ts_language_field_name_for_id,Module._ts_lookahead_iterator_new=L.ts_lookahead_iterator_new,Module._ts_lookahead_iterator_delete=L.ts_lookahead_iterator_delete,Module._ts_lookahead_iterator_reset_state=L.ts_lookahead_iterator_reset_state,Module._ts_lookahead_iterator_reset=L.ts_lookahead_iterator_reset,Module._ts_lookahead_iterator_next=L.ts_lookahead_iterator_next,Module._ts_lookahead_iterator_current_symbol=L.ts_lookahead_iterator_current_symbol,Module._ts_point_edit=L.ts_point_edit,Module._ts_parser_delete=L.ts_parser_delete,Module._ts_parser_reset=L.ts_parser_reset,Module._ts_parser_set_language=L.ts_parser_set_language,Module._ts_parser_set_included_ranges=L.ts_parser_set_included_ranges,Module._ts_query_new=L.ts_query_new,Module._ts_query_delete=L.ts_query_delete,Module._iswspace=L.iswspace,Module._iswalnum=L.iswalnum,Module._ts_query_pattern_count=L.ts_query_pattern_count,Module._ts_query_capture_count=L.ts_query_capture_count,Module._ts_query_string_count=L.ts_query_string_count,Module._ts_query_capture_name_for_id=L.ts_query_capture_name_for_id,Module._ts_query_capture_quantifier_for_id=L.ts_query_capture_quantifier_for_id,Module._ts_query_string_value_for_id=L.ts_query_string_value_for_id,Module._ts_query_predicates_for_pattern=L.ts_query_predicates_for_pattern,Module._ts_query_start_byte_for_pattern=L.ts_query_start_byte_for_pattern,Module._ts_query_end_byte_for_pattern=L.ts_query_end_byte_for_pattern,Module._ts_query_is_pattern_rooted=L.ts_query_is_pattern_rooted,Module._ts_query_is_pattern_non_local=L.ts_query_is_pattern_non_local,Module._ts_query_is_pattern_guaranteed_at_step=L.ts_query_is_pattern_guaranteed_at_step,Module._ts_query_disable_capture=L.ts_query_disable_capture,Module._ts_query_disable_pattern=L.ts_query_disable_pattern,Module._ts_tree_copy=L.ts_tree_copy,Module._ts_tree_delete=L.ts_tree_delete,Module._ts_init=L.ts_init,Module._ts_parser_new_wasm=L.ts_parser_new_wasm,Module._ts_parser_enable_logger_wasm=L.ts_parser_enable_logger_wasm,Module._ts_parser_parse_wasm=L.ts_parser_parse_wasm,Module._ts_parser_included_ranges_wasm=L.ts_parser_included_ranges_wasm,Module._ts_language_type_is_named_wasm=L.ts_language_type_is_named_wasm,Module._ts_language_type_is_visible_wasm=L.ts_language_type_is_visible_wasm,Module._ts_language_metadata_wasm=L.ts_language_metadata_wasm,Module._ts_language_supertypes_wasm=L.ts_language_supertypes_wasm,Module._ts_language_subtypes_wasm=L.ts_language_subtypes_wasm,Module._ts_tree_root_node_wasm=L.ts_tree_root_node_wasm,Module._ts_tree_root_node_with_offset_wasm=L.ts_tree_root_node_with_offset_wasm,Module._ts_tree_edit_wasm=L.ts_tree_edit_wasm,Module._ts_tree_included_ranges_wasm=L.ts_tree_included_ranges_wasm,Module._ts_tree_get_changed_ranges_wasm=L.ts_tree_get_changed_ranges_wasm,Module._ts_tree_cursor_new_wasm=L.ts_tree_cursor_new_wasm,Module._ts_tree_cursor_copy_wasm=L.ts_tree_cursor_copy_wasm,Module._ts_tree_cursor_delete_wasm=L.ts_tree_cursor_delete_wasm,Module._ts_tree_cursor_reset_wasm=L.ts_tree_cursor_reset_wasm,Module._ts_tree_cursor_reset_to_wasm=L.ts_tree_cursor_reset_to_wasm,Module._ts_tree_cursor_goto_first_child_wasm=L.ts_tree_cursor_goto_first_child_wasm,Module._ts_tree_cursor_goto_last_child_wasm=L.ts_tree_cursor_goto_last_child_wasm,Module._ts_tree_cursor_goto_first_child_for_index_wasm=L.ts_tree_cursor_goto_first_child_for_index_wasm,Module._ts_tree_cursor_goto_first_child_for_position_wasm=L.ts_tree_cursor_goto_first_child_for_position_wasm,Module._ts_tree_cursor_goto_next_sibling_wasm=L.ts_tree_cursor_goto_next_sibling_wasm,Module._ts_tree_cursor_goto_previous_sibling_wasm=L.ts_tree_cursor_goto_previous_sibling_wasm,Module._ts_tree_cursor_goto_descendant_wasm=L.ts_tree_cursor_goto_descendant_wasm,Module._ts_tree_cursor_goto_parent_wasm=L.ts_tree_cursor_goto_parent_wasm,Module._ts_tree_cursor_current_node_type_id_wasm=L.ts_tree_cursor_current_node_type_id_wasm,Module._ts_tree_cursor_current_node_state_id_wasm=L.ts_tree_cursor_current_node_state_id_wasm,Module._ts_tree_cursor_current_node_is_named_wasm=L.ts_tree_cursor_current_node_is_named_wasm,Module._ts_tree_cursor_current_node_is_missing_wasm=L.ts_tree_cursor_current_node_is_missing_wasm,Module._ts_tree_cursor_current_node_id_wasm=L.ts_tree_cursor_current_node_id_wasm,Module._ts_tree_cursor_start_position_wasm=L.ts_tree_cursor_start_position_wasm,Module._ts_tree_cursor_end_position_wasm=L.ts_tree_cursor_end_position_wasm,Module._ts_tree_cursor_start_index_wasm=L.ts_tree_cursor_start_index_wasm,Module._ts_tree_cursor_end_index_wasm=L.ts_tree_cursor_end_index_wasm,Module._ts_tree_cursor_current_field_id_wasm=L.ts_tree_cursor_current_field_id_wasm,Module._ts_tree_cursor_current_depth_wasm=L.ts_tree_cursor_current_depth_wasm,Module._ts_tree_cursor_current_descendant_index_wasm=L.ts_tree_cursor_current_descendant_index_wasm,Module._ts_tree_cursor_current_node_wasm=L.ts_tree_cursor_current_node_wasm,Module._ts_node_symbol_wasm=L.ts_node_symbol_wasm,Module._ts_node_field_name_for_child_wasm=L.ts_node_field_name_for_child_wasm,Module._ts_node_field_name_for_named_child_wasm=L.ts_node_field_name_for_named_child_wasm,Module._ts_node_children_by_field_id_wasm=L.ts_node_children_by_field_id_wasm,Module._ts_node_first_child_for_byte_wasm=L.ts_node_first_child_for_byte_wasm,Module._ts_node_first_named_child_for_byte_wasm=L.ts_node_first_named_child_for_byte_wasm,Module._ts_node_grammar_symbol_wasm=L.ts_node_grammar_symbol_wasm,Module._ts_node_child_count_wasm=L.ts_node_child_count_wasm,Module._ts_node_named_child_count_wasm=L.ts_node_named_child_count_wasm,Module._ts_node_child_wasm=L.ts_node_child_wasm,Module._ts_node_named_child_wasm=L.ts_node_named_child_wasm,Module._ts_node_child_by_field_id_wasm=L.ts_node_child_by_field_id_wasm,Module._ts_node_next_sibling_wasm=L.ts_node_next_sibling_wasm,Module._ts_node_prev_sibling_wasm=L.ts_node_prev_sibling_wasm,Module._ts_node_next_named_sibling_wasm=L.ts_node_next_named_sibling_wasm,Module._ts_node_prev_named_sibling_wasm=L.ts_node_prev_named_sibling_wasm,Module._ts_node_descendant_count_wasm=L.ts_node_descendant_count_wasm,Module._ts_node_parent_wasm=L.ts_node_parent_wasm,Module._ts_node_child_with_descendant_wasm=L.ts_node_child_with_descendant_wasm,Module._ts_node_descendant_for_index_wasm=L.ts_node_descendant_for_index_wasm,Module._ts_node_named_descendant_for_index_wasm=L.ts_node_named_descendant_for_index_wasm,Module._ts_node_descendant_for_position_wasm=L.ts_node_descendant_for_position_wasm,Module._ts_node_named_descendant_for_position_wasm=L.ts_node_named_descendant_for_position_wasm,Module._ts_node_start_point_wasm=L.ts_node_start_point_wasm,Module._ts_node_end_point_wasm=L.ts_node_end_point_wasm,Module._ts_node_start_index_wasm=L.ts_node_start_index_wasm,Module._ts_node_end_index_wasm=L.ts_node_end_index_wasm,Module._ts_node_to_string_wasm=L.ts_node_to_string_wasm,Module._ts_node_children_wasm=L.ts_node_children_wasm,Module._ts_node_named_children_wasm=L.ts_node_named_children_wasm,Module._ts_node_descendants_of_type_wasm=L.ts_node_descendants_of_type_wasm,Module._ts_node_is_named_wasm=L.ts_node_is_named_wasm,Module._ts_node_has_changes_wasm=L.ts_node_has_changes_wasm,Module._ts_node_has_error_wasm=L.ts_node_has_error_wasm,Module._ts_node_is_error_wasm=L.ts_node_is_error_wasm,Module._ts_node_is_missing_wasm=L.ts_node_is_missing_wasm,Module._ts_node_is_extra_wasm=L.ts_node_is_extra_wasm,Module._ts_node_parse_state_wasm=L.ts_node_parse_state_wasm,Module._ts_node_next_parse_state_wasm=L.ts_node_next_parse_state_wasm,Module._ts_query_matches_wasm=L.ts_query_matches_wasm,Module._ts_query_captures_wasm=L.ts_query_captures_wasm,Module._memset=L.memset,Module._memcpy=L.memcpy,Module._memmove=L.memmove,Module._iswalpha=L.iswalpha,Module._iswblank=L.iswblank,Module._iswdigit=L.iswdigit,Module._iswlower=L.iswlower,Module._iswupper=L.iswupper,Module._iswxdigit=L.iswxdigit,Module._memchr=L.memchr,Module._strlen=L.strlen,Module._strcmp=L.strcmp,Module._strncat=L.strncat,Module._strncpy=L.strncpy,Module._towlower=L.towlower,Module._towupper=L.towupper,_setThrew=L.setThrew,__emscripten_stack_restore=L._emscripten_stack_restore,__emscripten_stack_alloc=L._emscripten_stack_alloc,_emscripten_stack_get_current=L.emscripten_stack_get_current,L.__wasm_apply_data_relocs}__name(assignWasmExports,`assignWasmExports`);var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback,tree_sitter_query_progress_callback:_tree_sitter_query_progress_callback};function callMain(L=[]){var J=resolveGlobalSymbol(`main`).sym;if(J){L.unshift(thisProgram);var Y=L.length,X=stackAlloc((Y+1)*4),Z=X;L.forEach(L=>{LE_HEAP_STORE_U32((Z>>2)*4,stringToUTF8OnStack(L)),Z+=4}),LE_HEAP_STORE_U32((Z>>2)*4,0);try{var Q=J(Y,X);return exitJS(Q,!0),Q}catch(L){return handleException(L)}}}__name(callMain,`callMain`);function run(L=arguments_){if(runDependencies>0){dependenciesFulfilled=run;return}if(preRun(),runDependencies>0){dependenciesFulfilled=run;return}function J(){Module.calledRun=!0,!ABORT&&(initRuntime(),readyPromiseResolve?.(Module),Module.onRuntimeInitialized?.(),Module.noInitialRun||callMain(L),postRun())}__name(J,`doRun`),Module.setStatus?(Module.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>Module.setStatus(``),1),J()},1)):J()}__name(run,`run`);var wasmExports=await createWasm();return run(),moduleRtn=runtimeInitialized?Module:new Promise((L,J)=>{readyPromiseResolve=L,readyPromiseReject=J}),moduleRtn}__name(Module2,`Module`);var web_tree_sitter_default=Module2,Module3=null;async function initializeBinding(L){return Module3??=await web_tree_sitter_default(L)}__name(initializeBinding,`initializeBinding`);function checkModule(){return!!Module3}__name(checkModule,`checkModule`);var TRANSFER_BUFFER,LANGUAGE_VERSION,MIN_COMPATIBLE_VERSION,Parser=class{static{__name(this,`Parser`)}0=0;1=0;logCallback=null;language=null;static async init(L){setModule(await initializeBinding(L)),TRANSFER_BUFFER=C._ts_init(),LANGUAGE_VERSION=C.getValue(TRANSFER_BUFFER,`i32`),MIN_COMPATIBLE_VERSION=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`)}constructor(){this.initialize()}initialize(){if(!checkModule())throw Error("cannot construct a Parser before calling `init()`");C._ts_parser_new_wasm(),this[0]=C.getValue(TRANSFER_BUFFER,`i32`),this[1]=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`)}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(L){let J;if(!L)J=0,this.language=null;else if(L.constructor===Language){J=L[0];let Y=C._ts_language_abi_version(J);if(Y<MIN_COMPATIBLE_VERSION||LANGUAGE_VERSION<Y)throw Error(`Incompatible language version ${Y}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${LANGUAGE_VERSION}.`);this.language=L}else throw Error(`Argument must be a Language`);return C._ts_parser_set_language(this[0],J),this}parse(L,J,Y){if(typeof L==`string`)C.currentParseCallback=J=>L.slice(J);else if(typeof L==`function`)C.currentParseCallback=L;else throw Error(`Argument must be a string or a function`);Y?.progressCallback?C.currentProgressCallback=Y.progressCallback:C.currentProgressCallback=null,this.logCallback?(C.currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(C.currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let X=0,Z=0;if(Y?.includedRanges){X=Y.includedRanges.length,Z=C._calloc(X,SIZE_OF_RANGE);let L=Z;for(let J=0;J<X;J++)marshalRange(L,Y.includedRanges[J]),L+=SIZE_OF_RANGE}let Q=C._ts_parser_parse_wasm(this[0],this[1],J?J[0]:0,Z,X);if(!Q)return C.currentParseCallback=null,C.currentLogCallback=null,C.currentProgressCallback=null,null;if(!this.language)throw Error(`Parser must have a language to parse`);let $=new Tree(INTERNAL,Q,this.language,C.currentParseCallback);return C.currentParseCallback=null,C.currentLogCallback=null,C.currentProgressCallback=null,$}reset(){C._ts_parser_reset(this[0])}getIncludedRanges(){C._ts_parser_included_ranges_wasm(this[0]);let L=C.getValue(TRANSFER_BUFFER,`i32`),J=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Y=Array(L);if(L>0){let X=J;for(let J=0;J<L;J++)Y[J]=unmarshalRange(X),X+=SIZE_OF_RANGE;C._free(J)}return Y}setLogger(L){if(!L)this.logCallback=null;else if(typeof L!=`function`)throw Error(`Logger callback must be a function`);else this.logCallback=L;return this}getLogger(){return this.logCallback}},PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,QUERY_WORD_REGEX=/[\w-]+/g,CaptureQuantifier={Zero:0,ZeroOrOne:1,ZeroOrMore:2,One:3,OneOrMore:4},isCaptureStep=__name(L=>L.type===`capture`,`isCaptureStep`),isStringStep=__name(L=>L.type===`string`,`isStringStep`),QueryErrorKind={Syntax:1,NodeName:2,FieldName:3,CaptureName:4,PatternStructure:5},QueryError=class L extends Error{constructor(J,Y,X,Z){super(L.formatMessage(J,Y)),this.kind=J,this.info=Y,this.index=X,this.length=Z,this.name=`QueryError`}static{__name(this,`QueryError`)}static formatMessage(L,J){switch(L){case QueryErrorKind.NodeName:return`Bad node name '${J.word}'`;case QueryErrorKind.FieldName:return`Bad field name '${J.word}'`;case QueryErrorKind.CaptureName:return`Bad capture name @${J.word}`;case QueryErrorKind.PatternStructure:return`Bad pattern structure at offset ${J.suffix}`;case QueryErrorKind.Syntax:return`Bad syntax at offset ${J.suffix}`}}};function parseAnyPredicate(L,J,Y,X){if(L.length!==3)throw Error(`Wrong number of arguments to \`#${Y}\` predicate. Expected 2, got ${L.length-1}`);if(!isCaptureStep(L[1]))throw Error(`First argument of \`#${Y}\` predicate must be a capture. Got "${L[1].value}"`);let Z=Y===`eq?`||Y===`any-eq?`,Q=!Y.startsWith(`any-`);if(isCaptureStep(L[2])){let Y=L[1].name,$=L[2].name;X[J].push(L=>{let J=[],X=[];for(let Z of L)Z.name===Y&&J.push(Z.node),Z.name===$&&X.push(Z.node);let ee=__name((L,J,Y)=>Y?L.text===J.text:L.text!==J.text,`compare`);return Q?J.every(L=>X.some(J=>ee(L,J,Z))):J.some(L=>X.some(J=>ee(L,J,Z)))})}else{let Y=L[1].name,$=L[2].value,ee=__name(L=>L.text===$,`matches`),te=__name(L=>L.text!==$,`doesNotMatch`);X[J].push(L=>{let J=[];for(let X of L)X.name===Y&&J.push(X.node);let X=Z?ee:te;return Q?J.every(X):J.some(X)})}}__name(parseAnyPredicate,`parseAnyPredicate`);function parseMatchPredicate(L,J,Y,X){if(L.length!==3)throw Error(`Wrong number of arguments to \`#${Y}\` predicate. Expected 2, got ${L.length-1}.`);if(L[1].type!==`capture`)throw Error(`First argument of \`#${Y}\` predicate must be a capture. Got "${L[1].value}".`);if(L[2].type!==`string`)throw Error(`Second argument of \`#${Y}\` predicate must be a string. Got @${L[2].name}.`);let Z=Y===`match?`||Y===`any-match?`,Q=!Y.startsWith(`any-`),$=L[1].name,ee=new RegExp(L[2].value);X[J].push(L=>{let J=[];for(let Y of L)Y.name===$&&J.push(Y.node.text);let Y=__name((L,J)=>J?ee.test(L):!ee.test(L),`test`);return J.length===0?!Z:Q?J.every(L=>Y(L,Z)):J.some(L=>Y(L,Z))})}__name(parseMatchPredicate,`parseMatchPredicate`);function parseAnyOfPredicate(L,J,Y,X){if(L.length<2)throw Error(`Wrong number of arguments to \`#${Y}\` predicate. Expected at least 1. Got ${L.length-1}.`);if(L[1].type!==`capture`)throw Error(`First argument of \`#${Y}\` predicate must be a capture. Got "${L[1].value}".`);let Z=Y===`any-of?`,Q=L[1].name,$=L.slice(2);if(!$.every(isStringStep))throw Error(`Arguments to \`#${Y}\` predicate must be strings.".`);let ee=$.map(L=>L.value);X[J].push(L=>{let J=[];for(let Y of L)Y.name===Q&&J.push(Y.node.text);return J.length===0?!Z:J.every(L=>ee.includes(L))===Z})}__name(parseAnyOfPredicate,`parseAnyOfPredicate`);function parseIsPredicate(L,J,Y,X,Z){if(L.length<2||L.length>3)throw Error(`Wrong number of arguments to \`#${Y}\` predicate. Expected 1 or 2. Got ${L.length-1}.`);if(!L.every(isStringStep))throw Error(`Arguments to \`#${Y}\` predicate must be strings.".`);let Q=Y===`is?`?X:Z;Q[J]||(Q[J]={}),Q[J][L[1].value]=L[2]?.value??null}__name(parseIsPredicate,`parseIsPredicate`);function parseSetDirective(L,J,Y){if(L.length<2||L.length>3)throw Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${L.length-1}.`);if(!L.every(isStringStep))throw Error('Arguments to `#set!` predicate must be strings.".');Y[J]||(Y[J]={}),Y[J][L[1].value]=L[2]?.value??null}__name(parseSetDirective,`parseSetDirective`);function parsePattern(L,J,Y,X,Z,Q,$,ee,te,ne,re){if(J===PREDICATE_STEP_TYPE_CAPTURE){let L=X[Y];Q.push({type:`capture`,name:L})}else if(J===PREDICATE_STEP_TYPE_STRING)Q.push({type:`string`,value:Z[Y]});else if(Q.length>0){if(Q[0].type!==`string`)throw Error(`Predicates must begin with a literal value`);let J=Q[0].value;switch(J){case`any-not-eq?`:case`not-eq?`:case`any-eq?`:case`eq?`:parseAnyPredicate(Q,L,J,$);break;case`any-not-match?`:case`not-match?`:case`any-match?`:case`match?`:parseMatchPredicate(Q,L,J,$);break;case`not-any-of?`:case`any-of?`:parseAnyOfPredicate(Q,L,J,$);break;case`is?`:case`is-not?`:parseIsPredicate(Q,L,J,ne,re);break;case`set!`:parseSetDirective(Q,L,te);break;default:ee[L].push({operator:J,operands:Q.slice(1)})}Q.length=0}}__name(parsePattern,`parsePattern`);var Query=class{static{__name(this,`Query`)}0=0;exceededMatchLimit;textPredicates;captureNames;captureQuantifiers;predicates;setProperties;assertedProperties;refutedProperties;matchLimit;constructor(L,J){let Y=C.lengthBytesUTF8(J),X=C._malloc(Y+1);C.stringToUTF8(J,X,Y+1);let Z=C._ts_query_new(L[0],X,Y,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!Z){let L=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),Y=C.getValue(TRANSFER_BUFFER,`i32`),Z=C.UTF8ToString(X,Y).length,Q=J.slice(Z,Z+100).split(`
45823
- `)[0],$=Q.match(QUERY_WORD_REGEX)?.[0]??``;switch(C._free(X),L){case QueryErrorKind.Syntax:throw new QueryError(QueryErrorKind.Syntax,{suffix:`${Z}: '${Q}'...`},Z,0);case QueryErrorKind.NodeName:throw new QueryError(L,{word:$},Z,$.length);case QueryErrorKind.FieldName:throw new QueryError(L,{word:$},Z,$.length);case QueryErrorKind.CaptureName:throw new QueryError(L,{word:$},Z,$.length);case QueryErrorKind.PatternStructure:throw new QueryError(L,{suffix:`${Z}: '${Q}'...`},Z,0)}}let Q=C._ts_query_string_count(Z),$=C._ts_query_capture_count(Z),ee=C._ts_query_pattern_count(Z),te=Array($),ne=Array(ee),re=Array(Q);for(let L=0;L<$;L++){let J=C._ts_query_capture_name_for_id(Z,L,TRANSFER_BUFFER),Y=C.getValue(TRANSFER_BUFFER,`i32`);te[L]=C.UTF8ToString(J,Y)}for(let L=0;L<ee;L++){let J=Array($);for(let Y=0;Y<$;Y++)J[Y]=C._ts_query_capture_quantifier_for_id(Z,L,Y);ne[L]=J}for(let L=0;L<Q;L++){let J=C._ts_query_string_value_for_id(Z,L,TRANSFER_BUFFER),Y=C.getValue(TRANSFER_BUFFER,`i32`);re[L]=C.UTF8ToString(J,Y)}let ie=Array(ee),ae=Array(ee),oe=Array(ee),se=Array(ee),ce=Array(ee);for(let L=0;L<ee;L++){let J=C._ts_query_predicates_for_pattern(Z,L,TRANSFER_BUFFER),Y=C.getValue(TRANSFER_BUFFER,`i32`);se[L]=[],ce[L]=[];let X=[],Q=J;for(let J=0;J<Y;J++){let J=C.getValue(Q,`i32`);Q+=SIZE_OF_INT;let Y=C.getValue(Q,`i32`);Q+=SIZE_OF_INT,parsePattern(L,J,Y,te,re,X,ce,se,ie,ae,oe)}Object.freeze(ce[L]),Object.freeze(se[L]),Object.freeze(ie[L]),Object.freeze(ae[L]),Object.freeze(oe[L])}C._free(X),this[0]=Z,this.captureNames=te,this.captureQuantifiers=ne,this.textPredicates=ce,this.predicates=se,this.setProperties=ie,this.assertedProperties=ae,this.refutedProperties=oe,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(L,J={}){let Y=J.startPosition??ZERO_POINT,X=J.endPosition??ZERO_POINT,Z=J.startIndex??0,Q=J.endIndex??0,$=J.startContainingPosition??ZERO_POINT,ee=J.endContainingPosition??ZERO_POINT,te=J.startContainingIndex??0,ne=J.endContainingIndex??0,re=J.matchLimit??4294967295,ie=J.maxStartDepth??4294967295,ae=J.progressCallback;if(typeof re!=`number`)throw Error(`Arguments must be numbers`);if(this.matchLimit=re,Q!==0&&Z>Q)throw Error("`startIndex` cannot be greater than `endIndex`");if(X!==ZERO_POINT&&(Y.row>X.row||Y.row===X.row&&Y.column>X.column))throw Error("`startPosition` cannot be greater than `endPosition`");if(ne!==0&&te>ne)throw Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(ee!==ZERO_POINT&&($.row>ee.row||$.row===ee.row&&$.column>ee.column))throw Error("`startContainingPosition` cannot be greater than `endContainingPosition`");ae&&(C.currentQueryProgressCallback=ae),marshalNode(L),C._ts_query_matches_wasm(this[0],L.tree[0],Y.row,Y.column,X.row,X.column,Z,Q,$.row,$.column,ee.row,ee.column,te,ne,re,ie);let oe=C.getValue(TRANSFER_BUFFER,`i32`),se=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),ce=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,`i32`),le=Array(oe);this.exceededMatchLimit=!!ce;let ue=0,de=se;for(let J=0;J<oe;J++){let J=C.getValue(de,`i32`);de+=SIZE_OF_INT;let Y=C.getValue(de,`i32`);de+=SIZE_OF_INT;let X=Array(Y);if(de=unmarshalCaptures(this,L.tree,de,J,X),this.textPredicates[J].every(L=>L(X))){le[ue]={patternIndex:J,captures:X};let L=this.setProperties[J];le[ue].setProperties=L;let Y=this.assertedProperties[J];le[ue].assertedProperties=Y;let Z=this.refutedProperties[J];le[ue].refutedProperties=Z,ue++}}return le.length=ue,C._free(se),C.currentQueryProgressCallback=null,le}captures(L,J={}){let Y=J.startPosition??ZERO_POINT,X=J.endPosition??ZERO_POINT,Z=J.startIndex??0,Q=J.endIndex??0,$=J.startContainingPosition??ZERO_POINT,ee=J.endContainingPosition??ZERO_POINT,te=J.startContainingIndex??0,ne=J.endContainingIndex??0,re=J.matchLimit??4294967295,ie=J.maxStartDepth??4294967295,ae=J.progressCallback;if(typeof re!=`number`)throw Error(`Arguments must be numbers`);if(this.matchLimit=re,Q!==0&&Z>Q)throw Error("`startIndex` cannot be greater than `endIndex`");if(X!==ZERO_POINT&&(Y.row>X.row||Y.row===X.row&&Y.column>X.column))throw Error("`startPosition` cannot be greater than `endPosition`");if(ne!==0&&te>ne)throw Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(ee!==ZERO_POINT&&($.row>ee.row||$.row===ee.row&&$.column>ee.column))throw Error("`startContainingPosition` cannot be greater than `endContainingPosition`");ae&&(C.currentQueryProgressCallback=ae),marshalNode(L),C._ts_query_captures_wasm(this[0],L.tree[0],Y.row,Y.column,X.row,X.column,Z,Q,$.row,$.column,ee.row,ee.column,te,ne,re,ie);let oe=C.getValue(TRANSFER_BUFFER,`i32`),se=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),ce=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,`i32`),le=[];this.exceededMatchLimit=!!ce;let ue=[],de=se;for(let J=0;J<oe;J++){let J=C.getValue(de,`i32`);de+=SIZE_OF_INT;let Y=C.getValue(de,`i32`);de+=SIZE_OF_INT;let X=C.getValue(de,`i32`);if(de+=SIZE_OF_INT,ue.length=Y,de=unmarshalCaptures(this,L.tree,de,J,ue),this.textPredicates[J].every(L=>L(ue))){let L=ue[X];L.setProperties=this.setProperties[J],L.assertedProperties=this.assertedProperties[J],L.refutedProperties=this.refutedProperties[J],le.push(L)}}return C._free(se),C.currentQueryProgressCallback=null,le}predicatesForPattern(L){return this.predicates[L]}disableCapture(L){let J=C.lengthBytesUTF8(L),Y=C._malloc(J+1);C.stringToUTF8(L,Y,J+1),C._ts_query_disable_capture(this[0],Y,J),C._free(Y)}disablePattern(L){if(L>=this.predicates.length)throw Error(`Pattern index is ${L} but the pattern count is ${this.predicates.length}`);C._ts_query_disable_pattern(this[0],L)}didExceedMatchLimit(){return this.exceededMatchLimit}startIndexForPattern(L){if(L>=this.predicates.length)throw Error(`Pattern index is ${L} but the pattern count is ${this.predicates.length}`);return C._ts_query_start_byte_for_pattern(this[0],L)}endIndexForPattern(L){if(L>=this.predicates.length)throw Error(`Pattern index is ${L} but the pattern count is ${this.predicates.length}`);return C._ts_query_end_byte_for_pattern(this[0],L)}patternCount(){return C._ts_query_pattern_count(this[0])}captureIndexForName(L){return this.captureNames.indexOf(L)}isPatternRooted(L){return C._ts_query_is_pattern_rooted(this[0],L)===1}isPatternNonLocal(L){return C._ts_query_is_pattern_non_local(this[0],L)===1}isPatternGuaranteedAtStep(L){return C._ts_query_is_pattern_guaranteed_at_step(this[0],L)===1}};let initialized=!1;async function initParser(){return initialized||=(await Parser.init(),!0),new Parser}let pythonLanguage;async function getPythonLanguage(){return pythonLanguage??=await Language.load(fileURLToPath$1(new URL(`../grammars/tree-sitter-python.wasm`,import.meta.url))),pythonLanguage}let rubyLanguage;async function getRubyLanguage(){return rubyLanguage??=await Language.load(fileURLToPath$1(new URL(`../grammars/tree-sitter-ruby.wasm`,import.meta.url))),rubyLanguage}function children$2(L){return L.namedChildren.filter(L=>L!==null)}function emptySetupPyData(){return{author:void 0,author_email:void 0,classifiers:[],description:void 0,download_url:void 0,extras_require:{},install_requires:[],keywords:void 0,license:void 0,long_description:void 0,maintainer:void 0,maintainer_email:void 0,name:void 0,project_urls:{},python_requires:void 0,url:void 0,version:void 0}}function extractString$1(L){switch(L.type){case`concatenated_string`:{let J=children$2(L).map(L=>extractString$1(L)).filter(L=>L!==void 0);return J.length>0?J.join(``):void 0}case`float`:case`integer`:return L.text;case`string`:{let J=children$2(L).find(L=>L.type===`string_content`);if(J)return J.text;let Y=L.text.replace(/^[bfru]*/i,``);return Y.startsWith(`"""`)||Y.startsWith(`'''`)?Y.slice(3,-3):Y.slice(1,-1)}case`string_content`:return L.text;default:return}}function extractStringList(L){if(L.type===`list`||L.type===`tuple`)return children$2(L).map(L=>extractString$1(L)).filter(L=>L!==void 0);let J=extractString$1(L);return J===void 0?[]:[J]}function extractStringDict(L){let J={};if(L.type!==`dictionary`)return J;for(let Y of children$2(L)){if(Y.type!==`pair`)continue;let L=Y.childForFieldName(`key`),X=Y.childForFieldName(`value`);if(!L||!X)continue;let Z=extractString$1(L),Q=extractString$1(X);Z&&Q&&(J[Z]=Q)}return J}function extractStringListDict(L){let J={};if(L.type!==`dictionary`)return J;for(let Y of children$2(L)){if(Y.type!==`pair`)continue;let L=Y.childForFieldName(`key`),X=Y.childForFieldName(`value`);if(!L||!X)continue;let Z=extractString$1(L);Z&&(J[Z]=extractStringList(X))}return J}const STRING_ATTRS=new Set([`author`,`author_email`,`description`,`download_url`,`license`,`long_description`,`maintainer`,`maintainer_email`,`name`,`python_requires`,`url`,`version`]);async function parseSetupPy(L){let J=await initParser(),Y=await getPythonLanguage();J.setLanguage(Y);let X=J.parse(L);if(!X)throw Error(`Failed to parse setup.py source`);let Z=emptySetupPyData(),Q=findSetupCall(X.rootNode);if(!Q)return Z;let $=Q.childForFieldName(`arguments`);if(!$)return Z;for(let L of children$2($)){if(L.type!==`keyword_argument`)continue;let J=L.childForFieldName(`name`),Y=L.childForFieldName(`value`);if(!J||!Y)continue;let X=J.text;if(STRING_ATTRS.has(X)){let L=extractString$1(Y);L!==void 0&&Object.assign(Z,{[X]:L});continue}switch(X){case`classifiers`:Z.classifiers=extractStringList(Y);break;case`extras_require`:Z.extras_require=extractStringListDict(Y);break;case`install_requires`:Z.install_requires=extractStringList(Y);break;case`keywords`:if(Y.type===`list`||Y.type===`tuple`)Z.keywords=extractStringList(Y);else{let L=extractString$1(Y);L&&(Z.keywords=L.split(`,`).map(L=>L.trim()))}break;case`project_urls`:Z.project_urls=extractStringDict(Y);break}}return Z}function findSetupCall(L){if(L.type===`call`){let J=L.childForFieldName(`function`);if(J&&(J.type===`identifier`&&J.text===`setup`||J.type===`attribute`&&J.childForFieldName(`attribute`)?.text===`setup`))return L}for(let J of children$2(L)){let L=findSetupCall(J);if(L)return L}}const setupPyDataSchema=object({author:nonEmptyString,author_email:nonEmptyString,classifiers:stringArray,description:nonEmptyString,download_url:optionalUrl,extras_require:record(string$2(),array(string$2())),install_requires:stringArray,keywords:array(string$2()).optional(),license:nonEmptyString,long_description:nonEmptyString,maintainer:nonEmptyString,maintainer_email:nonEmptyString,name:nonEmptyString,project_urls:record(string$2(),string$2()),python_requires:nonEmptyString,url:optionalUrl,version:nonEmptyString});async function parse$6(L){let J=await parseSetupPy(L);return setupPyDataSchema.parse(J)}const pythonSetupPySource=defineSource({async discover(L){return getMatches(L.options,[`setup.py`])},key:`pythonSetupPy`,async parse(L,J){return{data:await parse$6(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),pypiResponseSchema=object({info:object({version:string$2(),yanked:boolean().optional(),yanked_reason:string$2().nullable().optional()}),releases:record(string$2(),array(unknown())),urls:array(object({size:number().optional(),upload_time_iso_8601:string$2().optional()}))}),pypistatsRecentSchema=object({data:object({last_day:number(),last_month:number(),last_week:number()})}),pypistatsOverallSchema=object({data:array(object({category:string$2(),downloads:number()}))}),pythonPypiRegistrySource=defineSource({async discover(L){let J=[];return J=ensureArray(L.metadata?.pythonPyprojectToml).map(L=>L.data.project?.name).filter(L=>L!==void 0),J.length===0&&(J=ensureArray(L.metadata?.pythonSetupCfg).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(L.metadata?.pythonSetupPy).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(L.metadata?.pythonPkgInfo).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&([`pythonPyprojectToml`,`pythonSetupCfg`,`pythonSetupPy`,`pythonPkgInfo`].some(J=>L.completedSources?.has(J))||(log$2.warn(`Missing python package names in source context metadata for ${L.options.path}, extracting them now...`),J=ensureArray(await pythonPyprojectTomlSource.extract(L)).map(L=>L.data.project?.name).filter(L=>L!==void 0),J.length===0&&(J=ensureArray(await pythonSetupCfgSource.extract(L)).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(await pythonSetupPySource.extract(L)).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(await pythonPkgInfoSource.extract(L)).map(L=>L.data.name).filter(L=>L!==void 0)))),J},key:`pythonPypiRegistry`,async parse(L){log$2.debug(`Extracting PyPI metadata...`);let J=L,[Y,X,Z]=await Promise.all([fetch(`https://pypi.org/pypi/${encodeURIComponent(J)}/json`).then(async L=>{if(L.ok)return pypiResponseSchema.parse(await L.json())}).catch(()=>void 0),fetch(`https://pypistats.org/api/packages/${encodeURIComponent(J)}/recent`).then(async L=>{if(L.ok)return pypistatsRecentSchema.parse(await L.json())}).catch(()=>void 0),fetch(`https://pypistats.org/api/packages/${encodeURIComponent(J)}/overall?mirrors=false`).then(async L=>{if(L.ok)return pypistatsOverallSchema.parse(await L.json())}).catch(()=>void 0)]);if(!Y)return;let Q=Y.urls[0]?.upload_time_iso_8601,$=Y.urls[0]?.size,ee={publishDateLatest:Q,releaseCount:Object.keys(Y.releases).length,sizeBytes:$,url:`https://pypi.org/project/${encodeURIComponent(J)}/`,versionLatest:Y.info.version};return Y.info.yanked&&(ee.yanked=!0,Y.info.yanked_reason&&(ee.yankedReason=Y.info.yanked_reason)),X&&(ee.downloadsDaily=X.data.last_day,ee.downloadsMonthly=X.data.last_month,ee.downloadsWeekly=X.data.last_week),Z&&(ee.downloads180Days=Z.data.reduce((L,J)=>L+J.downloads,0)||void 0),{data:ee,source:`https://pypi.org/project/${encodeURIComponent(J)}/`}},phase:2}),emptyOptions={};function toString(L,J){let Y=J||emptyOptions;return one(L,typeof Y.includeImageAlt==`boolean`?Y.includeImageAlt:!0,typeof Y.includeHtml==`boolean`?Y.includeHtml:!0)}function one(L,J,Y){if(node(L)){if(`value`in L)return L.type===`html`&&!Y?``:L.value;if(J&&`alt`in L&&L.alt)return L.alt;if(`children`in L)return all(L.children,J,Y)}return Array.isArray(L)?all(L,J,Y):``}function all(L,J,Y){let X=[],Z=-1;for(;++Z<L.length;)X[Z]=one(L[Z],J,Y);return X.join(``)}function node(L){return!!(L&&typeof L==`object`)}const characterEntities={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
45823
+ `)[0],$=Q.match(QUERY_WORD_REGEX)?.[0]??``;switch(C._free(X),L){case QueryErrorKind.Syntax:throw new QueryError(QueryErrorKind.Syntax,{suffix:`${Z}: '${Q}'...`},Z,0);case QueryErrorKind.NodeName:throw new QueryError(L,{word:$},Z,$.length);case QueryErrorKind.FieldName:throw new QueryError(L,{word:$},Z,$.length);case QueryErrorKind.CaptureName:throw new QueryError(L,{word:$},Z,$.length);case QueryErrorKind.PatternStructure:throw new QueryError(L,{suffix:`${Z}: '${Q}'...`},Z,0)}}let Q=C._ts_query_string_count(Z),$=C._ts_query_capture_count(Z),ee=C._ts_query_pattern_count(Z),te=Array($),ne=Array(ee),re=Array(Q);for(let L=0;L<$;L++){let J=C._ts_query_capture_name_for_id(Z,L,TRANSFER_BUFFER),Y=C.getValue(TRANSFER_BUFFER,`i32`);te[L]=C.UTF8ToString(J,Y)}for(let L=0;L<ee;L++){let J=Array($);for(let Y=0;Y<$;Y++)J[Y]=C._ts_query_capture_quantifier_for_id(Z,L,Y);ne[L]=J}for(let L=0;L<Q;L++){let J=C._ts_query_string_value_for_id(Z,L,TRANSFER_BUFFER),Y=C.getValue(TRANSFER_BUFFER,`i32`);re[L]=C.UTF8ToString(J,Y)}let ie=Array(ee),ae=Array(ee),oe=Array(ee),se=Array(ee),ce=Array(ee);for(let L=0;L<ee;L++){let J=C._ts_query_predicates_for_pattern(Z,L,TRANSFER_BUFFER),Y=C.getValue(TRANSFER_BUFFER,`i32`);se[L]=[],ce[L]=[];let X=[],Q=J;for(let J=0;J<Y;J++){let J=C.getValue(Q,`i32`);Q+=SIZE_OF_INT;let Y=C.getValue(Q,`i32`);Q+=SIZE_OF_INT,parsePattern(L,J,Y,te,re,X,ce,se,ie,ae,oe)}Object.freeze(ce[L]),Object.freeze(se[L]),Object.freeze(ie[L]),Object.freeze(ae[L]),Object.freeze(oe[L])}C._free(X),this[0]=Z,this.captureNames=te,this.captureQuantifiers=ne,this.textPredicates=ce,this.predicates=se,this.setProperties=ie,this.assertedProperties=ae,this.refutedProperties=oe,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(L,J={}){let Y=J.startPosition??ZERO_POINT,X=J.endPosition??ZERO_POINT,Z=J.startIndex??0,Q=J.endIndex??0,$=J.startContainingPosition??ZERO_POINT,ee=J.endContainingPosition??ZERO_POINT,te=J.startContainingIndex??0,ne=J.endContainingIndex??0,re=J.matchLimit??4294967295,ie=J.maxStartDepth??4294967295,ae=J.progressCallback;if(typeof re!=`number`)throw Error(`Arguments must be numbers`);if(this.matchLimit=re,Q!==0&&Z>Q)throw Error("`startIndex` cannot be greater than `endIndex`");if(X!==ZERO_POINT&&(Y.row>X.row||Y.row===X.row&&Y.column>X.column))throw Error("`startPosition` cannot be greater than `endPosition`");if(ne!==0&&te>ne)throw Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(ee!==ZERO_POINT&&($.row>ee.row||$.row===ee.row&&$.column>ee.column))throw Error("`startContainingPosition` cannot be greater than `endContainingPosition`");ae&&(C.currentQueryProgressCallback=ae),marshalNode(L),C._ts_query_matches_wasm(this[0],L.tree[0],Y.row,Y.column,X.row,X.column,Z,Q,$.row,$.column,ee.row,ee.column,te,ne,re,ie);let oe=C.getValue(TRANSFER_BUFFER,`i32`),se=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),ce=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,`i32`),le=Array(oe);this.exceededMatchLimit=!!ce;let ue=0,de=se;for(let J=0;J<oe;J++){let J=C.getValue(de,`i32`);de+=SIZE_OF_INT;let Y=C.getValue(de,`i32`);de+=SIZE_OF_INT;let X=Array(Y);if(de=unmarshalCaptures(this,L.tree,de,J,X),this.textPredicates[J].every(L=>L(X))){le[ue]={patternIndex:J,captures:X};let L=this.setProperties[J];le[ue].setProperties=L;let Y=this.assertedProperties[J];le[ue].assertedProperties=Y;let Z=this.refutedProperties[J];le[ue].refutedProperties=Z,ue++}}return le.length=ue,C._free(se),C.currentQueryProgressCallback=null,le}captures(L,J={}){let Y=J.startPosition??ZERO_POINT,X=J.endPosition??ZERO_POINT,Z=J.startIndex??0,Q=J.endIndex??0,$=J.startContainingPosition??ZERO_POINT,ee=J.endContainingPosition??ZERO_POINT,te=J.startContainingIndex??0,ne=J.endContainingIndex??0,re=J.matchLimit??4294967295,ie=J.maxStartDepth??4294967295,ae=J.progressCallback;if(typeof re!=`number`)throw Error(`Arguments must be numbers`);if(this.matchLimit=re,Q!==0&&Z>Q)throw Error("`startIndex` cannot be greater than `endIndex`");if(X!==ZERO_POINT&&(Y.row>X.row||Y.row===X.row&&Y.column>X.column))throw Error("`startPosition` cannot be greater than `endPosition`");if(ne!==0&&te>ne)throw Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(ee!==ZERO_POINT&&($.row>ee.row||$.row===ee.row&&$.column>ee.column))throw Error("`startContainingPosition` cannot be greater than `endContainingPosition`");ae&&(C.currentQueryProgressCallback=ae),marshalNode(L),C._ts_query_captures_wasm(this[0],L.tree[0],Y.row,Y.column,X.row,X.column,Z,Q,$.row,$.column,ee.row,ee.column,te,ne,re,ie);let oe=C.getValue(TRANSFER_BUFFER,`i32`),se=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,`i32`),ce=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,`i32`),le=[];this.exceededMatchLimit=!!ce;let ue=[],de=se;for(let J=0;J<oe;J++){let J=C.getValue(de,`i32`);de+=SIZE_OF_INT;let Y=C.getValue(de,`i32`);de+=SIZE_OF_INT;let X=C.getValue(de,`i32`);if(de+=SIZE_OF_INT,ue.length=Y,de=unmarshalCaptures(this,L.tree,de,J,ue),this.textPredicates[J].every(L=>L(ue))){let L=ue[X];L.setProperties=this.setProperties[J],L.assertedProperties=this.assertedProperties[J],L.refutedProperties=this.refutedProperties[J],le.push(L)}}return C._free(se),C.currentQueryProgressCallback=null,le}predicatesForPattern(L){return this.predicates[L]}disableCapture(L){let J=C.lengthBytesUTF8(L),Y=C._malloc(J+1);C.stringToUTF8(L,Y,J+1),C._ts_query_disable_capture(this[0],Y,J),C._free(Y)}disablePattern(L){if(L>=this.predicates.length)throw Error(`Pattern index is ${L} but the pattern count is ${this.predicates.length}`);C._ts_query_disable_pattern(this[0],L)}didExceedMatchLimit(){return this.exceededMatchLimit}startIndexForPattern(L){if(L>=this.predicates.length)throw Error(`Pattern index is ${L} but the pattern count is ${this.predicates.length}`);return C._ts_query_start_byte_for_pattern(this[0],L)}endIndexForPattern(L){if(L>=this.predicates.length)throw Error(`Pattern index is ${L} but the pattern count is ${this.predicates.length}`);return C._ts_query_end_byte_for_pattern(this[0],L)}patternCount(){return C._ts_query_pattern_count(this[0])}captureIndexForName(L){return this.captureNames.indexOf(L)}isPatternRooted(L){return C._ts_query_is_pattern_rooted(this[0],L)===1}isPatternNonLocal(L){return C._ts_query_is_pattern_non_local(this[0],L)===1}isPatternGuaranteedAtStep(L){return C._ts_query_is_pattern_guaranteed_at_step(this[0],L)===1}};let initialized=!1;async function initParser(){return initialized||=(await Parser.init(),!0),new Parser}let pythonLanguage;async function getPythonLanguage(){return pythonLanguage??=await Language.load(fileURLToPath$1(new URL(`../../grammars/tree-sitter-python.wasm`,import.meta.url))),pythonLanguage}let rubyLanguage;async function getRubyLanguage(){return rubyLanguage??=await Language.load(fileURLToPath$1(new URL(`../../grammars/tree-sitter-ruby.wasm`,import.meta.url))),rubyLanguage}function children$2(L){return L.namedChildren.filter(L=>L!==null)}function emptySetupPyData(){return{author:void 0,author_email:void 0,classifiers:[],description:void 0,download_url:void 0,extras_require:{},install_requires:[],keywords:void 0,license:void 0,long_description:void 0,maintainer:void 0,maintainer_email:void 0,name:void 0,project_urls:{},python_requires:void 0,url:void 0,version:void 0}}function extractString$1(L){switch(L.type){case`concatenated_string`:{let J=children$2(L).map(L=>extractString$1(L)).filter(L=>L!==void 0);return J.length>0?J.join(``):void 0}case`float`:case`integer`:return L.text;case`string`:{let J=children$2(L).find(L=>L.type===`string_content`);if(J)return J.text;let Y=L.text.replace(/^[bfru]*/i,``);return Y.startsWith(`"""`)||Y.startsWith(`'''`)?Y.slice(3,-3):Y.slice(1,-1)}case`string_content`:return L.text;default:return}}function extractStringList(L){if(L.type===`list`||L.type===`tuple`)return children$2(L).map(L=>extractString$1(L)).filter(L=>L!==void 0);let J=extractString$1(L);return J===void 0?[]:[J]}function extractStringDict(L){let J={};if(L.type!==`dictionary`)return J;for(let Y of children$2(L)){if(Y.type!==`pair`)continue;let L=Y.childForFieldName(`key`),X=Y.childForFieldName(`value`);if(!L||!X)continue;let Z=extractString$1(L),Q=extractString$1(X);Z&&Q&&(J[Z]=Q)}return J}function extractStringListDict(L){let J={};if(L.type!==`dictionary`)return J;for(let Y of children$2(L)){if(Y.type!==`pair`)continue;let L=Y.childForFieldName(`key`),X=Y.childForFieldName(`value`);if(!L||!X)continue;let Z=extractString$1(L);Z&&(J[Z]=extractStringList(X))}return J}const STRING_ATTRS=new Set([`author`,`author_email`,`description`,`download_url`,`license`,`long_description`,`maintainer`,`maintainer_email`,`name`,`python_requires`,`url`,`version`]);async function parseSetupPy(L){let J=await initParser(),Y=await getPythonLanguage();J.setLanguage(Y);let X=J.parse(L);if(!X)throw Error(`Failed to parse setup.py source`);let Z=emptySetupPyData(),Q=findSetupCall(X.rootNode);if(!Q)return Z;let $=Q.childForFieldName(`arguments`);if(!$)return Z;for(let L of children$2($)){if(L.type!==`keyword_argument`)continue;let J=L.childForFieldName(`name`),Y=L.childForFieldName(`value`);if(!J||!Y)continue;let X=J.text;if(STRING_ATTRS.has(X)){let L=extractString$1(Y);L!==void 0&&Object.assign(Z,{[X]:L});continue}switch(X){case`classifiers`:Z.classifiers=extractStringList(Y);break;case`extras_require`:Z.extras_require=extractStringListDict(Y);break;case`install_requires`:Z.install_requires=extractStringList(Y);break;case`keywords`:if(Y.type===`list`||Y.type===`tuple`)Z.keywords=extractStringList(Y);else{let L=extractString$1(Y);L&&(Z.keywords=splitCommaSeparated(L))}break;case`project_urls`:Z.project_urls=extractStringDict(Y);break}}return Z}function findSetupCall(L){if(L.type===`call`){let J=L.childForFieldName(`function`);if(J&&(J.type===`identifier`&&J.text===`setup`||J.type===`attribute`&&J.childForFieldName(`attribute`)?.text===`setup`))return L}for(let J of children$2(L)){let L=findSetupCall(J);if(L)return L}}const setupPyDataSchema=object({author:nonEmptyString,author_email:nonEmptyString,classifiers:stringArray,description:nonEmptyString,download_url:optionalUrl,extras_require:record(string$2(),array(string$2())),install_requires:stringArray,keywords:array(string$2()).optional(),license:nonEmptyString,long_description:nonEmptyString,maintainer:nonEmptyString,maintainer_email:nonEmptyString,name:nonEmptyString,project_urls:record(string$2(),string$2()),python_requires:nonEmptyString,url:optionalUrl,version:nonEmptyString});async function parse$6(L){let J=await parseSetupPy(L);return setupPyDataSchema.parse(J)}const pythonSetupPySource=defineSource({async discover(L){return getMatches(L.options,[`setup.py`])},key:`pythonSetupPy`,async parse(L,J){return{data:await parse$6(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),pypiResponseSchema=object({info:object({version:string$2(),yanked:boolean().optional(),yanked_reason:string$2().nullable().optional()}),releases:record(string$2(),array(unknown())),urls:array(object({size:number().optional(),upload_time_iso_8601:string$2().optional()}))}),pypistatsRecentSchema=object({data:object({last_day:number(),last_month:number(),last_week:number()})}),pypistatsOverallSchema=object({data:array(object({category:string$2(),downloads:number()}))}),pythonPypiRegistrySource=defineSource({async discover(L){let J=[];return J=ensureArray(L.metadata?.pythonPyprojectToml).map(L=>L.data.project?.name).filter(L=>L!==void 0),J.length===0&&(J=ensureArray(L.metadata?.pythonSetupCfg).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(L.metadata?.pythonSetupPy).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(L.metadata?.pythonPkgInfo).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&([`pythonPyprojectToml`,`pythonSetupCfg`,`pythonSetupPy`,`pythonPkgInfo`].some(J=>L.completedSources?.has(J))||(log$2.warn(`Missing python package names in source context metadata for ${L.options.path}, extracting them now...`),J=ensureArray(await pythonPyprojectTomlSource.extract(L)).map(L=>L.data.project?.name).filter(L=>L!==void 0),J.length===0&&(J=ensureArray(await pythonSetupCfgSource.extract(L)).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(await pythonSetupPySource.extract(L)).map(L=>L.data.name).filter(L=>L!==void 0)),J.length===0&&(J=ensureArray(await pythonPkgInfoSource.extract(L)).map(L=>L.data.name).filter(L=>L!==void 0)))),J},key:`pythonPypiRegistry`,async parse(L){log$2.debug(`Extracting PyPI metadata...`);let J=L,[Y,X,Z]=await Promise.all([fetchWithRetry(`https://pypi.org/pypi/${encodeURIComponent(J)}/json`).then(async L=>{if(L.ok)return pypiResponseSchema.parse(await L.json())}).catch(()=>void 0),fetchWithRetry(`https://pypistats.org/api/packages/${encodeURIComponent(J)}/recent`).then(async L=>{if(L.ok)return pypistatsRecentSchema.parse(await L.json())}).catch(()=>void 0),fetchWithRetry(`https://pypistats.org/api/packages/${encodeURIComponent(J)}/overall?mirrors=false`).then(async L=>{if(L.ok)return pypistatsOverallSchema.parse(await L.json())}).catch(()=>void 0)]);if(!Y)return;let Q=Y.urls[0]?.upload_time_iso_8601,$=Y.urls[0]?.size,ee={publishDateLatest:Q,releaseCount:Object.keys(Y.releases).length,sizeBytes:$,url:`https://pypi.org/project/${encodeURIComponent(J)}/`,versionLatest:Y.info.version};return Y.info.yanked&&(ee.yanked=!0,Y.info.yanked_reason&&(ee.yankedReason=Y.info.yanked_reason)),X&&(ee.downloadsDaily=X.data.last_day,ee.downloadsMonthly=X.data.last_month,ee.downloadsWeekly=X.data.last_week),Z&&(ee.downloads180Days=Z.data.reduce((L,J)=>L+J.downloads,0)||void 0),{data:ee,source:`https://pypi.org/project/${encodeURIComponent(J)}/`}},phase:2}),emptyOptions={};function toString(L,J){let Y=J||emptyOptions;return one(L,typeof Y.includeImageAlt==`boolean`?Y.includeImageAlt:!0,typeof Y.includeHtml==`boolean`?Y.includeHtml:!0)}function one(L,J,Y){if(node(L)){if(`value`in L)return L.type===`html`&&!Y?``:L.value;if(J&&`alt`in L&&L.alt)return L.alt;if(`children`in L)return all(L.children,J,Y)}return Array.isArray(L)?all(L,J,Y):``}function all(L,J,Y){let X=[],Z=-1;for(;++Z<L.length;)X[Z]=one(L[Z],J,Y);return X.join(``)}function node(L){return!!(L&&typeof L==`object`)}const characterEntities={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
45824
45824
  `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,nscr:`𝓃`,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:`⫅̸`,nsube:`⊈`,nsubset:`⊂⃒`,nsubseteq:`⊈`,nsubseteqq:`⫅̸`,nsucc:`⊁`,nsucceq:`⪰̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupe:`⊉`,nsupset:`⊃⃒`,nsupseteq:`⊉`,nsupseteqq:`⫆̸`,ntgl:`≹`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},own$2={}.hasOwnProperty;function decodeNamedCharacterReference(L){return own$2.call(characterEntities,L)?characterEntities[L]:!1}function splice(L,J,Y,X){let Z=L.length,Q=0,$;if(J=J<0?-J>Z?0:Z+J:J>Z?Z:J,Y=Y>0?Y:0,X.length<1e4)$=Array.from(X),$.unshift(J,Y),L.splice(...$);else for(Y&&L.splice(J,Y);Q<X.length;)$=X.slice(Q,Q+1e4),$.unshift(J,0),L.splice(...$),Q+=1e4,J+=1e4}function push(L,J){return L.length>0?(splice(L,L.length,0,J),L):J}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(L){let J={},Y=-1;for(;++Y<L.length;)syntaxExtension(J,L[Y]);return J}function syntaxExtension(L,J){let Y;for(Y in J){let X=(hasOwnProperty.call(L,Y)?L[Y]:void 0)||(L[Y]={}),Z=J[Y],Q;if(Z)for(Q in Z){hasOwnProperty.call(X,Q)||(X[Q]=[]);let L=Z[Q];constructs(X[Q],Array.isArray(L)?L:L?[L]:[])}}}function constructs(L,J){let Y=-1,X=[];for(;++Y<J.length;)(J[Y].add===`after`?L:X).push(J[Y]);splice(L,0,0,X)}function decodeNumericCharacterReference(L,J){let Y=Number.parseInt(L,J);return Y<9||Y===11||Y>13&&Y<32||Y>126&&Y<160||Y>55295&&Y<57344||Y>64975&&Y<65008||(Y&65535)==65535||(Y&65535)==65534||Y>1114111?`�`:String.fromCodePoint(Y)}function normalizeIdentifier(L){return L.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(L){return L!==null&&(L<32||L===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(L){return L!==null&&L<-2}function markdownLineEndingOrSpace(L){return L!==null&&(L<0||L===32)}function markdownSpace(L){return L===-2||L===-1||L===32}const unicodePunctuation=regexCheck(/\p{P}|\p{S}/u),unicodeWhitespace=regexCheck(/\s/);function regexCheck(L){return J;function J(J){return J!==null&&J>-1&&L.test(String.fromCharCode(J))}}function factorySpace(L,J,Y,X){let Z=X?X-1:1/0,Q=0;return $;function $(X){return markdownSpace(X)?(L.enter(Y),ee(X)):J(X)}function ee(X){return markdownSpace(X)&&Q++<Z?(L.consume(X),ee):(L.exit(Y),J(X))}}const content$1={tokenize:initializeContent};function initializeContent(L){let J=L.attempt(this.parser.constructs.contentInitial,X,Z),Y;return J;function X(Y){if(Y===null){L.consume(Y);return}return L.enter(`lineEnding`),L.consume(Y),L.exit(`lineEnding`),factorySpace(L,J,`linePrefix`)}function Z(J){return L.enter(`paragraph`),Q(J)}function Q(J){let X=L.enter(`chunkText`,{contentType:`text`,previous:Y});return Y&&(Y.next=X),Y=X,$(J)}function $(J){if(J===null){L.exit(`chunkText`),L.exit(`paragraph`),L.consume(J);return}return markdownLineEnding(J)?(L.consume(J),L.exit(`chunkText`),Q):(L.consume(J),$)}}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(L){let J=this,Y=[],X=0,Z,Q,$;return ee;function ee(Z){if(X<Y.length){let Q=Y[X];return J.containerState=Q[1],L.attempt(Q[0].continuation,te,ne)(Z)}return ne(Z)}function te(L){if(X++,J.containerState._closeFlow){J.containerState._closeFlow=void 0,Z&&de();let Y=J.events.length,Q=Y,$;for(;Q--;)if(J.events[Q][0]===`exit`&&J.events[Q][1].type===`chunkFlow`){$=J.events[Q][1].end;break}ue(X);let ee=Y;for(;ee<J.events.length;)J.events[ee][1].end={...$},ee++;return splice(J.events,Q+1,0,J.events.slice(Y)),J.events.length=ee,ne(L)}return ee(L)}function ne(Q){if(X===Y.length){if(!Z)return ae(Q);if(Z.currentConstruct&&Z.currentConstruct.concrete)return se(Q);J.interrupt=!!(Z.currentConstruct&&!Z._gfmTableDynamicInterruptHack)}return J.containerState={},L.check(containerConstruct,re,ie)(Q)}function re(L){return Z&&de(),ue(X),ae(L)}function ie(L){return J.parser.lazy[J.now().line]=X!==Y.length,$=J.now().offset,se(L)}function ae(Y){return J.containerState={},L.attempt(containerConstruct,oe,se)(Y)}function oe(L){return X++,Y.push([J.currentConstruct,J.containerState]),ae(L)}function se(Y){if(Y===null){Z&&de(),ue(0),L.consume(Y);return}return Z||=J.parser.flow(J.now()),L.enter(`chunkFlow`,{_tokenizer:Z,contentType:`flow`,previous:Q}),ce(Y)}function ce(Y){if(Y===null){le(L.exit(`chunkFlow`),!0),ue(0),L.consume(Y);return}return markdownLineEnding(Y)?(L.consume(Y),le(L.exit(`chunkFlow`)),X=0,J.interrupt=void 0,ee):(L.consume(Y),ce)}function le(L,Y){let ee=J.sliceStream(L);if(Y&&ee.push(null),L.previous=Q,Q&&(Q.next=L),Q=L,Z.defineSkip(L.start),Z.write(ee),J.parser.lazy[L.start.line]){let L=Z.events.length;for(;L--;)if(Z.events[L][1].start.offset<$&&(!Z.events[L][1].end||Z.events[L][1].end.offset>$))return;let Y=J.events.length,Q=Y,ee,te;for(;Q--;)if(J.events[Q][0]===`exit`&&J.events[Q][1].type===`chunkFlow`){if(ee){te=J.events[Q][1].end;break}ee=!0}for(ue(X),L=Y;L<J.events.length;)J.events[L][1].end={...te},L++;splice(J.events,Q+1,0,J.events.slice(Y)),J.events.length=L}}function ue(X){let Z=Y.length;for(;Z-- >X;){let X=Y[Z];J.containerState=X[1],X[0].exit.call(J,L)}Y.length=X}function de(){Z.write([null]),Q=void 0,Z=void 0,J.containerState._closeFlow=void 0}}function tokenizeContainer(L,J,Y){return factorySpace(L,L.attempt(this.parser.constructs.document,J,Y),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function classifyCharacter(L){if(L===null||markdownLineEndingOrSpace(L)||unicodeWhitespace(L))return 1;if(unicodePunctuation(L))return 2}function resolveAll(L,J,Y){let X=[],Z=-1;for(;++Z<L.length;){let Q=L[Z].resolveAll;Q&&!X.includes(Q)&&(J=Q(J,Y),X.push(Q))}return J}const attention={name:`attention`,resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(L,J){let Y=-1,X,Z,Q,$,ee,te,ne,re;for(;++Y<L.length;)if(L[Y][0]===`enter`&&L[Y][1].type===`attentionSequence`&&L[Y][1]._close){for(X=Y;X--;)if(L[X][0]===`exit`&&L[X][1].type===`attentionSequence`&&L[X][1]._open&&J.sliceSerialize(L[X][1]).charCodeAt(0)===J.sliceSerialize(L[Y][1]).charCodeAt(0)){if((L[X][1]._close||L[Y][1]._open)&&(L[Y][1].end.offset-L[Y][1].start.offset)%3&&!((L[X][1].end.offset-L[X][1].start.offset+L[Y][1].end.offset-L[Y][1].start.offset)%3))continue;te=L[X][1].end.offset-L[X][1].start.offset>1&&L[Y][1].end.offset-L[Y][1].start.offset>1?2:1;let ie={...L[X][1].end},ae={...L[Y][1].start};movePoint(ie,-te),movePoint(ae,te),$={type:te>1?`strongSequence`:`emphasisSequence`,start:ie,end:{...L[X][1].end}},ee={type:te>1?`strongSequence`:`emphasisSequence`,start:{...L[Y][1].start},end:ae},Q={type:te>1?`strongText`:`emphasisText`,start:{...L[X][1].end},end:{...L[Y][1].start}},Z={type:te>1?`strong`:`emphasis`,start:{...$.start},end:{...ee.end}},L[X][1].end={...$.start},L[Y][1].start={...ee.end},ne=[],L[X][1].end.offset-L[X][1].start.offset&&(ne=push(ne,[[`enter`,L[X][1],J],[`exit`,L[X][1],J]])),ne=push(ne,[[`enter`,Z,J],[`enter`,$,J],[`exit`,$,J],[`enter`,Q,J]]),ne=push(ne,resolveAll(J.parser.constructs.insideSpan.null,L.slice(X+1,Y),J)),ne=push(ne,[[`exit`,Q,J],[`enter`,ee,J],[`exit`,ee,J],[`exit`,Z,J]]),L[Y][1].end.offset-L[Y][1].start.offset?(re=2,ne=push(ne,[[`enter`,L[Y][1],J],[`exit`,L[Y][1],J]])):re=0,splice(L,X-1,Y-X+3,ne),Y=X+ne.length-re-2;break}}for(Y=-1;++Y<L.length;)L[Y][1].type===`attentionSequence`&&(L[Y][1].type=`data`);return L}function tokenizeAttention(L,J){let Y=this.parser.constructs.attentionMarkers.null,X=this.previous,Z=classifyCharacter(X),Q;return $;function $(J){return Q=J,L.enter(`attentionSequence`),ee(J)}function ee($){if($===Q)return L.consume($),ee;let te=L.exit(`attentionSequence`),ne=classifyCharacter($),re=!ne||ne===2&&Z||Y.includes($),ie=!Z||Z===2&&ne||Y.includes(X);return te._open=!!(Q===42?re:re&&(Z||!ie)),te._close=!!(Q===42?ie:ie&&(ne||!re)),J($)}}function movePoint(L,J){L.column+=J,L.offset+=J,L._bufferIndex+=J}const autolink={name:`autolink`,tokenize:tokenizeAutolink};function tokenizeAutolink(L,J,Y){let X=0;return Z;function Z(J){return L.enter(`autolink`),L.enter(`autolinkMarker`),L.consume(J),L.exit(`autolinkMarker`),L.enter(`autolinkProtocol`),Q}function Q(J){return asciiAlpha(J)?(L.consume(J),$):J===64?Y(J):ne(J)}function $(L){return L===43||L===45||L===46||asciiAlphanumeric(L)?(X=1,ee(L)):ne(L)}function ee(J){return J===58?(L.consume(J),X=0,te):(J===43||J===45||J===46||asciiAlphanumeric(J))&&X++<32?(L.consume(J),ee):(X=0,ne(J))}function te(X){return X===62?(L.exit(`autolinkProtocol`),L.enter(`autolinkMarker`),L.consume(X),L.exit(`autolinkMarker`),L.exit(`autolink`),J):X===null||X===32||X===60||asciiControl(X)?Y(X):(L.consume(X),te)}function ne(J){return J===64?(L.consume(J),re):asciiAtext(J)?(L.consume(J),ne):Y(J)}function re(L){return asciiAlphanumeric(L)?ie(L):Y(L)}function ie(Y){return Y===46?(L.consume(Y),X=0,re):Y===62?(L.exit(`autolinkProtocol`).type=`autolinkEmail`,L.enter(`autolinkMarker`),L.consume(Y),L.exit(`autolinkMarker`),L.exit(`autolink`),J):ae(Y)}function ae(J){if((J===45||asciiAlphanumeric(J))&&X++<63){let Y=J===45?ae:ie;return L.consume(J),Y}return Y(J)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(L,J,Y){return X;function X(J){return markdownSpace(J)?factorySpace(L,Z,`linePrefix`)(J):Z(J)}function Z(L){return L===null||markdownLineEnding(L)?J(L):Y(L)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit,name:`blockQuote`,tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(L,J,Y){let X=this;return Z;function Z(J){if(J===62){let Y=X.containerState;return Y.open||=(L.enter(`blockQuote`,{_container:!0}),!0),L.enter(`blockQuotePrefix`),L.enter(`blockQuoteMarker`),L.consume(J),L.exit(`blockQuoteMarker`),Q}return Y(J)}function Q(Y){return markdownSpace(Y)?(L.enter(`blockQuotePrefixWhitespace`),L.consume(Y),L.exit(`blockQuotePrefixWhitespace`),L.exit(`blockQuotePrefix`),J):(L.exit(`blockQuotePrefix`),J(Y))}}function tokenizeBlockQuoteContinuation(L,J,Y){let X=this;return Z;function Z(J){return markdownSpace(J)?factorySpace(L,Q,`linePrefix`,X.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(J):Q(J)}function Q(X){return L.attempt(blockQuote,J,Y)(X)}}function exit(L){L.exit(`blockQuote`)}const characterEscape={name:`characterEscape`,tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(L,J,Y){return X;function X(J){return L.enter(`characterEscape`),L.enter(`escapeMarker`),L.consume(J),L.exit(`escapeMarker`),Z}function Z(X){return asciiPunctuation(X)?(L.enter(`characterEscapeValue`),L.consume(X),L.exit(`characterEscapeValue`),L.exit(`characterEscape`),J):Y(X)}}const characterReference={name:`characterReference`,tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(L,J,Y){let X=this,Z=0,Q,$;return ee;function ee(J){return L.enter(`characterReference`),L.enter(`characterReferenceMarker`),L.consume(J),L.exit(`characterReferenceMarker`),te}function te(J){return J===35?(L.enter(`characterReferenceMarkerNumeric`),L.consume(J),L.exit(`characterReferenceMarkerNumeric`),ne):(L.enter(`characterReferenceValue`),Q=31,$=asciiAlphanumeric,re(J))}function ne(J){return J===88||J===120?(L.enter(`characterReferenceMarkerHexadecimal`),L.consume(J),L.exit(`characterReferenceMarkerHexadecimal`),L.enter(`characterReferenceValue`),Q=6,$=asciiHexDigit,re):(L.enter(`characterReferenceValue`),Q=7,$=asciiDigit,re(J))}function re(ee){if(ee===59&&Z){let Z=L.exit(`characterReferenceValue`);return $===asciiAlphanumeric&&!decodeNamedCharacterReference(X.sliceSerialize(Z))?Y(ee):(L.enter(`characterReferenceMarker`),L.consume(ee),L.exit(`characterReferenceMarker`),L.exit(`characterReference`),J)}return $(ee)&&Z++<Q?(L.consume(ee),re):Y(ee)}}const nonLazyContinuation={partial:!0,tokenize:tokenizeNonLazyContinuation},codeFenced={concrete:!0,name:`codeFenced`,tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(L,J,Y){let X=this,Z={partial:!0,tokenize:me},Q=0,$=0,ee;return te;function te(L){return ne(L)}function ne(J){let Y=X.events[X.events.length-1];return Q=Y&&Y[1].type===`linePrefix`?Y[2].sliceSerialize(Y[1],!0).length:0,ee=J,L.enter(`codeFenced`),L.enter(`codeFencedFence`),L.enter(`codeFencedFenceSequence`),re(J)}function re(J){return J===ee?($++,L.consume(J),re):$<3?Y(J):(L.exit(`codeFencedFenceSequence`),markdownSpace(J)?factorySpace(L,ie,`whitespace`)(J):ie(J))}function ie(Y){return Y===null||markdownLineEnding(Y)?(L.exit(`codeFencedFence`),X.interrupt?J(Y):L.check(nonLazyContinuation,ce,pe)(Y)):(L.enter(`codeFencedFenceInfo`),L.enter(`chunkString`,{contentType:`string`}),ae(Y))}function ae(J){return J===null||markdownLineEnding(J)?(L.exit(`chunkString`),L.exit(`codeFencedFenceInfo`),ie(J)):markdownSpace(J)?(L.exit(`chunkString`),L.exit(`codeFencedFenceInfo`),factorySpace(L,oe,`whitespace`)(J)):J===96&&J===ee?Y(J):(L.consume(J),ae)}function oe(J){return J===null||markdownLineEnding(J)?ie(J):(L.enter(`codeFencedFenceMeta`),L.enter(`chunkString`,{contentType:`string`}),se(J))}function se(J){return J===null||markdownLineEnding(J)?(L.exit(`chunkString`),L.exit(`codeFencedFenceMeta`),ie(J)):J===96&&J===ee?Y(J):(L.consume(J),se)}function ce(J){return L.attempt(Z,pe,le)(J)}function le(J){return L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),ue}function ue(J){return Q>0&&markdownSpace(J)?factorySpace(L,de,`linePrefix`,Q+1)(J):de(J)}function de(J){return J===null||markdownLineEnding(J)?L.check(nonLazyContinuation,ce,pe)(J):(L.enter(`codeFlowValue`),fe(J))}function fe(J){return J===null||markdownLineEnding(J)?(L.exit(`codeFlowValue`),de(J)):(L.consume(J),fe)}function pe(Y){return L.exit(`codeFenced`),J(Y)}function me(L,J,Y){let Z=0;return Q;function Q(J){return L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),te}function te(J){return L.enter(`codeFencedFence`),markdownSpace(J)?factorySpace(L,ne,`linePrefix`,X.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(J):ne(J)}function ne(J){return J===ee?(L.enter(`codeFencedFenceSequence`),re(J)):Y(J)}function re(J){return J===ee?(Z++,L.consume(J),re):Z>=$?(L.exit(`codeFencedFenceSequence`),markdownSpace(J)?factorySpace(L,ie,`whitespace`)(J):ie(J)):Y(J)}function ie(X){return X===null||markdownLineEnding(X)?(L.exit(`codeFencedFence`),J(X)):Y(X)}}}function tokenizeNonLazyContinuation(L,J,Y){let X=this;return Z;function Z(J){return J===null?Y(J):(L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),Q)}function Q(L){return X.parser.lazy[X.now().line]?Y(L):J(L)}}const codeIndented={name:`codeIndented`,tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(L,J,Y){let X=this;return Z;function Z(J){return L.enter(`codeIndented`),factorySpace(L,Q,`linePrefix`,5)(J)}function Q(L){let J=X.events[X.events.length-1];return J&&J[1].type===`linePrefix`&&J[2].sliceSerialize(J[1],!0).length>=4?$(L):Y(L)}function $(J){return J===null?te(J):markdownLineEnding(J)?L.attempt(furtherStart,$,te)(J):(L.enter(`codeFlowValue`),ee(J))}function ee(J){return J===null||markdownLineEnding(J)?(L.exit(`codeFlowValue`),$(J)):(L.consume(J),ee)}function te(Y){return L.exit(`codeIndented`),J(Y)}}function tokenizeFurtherStart(L,J,Y){let X=this;return Z;function Z(J){return X.parser.lazy[X.now().line]?Y(J):markdownLineEnding(J)?(L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),Z):factorySpace(L,Q,`linePrefix`,5)(J)}function Q(L){let Q=X.events[X.events.length-1];return Q&&Q[1].type===`linePrefix`&&Q[2].sliceSerialize(Q[1],!0).length>=4?J(L):markdownLineEnding(L)?Z(L):Y(L)}}const codeText={name:`codeText`,previous,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(L){let J=L.length-4,Y=3,X,Z;if((L[Y][1].type===`lineEnding`||L[Y][1].type===`space`)&&(L[J][1].type===`lineEnding`||L[J][1].type===`space`)){for(X=Y;++X<J;)if(L[X][1].type===`codeTextData`){L[Y][1].type=`codeTextPadding`,L[J][1].type=`codeTextPadding`,Y+=2,J-=2;break}}for(X=Y-1,J++;++X<=J;)Z===void 0?X!==J&&L[X][1].type!==`lineEnding`&&(Z=X):(X===J||L[X][1].type===`lineEnding`)&&(L[Z][1].type=`codeTextData`,X!==Z+2&&(L[Z][1].end=L[X-1][1].end,L.splice(Z+2,X-Z-2),J-=X-Z-2,X=Z+2),Z=void 0);return L}function previous(L){return L!==96||this.events[this.events.length-1][1].type===`characterEscape`}function tokenizeCodeText(L,J,Y){let X=0,Z,Q;return $;function $(J){return L.enter(`codeText`),L.enter(`codeTextSequence`),ee(J)}function ee(J){return J===96?(L.consume(J),X++,ee):(L.exit(`codeTextSequence`),te(J))}function te(J){return J===null?Y(J):J===32?(L.enter(`space`),L.consume(J),L.exit(`space`),te):J===96?(Q=L.enter(`codeTextSequence`),Z=0,re(J)):markdownLineEnding(J)?(L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),te):(L.enter(`codeTextData`),ne(J))}function ne(J){return J===null||J===32||J===96||markdownLineEnding(J)?(L.exit(`codeTextData`),te(J)):(L.consume(J),ne)}function re(Y){return Y===96?(L.consume(Y),Z++,re):Z===X?(L.exit(`codeTextSequence`),L.exit(`codeText`),J(Y)):(Q.type=`codeTextData`,ne(Y))}}var SpliceBuffer=class{constructor(L){this.left=L?[...L]:[],this.right=[]}get(L){if(L<0||L>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+L+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return L<this.left.length?this.left[L]:this.right[this.right.length-L+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(L,J){let Y=J??1/0;return Y<this.left.length?this.left.slice(L,Y):L>this.left.length?this.right.slice(this.right.length-Y+this.left.length,this.right.length-L+this.left.length).reverse():this.left.slice(L).concat(this.right.slice(this.right.length-Y+this.left.length).reverse())}splice(L,J,Y){let X=J||0;this.setCursor(Math.trunc(L));let Z=this.right.splice(this.right.length-X,1/0);return Y&&chunkedPush(this.left,Y),Z.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(L){this.setCursor(1/0),this.left.push(L)}pushMany(L){this.setCursor(1/0),chunkedPush(this.left,L)}unshift(L){this.setCursor(0),this.right.push(L)}unshiftMany(L){this.setCursor(0),chunkedPush(this.right,L.reverse())}setCursor(L){if(!(L===this.left.length||L>this.left.length&&this.right.length===0||L<0&&this.left.length===0))if(L<this.left.length){let J=this.left.splice(L,1/0);chunkedPush(this.right,J.reverse())}else{let J=this.right.splice(this.left.length+this.right.length-L,1/0);chunkedPush(this.left,J.reverse())}}};function chunkedPush(L,J){let Y=0;if(J.length<1e4)L.push(...J);else for(;Y<J.length;)L.push(...J.slice(Y,Y+1e4)),Y+=1e4}function subtokenize(L){let J={},Y=-1,X,Z,Q,$,ee,te,ne,re=new SpliceBuffer(L);for(;++Y<re.length;){for(;Y in J;)Y=J[Y];if(X=re.get(Y),Y&&X[1].type===`chunkFlow`&&re.get(Y-1)[1].type===`listItemPrefix`&&(te=X[1]._tokenizer.events,Q=0,Q<te.length&&te[Q][1].type===`lineEndingBlank`&&(Q+=2),Q<te.length&&te[Q][1].type===`content`))for(;++Q<te.length&&te[Q][1].type!==`content`;)te[Q][1].type===`chunkText`&&(te[Q][1]._isInFirstContentOfListItem=!0,Q++);if(X[0]===`enter`)X[1].contentType&&(Object.assign(J,subcontent(re,Y)),Y=J[Y],ne=!0);else if(X[1]._container){for(Q=Y,Z=void 0;Q--;)if($=re.get(Q),$[1].type===`lineEnding`||$[1].type===`lineEndingBlank`)$[0]===`enter`&&(Z&&(re.get(Z)[1].type=`lineEndingBlank`),$[1].type=`lineEnding`,Z=Q);else if(!($[1].type===`linePrefix`||$[1].type===`listItemIndent`))break;Z&&(X[1].end={...re.get(Z)[1].start},ee=re.slice(Z,Y),ee.unshift(X),re.splice(Z,Y-Z+1,ee))}}return splice(L,0,1/0,re.slice(0)),!ne}function subcontent(L,J){let Y=L.get(J)[1],X=L.get(J)[2],Z=J-1,Q=[],$=Y._tokenizer;$||($=X.parser[Y.contentType](Y.start),Y._contentTypeTextTrailing&&($._contentTypeTextTrailing=!0));let ee=$.events,te=[],ne={},re,ie,ae=-1,oe=Y,se=0,ce=0,le=[ce];for(;oe;){for(;L.get(++Z)[1]!==oe;);Q.push(Z),oe._tokenizer||(re=X.sliceStream(oe),oe.next||re.push(null),ie&&$.defineSkip(oe.start),oe._isInFirstContentOfListItem&&($._gfmTasklistFirstContentOfListItem=!0),$.write(re),oe._isInFirstContentOfListItem&&($._gfmTasklistFirstContentOfListItem=void 0)),ie=oe,oe=oe.next}for(oe=Y;++ae<ee.length;)ee[ae][0]===`exit`&&ee[ae-1][0]===`enter`&&ee[ae][1].type===ee[ae-1][1].type&&ee[ae][1].start.line!==ee[ae][1].end.line&&(ce=ae+1,le.push(ce),oe._tokenizer=void 0,oe.previous=void 0,oe=oe.next);for($.events=[],oe?(oe._tokenizer=void 0,oe.previous=void 0):le.pop(),ae=le.length;ae--;){let J=ee.slice(le[ae],le[ae+1]),Y=Q.pop();te.push([Y,Y+J.length-1]),L.splice(Y,2,J)}for(te.reverse(),ae=-1;++ae<te.length;)ne[se+te[ae][0]]=se+te[ae][1],se+=te[ae][1]-te[ae][0]-1;return ne}const content={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(L){return subtokenize(L),L}function tokenizeContent(L,J){let Y;return X;function X(J){return L.enter(`content`),Y=L.enter(`chunkContent`,{contentType:`content`}),Z(J)}function Z(J){return J===null?Q(J):markdownLineEnding(J)?L.check(continuationConstruct,$,Q)(J):(L.consume(J),Z)}function Q(Y){return L.exit(`chunkContent`),L.exit(`content`),J(Y)}function $(J){return L.consume(J),L.exit(`chunkContent`),Y.next=L.enter(`chunkContent`,{contentType:`content`,previous:Y}),Y=Y.next,Z}}function tokenizeContinuation(L,J,Y){let X=this;return Z;function Z(J){return L.exit(`chunkContent`),L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),factorySpace(L,Q,`linePrefix`)}function Q(Z){if(Z===null||markdownLineEnding(Z))return Y(Z);let Q=X.events[X.events.length-1];return!X.parser.constructs.disable.null.includes(`codeIndented`)&&Q&&Q[1].type===`linePrefix`&&Q[2].sliceSerialize(Q[1],!0).length>=4?J(Z):L.interrupt(X.parser.constructs.flow,Y,J)(Z)}}function factoryDestination(L,J,Y,X,Z,Q,$,ee,te){let ne=te||1/0,re=0;return ie;function ie(J){return J===60?(L.enter(X),L.enter(Z),L.enter(Q),L.consume(J),L.exit(Q),ae):J===null||J===32||J===41||asciiControl(J)?Y(J):(L.enter(X),L.enter($),L.enter(ee),L.enter(`chunkString`,{contentType:`string`}),ce(J))}function ae(Y){return Y===62?(L.enter(Q),L.consume(Y),L.exit(Q),L.exit(Z),L.exit(X),J):(L.enter(ee),L.enter(`chunkString`,{contentType:`string`}),oe(Y))}function oe(J){return J===62?(L.exit(`chunkString`),L.exit(ee),ae(J)):J===null||J===60||markdownLineEnding(J)?Y(J):(L.consume(J),J===92?se:oe)}function se(J){return J===60||J===62||J===92?(L.consume(J),oe):oe(J)}function ce(Z){return!re&&(Z===null||Z===41||markdownLineEndingOrSpace(Z))?(L.exit(`chunkString`),L.exit(ee),L.exit($),L.exit(X),J(Z)):re<ne&&Z===40?(L.consume(Z),re++,ce):Z===41?(L.consume(Z),re--,ce):Z===null||Z===32||Z===40||asciiControl(Z)?Y(Z):(L.consume(Z),Z===92?le:ce)}function le(J){return J===40||J===41||J===92?(L.consume(J),ce):ce(J)}}function factoryLabel(L,J,Y,X,Z,Q){let $=this,ee=0,te;return ne;function ne(J){return L.enter(X),L.enter(Z),L.consume(J),L.exit(Z),L.enter(Q),re}function re(ne){return ee>999||ne===null||ne===91||ne===93&&!te||ne===94&&!ee&&`_hiddenFootnoteSupport`in $.parser.constructs?Y(ne):ne===93?(L.exit(Q),L.enter(Z),L.consume(ne),L.exit(Z),L.exit(X),J):markdownLineEnding(ne)?(L.enter(`lineEnding`),L.consume(ne),L.exit(`lineEnding`),re):(L.enter(`chunkString`,{contentType:`string`}),ie(ne))}function ie(J){return J===null||J===91||J===93||markdownLineEnding(J)||ee++>999?(L.exit(`chunkString`),re(J)):(L.consume(J),te||=!markdownSpace(J),J===92?ae:ie)}function ae(J){return J===91||J===92||J===93?(L.consume(J),ee++,ie):ie(J)}}function factoryTitle(L,J,Y,X,Z,Q){let $;return ee;function ee(J){return J===34||J===39||J===40?(L.enter(X),L.enter(Z),L.consume(J),L.exit(Z),$=J===40?41:J,te):Y(J)}function te(Y){return Y===$?(L.enter(Z),L.consume(Y),L.exit(Z),L.exit(X),J):(L.enter(Q),ne(Y))}function ne(J){return J===$?(L.exit(Q),te($)):J===null?Y(J):markdownLineEnding(J)?(L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),factorySpace(L,ne,`linePrefix`)):(L.enter(`chunkString`,{contentType:`string`}),re(J))}function re(J){return J===$||J===null||markdownLineEnding(J)?(L.exit(`chunkString`),ne(J)):(L.consume(J),J===92?ie:re)}function ie(J){return J===$||J===92?(L.consume(J),re):re(J)}}function factoryWhitespace(L,J){let Y;return X;function X(Z){return markdownLineEnding(Z)?(L.enter(`lineEnding`),L.consume(Z),L.exit(`lineEnding`),Y=!0,X):markdownSpace(Z)?factorySpace(L,X,Y?`linePrefix`:`lineSuffix`)(Z):J(Z)}}const definition={name:`definition`,tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(L,J,Y){let X=this,Z;return Q;function Q(J){return L.enter(`definition`),$(J)}function $(J){return factoryLabel.call(X,L,ee,Y,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(J)}function ee(J){return Z=normalizeIdentifier(X.sliceSerialize(X.events[X.events.length-1][1]).slice(1,-1)),J===58?(L.enter(`definitionMarker`),L.consume(J),L.exit(`definitionMarker`),te):Y(J)}function te(J){return markdownLineEndingOrSpace(J)?factoryWhitespace(L,ne)(J):ne(J)}function ne(J){return factoryDestination(L,re,Y,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(J)}function re(J){return L.attempt(titleBefore,ie,ie)(J)}function ie(J){return markdownSpace(J)?factorySpace(L,ae,`whitespace`)(J):ae(J)}function ae(Q){return Q===null||markdownLineEnding(Q)?(L.exit(`definition`),X.parser.defined.push(Z),J(Q)):Y(Q)}}function tokenizeTitleBefore(L,J,Y){return X;function X(J){return markdownLineEndingOrSpace(J)?factoryWhitespace(L,Z)(J):Y(J)}function Z(J){return factoryTitle(L,Q,Y,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(J)}function Q(J){return markdownSpace(J)?factorySpace(L,$,`whitespace`)(J):$(J)}function $(L){return L===null||markdownLineEnding(L)?J(L):Y(L)}}const hardBreakEscape={name:`hardBreakEscape`,tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(L,J,Y){return X;function X(J){return L.enter(`hardBreakEscape`),L.consume(J),Z}function Z(X){return markdownLineEnding(X)?(L.exit(`hardBreakEscape`),J(X)):Y(X)}}const headingAtx={name:`headingAtx`,resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(L,J){let Y=L.length-2,X=3,Z,Q;return L[X][1].type===`whitespace`&&(X+=2),Y-2>X&&L[Y][1].type===`whitespace`&&(Y-=2),L[Y][1].type===`atxHeadingSequence`&&(X===Y-1||Y-4>X&&L[Y-2][1].type===`whitespace`)&&(Y-=X+1===Y?2:4),Y>X&&(Z={type:`atxHeadingText`,start:L[X][1].start,end:L[Y][1].end},Q={type:`chunkText`,start:L[X][1].start,end:L[Y][1].end,contentType:`text`},splice(L,X,Y-X+1,[[`enter`,Z,J],[`enter`,Q,J],[`exit`,Q,J],[`exit`,Z,J]])),L}function tokenizeHeadingAtx(L,J,Y){let X=0;return Z;function Z(J){return L.enter(`atxHeading`),Q(J)}function Q(J){return L.enter(`atxHeadingSequence`),$(J)}function $(J){return J===35&&X++<6?(L.consume(J),$):J===null||markdownLineEndingOrSpace(J)?(L.exit(`atxHeadingSequence`),ee(J)):Y(J)}function ee(Y){return Y===35?(L.enter(`atxHeadingSequence`),te(Y)):Y===null||markdownLineEnding(Y)?(L.exit(`atxHeading`),J(Y)):markdownSpace(Y)?factorySpace(L,ee,`whitespace`)(Y):(L.enter(`atxHeadingText`),ne(Y))}function te(J){return J===35?(L.consume(J),te):(L.exit(`atxHeadingSequence`),ee(J))}function ne(J){return J===null||J===35||markdownLineEndingOrSpace(J)?(L.exit(`atxHeadingText`),ee(J)):(L.consume(J),ne)}}const htmlBlockNames=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),htmlRawNames=[`pre`,`script`,`style`,`textarea`],htmlFlow={concrete:!0,name:`htmlFlow`,resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(L){let J=L.length;for(;J--&&!(L[J][0]===`enter`&&L[J][1].type===`htmlFlow`););return J>1&&L[J-2][1].type===`linePrefix`&&(L[J][1].start=L[J-2][1].start,L[J+1][1].start=L[J-2][1].start,L.splice(J-2,2)),L}function tokenizeHtmlFlow(L,J,Y){let X=this,Z,Q,$,ee,te;return ne;function ne(L){return re(L)}function re(J){return L.enter(`htmlFlow`),L.enter(`htmlFlowData`),L.consume(J),ie}function ie(ee){return ee===33?(L.consume(ee),ae):ee===47?(L.consume(ee),Q=!0,ce):ee===63?(L.consume(ee),Z=3,X.interrupt?J:ke):asciiAlpha(ee)?(L.consume(ee),$=String.fromCharCode(ee),le):Y(ee)}function ae(Q){return Q===45?(L.consume(Q),Z=2,oe):Q===91?(L.consume(Q),Z=5,ee=0,se):asciiAlpha(Q)?(L.consume(Q),Z=4,X.interrupt?J:ke):Y(Q)}function oe(Z){return Z===45?(L.consume(Z),X.interrupt?J:ke):Y(Z)}function se(Z){return Z===`CDATA[`.charCodeAt(ee++)?(L.consume(Z),ee===6?X.interrupt?J:xe:se):Y(Z)}function ce(J){return asciiAlpha(J)?(L.consume(J),$=String.fromCharCode(J),le):Y(J)}function le(ee){if(ee===null||ee===47||ee===62||markdownLineEndingOrSpace(ee)){let te=ee===47,ne=$.toLowerCase();return!te&&!Q&&htmlRawNames.includes(ne)?(Z=1,X.interrupt?J(ee):xe(ee)):htmlBlockNames.includes($.toLowerCase())?(Z=6,te?(L.consume(ee),ue):X.interrupt?J(ee):xe(ee)):(Z=7,X.interrupt&&!X.parser.lazy[X.now().line]?Y(ee):Q?de(ee):fe(ee))}return ee===45||asciiAlphanumeric(ee)?(L.consume(ee),$+=String.fromCharCode(ee),le):Y(ee)}function ue(Z){return Z===62?(L.consume(Z),X.interrupt?J:xe):Y(Z)}function de(J){return markdownSpace(J)?(L.consume(J),de):ye(J)}function fe(J){return J===47?(L.consume(J),ye):J===58||J===95||asciiAlpha(J)?(L.consume(J),pe):markdownSpace(J)?(L.consume(J),fe):ye(J)}function pe(J){return J===45||J===46||J===58||J===95||asciiAlphanumeric(J)?(L.consume(J),pe):me(J)}function me(J){return J===61?(L.consume(J),he):markdownSpace(J)?(L.consume(J),me):fe(J)}function he(J){return J===null||J===60||J===61||J===62||J===96?Y(J):J===34||J===39?(L.consume(J),te=J,ge):markdownSpace(J)?(L.consume(J),he):_e(J)}function ge(J){return J===te?(L.consume(J),te=null,ve):J===null||markdownLineEnding(J)?Y(J):(L.consume(J),ge)}function _e(J){return J===null||J===34||J===39||J===47||J===60||J===61||J===62||J===96||markdownLineEndingOrSpace(J)?me(J):(L.consume(J),_e)}function ve(L){return L===47||L===62||markdownSpace(L)?fe(L):Y(L)}function ye(J){return J===62?(L.consume(J),be):Y(J)}function be(J){return J===null||markdownLineEnding(J)?xe(J):markdownSpace(J)?(L.consume(J),be):Y(J)}function xe(J){return J===45&&Z===2?(L.consume(J),Te):J===60&&Z===1?(L.consume(J),Ee):J===62&&Z===4?(L.consume(J),Ae):J===63&&Z===3?(L.consume(J),ke):J===93&&Z===5?(L.consume(J),Oe):markdownLineEnding(J)&&(Z===6||Z===7)?(L.exit(`htmlFlowData`),L.check(blankLineBefore,je,Se)(J)):J===null||markdownLineEnding(J)?(L.exit(`htmlFlowData`),Se(J)):(L.consume(J),xe)}function Se(J){return L.check(nonLazyContinuationStart,Ce,je)(J)}function Ce(J){return L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),we}function we(J){return J===null||markdownLineEnding(J)?Se(J):(L.enter(`htmlFlowData`),xe(J))}function Te(J){return J===45?(L.consume(J),ke):xe(J)}function Ee(J){return J===47?(L.consume(J),$=``,De):xe(J)}function De(J){if(J===62){let Y=$.toLowerCase();return htmlRawNames.includes(Y)?(L.consume(J),Ae):xe(J)}return asciiAlpha(J)&&$.length<8?(L.consume(J),$+=String.fromCharCode(J),De):xe(J)}function Oe(J){return J===93?(L.consume(J),ke):xe(J)}function ke(J){return J===62?(L.consume(J),Ae):J===45&&Z===2?(L.consume(J),ke):xe(J)}function Ae(J){return J===null||markdownLineEnding(J)?(L.exit(`htmlFlowData`),je(J)):(L.consume(J),Ae)}function je(Y){return L.exit(`htmlFlow`),J(Y)}}function tokenizeNonLazyContinuationStart(L,J,Y){let X=this;return Z;function Z(J){return markdownLineEnding(J)?(L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),Q):Y(J)}function Q(L){return X.parser.lazy[X.now().line]?Y(L):J(L)}}function tokenizeBlankLineBefore(L,J,Y){return X;function X(X){return L.enter(`lineEnding`),L.consume(X),L.exit(`lineEnding`),L.attempt(blankLine,J,Y)}}const htmlText={name:`htmlText`,tokenize:tokenizeHtmlText};function tokenizeHtmlText(L,J,Y){let X=this,Z,Q,$;return ee;function ee(J){return L.enter(`htmlText`),L.enter(`htmlTextData`),L.consume(J),te}function te(J){return J===33?(L.consume(J),ne):J===47?(L.consume(J),me):J===63?(L.consume(J),fe):asciiAlpha(J)?(L.consume(J),_e):Y(J)}function ne(J){return J===45?(L.consume(J),re):J===91?(L.consume(J),Q=0,se):asciiAlpha(J)?(L.consume(J),de):Y(J)}function re(J){return J===45?(L.consume(J),oe):Y(J)}function ie(J){return J===null?Y(J):J===45?(L.consume(J),ae):markdownLineEnding(J)?($=ie,Ee(J)):(L.consume(J),ie)}function ae(J){return J===45?(L.consume(J),oe):ie(J)}function oe(L){return L===62?Te(L):L===45?ae(L):ie(L)}function se(J){return J===`CDATA[`.charCodeAt(Q++)?(L.consume(J),Q===6?ce:se):Y(J)}function ce(J){return J===null?Y(J):J===93?(L.consume(J),le):markdownLineEnding(J)?($=ce,Ee(J)):(L.consume(J),ce)}function le(J){return J===93?(L.consume(J),ue):ce(J)}function ue(J){return J===62?Te(J):J===93?(L.consume(J),ue):ce(J)}function de(J){return J===null||J===62?Te(J):markdownLineEnding(J)?($=de,Ee(J)):(L.consume(J),de)}function fe(J){return J===null?Y(J):J===63?(L.consume(J),pe):markdownLineEnding(J)?($=fe,Ee(J)):(L.consume(J),fe)}function pe(L){return L===62?Te(L):fe(L)}function me(J){return asciiAlpha(J)?(L.consume(J),he):Y(J)}function he(J){return J===45||asciiAlphanumeric(J)?(L.consume(J),he):ge(J)}function ge(J){return markdownLineEnding(J)?($=ge,Ee(J)):markdownSpace(J)?(L.consume(J),ge):Te(J)}function _e(J){return J===45||asciiAlphanumeric(J)?(L.consume(J),_e):J===47||J===62||markdownLineEndingOrSpace(J)?ve(J):Y(J)}function ve(J){return J===47?(L.consume(J),Te):J===58||J===95||asciiAlpha(J)?(L.consume(J),ye):markdownLineEnding(J)?($=ve,Ee(J)):markdownSpace(J)?(L.consume(J),ve):Te(J)}function ye(J){return J===45||J===46||J===58||J===95||asciiAlphanumeric(J)?(L.consume(J),ye):be(J)}function be(J){return J===61?(L.consume(J),xe):markdownLineEnding(J)?($=be,Ee(J)):markdownSpace(J)?(L.consume(J),be):ve(J)}function xe(J){return J===null||J===60||J===61||J===62||J===96?Y(J):J===34||J===39?(L.consume(J),Z=J,Se):markdownLineEnding(J)?($=xe,Ee(J)):markdownSpace(J)?(L.consume(J),xe):(L.consume(J),Ce)}function Se(J){return J===Z?(L.consume(J),Z=void 0,we):J===null?Y(J):markdownLineEnding(J)?($=Se,Ee(J)):(L.consume(J),Se)}function Ce(J){return J===null||J===34||J===39||J===60||J===61||J===96?Y(J):J===47||J===62||markdownLineEndingOrSpace(J)?ve(J):(L.consume(J),Ce)}function we(L){return L===47||L===62||markdownLineEndingOrSpace(L)?ve(L):Y(L)}function Te(X){return X===62?(L.consume(X),L.exit(`htmlTextData`),L.exit(`htmlText`),J):Y(X)}function Ee(J){return L.exit(`htmlTextData`),L.enter(`lineEnding`),L.consume(J),L.exit(`lineEnding`),De}function De(J){return markdownSpace(J)?factorySpace(L,Oe,`linePrefix`,X.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(J):Oe(J)}function Oe(J){return L.enter(`htmlTextData`),$(J)}}const labelEnd={name:`labelEnd`,resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(L){let J=-1,Y=[];for(;++J<L.length;){let X=L[J][1];if(Y.push(L[J]),X.type===`labelImage`||X.type===`labelLink`||X.type===`labelEnd`){let L=X.type===`labelImage`?4:2;X.type=`data`,J+=L}}return L.length!==Y.length&&splice(L,0,L.length,Y),L}function resolveToLabelEnd(L,J){let Y=L.length,X=0,Z,Q,$,ee;for(;Y--;)if(Z=L[Y][1],Q){if(Z.type===`link`||Z.type===`labelLink`&&Z._inactive)break;L[Y][0]===`enter`&&Z.type===`labelLink`&&(Z._inactive=!0)}else if($){if(L[Y][0]===`enter`&&(Z.type===`labelImage`||Z.type===`labelLink`)&&!Z._balanced&&(Q=Y,Z.type!==`labelLink`)){X=2;break}}else Z.type===`labelEnd`&&($=Y);let te={type:L[Q][1].type===`labelLink`?`link`:`image`,start:{...L[Q][1].start},end:{...L[L.length-1][1].end}},ne={type:`label`,start:{...L[Q][1].start},end:{...L[$][1].end}},re={type:`labelText`,start:{...L[Q+X+2][1].end},end:{...L[$-2][1].start}};return ee=[[`enter`,te,J],[`enter`,ne,J]],ee=push(ee,L.slice(Q+1,Q+X+3)),ee=push(ee,[[`enter`,re,J]]),ee=push(ee,resolveAll(J.parser.constructs.insideSpan.null,L.slice(Q+X+4,$-3),J)),ee=push(ee,[[`exit`,re,J],L[$-2],L[$-1],[`exit`,ne,J]]),ee=push(ee,L.slice($+1)),ee=push(ee,[[`exit`,te,J]]),splice(L,Q,L.length,ee),L}function tokenizeLabelEnd(L,J,Y){let X=this,Z=X.events.length,Q,$;for(;Z--;)if((X.events[Z][1].type===`labelImage`||X.events[Z][1].type===`labelLink`)&&!X.events[Z][1]._balanced){Q=X.events[Z][1];break}return ee;function ee(J){return Q?Q._inactive?ie(J):($=X.parser.defined.includes(normalizeIdentifier(X.sliceSerialize({start:Q.end,end:X.now()}))),L.enter(`labelEnd`),L.enter(`labelMarker`),L.consume(J),L.exit(`labelMarker`),L.exit(`labelEnd`),te):Y(J)}function te(J){return J===40?L.attempt(resourceConstruct,re,$?re:ie)(J):J===91?L.attempt(referenceFullConstruct,re,$?ne:ie)(J):$?re(J):ie(J)}function ne(J){return L.attempt(referenceCollapsedConstruct,re,ie)(J)}function re(L){return J(L)}function ie(L){return Q._balanced=!0,Y(L)}}function tokenizeResource(L,J,Y){return X;function X(J){return L.enter(`resource`),L.enter(`resourceMarker`),L.consume(J),L.exit(`resourceMarker`),Z}function Z(J){return markdownLineEndingOrSpace(J)?factoryWhitespace(L,Q)(J):Q(J)}function Q(J){return J===41?re(J):factoryDestination(L,$,ee,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(J)}function $(J){return markdownLineEndingOrSpace(J)?factoryWhitespace(L,te)(J):re(J)}function ee(L){return Y(L)}function te(J){return J===34||J===39||J===40?factoryTitle(L,ne,Y,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(J):re(J)}function ne(J){return markdownLineEndingOrSpace(J)?factoryWhitespace(L,re)(J):re(J)}function re(X){return X===41?(L.enter(`resourceMarker`),L.consume(X),L.exit(`resourceMarker`),L.exit(`resource`),J):Y(X)}}function tokenizeReferenceFull(L,J,Y){let X=this;return Z;function Z(J){return factoryLabel.call(X,L,Q,$,`reference`,`referenceMarker`,`referenceString`)(J)}function Q(L){return X.parser.defined.includes(normalizeIdentifier(X.sliceSerialize(X.events[X.events.length-1][1]).slice(1,-1)))?J(L):Y(L)}function $(L){return Y(L)}}function tokenizeReferenceCollapsed(L,J,Y){return X;function X(J){return L.enter(`reference`),L.enter(`referenceMarker`),L.consume(J),L.exit(`referenceMarker`),Z}function Z(X){return X===93?(L.enter(`referenceMarker`),L.consume(X),L.exit(`referenceMarker`),L.exit(`reference`),J):Y(X)}}const labelStartImage={name:`labelStartImage`,resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(L,J,Y){let X=this;return Z;function Z(J){return L.enter(`labelImage`),L.enter(`labelImageMarker`),L.consume(J),L.exit(`labelImageMarker`),Q}function Q(J){return J===91?(L.enter(`labelMarker`),L.consume(J),L.exit(`labelMarker`),L.exit(`labelImage`),$):Y(J)}function $(L){return L===94&&`_hiddenFootnoteSupport`in X.parser.constructs?Y(L):J(L)}}const labelStartLink={name:`labelStartLink`,resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(L,J,Y){let X=this;return Z;function Z(J){return L.enter(`labelLink`),L.enter(`labelMarker`),L.consume(J),L.exit(`labelMarker`),L.exit(`labelLink`),Q}function Q(L){return L===94&&`_hiddenFootnoteSupport`in X.parser.constructs?Y(L):J(L)}}const lineEnding={name:`lineEnding`,tokenize:tokenizeLineEnding};function tokenizeLineEnding(L,J){return Y;function Y(Y){return L.enter(`lineEnding`),L.consume(Y),L.exit(`lineEnding`),factorySpace(L,J,`linePrefix`)}}const thematicBreak={name:`thematicBreak`,tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(L,J,Y){let X=0,Z;return Q;function Q(J){return L.enter(`thematicBreak`),$(J)}function $(L){return Z=L,ee(L)}function ee(Q){return Q===Z?(L.enter(`thematicBreakSequence`),te(Q)):X>=3&&(Q===null||markdownLineEnding(Q))?(L.exit(`thematicBreak`),J(Q)):Y(Q)}function te(J){return J===Z?(L.consume(J),X++,te):(L.exit(`thematicBreakSequence`),markdownSpace(J)?factorySpace(L,ee,`whitespace`)(J):ee(J))}}const list={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:`list`,tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent};function tokenizeListStart(L,J,Y){let X=this,Z=X.events[X.events.length-1],Q=Z&&Z[1].type===`linePrefix`?Z[2].sliceSerialize(Z[1],!0).length:0,$=0;return ee;function ee(J){let Z=X.containerState.type||(J===42||J===43||J===45?`listUnordered`:`listOrdered`);if(Z===`listUnordered`?!X.containerState.marker||J===X.containerState.marker:asciiDigit(J)){if(X.containerState.type||(X.containerState.type=Z,L.enter(Z,{_container:!0})),Z===`listUnordered`)return L.enter(`listItemPrefix`),J===42||J===45?L.check(thematicBreak,Y,ne)(J):ne(J);if(!X.interrupt||J===49)return L.enter(`listItemPrefix`),L.enter(`listItemValue`),te(J)}return Y(J)}function te(J){return asciiDigit(J)&&++$<10?(L.consume(J),te):(!X.interrupt||$<2)&&(X.containerState.marker?J===X.containerState.marker:J===41||J===46)?(L.exit(`listItemValue`),ne(J)):Y(J)}function ne(J){return L.enter(`listItemMarker`),L.consume(J),L.exit(`listItemMarker`),X.containerState.marker=X.containerState.marker||J,L.check(blankLine,X.interrupt?Y:re,L.attempt(listItemPrefixWhitespaceConstruct,ae,ie))}function re(L){return X.containerState.initialBlankLine=!0,Q++,ae(L)}function ie(J){return markdownSpace(J)?(L.enter(`listItemPrefixWhitespace`),L.consume(J),L.exit(`listItemPrefixWhitespace`),ae):Y(J)}function ae(Y){return X.containerState.size=Q+X.sliceSerialize(L.exit(`listItemPrefix`),!0).length,J(Y)}}function tokenizeListContinuation(L,J,Y){let X=this;return X.containerState._closeFlow=void 0,L.check(blankLine,Z,Q);function Z(Y){return X.containerState.furtherBlankLines=X.containerState.furtherBlankLines||X.containerState.initialBlankLine,factorySpace(L,J,`listItemIndent`,X.containerState.size+1)(Y)}function Q(Y){return X.containerState.furtherBlankLines||!markdownSpace(Y)?(X.containerState.furtherBlankLines=void 0,X.containerState.initialBlankLine=void 0,$(Y)):(X.containerState.furtherBlankLines=void 0,X.containerState.initialBlankLine=void 0,L.attempt(indentConstruct,J,$)(Y))}function $(Z){return X.containerState._closeFlow=!0,X.interrupt=void 0,factorySpace(L,L.attempt(list,J,Y),`linePrefix`,X.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(Z)}}function tokenizeIndent(L,J,Y){let X=this;return factorySpace(L,Z,`listItemIndent`,X.containerState.size+1);function Z(L){let Z=X.events[X.events.length-1];return Z&&Z[1].type===`listItemIndent`&&Z[2].sliceSerialize(Z[1],!0).length===X.containerState.size?J(L):Y(L)}}function tokenizeListEnd(L){L.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(L,J,Y){let X=this;return factorySpace(L,Z,`listItemPrefixWhitespace`,X.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function Z(L){let Z=X.events[X.events.length-1];return!markdownSpace(L)&&Z&&Z[1].type===`listItemPrefixWhitespace`?J(L):Y(L)}}const setextUnderline={name:`setextUnderline`,resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(L,J){let Y=L.length,X,Z,Q;for(;Y--;)if(L[Y][0]===`enter`){if(L[Y][1].type===`content`){X=Y;break}L[Y][1].type===`paragraph`&&(Z=Y)}else L[Y][1].type===`content`&&L.splice(Y,1),!Q&&L[Y][1].type===`definition`&&(Q=Y);let $={type:`setextHeading`,start:{...L[X][1].start},end:{...L[L.length-1][1].end}};return L[Z][1].type=`setextHeadingText`,Q?(L.splice(Z,0,[`enter`,$,J]),L.splice(Q+1,0,[`exit`,L[X][1],J]),L[X][1].end={...L[Q][1].end}):L[X][1]=$,L.push([`exit`,$,J]),L}function tokenizeSetextUnderline(L,J,Y){let X=this,Z;return Q;function Q(J){let Q=X.events.length,ee;for(;Q--;)if(X.events[Q][1].type!==`lineEnding`&&X.events[Q][1].type!==`linePrefix`&&X.events[Q][1].type!==`content`){ee=X.events[Q][1].type===`paragraph`;break}return!X.parser.lazy[X.now().line]&&(X.interrupt||ee)?(L.enter(`setextHeadingLine`),Z=J,$(J)):Y(J)}function $(J){return L.enter(`setextHeadingLineSequence`),ee(J)}function ee(J){return J===Z?(L.consume(J),ee):(L.exit(`setextHeadingLineSequence`),markdownSpace(J)?factorySpace(L,te,`lineSuffix`)(J):te(J))}function te(X){return X===null||markdownLineEnding(X)?(L.exit(`setextHeadingLine`),J(X)):Y(X)}}const flow$1={tokenize:initializeFlow};function initializeFlow(L){let J=this,Y=L.attempt(blankLine,X,L.attempt(this.parser.constructs.flowInitial,Z,factorySpace(L,L.attempt(this.parser.constructs.flow,Z,L.attempt(content,Z)),`linePrefix`)));return Y;function X(X){if(X===null){L.consume(X);return}return L.enter(`lineEndingBlank`),L.consume(X),L.exit(`lineEndingBlank`),J.currentConstruct=void 0,Y}function Z(X){if(X===null){L.consume(X);return}return L.enter(`lineEnding`),L.consume(X),L.exit(`lineEnding`),J.currentConstruct=void 0,Y}}const resolver={resolveAll:createResolver()},string$1=initializeFactory(`string`),text$1=initializeFactory(`text`);function initializeFactory(L){return{resolveAll:createResolver(L===`text`?resolveAllLineSuffixes:void 0),tokenize:J};function J(J){let Y=this,X=this.parser.constructs[L],Z=J.attempt(X,Q,$);return Q;function Q(L){return te(L)?Z(L):$(L)}function $(L){if(L===null){J.consume(L);return}return J.enter(`data`),J.consume(L),ee}function ee(L){return te(L)?(J.exit(`data`),Z(L)):(J.consume(L),ee)}function te(L){if(L===null)return!0;let J=X[L],Z=-1;if(J)for(;++Z<J.length;){let L=J[Z];if(!L.previous||L.previous.call(Y,Y.previous))return!0}return!1}}}function createResolver(L){return J;function J(J,Y){let X=-1,Z;for(;++X<=J.length;)Z===void 0?J[X]&&J[X][1].type===`data`&&(Z=X,X++):(!J[X]||J[X][1].type!==`data`)&&(X!==Z+2&&(J[Z][1].end=J[X-1][1].end,J.splice(Z+2,X-Z-2),X=Z+2),Z=void 0);return L?L(J,Y):J}}function resolveAllLineSuffixes(L,J){let Y=0;for(;++Y<=L.length;)if((Y===L.length||L[Y][1].type===`lineEnding`)&&L[Y-1][1].type===`data`){let X=L[Y-1][1],Z=J.sliceStream(X),Q=Z.length,$=-1,ee=0,te;for(;Q--;){let L=Z[Q];if(typeof L==`string`){for($=L.length;L.charCodeAt($-1)===32;)ee++,$--;if($)break;$=-1}else if(L===-2)te=!0,ee++;else if(L!==-1){Q++;break}}if(J._contentTypeTextTrailing&&Y===L.length&&(ee=0),ee){let Z={type:Y===L.length||te||ee<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:Q?$:X.start._bufferIndex+$,_index:X.start._index+Q,line:X.end.line,column:X.end.column-ee,offset:X.end.offset-ee},end:{...X.end}};X.end={...Z.start},X.start.offset===X.end.offset?Object.assign(X,Z):(L.splice(Y,0,[`enter`,Z,J],[`exit`,Z,J]),Y+=2)}Y++}return L}var constructs_exports=__exportAll({attentionMarkers:()=>attentionMarkers,contentInitial:()=>contentInitial,disable:()=>disable,document:()=>document$1,flow:()=>flow,flowInitial:()=>flowInitial,insideSpan:()=>insideSpan,string:()=>string,text:()=>text});const document$1={42:list,43:list,45:list,48:list,49:list,50:list,51:list,52:list,53:list,54:list,55:list,56:list,57:list,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak,45:[setextUnderline,thematicBreak],60:htmlFlow,61:setextUnderline,95:thematicBreak,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};function createTokenizer(L,J,Y){let X={_bufferIndex:-1,_index:0,line:Y&&Y.line||1,column:Y&&Y.column||1,offset:Y&&Y.offset||0},Z={},Q=[],$=[],ee=[],te={attempt:ge(me),check:ge(he),consume:de,enter:fe,exit:pe,interrupt:ge(he,{interrupt:!0})},ne={code:null,containerState:{},defineSkip:ce,events:[],now:se,parser:L,previous:null,sliceSerialize:ae,sliceStream:oe,write:ie},re=J.tokenize.call(ne,te);return J.resolveAll&&Q.push(J),ne;function ie(L){return $=push($,L),le(),$[$.length-1]===null?(_e(J,0),ne.events=resolveAll(Q,ne.events,ne),ne.events):[]}function ae(L,J){return serializeChunks(oe(L),J)}function oe(L){return sliceChunks($,L)}function se(){let{_bufferIndex:L,_index:J,line:Y,column:Z,offset:Q}=X;return{_bufferIndex:L,_index:J,line:Y,column:Z,offset:Q}}function ce(L){Z[L.line]=L.column,ye()}function le(){let L;for(;X._index<$.length;){let J=$[X._index];if(typeof J==`string`)for(L=X._index,X._bufferIndex<0&&(X._bufferIndex=0);X._index===L&&X._bufferIndex<J.length;)ue(J.charCodeAt(X._bufferIndex));else ue(J)}}function ue(L){re=re(L)}function de(L){markdownLineEnding(L)?(X.line++,X.column=1,X.offset+=L===-3?2:1,ye()):L!==-1&&(X.column++,X.offset++),X._bufferIndex<0?X._index++:(X._bufferIndex++,X._bufferIndex===$[X._index].length&&(X._bufferIndex=-1,X._index++)),ne.previous=L}function fe(L,J){let Y=J||{};return Y.type=L,Y.start=se(),ne.events.push([`enter`,Y,ne]),ee.push(Y),Y}function pe(L){let J=ee.pop();return J.end=se(),ne.events.push([`exit`,J,ne]),J}function me(L,J){_e(L,J.from)}function he(L,J){J.restore()}function ge(L,J){return Y;function Y(Y,X,Z){let Q,$,ee,re;return Array.isArray(Y)?ae(Y):`tokenize`in Y?ae([Y]):ie(Y);function ie(L){return J;function J(J){let Y=J!==null&&L[J],X=J!==null&&L.null;return ae([...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(X)?X:X?[X]:[]])(J)}}function ae(L){return Q=L,$=0,L.length===0?Z:oe(L[$])}function oe(L){return Y;function Y(Y){return re=ve(),ee=L,L.partial||(ne.currentConstruct=L),L.name&&ne.parser.constructs.disable.null.includes(L.name)?ce(Y):L.tokenize.call(J?Object.assign(Object.create(ne),J):ne,te,se,ce)(Y)}}function se(J){return L(ee,re),X}function ce(L){return re.restore(),++$<Q.length?oe(Q[$]):Z}}}function _e(L,J){L.resolveAll&&!Q.includes(L)&&Q.push(L),L.resolve&&splice(ne.events,J,ne.events.length-J,L.resolve(ne.events.slice(J),ne)),L.resolveTo&&(ne.events=L.resolveTo(ne.events,ne))}function ve(){let L=se(),J=ne.previous,Y=ne.currentConstruct,Z=ne.events.length,Q=Array.from(ee);return{from:Z,restore:$};function $(){X=L,ne.previous=J,ne.currentConstruct=Y,ne.events.length=Z,ee=Q,ye()}}function ye(){X.line in Z&&X.column<2&&(X.column=Z[X.line],X.offset+=Z[X.line]-1)}}function sliceChunks(L,J){let Y=J.start._index,X=J.start._bufferIndex,Z=J.end._index,Q=J.end._bufferIndex,$;if(Y===Z)$=[L[Y].slice(X,Q)];else{if($=L.slice(Y,Z),X>-1){let L=$[0];typeof L==`string`?$[0]=L.slice(X):$.shift()}Q>0&&$.push(L[Z].slice(0,Q))}return $}function serializeChunks(L,J){let Y=-1,X=[],Z;for(;++Y<L.length;){let Q=L[Y],$;if(typeof Q==`string`)$=Q;else switch(Q){case-5:$=`\r`;break;case-4:$=`
45825
45825
  `;break;case-3:$=`\r
45826
45826
  `;break;case-2:$=J?` `:` `;break;case-1:if(!J&&Z)continue;$=` `;break;default:$=String.fromCharCode(Q)}Z=Q===-2,X.push($)}return X.join(``)}function parse$5(L){let J={constructs:combineExtensions([constructs_exports,...(L||{}).extensions||[]]),content:Y(content$1),defined:[],document:Y(document$2),flow:Y(flow$1),lazy:{},string:Y(string$1),text:Y(text$1)};return J;function Y(L){return Y;function Y(Y){return createTokenizer(J,L,Y)}}}function postprocess(L){for(;!subtokenize(L););return L}const search=/[\0\t\n\r]/g;function preprocess(){let L=1,J=``,Y=!0,X;return Z;function Z(Z,Q,$){let ee=[],te,ne,re,ie,ae;for(Z=J+(typeof Z==`string`?Z.toString():new TextDecoder(Q||void 0).decode(Z)),re=0,J=``,Y&&=(Z.charCodeAt(0)===65279&&re++,void 0);re<Z.length;){if(search.lastIndex=re,te=search.exec(Z),ie=te&&te.index!==void 0?te.index:Z.length,ae=Z.charCodeAt(ie),!te){J=Z.slice(re);break}if(ae===10&&re===ie&&X)ee.push(-3),X=void 0;else switch(X&&=(ee.push(-5),void 0),re<ie&&(ee.push(Z.slice(re,ie)),L+=ie-re),ae){case 0:ee.push(65533),L++;break;case 9:for(ne=Math.ceil(L/4)*4,ee.push(-2);L++<ne;)ee.push(-1);break;case 10:ee.push(-4),L=1;break;default:X=!0,L=1}re=ie+1}return $&&(X&&ee.push(-5),J&&ee.push(J),ee.push(null)),ee}}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(L){return L.replace(characterEscapeOrReference,decode)}function decode(L,J,Y){if(J)return J;if(Y.charCodeAt(0)===35){let L=Y.charCodeAt(1),J=L===120||L===88;return decodeNumericCharacterReference(Y.slice(J?2:1),J?16:10)}return decodeNamedCharacterReference(Y)||L}function stringifyPosition(L){return!L||typeof L!=`object`?``:`position`in L||`type`in L?position(L.position):`start`in L||`end`in L?position(L):`line`in L||`column`in L?point$1(L):``}function point$1(L){return index(L&&L.line)+`:`+index(L&&L.column)}function position(L){return point$1(L&&L.start)+`-`+point$1(L&&L.end)}function index(L){return L&&typeof L==`number`?L:1}const own$1={}.hasOwnProperty;function fromMarkdown(L,J,Y){return J&&typeof J==`object`&&(Y=J,J=void 0),compiler(Y)(postprocess(parse$5(Y).document().write(preprocess()(L,J,!0))))}function compiler(L){let J={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:Q(Je),autolinkProtocol:ve,autolinkEmail:ve,atxHeading:Q(We),blockQuote:Q(ze),characterEscape:ve,characterReference:ve,codeFenced:Q(Be),codeFencedFenceInfo:$,codeFencedFenceMeta:$,codeIndented:Q(Be,$),codeText:Q(Ve,$),codeTextData:ve,data:ve,codeFlowValue:ve,definition:Q(He),definitionDestinationString:$,definitionLabelString:$,definitionTitleString:$,emphasis:Q(Ue),hardBreakEscape:Q(Ge),hardBreakTrailing:Q(Ge),htmlFlow:Q(Ke,$),htmlFlowData:ve,htmlText:Q(Ke,$),htmlTextData:ve,image:Q(qe),label:$,link:Q(Je),listItem:Q(Xe),listItemValue:ae,listOrdered:Q(Ye,ie),listUnordered:Q(Ye),paragraph:Q(Ze),reference:Me,referenceString:$,resourceDestinationString:$,resourceTitleString:$,setextHeading:Q(We),strong:Q(Qe),thematicBreak:Q(et)},exit:{atxHeading:te(),atxHeadingSequence:me,autolink:te(),autolinkEmail:Re,autolinkProtocol:Le,blockQuote:te(),characterEscapeValue:ye,characterReferenceMarkerHexadecimal:Pe,characterReferenceMarkerNumeric:Pe,characterReferenceValue:Fe,characterReference:Ie,codeFenced:te(le),codeFencedFence:ce,codeFencedFenceInfo:oe,codeFencedFenceMeta:se,codeFlowValue:ye,codeIndented:te(ue),codeText:te(we),codeTextData:ye,data:ye,definition:te(),definitionDestinationString:pe,definitionLabelString:de,definitionTitleString:fe,emphasis:te(),hardBreakEscape:te(xe),hardBreakTrailing:te(xe),htmlFlow:te(Se),htmlFlowData:ye,htmlText:te(Ce),htmlTextData:ye,image:te(Ee),label:Oe,labelText:De,lineEnding:be,link:te(Te),listItem:te(),listOrdered:te(),listUnordered:te(),paragraph:te(),referenceString:Ne,resourceDestinationString:ke,resourceTitleString:Ae,resource:je,setextHeading:te(_e),setextHeadingLineSequence:ge,setextHeadingText:he,strong:te(),thematicBreak:te()}};configure(J,(L||{}).mdastExtensions||[]);let Y={};return X;function X(L){let X={type:`root`,children:[]},Q={stack:[X],tokenStack:[],config:J,enter:ee,exit:ne,buffer:$,resume:re,data:Y},te=[],ie=-1;for(;++ie<L.length;)(L[ie][1].type===`listOrdered`||L[ie][1].type===`listUnordered`)&&(L[ie][0]===`enter`?te.push(ie):ie=Z(L,te.pop(),ie));for(ie=-1;++ie<L.length;){let Y=J[L[ie][0]];own$1.call(Y,L[ie][1].type)&&Y[L[ie][1].type].call(Object.assign({sliceSerialize:L[ie][2].sliceSerialize},Q),L[ie][1])}if(Q.tokenStack.length>0){let L=Q.tokenStack[Q.tokenStack.length-1];(L[1]||defaultOnError).call(Q,void 0,L[0])}for(X.position={start:point(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:point(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},ie=-1;++ie<J.transforms.length;)X=J.transforms[ie](X)||X;return X}function Z(L,J,Y){let X=J-1,Z=-1,Q=!1,$,ee,te,ne;for(;++X<=Y;){let J=L[X];switch(J[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:J[0]===`enter`?Z++:Z--,ne=void 0;break;case`lineEndingBlank`:J[0]===`enter`&&($&&!ne&&!Z&&!te&&(te=X),ne=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:ne=void 0}if(!Z&&J[0]===`enter`&&J[1].type===`listItemPrefix`||Z===-1&&J[0]===`exit`&&(J[1].type===`listUnordered`||J[1].type===`listOrdered`)){if($){let Z=X;for(ee=void 0;Z--;){let J=L[Z];if(J[1].type===`lineEnding`||J[1].type===`lineEndingBlank`){if(J[0]===`exit`)continue;ee&&(L[ee][1].type=`lineEndingBlank`,Q=!0),J[1].type=`lineEnding`,ee=Z}else if(!(J[1].type===`linePrefix`||J[1].type===`blockQuotePrefix`||J[1].type===`blockQuotePrefixWhitespace`||J[1].type===`blockQuoteMarker`||J[1].type===`listItemIndent`))break}te&&(!ee||te<ee)&&($._spread=!0),$.end=Object.assign({},ee?L[ee][1].start:J[1].end),L.splice(ee||X,0,[`exit`,$,J[2]]),X++,Y++}if(J[1].type===`listItemPrefix`){let Z={type:`listItem`,_spread:!1,start:Object.assign({},J[1].start),end:void 0};$=Z,L.splice(X,0,[`enter`,Z,J[2]]),X++,Y++,te=void 0,ne=!0}}}return L[J][1]._spread=Q,Y}function Q(L,J){return Y;function Y(Y){ee.call(this,L(Y),Y),J&&J.call(this,Y)}}function $(){this.stack.push({type:`fragment`,children:[]})}function ee(L,J,Y){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([J,Y||void 0]),L.position={start:point(J.start),end:void 0}}function te(L){return J;function J(J){L&&L.call(this,J),ne.call(this,J)}}function ne(L,J){let Y=this.stack.pop(),X=this.tokenStack.pop();if(X)X[0].type!==L.type&&(J?J.call(this,L,X[0]):(X[1]||defaultOnError).call(this,L,X[0]));else throw Error("Cannot close `"+L.type+"` ("+stringifyPosition({start:L.start,end:L.end})+`): it’s not open`);Y.position.end=point(L.end)}function re(){return toString(this.stack.pop())}function ie(){this.data.expectingFirstListItemValue=!0}function ae(L){if(this.data.expectingFirstListItemValue){let J=this.stack[this.stack.length-2];J.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function oe(){let L=this.resume(),J=this.stack[this.stack.length-1];J.lang=L}function se(){let L=this.resume(),J=this.stack[this.stack.length-1];J.meta=L}function ce(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function le(){let L=this.resume(),J=this.stack[this.stack.length-1];J.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function ue(){let L=this.resume(),J=this.stack[this.stack.length-1];J.value=L.replace(/(\r?\n|\r)$/g,``)}function de(L){let J=this.resume(),Y=this.stack[this.stack.length-1];Y.label=J,Y.identifier=normalizeIdentifier(this.sliceSerialize(L)).toLowerCase()}function fe(){let L=this.resume(),J=this.stack[this.stack.length-1];J.title=L}function pe(){let L=this.resume(),J=this.stack[this.stack.length-1];J.url=L}function me(L){let J=this.stack[this.stack.length-1];J.depth||=this.sliceSerialize(L).length}function he(){this.data.setextHeadingSlurpLineEnding=!0}function ge(L){let J=this.stack[this.stack.length-1];J.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function _e(){this.data.setextHeadingSlurpLineEnding=void 0}function ve(L){let J=this.stack[this.stack.length-1].children,Y=J[J.length-1];(!Y||Y.type!==`text`)&&(Y=$e(),Y.position={start:point(L.start),end:void 0},J.push(Y)),this.stack.push(Y)}function ye(L){let J=this.stack.pop();J.value+=this.sliceSerialize(L),J.position.end=point(L.end)}function be(L){let Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){let J=Y.children[Y.children.length-1];J.position.end=point(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&J.canContainEols.includes(Y.type)&&(ve.call(this,L),ye.call(this,L))}function xe(){this.data.atHardBreak=!0}function Se(){let L=this.resume(),J=this.stack[this.stack.length-1];J.value=L}function Ce(){let L=this.resume(),J=this.stack[this.stack.length-1];J.value=L}function we(){let L=this.resume(),J=this.stack[this.stack.length-1];J.value=L}function Te(){let L=this.stack[this.stack.length-1];if(this.data.inReference){let J=this.data.referenceType||`shortcut`;L.type+=`Reference`,L.referenceType=J,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Ee(){let L=this.stack[this.stack.length-1];if(this.data.inReference){let J=this.data.referenceType||`shortcut`;L.type+=`Reference`,L.referenceType=J,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function De(L){let J=this.sliceSerialize(L),Y=this.stack[this.stack.length-2];Y.label=decodeString(J),Y.identifier=normalizeIdentifier(J).toLowerCase()}function Oe(){let L=this.stack[this.stack.length-1],J=this.resume(),Y=this.stack[this.stack.length-1];this.data.inReference=!0,Y.type===`link`?Y.children=L.children:Y.alt=J}function ke(){let L=this.resume(),J=this.stack[this.stack.length-1];J.url=L}function Ae(){let L=this.resume(),J=this.stack[this.stack.length-1];J.title=L}function je(){this.data.inReference=void 0}function Me(){this.data.referenceType=`collapsed`}function Ne(L){let J=this.resume(),Y=this.stack[this.stack.length-1];Y.label=J,Y.identifier=normalizeIdentifier(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType=`full`}function Pe(L){this.data.characterReferenceType=L.type}function Fe(L){let J=this.sliceSerialize(L),Y=this.data.characterReferenceType,X;Y?(X=decodeNumericCharacterReference(J,Y===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):X=decodeNamedCharacterReference(J);let Z=this.stack[this.stack.length-1];Z.value+=X}function Ie(L){let J=this.stack.pop();J.position.end=point(L.end)}function Le(L){ye.call(this,L);let J=this.stack[this.stack.length-1];J.url=this.sliceSerialize(L)}function Re(L){ye.call(this,L);let J=this.stack[this.stack.length-1];J.url=`mailto:`+this.sliceSerialize(L)}function ze(){return{type:`blockquote`,children:[]}}function Be(){return{type:`code`,lang:null,meta:null,value:``}}function Ve(){return{type:`inlineCode`,value:``}}function He(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Ue(){return{type:`emphasis`,children:[]}}function We(){return{type:`heading`,depth:0,children:[]}}function Ge(){return{type:`break`}}function Ke(){return{type:`html`,value:``}}function qe(){return{type:`image`,title:null,url:``,alt:null}}function Je(){return{type:`link`,title:null,url:``,children:[]}}function Ye(L){return{type:`list`,ordered:L.type===`listOrdered`,start:null,spread:L._spread,children:[]}}function Xe(L){return{type:`listItem`,spread:L._spread,checked:null,children:[]}}function Ze(){return{type:`paragraph`,children:[]}}function Qe(){return{type:`strong`,children:[]}}function $e(){return{type:`text`,value:``}}function et(){return{type:`thematicBreak`}}}function point(L){return{line:L.line,column:L.column,offset:L.offset}}function configure(L,J){let Y=-1;for(;++Y<J.length;){let X=J[Y];Array.isArray(X)?configure(L,X):extension(L,X)}}function extension(L,J){let Y;for(Y in J)if(own$1.call(J,Y))switch(Y){case`canContainEols`:{let X=J[Y];X&&L[Y].push(...X);break}case`transforms`:{let X=J[Y];X&&L[Y].push(...X);break}case`enter`:case`exit`:{let X=J[Y];X&&Object.assign(L[Y],X);break}}}function defaultOnError(L,J){throw L?Error("Cannot close `"+L.type+"` ("+stringifyPosition({start:L.start,end:L.end})+"): a different token (`"+J.type+"`, "+stringifyPosition({start:J.start,end:J.end})+`) is open`):Error("Cannot close document, a token (`"+J.type+"`, "+stringifyPosition({start:J.start,end:J.end})+`) is still open`)}function remarkParse(L){let J=this;J.parser=Y;function Y(Y){return fromMarkdown(Y,{...J.data(`settings`),...L,extensions:J.data(`micromarkExtensions`)||[],mdastExtensions:J.data(`fromMarkdownExtensions`)||[]})}}function bail(L){if(L)throw L}var require_extend=__commonJSMin(((L,J)=>{var Y=Object.prototype.hasOwnProperty,X=Object.prototype.toString,Z=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,$=function(L){return typeof Array.isArray==`function`?Array.isArray(L):X.call(L)===`[object Array]`},ee=function(L){if(!L||X.call(L)!==`[object Object]`)return!1;var J=Y.call(L,`constructor`),Z=L.constructor&&L.constructor.prototype&&Y.call(L.constructor.prototype,`isPrototypeOf`);if(L.constructor&&!J&&!Z)return!1;for(var Q in L);return Q===void 0||Y.call(L,Q)},te=function(L,J){Z&&J.name===`__proto__`?Z(L,J.name,{enumerable:!0,configurable:!0,value:J.newValue,writable:!0}):L[J.name]=J.newValue},ne=function(L,J){if(J===`__proto__`){if(!Y.call(L,J))return;if(Q)return Q(L,J).value}return L[J]};J.exports=function L(){var J,Y,X,Z,Q,re,ie=arguments[0],ae=1,oe=arguments.length,se=!1;for(typeof ie==`boolean`&&(se=ie,ie=arguments[1]||{},ae=2),(ie==null||typeof ie!=`object`&&typeof ie!=`function`)&&(ie={});ae<oe;++ae)if(J=arguments[ae],J!=null)for(Y in J)X=ne(ie,Y),Z=ne(J,Y),ie!==Z&&(se&&Z&&(ee(Z)||(Q=$(Z)))?(Q?(Q=!1,re=X&&$(X)?X:[]):re=X&&ee(X)?X:{},te(ie,{name:Y,newValue:L(se,re,Z)})):Z!==void 0&&te(ie,{name:Y,newValue:Z}));return ie}}));function ok(){}function isPlainObject(L){if(typeof L!=`object`||!L)return!1;let J=Object.getPrototypeOf(L);return(J===null||J===Object.prototype||Object.getPrototypeOf(J)===null)&&!(Symbol.toStringTag in L)&&!(Symbol.iterator in L)}function trough(){let L=[],J={run:Y,use:X};return J;function Y(...J){let Y=-1,X=J.pop();if(typeof X!=`function`)throw TypeError(`Expected function as last argument, not `+X);Z(null,...J);function Z(Q,...$){let ee=L[++Y],te=-1;if(Q){X(Q);return}for(;++te<J.length;)($[te]===null||$[te]===void 0)&&($[te]=J[te]);J=$,ee?wrap(ee,Z)(...$):X(null,...$)}}function X(Y){if(typeof Y!=`function`)throw TypeError("Expected `middelware` to be a function, not "+Y);return L.push(Y),J}}function wrap(L,J){let Y;return X;function X(...J){let X=L.length>J.length,$;X&&J.push(Z);try{$=L.apply(this,J)}catch(L){let J=L;if(X&&Y)throw J;return Z(J)}X||($&&$.then&&typeof $.then==`function`?$.then(Q,Z):$ instanceof Error?Z($):Q($))}function Z(L,...X){Y||(Y=!0,J(L,...X))}function Q(L){Z(null,L)}}var VFileMessage=class extends Error{constructor(L,J,Y){super(),typeof J==`string`&&(Y=J,J=void 0);let X=``,Z={},Q=!1;if(J&&(Z=`line`in J&&`column`in J||`start`in J&&`end`in J?{place:J}:`type`in J?{ancestors:[J],place:J.position}:{...J}),typeof L==`string`?X=L:!Z.cause&&L&&(Q=!0,X=L.message,Z.cause=L),!Z.ruleId&&!Z.source&&typeof Y==`string`){let L=Y.indexOf(`:`);L===-1?Z.ruleId=Y:(Z.source=Y.slice(0,L),Z.ruleId=Y.slice(L+1))}if(!Z.place&&Z.ancestors&&Z.ancestors){let L=Z.ancestors[Z.ancestors.length-1];L&&(Z.place=L.position)}let $=Z.place&&`start`in Z.place?Z.place.start:Z.place;this.ancestors=Z.ancestors||void 0,this.cause=Z.cause||void 0,this.column=$?$.column:void 0,this.fatal=void 0,this.file=``,this.message=X,this.line=$?$.line:void 0,this.name=stringifyPosition(Z.place)||`1:1`,this.place=Z.place||void 0,this.reason=this.message,this.ruleId=Z.ruleId||void 0,this.source=Z.source||void 0,this.stack=Q&&Z.cause&&typeof Z.cause.stack==`string`?Z.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};VFileMessage.prototype.file=``,VFileMessage.prototype.name=``,VFileMessage.prototype.reason=``,VFileMessage.prototype.message=``,VFileMessage.prototype.stack=``,VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0;function isUrl(L){return!!(typeof L==`object`&&L&&`href`in L&&L.href&&`protocol`in L&&L.protocol&&L.auth===void 0)}const order=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`];var VFile=class{constructor(L){let J;J=L?isUrl(L)?{path:L}:typeof L==`string`||isUint8Array$1(L)?{value:L}:L:{},this.cwd=`cwd`in J?``:minproc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let Y=-1;for(;++Y<order.length;){let L=order[Y];L in J&&J[L]!==void 0&&J[L]!==null&&(this[L]=L===`history`?[...J[L]]:J[L])}let X;for(X in J)order.includes(X)||(this[X]=J[X])}get basename(){return typeof this.path==`string`?minpath.basename(this.path):void 0}set basename(L){assertNonEmpty(L,`basename`),assertPart(L,`basename`),this.path=minpath.join(this.dirname||``,L)}get dirname(){return typeof this.path==`string`?minpath.dirname(this.path):void 0}set dirname(L){assertPath(this.basename,`dirname`),this.path=minpath.join(L||``,this.basename)}get extname(){return typeof this.path==`string`?minpath.extname(this.path):void 0}set extname(L){if(assertPart(L,`extname`),assertPath(this.dirname,`extname`),L){if(L.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(L.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=minpath.join(this.dirname,this.stem+(L||``))}get path(){return this.history[this.history.length-1]}set path(L){isUrl(L)&&(L=urlToPath(L)),assertNonEmpty(L,`path`),this.path!==L&&this.history.push(L)}get stem(){return typeof this.path==`string`?minpath.basename(this.path,this.extname):void 0}set stem(L){assertNonEmpty(L,`stem`),assertPart(L,`stem`),this.path=minpath.join(this.dirname||``,L+(this.extname||``))}fail(L,J,Y){let X=this.message(L,J,Y);throw X.fatal=!0,X}info(L,J,Y){let X=this.message(L,J,Y);return X.fatal=void 0,X}message(L,J,Y){let X=new VFileMessage(L,J,Y);return this.path&&(X.name=this.path+`:`+X.name,X.file=this.path),X.fatal=!1,this.messages.push(X),X}toString(L){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(L||void 0).decode(this.value)}};function assertPart(L,J){if(L&&L.includes(minpath.sep))throw Error("`"+J+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(L,J){if(!L)throw Error("`"+J+"` cannot be empty")}function assertPath(L,J){if(!L)throw Error("Setting `"+J+"` requires `path` to be set too")}function isUint8Array$1(L){return!!(L&&typeof L==`object`&&`byteLength`in L&&`byteOffset`in L)}const CallableInstance=(function(L){let J=this.constructor.prototype,Y=J[L],X=function(){return Y.apply(X,arguments)};return Object.setPrototypeOf(X,J),X});var import_extend=__toESM(require_extend(),1);const own={}.hasOwnProperty;var Processor=class L extends CallableInstance{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){let J=new L,Y=-1;for(;++Y<this.attachers.length;){let L=this.attachers[Y];J.use(...L)}return J.data((0,import_extend.default)(!0,{},this.namespace)),J}data(L,J){return typeof L==`string`?arguments.length===2?(assertUnfrozen(`data`,this.frozen),this.namespace[L]=J,this):own.call(this.namespace,L)&&this.namespace[L]||void 0:L?(assertUnfrozen(`data`,this.frozen),this.namespace=L,this):this.namespace}freeze(){if(this.frozen)return this;let L=this;for(;++this.freezeIndex<this.attachers.length;){let[J,...Y]=this.attachers[this.freezeIndex];if(Y[0]===!1)continue;Y[0]===!0&&(Y[0]=void 0);let X=J.call(L,...Y);typeof X==`function`&&this.transformers.use(X)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(L){this.freeze();let J=vfile(L),Y=this.parser||this.Parser;return assertParser(`parse`,Y),Y(String(J),J)}process(L,J){let Y=this;return this.freeze(),assertParser(`process`,this.parser||this.Parser),assertCompiler(`process`,this.compiler||this.Compiler),J?X(void 0,J):new Promise(X);function X(X,Z){let Q=vfile(L),$=Y.parse(Q);Y.run($,Q,function(L,J,X){if(L||!J||!X)return ee(L);let Z=J,Q=Y.stringify(Z,X);looksLikeAValue(Q)?X.value=Q:X.result=Q,ee(L,X)});function ee(L,Y){L||!Y?Z(L):X?X(Y):J(void 0,Y)}}}processSync(L){let J=!1,Y;return this.freeze(),assertParser(`processSync`,this.parser||this.Parser),assertCompiler(`processSync`,this.compiler||this.Compiler),this.process(L,X),assertDone(`processSync`,`process`,J),Y;function X(L,X){J=!0,bail(L),Y=X}}run(L,J,Y){assertNode(L),this.freeze();let X=this.transformers;return!Y&&typeof J==`function`&&(Y=J,J=void 0),Y?Z(void 0,Y):new Promise(Z);function Z(Z,Q){let $=vfile(J);X.run(L,$,ee);function ee(J,X,$){let ee=X||L;J?Q(J):Z?Z(ee):Y(void 0,ee,$)}}}runSync(L,J){let Y=!1,X;return this.run(L,J,Z),assertDone(`runSync`,`run`,Y),X;function Z(L,J){bail(L),X=J,Y=!0}}stringify(L,J){this.freeze();let Y=vfile(J),X=this.compiler||this.Compiler;return assertCompiler(`stringify`,X),assertNode(L),X(L,Y)}use(L,...J){let Y=this.attachers,X=this.namespace;if(assertUnfrozen(`use`,this.frozen),L!=null)if(typeof L==`function`)ee(L,J);else if(typeof L==`object`)Array.isArray(L)?$(L):Q(L);else throw TypeError("Expected usable value, not `"+L+"`");return this;function Z(L){if(typeof L==`function`)ee(L,[]);else if(typeof L==`object`)if(Array.isArray(L)){let[J,...Y]=L;ee(J,Y)}else Q(L);else throw TypeError("Expected usable value, not `"+L+"`")}function Q(L){if(!(`plugins`in L)&&!(`settings`in L))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");$(L.plugins),L.settings&&(X.settings=(0,import_extend.default)(!0,X.settings,L.settings))}function $(L){let J=-1;if(L!=null)if(Array.isArray(L))for(;++J<L.length;){let Y=L[J];Z(Y)}else throw TypeError("Expected a list of plugins, not `"+L+"`")}function ee(L,J){let X=-1,Z=-1;for(;++X<Y.length;)if(Y[X][0]===L){Z=X;break}if(Z===-1)Y.push([L,...J]);else if(J.length>0){let[X,...Q]=J,$=Y[Z][1];isPlainObject($)&&isPlainObject(X)&&(X=(0,import_extend.default)(!0,$,X)),Y[Z]=[L,X,...Q]}}}};const unified=new Processor().freeze();function assertParser(L,J){if(typeof J!=`function`)throw TypeError("Cannot `"+L+"` without `parser`")}function assertCompiler(L,J){if(typeof J!=`function`)throw TypeError("Cannot `"+L+"` without `compiler`")}function assertUnfrozen(L,J){if(J)throw Error("Cannot call `"+L+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(L){if(!isPlainObject(L)||typeof L.type!=`string`)throw TypeError("Expected node, got `"+L+"`")}function assertDone(L,J,Y){if(!Y)throw Error("`"+L+"` finished async. Use `"+J+"` instead")}function vfile(L){return looksLikeAVFile(L)?L:new VFile(L)}function looksLikeAVFile(L){return!!(L&&typeof L==`object`&&`message`in L&&`messages`in L)}function looksLikeAValue(L){return typeof L==`string`||isUint8Array(L)}function isUint8Array(L){return!!(L&&typeof L==`object`&&`byteLength`in L&&`byteOffset`in L)}const readmeSchema=object({name:string$2()});function extractText(L){return L.map(L=>`value`in L?L.value:`children`in L?extractText(L.children):``).join(``).trim()}function extractFirstH1(L){let J=unified().use(remarkParse).parse(L);for(let L of J.children)if(L.type===`heading`&&L.depth===1){let J=extractText(L.children);if(J.length>0)return J}}function parse$4(L){let J=extractFirstH1(L);if(J)return readmeSchema.parse({name:J})}const readmeFileSource=defineSource({async discover(L){return getMatches(L.options,[`README`,`README.*`])},key:`readmeFile`,async parse(L,J){let Y=parse$4(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});function emptySpec(){return{authors:[],bindir:void 0,cert_chain:[],dependencies:[],description:void 0,email:void 0,executables:[],extensions:[],extra:{},extra_rdoc_files:[],files:[],homepage:void 0,license:void 0,licenses:[],metadata:{},name:void 0,platform:void 0,post_install_message:void 0,rdoc_options:[],require_paths:[],required_ruby_version:void 0,required_rubygems_version:void 0,signing_key:void 0,summary:void 0,test_files:[],version:void 0}}function children$1(L){return L.namedChildren.filter(L=>L!==null)}const IDENTITY_METHODS=new Set([`-@`,`dup`,`freeze`]);function extractString(L){switch(L.type){case`call`:{let J=L.childForFieldName(`method`);if(J&&IDENTITY_METHODS.has(J.text)){let J=L.childForFieldName(`receiver`);if(J)return extractString(J)}return}case`float`:case`integer`:return L.text;case`heredoc_body`:return L.text.trim();case`simple_symbol`:return L.text.replace(/^:/,``);case`string`:case`string_content`:{let J=children$1(L).filter(L=>L.type===`string_content`);return J.length>0?J.map(L=>L.text).join(``):L.text.replaceAll(/^["']|["']$/g,``)}default:return}}function extractStringArray(L){if(L.type===`array`)return children$1(L).map(L=>extractString(L)).filter(L=>L!==void 0);if(L.type===`string_array`)return children$1(L).map(L=>(L.type,L.text));let J=extractString(L);return J===void 0?[]:[J]}function extractValue(L){if(L.type===`array`||L.type===`string_array`)return extractStringArray(L);if(L.type===`call`){let J=L.childForFieldName(`method`);if(J&&IDENTITY_METHODS.has(J.text)){let J=L.childForFieldName(`receiver`);if(J)return extractValue(J)}}if(L.type===`true`)return`true`;if(L.type===`false`)return`false`;if(L.type!==`nil`)return extractString(L)}function resolveAttribute(L){if(L.type===`call`)return L.childForFieldName(`method`)?.text??void 0}const DEP_METHODS={add_dependency:`runtime`,add_development_dependency:`development`,add_runtime_dependency:`runtime`};function tryParseDependency(L){if(L.type!==`call`&&L.type!==`method_call`)return;let J=L.childForFieldName(`method`);if(!J)return;let Y;if(Y=J.type===`call`?J.childForFieldName(`method`)?.text??void 0:(J.type,J.text),!Y){let J=L.childForFieldName(`method`);J?.type===`identifier`&&(Y=J.text)}if(!Y||!DEP_METHODS[Y]){for(let J of Object.keys(DEP_METHODS))if(L.text.includes(`.${J}`)){Y=J;break}}if(!Y||!DEP_METHODS[Y])return;let X=DEP_METHODS[Y],Z=L.childForFieldName(`arguments`);if(!Z)return;let Q=children$1(Z);if(Q.length===0)return;let $=extractString(Q[0]);if($)return{name:$,requirements:Q.slice(1).map(L=>extractString(L)).filter(L=>L!==void 0),type:X}}function extractHash(L){let J={};if(L.type!==`hash`)return J;for(let Y of children$1(L)){if(Y.type!==`pair`)continue;let L=Y.childForFieldName(`key`),X=Y.childForFieldName(`value`);if(!L||!X)continue;let Z=extractString(L),Q=extractString(X);Z&&Q&&(J[Z]=Q)}return J}function setStringAttribute(L,J,Y){Object.assign(L,{[J]:Y})}function setArrayAttribute(L,J,Y){Object.assign(L,{[J]:Y})}async function parseGemspec(L){let J=await initParser(),Y=await getRubyLanguage();J.setLanguage(Y);let X=J.parse(L);if(!X)throw Error(`Failed to parse gemspec source`);let Z=emptySpec(),Q=new Set([`bindir`,`description`,`homepage`,`license`,`name`,`platform`,`post_install_message`,`required_ruby_version`,`required_rubygems_version`,`signing_key`,`summary`,`version`]),$=new Set([`authors`,`cert_chain`,`executables`,`extensions`,`extra_rdoc_files`,`files`,`licenses`,`rdoc_options`,`require_paths`,`test_files`]);function ee(L){if(L.type===`assignment`){let J=L.childForFieldName(`left`),Y=L.childForFieldName(`right`);if(!J||!Y){te(L);return}let X=resolveAttribute(J);if(!X){te(L);return}if(X===`email`){let L=extractValue(Y);L!==void 0&&(Z.email=L);return}if(X===`metadata`){Y.type===`hash`&&(Z.metadata={...is.plainObject(Z.metadata)?Z.metadata:{},...extractHash(Y)});return}if(Q.has(X)){let L=extractString(Y);L!==void 0&&setStringAttribute(Z,X,L);return}if($.has(X)){let L=extractStringArray(Y);L.length>0&&setArrayAttribute(Z,X,L);return}let ee=extractValue(Y);ee!==void 0&&is.plainObject(Z.extra)&&(Z.extra[X]=ee);return}if(L.type===`call`||L.type===`method_call`){let J=tryParseDependency(L);if(J){Array.isArray(Z.dependencies)&&Z.dependencies.push(J);return}}L.type===`element_assignment`||L.type,te(L)}function te(L){for(let J of children$1(L))ee(J)}return ee(X.rootNode),Z}const gemSpecDependencySchema=object({name:string$2(),requirements:array(string$2()),type:_enum([`development`,`runtime`])}),gemSpecSchema=object({authors:stringArray,bindir:nonEmptyString,cert_chain:stringArray,dependencies:array(gemSpecDependencySchema),description:nonEmptyString,email:union([string$2(),array(string$2())]).optional(),executables:stringArray,extensions:stringArray,extra:record(string$2(),unknown()),extra_rdoc_files:stringArray,files:stringArray,homepage:optionalUrl,license:nonEmptyString,licenses:stringArray,metadata:record(string$2(),string$2()),name:nonEmptyString,platform:nonEmptyString,post_install_message:nonEmptyString,rdoc_options:stringArray,require_paths:stringArray,required_ruby_version:nonEmptyString,required_rubygems_version:nonEmptyString,signing_key:nonEmptyString,summary:nonEmptyString,test_files:stringArray,version:nonEmptyString});async function parse$3(L){let J=await parseGemspec(L);return gemSpecSchema.parse(J)}const rubyGemspecSource=defineSource({async discover(L){return getMatches(L.options,[`*.gemspec`])},key:`rubyGemspec`,async parse(L,J){return{data:await parse$3(await readFile(resolve$1(J.options.path,L),`utf8`)),source:L}},phase:1}),cargoTomlAuthorEntrySchema=object({email:string$2().optional(),name:string$2()}),cargoTomlDependencyEntrySchema=object({name:string$2(),version:string$2().optional()}),cargoTomlSchema=object({authors:array(cargoTomlAuthorEntrySchema),buildDependencies:array(cargoTomlDependencyEntrySchema),categories:stringArray,dependencies:array(cargoTomlDependencyEntrySchema),description:nonEmptyString,devDependencies:array(cargoTomlDependencyEntrySchema),documentation:optionalUrl,edition:nonEmptyString,homepage:optionalUrl,keywords:stringArray,license:nonEmptyString,licenseFile:nonEmptyString,name:nonEmptyString,readme:nonEmptyString,repository:optionalUrl,rustVersion:nonEmptyString,version:nonEmptyString,workspaceMembers:stringArray});function parse$2(L){let J;try{let Y=parse$9(L);if(!is.plainObject(Y))return;J=Y}catch{return}let Y=is.plainObject(J.package)?J.package:{},X=is.plainObject(J.workspace)?J.workspace:void 0;return cargoTomlSchema.parse({authors:parseAuthors(Y.authors),buildDependencies:parseDependencies$1(is.plainObject(J[`build-dependencies`])?J[`build-dependencies`]:{}),categories:toStringArray(Y.categories),dependencies:parseDependencies$1(is.plainObject(J.dependencies)?J.dependencies:{}),description:nonEmpty(Y.description),devDependencies:parseDependencies$1(is.plainObject(J[`dev-dependencies`])?J[`dev-dependencies`]:{}),documentation:nonEmpty(Y.documentation),edition:nonEmpty(Y.edition),homepage:nonEmpty(Y.homepage),keywords:toStringArray(Y.keywords),license:nonEmpty(Y.license),licenseFile:nonEmpty(Y[`license-file`]),name:nonEmpty(Y.name),readme:nonEmpty(Y.readme),repository:nonEmpty(Y.repository),rustVersion:nonEmpty(Y[`rust-version`]),version:nonEmpty(Y.version),workspaceMembers:toStringArray(X?.members)})}function nonEmpty(L){if(typeof L!=`string`)return;let J=L.trim();return J.length>0?J:void 0}function toStringArray(L){return Array.isArray(L)?L.filter(L=>typeof L==`string`&&L.trim().length>0):[]}function parseAuthors(L){if(!Array.isArray(L))return[];let J=[];for(let Y of L){if(typeof Y!=`string`)continue;let L=Y.trim();if(L.length===0)continue;let X=L.indexOf(`<`);if(X!==-1){let Y=L.indexOf(`>`,X);if(Y!==-1){let Z=L.slice(0,X).trim(),Q=L.slice(X+1,Y).trim();J.push({email:Q.length>0?Q:void 0,name:Z});continue}}J.push({email:void 0,name:L})}return J}function parseDependencies$1(L){let J=[];for(let[Y,X]of Object.entries(L))typeof X==`string`?J.push({name:Y,version:X}):is.plainObject(X)?J.push({name:Y,version:nonEmpty(X.version)}):J.push({name:Y,version:void 0});return J}const rustCargoTomlSource=defineSource({async discover(L){return getMatches(L.options,[`Cargo.toml`])},key:`rustCargoToml`,async parse(L,J){let Y=parse$2(await readFile(resolve$1(J.options.path,L),`utf8`));if(Y!==void 0)return{data:Y,source:L}},phase:1});var require_conventions$1=__commonJSMin((L=>{function J(L,J,Y){if(Y===void 0&&(Y=Array.prototype),L&&typeof Y.find==`function`)return Y.find.call(L,J);for(var X=0;X<L.length;X++)if(Object.prototype.hasOwnProperty.call(L,X)){var Z=L[X];if(J.call(void 0,Z,X,L))return Z}}function Y(L,J){return J===void 0&&(J=Object),J&&typeof J.freeze==`function`?J.freeze(L):L}function X(L,J){if(typeof L!=`object`||!L)throw TypeError(`target is not an object`);for(var Y in J)Object.prototype.hasOwnProperty.call(J,Y)&&(L[Y]=J[Y]);return L}var Z=Y({HTML:`text/html`,isHTML:function(L){return L===Z.HTML},XML_APPLICATION:`application/xml`,XML_TEXT:`text/xml`,XML_XHTML_APPLICATION:`application/xhtml+xml`,XML_SVG_IMAGE:`image/svg+xml`}),Q=Y({HTML:`http://www.w3.org/1999/xhtml`,isHTML:function(L){return L===Q.HTML},SVG:`http://www.w3.org/2000/svg`,XML:`http://www.w3.org/XML/1998/namespace`,XMLNS:`http://www.w3.org/2000/xmlns/`});L.assign=X,L.find=J,L.freeze=Y,L.MIME_TYPE=Z,L.NAMESPACE=Q})),require_dom$1=__commonJSMin((L=>{var J=require_conventions$1(),Y=J.find,X=J.NAMESPACE;function Z(L){return L!==``}function Q(L){return L?L.split(/[\t\n\f\r ]+/).filter(Z):[]}function $(L,J){return L.hasOwnProperty(J)||(L[J]=!0),L}function ee(L){if(!L)return[];var J=Q(L);return Object.keys(J.reduce($,{}))}function te(L){return function(J){return L&&L.indexOf(J)!==-1}}function ne(L,J){for(var Y in L)Object.prototype.hasOwnProperty.call(L,Y)&&(J[Y]=L[Y])}function re(L,J){var Y=L.prototype;if(!(Y instanceof J)){function X(){}X.prototype=J.prototype,X=new X,ne(Y,X),L.prototype=Y=X}Y.constructor!=L&&(typeof L!=`function`&&console.error(`unknown Class:`+L),Y.constructor=L)}var ie={},ae=ie.ELEMENT_NODE=1,oe=ie.ATTRIBUTE_NODE=2,se=ie.TEXT_NODE=3,ce=ie.CDATA_SECTION_NODE=4,le=ie.ENTITY_REFERENCE_NODE=5,ue=ie.ENTITY_NODE=6,de=ie.PROCESSING_INSTRUCTION_NODE=7,fe=ie.COMMENT_NODE=8,pe=ie.DOCUMENT_NODE=9,me=ie.DOCUMENT_TYPE_NODE=10,he=ie.DOCUMENT_FRAGMENT_NODE=11,ge=ie.NOTATION_NODE=12,_e={},ve={};_e.INDEX_SIZE_ERR=(ve[1]=`Index size error`,1),_e.DOMSTRING_SIZE_ERR=(ve[2]=`DOMString size error`,2);var ye=_e.HIERARCHY_REQUEST_ERR=(ve[3]=`Hierarchy request error`,3);_e.WRONG_DOCUMENT_ERR=(ve[4]=`Wrong document`,4),_e.INVALID_CHARACTER_ERR=(ve[5]=`Invalid character`,5),_e.NO_DATA_ALLOWED_ERR=(ve[6]=`No data allowed`,6),_e.NO_MODIFICATION_ALLOWED_ERR=(ve[7]=`No modification allowed`,7);var be=_e.NOT_FOUND_ERR=(ve[8]=`Not found`,8);_e.NOT_SUPPORTED_ERR=(ve[9]=`Not supported`,9);var xe=_e.INUSE_ATTRIBUTE_ERR=(ve[10]=`Attribute in use`,10);_e.INVALID_STATE_ERR=(ve[11]=`Invalid state`,11),_e.SYNTAX_ERR=(ve[12]=`Syntax error`,12),_e.INVALID_MODIFICATION_ERR=(ve[13]=`Invalid modification`,13),_e.NAMESPACE_ERR=(ve[14]=`Invalid namespace`,14),_e.INVALID_ACCESS_ERR=(ve[15]=`Invalid access`,15);function Se(L,J){if(J instanceof Error)var Y=J;else Y=this,Error.call(this,ve[L]),this.message=ve[L],Error.captureStackTrace&&Error.captureStackTrace(this,Se);return Y.code=L,J&&(this.message=this.message+`: `+J),Y}Se.prototype=Error.prototype,ne(_e,Se);function Ce(){}Ce.prototype={length:0,item:function(L){return L>=0&&L<this.length?this[L]:null},toString:function(L,J){for(var Y=[],X=0;X<this.length;X++)mt(this[X],Y,L,J);return Y.join(``)},filter:function(L){return Array.prototype.filter.call(this,L)},indexOf:function(L){return Array.prototype.indexOf.call(this,L)}};function we(L,J){this._node=L,this._refresh=J,Te(this)}function Te(L){var J=L._node._inc||L._node.ownerDocument._inc;if(L._inc!==J){var Y=L._refresh(L._node);if(_t(L,`length`,Y.length),!L.$$length||Y.length<L.$$length)for(var X=Y.length;X in L;X++)Object.prototype.hasOwnProperty.call(L,X)&&delete L[X];ne(Y,L),L._inc=J}}we.prototype.item=function(L){return Te(this),this[L]||null},re(we,Ce);function Ee(){}function De(L,J){for(var Y=L.length;Y--;)if(L[Y]===J)return Y}function Oe(L,J,Y,X){if(X?J[De(J,X)]=Y:J[J.length++]=Y,L){Y.ownerElement=L;var Z=L.ownerDocument;Z&&(X&&Ie(Z,L,X),Fe(Z,L,Y))}}function ke(L,J,Y){var X=De(J,Y);if(X>=0){for(var Z=J.length-1;X<Z;)J[X]=J[++X];if(J.length=Z,L){var Q=L.ownerDocument;Q&&(Ie(Q,L,Y),Y.ownerElement=null)}}else throw new Se(be,Error(L.tagName+`@`+Y))}Ee.prototype={length:0,item:Ce.prototype.item,getNamedItem:function(L){for(var J=this.length;J--;){var Y=this[J];if(Y.nodeName==L)return Y}},setNamedItem:function(L){var J=L.ownerElement;if(J&&J!=this._ownerElement)throw new Se(xe);var Y=this.getNamedItem(L.nodeName);return Oe(this._ownerElement,this,L,Y),Y},setNamedItemNS:function(L){var J=L.ownerElement,Y;if(J&&J!=this._ownerElement)throw new Se(xe);return Y=this.getNamedItemNS(L.namespaceURI,L.localName),Oe(this._ownerElement,this,L,Y),Y},removeNamedItem:function(L){var J=this.getNamedItem(L);return ke(this._ownerElement,this,J),J},removeNamedItemNS:function(L,J){var Y=this.getNamedItemNS(L,J);return ke(this._ownerElement,this,Y),Y},getNamedItemNS:function(L,J){for(var Y=this.length;Y--;){var X=this[Y];if(X.localName==J&&X.namespaceURI==L)return X}return null}};function Ae(){}Ae.prototype={hasFeature:function(L,J){return!0},createDocument:function(L,J,Y){var X=new Pe;if(X.implementation=this,X.childNodes=new Ce,X.doctype=Y||null,Y&&X.appendChild(Y),J){var Z=X.createElementNS(L,J);X.appendChild(Z)}return X},createDocumentType:function(L,J,Y){var X=new it;return X.name=L,X.nodeName=L,X.publicId=J||``,X.systemId=Y||``,X}};function je(){}je.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(L,J){return Ye(this,L,J)},replaceChild:function(L,J){Ye(this,L,J,Je),J&&this.removeChild(J)},removeChild:function(L){return Re(this,L)},appendChild:function(L){return this.insertBefore(L,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(L){return gt(this.ownerDocument||this,this,L)},normalize:function(){for(var L=this.firstChild;L;){var J=L.nextSibling;J&&J.nodeType==se&&L.nodeType==se?(this.removeChild(J),L.appendData(J.data)):(L.normalize(),L=J)}},isSupported:function(L,J){return this.ownerDocument.implementation.hasFeature(L,J)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(L){for(var J=this;J;){var Y=J._nsMap;if(Y){for(var X in Y)if(Object.prototype.hasOwnProperty.call(Y,X)&&Y[X]===L)return X}J=J.nodeType==oe?J.ownerDocument:J.parentNode}return null},lookupNamespaceURI:function(L){for(var J=this;J;){var Y=J._nsMap;if(Y&&Object.prototype.hasOwnProperty.call(Y,L))return Y[L];J=J.nodeType==oe?J.ownerDocument:J.parentNode}return null},isDefaultNamespace:function(L){return this.lookupPrefix(L)==null}};function Me(L){return L==`<`&&`&lt;`||L==`>`&&`&gt;`||L==`&`&&`&amp;`||L==`"`&&`&quot;`||`&#`+L.charCodeAt()+`;`}ne(ie,je),ne(ie,je.prototype);function Ne(L,J){if(J(L))return!0;if(L=L.firstChild)do if(Ne(L,J))return!0;while(L=L.nextSibling)}function Pe(){this.ownerDocument=this}function Fe(L,J,Y){L&&L._inc++,Y.namespaceURI===X.XMLNS&&(J._nsMap[Y.prefix?Y.localName:``]=Y.value)}function Ie(L,J,Y,Z){L&&L._inc++,Y.namespaceURI===X.XMLNS&&delete J._nsMap[Y.prefix?Y.localName:``]}function Le(L,J,Y){if(L&&L._inc){L._inc++;var X=J.childNodes;if(Y)X[X.length++]=Y;else{for(var Z=J.firstChild,Q=0;Z;)X[Q++]=Z,Z=Z.nextSibling;X.length=Q,delete X[X.length]}}}function Re(L,J){var Y=J.previousSibling,X=J.nextSibling;return Y?Y.nextSibling=X:L.firstChild=X,X?X.previousSibling=Y:L.lastChild=Y,J.parentNode=null,J.previousSibling=null,J.nextSibling=null,Le(L.ownerDocument,L),J}function ze(L){return L&&(L.nodeType===je.DOCUMENT_NODE||L.nodeType===je.DOCUMENT_FRAGMENT_NODE||L.nodeType===je.ELEMENT_NODE)}function Be(L){return L&&(He(L)||Ue(L)||Ve(L)||L.nodeType===je.DOCUMENT_FRAGMENT_NODE||L.nodeType===je.COMMENT_NODE||L.nodeType===je.PROCESSING_INSTRUCTION_NODE)}function Ve(L){return L&&L.nodeType===je.DOCUMENT_TYPE_NODE}function He(L){return L&&L.nodeType===je.ELEMENT_NODE}function Ue(L){return L&&L.nodeType===je.TEXT_NODE}function We(L,J){var X=L.childNodes||[];if(Y(X,He)||Ve(J))return!1;var Z=Y(X,Ve);return!(J&&Z&&X.indexOf(Z)>X.indexOf(J))}function Ge(L,J){var X=L.childNodes||[];function Z(L){return He(L)&&L!==J}if(Y(X,Z))return!1;var Q=Y(X,Ve);return!(J&&Q&&X.indexOf(Q)>X.indexOf(J))}function Ke(L,J,Y){if(!ze(L))throw new Se(ye,`Unexpected parent node type `+L.nodeType);if(Y&&Y.parentNode!==L)throw new Se(be,`child not in parent`);if(!Be(J)||Ve(J)&&L.nodeType!==je.DOCUMENT_NODE)throw new Se(ye,`Unexpected node type `+J.nodeType+` for parent node type `+L.nodeType)}function qe(L,J,X){var Z=L.childNodes||[],Q=J.childNodes||[];if(J.nodeType===je.DOCUMENT_FRAGMENT_NODE){var $=Q.filter(He);if($.length>1||Y(Q,Ue))throw new Se(ye,`More than one element or text in fragment`);if($.length===1&&!We(L,X))throw new Se(ye,`Element in fragment can not be inserted before doctype`)}if(He(J)&&!We(L,X))throw new Se(ye,`Only one element can be added and only after doctype`);if(Ve(J)){if(Y(Z,Ve))throw new Se(ye,`Only one doctype is allowed`);var ee=Y(Z,He);if(X&&Z.indexOf(ee)<Z.indexOf(X))throw new Se(ye,`Doctype can only be inserted before an element`);if(!X&&ee)throw new Se(ye,`Doctype can not be appended since element is present`)}}function Je(L,J,X){var Z=L.childNodes||[],Q=J.childNodes||[];if(J.nodeType===je.DOCUMENT_FRAGMENT_NODE){var $=Q.filter(He);if($.length>1||Y(Q,Ue))throw new Se(ye,`More than one element or text in fragment`);if($.length===1&&!Ge(L,X))throw new Se(ye,`Element in fragment can not be inserted before doctype`)}if(He(J)&&!Ge(L,X))throw new Se(ye,`Only one element can be added and only after doctype`);if(Ve(J)){function L(L){return Ve(L)&&L!==X}if(Y(Z,L))throw new Se(ye,`Only one doctype is allowed`);var ee=Y(Z,He);if(X&&Z.indexOf(ee)<Z.indexOf(X))throw new Se(ye,`Doctype can only be inserted before an element`)}}function Ye(L,J,Y,X){Ke(L,J,Y),L.nodeType===je.DOCUMENT_NODE&&(X||qe)(L,J,Y);var Z=J.parentNode;if(Z&&Z.removeChild(J),J.nodeType===he){var Q=J.firstChild;if(Q==null)return J;var $=J.lastChild}else Q=$=J;var ee=Y?Y.previousSibling:L.lastChild;Q.previousSibling=ee,$.nextSibling=Y,ee?ee.nextSibling=Q:L.firstChild=Q,Y==null?L.lastChild=$:Y.previousSibling=$;do{Q.parentNode=L;var te=L.ownerDocument||L;Xe(Q,te)}while(Q!==$&&(Q=Q.nextSibling));return Le(L.ownerDocument||L,L),J.nodeType==he&&(J.firstChild=J.lastChild=null),J}function Xe(L,J){if(L.ownerDocument!==J){if(L.ownerDocument=J,L.nodeType===ae&&L.attributes)for(var Y=0;Y<L.attributes.length;Y++){var X=L.attributes.item(Y);X&&(X.ownerDocument=J)}for(var Z=L.firstChild;Z;)Xe(Z,J),Z=Z.nextSibling}}function Ze(L,J){return J.parentNode&&J.parentNode.removeChild(J),J.parentNode=L,J.previousSibling=L.lastChild,J.nextSibling=null,J.previousSibling?J.previousSibling.nextSibling=J:L.firstChild=J,L.lastChild=J,Le(L.ownerDocument,L,J),Xe(J,L.ownerDocument||L),J}Pe.prototype={nodeName:`#document`,nodeType:pe,doctype:null,documentElement:null,_inc:1,insertBefore:function(L,J){if(L.nodeType==he){for(var Y=L.firstChild;Y;){var X=Y.nextSibling;this.insertBefore(Y,J),Y=X}return L}return Ye(this,L,J),Xe(L,this),this.documentElement===null&&L.nodeType===ae&&(this.documentElement=L),L},removeChild:function(L){return this.documentElement==L&&(this.documentElement=null),Re(this,L)},replaceChild:function(L,J){Ye(this,L,J,Je),Xe(L,this),J&&this.removeChild(J),He(L)&&(this.documentElement=L)},importNode:function(L,J){return ht(this,L,J)},getElementById:function(L){var J=null;return Ne(this.documentElement,function(Y){if(Y.nodeType==ae&&Y.getAttribute(`id`)==L)return J=Y,!0}),J},getElementsByClassName:function(L){var J=ee(L);return new we(this,function(Y){var X=[];return J.length>0&&Ne(Y.documentElement,function(Z){if(Z!==Y&&Z.nodeType===ae){var Q=Z.getAttribute(`class`);if(Q){var $=L===Q;if(!$){var ne=ee(Q);$=J.every(te(ne))}$&&X.push(Z)}}}),X})},createElement:function(L){var J=new Qe;J.ownerDocument=this,J.nodeName=L,J.tagName=L,J.localName=L,J.childNodes=new Ce;var Y=J.attributes=new Ee;return Y._ownerElement=J,J},createDocumentFragment:function(){var L=new ct;return L.ownerDocument=this,L.childNodes=new Ce,L},createTextNode:function(L){var J=new tt;return J.ownerDocument=this,J.appendData(L),J},createComment:function(L){var J=new nt;return J.ownerDocument=this,J.appendData(L),J},createCDATASection:function(L){var J=new rt;return J.ownerDocument=this,J.appendData(L),J},createProcessingInstruction:function(L,J){var Y=new lt;return Y.ownerDocument=this,Y.tagName=Y.nodeName=Y.target=L,Y.nodeValue=Y.data=J,Y},createAttribute:function(L){var J=new $e;return J.ownerDocument=this,J.name=L,J.nodeName=L,J.localName=L,J.specified=!0,J},createEntityReference:function(L){var J=new st;return J.ownerDocument=this,J.nodeName=L,J},createElementNS:function(L,J){var Y=new Qe,X=J.split(`:`),Z=Y.attributes=new Ee;return Y.childNodes=new Ce,Y.ownerDocument=this,Y.nodeName=J,Y.tagName=J,Y.namespaceURI=L,X.length==2?(Y.prefix=X[0],Y.localName=X[1]):Y.localName=J,Z._ownerElement=Y,Y},createAttributeNS:function(L,J){var Y=new $e,X=J.split(`:`);return Y.ownerDocument=this,Y.nodeName=J,Y.name=J,Y.namespaceURI=L,Y.specified=!0,X.length==2?(Y.prefix=X[0],Y.localName=X[1]):Y.localName=J,Y}},re(Pe,je);function Qe(){this._nsMap={}}Qe.prototype={nodeType:ae,hasAttribute:function(L){return this.getAttributeNode(L)!=null},getAttribute:function(L){var J=this.getAttributeNode(L);return J&&J.value||``},getAttributeNode:function(L){return this.attributes.getNamedItem(L)},setAttribute:function(L,J){var Y=this.ownerDocument.createAttribute(L);Y.value=Y.nodeValue=``+J,this.setAttributeNode(Y)},removeAttribute:function(L){var J=this.getAttributeNode(L);J&&this.removeAttributeNode(J)},appendChild:function(L){return L.nodeType===he?this.insertBefore(L,null):Ze(this,L)},setAttributeNode:function(L){return this.attributes.setNamedItem(L)},setAttributeNodeNS:function(L){return this.attributes.setNamedItemNS(L)},removeAttributeNode:function(L){return this.attributes.removeNamedItem(L.nodeName)},removeAttributeNS:function(L,J){var Y=this.getAttributeNodeNS(L,J);Y&&this.removeAttributeNode(Y)},hasAttributeNS:function(L,J){return this.getAttributeNodeNS(L,J)!=null},getAttributeNS:function(L,J){var Y=this.getAttributeNodeNS(L,J);return Y&&Y.value||``},setAttributeNS:function(L,J,Y){var X=this.ownerDocument.createAttributeNS(L,J);X.value=X.nodeValue=``+Y,this.setAttributeNode(X)},getAttributeNodeNS:function(L,J){return this.attributes.getNamedItemNS(L,J)},getElementsByTagName:function(L){return new we(this,function(J){var Y=[];return Ne(J,function(X){X!==J&&X.nodeType==ae&&(L===`*`||X.tagName==L)&&Y.push(X)}),Y})},getElementsByTagNameNS:function(L,J){return new we(this,function(Y){var X=[];return Ne(Y,function(Z){Z!==Y&&Z.nodeType===ae&&(L===`*`||Z.namespaceURI===L)&&(J===`*`||Z.localName==J)&&X.push(Z)}),X})}},Pe.prototype.getElementsByTagName=Qe.prototype.getElementsByTagName,Pe.prototype.getElementsByTagNameNS=Qe.prototype.getElementsByTagNameNS,re(Qe,je);function $e(){}$e.prototype.nodeType=oe,re($e,je);function et(){}et.prototype={data:``,substringData:function(L,J){return this.data.substring(L,L+J)},appendData:function(L){L=this.data+L,this.nodeValue=this.data=L,this.length=L.length},insertData:function(L,J){this.replaceData(L,0,J)},appendChild:function(L){throw Error(ve[ye])},deleteData:function(L,J){this.replaceData(L,J,``)},replaceData:function(L,J,Y){var X=this.data.substring(0,L),Z=this.data.substring(L+J);Y=X+Y+Z,this.nodeValue=this.data=Y,this.length=Y.length}},re(et,je);function tt(){}tt.prototype={nodeName:`#text`,nodeType:se,splitText:function(L){var J=this.data,Y=J.substring(L);J=J.substring(0,L),this.data=this.nodeValue=J,this.length=J.length;var X=this.ownerDocument.createTextNode(Y);return this.parentNode&&this.parentNode.insertBefore(X,this.nextSibling),X}},re(tt,et);function nt(){}nt.prototype={nodeName:`#comment`,nodeType:fe},re(nt,et);function rt(){}rt.prototype={nodeName:`#cdata-section`,nodeType:ce},re(rt,et);function it(){}it.prototype.nodeType=me,re(it,je);function at(){}at.prototype.nodeType=ge,re(at,je);function ot(){}ot.prototype.nodeType=ue,re(ot,je);function st(){}st.prototype.nodeType=le,re(st,je);function ct(){}ct.prototype.nodeName=`#document-fragment`,ct.prototype.nodeType=he,re(ct,je);function lt(){}lt.prototype.nodeType=de,re(lt,je);function ut(){}ut.prototype.serializeToString=function(L,J,Y){return dt.call(L,J,Y)},je.prototype.toString=dt;function dt(L,J){var Y=[],X=this.nodeType==9&&this.documentElement||this,Z=X.prefix,Q=X.namespaceURI;if(Q&&Z==null){var Z=X.lookupPrefix(Q);if(Z==null)var $=[{namespace:Q,prefix:null}]}return mt(this,Y,L,J,$),Y.join(``)}function ft(L,J,Y){var Z=L.prefix||``,Q=L.namespaceURI;if(!Q||Z===`xml`&&Q===X.XML||Q===X.XMLNS)return!1;for(var $=Y.length;$--;){var ee=Y[$];if(ee.prefix===Z)return ee.namespace!==Q}return!0}function pt(L,J,Y){L.push(` `,J,`="`,Y.replace(/[<>&"\t\n\r]/g,Me),`"`)}function mt(L,J,Y,Z,Q){if(Q||=[],Z)if(L=Z(L),L){if(typeof L==`string`){J.push(L);return}}else return;switch(L.nodeType){case ae:var $=L.attributes,ee=$.length,te=L.firstChild,ne=L.tagName;Y=X.isHTML(L.namespaceURI)||Y;var re=ne;if(!Y&&!L.prefix&&L.namespaceURI){for(var ie,ue=0;ue<$.length;ue++)if($.item(ue).name===`xmlns`){ie=$.item(ue).value;break}if(!ie)for(var ge=Q.length-1;ge>=0;ge--){var _e=Q[ge];if(_e.prefix===``&&_e.namespace===L.namespaceURI){ie=_e.namespace;break}}if(ie!==L.namespaceURI)for(var ge=Q.length-1;ge>=0;ge--){var _e=Q[ge];if(_e.namespace===L.namespaceURI){_e.prefix&&(re=_e.prefix+`:`+ne);break}}}J.push(`<`,re);for(var ve=0;ve<ee;ve++){var ye=$.item(ve);ye.prefix==`xmlns`?Q.push({prefix:ye.localName,namespace:ye.value}):ye.nodeName==`xmlns`&&Q.push({prefix:``,namespace:ye.value})}for(var ve=0;ve<ee;ve++){var ye=$.item(ve);if(ft(ye,Y,Q)){var be=ye.prefix||``,xe=ye.namespaceURI;pt(J,be?`xmlns:`+be:`xmlns`,xe),Q.push({prefix:be,namespace:xe})}mt(ye,J,Y,Z,Q)}if(ne===re&&ft(L,Y,Q)){var be=L.prefix||``,xe=L.namespaceURI;pt(J,be?`xmlns:`+be:`xmlns`,xe),Q.push({prefix:be,namespace:xe})}if(te||Y&&!/^(?:meta|link|img|br|hr|input)$/i.test(ne)){if(J.push(`>`),Y&&/^script$/i.test(ne))for(;te;)te.data?J.push(te.data):mt(te,J,Y,Z,Q.slice()),te=te.nextSibling;else for(;te;)mt(te,J,Y,Z,Q.slice()),te=te.nextSibling;J.push(`</`,re,`>`)}else J.push(`/>`);return;case pe:case he:for(var te=L.firstChild;te;)mt(te,J,Y,Z,Q.slice()),te=te.nextSibling;return;case oe:return pt(J,L.name,L.value);case se:return J.push(L.data.replace(/[<&>]/g,Me));case ce:return J.push(`<![CDATA[`,L.data,`]]>`);case fe:return J.push(`<!--`,L.data,`-->`);case me:var Se=L.publicId,Ce=L.systemId;if(J.push(`<!DOCTYPE `,L.name),Se)J.push(` PUBLIC `,Se),Ce&&Ce!=`.`&&J.push(` `,Ce),J.push(`>`);else if(Ce&&Ce!=`.`)J.push(` SYSTEM `,Ce,`>`);else{var we=L.internalSubset;we&&J.push(` [`,we,`]`),J.push(`>`)}return;case de:return J.push(`<?`,L.target,` `,L.data,`?>`);case le:return J.push(`&`,L.nodeName,`;`);default:J.push(`??`,L.nodeName)}}function ht(L,J,Y){var X;switch(J.nodeType){case ae:X=J.cloneNode(!1),X.ownerDocument=L;case he:break;case oe:Y=!0;break}if(X||=J.cloneNode(!1),X.ownerDocument=L,X.parentNode=null,Y)for(var Z=J.firstChild;Z;)X.appendChild(ht(L,Z,Y)),Z=Z.nextSibling;return X}function gt(L,J,Y){var X=new J.constructor;for(var Z in J)if(Object.prototype.hasOwnProperty.call(J,Z)){var Q=J[Z];typeof Q!=`object`&&Q!=X[Z]&&(X[Z]=Q)}switch(J.childNodes&&(X.childNodes=new Ce),X.ownerDocument=L,X.nodeType){case ae:var $=J.attributes,ee=X.attributes=new Ee,te=$.length;ee._ownerElement=X;for(var ne=0;ne<te;ne++)X.setAttributeNode(gt(L,$.item(ne),!0));break;case oe:Y=!0}if(Y)for(var re=J.firstChild;re;)X.appendChild(gt(L,re,Y)),re=re.nextSibling;return X}function _t(L,J,Y){L[J]=Y}try{if(Object.defineProperty){Object.defineProperty(we.prototype,`length`,{get:function(){return Te(this),this.$$length}}),Object.defineProperty(je.prototype,`textContent`,{get:function(){return L(this)},set:function(L){switch(this.nodeType){case ae:case he:for(;this.firstChild;)this.removeChild(this.firstChild);(L||String(L))&&this.appendChild(this.ownerDocument.createTextNode(L));break;default:this.data=L,this.value=L,this.nodeValue=L}}});function L(J){switch(J.nodeType){case ae:case he:var Y=[];for(J=J.firstChild;J;)J.nodeType!==7&&J.nodeType!==8&&Y.push(L(J)),J=J.nextSibling;return Y.join(``);default:return J.nodeValue}}_t=function(L,J,Y){L[`$$`+J]=Y}}}catch{}L.DocumentType=it,L.DOMException=Se,L.DOMImplementation=Ae,L.Element=Qe,L.Node=je,L.NodeList=Ce,L.XMLSerializer=ut})),require_entities$1=__commonJSMin((L=>{var J=require_conventions$1().freeze;L.XML_ENTITIES=J({amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`}),L.HTML_ENTITIES=J({Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:`∾̳`,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:`⁡`,Afr:`𝔄`,afr:`𝔞`,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,AMP:`&`,amp:`&`,And:`⩓`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:`𝔸`,aopf:`𝕒`,ap:`≈`,apacir:`⩯`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`'`,ApplyFunction:`⁡`,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:`𝒜`,ascr:`𝒶`,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,Barwed:`⌆`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,Because:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:`𝔅`,bfr:`𝔟`,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bNot:`⫭`,bnot:`⌐`,Bopf:`𝔹`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxDL:`╗`,boxDl:`╖`,boxdL:`╕`,boxdl:`┐`,boxDR:`╔`,boxDr:`╓`,boxdR:`╒`,boxdr:`┌`,boxH:`═`,boxh:`─`,boxHD:`╦`,boxHd:`╤`,boxhD:`╥`,boxhd:`┬`,boxHU:`╩`,boxHu:`╧`,boxhU:`╨`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxUL:`╝`,boxUl:`╜`,boxuL:`╛`,boxul:`┘`,boxUR:`╚`,boxUr:`╙`,boxuR:`╘`,boxur:`└`,boxV:`║`,boxv:`│`,boxVH:`╬`,boxVh:`╫`,boxvH:`╪`,boxvh:`┼`,boxVL:`╣`,boxVl:`╢`,boxvL:`╡`,boxvl:`┤`,boxVR:`╠`,boxVr:`╟`,boxvR:`╞`,boxvr:`├`,bprime:`‵`,Breve:`˘`,breve:`˘`,brvbar:`¦`,Bscr:`ℬ`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,Cap:`⋒`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,CenterDot:`·`,centerdot:`·`,Cfr:`ℭ`,cfr:`𝔠`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,cir:`○`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,Colon:`∷`,colon:`:`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,Conint:`∯`,conint:`∮`,ContourIntegral:`∮`,Copf:`ℂ`,copf:`𝕔`,coprod:`∐`,Coproduct:`∐`,COPY:`©`,copy:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,Cross:`⨯`,cross:`✗`,Cscr:`𝒞`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,Cup:`⋓`,cup:`∪`,cupbrcap:`⩈`,CupCap:`≍`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,Dagger:`‡`,dagger:`†`,daleth:`ℸ`,Darr:`↡`,dArr:`⇓`,darr:`↓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,DD:`ⅅ`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:`𝔇`,dfr:`𝔡`,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,Diamond:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:`𝔻`,dopf:`𝕕`,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,Downarrow:`⇓`,downarrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:`𝒟`,dscr:`𝒹`,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,ecir:`≖`,Ecirc:`Ê`,ecirc:`ê`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,eDot:`≑`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,Efr:`𝔈`,efr:`𝔢`,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp:` `,emsp13:` `,emsp14:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:`𝔼`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,Escr:`ℰ`,escr:`ℯ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,ExponentialE:`ⅇ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:`𝔉`,ffr:`𝔣`,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:`𝔽`,fopf:`𝕗`,ForAll:`∀`,forall:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,Fscr:`ℱ`,fscr:`𝒻`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,gE:`≧`,ge:`≥`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,Gfr:`𝔊`,gfr:`𝔤`,Gg:`⋙`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gl:`≷`,gla:`⪥`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gnE:`≩`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:`𝔾`,gopf:`𝕘`,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,Gt:`≫`,GT:`>`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,hArr:`⇔`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,Hfr:`ℌ`,hfr:`𝔥`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,Hopf:`ℍ`,hopf:`𝕙`,horbar:`―`,HorizontalLine:`─`,Hscr:`ℋ`,hscr:`𝒽`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:`⁣`,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,Ifr:`ℑ`,ifr:`𝔦`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Im:`ℑ`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,Int:`∬`,int:`∫`,intcal:`⊺`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:`𝕀`,iopf:`𝕚`,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,Iscr:`ℐ`,iscr:`𝒾`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:`𝔍`,jfr:`𝔧`,jmath:`ȷ`,Jopf:`𝕁`,jopf:`𝕛`,Jscr:`𝒥`,jscr:`𝒿`,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:`𝔎`,kfr:`𝔨`,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:`𝕂`,kopf:`𝕜`,Kscr:`𝒦`,kscr:`𝓀`,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,Lang:`⟪`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,Larr:`↞`,lArr:`⇐`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,lAtail:`⤛`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lBarr:`⤎`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,lE:`≦`,le:`≤`,LeftAngleBracket:`⟨`,LeftArrow:`←`,Leftarrow:`⇐`,leftarrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:`𝔏`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,Ll:`⋘`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lnE:`≨`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftarrow:`⟵`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longleftrightarrow:`⟷`,longmapsto:`⟼`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:`𝕃`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,Lscr:`ℒ`,lscr:`𝓁`,Lsh:`↰`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,Lt:`≪`,LT:`<`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:`𝕄`,mopf:`𝕞`,mp:`∓`,Mscr:`ℳ`,mscr:`𝓂`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,ne:`≠`,nearhk:`⤤`,neArr:`⇗`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
@@ -45841,5 +45841,5 @@ ${JSON.stringify(Z,null,2)}`),Error(`Language.load failed: no language function
45841
45841
  `)+(J.length>0?`
45842
45842
  `:``)}L.build=J;function Y(L){let J=L.key;if(L.conditions)for(let Y of L.conditions)J+=X(Y);return`${J} = ${L.value}`}function X(L){let J=[];return L.sdk&&J.push(`[sdk=${L.sdk}]`),L.arch&&J.push(`[arch=${L.arch}]`),L.config&&J.push(`[config=${L.config}]`),J.join(``)}})),require_types$1=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0})})),require_xcconfig=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__exportStar||function(L,Y){for(var X in L)X!==`default`&&!Object.prototype.hasOwnProperty.call(Y,X)&&J(Y,L,X)};Object.defineProperty(L,`__esModule`,{value:!0}),L.flattenBuildSettings=L.build=L.parseFile=L.parse=void 0;var X=require_parser$1();Object.defineProperty(L,`parse`,{enumerable:!0,get:function(){return X.parse}}),Object.defineProperty(L,`parseFile`,{enumerable:!0,get:function(){return X.parseFile}});var Z=require_writer$1();Object.defineProperty(L,`build`,{enumerable:!0,get:function(){return Z.build}}),Y(require_types$1(),L);function Q(L,J={}){let Y={};for(let X of L.includes)if(X.config){let L=Q(X.config,J);Object.assign(Y,L)}for(let X of L.buildSettings)if($(X.conditions,J)){let L=te(X.value,X.key,Y);Y[X.key]=L}return Y}L.flattenBuildSettings=Q;function $(L,J){return!L||L.length===0?!0:L.every(L=>!(L.sdk&&(!J.sdk||!ee(J.sdk,L.sdk))||L.arch&&(!J.arch||!ee(J.arch,L.arch))||L.config&&(!J.config||!ee(J.config,L.config))))}function ee(L,J){let Y=J.replace(/[.+^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`);return RegExp(`^${Y}$`,`i`).test(L)}function te(L,J,Y){let X=/\$\(inherited\)/gi;if(!X.test(L))return L;let Z=Y[J]??``;return L.replace(X,Z)}})),require_XCBuildConfiguration=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCBuildConfiguration=void 0;let Q=Z(__require$1(`node:path`)),$=Z(__require$1(`node:os`)),ee=Z(__require$1(`node:fs`)),te=Z(require_build$1()),ne=require_array(),re=X(require_types$5()),ie=require_AbstractObject(),ae=require_resolveBuildSettings(),oe=X(require_xcconfig()),se=require_src$1()(`xcode:XCBuildConfiguration`);var ce=class L extends ie.AbstractObject{static is(J){return J.isa===L.isa}static create(L,J){return L.createModel({isa:re.ISA.XCBuildConfiguration,...J})}resolveFilePath(L){let J=this.resolveBuildSetting(L);if(J==null||typeof J!=`string`)return null;let Y=this.getXcodeProject().getProjectRoot();return Q.default.join(Y,J)}getEntitlementsFilePath(){return this.resolveFilePath(`CODE_SIGN_ENTITLEMENTS`)}getEntitlements(){let L=this.getEntitlementsFilePath();return L?te.default.parse(ee.default.readFileSync(L,`utf8`)):null}getInfoPlistFilePath(){return this.resolveFilePath(`INFOPLIST_FILE`)}getInfoPlist(){let L=this.getInfoPlistFilePath();return L?te.default.parse(ee.default.readFileSync(L,`utf8`)):null}getTargetReferrers(){let L=this.getReferrers().filter(L=>L.isa===re.ISA.XCConfigurationList).map(L=>L.getReferrers().filter(L=>L.isa===re.ISA.PBXNativeTarget)).flat();return(0,ne.uniqueBy)(L,L=>L.uuid)}resolveBuildSetting(L){let J=J=>{if(!(J in this.props.buildSettings)){if(process.env[J]!=null)return se(`Using environment variable substitution for "%s"`,J),process.env[J];if(J in le)return se(`Dangerously using estimated default Apple build variable substitution for "%s"`,J),le[J];if(J===`TARGET_NAME`){let Y=this.getTargetReferrers();if(Y.length>0)return Y.length>1&&console.warn(`[XCBuildConfiguration][${this.props.name}]: Multiple targets found for build setting "${L}". Using first target "${Y[0].props.name}". Possible targets: ${Y.map(L=>L.getDisplayName()).join(`, `)}`),Y[0].props.name;console.warn(`[XCBuildConfiguration][${this.props.name}]: Issue resolving special build setting "${L}". Substitute value "${J}" not found in build settings, environment variables, or from a referring PBXNativeTarget.`)}else console.warn(`[XCBuildConfiguration][${this.props.name}]: Issue resolving build setting "${L}". Substitute value "${J}" not found in build settings.`)}return Array.isArray(J)&&console.warn(`[XCBuildConfiguration][${this.props.name}]: Issue resolving build setting "${L}". Substitute value "${J}" is of type array––it's not clear how this should be resolved in a string.`),this.props.buildSettings[J]},Y=this.props.buildSettings[L];return typeof Y==`string`?(0,ae.resolveXcodeBuildSetting)(Y,J):Array.isArray(Y)?Y.map(L=>(0,ae.resolveXcodeBuildSetting)(L,J)):Y}getObjectProps(){return{baseConfigurationReference:String}}getBaseConfigurationFilePath(){let L=this.props.baseConfigurationReference;if(!L)return null;let J=L.props.path;if(!J)return null;let Y=this.getXcodeProject().getProjectRoot(),X=L.props.sourceTree;return X===`<group>`||X===`SOURCE_ROOT`?Q.default.join(Y,J):X===`<absolute>`||Q.default.isAbsolute(J)?J:Q.default.join(Y,J)}getBaseConfiguration(){let L=this.getBaseConfigurationFilePath();if(!L||!ee.default.existsSync(L))return null;try{return oe.parseFile(L)}catch(L){return se(`Failed to parse base configuration: %s`,L),null}}getBaseConfigurationSettings(L){let J=this.getBaseConfiguration();return J?oe.flattenBuildSettings(J,L):{}}};L.XCBuildConfiguration=ce,ce.isa=re.ISA.XCBuildConfiguration;let le={HOME:$.default.homedir(),SYSTEM_APPS_DIR:`/Applications`,SYSTEM_ADMIN_APPS_DIR:`/Applications/Utilities`,SYSTEM_DEMOS_DIR:`/Applications/Extras`,SYSTEM_DEVELOPER_DIR:`/Applications/Xcode.app/Contents/Developer`,SYSTEM_DEVELOPER_APPS_DIR:`/Applications/Xcode.app/Contents/Applications`,SYSTEM_DEVELOPER_JAVA_TOOLS_DIR:`/Applications/Xcode.app/Contents/Applications/Java Tools`,SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR:`/Applications/Xcode.app/Contents/Applications/Performance Tools`,SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR:`/Applications/Xcode.app/Contents/Applications/Graphics Tools`,SYSTEM_DEVELOPER_UTILITIES_DIR:`/Applications/Xcode.app/Contents/Applications/Utilities`,SYSTEM_DEVELOPER_DEMOS_DIR:`/Applications/Xcode.app/Contents/Developer/Utilities/Built Examples`,SYSTEM_DEVELOPER_DOC_DIR:`/Applications/Xcode.app/Contents/Developer/ADC Reference Library`,SYSTEM_DEVELOPER_TOOLS_DOC_DIR:`/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools`,SYSTEM_DEVELOPER_RELEASENOTES_DIR:`/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes`,SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR:`/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools`,SYSTEM_LIBRARY_DIR:`/System/Library`,SYSTEM_CORE_SERVICES_DIR:`/System/Library/CoreServices`,SYSTEM_DOCUMENTATION_DIR:`/Library/Documentation`,LOCAL_ADMIN_APPS_DIR:`/Applications/Utilities`,LOCAL_APPS_DIR:`/Applications`,LOCAL_DEVELOPER_DIR:`/Library/Developer`,LOCAL_LIBRARY_DIR:`/Library`,USER_APPS_DIR:`$(HOME)/Applications`,USER_LIBRARY_DIR:`$(HOME)/Library`,MAN_PAGE_DIRECTORIES:`/usr/share/man`,SYSTEM_LIBRARY_EXECUTABLES_DIR:``,SYSTEM_DEVELOPER_EXECUTABLES_DIR:``,LOCAL_DEVELOPER_EXECUTABLES_DIR:``}})),require_XCConfigurationList=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCConfigurationList=void 0;let Z=X(require_types$5()),Q=require_AbstractObject();var $=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,defaultConfigurationIsVisible:0,...Y})}getObjectProps(){return{buildConfigurations:[String]}}getDefaultConfiguration(){let L=this.props.buildConfigurations.find(L=>L.props.name===this.props.defaultConfigurationName);if(!L)throw Error(`[XCConfigurationList][${this.uuid}]: ${this.props.defaultConfigurationName} not found in buildConfigurations. Available configurations: ${this.props.buildConfigurations.map(L=>`${L.props.name} (${L.uuid})`).join(`, `)})`);return L}setBuildSetting(L,J){return this.props.buildConfigurations.forEach(Y=>{Y.props.buildSettings[L]=J}),J}removeBuildSetting(L){this.props.buildConfigurations.forEach(J=>{delete J.props.buildSettings[L]})}getDefaultBuildSetting(L){return this.getDefaultConfiguration().props.buildSettings[L]}removeFromProject(){for(let L of[...this.props.buildConfigurations]){let J=L.getReferrers();J.length===1&&J[0].uuid===this.uuid&&L.removeFromProject()}return super.removeFromProject()}};L.XCConfigurationList=$,$.isa=Z.ISA.XCConfigurationList})),require_AbstractTarget=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.AbstractTarget=void 0;let J=require_AbstractObject(),Y=require_XCBuildConfiguration(),X=require_XCConfigurationList();L.AbstractTarget=class extends J.AbstractObject{createConfigurationList(L,J){let Z=J.map(L=>Y.XCBuildConfiguration.create(this.getXcodeProject(),L)),Q=X.XCConfigurationList.create(this.getXcodeProject(),{buildConfigurations:Z,...L});return this.props.buildConfigurationList=Q,Q}getDependencyForTarget(L){return this.props.dependencies.find(J=>{if(J.props.targetProxy.isRemote()){let Y=this.getXcodeProject().getReferenceForPath(L.getXcodeProject().filePath);if(Y){let X=Y.uuid;return J.props.targetProxy.props.remoteGlobalIDString===L.uuid&&J.props.targetProxy.props.containerPortal.uuid===X}}else return J.props.target.uuid===L.uuid;return!1})}createBuildPhase(L,J){let Y=this.getXcodeProject().createModel({isa:L.isa,...J});return this.props.buildPhases.push(Y),Y}getBuildPhase(L){return this.props.buildPhases.find(J=>L.is(J))??null}getObjectProps(){return{buildConfigurationList:String,dependencies:[String],buildPhases:[String]}}getDefaultConfiguration(){return this.props.buildConfigurationList.getDefaultConfiguration()}setBuildSetting(L,J){return this.props.buildConfigurationList.setBuildSetting(L,J)}removeBuildSetting(L){return this.props.buildConfigurationList.removeBuildSetting(L)}getDefaultBuildSetting(L){return this.props.buildConfigurationList.getDefaultBuildSetting(L)}getAttributes(){return this.getXcodeProject().rootObject.props.attributes.TargetAttributes?.[this.uuid]}}})),require_XCSwiftPackageProductDependency=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCSwiftPackageProductDependency=void 0;let Z=X(require_types$5()),Q=require_AbstractObject();var $=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{package:String}}getDisplayName(){return this.props.productName??super.getDisplayName()}};L.XCSwiftPackageProductDependency=$,$.isa=Z.ISA.XCSwiftPackageProductDependency})),require_PBXTargetDependency=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXTargetDependency=void 0;let Z=X(require_types$5()),Q=require_AbstractObject();var $=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{target:String,targetProxy:String}}getNativeTargetUuid(){if(this.props.target)return this.props.target.uuid;if(this.props.targetProxy)return this.props.targetProxy.props.remoteGlobalIDString;throw Error(`Expected target or target_proxy, from which to fetch a uuid for target '${this.getDisplayName()}'. Find and clear the PBXTargetDependency entry with uuid '${this.uuid}' in your .xcodeproj.`)}getDisplayName(){return this.props.name??this.props.target.props.name??this.props.targetProxy.props.remoteInfo??super.getDisplayName()}removeFromProject(){if(this.props.targetProxy){let L=this.props.targetProxy.getReferrers();L.length===1&&L[0].uuid===this.uuid&&this.props.targetProxy.removeFromProject()}return super.removeFromProject()}};L.PBXTargetDependency=$,$.isa=Z.ISA.PBXTargetDependency})),require_PBXNativeTarget=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXNativeTarget=void 0;let Z=X(require_types$5()),Q=require_AbstractTarget(),$=require_PBXSourcesBuildPhase(),ee=require_PBXFileReference(),te=require_PBXBuildFile(),ne=require_XCSwiftPackageProductDependency(),re=require_PBXTargetDependency(),ie=require_PBXContainerItemProxy();var ae=class L extends Q.AbstractTarget{static is(J){return J.isa===L.isa}static create(L,J){return L.createModel({isa:Z.ISA.PBXNativeTarget,buildPhases:[],buildRules:[],dependencies:[],...J})}getFrameworksBuildPhase(){return this.getBuildPhase($.PBXFrameworksBuildPhase)??this.createBuildPhase($.PBXFrameworksBuildPhase)}getHeadersBuildPhase(){return this.getBuildPhase($.PBXHeadersBuildPhase)??this.createBuildPhase($.PBXHeadersBuildPhase)}getSourcesBuildPhase(){return this.getBuildPhase($.PBXSourcesBuildPhase)??this.createBuildPhase($.PBXSourcesBuildPhase)}getResourcesBuildPhase(){return this.getBuildPhase($.PBXResourcesBuildPhase)??this.createBuildPhase($.PBXResourcesBuildPhase)}ensureFrameworks(L){let J=this.getXcodeProject().rootObject.getFrameworksGroup(),Y=L=>{let Y=L.endsWith(`.framework`)?L:L+`.framework`;for(let[,L]of this.getXcodeProject().entries())if(ee.PBXFileReference.is(L)&&L.props.lastKnownFileType===`wrapper.framework`&&L.props.sourceTree===`SDKROOT`&&L.props.name===Y)return J.props.children.find(J=>J.uuid===L.uuid)||J.props.children.push(L),L;return J.createFile({path:`System/Library/Frameworks/`+Y})};return L.map(L=>this.getFrameworksBuildPhase().ensureFile({fileRef:Y(L)}))}addDependency(L){let J=L.getXcodeProject().filePath===this.getXcodeProject().filePath,Y=this.getDependencyForTarget(L);if(Y){J||(Y.props.name=L.props.name);return}let X=ie.PBXContainerItemProxy.create(this.getXcodeProject(),{containerPortal:this.getXcodeProject().rootObject,proxyType:1,remoteGlobalIDString:L.uuid,remoteInfo:L.props.name});if(J)X.props.containerPortal=this.getXcodeProject().rootObject;else throw Error(`adding dependencies to subprojects is not yet supported. Please open an issue if you need this feature.`);let Z=re.PBXTargetDependency.create(this.getXcodeProject(),{target:L,targetProxy:X});this.props.dependencies.push(Z)}getCopyBuildPhaseForTarget(L){if(this.getXcodeProject().rootObject.getMainAppTarget(`ios`).uuid!==this.uuid)throw Error(`getCopyBuildPhaseForTarget can only be called on the main target`);let J=L.props.productType===`com.apple.product-type.application.on-demand-install-capable`?`Embed App Clips`:L.isWatchOSTarget()?`Embed Watch Content`:L.props.productType===`com.apple.product-type.extensionkit-extension`?`Embed ExtensionKit Extensions`:`Embed Foundation Extensions`,Y=this.props.buildPhases.find(L=>$.PBXCopyFilesBuildPhase.is(L)&&L.props.name===J);if(Y){let J=Y;return J.ensureDefaultsForTarget(L),J}let X=this.createBuildPhase($.PBXCopyFilesBuildPhase,{name:J,files:[]});return X.ensureDefaultsForTarget(L),X}isWatchOSTarget(){if(this.props.productType===`com.apple.product-type.application.watchapp`||this.props.productType===`com.apple.product-type.application.watchapp2`||this.props.productType===`com.apple.product-type.application.watchapp2-container`)return!0;if(this.props.productType===`com.apple.product-type.application`){let L=this.props.buildConfigurationList?.props.buildConfigurations?.[0]?.props.buildSettings;if(L&&L.SDKROOT===`watchos`)return!0}return!1}isWatchExtension(){return this.props.productType===`com.apple.product-type.watchkit-extension`||this.props.productType===`com.apple.product-type.watchkit2-extension`}getObjectProps(){return{...super.getObjectProps(),buildRules:[String],productReference:[String],packageProductDependencies:[String],fileSystemSynchronizedGroups:[String]}}removeFromProject(){let J=this.getXcodeProject(),Y=L=>{let J=L.getReferrers();return J.length===1&&J[0].uuid===this.uuid};for(let L of[...this.props.buildPhases])Y(L)&&L.removeFromProject();for(let L of[...this.props.buildRules])Y(L)&&L.removeFromProject();Y(this.props.buildConfigurationList)&&this.props.buildConfigurationList.removeFromProject();for(let L of[...this.props.dependencies])Y(L)&&L.removeFromProject();if(this.props.fileSystemSynchronizedGroups)for(let Y of[...this.props.fileSystemSynchronizedGroups])[...J.values()].some(J=>L.is(J)&&J.uuid!==this.uuid&&J.props.fileSystemSynchronizedGroups?.some(L=>L.uuid===Y.uuid))||Y.removeFromProject();if(this.props.packageProductDependencies)for(let L of[...this.props.packageProductDependencies])Y(L)&&L.removeFromProject();this.props.productReference&&([...J.values()].some(J=>L.is(J)&&J.uuid!==this.uuid&&J.props.productReference?.uuid===this.props.productReference?.uuid)||this.props.productReference.removeFromProject());for(let[,L]of J.entries())re.PBXTargetDependency.is(L)&&(L.props.target?.uuid===this.uuid||L.props.targetProxy?.props.remoteGlobalIDString===this.uuid)&&L.removeFromProject();return super.removeFromProject()}addSwiftPackageProduct(L){let J=this.getXcodeProject();this.props.packageProductDependencies||(this.props.packageProductDependencies=[]);let Y=this.props.packageProductDependencies.find(J=>J.props.productName===L.productName&&J.props.package?.uuid===L.package?.uuid);if(Y)return Y;let X=ne.XCSwiftPackageProductDependency.create(J,{productName:L.productName,package:L.package});this.props.packageProductDependencies.push(X);let Z=te.PBXBuildFile.createFromProductRef(J,{productRef:X});return this.getFrameworksBuildPhase().props.files.push(Z),X}getSwiftPackageProductDependencies(){return this.props.packageProductDependencies??[]}removeSwiftPackageProduct(L){if(this.props.packageProductDependencies){let J=this.props.packageProductDependencies.findIndex(J=>J.uuid===L.uuid);J!==-1&&this.props.packageProductDependencies.splice(J,1)}let J=this.getBuildPhase($.PBXFrameworksBuildPhase);if(J){let Y=J.props.files.findIndex(J=>J.props.productRef?.uuid===L.uuid);if(Y!==-1){let L=J.props.files[Y];J.props.files.splice(Y,1),L.removeFromProject()}}L.removeFromProject()}};L.PBXNativeTarget=ae,ae.isa=Z.ISA.PBXNativeTarget})),require_PBXAggregateTarget=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXAggregateTarget=void 0;let Z=X(require_types$5()),Q=require_AbstractTarget();var $=class L extends Q.AbstractTarget{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,buildPhases:[],dependencies:[],...Y})}};L.PBXAggregateTarget=$,$.isa=Z.ISA.PBXAggregateTarget})),require_PBXLegacyTarget=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXLegacyTarget=void 0;let Z=X(require_types$5()),Q=require_AbstractTarget();var $=class L extends Q.AbstractTarget{static is(J){return J.isa===L.isa}};L.PBXLegacyTarget=$,$.isa=Z.ISA.PBXLegacyTarget})),require_XCRemoteSwiftPackageReference=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCRemoteSwiftPackageReference=void 0;let Z=X(require_types$5()),Q=require_AbstractObject();var $=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{}}getDisplayName(){return this.props.repositoryURL??super.getDisplayName()}};L.XCRemoteSwiftPackageReference=$,$.isa=Z.ISA.XCRemoteSwiftPackageReference})),require_XCLocalSwiftPackageReference=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCLocalSwiftPackageReference=void 0;let Z=X(require_types$5()),Q=require_AbstractObject();var $=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{}}getDisplayName(){return this.props.relativePath??super.getDisplayName()}};L.XCLocalSwiftPackageReference=$,$.isa=Z.ISA.XCLocalSwiftPackageReference})),require_PBXProject=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXProject=void 0;let Q=Z(__require$1(`path`)),$=require_constants(),ee=X(require_types$5()),te=require_AbstractObject(),ne=require_PBXNativeTarget(),re=require_XCBuildConfiguration(),ie=require_XCRemoteSwiftPackageReference(),ae=require_XCLocalSwiftPackageReference();var oe=class L extends te.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{buildConfigurationList:String,mainGroup:String,productRefGroup:String,targets:[String],packageReferences:[String]}}setupDefaults(L){L.compatibilityVersion||=`Xcode 3.2`,L.developmentRegion||=`en`,L.hasScannedForEncodings||=0,L.knownRegions||=[`en`,`Base`],L.projectDirPath||=``,L.projectRoot||=``,L.attributes||={LastSwiftUpdateCheck:$.LAST_SWIFT_UPGRADE_CHECK,LastUpgradeCheck:$.LAST_UPGRADE_CHECK,TargetAttributes:{}}}addBuildConfiguration(L,J){let Y=this.props.buildConfigurationList,X=Y.props.buildConfigurations.find(J=>J.props.name===L);if(X)return X;let Z=re.XCBuildConfiguration.create(this.getXcodeProject(),{name:L,buildSettings:{...JSON.parse(JSON.stringify($.PROJECT_DEFAULT_BUILD_SETTINGS.all)),...JSON.parse(JSON.stringify($.PROJECT_DEFAULT_BUILD_SETTINGS[J]))}});return Y.props.buildConfigurations.push(Z),Z}getName(){return Q.default.basename(this.getXcodeProject().filePath,`.xcodeproj`)}ensureProductGroup(){if(this.props.productRefGroup)return this.props.productRefGroup;let L=this.props.mainGroup.createGroup({name:`Products`,sourceTree:`<group>`});return this.props.productRefGroup=L,L}ensureMainGroupChild(L){return this.props.mainGroup.getChildGroups().find(J=>J.getDisplayName()===L)??this.props.mainGroup.createGroup({name:L,sourceTree:`<group>`})}getFrameworksGroup(){return this.ensureMainGroupChild(`Frameworks`)}createNativeTarget(L){let J=ne.PBXNativeTarget.create(this.getXcodeProject(),L);return this.props.targets.push(J),J}getNativeTarget(L){for(let J of this.props.targets)if(ne.PBXNativeTarget.is(J)&&J.props.productType===L)return J;return null}getMainAppTarget(L=`ios`){let J={ios:`IPHONEOS_DEPLOYMENT_TARGET`,macos:`MACOSX_DEPLOYMENT_TARGET`,tvos:`TVOS_DEPLOYMENT_TARGET`,watchos:`WATCHOS_DEPLOYMENT_TARGET`}[L],Y=this.props.targets.filter(L=>ne.PBXNativeTarget.is(L)&&L.props.productType===`com.apple.product-type.application`),X=Y.filter(L=>J in L.getDefaultConfiguration().props.buildSettings);X.length>1&&console.warn(`Multiple main app targets found, using first one: ${X.map(L=>L.getDisplayName()).join(`, `)}`);let Z=X[0];if(!Z){if(L===`ios`&&Y.length)return Y[0];throw Error(`No main app target found`)}return Z}removeReference(L){super.removeReference(L),this.props.attributes?.TargetAttributes?.[L]&&delete this.props.attributes.TargetAttributes[L]}addPackageReference(L){return this.props.packageReferences||(this.props.packageReferences=[]),this.props.packageReferences.find(J=>J.uuid===L.uuid)||(this.props.packageReferences.push(L),L)}getPackageReference(L){if(!this.props.packageReferences)return null;for(let J of this.props.packageReferences)if(ie.XCRemoteSwiftPackageReference.is(J)&&J.props.repositoryURL===L||ae.XCLocalSwiftPackageReference.is(J)&&J.props.relativePath===L)return J;return null}addRemoteSwiftPackage(L){if(L.repositoryURL){let J=this.getPackageReference(L.repositoryURL);if(J&&ie.XCRemoteSwiftPackageReference.is(J))return J}let J=ie.XCRemoteSwiftPackageReference.create(this.getXcodeProject(),L);return this.addPackageReference(J),J}addLocalSwiftPackage(L){let J=this.getPackageReference(L.relativePath);if(J&&ae.XCLocalSwiftPackageReference.is(J))return J;let Y=ae.XCLocalSwiftPackageReference.create(this.getXcodeProject(),L);return this.addPackageReference(Y),Y}};L.PBXProject=oe,oe.isa=ee.ISA.PBXProject})),require_PBXBuildRule=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXBuildRule=void 0;let Z=X(require_types$5()),Q=require_AbstractObject();var $=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{inputFiles:[String],outputFiles:[String]}}setupDefaults(){this.props.isEditable??(this.props.isEditable=1)}addOutputFile(L,J=``){this.props.outputFiles||(this.props.outputFiles=[]),this.props.outputFiles.push(L),this.props.outputFilesCompilerFlags||(this.props.outputFilesCompilerFlags=[]),this.props.outputFilesCompilerFlags.push(J)}getOutputFilesAndFlags(){return ee(this.props.outputFiles,this.props.outputFilesCompilerFlags)}};L.PBXBuildRule=$,$.isa=Z.ISA.PBXBuildRule;function ee(L=[],J=[]){return L.map((L,Y)=>[L,J[Y]])}})),require_PBXReferenceProxy=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXReferenceProxy=void 0;let Z=X(require_types$5()),Q=require_AbstractObject(),$=require_PBXBuildFile();var ee=class L extends Q.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,sourceTree:`<group>`,...Y})}getObjectProps(){return{remoteRef:String}}removeFromProject(){return this.getBuildFiles().forEach(L=>{L.removeFromProject()}),super.removeFromProject()}getBuildFiles(){return this.getReferrers().filter($.PBXBuildFile.is)}};L.PBXReferenceProxy=ee,ee.isa=Z.ISA.PBXReferenceProxy})),require_XcodeProject=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.XcodeProject=void 0;let Q=Z(__require$1(`assert`)),$=__require$1(`fs`),ee=Z(__require$1(`path`)),te=Z(__require$1(`crypto`)),ne=require_XCScheme(),re=require_XCSharedData(),ie=require_json(),ae=X(require_types$5()),oe=require_constants(),se=require_src$1()(`xcparse:model:XcodeProject`);function ce(L){return`XX`+te.default.createHash(`md5`).update(L).digest(`hex`).toUpperCase().slice(0,20)+`XX`}let le={[ae.ISA.PBXBuildFile]:()=>require_PBXBuildFile().PBXBuildFile,[ae.ISA.PBXAppleScriptBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXAppleScriptBuildPhase,[ae.ISA.PBXCopyFilesBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXCopyFilesBuildPhase,[ae.ISA.PBXFrameworksBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXFrameworksBuildPhase,[ae.ISA.PBXHeadersBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXHeadersBuildPhase,[ae.ISA.PBXResourcesBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXResourcesBuildPhase,[ae.ISA.PBXShellScriptBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXShellScriptBuildPhase,[ae.ISA.PBXSourcesBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXSourcesBuildPhase,[ae.ISA.PBXContainerItemProxy]:()=>require_PBXContainerItemProxy().PBXContainerItemProxy,[ae.ISA.PBXFileReference]:()=>require_PBXFileReference().PBXFileReference,[ae.ISA.PBXGroup]:()=>require_AbstractGroup().PBXGroup,[ae.ISA.PBXVariantGroup]:()=>require_PBXVariantGroup().PBXVariantGroup,[ae.ISA.XCVersionGroup]:()=>require_XCVersionGroup().XCVersionGroup,[ae.ISA.PBXFileSystemSynchronizedRootGroup]:()=>require_PBXFileSystemSynchronizedRootGroup().PBXFileSystemSynchronizedRootGroup,[ae.ISA.PBXFileSystemSynchronizedBuildFileExceptionSet]:()=>require_PBXFileSystemSynchronizedBuildFileExceptionSet().PBXFileSystemSynchronizedBuildFileExceptionSet,[ae.ISA.PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet]:()=>require_PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet().PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet,[ae.ISA.PBXNativeTarget]:()=>require_PBXNativeTarget().PBXNativeTarget,[ae.ISA.PBXAggregateTarget]:()=>require_PBXAggregateTarget().PBXAggregateTarget,[ae.ISA.PBXLegacyTarget]:()=>require_PBXLegacyTarget().PBXLegacyTarget,[ae.ISA.PBXProject]:()=>require_PBXProject().PBXProject,[ae.ISA.PBXTargetDependency]:()=>require_PBXTargetDependency().PBXTargetDependency,[ae.ISA.XCBuildConfiguration]:()=>require_XCBuildConfiguration().XCBuildConfiguration,[ae.ISA.XCConfigurationList]:()=>require_XCConfigurationList().XCConfigurationList,[ae.ISA.PBXBuildRule]:()=>require_PBXBuildRule().PBXBuildRule,[ae.ISA.PBXReferenceProxy]:()=>require_PBXReferenceProxy().PBXReferenceProxy,[ae.ISA.PBXRezBuildPhase]:()=>require_PBXSourcesBuildPhase().PBXRezBuildPhase,[ae.ISA.XCSwiftPackageProductDependency]:()=>require_XCSwiftPackageProductDependency().XCSwiftPackageProductDependency,[ae.ISA.XCRemoteSwiftPackageReference]:()=>require_XCRemoteSwiftPackageReference().XCRemoteSwiftPackageReference,[ae.ISA.XCLocalSwiftPackageReference]:()=>require_XCLocalSwiftPackageReference().XCLocalSwiftPackageReference};L.XcodeProject=class L extends Map{static open(J){let Y=(0,$.readFileSync)(J,`utf8`);return new L(J,(0,ie.parse)(Y))}constructor(L,J){super(),this.filePath=L;let Y=JSON.parse(JSON.stringify(J));(0,Q.default)(Y.objects,`objects is required`),(0,Q.default)(Y.rootObject,`rootObject is required`),this.internalJsonObjects=Y.objects,this.archiveVersion=Y.archiveVersion??oe.LAST_KNOWN_ARCHIVE_VERSION,this.objectVersion=Y.objectVersion??oe.DEFAULT_OBJECT_VERSION,this.classes=Y.classes??{},ue(Y.rootObject,Y.objects?.[Y.rootObject]),this.rootObject=this.getObject(Y.rootObject),this.ensureAllObjectsInflated()}getProjectRoot(){return ee.default.dirname(ee.default.dirname(this.filePath))}getObject(L){let J=this._getObjectOptional(L);if(J)return J;throw Error(`object with uuid '${L}' not found.`)}_getObjectOptional(L){if(this.has(L))return this.get(L);let J=this.internalJsonObjects[L];if(!J)return null;delete this.internalJsonObjects[L];let Y=this.createObject(L,J);return this.set(L,Y),Y.inflate(),Y}createObject(L,J){let Y=le[J.isa]();return(0,Q.default)(Y,`unknown object type. (isa: ${J.isa}, uuid: ${L})`),new Y(this,L,J)}ensureAllObjectsInflated(){if(Object.keys(this.internalJsonObjects).length!==0)for(se(`inflating unreferenced objects: %o`,Object.keys(this.internalJsonObjects));Object.keys(this.internalJsonObjects).length>0;){let L=Object.keys(this.internalJsonObjects)[0];this.getObject(L)}}createModel(L){let J=this.getUniqueId(JSON.stringify(de(L))),Y=this.createObject(J,L);return this.set(J,Y),Y}getReferenceForPath(L){if(!ee.default.isAbsolute(L))throw Error(`Paths must be absolute ${L}`);for(let J of this.values())if(J.isa===`PBXFileReference`&&`getRealPath`in J&&J.getRealPath()===L)return J;return null}getReferrers(L){let J=[];for(let Y of this.values())Y.isReferencing(L)&&J.push(Y);return J}isUniqueId(L){for(let J of this.keys())if(J===L)return!1;return!0}getUniqueId(L){let J=ce(L);return this.isUniqueId(J)?J:this.getUniqueId(L+` `)}getSharedSchemesDir(){let L=ee.default.dirname(this.filePath);return ee.default.join(L,`xcshareddata`,`xcschemes`)}getUserSchemesDir(L){let J=ee.default.dirname(this.filePath);return ee.default.join(J,`xcuserdata`,`${L}.xcuserdatad`,`xcschemes`)}getSchemes(L){let J=[],Y=this.getSharedSchemesDir();if((0,$.existsSync)(Y)){let L=(0,$.readdirSync)(Y).filter(L=>L.endsWith(`.xcscheme`));for(let X of L)J.push(ne.XCScheme.open(ee.default.join(Y,X)))}if(L?.includeUser&&L?.username){let Y=this.getUserSchemesDir(L.username);if((0,$.existsSync)(Y)){let L=(0,$.readdirSync)(Y).filter(L=>L.endsWith(`.xcscheme`));for(let X of L)J.push(ne.XCScheme.open(ee.default.join(Y,X)))}}return J}getScheme(L,J){let Y=L.endsWith(`.xcscheme`)?L:`${L}.xcscheme`,X=ee.default.join(this.getSharedSchemesDir(),Y);if((0,$.existsSync)(X))return ne.XCScheme.open(X);if(J?.username){let L=ee.default.join(this.getUserSchemesDir(J.username),Y);if((0,$.existsSync)(L))return ne.XCScheme.open(L)}return null}saveScheme(L,J){let Y=J?.shared??!0,X=`${L.name}.xcscheme`,Z;if(Y)Z=this.getSharedSchemesDir();else{if(!J?.username)throw Error(`username is required when saving a user scheme`);Z=this.getUserSchemesDir(J.username)}let Q=ee.default.join(Z,X);L.save(Q)}deleteScheme(L,J){let Y=J?.shared??!0,X=`${L}.xcscheme`,Z;if(Y)Z=this.getSharedSchemesDir();else{if(!J?.username)throw Error(`username is required when deleting a user scheme`);Z=this.getUserSchemesDir(J.username)}let Q=ee.default.join(Z,X);(0,$.existsSync)(Q)&&(0,$.unlinkSync)(Q)}createSchemeForTarget(L,J){let Y=ee.default.dirname(this.filePath),X=ee.default.basename(Y);return ne.XCScheme.createForTarget(L,J,`${X}`)}getSharedDataDir(){let L=ee.default.dirname(this.filePath);return ee.default.join(L,`xcshareddata`)}getSharedData(){let L=this.getSharedDataDir();if((0,$.existsSync)(L))return re.XCSharedData.open(L);let J=re.XCSharedData.create();return J.filePath=L,J}toJSON(){let L={archiveVersion:this.archiveVersion,objectVersion:this.objectVersion,classes:this.classes,objects:{},rootObject:this.rootObject.uuid};for(let[J,Y]of this.entries())L.objects[J]=Y.toJSON();return L}};function ue(L,J){if(J?.isa!==`PBXProject`)throw Error(`Root object "${L}" is not a PBXProject`)}function de(L){if(Array.isArray(L))return L.map(de);if(typeof L==`object`){if(`uuid`in L&&typeof L.uuid==`string`)return L.uuid;let J={};for(let Y of Object.keys(L).sort())J[Y]=de(L[Y]);return J}else return L}})),require_PBXContainerItemProxy=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXContainerItemProxy=void 0;let Q=Z(__require$1(`assert`)),$=X(require_types$5()),ee=require_AbstractObject(),te=require_XcodeProject(),ne=require_PBXFileReference();var re=class L extends ee.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{containerPortal:String}}getProxiedObject(){return this.getContainerPortalObject().get(this.props.remoteGlobalIDString)}getContainerPortalObject(){if(this.isRemote()){let L=this.getXcodeProject().get(this.props.containerPortal.uuid);return(0,Q.default)(ne.PBXFileReference.is(L),`containerPortal is not a PBXFileReference`),te.XcodeProject.open(L.getRealPath())}return this.getXcodeProject()}isRemote(){return this.getXcodeProject().rootObject.uuid!==this.props.containerPortal.uuid}};L.PBXContainerItemProxy=re,re.isa=$.ISA.PBXContainerItemProxy})),require_PBXFileReference=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXFileReference=L.getPossibleDefaultSourceTree=void 0;let Q=Z(__require$1(`path`)),$=require_constants(),ee=X(require_types$5()),te=require_AbstractGroup(),ne=require_PBXBuildFile(),re=require_AbstractObject(),ie=require_paths(),ae=require_PBXContainerItemProxy(),oe=require_PBXReferenceProxy(),se=require_PBXTargetDependency(),ce=require_src$1()(`xcparse:models`);function le(L){let J=L.lastKnownFileType?$.SOURCETREE_BY_FILETYPE[L.lastKnownFileType]:void 0;return!J&&L.explicitFileType?`BUILT_PRODUCTS_DIR`:J??`<group>`}L.getPossibleDefaultSourceTree=le;function ue(L,J,Y){let X=Q.default.resolve(J);if(L.props.sourceTree=Y,Y===`<absolute>`){if(!Q.default.isAbsolute(X))throw Error(`[Xcodeproj] Attempt to set a relative path with an absolute source tree: ${J}`);L.props.path=X}else if(Y==`<group>`||Y==`SOURCE_ROOT`){let J=(0,ie.getSourceTreeRealPath)(L);if(J&&Q.default.resolve(J)===X){let Y=Q.default.relative(J,X);L.props.path=Y}else L.props.path=X}else L.props.path=X}var de=class L extends re.AbstractObject{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,...Y})}getObjectProps(){return{}}setupDefaults(){if(!this.props.lastKnownFileType&&!this.props.explicitFileType&&this.setLastKnownFileType(),this.props.name==null&&this.props.path){let L=Q.default.basename(this.props.path);L!==this.props.path&&(this.props.name=L)}this.props.sourceTree||(this.props.sourceTree=le(this.props))}getParent(){return(0,ie.getParent)(this)}getParents(){return(0,ie.getParents)(this)}move(L){te.PBXGroup.move(this,L)}getRealPath(){return(0,ie.getRealPath)(this)}getFullPath(){return(0,ie.getFullPath)(this)}setLastKnownFileType(L){if(L)this.props.lastKnownFileType=L;else if(this.props.path){let L=Q.default.extname(this.props.path);L.startsWith(`.`)&&(L=L.substring(1)),this.props.lastKnownFileType=$.FILE_TYPES_BY_EXTENSION[L],ce(`setLastKnownFileType (ext: ${L}, type: ${this.props.lastKnownFileType})`)}}setExplicitFileType(L){if(L)this.props.explicitFileType=L;else if(this.props.path){let L=Q.default.extname(this.props.path);L.startsWith(`.`)&&(L=L.substring(1)),this.props.explicitFileType=$.FILE_TYPES_BY_EXTENSION[L],ce(`setExplicitFileType (ext: ${L}, type: ${this.props.explicitFileType})`)}this.props.explicitFileType&&(this.props.lastKnownFileType=void 0)}getDisplayName(){return this.props.name?this.props.name:this.props.path&&this.props.sourceTree===`BUILT_PRODUCTS_DIR`?this.props.path:this.props.path?Q.default.basename(this.props.path):this.isa.replace(/^(PBX|XC)/,``)}getProxyContainers(){return Array.from(this.getXcodeProject().values()).filter(L=>ae.PBXContainerItemProxy.is(L)&&L.props.containerPortal.uuid===this.uuid)}setPath(L){L?ue(this,L,this.props.sourceTree):this.props.path=void 0}getBuildFiles(){return this.getReferrers().filter(L=>ne.PBXBuildFile.is(L))}getTargetDependencyProxies(){let L=this.getProxyContainers();return L.length?Array.from(this.getXcodeProject().values()).filter(J=>se.PBXTargetDependency.is(J)&&L.some(L=>L.uuid===J.props.targetProxy.uuid)):[]}removeFromProject(){return this.getFileReferenceProxies().forEach(L=>{L.removeFromProject()}),this.getTargetDependencyProxies().forEach(L=>{L.removeFromProject()}),this.getBuildFiles().forEach(L=>L.removeFromProject()),super.removeFromProject()}getFileReferenceProxies(){let L=this.getProxyContainers();return L.length?[...this.getXcodeProject().values()].filter(J=>oe.PBXReferenceProxy.is(J)?!!L.find(L=>ae.PBXContainerItemProxy.is(J.props.remoteRef)&&L.uuid===J.props.remoteRef.uuid):!1):[]}isAppExtension(){let L=this.props.lastKnownFileType??this.props.explicitFileType;return!!(L&&[`wrapper.extensionkit-extension`,`wrapper.app-extension`].includes(L)&&this.props.sourceTree===`BUILT_PRODUCTS_DIR`)}getTargetReferrers(){return this.getReferrers().filter(L=>fe(L)&&L.props.productReference?.uuid===this.uuid)}};L.PBXFileReference=de,de.isa=ee.ISA.PBXFileReference;function fe(L){return L.isa===ee.ISA.PBXNativeTarget}})),require_AbstractGroup=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.PBXGroup=L.AbstractGroup=void 0;let Q=Z(__require$1(`assert`)),$=Z(__require$1(`path`)),ee=require_constants(),te=X(require_types$5()),ne=require_paths(),re=require_AbstractObject(),ie=require_PBXFileReference();var ae=class extends re.AbstractObject{getObjectProps(){return{children:Array}}setupDefaults(){this.props.children||(this.props.children=[])}createGroup(L){(0,Q.default)(L.path||L.name,`A group must have a path or name`);let J=oe.create(this.getXcodeProject(),{...L});return this.props.children.push(J),J}mkdir(L,{recursive:J}={}){let Y=typeof L==`string`?L.split(`/`):L;if(!Y.length)return this;let X=Y.shift(),Z=this.getChildGroups().find(L=>L.getDisplayName()===X);if(!Z){if(!J)return null;Z=this.createGroup({path:X})}return L.length?Z.mkdir(Y,{recursive:J}):Z}getChildGroups(){return this.props.children.filter(L=>oe.is(L))}createNewProductRefForTarget(L,J){let Y=``;J==`staticLibrary`&&(Y=`lib`);let X=ee.PRODUCT_UTI_EXTENSIONS[J],Z=`${Y}${L}`;X&&(Z+=`.${X}`);let Q=ce(this,Z,`BUILT_PRODUCTS_DIR`);return Q.props.includeInIndex=0,Q.setExplicitFileType(),Q}static move(L,J){(0,Q.default)(oe.is(J),`newParent must be a PBXGroup`),(0,Q.default)(L,`Attempt to move nullish object to "${J.uuid}".`),(0,Q.default)(J,`Attempt to move object "${L.uuid}" to nullish parent.`),(0,Q.default)(J.uuid!==L.uuid,`Attempt to move object "${L.uuid}" to itself.`),(0,Q.default)(!(0,ne.getParents)(J).find(J=>J.uuid===L.uuid),`Attempt to move object "${L.uuid}" to a child object "${J.uuid}".`);let Y=L.getParent();if(oe.is(Y)){let J=Y.props.children.findIndex(J=>J.uuid===L.uuid);J!==-1&&Y.props.children.splice(J,1)}J.props.children.push(L)}getParent(){return(0,ne.getParent)(this)}getParents(){return(0,ne.getParents)(this)}getPath(){throw Error(`TODO`)}createFile(L){let J=ie.PBXFileReference.create(this.getXcodeProject(),L);return this.props.children.push(J),J}getDisplayName(){return this.props.name?this.props.name:this.props.path?$.default.basename(this.props.path):this.uuid===this.project.props.mainGroup.uuid?`Main Group`:this.isa.replace(/^(PBX|XC)/,``)}};L.AbstractGroup=ae;var oe=class L extends ae{static is(J){return J.isa===L.isa}static create(J,Y){return J.createModel({isa:L.isa,children:[],sourceTree:`<group>`,...Y})}};L.PBXGroup=oe,oe.isa=te.ISA.PBXGroup;function se(L,J,Y){return L.createFile({path:J,sourceTree:Y})}function ce(L,J,Y){let X=(()=>{switch($.default.extname(J).toLowerCase()){case`.xcdatamodeld`:case`.xcodeproj`:throw Error(`Unsupported file type: `+J);default:return se(L,J,Y)}})();return le(X),X}function le(L){L.props.path?.includes(`/`)&&(L.props.name=L.props.path.split(`/`).pop()),L.props.path&&$.default.extname(L.props.path).toLowerCase()==`.framework`&&(L.props.includeInIndex=void 0)}})),require_parser=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.parse=void 0;let J=require_lib$3();function Y(L){let Y=new J.DOMParser().parseFromString(L,`text/xml`).documentElement;if(!Y||Y.tagName!==`Workspace`)throw Error(`Invalid xcworkspacedata file: root element must be <Workspace>`);return X(Y)}L.parse=Y;function X(L){let J={};J.version=$(L,`version`);let Y=ee(L,`FileRef`);Y.length>0&&(J.fileRefs=Y.map(Z));let X=ee(L,`Group`);return X.length>0&&(J.groups=X.map(Q)),J}function Z(L){return{location:$(L,`location`)||``}}function Q(L){let J={};J.location=$(L,`location`),J.name=$(L,`name`);let Y=ee(L,`FileRef`);Y.length>0&&(J.fileRefs=Y.map(Z));let X=ee(L,`Group`);return X.length>0&&(J.groups=X.map(Q)),J}function $(L,J){if(L.hasAttribute(J))return L.getAttribute(J)??void 0}function ee(L,J){let Y=[],X=L.childNodes;for(let L=0;L<X.length;L++){let Z=X[L];Z.nodeType===1&&Z.tagName===J&&Y.push(Z)}return Y}})),require_writer=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.build=void 0;function J(L){let J=[];J.push(`<?xml version="1.0" encoding="UTF-8"?>`);let Z=[];if(L.version!==void 0&&Z.push(`version = "${L.version}"`),Z.length>0){J.push(`<Workspace`);for(let L of Z)J.push(` ${L}`);J[J.length-1]+=`>`}else J.push(`<Workspace>`);if(L.fileRefs)for(let X of L.fileRefs)J.push(...Y(X,1));if(L.groups)for(let Y of L.groups)J.push(...X(Y,1));return J.push(`</Workspace>`),J.join(`
45843
45843
  `)+`
45844
- `}L.build=J;function Y(L,J){let Y=Z(J);return[`${Y}<FileRef\n${Y} location = "${Q(L.location)}">\n${Y}</FileRef>`]}function X(L,J){let $=[],ee=Z(J),te=[];L.location!==void 0&&te.push(`location = "${Q(L.location)}"`),L.name!==void 0&&te.push(`name = "${Q(L.name)}"`),$.push(`${ee}<Group`);for(let L of te)$.push(`${ee} ${L}`);if($[$.length-1]+=`>`,L.fileRefs)for(let X of L.fileRefs)$.push(...Y(X,J+1));if(L.groups)for(let Y of L.groups)$.push(...X(Y,J+1));return $.push(`${ee}</Group>`),$}function Z(L){return` `.repeat(L)}function Q(L){return L.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}})),require_checks=__commonJSMin((L=>{var J=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.buildChecks=L.parseChecks=void 0;let Y=J(require_build$1());function X(L){let J=Y.default.parse(L),X={};for(let[L,Y]of Object.entries(J))typeof Y==`boolean`&&(X[L]=Y);return X}L.parseChecks=X;function Z(L){let J={};for(let[Y,X]of Object.entries(L))typeof X==`boolean`&&(J[Y]=X);return Y.default.build(J)}L.buildChecks=Z})),require_types=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0})})),require_workspace=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__exportStar||function(L,Y){for(var X in L)X!==`default`&&!Object.prototype.hasOwnProperty.call(Y,X)&&J(Y,L,X)};Object.defineProperty(L,`__esModule`,{value:!0}),L.buildChecks=L.parseChecks=L.build=L.parse=void 0;var X=require_parser();Object.defineProperty(L,`parse`,{enumerable:!0,get:function(){return X.parse}});var Z=require_writer();Object.defineProperty(L,`build`,{enumerable:!0,get:function(){return Z.build}});var Q=require_checks();Object.defineProperty(L,`parseChecks`,{enumerable:!0,get:function(){return Q.parseChecks}}),Object.defineProperty(L,`buildChecks`,{enumerable:!0,get:function(){return Q.buildChecks}}),Y(require_types(),L)})),require_IDEWorkspaceChecks=__commonJSMin((L=>{var J=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.IDEWorkspaceChecks=void 0;let Y=__require$1(`fs`),X=J(__require$1(`path`)),Z=require_checks(),Q=`xcshareddata/IDEWorkspaceChecks.plist`;L.IDEWorkspaceChecks=class L{constructor(L,J){this.props=L,this.filePath=J}static open(J){let $=X.default.join(J,Q);if(!(0,Y.existsSync)($))return null;let ee=(0,Y.readFileSync)($,`utf-8`);return new L((0,Z.parseChecks)(ee),$)}static openOrCreate(J){return L.open(J)||new L({IDEDidComputeMac32BitWarning:!0},X.default.join(J,Q))}static create(J){return new L({IDEDidComputeMac32BitWarning:!0,...J?.props},J?.filePath)}save(L){let J=L??this.filePath;if(!J)throw Error(`No file path specified. Either provide a path or set this.filePath.`);let Q=X.default.dirname(J);(0,Y.existsSync)(Q)||(0,Y.mkdirSync)(Q,{recursive:!0});let $=(0,Z.buildChecks)(this.props);(0,Y.writeFileSync)(J,$,`utf-8`),this.filePath=J}saveToWorkspace(L){let J=X.default.join(L,Q);this.save(J)}toPlist(){return(0,Z.buildChecks)(this.props)}get mac32BitWarningComputed(){return this.props.IDEDidComputeMac32BitWarning??!1}set mac32BitWarningComputed(L){this.props.IDEDidComputeMac32BitWarning=L}getCheck(L){return this.props[L]}setCheck(L,J){this.props[L]=J}removeCheck(L){return L in this.props?(delete this.props[L],!0):!1}}})),require_XCWorkspace=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCWorkspace=void 0;let Q=__require$1(`fs`),$=Z(__require$1(`path`)),ee=X(require_workspace()),te=require_IDEWorkspaceChecks(),ne=require_XCSharedData();L.XCWorkspace=class L{constructor(L,J,Y){this.name=L,this.props=J,this.filePath=Y}static open(J){let Y=$.default.join(J,`contents.xcworkspacedata`);if(!(0,Q.existsSync)(Y))throw Error(`Invalid workspace: ${Y} does not exist`);let X=(0,Q.readFileSync)(Y,`utf-8`),Z=ee.parse(X);return new L($.default.basename(J,`.xcworkspace`),Z,J)}static create(J,Y){return new L(J,{version:`1.0`,fileRefs:[],...Y})}save(L){let J=L??this.filePath;if(!J)throw Error(`No file path specified. Either provide a path or set this.filePath.`);(0,Q.existsSync)(J)||(0,Q.mkdirSync)(J,{recursive:!0});let Y=$.default.join(J,`contents.xcworkspacedata`),X=ee.build(this.props);(0,Q.writeFileSync)(Y,X,`utf-8`),this.filePath=J}toXML(){return ee.build(this.props)}addProject(L,J=`group`){this.props.fileRefs||(this.props.fileRefs=[]);let Y=`${J}:${L}`;this.props.fileRefs.find(L=>L.location===Y)||this.props.fileRefs.push({location:Y})}removeProject(L){if(!this.props.fileRefs)return!1;let J=this.props.fileRefs.length;return this.props.fileRefs=this.props.fileRefs.filter(J=>(J.location.includes(`:`)?J.location.split(`:`).slice(1).join(`:`):J.location)!==L&&J.location!==L),this.props.fileRefs.length<J}getProjectPaths(){let L=[];if(this.props.fileRefs&&L.push(...this.props.fileRefs.map(L=>L.location)),this.props.groups)for(let J of this.props.groups)L.push(...this.collectPathsFromGroup(J));return L}addGroup(L,J){this.props.groups||(this.props.groups=[]);let Y=this.props.groups.find(Y=>Y.name===L&&Y.location===J);if(Y)return Y;let X={name:L,location:J,fileRefs:[]};return this.props.groups.push(X),X}getGroup(L){return this.props.groups?.find(J=>J.name===L)}removeGroup(L){if(!this.props.groups)return!1;let J=this.props.groups.length;return this.props.groups=this.props.groups.filter(J=>J.name!==L),this.props.groups.length<J}hasProject(L){return this.getProjectPaths().some(J=>(J.includes(`:`)?J.split(`:`).slice(1).join(`:`):J)===L||J===L)}getWorkspaceChecks(){return this.filePath?te.IDEWorkspaceChecks.open(this.filePath):null}getOrCreateWorkspaceChecks(){if(!this.filePath)throw Error(`Workspace must be saved before accessing workspace checks.`);return te.IDEWorkspaceChecks.openOrCreate(this.filePath)}hasWorkspaceChecks(){return this.filePath?te.IDEWorkspaceChecks.open(this.filePath)!==null:!1}setMac32BitWarningComputed(){let L=this.getOrCreateWorkspaceChecks();L.mac32BitWarningComputed=!0,L.save()}collectPathsFromGroup(L){let J=[];if(L.fileRefs&&J.push(...L.fileRefs.map(L=>L.location)),L.groups)for(let Y of L.groups)J.push(...this.collectPathsFromGroup(Y));return J}getSharedDataDir(){if(this.filePath)return $.default.join(this.filePath,`xcshareddata`)}getSharedData(){let L=this.getSharedDataDir();if(L&&(0,Q.existsSync)(L))return ne.XCSharedData.open(L);let J=ne.XCSharedData.create();return L&&(J.filePath=L),J}}})),require_api=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.IDEWorkspaceChecks=L.XCWorkspace=L.XCSharedData=L.createBuildableReference=L.XCScheme=L.XCVersionGroup=L.XCSwiftPackageProductDependency=L.XCLocalSwiftPackageReference=L.XCRemoteSwiftPackageReference=L.XCConfigurationList=L.XCBuildConfiguration=L.AbstractObject=L.PBXTargetDependency=L.PBXVariantGroup=L.PBXSourcesBuildPhase=L.PBXShellScriptBuildPhase=L.PBXRezBuildPhase=L.PBXResourcesBuildPhase=L.PBXHeadersBuildPhase=L.PBXFrameworksBuildPhase=L.PBXCopyFilesBuildPhase=L.PBXAppleScriptBuildPhase=L.AbstractBuildPhase=L.PBXReferenceProxy=L.PBXProject=L.PBXNativeTarget=L.PBXLegacyTarget=L.PBXFileSystemSynchronizedRootGroup=L.PBXFileSystemSynchronizedBuildFileExceptionSet=L.PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet=L.PBXFileReference=L.PBXContainerItemProxy=L.PBXBuildRule=L.PBXBuildFile=L.PBXAggregateTarget=L.XcodeProject=L.AbstractGroup=L.PBXGroup=void 0;var J=require_AbstractGroup();Object.defineProperty(L,`PBXGroup`,{enumerable:!0,get:function(){return J.PBXGroup}}),Object.defineProperty(L,`AbstractGroup`,{enumerable:!0,get:function(){return J.AbstractGroup}});var Y=require_XcodeProject();Object.defineProperty(L,`XcodeProject`,{enumerable:!0,get:function(){return Y.XcodeProject}});var X=require_PBXAggregateTarget();Object.defineProperty(L,`PBXAggregateTarget`,{enumerable:!0,get:function(){return X.PBXAggregateTarget}});var Z=require_PBXBuildFile();Object.defineProperty(L,`PBXBuildFile`,{enumerable:!0,get:function(){return Z.PBXBuildFile}});var Q=require_PBXBuildRule();Object.defineProperty(L,`PBXBuildRule`,{enumerable:!0,get:function(){return Q.PBXBuildRule}});var $=require_PBXContainerItemProxy();Object.defineProperty(L,`PBXContainerItemProxy`,{enumerable:!0,get:function(){return $.PBXContainerItemProxy}});var ee=require_PBXFileReference();Object.defineProperty(L,`PBXFileReference`,{enumerable:!0,get:function(){return ee.PBXFileReference}});var te=require_PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet();Object.defineProperty(L,`PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet`,{enumerable:!0,get:function(){return te.PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet}});var ne=require_PBXFileSystemSynchronizedBuildFileExceptionSet();Object.defineProperty(L,`PBXFileSystemSynchronizedBuildFileExceptionSet`,{enumerable:!0,get:function(){return ne.PBXFileSystemSynchronizedBuildFileExceptionSet}});var re=require_PBXFileSystemSynchronizedRootGroup();Object.defineProperty(L,`PBXFileSystemSynchronizedRootGroup`,{enumerable:!0,get:function(){return re.PBXFileSystemSynchronizedRootGroup}});var ie=require_PBXLegacyTarget();Object.defineProperty(L,`PBXLegacyTarget`,{enumerable:!0,get:function(){return ie.PBXLegacyTarget}});var ae=require_PBXNativeTarget();Object.defineProperty(L,`PBXNativeTarget`,{enumerable:!0,get:function(){return ae.PBXNativeTarget}});var oe=require_PBXProject();Object.defineProperty(L,`PBXProject`,{enumerable:!0,get:function(){return oe.PBXProject}});var se=require_PBXReferenceProxy();Object.defineProperty(L,`PBXReferenceProxy`,{enumerable:!0,get:function(){return se.PBXReferenceProxy}});var ce=require_PBXSourcesBuildPhase();Object.defineProperty(L,`AbstractBuildPhase`,{enumerable:!0,get:function(){return ce.AbstractBuildPhase}}),Object.defineProperty(L,`PBXAppleScriptBuildPhase`,{enumerable:!0,get:function(){return ce.PBXAppleScriptBuildPhase}}),Object.defineProperty(L,`PBXCopyFilesBuildPhase`,{enumerable:!0,get:function(){return ce.PBXCopyFilesBuildPhase}}),Object.defineProperty(L,`PBXFrameworksBuildPhase`,{enumerable:!0,get:function(){return ce.PBXFrameworksBuildPhase}}),Object.defineProperty(L,`PBXHeadersBuildPhase`,{enumerable:!0,get:function(){return ce.PBXHeadersBuildPhase}}),Object.defineProperty(L,`PBXResourcesBuildPhase`,{enumerable:!0,get:function(){return ce.PBXResourcesBuildPhase}}),Object.defineProperty(L,`PBXRezBuildPhase`,{enumerable:!0,get:function(){return ce.PBXRezBuildPhase}}),Object.defineProperty(L,`PBXShellScriptBuildPhase`,{enumerable:!0,get:function(){return ce.PBXShellScriptBuildPhase}}),Object.defineProperty(L,`PBXSourcesBuildPhase`,{enumerable:!0,get:function(){return ce.PBXSourcesBuildPhase}});var le=require_PBXVariantGroup();Object.defineProperty(L,`PBXVariantGroup`,{enumerable:!0,get:function(){return le.PBXVariantGroup}});var ue=require_PBXTargetDependency();Object.defineProperty(L,`PBXTargetDependency`,{enumerable:!0,get:function(){return ue.PBXTargetDependency}});var de=require_AbstractObject();Object.defineProperty(L,`AbstractObject`,{enumerable:!0,get:function(){return de.AbstractObject}});var fe=require_XCBuildConfiguration();Object.defineProperty(L,`XCBuildConfiguration`,{enumerable:!0,get:function(){return fe.XCBuildConfiguration}});var pe=require_XCConfigurationList();Object.defineProperty(L,`XCConfigurationList`,{enumerable:!0,get:function(){return pe.XCConfigurationList}});var me=require_XCRemoteSwiftPackageReference();Object.defineProperty(L,`XCRemoteSwiftPackageReference`,{enumerable:!0,get:function(){return me.XCRemoteSwiftPackageReference}});var he=require_XCLocalSwiftPackageReference();Object.defineProperty(L,`XCLocalSwiftPackageReference`,{enumerable:!0,get:function(){return he.XCLocalSwiftPackageReference}});var ge=require_XCSwiftPackageProductDependency();Object.defineProperty(L,`XCSwiftPackageProductDependency`,{enumerable:!0,get:function(){return ge.XCSwiftPackageProductDependency}});var _e=require_XCVersionGroup();Object.defineProperty(L,`XCVersionGroup`,{enumerable:!0,get:function(){return _e.XCVersionGroup}});var ve=require_XCScheme();Object.defineProperty(L,`XCScheme`,{enumerable:!0,get:function(){return ve.XCScheme}}),Object.defineProperty(L,`createBuildableReference`,{enumerable:!0,get:function(){return ve.createBuildableReference}});var ye=require_XCSharedData();Object.defineProperty(L,`XCSharedData`,{enumerable:!0,get:function(){return ye.XCSharedData}});var be=require_XCWorkspace();Object.defineProperty(L,`XCWorkspace`,{enumerable:!0,get:function(){return be.XCWorkspace}});var xe=require_IDEWorkspaceChecks();Object.defineProperty(L,`IDEWorkspaceChecks`,{enumerable:!0,get:function(){return xe.IDEWorkspaceChecks}})})),require_build=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__exportStar||function(L,Y){for(var X in L)X!==`default`&&!Object.prototype.hasOwnProperty.call(Y,X)&&J(Y,L,X)};Object.defineProperty(L,`__esModule`,{value:!0}),Y(require_api(),L)})),import_build=require_build();const pbxprojDependencySchema=object({url:string$2()}),pbxprojSchema=object({copyrightHolder:nonEmptyString,copyrightYear:nonEmptyString,dependencies:array(pbxprojDependencySchema),identifier:nonEmptyString,name:nonEmptyString,operatingSystems:stringArray,organizationName:nonEmptyString,programmingLanguage:nonEmptyString,version:nonEmptyString}),XCODE_VARIABLE_RE=/\$[({][^)}]+[)}]/,SDKROOT_MAP={appletvos:`tvOS`,iphoneos:`iOS`,macosx:`macOS`,watchos:`watchOS`,xros:`visionOS`},DEPLOYMENT_TARGETS=[{key:`IPHONEOS_DEPLOYMENT_TARGET`,os:`iOS`},{key:`MACOSX_DEPLOYMENT_TARGET`,os:`macOS`},{key:`TVOS_DEPLOYMENT_TARGET`,os:`tvOS`},{key:`WATCHOS_DEPLOYMENT_TARGET`,os:`watchOS`},{key:`XROS_DEPLOYMENT_TARGET`,os:`visionOS`}];function parse(L){let J;try{J=import_build.XcodeProject.open(L)}catch{return}let Y=J.rootObject,X=Y.props.targets.find(L=>import_build.PBXNativeTarget.is(L)),Z;try{Z=Y.getMainAppTarget()??void 0}catch{}Z??=X;let Q,$;if(Z)try{let L=Z.getDefaultConfiguration();Q=L;let J=L.props.buildSettings;$=is.plainObject(J)?J:void 0}catch{}let ee;try{let L=(Y.props.buildConfigurationList.props.buildConfigurations.find(L=>L.props.name===`Release`)??Y.props.buildConfigurationList.getDefaultConfiguration()).props.buildSettings;ee=is.plainObject(L)?L:void 0}catch{}let te=getSetting($,ee,`INFOPLIST_KEY_CFBundleDisplayName`),ne=getResolvedSetting(Q,$,ee,`PRODUCT_NAME`),re=Z?cleanString(Z.props.name):void 0,ie=cleanString(Y.props.attributes.ORGANIZATIONNAME),{copyrightHolder:ae,copyrightYear:oe}=parseCopyrightString(getSetting($,ee,`INFOPLIST_KEY_NSHumanReadableCopyright`)),se=getSetting($,ee,`SWIFT_VERSION`),ce;return se?ce=`Swift`:getSetting($,ee,`GCC_C_LANGUAGE_STANDARD`)&&(ce=`Objective-C`),pbxprojSchema.parse({copyrightHolder:ae,copyrightYear:oe,dependencies:parseDependencies(Y),identifier:getResolvedSetting(Q,$,ee,`PRODUCT_BUNDLE_IDENTIFIER`),name:te??ne??re,operatingSystems:parseOperatingSystems($,ee),organizationName:ie,programmingLanguage:ce,version:getSetting($,ee,`MARKETING_VERSION`)})}function cleanString(L){if(typeof L==`number`)return String(L);if(typeof L!=`string`)return;let J=L.trim();if(J.length!==0&&!XCODE_VARIABLE_RE.test(J))return J}function getSetting(L,J,Y){let X=cleanString(L?.[Y]);return X===void 0?cleanString(J?.[Y]):X}function getResolvedSetting(L,J,Y,X){if(L)try{let J=cleanString(L.resolveBuildSetting(X));if(J!==void 0)return J}catch{}return getSetting(J,Y,X)}function parseCopyrightString(L){if(!L)return{};let J=/(?:©|\(c\)|copyright)\s*(\d{4})/i.exec(L)?.[1],Y=/(?:©|\(c\)|copyright)\s*\d{4}\s*(.+)/i.exec(L),X;return Y&&(X=Y[1].replace(/\.\s*all\s+rights\s+reserved\.?/i,``).replace(/[.,;]+$/,``).trim(),X.length===0&&(X=void 0)),{copyrightHolder:X,copyrightYear:J}}function parseOperatingSystems(L,J){let Y=[],X=new Set;for(let{key:Z,os:Q}of DEPLOYMENT_TARGETS){let $=getSetting(L,J,Z);if($){let L=`${Q} >= ${$}`;X.has(L)||(X.add(L),Y.push(L))}}if(Y.length===0){let X=getSetting(L,J,`SDKROOT`);if(X&&X!==`auto`){let L=SDKROOT_MAP[X];L&&Y.push(L)}}return Y}function parseDependencies(L){let J=L.props.packageReferences??[],Y=[];for(let L of J){if(!import_build.XCRemoteSwiftPackageReference.is(L))continue;let J=cleanString(L.props.repositoryURL);J&&Y.push({url:J})}return Y}const xcodeProjectPbxprojSource=defineSource({async discover(L){return getMatches(L.options,[`*.xcodeproj/project.pbxproj`],[`**/*.xcodeproj/project.pbxproj`])},key:`xcodeProjectPbxproj`,async parse(L,J){let Y=parse(resolve$1(J.options.path,L));if(Y!==void 0)return{data:Y,source:L}},phase:1});function toPersonOrOrgLd(L){let J=is.nonEmptyStringAndNotWhitespace(L.name),Y=is.nonEmptyStringAndNotWhitespace(L.givenName),X=is.nonEmptyStringAndNotWhitespace(L.familyName),Z=is.nonEmptyStringAndNotWhitespace(L.email);if(!J&&!Y&&!X&&!Z)return;let Q={"@type":L.type??`Person`};return is.nonEmptyStringAndNotWhitespace(L.id)&&(Q[`@id`]=L.id),J&&(Q.name=L.name),Y&&(Q.givenName=L.givenName),X&&(Q.familyName=L.familyName),Z&&(Q.email=L.email),is.nonEmptyStringAndNotWhitespace(L.url)&&(Q.url=L.url),is.nonEmptyStringAndNotWhitespace(L.affiliation)&&(Q.affiliation={"@type":`Organization`,name:L.affiliation}),Q}function deduplicatePersonsOrOrgs(L){let J=new Map;for(let Y of L){let L=(Y.name??([Y.givenName,Y.familyName].filter(Boolean).join(` `)||void 0)??Y.email??``).toLowerCase().trim();L.length>0&&!J.has(L)&&J.set(L,Y)}let Y=[...J.values()];return Y.length>0?Y:void 0}function toDependencyLd(L,J,Y,X){let Z={"@type":`SoftwareApplication`,name:L};return is.nonEmptyStringAndNotWhitespace(J)&&(Z.version=J),is.nonEmptyStringAndNotWhitespace(Y)&&(Z.identifier=Y),is.nonEmptyStringAndNotWhitespace(X)&&(Z.runtimePlatform=X),Z}function deduplicateDependencies(L){let J=new Map;for(let Y of L){let L=Y.name.toLowerCase().trim();L.length>0&&!J.has(L)&&J.set(L,Y)}let Y=[...J.values()];return Y.length>0?Y:void 0}function toSpdxLicenseUrl(L){return`https://spdx.org/licenses/${L.replace(`https://spdx.org/licenses/`,``).replace(`http://spdx.org/licenses/`,``)}`}const codemeta=defineTemplate(({arduinoLibraryProperties:L,cinderCinderblockXml:J,codemetaJson:Y,github:X,gitStats:Z,goGoMod:Q,javaPomXml:$,licenseFile:ee,metascope:te,nodeNpmRegistry:ne,nodePackageJson:re,obsidianPluginManifestJson:ie,openframeworksAddonConfigMk:ae,openframeworksInstallXml:oe,processingLibraryProperties:se,publiccodeYaml:ce,pythonPkgInfo:le,pythonPypiRegistry:ue,pythonPyprojectToml:de,pythonSetupCfg:fe,pythonSetupPy:pe,readmeFile:me,rubyGemspec:he,rustCargoToml:ge,xcodeInfoPlist:_e})=>{let ve=firstOf(Y),ye=firstOf(X),be=firstOf(Z),xe=firstOf(ne),Se=firstOf(ue),Ce=firstOf(re),we=firstOf(de),Te=firstOf(pe),Ee=firstOf(fe),De=firstOf(le),Oe=firstOf(ge),ke=firstOf(he),Ae=firstOf($),je=firstOf(Q),Me=firstOf(L),Ne=firstOf(se),Pe=firstOf(ae),Fe=firstOf(oe),Ie=firstOf(J),Le=firstOf(_e),Re=firstOf(ie),ze=firstOf(ce),Be=Ce?.data.name??we?.data.project?.name??Te?.data.name??Ee?.data.name??De?.data.name??Oe?.data.name??ke?.data.name??Ae?.data.name??je?.data.module??Me?.data.name??Ne?.data.name??Pe?.data.name??Fe?.data.name??Ie?.data.name??Le?.data.name??Re?.data.name??ze?.data.name??ve?.data.name,Ve=Ce?.data.description??we?.data.project?.description??Te?.data.description??Ee?.data.description??De?.data.summary??Oe?.data.description??ke?.data.summary??Ae?.data.description??Me?.data.sentence??Ne?.data.sentence??Pe?.data.description??Fe?.data.description??Ie?.data.summary??Le?.data.description??Re?.data.description??ze?.data.description?.shortDescription??ve?.data.description??ye?.data.description,He=Ce?.data.version??we?.data.project?.version??Te?.data.version??Ee?.data.version??De?.data.version??Oe?.data.version??ke?.data.version??Ae?.data.version??Me?.data.version??Ne?.data.prettyVersion??Fe?.data.version??Ie?.data.version??Le?.data.version??Re?.data.version??ze?.data.softwareVersion??ve?.data.version??ve?.data.softwareVersion,Ue=Ae?.data.identifier??Ie?.data.id??Re?.data.id??Le?.data.identifier??ve?.data.identifier,We=[...Ce?.data.author?[toPersonOrOrgLd({email:Ce.data.author.email,name:Ce.data.author.name,url:Ce.data.author.url})]:[],...(we?.data.project?.authors??[]).map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name}):toPersonOrOrgLd({name:L})),...Te?.data.author?[toPersonOrOrgLd({email:Te.data.author_email,name:Te.data.author})]:[],...Ee?.data.author?[toPersonOrOrgLd({email:Ee.data.author_email,name:Ee.data.author})]:[],...(Oe?.data.authors??[]).map(L=>toPersonOrOrgLd({email:L.email,name:L.name})),...gemspecAuthors(ke),...(Ae?.data.developers??[]).map(L=>toPersonOrOrgLd({affiliation:L.organization,email:L.email,name:L.name,url:L.url})),...(Me?.data.authors??[]).map(L=>toPersonOrOrgLd({email:L.email,name:L.name})),...(Ne?.data.authors??[]).map(L=>toPersonOrOrgLd({name:L.name,url:L.url})),...Pe?.data.author?[toPersonOrOrgLd({name:Pe.data.author})]:[],...Fe?.data.author?[toPersonOrOrgLd({name:Fe.data.author})]:[],...Ie?.data.author?[toPersonOrOrgLd({name:Ie.data.author})]:[],...Le?.data.author?[toPersonOrOrgLd({email:Le.data.authorEmail,name:Le.data.author})]:[],...Re?.data.author?[toPersonOrOrgLd({name:Re.data.author,url:Re.data.authorUrl})]:[],...(ze?.data.contacts??[]).map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,name:L.name}))],Ge=ve?.data.author?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),Ke=resolvePersonsOrOrgs(We,Ge),qe=[...collectArrayField(re,L=>L.contributors?.map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name,url:L.url}):toPersonOrOrgLd({name:L}))),...(Ae?.data.contributors??[]).map(L=>toPersonOrOrgLd({affiliation:L.organization,email:L.email,name:L.name,url:L.url}))],Je=ve?.data.contributor?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),Ye=resolvePersonsOrOrgs(qe,Je),Xe=[...(we?.data.project?.maintainers??[]).map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name}):toPersonOrOrgLd({name:L})),...Te?.data.maintainer?[toPersonOrOrgLd({email:Te.data.maintainer_email,name:Te.data.maintainer})]:[],...Ee?.data.maintainer?[toPersonOrOrgLd({email:Ee.data.maintainer_email,name:Ee.data.maintainer})]:[],...De?.data.maintainer?[toPersonOrOrgLd({email:De.data.maintainer_email,name:De.data.maintainer})]:[],...Me?.data.maintainer?[toPersonOrOrgLd({email:Me.data.maintainer.email,name:Me.data.maintainer.name})]:[]],Ze=ve?.data.maintainer?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),Qe=resolvePersonsOrOrgs(Xe,Ze),$e=[...ze?.data.mainCopyrightOwner?[toPersonOrOrgLd({name:ze.data.mainCopyrightOwner})]:[],...Le?.data.copyrightHolder?[toPersonOrOrgLd({name:Le.data.copyrightHolder})]:[]],et=ve?.data.copyrightHolder?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),tt=resolvePersonsOrOrgs($e,et),nt=resolvePersonsOrOrgs([],ve?.data.funder?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url}))),rt=ye?.data.url??Oe?.data.repository??Ae?.data.scmUrl??je?.data.repository_url??ze?.data.url??Me?.data.repository??Ie?.data.git??ve?.data.codeRepository??repositoryUrlFromPackageJson(Ce?.data.repository),it=nonEmpty$4([...ye?.data.primaryLanguage?[ye.data.primaryLanguage]:[],...ve?.data.programmingLanguage??[]])??nonEmpty$4(Object.keys(ye?.data.languages??{})),at=nonEmpty$4([...Object.keys(Ce?.data.engines??{}),...je?.data.go_version?[`go ${je.data.go_version}`]:[],...Oe?.data.rustVersion?[`rust ${Oe.data.rustVersion}`]:[],...we?.data.project?.requiresPython?[`python ${we.data.project.requiresPython}`]:[],...Te?.data.python_requires?[`python ${Te.data.python_requires}`]:[],...ke?.data.required_ruby_version?[`ruby ${ke.data.required_ruby_version}`]:[],...Ae?.data.javaVersion?[`java ${Ae.data.javaVersion}`]:[],...ve?.data.runtimePlatform??[]]),ot=nonEmpty$4([...ve?.data.operatingSystem??[],...ze?.data.platforms??[],...Fe?.data.operatingSystems??[],...Ie?.data.supports??[],...Le?.data.operatingSystems??[]]),st=ve?.data.applicationCategory??Le?.data.applicationCategory??Me?.data.category??ze?.data.softwareType,ct=ve?.data.applicationSubCategory,lt=collectRuntimeDeps({arduino:Me,cargo:Oe,cinder:Ie,gem:ke,goGoMod:Q,javaPomXml:$,nodePackageJson:re,ofAddon:Pe,ofInstall:Fe,pkgInfo:De,publiccode:ze,pyproject:we,rubyGemspec:he,setupCfg:Ee,setupPy:Te}),ut=lt.length>0?deduplicateDependencies(lt):ve?.data.softwareRequirements?.map(L=>toDependencyLd(L.name??L.identifier??``,L.version,L.identifier,L.runtimePlatform)),dt=collectDevelopmentDeps({cargo:Oe,gem:ke,javaPomXml:$,nodePackageJson:re,rubyGemspec:he}),ft=dt.length>0?deduplicateDependencies(dt):ve?.data.softwareSuggestions?.map(L=>toDependencyLd(L.name??L.identifier??``,L.version,L.identifier,L.runtimePlatform)),pt=be?.data.commitDateFirst??ye?.data.createdAt??ve?.data.dateCreated,mt=be?.data.commitDateLast??ye?.data.pushedAt??ve?.data.dateModified,ht=xe?.data.publishDateLatest??Se?.data.publishDateLatest??ze?.data.releaseDate??ye?.data.releaseDateLatest??be?.data.tagVersionDateLatest??ve?.data.datePublished,gt=Le?.data.copyrightYear??Ae?.data.inceptionYear??(ve?.data.copyrightYear===void 0?void 0:String(ve.data.copyrightYear)),_t=Ce?.data.license??Oe?.data.license??resolvePythonLicense(we?.data.project?.license)??Te?.data.license??Ee?.data.license??ke?.data.license??firstPomLicense(Ae)??Me?.data.license??Ie?.data.license??ze?.data.license??ye?.data.licenseSpdxId??collectField(ee,L=>L.spdxId)[0]??resolveCmLicense(ve?.data.license),vt=is.nonEmptyStringAndNotWhitespace(_t)?toSpdxLicenseUrl(_t):void 0,yt=ve?.data.isAccessibleForFree??(ye?.data.isPrivate===!1?!0:void 0),bt=nonEmpty$4(deduplicateStrings([...Ce?.data.keywords??[],...we?.data.project?.keywords??[],...Te?.data.keywords??[],...Ee?.data.keywords??[],...De?.data.keywords??[],...Oe?.data.keywords??[],...Pe?.data.tags??[],...ze?.data.categories??[],...ye?.data.topics??[],...ve?.data.keywords??[]])),xt=Ce?.data.homepage??Oe?.data.homepage??Te?.data.url??Ee?.data.url??De?.data.home_page??ke?.data.homepage??Ae?.data.url??Me?.data.url??Ne?.data.url??Pe?.data.url??Fe?.data.siteUrl??Ie?.data.url??Le?.data.url??ze?.data.landingUrl??ye?.data.homepageUrl??ve?.data.url,St=Fe?.data.downloadUrl??Ne?.data.download??xe?.data.url??Se?.data.url??ve?.data.downloadUrl,Ct=bugsUrlFromPackageJson(Ce?.data.bugs)??Ae?.data.issueManagementUrl??ve?.data.issueTracker??(ye?.data.hasIssuesEnabled?`${ye.data.url}/issues`:void 0),wt=Ae?.data.ciManagementUrl??ve?.data.continuousIntegration,Tt=Oe?.data.documentation??ve?.data.softwareHelp,Et=ze?.data.developmentStatus??ve?.data.developmentStatus,Dt=ve?.data.funding,Ot=ve?.data.buildInstructions,kt=readmeUrl(firstOf(me),rt,ye?.data.defaultBranch??be?.data.branchCurrent,firstOf(te)?.data.options.path)??ve?.data.readme,At=ve?.data.releaseNotes,jt=ve?.data.installUrl,Mt=ve?.data.relatedLink,Nt;return stripUndefined({"@context":`https://w3id.org/codemeta/3.0`,"@type":`SoftwareSourceCode`,applicationCategory:st,applicationSubCategory:ct,author:Ke,buildInstructions:Ot,codeRepository:rt,continuousIntegration:wt,contributor:Ye,copyrightHolder:tt,copyrightYear:is.nonEmptyStringAndNotWhitespace(gt)&&Number.parseInt(gt,10)||void 0,dateCreated:toDateOnly(pt),dateModified:toDateOnly(mt),datePublished:toDateOnly(ht),description:Ve,developmentStatus:Et,downloadUrl:St,funder:nt,funding:Dt,identifier:Ue,installUrl:jt,isAccessibleForFree:yt,issueTracker:Ct,keywords:bt,license:vt,maintainer:Qe,name:Be,operatingSystem:ot,programmingLanguage:it,readme:kt,relatedLink:Mt,releaseNotes:At,runtimePlatform:at,softwareHelp:Tt,softwareRequirements:ut,softwareSuggestions:ft,targetProduct:void 0,url:xt,version:He})});function gemspecAuthors(L){if(L===void 0)return[];let J=L.data.email===void 0?[]:Array.isArray(L.data.email)?L.data.email:[L.data.email];return L.data.authors.map((L,Y)=>toPersonOrOrgLd({email:J[Y],name:L}))}function resolvePersonsOrOrgs(L,J){let Y=L.filter(L=>L!==void 0);return Y.length>0?deduplicatePersonsOrOrgs(Y):deduplicatePersonsOrOrgs((J??[]).filter(L=>L!==void 0))}function collectRuntimeDeps(L){let J=[];return J.push(...collectArrayField(L.nodePackageJson,L=>objectEntriesToDeps(L.dependencies))),J.push(...(L.pyproject?.data.project?.dependencies??[]).map(L=>parsePep508Dep(L))),J.push(...(L.setupPy?.data.install_requires??[]).map(L=>parsePep508Dep(L))),J.push(...(L.setupCfg?.data.install_requires??[]).map(L=>parsePep508Dep(L))),J.push(...(L.pkgInfo?.data.requires_dist??[]).map(L=>parsePep508Dep(L))),J.push(...(L.cargo?.data.dependencies??[]).map(L=>toDependencyLd(L.name,L.version))),J.push(...collectArrayField(L.rubyGemspec,L=>L.dependencies.filter(L=>L.type===`runtime`).map(L=>toDependencyLd(L.name,L.requirements.join(`, `))))),J.push(...collectArrayField(L.javaPomXml,L=>L.dependencies.map(L=>toDependencyLd(L.artifactId,L.version,`${L.groupId}:${L.artifactId}`)))),J.push(...collectArrayField(L.goGoMod,L=>L.dependencies.map(L=>toDependencyLd(L.module,L.version)))),J.push(...(L.arduino?.data.depends??[]).map(L=>toDependencyLd(L.name,L.versionConstraint))),J.push(...(L.ofAddon?.data.dependencies??[]).map(L=>toDependencyLd(L))),J.push(...(L.ofInstall?.data.requirements??[]).map(L=>toDependencyLd(L))),J.push(...(L.cinder?.data.requires??[]).map(L=>toDependencyLd(L))),J.push(...(L.publiccode?.data.dependencies??[]).map(L=>toDependencyLd(L.name,L.version))),J}function collectDevelopmentDeps(L){let J=[];return J.push(...collectArrayField(L.nodePackageJson,L=>objectEntriesToDeps(L.devDependencies))),J.push(...(L.cargo?.data.devDependencies??[]).map(L=>toDependencyLd(L.name,L.version))),J.push(...collectArrayField(L.rubyGemspec,L=>L.dependencies.filter(L=>L.type===`development`).map(L=>toDependencyLd(L.name,L.requirements.join(`, `))))),J.push(...collectArrayField(L.javaPomXml,L=>L.devDependencies.map(L=>toDependencyLd(L.artifactId,L.version,`${L.groupId}:${L.artifactId}`)))),J}function objectEntriesToDeps(L){if(L!==void 0)return Object.entries(L).map(([L,J])=>toDependencyLd(L,J))}function parsePep508Dep(L){let J=L.trim(),Y=/^[\w.-]+/.exec(J);if(Y){let L=J.slice(Y[0].length).trim();return toDependencyLd(Y[0],L.length>0?L:void 0)}return toDependencyLd(J)}function repositoryUrlFromPackageJson(L){if(L!==void 0)return typeof L==`string`?L:L.url}function bugsUrlFromPackageJson(L){if(L!==void 0)return L.url}function firstPomLicense(L){let J=L?.data.licenses[0];return J?.name??J?.url}function resolvePythonLicense(L){if(L!==void 0)return typeof L==`string`?L:L.spdx??L.text}function resolveCmLicense(L){if(L!==void 0)return Array.isArray(L)?L[0]:L}function deduplicateStrings(L){let J=new Map;for(let Y of L){let L=Y.toLowerCase().trim();L.length>0&&!J.has(L)&&J.set(L,Y)}return[...J.values()]}function toDateOnly(L){if(L===void 0)return;if(/^\d{4}-\d{2}-\d{2}$/.test(L))return L;let J=/^(\d{4}-\d{2}-\d{2})T/.exec(L);return J?J[1]:L}function readmeUrl(L,J,Y,X){if(L===void 0)return;let Z=X===void 0?basename$1(L.source):relative$1(X,L.source).replaceAll(`\\`,`/`);if(is.nonEmptyStringAndNotWhitespace(J)&&J.includes(`github.com`)){let L=Y??`main`;return`${J.replace(/\.git$/,``)}/blob/${L}/${Z}`}return Z}const frontmatter=defineTemplate((L,J)=>{let Y=codemeta(L,J),X=codeMetaJsonDataSchema.parse(Y),Z=firstOf(L.codeStats)?.data,Q=firstOf(L.dependencyUpdates),$=firstOf(L.fileStats)?.data,ee=firstOf(L.github)?.data,te=firstOf(L.gitStats)?.data,ne=L.metascope?.data,re=firstOf(L.nodeNpmRegistry)?.data,ie=firstOf(L.obsidianPluginManifestJson)?.data,ae=firstOf(L.obsidianPluginRegistry)?.data,oe=firstOf(L.pythonPypiRegistry)?.data;return{Name:X.name??null,alias:toAlias(X.name)??null,Description:X.description??null,Author:mixedStringsToArray(toBasicNames(X.author),new Map([[`Eric Mika`,`[Eric Mika](/Contacts/Eric%20Mika)`]]))??null,Version:X.version??null,Public:!(ee?.isPrivate??!1),Published:!!(ae?.url??re?.url??oe?.url),Status:toStatus(X.codeRepository,X.author,J.authorName,J.githubAccount)??null,"GitHub Owner":ee?.ownerLogin??null,tags:X.keywords??[],License:toBasicLicenses(X.license??ee?.licenseSpdxId)??null,Language:mixedStringsToArray(X.programmingLanguage??ee?.primaryLanguage,REPLACEMENTS)??null,"Secondary Language":Z?.total?.languages??null,"Repo Path":ne?.options.path===void 0?null:`file://${ne.options.path}`,"Readme Path":toLocalUrl(X.readme,ne?.options.path)??null,"VS Code Path":ne?.options.path===void 0?null:`vscode://file/${ne.options.path}`,"Homepage URL":X.url!==void 0&&!X.url.startsWith(`https://github.com/`)?X.url:null,"Repo URL":X.codeRepository??ee?.url??null,"Package URL":ae?.url??re?.url??oe?.url??null,"Readme URL":X.readme??null,"Issues URL":X.issueTracker??null,Created:X.dateCreated??null,"First Commit Date":te?.commitDateFirst??null,"Latest Commit Date":te?.commitDateLast??null,"Latest Push Date":ee?.pushedAt??null,"Latest Release Date":ee?.releaseDateLatest??re?.publishDateLatest??oe?.publishDateLatest??te?.tagVersionDateLatest??null,"Latest Release Version":ie?.version??re?.versionLatest??oe?.versionLatest??ee?.releaseVersionLatest??te?.tagVersionLatest??null,Stars:ee?.stargazerCount??null,Watchers:ee?.watcherCount??null,Contributors:ee?.contributorCount??te?.contributorCount??null,Forks:ee?.forkCount??null,"Downloads Total":ae?.downloadCount??re?.downloadsTotal??oe?.downloads180Days??ee?.releaseDownloadCount??null,"Downloads Monthly":re?.downloadsMonthly??oe?.downloadsMonthly??null,Releases:ee?.releaseCount??te?.tagReleaseCount??null,"Issues Open":ee?.issueCountOpen??null,"Issues Closed":ee?.issueCountClosed??null,"PRs Open":ee?.pullRequestCountOpen??null,"PRs Merged":ee?.pullRequestCountMerged??null,"PRs Closed":ee?.pullRequestCountClosed??null,"Vulnerability Alerts":ee?.vulnerabilityAlertCount??null,"Lines of Code":Z?.total?.code??null,"Total Files":$?.totalFileCount??null,"Total Size MB":toMb($?.totalSizeBytes)??null,"Tracked Files":te?.trackedFileCount??null,"Tracked Size MB":toMb(te?.trackedSizeBytes)??null,"GitHub Size MB":toMb(ee?.diskUsageBytes)??null,Runtime:X.runtimePlatform??null,"Operating System":X.operatingSystem??null,Dependencies:X.softwareRequirements?.length??0,"Dev Dependencies":X.softwareSuggestions?.length??0,"Major Updates":Q?.data.major?.length??0,"Minor Updates":Q?.data.minor?.length??0,"Patch Updates":Q?.data.patch?.length??0,"Total Updates":Q?.extra?.total??0,Libyears:Q?.extra?.libyears??0,"Shared Config":usesSharedConfig(X),"Forked From":ee?.forkedFrom??null,"Fork Ahead":ee?.commitsAheadUpstream??null,"Fork Behind":ee?.commitsBehindUpstream??null,"Template From":ee?.templateFrom??null,"Template Repo":ee?.isTemplate??!1,Organization:ee?.isInOrganization??!1,"Git Commits":te?.commitCount??null,"Git Dirty Files":te?.uncommittedFileCount??null,"Git Remotes Ahead":te?.totalAhead??null,"Git Remotes Behind":te?.totalBehind??null,"Git LFS":te?.hasLfs??ee?.hasLfs??!1,"Git Tags":te?.tagCount??null,"Git Current Branch":te?.branchCurrent??null,"Git Branches":te?.branchCount??null,"Git Remotes":te?.remoteCount??null,"Git Submodules":te?.submoduleCount??0,"Metadata Scanned":ne?.scannedAt??null}}),project=defineTemplate((L,J)=>{let Y=codemeta(L,J),X=codeMetaJsonDataSchema.parse(Y),Z=firstOf(L.dependencyUpdates),Q=firstOf(L.github)?.data,$=firstOf(L.gitStats)?.data,ee=L.metascope?.data,te=firstOf(L.nodeNpmRegistry)?.data,ne=firstOf(L.nodePackageJson);return{description:X.description,firstCommitDate:$?.commitDateFirst,gitHubLink:Q?.url,gitHubStarCount:Q?.stargazerCount,gitIsClean:$?.isClean,gitIsDirty:$?.isDirty,gitRemoteCount:$?.remoteCount,homepage:Q?.homepageUrl??X.url??Q?.url,isAuthoredByMe:isAuthoredBy(X.author,J.authorName),isOnMyGitHub:isOnGithubAccountOf(X.codeRepository,J.githubAccount),isOnNpm:te?.url!==void 0,isPublic:!(Q?.isPrivate??!1),isRemoteAhead:$?.isRemoteAhead,issueCount:Q?.issueCountOpen,lastCommitDate:$?.commitDateLast,license:toBasicLicenses(X.license??Q?.licenseSpdxId)?.at(0),majorUpdateCount:Z?.data.major?.length??0,majorUpdateList:Z?.data.major?.map(L=>L.name),npmDownloadCount:te?.downloadsTotal,readmePath:toLocalUrl(X.readme,ee?.options.path),repositoryPath:ee?.options.path===void 0?void 0:`file://${ee.options.path}`,semverUpdateCount:void 0,semverUpdateList:void 0,tags:X.keywords,title:X.name,type:toStatus(X.codeRepository,X.author,J.authorName,J.githubAccount),usesPnpm:usesPnpm(ne),usesSharedConfig:usesSharedConfig(X),version:X.version}}),templates={codemeta,frontmatter,project};function isKeyOfTemplate(L){return typeof L==`string`&&L in templates}const execFileAsync=promisify(execFile),sources=[arduinoLibraryPropertiesSource,cinderCinderblockXmlSource,codemetaJsonSource,gitConfigSource,goGoModSource,goGoreleaserYamlSource,javaPomXmlSource,licenseFileSource,metadataFileSource,metascopeSource,nodePackageJsonSource,obsidianPluginManifestJsonSource,openframeworksAddonConfigMkSource,openframeworksInstallXmlSource,processingLibraryPropertiesSource,processingSketchPropertiesSource,publiccodeYamlSource,pythonPkgInfoSource,pythonPyprojectTomlSource,pythonSetupCfgSource,pythonSetupPySource,readmeFileSource,rubyGemspecSource,rustCargoTomlSource,xcodeInfoPlistSource,xcodeProjectPbxprojSource,codeStatsSource,dependencyUpdatesSource,fileStatsSource,gitStatsSource,githubSource,nodeNpmRegistrySource,obsidianPluginRegistrySource,pythonPypiRegistrySource];async function resolveCredentials(L){if(L?.githubToken)return L;let J=process.env.GITHUB_TOKEN;if(J)return{...L,githubToken:J};try{let{stdout:J}=await execFileAsync(`gh`,[`auth`,`token`]),Y=J.trim();if(Y)return{...L,githubToken:Y}}catch{}return L??{}}function resolveTemplate(L){if(L!==void 0){if(typeof L==`function`)return L;if(isKeyOfTemplate(L))return templates[L];log$2.warn(`Unknown template: "${L}". Using default (all fields).`)}}async function runSources(L,J,Y){let X=await Promise.all(L.map(async L=>{try{let Y=performance.now(),X=await L.extract(J),Z=Math.round(performance.now()-Y);return log$2.debug(`Source "${L.key}" extracted in ${Z}ms`),{data:X,key:L.key}}catch(J){return log$2.warn(`Source "${L.key}" extraction failed: ${J instanceof Error?J.message:String(J)}`),{data:void 0,key:L.key}}}));for(let L of X)L.data!==void 0&&Object.assign(Y,{[L.key]:L.data})}async function getMetadata(L){let J=performance.now(),Y=defu(L??{},DEFAULT_GET_METADATA_OPTIONS),X=resolve$1(Y.path),Z;try{Z=await stat(X)}catch{throw Error(`Path does not exist: ${X}`)}if(!Z.isDirectory())throw Error(`Path is not a directory: ${X}`);let Q=resolveTemplate(Y.template);resetMatchCache(),log$2.debug(`Building file tree (respectIgnored: ${Y.respectIgnored})...`);let[$,ee]=await Promise.all([resolveCredentials(Y.credentials),getTree(X,Y.respectIgnored)]);log$2.debug(`Root file tree contains ${ee.length} entries`);let te={arduinoLibraryProperties:void 0,cinderCinderblockXml:void 0,codemetaJson:void 0,codeStats:void 0,dependencyUpdates:void 0,fileStats:void 0,gitConfig:void 0,github:void 0,gitStats:void 0,goGoMod:void 0,goGoreleaserYaml:void 0,javaPomXml:void 0,licenseFile:void 0,metadataFile:void 0,metascope:void 0,nodeNpmRegistry:void 0,nodePackageJson:void 0,obsidianPluginManifestJson:void 0,obsidianPluginRegistry:void 0,openframeworksAddonConfigMk:void 0,openframeworksInstallXml:void 0,processingLibraryProperties:void 0,processingSketchProperties:void 0,publiccodeYaml:void 0,pythonPkgInfo:void 0,pythonPypiRegistry:void 0,pythonPyprojectToml:void 0,pythonSetupCfg:void 0,pythonSetupPy:void 0,readmeFile:void 0,rubyGemspec:void 0,rustCargoToml:void 0,xcodeInfoPlist:void 0,xcodeProjectPbxproj:void 0},ne=new Set,re=new Set(sources.map(L=>L.phase));for(let L of[...re].toSorted((L,J)=>L-J)){let J=sources.filter(J=>J.phase===L);log$2.debug(`Phase ${L}: Running ${J.length} sources...`),await runSources(J,{completedSources:ne,metadata:{...te},options:{...Y,credentials:$,path:X}},te);for(let L of J)ne.add(L.key)}let ie=performance.now()-J;if(te.metascope&&(te.metascope.data.durationMs=Math.round(ie)),log$2.debug(`Metadata duration: ${prettyMilliseconds(ie)}`),Q){let L=performance.now(),X=stripUndefined(Q(te,Y.templateData??{}))??{},Z=performance.now()-L;return log$2.debug(`Template duration: ${prettyMilliseconds(Z)}`),log$2.debug(`Total duration: ${prettyMilliseconds(performance.now()-J)}`),X}let ae=stripUndefined(te);return log$2.debug(`Total duration: ${prettyMilliseconds(performance.now()-J)}`),ae}const cliCommandName=Object.keys(bin).at(0),builtInTemplateNames=Object.keys(templates),yargsInstance=Yargs(hideBin(process.argv));await yargsInstance.scriptName(cliCommandName).command(`$0 [path]`,`Extract metadata from a code repository.`,L=>L.positional(`path`,{default:DEFAULT_GET_METADATA_OPTIONS.path,description:`Project directory path`,type:`string`}).option(`template`,{alias:`t`,description:`Built-in template name (${builtInTemplateNames.map(L=>`\`${L}\``).join(`, `)}) or path to a custom template file`,type:`string`}).option(`github-token`,{description:"GitHub API token (or set `$GITHUB_TOKEN`)",type:`string`}).option(`author-name`,{description:`Optional author name(s) for ownership checks in templates`,type:`string`,array:!0}).option(`github-account`,{description:`Optional GitHub account name(s) for ownership checks in templates`,type:`string`,array:!0}).option(`absolute`,{description:"Output absolute paths. Use `--no-absolute` for relative paths.",type:`boolean`,default:DEFAULT_GET_METADATA_OPTIONS.absolute}).option(`offline`,{description:`Skip sources requiring network requests`,type:`boolean`,default:DEFAULT_GET_METADATA_OPTIONS.offline}).option(`no-ignore`,{description:`Include files ignored by .gitignore in the file tree`,type:`boolean`,default:!DEFAULT_GET_METADATA_OPTIONS.respectIgnored}).option(`recursive`,{alias:`r`,description:`Search for metadata files recursively in subdirectories`,type:`boolean`,default:DEFAULT_GET_METADATA_OPTIONS.recursive}).option(`workspaces`,{alias:`w`,coerce:L=>{if(L===!0||L===!1)return L;let J=(Array.isArray(L)?L:[L]).filter(L=>typeof L==`string`);return J.length>0?J:!0},default:DEFAULT_GET_METADATA_OPTIONS.workspaces,description:"Include workspace-specific metadata in monorepos; pass a `boolean` to enable or disable auto-detection, or pass one or more `string`s to explicitly define workspace paths"}).option(`verbose`,{description:`Run with verbose logging`,type:`boolean`,default:!1}),async L=>{let J=createLogger$3({verbose:L.verbose??!1,logToConsole:{showTime:!1}});setLogger$1(J),setLogger(getChildLogger(J,`read-pyproject`)),J.debug(`Starting metadata extraction...`);let Y;if(L.template)if(isKeyOfTemplate(L.template))Y=templates[L.template];else try{let{createJiti:X}=await import(`./jiti-D2Njwwqq.js`),Z=await X(import.meta.url).import(L.template);if(typeof Z==`object`&&Z&&`default`in Z&&typeof Z.default==`function`){let L=Z.default;Y=(J,Y)=>L(J,Y)}if(typeof Y!=`function`){J.error(`Template file must export a function as default export. Use defineTemplate().`),process.exitCode=1;return}}catch(L){J.error(`Failed to load template: ${L instanceof Error?L.message:String(L)}`),process.exitCode=1;return}try{let J=L.githubToken?{githubToken:L.githubToken}:void 0,X={...L.authorName?{authorName:L.authorName}:{},...L.githubAccount?{githubAccount:L.githubAccount}:{}},Z={absolute:L.absolute,credentials:J,offline:L.offline,path:L.path,recursive:L.recursive,respectIgnored:L.noIgnore?!1:void 0,templateData:X,workspaces:L.workspaces},Q=Y?await getMetadata({...Z,template:Y}):await getMetadata(Z),$=process.stdout.isTTY?JSON.stringify(Q,void 0,2):JSON.stringify(Q);process.stdout.write($+`
45844
+ `}L.build=J;function Y(L,J){let Y=Z(J);return[`${Y}<FileRef\n${Y} location = "${Q(L.location)}">\n${Y}</FileRef>`]}function X(L,J){let $=[],ee=Z(J),te=[];L.location!==void 0&&te.push(`location = "${Q(L.location)}"`),L.name!==void 0&&te.push(`name = "${Q(L.name)}"`),$.push(`${ee}<Group`);for(let L of te)$.push(`${ee} ${L}`);if($[$.length-1]+=`>`,L.fileRefs)for(let X of L.fileRefs)$.push(...Y(X,J+1));if(L.groups)for(let Y of L.groups)$.push(...X(Y,J+1));return $.push(`${ee}</Group>`),$}function Z(L){return` `.repeat(L)}function Q(L){return L.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}})),require_checks=__commonJSMin((L=>{var J=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.buildChecks=L.parseChecks=void 0;let Y=J(require_build$1());function X(L){let J=Y.default.parse(L),X={};for(let[L,Y]of Object.entries(J))typeof Y==`boolean`&&(X[L]=Y);return X}L.parseChecks=X;function Z(L){let J={};for(let[Y,X]of Object.entries(L))typeof X==`boolean`&&(J[Y]=X);return Y.default.build(J)}L.buildChecks=Z})),require_types=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0})})),require_workspace=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__exportStar||function(L,Y){for(var X in L)X!==`default`&&!Object.prototype.hasOwnProperty.call(Y,X)&&J(Y,L,X)};Object.defineProperty(L,`__esModule`,{value:!0}),L.buildChecks=L.parseChecks=L.build=L.parse=void 0;var X=require_parser();Object.defineProperty(L,`parse`,{enumerable:!0,get:function(){return X.parse}});var Z=require_writer();Object.defineProperty(L,`build`,{enumerable:!0,get:function(){return Z.build}});var Q=require_checks();Object.defineProperty(L,`parseChecks`,{enumerable:!0,get:function(){return Q.parseChecks}}),Object.defineProperty(L,`buildChecks`,{enumerable:!0,get:function(){return Q.buildChecks}}),Y(require_types(),L)})),require_IDEWorkspaceChecks=__commonJSMin((L=>{var J=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.IDEWorkspaceChecks=void 0;let Y=__require$1(`fs`),X=J(__require$1(`path`)),Z=require_checks(),Q=`xcshareddata/IDEWorkspaceChecks.plist`;L.IDEWorkspaceChecks=class L{constructor(L,J){this.props=L,this.filePath=J}static open(J){let $=X.default.join(J,Q);if(!(0,Y.existsSync)($))return null;let ee=(0,Y.readFileSync)($,`utf-8`);return new L((0,Z.parseChecks)(ee),$)}static openOrCreate(J){return L.open(J)||new L({IDEDidComputeMac32BitWarning:!0},X.default.join(J,Q))}static create(J){return new L({IDEDidComputeMac32BitWarning:!0,...J?.props},J?.filePath)}save(L){let J=L??this.filePath;if(!J)throw Error(`No file path specified. Either provide a path or set this.filePath.`);let Q=X.default.dirname(J);(0,Y.existsSync)(Q)||(0,Y.mkdirSync)(Q,{recursive:!0});let $=(0,Z.buildChecks)(this.props);(0,Y.writeFileSync)(J,$,`utf-8`),this.filePath=J}saveToWorkspace(L){let J=X.default.join(L,Q);this.save(J)}toPlist(){return(0,Z.buildChecks)(this.props)}get mac32BitWarningComputed(){return this.props.IDEDidComputeMac32BitWarning??!1}set mac32BitWarningComputed(L){this.props.IDEDidComputeMac32BitWarning=L}getCheck(L){return this.props[L]}setCheck(L,J){this.props[L]=J}removeCheck(L){return L in this.props?(delete this.props[L],!0):!1}}})),require_XCWorkspace=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__setModuleDefault||(Object.create?(function(L,J){Object.defineProperty(L,`default`,{enumerable:!0,value:J})}):function(L,J){L.default=J}),X=L&&L.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var Z in L)Z!==`default`&&Object.prototype.hasOwnProperty.call(L,Z)&&J(X,L,Z);return Y(X,L),X},Z=L&&L.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(L,`__esModule`,{value:!0}),L.XCWorkspace=void 0;let Q=__require$1(`fs`),$=Z(__require$1(`path`)),ee=X(require_workspace()),te=require_IDEWorkspaceChecks(),ne=require_XCSharedData();L.XCWorkspace=class L{constructor(L,J,Y){this.name=L,this.props=J,this.filePath=Y}static open(J){let Y=$.default.join(J,`contents.xcworkspacedata`);if(!(0,Q.existsSync)(Y))throw Error(`Invalid workspace: ${Y} does not exist`);let X=(0,Q.readFileSync)(Y,`utf-8`),Z=ee.parse(X);return new L($.default.basename(J,`.xcworkspace`),Z,J)}static create(J,Y){return new L(J,{version:`1.0`,fileRefs:[],...Y})}save(L){let J=L??this.filePath;if(!J)throw Error(`No file path specified. Either provide a path or set this.filePath.`);(0,Q.existsSync)(J)||(0,Q.mkdirSync)(J,{recursive:!0});let Y=$.default.join(J,`contents.xcworkspacedata`),X=ee.build(this.props);(0,Q.writeFileSync)(Y,X,`utf-8`),this.filePath=J}toXML(){return ee.build(this.props)}addProject(L,J=`group`){this.props.fileRefs||(this.props.fileRefs=[]);let Y=`${J}:${L}`;this.props.fileRefs.find(L=>L.location===Y)||this.props.fileRefs.push({location:Y})}removeProject(L){if(!this.props.fileRefs)return!1;let J=this.props.fileRefs.length;return this.props.fileRefs=this.props.fileRefs.filter(J=>(J.location.includes(`:`)?J.location.split(`:`).slice(1).join(`:`):J.location)!==L&&J.location!==L),this.props.fileRefs.length<J}getProjectPaths(){let L=[];if(this.props.fileRefs&&L.push(...this.props.fileRefs.map(L=>L.location)),this.props.groups)for(let J of this.props.groups)L.push(...this.collectPathsFromGroup(J));return L}addGroup(L,J){this.props.groups||(this.props.groups=[]);let Y=this.props.groups.find(Y=>Y.name===L&&Y.location===J);if(Y)return Y;let X={name:L,location:J,fileRefs:[]};return this.props.groups.push(X),X}getGroup(L){return this.props.groups?.find(J=>J.name===L)}removeGroup(L){if(!this.props.groups)return!1;let J=this.props.groups.length;return this.props.groups=this.props.groups.filter(J=>J.name!==L),this.props.groups.length<J}hasProject(L){return this.getProjectPaths().some(J=>(J.includes(`:`)?J.split(`:`).slice(1).join(`:`):J)===L||J===L)}getWorkspaceChecks(){return this.filePath?te.IDEWorkspaceChecks.open(this.filePath):null}getOrCreateWorkspaceChecks(){if(!this.filePath)throw Error(`Workspace must be saved before accessing workspace checks.`);return te.IDEWorkspaceChecks.openOrCreate(this.filePath)}hasWorkspaceChecks(){return this.filePath?te.IDEWorkspaceChecks.open(this.filePath)!==null:!1}setMac32BitWarningComputed(){let L=this.getOrCreateWorkspaceChecks();L.mac32BitWarningComputed=!0,L.save()}collectPathsFromGroup(L){let J=[];if(L.fileRefs&&J.push(...L.fileRefs.map(L=>L.location)),L.groups)for(let Y of L.groups)J.push(...this.collectPathsFromGroup(Y));return J}getSharedDataDir(){if(this.filePath)return $.default.join(this.filePath,`xcshareddata`)}getSharedData(){let L=this.getSharedDataDir();if(L&&(0,Q.existsSync)(L))return ne.XCSharedData.open(L);let J=ne.XCSharedData.create();return L&&(J.filePath=L),J}}})),require_api=__commonJSMin((L=>{Object.defineProperty(L,`__esModule`,{value:!0}),L.IDEWorkspaceChecks=L.XCWorkspace=L.XCSharedData=L.createBuildableReference=L.XCScheme=L.XCVersionGroup=L.XCSwiftPackageProductDependency=L.XCLocalSwiftPackageReference=L.XCRemoteSwiftPackageReference=L.XCConfigurationList=L.XCBuildConfiguration=L.AbstractObject=L.PBXTargetDependency=L.PBXVariantGroup=L.PBXSourcesBuildPhase=L.PBXShellScriptBuildPhase=L.PBXRezBuildPhase=L.PBXResourcesBuildPhase=L.PBXHeadersBuildPhase=L.PBXFrameworksBuildPhase=L.PBXCopyFilesBuildPhase=L.PBXAppleScriptBuildPhase=L.AbstractBuildPhase=L.PBXReferenceProxy=L.PBXProject=L.PBXNativeTarget=L.PBXLegacyTarget=L.PBXFileSystemSynchronizedRootGroup=L.PBXFileSystemSynchronizedBuildFileExceptionSet=L.PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet=L.PBXFileReference=L.PBXContainerItemProxy=L.PBXBuildRule=L.PBXBuildFile=L.PBXAggregateTarget=L.XcodeProject=L.AbstractGroup=L.PBXGroup=void 0;var J=require_AbstractGroup();Object.defineProperty(L,`PBXGroup`,{enumerable:!0,get:function(){return J.PBXGroup}}),Object.defineProperty(L,`AbstractGroup`,{enumerable:!0,get:function(){return J.AbstractGroup}});var Y=require_XcodeProject();Object.defineProperty(L,`XcodeProject`,{enumerable:!0,get:function(){return Y.XcodeProject}});var X=require_PBXAggregateTarget();Object.defineProperty(L,`PBXAggregateTarget`,{enumerable:!0,get:function(){return X.PBXAggregateTarget}});var Z=require_PBXBuildFile();Object.defineProperty(L,`PBXBuildFile`,{enumerable:!0,get:function(){return Z.PBXBuildFile}});var Q=require_PBXBuildRule();Object.defineProperty(L,`PBXBuildRule`,{enumerable:!0,get:function(){return Q.PBXBuildRule}});var $=require_PBXContainerItemProxy();Object.defineProperty(L,`PBXContainerItemProxy`,{enumerable:!0,get:function(){return $.PBXContainerItemProxy}});var ee=require_PBXFileReference();Object.defineProperty(L,`PBXFileReference`,{enumerable:!0,get:function(){return ee.PBXFileReference}});var te=require_PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet();Object.defineProperty(L,`PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet`,{enumerable:!0,get:function(){return te.PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet}});var ne=require_PBXFileSystemSynchronizedBuildFileExceptionSet();Object.defineProperty(L,`PBXFileSystemSynchronizedBuildFileExceptionSet`,{enumerable:!0,get:function(){return ne.PBXFileSystemSynchronizedBuildFileExceptionSet}});var re=require_PBXFileSystemSynchronizedRootGroup();Object.defineProperty(L,`PBXFileSystemSynchronizedRootGroup`,{enumerable:!0,get:function(){return re.PBXFileSystemSynchronizedRootGroup}});var ie=require_PBXLegacyTarget();Object.defineProperty(L,`PBXLegacyTarget`,{enumerable:!0,get:function(){return ie.PBXLegacyTarget}});var ae=require_PBXNativeTarget();Object.defineProperty(L,`PBXNativeTarget`,{enumerable:!0,get:function(){return ae.PBXNativeTarget}});var oe=require_PBXProject();Object.defineProperty(L,`PBXProject`,{enumerable:!0,get:function(){return oe.PBXProject}});var se=require_PBXReferenceProxy();Object.defineProperty(L,`PBXReferenceProxy`,{enumerable:!0,get:function(){return se.PBXReferenceProxy}});var ce=require_PBXSourcesBuildPhase();Object.defineProperty(L,`AbstractBuildPhase`,{enumerable:!0,get:function(){return ce.AbstractBuildPhase}}),Object.defineProperty(L,`PBXAppleScriptBuildPhase`,{enumerable:!0,get:function(){return ce.PBXAppleScriptBuildPhase}}),Object.defineProperty(L,`PBXCopyFilesBuildPhase`,{enumerable:!0,get:function(){return ce.PBXCopyFilesBuildPhase}}),Object.defineProperty(L,`PBXFrameworksBuildPhase`,{enumerable:!0,get:function(){return ce.PBXFrameworksBuildPhase}}),Object.defineProperty(L,`PBXHeadersBuildPhase`,{enumerable:!0,get:function(){return ce.PBXHeadersBuildPhase}}),Object.defineProperty(L,`PBXResourcesBuildPhase`,{enumerable:!0,get:function(){return ce.PBXResourcesBuildPhase}}),Object.defineProperty(L,`PBXRezBuildPhase`,{enumerable:!0,get:function(){return ce.PBXRezBuildPhase}}),Object.defineProperty(L,`PBXShellScriptBuildPhase`,{enumerable:!0,get:function(){return ce.PBXShellScriptBuildPhase}}),Object.defineProperty(L,`PBXSourcesBuildPhase`,{enumerable:!0,get:function(){return ce.PBXSourcesBuildPhase}});var le=require_PBXVariantGroup();Object.defineProperty(L,`PBXVariantGroup`,{enumerable:!0,get:function(){return le.PBXVariantGroup}});var ue=require_PBXTargetDependency();Object.defineProperty(L,`PBXTargetDependency`,{enumerable:!0,get:function(){return ue.PBXTargetDependency}});var de=require_AbstractObject();Object.defineProperty(L,`AbstractObject`,{enumerable:!0,get:function(){return de.AbstractObject}});var fe=require_XCBuildConfiguration();Object.defineProperty(L,`XCBuildConfiguration`,{enumerable:!0,get:function(){return fe.XCBuildConfiguration}});var pe=require_XCConfigurationList();Object.defineProperty(L,`XCConfigurationList`,{enumerable:!0,get:function(){return pe.XCConfigurationList}});var me=require_XCRemoteSwiftPackageReference();Object.defineProperty(L,`XCRemoteSwiftPackageReference`,{enumerable:!0,get:function(){return me.XCRemoteSwiftPackageReference}});var he=require_XCLocalSwiftPackageReference();Object.defineProperty(L,`XCLocalSwiftPackageReference`,{enumerable:!0,get:function(){return he.XCLocalSwiftPackageReference}});var ge=require_XCSwiftPackageProductDependency();Object.defineProperty(L,`XCSwiftPackageProductDependency`,{enumerable:!0,get:function(){return ge.XCSwiftPackageProductDependency}});var _e=require_XCVersionGroup();Object.defineProperty(L,`XCVersionGroup`,{enumerable:!0,get:function(){return _e.XCVersionGroup}});var ve=require_XCScheme();Object.defineProperty(L,`XCScheme`,{enumerable:!0,get:function(){return ve.XCScheme}}),Object.defineProperty(L,`createBuildableReference`,{enumerable:!0,get:function(){return ve.createBuildableReference}});var ye=require_XCSharedData();Object.defineProperty(L,`XCSharedData`,{enumerable:!0,get:function(){return ye.XCSharedData}});var be=require_XCWorkspace();Object.defineProperty(L,`XCWorkspace`,{enumerable:!0,get:function(){return be.XCWorkspace}});var xe=require_IDEWorkspaceChecks();Object.defineProperty(L,`IDEWorkspaceChecks`,{enumerable:!0,get:function(){return xe.IDEWorkspaceChecks}})})),require_build=__commonJSMin((L=>{var J=L&&L.__createBinding||(Object.create?(function(L,J,Y,X){X===void 0&&(X=Y);var Z=Object.getOwnPropertyDescriptor(J,Y);(!Z||(`get`in Z?!J.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return J[Y]}}),Object.defineProperty(L,X,Z)}):(function(L,J,Y,X){X===void 0&&(X=Y),L[X]=J[Y]})),Y=L&&L.__exportStar||function(L,Y){for(var X in L)X!==`default`&&!Object.prototype.hasOwnProperty.call(Y,X)&&J(Y,L,X)};Object.defineProperty(L,`__esModule`,{value:!0}),Y(require_api(),L)})),import_build=require_build();const pbxprojDependencySchema=object({url:string$2()}),pbxprojSchema=object({copyrightHolder:nonEmptyString,copyrightYear:nonEmptyString,dependencies:array(pbxprojDependencySchema),identifier:nonEmptyString,name:nonEmptyString,operatingSystems:stringArray,organizationName:nonEmptyString,programmingLanguage:nonEmptyString,version:nonEmptyString}),XCODE_VARIABLE_RE=/\$[({][^)}]+[)}]/,SDKROOT_MAP={appletvos:`tvOS`,iphoneos:`iOS`,macosx:`macOS`,watchos:`watchOS`,xros:`visionOS`},DEPLOYMENT_TARGETS=[{key:`IPHONEOS_DEPLOYMENT_TARGET`,os:`iOS`},{key:`MACOSX_DEPLOYMENT_TARGET`,os:`macOS`},{key:`TVOS_DEPLOYMENT_TARGET`,os:`tvOS`},{key:`WATCHOS_DEPLOYMENT_TARGET`,os:`watchOS`},{key:`XROS_DEPLOYMENT_TARGET`,os:`visionOS`}];function parse(L){let J;try{J=import_build.XcodeProject.open(L)}catch{return}let Y=J.rootObject,X=Y.props.targets.find(L=>import_build.PBXNativeTarget.is(L)),Z;try{Z=Y.getMainAppTarget()??void 0}catch{}Z??=X;let Q,$;if(Z)try{let L=Z.getDefaultConfiguration();Q=L;let J=L.props.buildSettings;$=is.plainObject(J)?J:void 0}catch{}let ee;try{let L=(Y.props.buildConfigurationList.props.buildConfigurations.find(L=>L.props.name===`Release`)??Y.props.buildConfigurationList.getDefaultConfiguration()).props.buildSettings;ee=is.plainObject(L)?L:void 0}catch{}let te=getSetting($,ee,`INFOPLIST_KEY_CFBundleDisplayName`),ne=getResolvedSetting(Q,$,ee,`PRODUCT_NAME`),re=Z?cleanString(Z.props.name):void 0,ie=cleanString(Y.props.attributes.ORGANIZATIONNAME),{copyrightHolder:ae,copyrightYear:oe}=parseCopyrightString(getSetting($,ee,`INFOPLIST_KEY_NSHumanReadableCopyright`)),se=getSetting($,ee,`SWIFT_VERSION`),ce;return se?ce=`Swift`:getSetting($,ee,`GCC_C_LANGUAGE_STANDARD`)&&(ce=`Objective-C`),pbxprojSchema.parse({copyrightHolder:ae,copyrightYear:oe,dependencies:parseDependencies(Y),identifier:getResolvedSetting(Q,$,ee,`PRODUCT_BUNDLE_IDENTIFIER`),name:te??ne??re,operatingSystems:parseOperatingSystems($,ee),organizationName:ie,programmingLanguage:ce,version:getSetting($,ee,`MARKETING_VERSION`)})}function cleanString(L){if(typeof L==`number`)return String(L);if(typeof L!=`string`)return;let J=L.trim();if(J.length!==0&&!XCODE_VARIABLE_RE.test(J))return J}function getSetting(L,J,Y){let X=cleanString(L?.[Y]);return X===void 0?cleanString(J?.[Y]):X}function getResolvedSetting(L,J,Y,X){if(L)try{let J=cleanString(L.resolveBuildSetting(X));if(J!==void 0)return J}catch{}return getSetting(J,Y,X)}function parseCopyrightString(L){if(!L)return{};let J=/(?:©|\(c\)|copyright)\s*(\d{4})/i.exec(L)?.[1],Y=/(?:©|\(c\)|copyright)\s*\d{4}\s*(.+)/i.exec(L),X;return Y&&(X=Y[1].replace(/\.\s*all\s+rights\s+reserved\.?/i,``).replace(/[.,;]+$/,``).trim(),X.length===0&&(X=void 0)),{copyrightHolder:X,copyrightYear:J}}function parseOperatingSystems(L,J){let Y=[],X=new Set;for(let{key:Z,os:Q}of DEPLOYMENT_TARGETS){let $=getSetting(L,J,Z);if($){let L=`${Q} >= ${$}`;X.has(L)||(X.add(L),Y.push(L))}}if(Y.length===0){let X=getSetting(L,J,`SDKROOT`);if(X&&X!==`auto`){let L=SDKROOT_MAP[X];L&&Y.push(L)}}return Y}function parseDependencies(L){let J=L.props.packageReferences??[],Y=[];for(let L of J){if(!import_build.XCRemoteSwiftPackageReference.is(L))continue;let J=cleanString(L.props.repositoryURL);J&&Y.push({url:J})}return Y}const xcodeProjectPbxprojSource=defineSource({async discover(L){return getMatches(L.options,[`*.xcodeproj/project.pbxproj`],[`**/*.xcodeproj/project.pbxproj`])},key:`xcodeProjectPbxproj`,async parse(L,J){let Y=parse(resolve$1(J.options.path,L));if(Y!==void 0)return{data:Y,source:L}},phase:1});function toPersonOrOrgLd(L){let J=is.nonEmptyStringAndNotWhitespace(L.name),Y=is.nonEmptyStringAndNotWhitespace(L.givenName),X=is.nonEmptyStringAndNotWhitespace(L.familyName),Z=is.nonEmptyStringAndNotWhitespace(L.email);if(!J&&!Y&&!X&&!Z)return;let Q={"@type":L.type??`Person`};return is.nonEmptyStringAndNotWhitespace(L.id)&&(Q[`@id`]=L.id),J&&(Q.name=L.name),Y&&(Q.givenName=L.givenName),X&&(Q.familyName=L.familyName),Z&&(Q.email=L.email),is.nonEmptyStringAndNotWhitespace(L.url)&&(Q.url=L.url),is.nonEmptyStringAndNotWhitespace(L.affiliation)&&(Q.affiliation={"@type":`Organization`,name:L.affiliation}),Q}function deduplicatePersonsOrOrgs(L){let J=new Map;for(let Y of L){let L=(Y.name??([Y.givenName,Y.familyName].filter(Boolean).join(` `)||void 0)??Y.email??``).toLowerCase().trim();L.length>0&&!J.has(L)&&J.set(L,Y)}let Y=[...J.values()];return Y.length>0?Y:void 0}function toDependencyLd(L,J,Y,X){let Z={"@type":`SoftwareApplication`,name:L};return is.nonEmptyStringAndNotWhitespace(J)&&(Z.version=J),is.nonEmptyStringAndNotWhitespace(Y)&&(Z.identifier=Y),is.nonEmptyStringAndNotWhitespace(X)&&(Z.runtimePlatform=X),Z}function deduplicateDependencies(L){let J=new Map;for(let Y of L){let L=Y.name.toLowerCase().trim();L.length>0&&!J.has(L)&&J.set(L,Y)}let Y=[...J.values()];return Y.length>0?Y:void 0}function toSpdxLicenseUrl(L){return`https://spdx.org/licenses/${L.replace(`https://spdx.org/licenses/`,``).replace(`http://spdx.org/licenses/`,``)}`}const codemeta=defineTemplate(({arduinoLibraryProperties:L,cinderCinderblockXml:J,codemetaJson:Y,codeStats:X,fileStats:Z,github:Q,gitStats:$,goGoMod:ee,javaPomXml:te,licenseFile:ne,metascope:re,nodeNpmRegistry:ie,nodePackageJson:ae,obsidianPluginManifestJson:oe,openframeworksAddonConfigMk:se,openframeworksInstallXml:ce,processingLibraryProperties:le,publiccodeYaml:ue,pythonPkgInfo:de,pythonPypiRegistry:fe,pythonPyprojectToml:pe,pythonSetupCfg:me,pythonSetupPy:he,readmeFile:ge,rubyGemspec:_e,rustCargoToml:ve,xcodeInfoPlist:ye})=>{let be=firstOf(Y),xe=firstOf(Q),Se=firstOf($),Ce=firstOf(ie),we=firstOf(fe),Te=firstOf(ae),Ee=firstOf(pe),De=firstOf(he),Oe=firstOf(me),ke=firstOf(de),Ae=firstOf(ve),je=firstOf(_e),Me=firstOf(te),Ne=firstOf(ee),Pe=firstOf(L),Fe=firstOf(le),Ie=firstOf(se),Le=firstOf(ce),Re=firstOf(J),ze=firstOf(ye),Be=firstOf(oe),Ve=firstOf(ue),He=firstOf(X),Ue=firstOf(ge),We=firstOf(Z),Ge=Ee?.data.tool?.poetry,Ke=Te?.data.name??Ee?.data.project?.name??Ge?.name??De?.data.name??Oe?.data.name??ke?.data.name??Ae?.data.name??je?.data.name??Me?.data.name??Ne?.data.module??Pe?.data.name??Fe?.data.name??Ie?.data.name??Le?.data.name??Re?.data.name??ze?.data.name??Be?.data.name??Ve?.data.name??be?.data.name??Ue?.data.name??We?.data.folderName,qe=Te?.data.description??Ee?.data.project?.description??Ge?.description??De?.data.description??Oe?.data.description??ke?.data.summary??Ae?.data.description??je?.data.summary??Me?.data.description??Pe?.data.sentence??Fe?.data.sentence??Ie?.data.description??Le?.data.description??Re?.data.summary??ze?.data.description??Be?.data.description??Ve?.data.description?.shortDescription??be?.data.description??xe?.data.description,Je=Te?.data.version??Ee?.data.project?.version??Ge?.version??De?.data.version??Oe?.data.version??ke?.data.version??Ae?.data.version??je?.data.version??Me?.data.version??Pe?.data.version??Fe?.data.prettyVersion??Le?.data.version??Re?.data.version??ze?.data.version??Be?.data.version??Ve?.data.softwareVersion??be?.data.version??be?.data.softwareVersion,Ye=Me?.data.identifier??Re?.data.id??Be?.data.id??ze?.data.identifier??Te?.data.name??be?.data.identifier,Xe=[...Te?.data.author?[toPersonOrOrgLd({email:Te.data.author.email,name:Te.data.author.name,url:Te.data.author.url})]:[],...(Ee?.data.project?.authors??[]).map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name}):toPersonOrOrgLd({name:L})),...De?.data.author?[toPersonOrOrgLd({email:De.data.author_email,name:De.data.author})]:[],...Oe?.data.author?[toPersonOrOrgLd({email:Oe.data.author_email,name:Oe.data.author})]:[],...(Ae?.data.authors??[]).map(L=>toPersonOrOrgLd({email:L.email,name:L.name})),...gemspecAuthors(je),...(Me?.data.developers??[]).map(L=>toPersonOrOrgLd({affiliation:L.organization,email:L.email,name:L.name,url:L.url})),...(Pe?.data.authors??[]).map(L=>toPersonOrOrgLd({email:L.email,name:L.name})),...(Fe?.data.authors??[]).map(L=>toPersonOrOrgLd({name:L.name,url:L.url})),...Ie?.data.author?[toPersonOrOrgLd({name:Ie.data.author})]:[],...Le?.data.author?[toPersonOrOrgLd({name:Le.data.author})]:[],...(Re?.data.author??[]).map(L=>toPersonOrOrgLd({name:L})),...ze?.data.author?[toPersonOrOrgLd({email:ze.data.authorEmail,name:ze.data.author})]:[],...Be?.data.author?[toPersonOrOrgLd({name:Be.data.author,url:Be.data.authorUrl})]:[],...(Ve?.data.contacts??[]).map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,name:L.name}))],Ze=be?.data.author?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),Qe=resolvePersonsOrOrgs(Xe,Ze),$e=[...collectArrayField(ae,L=>L.contributors?.map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name,url:L.url}):toPersonOrOrgLd({name:L}))),...(Me?.data.contributors??[]).map(L=>toPersonOrOrgLd({affiliation:L.organization,email:L.email,name:L.name,url:L.url}))],et=be?.data.contributor?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),tt=resolvePersonsOrOrgs($e,et),nt=[...collectArrayField(ae,L=>L.maintainers?.map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name,url:L.url}):toPersonOrOrgLd({name:L}))),...(Ee?.data.project?.maintainers??[]).map(L=>is.plainObject(L)?toPersonOrOrgLd({email:L.email,name:L.name}):toPersonOrOrgLd({name:L})),...De?.data.maintainer?[toPersonOrOrgLd({email:De.data.maintainer_email,name:De.data.maintainer})]:[],...Oe?.data.maintainer?[toPersonOrOrgLd({email:Oe.data.maintainer_email,name:Oe.data.maintainer})]:[],...ke?.data.maintainer?[toPersonOrOrgLd({email:ke.data.maintainer_email,name:ke.data.maintainer})]:[],...Pe?.data.maintainer?[toPersonOrOrgLd({email:Pe.data.maintainer.email,name:Pe.data.maintainer.name})]:[]],rt=be?.data.maintainer?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),it=resolvePersonsOrOrgs(nt,rt),at=[...Ve?.data.mainCopyrightOwner?[toPersonOrOrgLd({name:Ve.data.mainCopyrightOwner})]:[],...ze?.data.copyrightHolder?[toPersonOrOrgLd({name:ze.data.copyrightHolder})]:[]],ot=be?.data.copyrightHolder?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url})),st=resolvePersonsOrOrgs(at,ot),ct=resolvePersonsOrOrgs([],be?.data.funder?.map(L=>toPersonOrOrgLd({affiliation:L.affiliation,email:L.email,familyName:L.familyName,givenName:L.givenName,id:L.id,name:L.name,type:L.type,url:L.url}))),lt=xe?.data.url??Ae?.data.repository??Me?.data.scmUrl??Ne?.data.repository_url??Ve?.data.url??Pe?.data.repository??Re?.data.git??be?.data.codeRepository??repositoryUrlFromPackageJson(Te?.data.repository)??caseInsensitiveLookup(Ee?.data.project?.urls,`repository`)??Ge?.repository,ut=nonEmpty$5([...xe?.data.primaryLanguage?[xe.data.primaryLanguage]:[],...be?.data.programmingLanguage??[]])??nonEmpty$5(Object.keys(xe?.data.languages??{}))??He?.data.total?.languages.slice(0,1),dt=nonEmpty$5([...Object.keys(Te?.data.engines??{}),...Ne?.data.go_version?[`go ${Ne.data.go_version}`]:[],...Ae?.data.rustVersion?[`rust ${Ae.data.rustVersion}`]:[],...Ee?.data.project?.requiresPython?[`python ${Ee.data.project.requiresPython}`]:[],...De?.data.python_requires?[`python ${De.data.python_requires}`]:[],...je?.data.required_ruby_version?[`ruby ${je.data.required_ruby_version}`]:[],...Me?.data.javaVersion?[`java ${Me.data.javaVersion}`]:[],...be?.data.runtimePlatform??[]]),ft=nonEmpty$5([...be?.data.operatingSystem??[],...Ve?.data.platforms??[],...Le?.data.operatingSystems??[],...Re?.data.supports??[],...ze?.data.operatingSystems??[]]),pt=be?.data.applicationCategory??ze?.data.applicationCategory??Pe?.data.category??Ve?.data.softwareType,mt=be?.data.applicationSubCategory,ht=collectRuntimeDeps({arduino:Pe,cargo:Ae,cinder:Re,gem:je,goGoMod:ee,javaPomXml:te,nodePackageJson:ae,ofAddon:Ie,ofInstall:Le,pkgInfo:ke,publiccode:Ve,pyproject:Ee,rubyGemspec:_e,setupCfg:Oe,setupPy:De}),gt=ht.length>0?deduplicateDependencies(ht):be?.data.softwareRequirements?.map(L=>toDependencyLd(L.name??L.identifier??``,L.version,L.identifier,L.runtimePlatform)),_t=collectDevelopmentDeps({cargo:Ae,gem:je,javaPomXml:te,nodePackageJson:ae,rubyGemspec:_e}),vt=_t.length>0?deduplicateDependencies(_t):be?.data.softwareSuggestions?.map(L=>toDependencyLd(L.name??L.identifier??``,L.version,L.identifier,L.runtimePlatform)),yt=Se?.data.commitDateFirst??xe?.data.createdAt??be?.data.dateCreated,bt=Se?.data.commitDateLast??xe?.data.pushedAt??be?.data.dateModified,xt=Ce?.data.publishDateLatest??we?.data.publishDateLatest??Ve?.data.releaseDate??xe?.data.releaseDateLatest??Se?.data.tagVersionDateLatest??be?.data.datePublished,St=ze?.data.copyrightYear??Me?.data.inceptionYear??(be?.data.copyrightYear===void 0?void 0:String(be.data.copyrightYear)),Ct=Te?.data.license??Ae?.data.license??resolvePythonLicense(Ee?.data.project?.license)??De?.data.license??Oe?.data.license??je?.data.license??firstPomLicense(Me)??Pe?.data.license??Re?.data.license??Ve?.data.license??xe?.data.licenseSpdxId??collectField(ne,L=>L.spdxId)[0]??resolveCmLicense(be?.data.license),wt=is.nonEmptyStringAndNotWhitespace(Ct)?toSpdxLicenseUrl(Ct):void 0,Tt=be?.data.isAccessibleForFree??(xe?.data.isPrivate===!1?!0:void 0),Et=nonEmpty$5(deduplicateStrings([...Te?.data.keywords??[],...Ee?.data.project?.keywords??[],...Ge?.keywords??[],...De?.data.keywords??[],...Oe?.data.keywords??[],...ke?.data.keywords??[],...Ae?.data.keywords??[],...Ie?.data.tags??[],...Ve?.data.categories??[],...xe?.data.topics??[],...be?.data.keywords??[]])),Dt=stripReadmeFragment(Te?.data.homepage)??caseInsensitiveLookup(Ee?.data.project?.urls,`homepage`)??Ge?.homepage??Ae?.data.homepage??De?.data.url??Oe?.data.url??ke?.data.home_page??je?.data.homepage??Me?.data.url??Pe?.data.url??Fe?.data.url??Ie?.data.url??Le?.data.siteUrl??Re?.data.url??ze?.data.url??Ve?.data.landingUrl??xe?.data.homepageUrl??be?.data.url??caseInsensitiveLookup(Ee?.data.project?.urls,`repository`)??Ge?.repository,Ot=Le?.data.downloadUrl??Fe?.data.download??Ce?.data.url??we?.data.url??be?.data.downloadUrl,kt=bugsUrlFromPackageJson(Te?.data.bugs)??Me?.data.issueManagementUrl??be?.data.issueTracker??(xe?.data.hasIssuesEnabled?`${xe.data.url}/issues`:void 0),At=Me?.data.ciManagementUrl??be?.data.continuousIntegration,jt=Ae?.data.documentation??be?.data.softwareHelp,Mt=Ve?.data.developmentStatus??be?.data.developmentStatus,Nt=be?.data.funding,Pt=be?.data.buildInstructions,Ft=readmeUrl(firstOf(ge),lt,xe?.data.defaultBranch??Se?.data.branchCurrent,firstOf(re)?.data.options.path)??be?.data.readme,It=be?.data.releaseNotes,Lt=be?.data.installUrl,Rt=be?.data.relatedLink,zt;return stripUndefined({"@context":`https://w3id.org/codemeta/3.0`,"@type":`SoftwareSourceCode`,applicationCategory:pt,applicationSubCategory:mt,author:Qe,buildInstructions:Pt,codeRepository:lt,continuousIntegration:At,contributor:tt,copyrightHolder:st,copyrightYear:is.nonEmptyStringAndNotWhitespace(St)&&Number.parseInt(St,10)||void 0,dateCreated:toDateOnly(yt),dateModified:toDateOnly(bt),datePublished:toDateOnly(xt),description:qe,developmentStatus:Mt,downloadUrl:Ot,funder:ct,funding:Nt,identifier:Ye,installUrl:Lt,isAccessibleForFree:Tt,issueTracker:kt,keywords:Et,license:wt,maintainer:it,name:Ke,operatingSystem:ft,programmingLanguage:ut,readme:Ft,relatedLink:Rt,releaseNotes:It,runtimePlatform:dt,softwareHelp:jt,softwareRequirements:gt,softwareSuggestions:vt,targetProduct:void 0,url:Dt,version:Je})});function gemspecAuthors(L){if(L===void 0)return[];let J=L.data.email===void 0?[]:Array.isArray(L.data.email)?L.data.email:[L.data.email];return L.data.authors.map((L,Y)=>toPersonOrOrgLd({email:J[Y],name:L}))}function resolvePersonsOrOrgs(L,J){let Y=L.filter(L=>L!==void 0);return Y.length>0?deduplicatePersonsOrOrgs(Y):deduplicatePersonsOrOrgs((J??[]).filter(L=>L!==void 0))}function collectRuntimeDeps(L){let J=[];return J.push(...collectArrayField(L.nodePackageJson,L=>objectEntriesToDeps(L.dependencies))),J.push(...(L.pyproject?.data.project?.dependencies??[]).map(L=>parsePep508Dep(L))),J.push(...(L.setupPy?.data.install_requires??[]).map(L=>parsePep508Dep(L))),J.push(...(L.setupCfg?.data.install_requires??[]).map(L=>parsePep508Dep(L))),J.push(...(L.pkgInfo?.data.requires_dist??[]).map(L=>parsePep508Dep(L))),J.push(...(L.cargo?.data.dependencies??[]).map(L=>toDependencyLd(L.name,L.version))),J.push(...collectArrayField(L.rubyGemspec,L=>L.dependencies.filter(L=>L.type===`runtime`).map(L=>toDependencyLd(L.name,L.requirements.join(`, `))))),J.push(...collectArrayField(L.javaPomXml,L=>L.dependencies.map(L=>toDependencyLd(L.artifactId,L.version,`${L.groupId}:${L.artifactId}`)))),J.push(...collectArrayField(L.goGoMod,L=>L.dependencies.map(L=>toDependencyLd(L.module,L.version)))),J.push(...(L.arduino?.data.depends??[]).map(L=>toDependencyLd(L.name,L.versionConstraint))),J.push(...(L.ofAddon?.data.dependencies??[]).map(L=>toDependencyLd(L))),J.push(...(L.ofInstall?.data.requirements??[]).map(L=>toDependencyLd(L))),J.push(...(L.cinder?.data.requires??[]).map(L=>toDependencyLd(L))),J.push(...(L.publiccode?.data.dependencies??[]).map(L=>toDependencyLd(L.name,L.version))),J}function collectDevelopmentDeps(L){let J=[];return J.push(...collectArrayField(L.nodePackageJson,L=>objectEntriesToDeps(L.devDependencies))),J.push(...(L.cargo?.data.devDependencies??[]).map(L=>toDependencyLd(L.name,L.version))),J.push(...collectArrayField(L.rubyGemspec,L=>L.dependencies.filter(L=>L.type===`development`).map(L=>toDependencyLd(L.name,L.requirements.join(`, `))))),J.push(...collectArrayField(L.javaPomXml,L=>L.devDependencies.map(L=>toDependencyLd(L.artifactId,L.version,`${L.groupId}:${L.artifactId}`)))),J}function objectEntriesToDeps(L){if(L!==void 0)return Object.entries(L).map(([L,J])=>toDependencyLd(L,J))}function parsePep508Dep(L){let J=L.trim(),Y=/^[\w.-]+/.exec(J);if(Y){let L=J.slice(Y[0].length).trim();return toDependencyLd(Y[0],L.length>0?L:void 0)}return toDependencyLd(J)}function repositoryUrlFromPackageJson(L){if(L!==void 0)return typeof L==`string`?L:L.url}function bugsUrlFromPackageJson(L){if(L!==void 0)return L.url}function firstPomLicense(L){let J=L?.data.licenses[0];return J?.name??J?.url}function resolvePythonLicense(L){if(L!==void 0)return typeof L==`string`?L:L.spdx??L.text}function resolveCmLicense(L){if(L!==void 0)return Array.isArray(L)?L[0]:L}function deduplicateStrings(L){let J=new Map;for(let Y of L){let L=Y.toLowerCase().trim();L.length>0&&!J.has(L)&&J.set(L,Y)}return[...J.values()]}function caseInsensitiveLookup(L,J){if(L===void 0)return;let Y=J.toLowerCase();for(let[J,X]of Object.entries(L))if(J.toLowerCase()===Y)return X}function stripReadmeFragment(L){if(L!==void 0)return L.endsWith(`#readme`)?L.slice(0,-7):L}function toDateOnly(L){if(L===void 0)return;if(/^\d{4}-\d{2}-\d{2}$/.test(L))return L;let J=/^(\d{4}-\d{2}-\d{2})T/.exec(L);return J?J[1]:L}function readmeUrl(L,J,Y,X){if(L===void 0)return;let Z=X===void 0?basename$1(L.source):relative$1(X,L.source).replaceAll(`\\`,`/`);if(is.nonEmptyStringAndNotWhitespace(J)&&J.includes(`github.com`)){let L=Y??`main`;return`${J.replace(/\.git$/,``)}/blob/${L}/${Z}`}return Z}const frontmatter=defineTemplate((L,J)=>{let Y=codemeta(L,J),X=codeMetaJsonDataSchema.parse(Y),Z=firstOf(L.codeStats)?.data,Q=firstOf(L.dependencyUpdates),$=firstOf(L.fileStats)?.data,ee=firstOf(L.cinderCinderblockXml)?.data,te=firstOf(L.github)?.data,ne=firstOf(L.gitStats)?.data,re=L.metascope?.data,ie=firstOf(L.nodeNpmRegistry)?.data,ae=firstOf(L.obsidianPluginManifestJson)?.data,oe=firstOf(L.obsidianPluginRegistry)?.data,se=firstOf(L.pythonPypiRegistry)?.data,ce=mixedStringsToArray(X.programmingLanguage??te?.primaryLanguage,REPLACEMENTS)??null,le=mixedStringsToArray(Z?.total?.languages,REPLACEMENTS)?.filter(L=>!ce?.includes(L))??null,ue=X.name===`undefined`?null:ee===void 0?X.name:`Cinder ${X.name}`,de=X.identifier??ue,fe=is.nonEmptyString(ue)?toAlias(ue):void 0,pe=de===fe?void 0:de;return{Name:fe??null,ID:de??null,Description:X.description??null,Author:mixedStringsToArray(toBasicNames(X.author))??null,Contributor:mixedStringsToArray(toBasicNames(X.contributor))??null,Maintainer:mixedStringsToArray(toBasicNames(X.maintainer))??null,Version:X.version??null,Account:te?.ownerLogin??null,Public:!(te?.isPrivate??!1),Fork:te?.isFork??!1,Published:!!(oe?.url??ie?.url??se?.url),Status:toStatus(X.codeRepository,X.author,[...X.contributor??[],...X.maintainer??[]],te?.isFork??!1,J.authorName,J.githubAccount),Tags:X.keywords??null,Aliases:nonEmpty$5([pe])??null,License:toBasicLicenses(X.license)??null,Language:ce,"Secondary Language":le,"Repo Path":re?.options.path===void 0?null:`file://${re.options.path}`,"VS Code Path":re?.options.path===void 0?null:`vscode://file/${re.options.path}`,"Readme Path":toLocalUrl(X.readme,re?.options.path)??null,"Homepage URL":X.url!==void 0&&!X.url.startsWith(`https://github.com/`)?X.url:null,"Repo URL":X.codeRepository??te?.url??null,"Issues URL":X.issueTracker??null,"Readme URL":X.readme!==void 0&&isValidUrl(X.readme)?X.readme:null,"Package URL":oe?.url??ie?.url??se?.url??null,Created:X.dateCreated??null,"First Commit Date":ne?.commitDateFirst??null,"Latest Commit Date":ne?.commitDateLast??null,"Latest Push Date":te?.pushedAt??null,"Latest Release Date":te?.releaseDateLatest??ie?.publishDateLatest??se?.publishDateLatest??ne?.tagVersionDateLatest??null,"Latest Release Version":ae?.version??ie?.versionLatest??se?.versionLatest??te?.releaseVersionLatest??ne?.tagVersionLatest??null,Stars:te?.stargazerCount??null,Watchers:te?.watcherCount??null,Contributors:te?.contributorCount??ne?.contributorCount??null,Forks:te?.forkCount??null,"Downloads Total":ie?.downloadsTotal??oe?.downloadCount??se?.downloads180Days??te?.releaseDownloadCount??null,"Downloads Monthly":ie?.downloadsMonthly??se?.downloadsMonthly??null,Releases:te?.releaseCount??ne?.tagReleaseCount??null,"Issues Open":te?.issueCountOpen??null,"Issues Closed":te?.issueCountClosed??null,"PRs Open":te?.pullRequestCountOpen??null,"PRs Merged":te?.pullRequestCountMerged??null,"PRs Closed":te?.pullRequestCountClosed??null,"Vulnerability Alerts":te?.vulnerabilityAlertCount??null,"Lines of Code":Z?.total?.code??null,"Total Files":$?.totalFileCount??null,"Total Size MB":toMb($?.totalSizeBytes)??null,"Tracked Files":ne?.trackedFileCount??null,"Tracked Size MB":toMb(ne?.trackedSizeBytes)??null,"GitHub Size MB":toMb(te?.diskUsageBytes)??null,Dependencies:dependencyNames(X,`prod`)??null,"Dev Dependencies":dependencyNames(X,`dev`)??null,"Major Updates":Q?.data.major?.length??0,"Minor Updates":Q?.data.minor?.length??0,"Patch Updates":Q?.data.patch?.length??0,"Total Updates":Q?.extra?.total??0,Libyears:Q?.extra?.libyears??0,Runtime:X.runtimePlatform??null,"Operating System":X.operatingSystem??null,"Forked From":te?.forkedFrom??null,"Fork Ahead":te?.commitsAheadUpstream??null,"Fork Behind":te?.commitsBehindUpstream??null,"Template From":te?.templateFrom??null,Organization:te?.isInOrganization??!1,Monorepo:re?.workspaceDirectories===void 0?!1:re.workspaceDirectories.length>0,"Git Commits":ne?.commitCount??null,"Git Dirty Files":ne?.uncommittedFileCount??null,"Git Remotes Ahead":ne?.totalAhead??null,"Git Remotes Behind":ne?.totalBehind??null,"Git LFS":ne?.hasLfs??te?.hasLfs??!1,"Git Tags":ne?.tagCount??null,"Git Current Branch":ne?.branchCurrent??null,"Git Branches":ne?.branchCount??null,"Git Remotes":ne?.remoteCount??null,"Git Submodules":ne?.submoduleCount??0}});function normalizeGitUrl(L){if(L===void 0)return;let J=L;return J.startsWith(`git+`)&&(J=J.slice(4)),J.endsWith(`.git`)&&(J=J.slice(0,-4)),J}const metadata=defineTemplate((L,J)=>{let Y=codemeta(L,J),X=codeMetaJsonDataSchema.parse(Y),Z=firstOf(L.metadataFile)?.data,Q=Z?.homepage??X.url??X.codeRepository;return{description:Z?.description??X.description,homepage:normalizeGitUrl(Q),topics:Z?.keywords??X.keywords}}),project=defineTemplate((L,J)=>{let Y=codemeta(L,J),X=codeMetaJsonDataSchema.parse(Y),Z=firstOf(L.dependencyUpdates),Q=firstOf(L.github)?.data,$=firstOf(L.gitStats)?.data,ee=L.metascope?.data,te=firstOf(L.nodeNpmRegistry)?.data,ne=firstOf(L.nodePackageJson);return{description:X.description,firstCommitDate:$?.commitDateFirst,gitHubLink:Q?.url,gitHubStarCount:Q?.stargazerCount,gitIsClean:$?.isClean,gitIsDirty:$?.isDirty,gitRemoteCount:$?.remoteCount,homepage:Q?.homepageUrl??X.url??Q?.url,isAuthoredByMe:isAuthoredBy(X.author,J.authorName),isOnMyGitHub:isOnGithubAccountOf(X.codeRepository,J.githubAccount),isOnNpm:te?.url!==void 0,isPublic:!(Q?.isPrivate??!1),isRemoteAhead:$?.isRemoteAhead,issueCount:Q?.issueCountOpen,lastCommitDate:$?.commitDateLast,license:toBasicLicenses(X.license??Q?.licenseSpdxId)?.at(0),majorUpdateCount:Z?.data.major?.length??0,majorUpdateList:Z?.data.major?.map(L=>L.name),npmDownloadCount:te?.downloadsTotal,readmePath:toLocalUrl(X.readme,ee?.options.path),repositoryPath:ee?.options.path===void 0?void 0:`file://${ee.options.path}`,semverUpdateCount:void 0,semverUpdateList:void 0,tags:X.keywords,title:X.name,type:toStatusLegacy(X.codeRepository,X.author,J.authorName,J.githubAccount),usesPnpm:usesPnpm(ne),usesSharedConfig:hasDependencyWithId(`@kitschpatrol/shared-config`,X),version:X.version}}),templates={codemeta,frontmatter,metadata,project};function isKeyOfTemplate(L){return typeof L==`string`&&L in templates}const execFileAsync=promisify(execFile),sources=[arduinoLibraryPropertiesSource,cinderCinderblockXmlSource,codemetaJsonSource,gitConfigSource,goGoModSource,goGoreleaserYamlSource,javaPomXmlSource,licenseFileSource,metadataFileSource,metascopeSource,nodePackageJsonSource,obsidianPluginManifestJsonSource,openframeworksAddonConfigMkSource,openframeworksInstallXmlSource,processingLibraryPropertiesSource,processingSketchPropertiesSource,publiccodeYamlSource,pythonPkgInfoSource,pythonPyprojectTomlSource,pythonSetupCfgSource,pythonSetupPySource,readmeFileSource,rubyGemspecSource,rustCargoTomlSource,xcodeInfoPlistSource,xcodeProjectPbxprojSource,codeStatsSource,dependencyUpdatesSource,fileStatsSource,gitStatsSource,githubSource,nodeNpmRegistrySource,obsidianPluginRegistrySource,pythonPypiRegistrySource],sourceNames=sources.map(L=>L.key);async function resolveCredentials(L){if(L?.githubToken)return L;let J=process.env.GITHUB_TOKEN;if(J)return{...L,githubToken:J};try{let{stdout:J}=await execFileAsync(`gh`,[`auth`,`token`]),Y=J.trim();if(Y)return{...L,githubToken:Y}}catch{}return L??{}}function resolveTemplate(L){if(L!==void 0){if(typeof L==`function`)return L;if(isKeyOfTemplate(L))return templates[L];log$2.warn(`Unknown template: "${L}". Using default (all fields).`)}}async function runSources(L,J,Y){let X=await Promise.all(L.map(async L=>{try{let Y=performance.now(),X=await L.extract(J),Z=Math.round(performance.now()-Y);return log$2.debug(`Source "${L.key}" extracted in ${Z}ms`),{data:X,key:L.key}}catch(J){return log$2.warn(`Source "${L.key}" extraction failed: ${J instanceof Error?J.message:String(J)}`),{data:void 0,key:L.key}}}));for(let L of X)L.data!==void 0&&Object.assign(Y,{[L.key]:L.data})}async function getMetadata(L){let J=performance.now(),Y=defu(L??{},DEFAULT_GET_METADATA_OPTIONS),X=resolve$1(Y.path),Z;try{Z=await stat(X)}catch{throw Error(`Path does not exist: ${X}`)}if(!Z.isDirectory())throw Error(`Path is not a directory: ${X}`);let Q=resolveTemplate(Y.template);resetMatchCache(),log$2.debug(`Building file tree (respectIgnored: ${Y.respectIgnored})...`);let[$,ee]=await Promise.all([resolveCredentials(Y.credentials),getTree(X,Y.respectIgnored)]);log$2.debug(`Root file tree contains ${ee.length} entries`);let te={arduinoLibraryProperties:void 0,cinderCinderblockXml:void 0,codemetaJson:void 0,codeStats:void 0,dependencyUpdates:void 0,fileStats:void 0,gitConfig:void 0,github:void 0,gitStats:void 0,goGoMod:void 0,goGoreleaserYaml:void 0,javaPomXml:void 0,licenseFile:void 0,metadataFile:void 0,metascope:void 0,nodeNpmRegistry:void 0,nodePackageJson:void 0,obsidianPluginManifestJson:void 0,obsidianPluginRegistry:void 0,openframeworksAddonConfigMk:void 0,openframeworksInstallXml:void 0,processingLibraryProperties:void 0,processingSketchProperties:void 0,publiccodeYaml:void 0,pythonPkgInfo:void 0,pythonPypiRegistry:void 0,pythonPyprojectToml:void 0,pythonSetupCfg:void 0,pythonSetupPy:void 0,readmeFile:void 0,rubyGemspec:void 0,rustCargoToml:void 0,xcodeInfoPlist:void 0,xcodeProjectPbxproj:void 0},ne=Y.sources?sources.filter(L=>Y.sources.includes(L.key)):sources,re=new Set,ie=new Set(ne.map(L=>L.phase));for(let L of[...ie].toSorted((L,J)=>L-J)){let J=ne.filter(J=>J.phase===L);log$2.debug(`Phase ${L}: Running ${J.length} sources...`),await runSources(J,{completedSources:re,metadata:{...te},options:{...Y,credentials:$,path:X}},te);for(let L of J)re.add(L.key)}let ae=performance.now()-J;if(te.metascope&&(te.metascope.data.durationMs=Math.round(ae)),log$2.debug(`Metadata duration: ${prettyMilliseconds(ae)}`),Q){let L=performance.now(),X=stripUndefined(Q(te,Y.templateData??{}))??{},Z=performance.now()-L;return log$2.debug(`Template duration: ${prettyMilliseconds(Z)}`),log$2.debug(`Total duration: ${prettyMilliseconds(performance.now()-J)}`),X}let oe=stripUndefined(te);return log$2.debug(`Total duration: ${prettyMilliseconds(performance.now()-J)}`),oe}const cliCommandName=Object.keys(bin).at(0),builtInTemplateNames=Object.keys(templates),yargsInstance=Yargs(hideBin(process.argv));await yargsInstance.scriptName(cliCommandName).command(`$0 [path]`,`Extract metadata from a code repository.`,L=>L.positional(`path`,{default:DEFAULT_GET_METADATA_OPTIONS.path,description:`Project directory path`,type:`string`}).option(`template`,{alias:`t`,description:`Built-in template name (${builtInTemplateNames.map(L=>`\`${L}\``).join(`, `)}) or path to a custom template file`,type:`string`}).option(`github-token`,{description:"GitHub API token (or set `$GITHUB_TOKEN`)",type:`string`}).option(`author-name`,{description:`Optional author name(s) for ownership checks in templates`,type:`string`,array:!0}).option(`github-account`,{description:`Optional GitHub account name(s) for ownership checks in templates`,type:`string`,array:!0}).option(`absolute`,{description:"Output absolute paths. Use `--no-absolute` for relative paths.",type:`boolean`,default:DEFAULT_GET_METADATA_OPTIONS.absolute}).option(`offline`,{description:`Skip sources requiring network requests`,type:`boolean`,default:DEFAULT_GET_METADATA_OPTIONS.offline}).option(`sources`,{alias:`s`,array:!0,choices:sourceNames,description:`Only run specific metadata sources (defaults to all)`,type:`string`}).option(`no-ignore`,{description:`Include files ignored by .gitignore in the file tree`,type:`boolean`,default:!DEFAULT_GET_METADATA_OPTIONS.respectIgnored}).option(`recursive`,{alias:`r`,description:`Search for metadata files recursively in subdirectories`,type:`boolean`,default:DEFAULT_GET_METADATA_OPTIONS.recursive}).option(`workspaces`,{alias:`w`,coerce:L=>{if(L===!0||L===!1)return L;let J=(Array.isArray(L)?L:[L]).filter(L=>typeof L==`string`);return J.length>0?J:!0},default:DEFAULT_GET_METADATA_OPTIONS.workspaces,description:"Include workspace-specific metadata in monorepos; pass a `boolean` to enable or disable auto-detection, or pass one or more `string`s to explicitly define workspace paths"}).option(`verbose`,{description:`Run with verbose logging`,type:`boolean`,default:!1}),async L=>{let J=createLogger$3({name,verbose:L.verbose??!1,logToConsole:{showTime:!1}});setLogger$1(J),setLogger(getChildLogger(J,`read-pyproject`)),J.debug(`Starting metadata extraction...`);let Y;if(L.template)if(isKeyOfTemplate(L.template))Y=templates[L.template];else try{let{createJiti:X}=await import(`./jiti-D2Njwwqq.js`),Z=await X(import.meta.url).import(L.template);if(typeof Z==`object`&&Z&&`default`in Z&&typeof Z.default==`function`){let L=Z.default;Y=(J,Y)=>L(J,Y)}if(typeof Y!=`function`){J.error(`Template file must export a function as default export. Use defineTemplate().`),process.exitCode=1;return}}catch(L){J.error(`Failed to load template: ${L instanceof Error?L.message:String(L)}`),process.exitCode=1;return}try{let J=L.githubToken?{githubToken:L.githubToken}:void 0,X={...L.authorName?{authorName:L.authorName}:{},...L.githubAccount?{githubAccount:L.githubAccount}:{}},Z={absolute:L.absolute,credentials:J,offline:L.offline,path:L.path,recursive:L.recursive,respectIgnored:L.noIgnore?!1:void 0,sources:L.sources,templateData:X,workspaces:L.workspaces},Q=Y?await getMetadata({...Z,template:Y}):await getMetadata(Z),$=process.stdout.isTTY?JSON.stringify(Q,void 0,2):JSON.stringify(Q);process.stdout.write($+`
45845
45845
  `)}catch(L){J.error(`Metadata extraction failed: ${L instanceof Error?L.message:String(L)}`),process.exitCode=1}}).alias(`h`,`help`).version(version$1).alias(`v`,`version`).help().strict().wrap(process.stdout.isTTY?Math.min(120,yargsInstance.terminalWidth()):0).parse();export{};