@redocly/cli 2.61.0 → 2.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/THIRD_PARTY_NOTICES +22 -1
  2. package/lib/chunks/{FAIK7Y6U.js → 23KTTVIR.js} +1 -1
  3. package/lib/chunks/{B6HOY6AV.js → 2XK7ML3U.js} +1 -1
  4. package/lib/chunks/{7FLYZDPU.js → 37WWN4MA.js} +1 -1
  5. package/lib/chunks/{3VI3PRNZ.js → 3C6UUCEW.js} +1 -1
  6. package/lib/chunks/{ZOE6CZ74.js → 3DEJQSYG.js} +1 -1
  7. package/lib/chunks/{47H7SS4U.js → 3JYY42DL.js} +1 -1
  8. package/lib/chunks/{FAZWASU6.js → 3M4FKKBI.js} +1 -1
  9. package/lib/chunks/5NOJ76EP.js +9 -0
  10. package/lib/chunks/{IKDYY4XW.js → 5S5OMDQZ.js} +1 -1
  11. package/lib/chunks/{6ETCN64B.js → 5UYYEBJY.js} +1 -1
  12. package/lib/chunks/{V5CIDI6D.js → 5YW5LAGV.js} +1 -1
  13. package/lib/chunks/{WSOBFTCE.js → 6EGJEFXO.js} +1 -1
  14. package/lib/chunks/{F6IXS3RL.js → 6NB3FKVN.js} +8 -8
  15. package/lib/chunks/{DNQSGL2N.js → 7YNVVBUW.js} +1 -1
  16. package/lib/chunks/{SFNDGMJM.js → AB2EMYEK.js} +1 -1
  17. package/lib/chunks/{MXOINKB2.js → B64RMZSV.js} +1 -1
  18. package/lib/chunks/{PSEWUH36.js → BX2H6D2W.js} +1 -1
  19. package/lib/chunks/{OXA7GLZA.js → DBBMGF4W.js} +1 -1
  20. package/lib/chunks/{GJDVFWVH.js → G55KF2JU.js} +1 -1
  21. package/lib/chunks/{HHJX3B7U.js → GVQMC2WB.js} +1 -1
  22. package/lib/chunks/{GGRILIN6.js → HBENVUR4.js} +1 -1
  23. package/lib/chunks/{6NGWHZCB.js → ID2DJAJI.js} +1 -1
  24. package/lib/chunks/{QFJ6QZPG.js → KQ5RN67Y.js} +1 -1
  25. package/lib/chunks/{GZ7EDJXV.js → L3H2DSRP.js} +1 -1
  26. package/lib/chunks/LNYTDBAU.js +12 -0
  27. package/lib/chunks/{MK6X55UC.js → LVGVWPDB.js} +1 -1
  28. package/lib/chunks/{2KG4GEMM.js → LWPTRXNP.js} +1 -1
  29. package/lib/chunks/{YEOWW3LR.js → NBI4EQPC.js} +1 -1
  30. package/lib/chunks/{SZVRKEMY.js → O7F2NBMC.js} +3 -3
  31. package/lib/chunks/{6GH5BRNP.js → P7MVM2ZA.js} +1 -1
  32. package/lib/chunks/{7RZON3J3.js → PRSNVDUV.js} +1 -1
  33. package/lib/chunks/{ZH5HJBCG.js → QMIOB64K.js} +1 -1
  34. package/lib/chunks/{DDAZZC3I.js → QWPV64G2.js} +1 -1
  35. package/lib/chunks/{E5BMYA7V.js → REIGI2Y7.js} +1 -1
  36. package/lib/chunks/{LR2FZ43E.js → RGU6OZYB.js} +1 -1
  37. package/lib/chunks/{2WJSVZYJ.js → RUIEI3YV.js} +1 -1
  38. package/lib/chunks/{LXU55G2P.js → S6NFOZ34.js} +1 -1
  39. package/lib/chunks/SOI7RTB4.js +8 -0
  40. package/lib/chunks/{JP2RKFML.js → SXBAAS4M.js} +1 -1
  41. package/lib/chunks/{WCWEP2X5.js → U77FTE2C.js} +1 -1
  42. package/lib/chunks/{6L6AYZQS.js → UFZ7VJKO.js} +1 -1
  43. package/lib/chunks/{ERFYZ47T.js → UWK3L6LB.js} +1 -1
  44. package/lib/chunks/{6ZVVKLZR.js → VE45GKNY.js} +1 -1
  45. package/lib/chunks/{RPQMBRTA.js → VXLODB3S.js} +1 -1
  46. package/lib/chunks/{KVXNE2UB.js → W3G6AQCC.js} +1 -1
  47. package/lib/chunks/{45DZYRBQ.js → WPIZQQ5C.js} +1 -1
  48. package/lib/chunks/{HBPMIV7U.js → XJTGJYVS.js} +1 -1
  49. package/lib/chunks/{MAHMSXK6.js → XVZ7A34Y.js} +1 -1
  50. package/lib/chunks/{IMYWYFYT.js → Y5AAEFMH.js} +1 -1
  51. package/lib/chunks/YDVWNFMS.js +24 -0
  52. package/lib/chunks/{GLOLLUKD.js → YINR7LU6.js} +1 -1
  53. package/lib/chunks/{FUH5ZFZ2.js → YPYZCXVX.js} +1 -1
  54. package/lib/chunks/{3QZ3M2JX.js → ZJYDDU5M.js} +1 -1
  55. package/lib/chunks/{MUKYSFRK.js → ZNQTCB4Q.js} +1 -1
  56. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  57. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  58. package/lib/eject-assets/generators/cli/index.ts +2 -2
  59. package/lib/eject-assets/generators/cli/render.ts +1 -1
  60. package/lib/eject-assets/generators/go/client.ts +1 -1
  61. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  62. package/lib/eject-assets/generators/go/index.ts +2 -2
  63. package/lib/eject-assets/generators/go/models.ts +1 -1
  64. package/lib/eject-assets/generators/go/naming.ts +1 -1
  65. package/lib/eject-assets/generators/go/operations.ts +1 -1
  66. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  67. package/lib/eject-assets/generators/go/types.ts +1 -1
  68. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  69. package/lib/eject-assets/generators/mock/index.ts +2 -2
  70. package/lib/eject-assets/generators/mock/render.ts +1 -1
  71. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  72. package/lib/eject-assets/generators/mock/values.ts +1 -1
  73. package/lib/eject-assets/generators/php/client.ts +1 -1
  74. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  75. package/lib/eject-assets/generators/php/index.ts +2 -2
  76. package/lib/eject-assets/generators/php/models.ts +1 -1
  77. package/lib/eject-assets/generators/php/naming.ts +1 -1
  78. package/lib/eject-assets/generators/php/operations.ts +1 -1
  79. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  80. package/lib/eject-assets/generators/php/types.ts +1 -1
  81. package/lib/eject-assets/generators/python/client.ts +1 -1
  82. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  83. package/lib/eject-assets/generators/python/index.ts +2 -2
  84. package/lib/eject-assets/generators/python/models.ts +1 -1
  85. package/lib/eject-assets/generators/python/naming.ts +1 -1
  86. package/lib/eject-assets/generators/python/operations.ts +1 -1
  87. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  88. package/lib/eject-assets/generators/python/types.ts +1 -1
  89. package/lib/eject-assets/generators/swr/index.ts +2 -2
  90. package/lib/eject-assets/generators/swr/render.ts +1 -1
  91. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  92. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  93. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  94. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  95. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  96. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  97. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  98. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  99. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  100. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  101. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  102. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  103. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  104. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  105. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  106. package/lib/eject-assets/generators/zod/index.ts +2 -2
  107. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  108. package/lib/index.js +31 -31
  109. package/package.json +1 -1
  110. package/lib/chunks/3TBVUHVH.js +0 -9
  111. package/lib/chunks/IRHTRVFK.js +0 -22
@@ -785,4 +785,25 @@ Packages:
785
785
  stickyfill@1.1.1 — Copyright (c) 2014 Oleg Korsunsky
786
786
 
787
787
  License text:
788
- (no license text found)
788
+ The MIT License (MIT)
789
+
790
+ Copyright (c) 2014 Oleg Korsunsky
791
+ Copyright (c) 2014 Automattic Inc.
792
+
793
+ Permission is hereby granted, free of charge, to any person obtaining a copy
794
+ of this software and associated documentation files (the "Software"), to deal
795
+ in the Software without restriction, including without limitation the rights
796
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
797
+ copies of the Software, and to permit persons to whom the Software is
798
+ furnished to do so, subject to the following conditions:
799
+
800
+ The above copyright notice and this permission notice shall be included in
801
+ all copies or substantial portions of the Software.
802
+
803
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
804
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
805
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
806
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
807
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
808
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
809
+ THE SOFTWARE.
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as x,b as f,c as m,d}from"./MAHMSXK6.js";import{b as y,d as h,e as l}from"./LD5MEXEL.js";import{m as P}from"./UW4UC7ZI.js";import{join as E}from"node:path";function q(e,t){let n=x(e,"tanstack-query");if(n.length===0)return"";let r=t.pagination??new Map;return[j(n,t,r),...n.filter(f).map(i=>K(i,t.queryKeyPrefix)),Q(e,n,r,t.queryKeyPrefix,t.argsStyle),...R(n,r)].join(`
7
+ import{a as x,b as f,c as m,d}from"./XVZ7A34Y.js";import{b as y,d as h,e as l}from"./LD5MEXEL.js";import{m as P}from"./UW4UC7ZI.js";import{join as E}from"node:path";function q(e,t){let n=x(e,"tanstack-query");if(n.length===0)return"";let r=t.pagination??new Map;return[j(n,t,r),...n.filter(f).map(i=>K(i,t.queryKeyPrefix)),Q(e,n,r,t.queryKeyPrefix,t.argsStyle),...R(n,r)].join(`
8
8
  `)}function b(e,t){if(!f(e))return!1;let n=t.get(e.name);return n!==void 0&&n.spec.style!=="link"}function j(e,t,n){let r=[...e.some(a=>b(a,n))?["infiniteQueryOptions"]:[],...e.some(f)?["queryOptions"]:[]],s=[...e.filter(m).map(d),"RequestOptions"].sort().map(a=>`type ${a}`),i=[];return r.length>0&&i.push(`import { ${r.join(", ")} } from "@tanstack/${t.framework}-query";`),i.push(`import { client, ${s.join(", ")} } from "${t.sdkModule}";`),i.join(`
9
9
  `)}function K(e,t){let n=M(e,t);return m(e)?`export const ${e.name}QueryKey = (vars?: ${d(e)}) =>
10
10
  vars === undefined ? ([${n}] as const) : ([${n}, vars] as const);`:`export const ${e.name}QueryKey = () => [${n}] as const;`}function M(e,t){return t===void 0?`"${e.name}"`:`${h(t)}, "${e.name}"`}function Q(e,t,n,r,s){return`/**
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as bs}from"./H4VN2RX3.js";import{c as xs,d as ni}from"./F6IXS3RL.js";import{$ as ot,A as rm,B as im,C as om,D as sm,E as am,F as lm,G as um,H as cm,I as fm,J as pm,K as mm,Q as ls,S as us,U as cs,V as fs,W as ps,Y as ms,aa as et,ba as ze,c as $t,ea as Me,g as os,ga as ds,ia as G,ka as ti,la as hs,ma as gs,pa as xn,q as ss,u as pt,ua as ys,w as as,x as nm}from"./22EANOP2.js";import"./NEWT5A6S.js";import{c as it,d as tm,e as Lt}from"./RFWIIJFG.js";var ws=it(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var dm=am(),hm=lm(),gm=um(),ym=cm(),ks=fm(),xm=[dm.default,hm.default,(0,gm.default)(),ym.default,ks.metadataVocabulary,ks.contentVocabulary];ri.default=xm});var Ss=it((tw,bm)=>{bm.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ls=it((Se,ii)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var km=sm(),wm=ws(),Sm=pm(),Cs=Ss(),Cm=["/properties"],Yn="http://json-schema.org/draft-07/schema",Ut=class extends km.default{_addVocabularies(){super._addVocabularies(),wm.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(Sm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(Cs,Cm):Cs;this.addMetaSchema(n,Yn,!1),this.refs["http://json-schema.org/schema"]=Yn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yn)?Yn:void 0)}};Se.Ajv=Ut;ii.exports=Se=Ut;ii.exports.Ajv=Ut;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Ut;var Lm=rm();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Lm.KeywordCxt}});var Wt=nm();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Wt._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Wt.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Wt.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Wt.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Wt.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Wt.CodeGen}});var Am=im();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return Am.default}});var Em=om();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return Em.default}})});var Sn=it((Nw,Ma)=>{"use strict";var _a="[^\\\\/]",pd="(?=.)",Fa="[^/]",Pi="(?:\\/|$)",Oa="(?:^|\\/)",Di=`\\.{1,2}${Pi}`,md="(?!\\.)",dd=`(?!${Oa}${Di})`,hd=`(?!\\.{0,1}${Pi})`,gd=`(?!${Di})`,yd="[^.\\/]",xd=`${Fa}*?`,bd="/",Na={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:pd,QMARK:Fa,END_ANCHOR:Pi,DOTS_SLASH:Di,NO_DOT:md,NO_DOTS:dd,NO_DOT_SLASH:hd,NO_DOTS_SLASH:gd,QMARK_NO_DOT:yd,STAR:xd,START_ANCHOR:Oa,SEP:bd},kd={...Na,SLASH_LITERAL:"[\\\\/]",QMARK:_a,STAR:`${_a}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},wd={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ma.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wd,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?kd:Na}}});var Cn=it(je=>{"use strict";var{REGEX_BACKSLASH:Sd,REGEX_REMOVE_BACKSLASH:Cd,REGEX_SPECIAL_CHARS:Ld,REGEX_SPECIAL_CHARS_GLOBAL:Ad}=Sn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Ld.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Ad,"\\$1");je.toPosixSlashes=e=>e.replace(Sd,"/");je.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};je.removeBackslashes=e=>e.replace(Cd,n=>n==="\\"?"":n);je.escapeLast=(e,n,t)=>{let r=e.lastIndexOf(n,t);return r===-1?e:e[r-1]==="\\"?je.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};je.removePrefix=(e,n={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),n.prefix="./"),t};je.wrapOutput=(e,n={},t={})=>{let r=t.contains?"":"^",i=t.contains?"":"$",o=`${r}(?:${e})${i}`;return n.negated===!0&&(o=`(?:^(?!${o}).*$)`),o};je.basename=(e,{windows:n}={})=>{let t=e.split(n?/[\\/]/:"/"),r=t[t.length-1];return r===""?t[t.length-2]:r}});var Ua=it((Pw,ja)=>{"use strict";var Pa=Cn(),{CHAR_ASTERISK:Bi,CHAR_AT:Ed,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Td,CHAR_DOT:qi,CHAR_EXCLAMATION_MARK:Hi,CHAR_FORWARD_SLASH:za,CHAR_LEFT_CURLY_BRACE:zi,CHAR_LEFT_PARENTHESES:rr,CHAR_LEFT_SQUARE_BRACKET:Rd,CHAR_PLUS:vd,CHAR_QUESTION_MARK:Da,CHAR_RIGHT_CURLY_BRACE:Id,CHAR_RIGHT_PARENTHESES:Ba,CHAR_RIGHT_SQUARE_BRACKET:$d}=Sn(),qa=e=>e===za||e===Kt,Ha=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},_d=(e,n)=>{let t=n||{},r=e.length-1,i=t.parts===!0||t.tokens===!0||t.scanToEnd===!0,o=[],s=[],a=[],l=e,u=-1,c=0,p=0,m=!1,d=!1,h=!1,w=!1,k=!1,y=!1,S=!1,L=!1,_=!1,B=!1,R=0,I,N,v={value:"",depth:0,isGlob:!1},b=()=>u>=r,Z=()=>l.charCodeAt(u+1),X=()=>(I=N,l.charCodeAt(++u));for(;u<r;){N=X();let re;if(N===Kt){S=v.backslashes=!0,N=X(),N===zi&&(y=!0);continue}if(y===!0||N===zi){for(R++;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===zi){R++;continue}if(y!==!0&&N===qi&&(N=X())===qi){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(y!==!0&&N===Td){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Id&&(R--,R===0)){y=!1,m=v.isBrace=!0,B=!0;break}}if(i===!0)continue;break}if(N===za){if(o.push(u),s.push(v),v={value:"",depth:0,isGlob:!1},B===!0)continue;if(I===qi&&u===c+1){c+=2;continue}p=u+1;continue}if(t.noext!==!0&&(N===vd||N===Ed||N===Bi||N===Da||N===Hi)===!0&&Z()===rr){if(h=v.isGlob=!0,w=v.isExtglob=!0,B=!0,N===Hi&&u===c&&(_=!0),i===!0){let be=0;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){be++;continue}if(N===Ba&&--be===0){B=!0;break}}continue}break}if(N===Bi){if(I===Bi&&(k=v.isGlobstar=!0),h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Da){if(h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Rd){for(;b()!==!0&&(re=X());){if(re===Kt){S=v.backslashes=!0,X();continue}if(re===$d){d=v.isBracket=!0,h=v.isGlob=!0,B=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&N===Hi&&u===c){L=v.negated=!0,c++;continue}if(t.noparen!==!0&&N===rr){if(h=v.isGlob=!0,i===!0){let de=1;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){de++;continue}if(N===Ba&&--de===0){B=!0;break}}continue}break}if(h===!0){if(B=!0,i===!0)continue;break}}t.noext===!0&&(w=!1,h=!1);let Y=l,E="",x="";c>0&&(E=l.slice(0,c),l=l.slice(c),p-=c),Y&&h===!0&&p>0?(Y=l.slice(0,p),x=l.slice(p)):h===!0?(Y="",x=l):Y=l,Y&&Y!==""&&Y!=="/"&&Y!==l&&qa(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),t.unescape===!0&&(x&&(x=Pa.removeBackslashes(x)),Y&&S===!0&&(Y=Pa.removeBackslashes(Y)));let P={prefix:E,input:e,start:c,base:Y,glob:x,isBrace:m,isBracket:d,isGlob:h,isExtglob:w,isGlobstar:k,negated:L,negatedExtglob:_};if(t.tokens===!0&&(P.maxDepth=0,qa(N)||s.push(v),P.tokens=s),t.parts===!0||t.tokens===!0){let re;for(let C=0;C<o.length;C++){let le=re!==void 0?re+1:c,Le=o[C],A=e.slice(le,Le);t.tokens&&(C===0&&c!==0?(s[C].isPrefix=!0,s[C].value=E):s[C].value=A,Ha(s[C]),P.maxDepth+=s[C].depth),Le>=c&&(a.push(A),re=Le)}let de=re!==void 0?re+1:c,be=e.slice(de);a.push(be),t.tokens&&re&&re+1<e.length&&(s[s.length-1].value=be,Ha(s[s.length-1]),P.maxDepth+=s[s.length-1].depth),P.slashes=o,P.parts=a}return P};ja.exports=_d});var Ga=it((Dw,Ka)=>{"use strict";var Ln=Sn(),Ke=Cn(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:Fd,REGEX_NON_SPECIAL_CHARS:Od,REGEX_SPECIAL_CHARS_BACKREF:Nd,REPLACEMENTS:Wa}=Ln,Md=(e,n)=>{if(typeof n.expandRange=="function")return n.expandRange(...e,n);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(i=>Ke.escapeRegex(i)).join("..")}return t},Gt=(e,n)=>`Missing ${e}: "${n}" - use "\\\\${n}" to match literal characters`,Va=e=>{let n=[],t=0,r=0,i=0,o="",s=!1;for(let a of e){if(s===!0){o+=a,s=!1;continue}if(a==="\\"){o+=a,s=!0;continue}if(a==='"'){i=i===1?0:1,o+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){n.push(o),o="";continue}}}o+=a}return n.push(o),n},Pd=e=>{let n=!1;for(let t of e){if(n===!0){n=!1;continue}if(t==="\\"){n=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Ui=e=>{let n=e.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(n)&&(n=n.slice(2,-1),t=!0);if(Pd(n))return n.replace(/\\(.)/g,"$1")},Dd=e=>{let n=e.map(Ui).filter(Boolean);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],o=n[r],s=i[0];if(!(!s||i!==s.repeat(i.length)||o!==s.repeat(o.length))&&(i===o||i.startsWith(o)||o.startsWith(i)))return!0}return!1},ji=(e,n=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let t=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(o===!0){o=!1;continue}if(a==="\\"){o=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return n===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},Bd=e=>`${e.length===1?Ke.escapeRegex(e[0]):`[${e.map(t=>Ke.escapeRegex(t)).join("")}]`}*`,qd=e=>{let n=0,t=[];for(;n<e.length;){let r=ji(e.slice(n),!1);if(!r||r.type!=="*")return;let i=Va(r.body).map(s=>s.trim());if(i.length!==1)return;let o=Ui(i[0]);if(!o||o.length!==1)return;t.push(o),n+=r.end+1}if(!(t.length<1))return t},Hd=e=>{let n=0,t=e.trim(),r=ji(t);for(;r;)n++,t=r.body.trim(),r=ji(t);return n},zd=(e,n)=>{if(n.maxExtglobRecursion===!1)return{risky:!1};let t=typeof n.maxExtglobRecursion=="number"?n.maxExtglobRecursion:Ln.DEFAULT_MAX_EXTGLOB_RECURSION,r=Va(e).map(a=>a.trim());if(r.length>1&&(r.some(a=>a==="")||r.some(a=>/^[*?]+$/.test(a))||Dd(r)))return{risky:!0};let i=[],o=!1,s=!0;for(let a of r){let l=qd(a);if(l){o=!0,i.push(...l);continue}let u=Ui(a);if(u&&u.length===1){i.push(u);continue}if(s=!1,Hd(a)>t)return{risky:!0}}return o?s?{risky:!0,safeOutput:Bd([...new Set(i)])}:{risky:!0}:{risky:!1}},Wi=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Wa[e]||e;let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",l=Ln.globChars(t.windows),u=Ln.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:w,NO_DOT_SLASH:k,NO_DOTS_SLASH:y,QMARK:S,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:B}=l,R=j=>`(${a}(?:(?!${B}${j.dot?h:c}).)*?)`,I=t.dot?"":w,N=t.dot?S:L,v=t.bash===!0?R(t):_;t.capture&&(v=`(${v})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let b={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=Ke.removePrefix(e,b),i=e.length;let Z=[],X=[],Y=[],E=o,x,P=()=>b.index===i-1,re=b.peek=(j=1)=>e[b.index+j],de=b.advance=()=>e[++b.index]||"",be=()=>e.slice(b.index+1),C=(j="",ge=0)=>{b.consumed+=j,b.index+=ge},le=j=>{b.output+=j.output!=null?j.output:j.value,C(j.value)},Le=()=>{let j=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)de(),b.start++,j++;return j%2===0?!1:(b.negated=!0,b.start++,!0)},A=j=>{b[j]++,Y.push(j)},ke=j=>{b[j]--,Y.pop()},ee=j=>{if(E.type==="globstar"){let ge=b.braces>0&&(j.type==="comma"||j.type==="brace"),z=j.extglob===!0||Z.length&&(j.type==="pipe"||j.type==="paren");j.type!=="slash"&&j.type!=="paren"&&!ge&&!z&&(b.output=b.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=v,b.output+=E.output)}if(Z.length&&j.type!=="paren"&&(Z[Z.length-1].inner+=j.value),(j.value||j.output)&&le(j),E&&E.type==="text"&&j.type==="text"){E.output=(E.output||E.value)+j.value,E.value+=j.value;return}j.prev=E,s.push(j),E=j},$e=(j,ge)=>{let z={...u[ge],conditions:1,inner:""};z.prev=E,z.parens=b.parens,z.output=b.output,z.startIndex=b.index,z.tokensIndex=s.length;let oe=(t.capture?"(":"")+z.open;A("parens"),ee({type:j,value:ge,output:b.output?"":d}),ee({type:"paren",extglob:!0,value:de(),output:oe}),Z.push(z)},Qe=j=>{let ge=e.slice(j.startIndex,b.index+1),z=e.slice(j.startIndex+2,b.index),oe=zd(z,t);if((j.type==="plus"||j.type==="star")&&oe.risky){let ye=oe.safeOutput?(j.output?"":d)+(t.capture?`(${oe.safeOutput})`:oe.safeOutput):void 0,Oe=s[j.tokensIndex];Oe.type="text",Oe.value=ge,Oe.output=ye||Ke.escapeRegex(ge);for(let Xe=j.tokensIndex+1;Xe<s.length;Xe++)s[Xe].value="",s[Xe].output="",delete s[Xe].suffix;b.output=j.output+Oe.output,b.backtrack=!0,ee({type:"paren",extglob:!0,value:x,output:""}),ke("parens");return}let he=j.close+(t.capture?")":""),we;if(j.type==="negate"){let ye=v;if(j.inner&&j.inner.length>1&&j.inner.includes("/")&&(ye=R(t)),(ye!==v||P()||/^\)+$/.test(be()))&&(he=j.close=`)$))${ye}`),j.inner.includes("*")&&(we=be())&&/^\.[^\\/.]+$/.test(we)){let Oe=Wi(we,{...n,fastpaths:!1}).output;he=j.close=`)${Oe})${ye})`}j.prev.type==="bos"&&(b.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:x,output:he}),ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let j=!1,ge=e.replace(Nd,(z,oe,he,we,ye,Oe)=>we==="\\"?(j=!0,z):we==="?"?oe?oe+we+(ye?S.repeat(ye.length):""):Oe===0?N+(ye?S.repeat(ye.length):""):S.repeat(he.length):we==="."?c.repeat(he.length):we==="*"?oe?oe+we+(ye?v:""):v:oe?z:`\\${z}`);return j===!0&&(t.unescape===!0?ge=ge.replace(/\\/g,""):ge=ge.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ge===e&&t.contains===!0?(b.output=e,b):(b.output=Ke.wrapOutput(ge,b,n),b)}for(;!P();){if(x=de(),x==="\0")continue;if(x==="\\"){let z=re();if(z==="/"&&t.bash!==!0||z==="."||z===";")continue;if(!z){x+="\\",ee({type:"text",value:x});continue}let oe=/^\\+/.exec(be()),he=0;if(oe&&oe[0].length>2&&(he=oe[0].length,b.index+=he,he%2!==0&&(x+="\\")),t.unescape===!0?x=de():x+=de(),b.brackets===0){ee({type:"text",value:x});continue}}if(b.brackets>0&&(x!=="]"||E.value==="["||E.value==="[^")){if(t.posix!==!1&&x===":"){let z=E.value.slice(1);if(z.includes("[")&&(E.posix=!0,z.includes(":"))){let oe=E.value.lastIndexOf("["),he=E.value.slice(0,oe),we=E.value.slice(oe+2),ye=Fd[we];if(ye){E.value=he+ye,b.backtrack=!0,de(),!o.output&&s.indexOf(E)===1&&(o.output=d);continue}}}(x==="["&&re()!==":"||x==="-"&&re()==="]")&&(x=`\\${x}`),x==="]"&&(E.value==="["||E.value==="[^")&&(x=`\\${x}`),t.posix===!0&&x==="!"&&E.value==="["&&(x="^"),E.value+=x,le({value:x});continue}if(b.quotes===1&&x!=='"'){x=Ke.escapeRegex(x),E.value+=x,le({value:x});continue}if(x==='"'){b.quotes=b.quotes===1?0:1,t.keepQuotes===!0&&ee({type:"text",value:x});continue}if(x==="("){A("parens"),ee({type:"paren",value:x});continue}if(x===")"){if(b.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Gt("opening","("));let z=Z[Z.length-1];if(z&&b.parens===z.parens+1){Qe(Z.pop());continue}ee({type:"paren",value:x,output:b.parens?")":"\\)"}),ke("parens");continue}if(x==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));x=`\\${x}`}else A("brackets");ee({type:"bracket",value:x});continue}if(x==="]"){if(t.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){ee({type:"text",value:x,output:`\\${x}`});continue}if(b.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Gt("opening","["));ee({type:"text",value:x,output:`\\${x}`});continue}ke("brackets");let z=E.value.slice(1);if(E.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(x=`/${x}`),E.value+=x,le({value:x}),t.literalBrackets===!1||Ke.hasRegexChars(z))continue;let oe=Ke.escapeRegex(E.value);if(b.output=b.output.slice(0,-E.value.length),t.literalBrackets===!0){b.output+=oe,E.value=oe;continue}E.value=`(${a}${oe}|${E.value})`,b.output+=E.value;continue}if(x==="{"&&t.nobrace!==!0){A("braces");let z={type:"brace",value:x,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};X.push(z),ee(z);continue}if(x==="}"){let z=X[X.length-1];if(t.nobrace===!0||!z){ee({type:"text",value:x,output:x});continue}let oe=")";if(z.dots===!0){let he=s.slice(),we=[];for(let ye=he.length-1;ye>=0&&(s.pop(),he[ye].type!=="brace");ye--)he[ye].type!=="dots"&&we.unshift(he[ye].value);oe=Md(we,t),b.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let he=b.output.slice(0,z.outputIndex),we=b.tokens.slice(z.tokensIndex);z.value=z.output="\\{",x=oe="\\}",b.output=he;for(let ye of we)b.output+=ye.output||ye.value}ee({type:"brace",value:x,output:oe}),ke("braces"),X.pop();continue}if(x==="|"){Z.length>0&&Z[Z.length-1].conditions++,ee({type:"text",value:x});continue}if(x===","){let z=x,oe=X[X.length-1];oe&&Y[Y.length-1]==="braces"&&(oe.comma=!0,z="|"),ee({type:"comma",value:x,output:z});continue}if(x==="/"){if(E.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),E=o;continue}ee({type:"slash",value:x,output:m});continue}if(x==="."){if(b.braces>0&&E.type==="dot"){E.value==="."&&(E.output=c);let z=X[X.length-1];E.type="dots",E.output+=x,E.value+=x,z.dots=!0;continue}if(b.braces+b.parens===0&&E.type!=="bos"&&E.type!=="slash"){ee({type:"text",value:x,output:c});continue}ee({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(E&&E.value==="(")&&t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("qmark",x);continue}if(E&&E.type==="paren"){let oe=re(),he=x;(E.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(be()))&&(he=`\\${x}`),ee({type:"text",value:x,output:he});continue}if(t.dot!==!0&&(E.type==="slash"||E.type==="bos")){ee({type:"qmark",value:x,output:L});continue}ee({type:"qmark",value:x,output:S});continue}if(x==="!"){if(t.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){$e("negate",x);continue}if(t.nonegate!==!0&&b.index===0){Le();continue}}if(x==="+"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("plus",x);continue}if(E&&E.value==="("||t.regex===!1){ee({type:"plus",value:x,output:p});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||b.parens>0){ee({type:"plus",value:x});continue}ee({type:"plus",value:p});continue}if(x==="@"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){ee({type:"at",extglob:!0,value:x,output:""});continue}ee({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let z=Od.exec(be());z&&(x+=z[0],b.index+=z[0].length),ee({type:"text",value:x});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=x,E.output=v,b.backtrack=!0,b.globstar=!0,C(x);continue}let j=be();if(t.noextglob!==!0&&/^\([^?]/.test(j)){$e("star",x);continue}if(E.type==="star"){if(t.noglobstar===!0){C(x);continue}let z=E.prev,oe=z.prev,he=z.type==="slash"||z.type==="bos",we=oe&&(oe.type==="star"||oe.type==="globstar");if(t.bash===!0&&(!he||j[0]&&j[0]!=="/")){ee({type:"star",value:x,output:""});continue}let ye=b.braces>0&&(z.type==="comma"||z.type==="brace"),Oe=Z.length&&(z.type==="pipe"||z.type==="paren");if(!he&&z.type!=="paren"&&!ye&&!Oe){ee({type:"star",value:x,output:""});continue}for(;j.slice(0,3)==="/**";){let Ne=e[b.index+4];if(Ne&&Ne!=="/")break;j=j.slice(3),C("/**",3)}let Xe=P()||b.parens>0&&j===")".repeat(b.parens)&&!Z.some(Ne=>Ne.type==="negate");if(z.type==="bos"&&P()){E.type="globstar",E.value+=x,E.output=R(t),b.output=E.output,b.globstar=!0,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&Xe){b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=R(t)+(t.strictSlashes?")":"|$)"),E.value+=x,b.globstar=!0,b.output+=z.output+E.output,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&j[0]==="/"){let Ne=j[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=`${R(t)}${m}|${m}${Ne})`,E.value+=x,b.output+=z.output+E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&j[0]==="/"){E.type="globstar",E.value+=x,E.output=`(?:^|${m}|${R(t)}${m})`,b.output=E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-E.output.length),E.type="globstar",E.output=R(t),E.value+=x,b.output+=E.output,b.globstar=!0,C(x);continue}let ge={type:"star",value:x,output:v};if(t.bash===!0){ge.output=".*?",(E.type==="bos"||E.type==="slash")&&(ge.output=I+ge.output),ee(ge);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&t.regex===!0){ge.output=x,ee(ge);continue}(b.index===b.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(b.output+=k,E.output+=k):t.dot===!0?(b.output+=y,E.output+=y):(b.output+=I,E.output+=I),re()!=="*"&&(b.output+=d,E.output+=d)),ee(ge)}for(;b.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));b.output=Ke.escapeLast(b.output,"["),ke("brackets")}for(;b.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing",")"));b.output=Ke.escapeLast(b.output,"("),ke("parens")}for(;b.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","}"));b.output=Ke.escapeLast(b.output,"{"),ke("braces")}if(t.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${m}?`}),b.backtrack===!0){b.output="";for(let j of b.tokens)b.output+=j.output!=null?j.output:j.value,j.suffix&&(b.output+=j.suffix)}return b};Wi.fastpaths=(e,n)=>{let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=Wa[e]||e;let{DOT_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:c,NO_DOTS_SLASH:p,STAR:m,START_ANCHOR:d}=Ln.globChars(t.windows),h=t.dot?c:u,w=t.dot?p:u,k=t.capture?"":"?:",y={negated:!1,prefix:""},S=t.bash===!0?".*?":m;t.capture&&(S=`(${S})`);let L=I=>I.noglobstar===!0?S:`(${k}(?:(?!${d}${I.dot?l:o}).)*?)`,_=I=>{switch(I){case"*":return`${h}${a}${S}`;case".*":return`${o}${a}${S}`;case"*.*":return`${h}${S}${o}${a}${S}`;case"*/*":return`${h}${S}${s}${a}${w}${S}`;case"**":return h+L(t);case"**/*":return`(?:${h}${L(t)}${s})?${w}${a}${S}`;case"**/*.*":return`(?:${h}${L(t)}${s})?${w}${S}${o}${a}${S}`;case"**/.*":return`(?:${h}${L(t)}${s})?${o}${a}${S}`;default:{let N=/^(.*?)\.(\w+)$/.exec(I);if(!N)return;let v=_(N[1]);return v?v+o+N[2]:void 0}}},B=Ke.removePrefix(e,y),R=_(B);return R&&t.strictSlashes!==!0&&(R+=`${s}?`),R};Ka.exports=Wi});var Xa=it((Bw,Qa)=>{"use strict";var jd=Ua(),Vi=Ga(),Ya=Cn(),Ud=Sn(),Wd=e=>e&&typeof e=="object"&&!Array.isArray(e),Ee=(e,n,t=!1)=>{if(Array.isArray(e)){let c=e.map(m=>Ee(m,n,t));return m=>{for(let d of c){let h=d(m);if(h)return h}return!1}}let r=Wd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=n||{},o=i.windows,s=r?Ee.compileRe(e,n):Ee.makeRe(e,n,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(i.ignore){let c={...n,ignore:null,onMatch:null,onResult:null};l=Ee(i.ignore,c,t)}let u=(c,p=!1)=>{let{isMatch:m,match:d,output:h}=Ee.test(c,s,n,{glob:e,posix:o}),w={glob:e,state:a,regex:s,posix:o,input:c,output:h,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof i.onMatch=="function"&&i.onMatch(w),p?w:!0)};return t&&(u.state=a),u};Ee.test=(e,n,t,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Ya.toPosixSlashes:null),a=e===r,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ee.matchBase(e,n,t,i):a=n.exec(l)),{isMatch:!!a,match:a,output:l}};Ee.matchBase=(e,n,t,r=t&&t.windows)=>(n instanceof RegExp?n:Ee.makeRe(n,t)).test(Ya.basename(e,{windows:r}));Ee.isMatch=(e,n,t)=>Ee(n,t)(e);Ee.parse=(e,n)=>Array.isArray(e)?e.map(t=>Ee.parse(t,n)):Vi(e,{...n,fastpaths:!1});Ee.scan=(e,n)=>jd(e,n);Ee.compileRe=(e,n,t=!1,r=!1)=>{if(t===!0)return e.output;let i=n||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=Ee.toRegex(a,n);return r===!0&&(l.state=e),l};Ee.makeRe=(e,n={},t=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return n.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=Vi.fastpaths(e,n)),i.output||(i=Vi(e,n)),Ee.compileRe(i,n,t,r)};Ee.toRegex=(e,n)=>{try{let t=n||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(n&&n.debug===!0)throw t;return/$^/}};Ee.constants=Ud;Qa.exports=Ee});var or=it((qw,el)=>{"use strict";var Za=Xa(),Vd=Cn();function Ja(e,n,t=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:Vd.isWindows()}),Za(e,n,t)}Object.assign(Ja,Za);el.exports=Ja});var $l=it((NL,mo)=>{(function(){var e;typeof mo<"u"?e=mo.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,p=!1,m,d,h=!1,w,k=function(){return s[o++]},y=function(){for(var S="";/\d/.test(i[a]);)S+=i[a++],c=i[a];return S.length>0?parseInt(S):null};a<l;++a)if(c=i[a],p)switch(p=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,w=y(),c){case"b":u+=parseInt(k(),10).toString(2);break;case"c":m=k(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(k(),10);break;case"f":d=String(parseFloat(k()).toFixed(w||6)),u+=h?d:d.replace(/^0/,"");break;case"j":u+=JSON.stringify(k());break;case"o":u+="0"+parseInt(k(),10).toString(8);break;case"s":u+=k();break;case"x":u+="0x"+parseInt(k(),10).toString(16);break;case"X":u+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?p=!0:u+=c;return u}})()});var Gf=Lt(Ls(),1),Yf=Lt(ms(),1);function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={},Qn={},At={},As;function bn(){if(As)return At;As=1;function e(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function t(s){return Array.isArray(s)?s:e(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){let p=l[u];s[p]=a[p]}}return s}function i(s,a){let l="";for(let u=0;u<a;u+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return At.isNothing=e,At.isObject=n,At.toArray=t,At.repeat=i,At.isNegativeZero=o,At.extend=r,At}var oi,Es;function kn(){if(Es)return oi;Es=1;function e(t,r){let i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
7
+ import{a as bs}from"./H4VN2RX3.js";import{c as xs,d as ni}from"./6NB3FKVN.js";import{$ as ot,A as rm,B as im,C as om,D as sm,E as am,F as lm,G as um,H as cm,I as fm,J as pm,K as mm,Q as ls,S as us,U as cs,V as fs,W as ps,Y as ms,aa as et,ba as ze,c as $t,ea as Me,g as os,ga as ds,ia as G,ka as ti,la as hs,ma as gs,pa as xn,q as ss,u as pt,ua as ys,w as as,x as nm}from"./22EANOP2.js";import"./NEWT5A6S.js";import{c as it,d as tm,e as Lt}from"./RFWIIJFG.js";var ws=it(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var dm=am(),hm=lm(),gm=um(),ym=cm(),ks=fm(),xm=[dm.default,hm.default,(0,gm.default)(),ym.default,ks.metadataVocabulary,ks.contentVocabulary];ri.default=xm});var Ss=it((tw,bm)=>{bm.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ls=it((Se,ii)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var km=sm(),wm=ws(),Sm=pm(),Cs=Ss(),Cm=["/properties"],Yn="http://json-schema.org/draft-07/schema",Ut=class extends km.default{_addVocabularies(){super._addVocabularies(),wm.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(Sm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(Cs,Cm):Cs;this.addMetaSchema(n,Yn,!1),this.refs["http://json-schema.org/schema"]=Yn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yn)?Yn:void 0)}};Se.Ajv=Ut;ii.exports=Se=Ut;ii.exports.Ajv=Ut;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Ut;var Lm=rm();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Lm.KeywordCxt}});var Wt=nm();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Wt._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Wt.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Wt.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Wt.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Wt.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Wt.CodeGen}});var Am=im();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return Am.default}});var Em=om();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return Em.default}})});var Sn=it((Nw,Ma)=>{"use strict";var _a="[^\\\\/]",pd="(?=.)",Fa="[^/]",Pi="(?:\\/|$)",Oa="(?:^|\\/)",Di=`\\.{1,2}${Pi}`,md="(?!\\.)",dd=`(?!${Oa}${Di})`,hd=`(?!\\.{0,1}${Pi})`,gd=`(?!${Di})`,yd="[^.\\/]",xd=`${Fa}*?`,bd="/",Na={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:pd,QMARK:Fa,END_ANCHOR:Pi,DOTS_SLASH:Di,NO_DOT:md,NO_DOTS:dd,NO_DOT_SLASH:hd,NO_DOTS_SLASH:gd,QMARK_NO_DOT:yd,STAR:xd,START_ANCHOR:Oa,SEP:bd},kd={...Na,SLASH_LITERAL:"[\\\\/]",QMARK:_a,STAR:`${_a}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},wd={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ma.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wd,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?kd:Na}}});var Cn=it(je=>{"use strict";var{REGEX_BACKSLASH:Sd,REGEX_REMOVE_BACKSLASH:Cd,REGEX_SPECIAL_CHARS:Ld,REGEX_SPECIAL_CHARS_GLOBAL:Ad}=Sn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Ld.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Ad,"\\$1");je.toPosixSlashes=e=>e.replace(Sd,"/");je.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};je.removeBackslashes=e=>e.replace(Cd,n=>n==="\\"?"":n);je.escapeLast=(e,n,t)=>{let r=e.lastIndexOf(n,t);return r===-1?e:e[r-1]==="\\"?je.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};je.removePrefix=(e,n={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),n.prefix="./"),t};je.wrapOutput=(e,n={},t={})=>{let r=t.contains?"":"^",i=t.contains?"":"$",o=`${r}(?:${e})${i}`;return n.negated===!0&&(o=`(?:^(?!${o}).*$)`),o};je.basename=(e,{windows:n}={})=>{let t=e.split(n?/[\\/]/:"/"),r=t[t.length-1];return r===""?t[t.length-2]:r}});var Ua=it((Pw,ja)=>{"use strict";var Pa=Cn(),{CHAR_ASTERISK:Bi,CHAR_AT:Ed,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Td,CHAR_DOT:qi,CHAR_EXCLAMATION_MARK:Hi,CHAR_FORWARD_SLASH:za,CHAR_LEFT_CURLY_BRACE:zi,CHAR_LEFT_PARENTHESES:rr,CHAR_LEFT_SQUARE_BRACKET:Rd,CHAR_PLUS:vd,CHAR_QUESTION_MARK:Da,CHAR_RIGHT_CURLY_BRACE:Id,CHAR_RIGHT_PARENTHESES:Ba,CHAR_RIGHT_SQUARE_BRACKET:$d}=Sn(),qa=e=>e===za||e===Kt,Ha=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},_d=(e,n)=>{let t=n||{},r=e.length-1,i=t.parts===!0||t.tokens===!0||t.scanToEnd===!0,o=[],s=[],a=[],l=e,u=-1,c=0,p=0,m=!1,d=!1,h=!1,w=!1,k=!1,y=!1,S=!1,L=!1,_=!1,B=!1,R=0,I,N,v={value:"",depth:0,isGlob:!1},b=()=>u>=r,Z=()=>l.charCodeAt(u+1),X=()=>(I=N,l.charCodeAt(++u));for(;u<r;){N=X();let re;if(N===Kt){S=v.backslashes=!0,N=X(),N===zi&&(y=!0);continue}if(y===!0||N===zi){for(R++;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===zi){R++;continue}if(y!==!0&&N===qi&&(N=X())===qi){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(y!==!0&&N===Td){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Id&&(R--,R===0)){y=!1,m=v.isBrace=!0,B=!0;break}}if(i===!0)continue;break}if(N===za){if(o.push(u),s.push(v),v={value:"",depth:0,isGlob:!1},B===!0)continue;if(I===qi&&u===c+1){c+=2;continue}p=u+1;continue}if(t.noext!==!0&&(N===vd||N===Ed||N===Bi||N===Da||N===Hi)===!0&&Z()===rr){if(h=v.isGlob=!0,w=v.isExtglob=!0,B=!0,N===Hi&&u===c&&(_=!0),i===!0){let be=0;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){be++;continue}if(N===Ba&&--be===0){B=!0;break}}continue}break}if(N===Bi){if(I===Bi&&(k=v.isGlobstar=!0),h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Da){if(h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Rd){for(;b()!==!0&&(re=X());){if(re===Kt){S=v.backslashes=!0,X();continue}if(re===$d){d=v.isBracket=!0,h=v.isGlob=!0,B=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&N===Hi&&u===c){L=v.negated=!0,c++;continue}if(t.noparen!==!0&&N===rr){if(h=v.isGlob=!0,i===!0){let de=1;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){de++;continue}if(N===Ba&&--de===0){B=!0;break}}continue}break}if(h===!0){if(B=!0,i===!0)continue;break}}t.noext===!0&&(w=!1,h=!1);let Y=l,E="",x="";c>0&&(E=l.slice(0,c),l=l.slice(c),p-=c),Y&&h===!0&&p>0?(Y=l.slice(0,p),x=l.slice(p)):h===!0?(Y="",x=l):Y=l,Y&&Y!==""&&Y!=="/"&&Y!==l&&qa(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),t.unescape===!0&&(x&&(x=Pa.removeBackslashes(x)),Y&&S===!0&&(Y=Pa.removeBackslashes(Y)));let P={prefix:E,input:e,start:c,base:Y,glob:x,isBrace:m,isBracket:d,isGlob:h,isExtglob:w,isGlobstar:k,negated:L,negatedExtglob:_};if(t.tokens===!0&&(P.maxDepth=0,qa(N)||s.push(v),P.tokens=s),t.parts===!0||t.tokens===!0){let re;for(let C=0;C<o.length;C++){let le=re!==void 0?re+1:c,Le=o[C],A=e.slice(le,Le);t.tokens&&(C===0&&c!==0?(s[C].isPrefix=!0,s[C].value=E):s[C].value=A,Ha(s[C]),P.maxDepth+=s[C].depth),Le>=c&&(a.push(A),re=Le)}let de=re!==void 0?re+1:c,be=e.slice(de);a.push(be),t.tokens&&re&&re+1<e.length&&(s[s.length-1].value=be,Ha(s[s.length-1]),P.maxDepth+=s[s.length-1].depth),P.slashes=o,P.parts=a}return P};ja.exports=_d});var Ga=it((Dw,Ka)=>{"use strict";var Ln=Sn(),Ke=Cn(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:Fd,REGEX_NON_SPECIAL_CHARS:Od,REGEX_SPECIAL_CHARS_BACKREF:Nd,REPLACEMENTS:Wa}=Ln,Md=(e,n)=>{if(typeof n.expandRange=="function")return n.expandRange(...e,n);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(i=>Ke.escapeRegex(i)).join("..")}return t},Gt=(e,n)=>`Missing ${e}: "${n}" - use "\\\\${n}" to match literal characters`,Va=e=>{let n=[],t=0,r=0,i=0,o="",s=!1;for(let a of e){if(s===!0){o+=a,s=!1;continue}if(a==="\\"){o+=a,s=!0;continue}if(a==='"'){i=i===1?0:1,o+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){n.push(o),o="";continue}}}o+=a}return n.push(o),n},Pd=e=>{let n=!1;for(let t of e){if(n===!0){n=!1;continue}if(t==="\\"){n=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Ui=e=>{let n=e.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(n)&&(n=n.slice(2,-1),t=!0);if(Pd(n))return n.replace(/\\(.)/g,"$1")},Dd=e=>{let n=e.map(Ui).filter(Boolean);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],o=n[r],s=i[0];if(!(!s||i!==s.repeat(i.length)||o!==s.repeat(o.length))&&(i===o||i.startsWith(o)||o.startsWith(i)))return!0}return!1},ji=(e,n=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let t=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(o===!0){o=!1;continue}if(a==="\\"){o=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return n===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},Bd=e=>`${e.length===1?Ke.escapeRegex(e[0]):`[${e.map(t=>Ke.escapeRegex(t)).join("")}]`}*`,qd=e=>{let n=0,t=[];for(;n<e.length;){let r=ji(e.slice(n),!1);if(!r||r.type!=="*")return;let i=Va(r.body).map(s=>s.trim());if(i.length!==1)return;let o=Ui(i[0]);if(!o||o.length!==1)return;t.push(o),n+=r.end+1}if(!(t.length<1))return t},Hd=e=>{let n=0,t=e.trim(),r=ji(t);for(;r;)n++,t=r.body.trim(),r=ji(t);return n},zd=(e,n)=>{if(n.maxExtglobRecursion===!1)return{risky:!1};let t=typeof n.maxExtglobRecursion=="number"?n.maxExtglobRecursion:Ln.DEFAULT_MAX_EXTGLOB_RECURSION,r=Va(e).map(a=>a.trim());if(r.length>1&&(r.some(a=>a==="")||r.some(a=>/^[*?]+$/.test(a))||Dd(r)))return{risky:!0};let i=[],o=!1,s=!0;for(let a of r){let l=qd(a);if(l){o=!0,i.push(...l);continue}let u=Ui(a);if(u&&u.length===1){i.push(u);continue}if(s=!1,Hd(a)>t)return{risky:!0}}return o?s?{risky:!0,safeOutput:Bd([...new Set(i)])}:{risky:!0}:{risky:!1}},Wi=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Wa[e]||e;let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",l=Ln.globChars(t.windows),u=Ln.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:w,NO_DOT_SLASH:k,NO_DOTS_SLASH:y,QMARK:S,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:B}=l,R=j=>`(${a}(?:(?!${B}${j.dot?h:c}).)*?)`,I=t.dot?"":w,N=t.dot?S:L,v=t.bash===!0?R(t):_;t.capture&&(v=`(${v})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let b={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=Ke.removePrefix(e,b),i=e.length;let Z=[],X=[],Y=[],E=o,x,P=()=>b.index===i-1,re=b.peek=(j=1)=>e[b.index+j],de=b.advance=()=>e[++b.index]||"",be=()=>e.slice(b.index+1),C=(j="",ge=0)=>{b.consumed+=j,b.index+=ge},le=j=>{b.output+=j.output!=null?j.output:j.value,C(j.value)},Le=()=>{let j=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)de(),b.start++,j++;return j%2===0?!1:(b.negated=!0,b.start++,!0)},A=j=>{b[j]++,Y.push(j)},ke=j=>{b[j]--,Y.pop()},ee=j=>{if(E.type==="globstar"){let ge=b.braces>0&&(j.type==="comma"||j.type==="brace"),z=j.extglob===!0||Z.length&&(j.type==="pipe"||j.type==="paren");j.type!=="slash"&&j.type!=="paren"&&!ge&&!z&&(b.output=b.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=v,b.output+=E.output)}if(Z.length&&j.type!=="paren"&&(Z[Z.length-1].inner+=j.value),(j.value||j.output)&&le(j),E&&E.type==="text"&&j.type==="text"){E.output=(E.output||E.value)+j.value,E.value+=j.value;return}j.prev=E,s.push(j),E=j},$e=(j,ge)=>{let z={...u[ge],conditions:1,inner:""};z.prev=E,z.parens=b.parens,z.output=b.output,z.startIndex=b.index,z.tokensIndex=s.length;let oe=(t.capture?"(":"")+z.open;A("parens"),ee({type:j,value:ge,output:b.output?"":d}),ee({type:"paren",extglob:!0,value:de(),output:oe}),Z.push(z)},Qe=j=>{let ge=e.slice(j.startIndex,b.index+1),z=e.slice(j.startIndex+2,b.index),oe=zd(z,t);if((j.type==="plus"||j.type==="star")&&oe.risky){let ye=oe.safeOutput?(j.output?"":d)+(t.capture?`(${oe.safeOutput})`:oe.safeOutput):void 0,Oe=s[j.tokensIndex];Oe.type="text",Oe.value=ge,Oe.output=ye||Ke.escapeRegex(ge);for(let Xe=j.tokensIndex+1;Xe<s.length;Xe++)s[Xe].value="",s[Xe].output="",delete s[Xe].suffix;b.output=j.output+Oe.output,b.backtrack=!0,ee({type:"paren",extglob:!0,value:x,output:""}),ke("parens");return}let he=j.close+(t.capture?")":""),we;if(j.type==="negate"){let ye=v;if(j.inner&&j.inner.length>1&&j.inner.includes("/")&&(ye=R(t)),(ye!==v||P()||/^\)+$/.test(be()))&&(he=j.close=`)$))${ye}`),j.inner.includes("*")&&(we=be())&&/^\.[^\\/.]+$/.test(we)){let Oe=Wi(we,{...n,fastpaths:!1}).output;he=j.close=`)${Oe})${ye})`}j.prev.type==="bos"&&(b.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:x,output:he}),ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let j=!1,ge=e.replace(Nd,(z,oe,he,we,ye,Oe)=>we==="\\"?(j=!0,z):we==="?"?oe?oe+we+(ye?S.repeat(ye.length):""):Oe===0?N+(ye?S.repeat(ye.length):""):S.repeat(he.length):we==="."?c.repeat(he.length):we==="*"?oe?oe+we+(ye?v:""):v:oe?z:`\\${z}`);return j===!0&&(t.unescape===!0?ge=ge.replace(/\\/g,""):ge=ge.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ge===e&&t.contains===!0?(b.output=e,b):(b.output=Ke.wrapOutput(ge,b,n),b)}for(;!P();){if(x=de(),x==="\0")continue;if(x==="\\"){let z=re();if(z==="/"&&t.bash!==!0||z==="."||z===";")continue;if(!z){x+="\\",ee({type:"text",value:x});continue}let oe=/^\\+/.exec(be()),he=0;if(oe&&oe[0].length>2&&(he=oe[0].length,b.index+=he,he%2!==0&&(x+="\\")),t.unescape===!0?x=de():x+=de(),b.brackets===0){ee({type:"text",value:x});continue}}if(b.brackets>0&&(x!=="]"||E.value==="["||E.value==="[^")){if(t.posix!==!1&&x===":"){let z=E.value.slice(1);if(z.includes("[")&&(E.posix=!0,z.includes(":"))){let oe=E.value.lastIndexOf("["),he=E.value.slice(0,oe),we=E.value.slice(oe+2),ye=Fd[we];if(ye){E.value=he+ye,b.backtrack=!0,de(),!o.output&&s.indexOf(E)===1&&(o.output=d);continue}}}(x==="["&&re()!==":"||x==="-"&&re()==="]")&&(x=`\\${x}`),x==="]"&&(E.value==="["||E.value==="[^")&&(x=`\\${x}`),t.posix===!0&&x==="!"&&E.value==="["&&(x="^"),E.value+=x,le({value:x});continue}if(b.quotes===1&&x!=='"'){x=Ke.escapeRegex(x),E.value+=x,le({value:x});continue}if(x==='"'){b.quotes=b.quotes===1?0:1,t.keepQuotes===!0&&ee({type:"text",value:x});continue}if(x==="("){A("parens"),ee({type:"paren",value:x});continue}if(x===")"){if(b.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Gt("opening","("));let z=Z[Z.length-1];if(z&&b.parens===z.parens+1){Qe(Z.pop());continue}ee({type:"paren",value:x,output:b.parens?")":"\\)"}),ke("parens");continue}if(x==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));x=`\\${x}`}else A("brackets");ee({type:"bracket",value:x});continue}if(x==="]"){if(t.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){ee({type:"text",value:x,output:`\\${x}`});continue}if(b.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Gt("opening","["));ee({type:"text",value:x,output:`\\${x}`});continue}ke("brackets");let z=E.value.slice(1);if(E.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(x=`/${x}`),E.value+=x,le({value:x}),t.literalBrackets===!1||Ke.hasRegexChars(z))continue;let oe=Ke.escapeRegex(E.value);if(b.output=b.output.slice(0,-E.value.length),t.literalBrackets===!0){b.output+=oe,E.value=oe;continue}E.value=`(${a}${oe}|${E.value})`,b.output+=E.value;continue}if(x==="{"&&t.nobrace!==!0){A("braces");let z={type:"brace",value:x,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};X.push(z),ee(z);continue}if(x==="}"){let z=X[X.length-1];if(t.nobrace===!0||!z){ee({type:"text",value:x,output:x});continue}let oe=")";if(z.dots===!0){let he=s.slice(),we=[];for(let ye=he.length-1;ye>=0&&(s.pop(),he[ye].type!=="brace");ye--)he[ye].type!=="dots"&&we.unshift(he[ye].value);oe=Md(we,t),b.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let he=b.output.slice(0,z.outputIndex),we=b.tokens.slice(z.tokensIndex);z.value=z.output="\\{",x=oe="\\}",b.output=he;for(let ye of we)b.output+=ye.output||ye.value}ee({type:"brace",value:x,output:oe}),ke("braces"),X.pop();continue}if(x==="|"){Z.length>0&&Z[Z.length-1].conditions++,ee({type:"text",value:x});continue}if(x===","){let z=x,oe=X[X.length-1];oe&&Y[Y.length-1]==="braces"&&(oe.comma=!0,z="|"),ee({type:"comma",value:x,output:z});continue}if(x==="/"){if(E.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),E=o;continue}ee({type:"slash",value:x,output:m});continue}if(x==="."){if(b.braces>0&&E.type==="dot"){E.value==="."&&(E.output=c);let z=X[X.length-1];E.type="dots",E.output+=x,E.value+=x,z.dots=!0;continue}if(b.braces+b.parens===0&&E.type!=="bos"&&E.type!=="slash"){ee({type:"text",value:x,output:c});continue}ee({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(E&&E.value==="(")&&t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("qmark",x);continue}if(E&&E.type==="paren"){let oe=re(),he=x;(E.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(be()))&&(he=`\\${x}`),ee({type:"text",value:x,output:he});continue}if(t.dot!==!0&&(E.type==="slash"||E.type==="bos")){ee({type:"qmark",value:x,output:L});continue}ee({type:"qmark",value:x,output:S});continue}if(x==="!"){if(t.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){$e("negate",x);continue}if(t.nonegate!==!0&&b.index===0){Le();continue}}if(x==="+"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("plus",x);continue}if(E&&E.value==="("||t.regex===!1){ee({type:"plus",value:x,output:p});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||b.parens>0){ee({type:"plus",value:x});continue}ee({type:"plus",value:p});continue}if(x==="@"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){ee({type:"at",extglob:!0,value:x,output:""});continue}ee({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let z=Od.exec(be());z&&(x+=z[0],b.index+=z[0].length),ee({type:"text",value:x});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=x,E.output=v,b.backtrack=!0,b.globstar=!0,C(x);continue}let j=be();if(t.noextglob!==!0&&/^\([^?]/.test(j)){$e("star",x);continue}if(E.type==="star"){if(t.noglobstar===!0){C(x);continue}let z=E.prev,oe=z.prev,he=z.type==="slash"||z.type==="bos",we=oe&&(oe.type==="star"||oe.type==="globstar");if(t.bash===!0&&(!he||j[0]&&j[0]!=="/")){ee({type:"star",value:x,output:""});continue}let ye=b.braces>0&&(z.type==="comma"||z.type==="brace"),Oe=Z.length&&(z.type==="pipe"||z.type==="paren");if(!he&&z.type!=="paren"&&!ye&&!Oe){ee({type:"star",value:x,output:""});continue}for(;j.slice(0,3)==="/**";){let Ne=e[b.index+4];if(Ne&&Ne!=="/")break;j=j.slice(3),C("/**",3)}let Xe=P()||b.parens>0&&j===")".repeat(b.parens)&&!Z.some(Ne=>Ne.type==="negate");if(z.type==="bos"&&P()){E.type="globstar",E.value+=x,E.output=R(t),b.output=E.output,b.globstar=!0,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&Xe){b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=R(t)+(t.strictSlashes?")":"|$)"),E.value+=x,b.globstar=!0,b.output+=z.output+E.output,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&j[0]==="/"){let Ne=j[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=`${R(t)}${m}|${m}${Ne})`,E.value+=x,b.output+=z.output+E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&j[0]==="/"){E.type="globstar",E.value+=x,E.output=`(?:^|${m}|${R(t)}${m})`,b.output=E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-E.output.length),E.type="globstar",E.output=R(t),E.value+=x,b.output+=E.output,b.globstar=!0,C(x);continue}let ge={type:"star",value:x,output:v};if(t.bash===!0){ge.output=".*?",(E.type==="bos"||E.type==="slash")&&(ge.output=I+ge.output),ee(ge);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&t.regex===!0){ge.output=x,ee(ge);continue}(b.index===b.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(b.output+=k,E.output+=k):t.dot===!0?(b.output+=y,E.output+=y):(b.output+=I,E.output+=I),re()!=="*"&&(b.output+=d,E.output+=d)),ee(ge)}for(;b.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));b.output=Ke.escapeLast(b.output,"["),ke("brackets")}for(;b.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing",")"));b.output=Ke.escapeLast(b.output,"("),ke("parens")}for(;b.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","}"));b.output=Ke.escapeLast(b.output,"{"),ke("braces")}if(t.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${m}?`}),b.backtrack===!0){b.output="";for(let j of b.tokens)b.output+=j.output!=null?j.output:j.value,j.suffix&&(b.output+=j.suffix)}return b};Wi.fastpaths=(e,n)=>{let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=Wa[e]||e;let{DOT_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:c,NO_DOTS_SLASH:p,STAR:m,START_ANCHOR:d}=Ln.globChars(t.windows),h=t.dot?c:u,w=t.dot?p:u,k=t.capture?"":"?:",y={negated:!1,prefix:""},S=t.bash===!0?".*?":m;t.capture&&(S=`(${S})`);let L=I=>I.noglobstar===!0?S:`(${k}(?:(?!${d}${I.dot?l:o}).)*?)`,_=I=>{switch(I){case"*":return`${h}${a}${S}`;case".*":return`${o}${a}${S}`;case"*.*":return`${h}${S}${o}${a}${S}`;case"*/*":return`${h}${S}${s}${a}${w}${S}`;case"**":return h+L(t);case"**/*":return`(?:${h}${L(t)}${s})?${w}${a}${S}`;case"**/*.*":return`(?:${h}${L(t)}${s})?${w}${S}${o}${a}${S}`;case"**/.*":return`(?:${h}${L(t)}${s})?${o}${a}${S}`;default:{let N=/^(.*?)\.(\w+)$/.exec(I);if(!N)return;let v=_(N[1]);return v?v+o+N[2]:void 0}}},B=Ke.removePrefix(e,y),R=_(B);return R&&t.strictSlashes!==!0&&(R+=`${s}?`),R};Ka.exports=Wi});var Xa=it((Bw,Qa)=>{"use strict";var jd=Ua(),Vi=Ga(),Ya=Cn(),Ud=Sn(),Wd=e=>e&&typeof e=="object"&&!Array.isArray(e),Ee=(e,n,t=!1)=>{if(Array.isArray(e)){let c=e.map(m=>Ee(m,n,t));return m=>{for(let d of c){let h=d(m);if(h)return h}return!1}}let r=Wd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=n||{},o=i.windows,s=r?Ee.compileRe(e,n):Ee.makeRe(e,n,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(i.ignore){let c={...n,ignore:null,onMatch:null,onResult:null};l=Ee(i.ignore,c,t)}let u=(c,p=!1)=>{let{isMatch:m,match:d,output:h}=Ee.test(c,s,n,{glob:e,posix:o}),w={glob:e,state:a,regex:s,posix:o,input:c,output:h,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof i.onMatch=="function"&&i.onMatch(w),p?w:!0)};return t&&(u.state=a),u};Ee.test=(e,n,t,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Ya.toPosixSlashes:null),a=e===r,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ee.matchBase(e,n,t,i):a=n.exec(l)),{isMatch:!!a,match:a,output:l}};Ee.matchBase=(e,n,t,r=t&&t.windows)=>(n instanceof RegExp?n:Ee.makeRe(n,t)).test(Ya.basename(e,{windows:r}));Ee.isMatch=(e,n,t)=>Ee(n,t)(e);Ee.parse=(e,n)=>Array.isArray(e)?e.map(t=>Ee.parse(t,n)):Vi(e,{...n,fastpaths:!1});Ee.scan=(e,n)=>jd(e,n);Ee.compileRe=(e,n,t=!1,r=!1)=>{if(t===!0)return e.output;let i=n||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=Ee.toRegex(a,n);return r===!0&&(l.state=e),l};Ee.makeRe=(e,n={},t=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return n.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=Vi.fastpaths(e,n)),i.output||(i=Vi(e,n)),Ee.compileRe(i,n,t,r)};Ee.toRegex=(e,n)=>{try{let t=n||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(n&&n.debug===!0)throw t;return/$^/}};Ee.constants=Ud;Qa.exports=Ee});var or=it((qw,el)=>{"use strict";var Za=Xa(),Vd=Cn();function Ja(e,n,t=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:Vd.isWindows()}),Za(e,n,t)}Object.assign(Ja,Za);el.exports=Ja});var $l=it((NL,mo)=>{(function(){var e;typeof mo<"u"?e=mo.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,p=!1,m,d,h=!1,w,k=function(){return s[o++]},y=function(){for(var S="";/\d/.test(i[a]);)S+=i[a++],c=i[a];return S.length>0?parseInt(S):null};a<l;++a)if(c=i[a],p)switch(p=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,w=y(),c){case"b":u+=parseInt(k(),10).toString(2);break;case"c":m=k(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(k(),10);break;case"f":d=String(parseFloat(k()).toFixed(w||6)),u+=h?d:d.replace(/^0/,"");break;case"j":u+=JSON.stringify(k());break;case"o":u+="0"+parseInt(k(),10).toString(8);break;case"s":u+=k();break;case"x":u+="0x"+parseInt(k(),10).toString(16);break;case"X":u+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?p=!0:u+=c;return u}})()});var Gf=Lt(Ls(),1),Yf=Lt(ms(),1);function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={},Qn={},At={},As;function bn(){if(As)return At;As=1;function e(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function t(s){return Array.isArray(s)?s:e(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){let p=l[u];s[p]=a[p]}}return s}function i(s,a){let l="";for(let u=0;u<a;u+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return At.isNothing=e,At.isObject=n,At.toArray=t,At.repeat=i,At.isNegativeZero=o,At.extend=r,At}var oi,Es;function kn(){if(Es)return oi;Es=1;function e(t,r){let i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
8
8
 
9
9
  `+t.mark.snippet),o+" "+i):o}function n(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(r){return this.name+": "+e(this,r)},oi=n,oi}var si,Ts;function Rm(){if(Ts)return si;Ts=1;let e=bn();function n(i,o,s,a,l){let u="",c="",p=Math.floor(l/2)-1;return a-o>p&&(u=" ... ",o=a-p+u.length),s-a>p&&(c=" ...",s=a+p-c.length),{str:u+i.slice(o,s).replace(/\t/g,"\u2192")+c,pos:a-o+u.length}}function t(i,o){return e.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],l=[],u,c=-1;for(;u=s.exec(i.buffer);)l.push(u.index),a.push(u.index+u[0].length),i.position<=u.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);let p="",m=Math.min(i.line+o.linesAfter,l.length).toString().length,d=o.maxLength-(o.indent+m+3);for(let w=1;w<=o.linesBefore&&!(c-w<0);w++){let k=n(i.buffer,a[c-w],l[c-w],i.position-(a[c]-a[c-w]),d);p=e.repeat(" ",o.indent)+t((i.line-w+1).toString(),m)+" | "+k.str+`
10
10
  `+p}let h=n(i.buffer,a[c],l[c],i.position,d);p+=e.repeat(" ",o.indent)+t((i.line+1).toString(),m)+" | "+h.str+`
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as C,b as Z,c as ee,d as Ne,e as te,f as ne,g as Se,h as oe}from"./SLQPKXO2.js";import{a as Fe,b as De}from"./64G5RPLP.js";import{f as de,g as L,h as ue,i as Ce,l as W,m as h,n as Oe}from"./F6IXS3RL.js";import{$ as le,O as pe,S as ce,T as fe,aa as ye,b as me,c as j,ca as u,d as O,h as ae,ia as N,ka as he,o as A,oa as S,r as d,t as v,va as ge,wa as Ae}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as U from"node:fs";import*as Ge from"node:path";import{performance as Xe}from"perf_hooks";import*as G from"node:path";import*as R from"node:path";function F(e,t,o){let n=R.resolve(e),r=R.resolve(t);if(r!==n&&!r.startsWith(n+R.sep))throw new S(`Refusing to write "${o}" outside the output directory.`)}import*as we from"node:path";function D(e,t,o,n,r){let m=o?`.${o}`:"",a=we.join(e,t),i=a+m,p=n.get(i.toLowerCase());for(let s=2;n.has(i.toLowerCase());s++)i=`${a}-${s}${m}`;return r&&p&&p!==t&&p.toLowerCase()===t.toLowerCase()&&r.conflicts.push({name:t,collidingName:p,filename:i,pointer:r.pointer}),n.set(i.toLowerCase(),t),i}function $(e,t,o,n,r,m,a){let i={},p=new Map;for(let[s,c]of Object.entries(e||{})){if(d(c))continue;let f=D(n,L(s,r),m,p,{conflicts:a,pointer:`${t}/${v(s)}`});F(o,f,s),i[s]=f}return i}import*as Pe from"node:path";function g(e,t,o={}){Se(e,r=>{if(d(r)&&oe(r.$ref))n(r,"$ref");else if(j(r.discriminator)&&j(r.discriminator.mapping)){let{mapping:m}=r.discriminator;for(let a of Object.keys(m)){let i=m[a];typeof i=="string"&&oe(i)&&n(r.discriminator.mapping,a)}}});function n(r,m){let a=r[m].split("/"),i=a.pop(),p=a[2],s=o[p];if(!s||!s[i])return;let c=A(Pe.relative(t,s[i].filename));c.startsWith(".")||(c="./"+c),r[m]=c}}function Y(e,t,o="warn"){if(o==="off"||e.length===0)return;let n=e.map(({name:r,collidingName:m,filename:a,pointer:i})=>({ruleId:"split",severity:o,message:`${r} and ${m} would share one file on a case-insensitive file system`+(o==="error"?".":`, saving ${r} to ${a}.`),location:[{source:t,pointer:i,reportOnKey:!0}],suggest:[]}));if(Ae(n,{totals:ge(n),command:"split"}),o==="error")throw new S("\u274C Errors encountered while splitting: files not created.")}import*as ie from"node:path";var Ee=["schemas","messages","securitySchemes","parameters","correlationIds","messageTraits","operationTraits","serverBindings","channelBindings","operationBindings","messageBindings"];var xe=["schemas","messages","securitySchemes","servers","serverVariables","parameters","replies","replyAddresses","correlationIds","messageTraits","operationTraits","tags","externalDocs","serverBindings","channelBindings","operationBindings","messageBindings"];function H(e,t){return(t==="async2"?Ee:xe).filter(n=>n in e)}function ve({asyncapi:e,asyncapiDir:t,componentsFiles:o,ext:n,specVersion:r,conflicts:m}){let a=e.components;if(!a)return;let i=ie.join(t,C),p=H(a,r);for(let s of p){let c=ie.join(i,s),f=new Map;for(let l of Object.keys(a[s]||{})){let y=D(c,l,n,f,{conflicts:m,pointer:`#/components/${s}/${v(l)}`});F(t,y,l),o[s]=o[s]||{},o[s][l]={filename:y}}}}import*as be from"node:fs";import*as V from"node:path";import*as P from"node:fs";import*as $e from"node:path";function E(e,t,o){if(!P.existsSync(e)||!P.statSync(e).isDirectory())return;let n=P.readdirSync(e);for(let r of n){let m=$e.join(e,r);P.statSync(m).isDirectory()?E(m,t,o):t(m,e,o)}}function b(e,t,o){if(!ce(e))return;let n=W(e);g(n,t,o),h(n,e)}function Te({channels:e,channelsFiles:t,asyncapiDir:o,outDir:n,componentsFiles:r}){if(e){be.mkdirSync(n,{recursive:!0});for(let m of Object.keys(e)){let a=e[m];if(d(a))continue;let i=t[m];g(a,V.dirname(i),r),h(a,i),e[m]={$ref:A(V.relative(o,i))},E(n,b,r)}}}import*as Be from"node:fs";import*as k from"node:path";import*as ke from"node:fs";function K(e){return e!=="securitySchemes"}function z(e,t){K(t)&&ke.mkdirSync(e,{recursive:!0})}import*as je from"node:fs";function q(e,t){return je.existsSync(e)&&!me(W(e),t)}import*as Re from"node:path";function T(e,t,o){if(!(!j(e)&&!Array.isArray(e))){if(Array.isArray(e)){for(let n of e)T(n,t,o);return}for(let n of Object.keys(e)){let r=e[n];if(n==="$ref"&&typeof r=="string"&&r.startsWith("#/channels/")){let m=r.slice(11),a=m.indexOf("/"),i=a===-1?m:m.slice(0,a),p=a===-1?"":m.slice(a),s=o[i];if(s){let c=A(Re.relative(t,s));e[n]=p?`${c}#${p}`:c}}else T(r,t,o)}}}function _e(e,t){let o=e.components;o&&(O(o[t])&&delete o[t],O(o)&&delete e.components)}function Ie({asyncapi:e,asyncapiDir:t,componentsFiles:o,channelsFiles:n,specVersion:r}){let m=e.components;if(m){let p=function(s){let c=k.join(a,s);z(c,s);for(let f of Object.keys(m?.[s]||{})){let{filename:l}=o[s][f],y=m?.[s]?.[f];g(y,k.dirname(l),o),T(y,k.dirname(l),n),q(l,y)?N.warn(`warning: conflict for ${f} - file already exists with different content: ${u(l)} ... Skip.
7
+ import{a as C,b as Z,c as ee,d as Ne,e as te,f as ne,g as Se,h as oe}from"./SLQPKXO2.js";import{a as Fe,b as De}from"./64G5RPLP.js";import{f as de,g as L,h as ue,i as Ce,l as W,m as h,n as Oe}from"./6NB3FKVN.js";import{$ as le,O as pe,S as ce,T as fe,aa as ye,b as me,c as j,ca as u,d as O,h as ae,ia as N,ka as he,o as A,oa as S,r as d,t as v,va as ge,wa as Ae}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as U from"node:fs";import*as Ge from"node:path";import{performance as Xe}from"perf_hooks";import*as G from"node:path";import*as R from"node:path";function F(e,t,o){let n=R.resolve(e),r=R.resolve(t);if(r!==n&&!r.startsWith(n+R.sep))throw new S(`Refusing to write "${o}" outside the output directory.`)}import*as we from"node:path";function D(e,t,o,n,r){let m=o?`.${o}`:"",a=we.join(e,t),i=a+m,p=n.get(i.toLowerCase());for(let s=2;n.has(i.toLowerCase());s++)i=`${a}-${s}${m}`;return r&&p&&p!==t&&p.toLowerCase()===t.toLowerCase()&&r.conflicts.push({name:t,collidingName:p,filename:i,pointer:r.pointer}),n.set(i.toLowerCase(),t),i}function $(e,t,o,n,r,m,a){let i={},p=new Map;for(let[s,c]of Object.entries(e||{})){if(d(c))continue;let f=D(n,L(s,r),m,p,{conflicts:a,pointer:`${t}/${v(s)}`});F(o,f,s),i[s]=f}return i}import*as Pe from"node:path";function g(e,t,o={}){Se(e,r=>{if(d(r)&&oe(r.$ref))n(r,"$ref");else if(j(r.discriminator)&&j(r.discriminator.mapping)){let{mapping:m}=r.discriminator;for(let a of Object.keys(m)){let i=m[a];typeof i=="string"&&oe(i)&&n(r.discriminator.mapping,a)}}});function n(r,m){let a=r[m].split("/"),i=a.pop(),p=a[2],s=o[p];if(!s||!s[i])return;let c=A(Pe.relative(t,s[i].filename));c.startsWith(".")||(c="./"+c),r[m]=c}}function Y(e,t,o="warn"){if(o==="off"||e.length===0)return;let n=e.map(({name:r,collidingName:m,filename:a,pointer:i})=>({ruleId:"split",severity:o,message:`${r} and ${m} would share one file on a case-insensitive file system`+(o==="error"?".":`, saving ${r} to ${a}.`),location:[{source:t,pointer:i,reportOnKey:!0}],suggest:[]}));if(Ae(n,{totals:ge(n),command:"split"}),o==="error")throw new S("\u274C Errors encountered while splitting: files not created.")}import*as ie from"node:path";var Ee=["schemas","messages","securitySchemes","parameters","correlationIds","messageTraits","operationTraits","serverBindings","channelBindings","operationBindings","messageBindings"];var xe=["schemas","messages","securitySchemes","servers","serverVariables","parameters","replies","replyAddresses","correlationIds","messageTraits","operationTraits","tags","externalDocs","serverBindings","channelBindings","operationBindings","messageBindings"];function H(e,t){return(t==="async2"?Ee:xe).filter(n=>n in e)}function ve({asyncapi:e,asyncapiDir:t,componentsFiles:o,ext:n,specVersion:r,conflicts:m}){let a=e.components;if(!a)return;let i=ie.join(t,C),p=H(a,r);for(let s of p){let c=ie.join(i,s),f=new Map;for(let l of Object.keys(a[s]||{})){let y=D(c,l,n,f,{conflicts:m,pointer:`#/components/${s}/${v(l)}`});F(t,y,l),o[s]=o[s]||{},o[s][l]={filename:y}}}}import*as be from"node:fs";import*as V from"node:path";import*as P from"node:fs";import*as $e from"node:path";function E(e,t,o){if(!P.existsSync(e)||!P.statSync(e).isDirectory())return;let n=P.readdirSync(e);for(let r of n){let m=$e.join(e,r);P.statSync(m).isDirectory()?E(m,t,o):t(m,e,o)}}function b(e,t,o){if(!ce(e))return;let n=W(e);g(n,t,o),h(n,e)}function Te({channels:e,channelsFiles:t,asyncapiDir:o,outDir:n,componentsFiles:r}){if(e){be.mkdirSync(n,{recursive:!0});for(let m of Object.keys(e)){let a=e[m];if(d(a))continue;let i=t[m];g(a,V.dirname(i),r),h(a,i),e[m]={$ref:A(V.relative(o,i))},E(n,b,r)}}}import*as Be from"node:fs";import*as k from"node:path";import*as ke from"node:fs";function K(e){return e!=="securitySchemes"}function z(e,t){K(t)&&ke.mkdirSync(e,{recursive:!0})}import*as je from"node:fs";function q(e,t){return je.existsSync(e)&&!me(W(e),t)}import*as Re from"node:path";function T(e,t,o){if(!(!j(e)&&!Array.isArray(e))){if(Array.isArray(e)){for(let n of e)T(n,t,o);return}for(let n of Object.keys(e)){let r=e[n];if(n==="$ref"&&typeof r=="string"&&r.startsWith("#/channels/")){let m=r.slice(11),a=m.indexOf("/"),i=a===-1?m:m.slice(0,a),p=a===-1?"":m.slice(a),s=o[i];if(s){let c=A(Re.relative(t,s));e[n]=p?`${c}#${p}`:c}}else T(r,t,o)}}}function _e(e,t){let o=e.components;o&&(O(o[t])&&delete o[t],O(o)&&delete e.components)}function Ie({asyncapi:e,asyncapiDir:t,componentsFiles:o,channelsFiles:n,specVersion:r}){let m=e.components;if(m){let p=function(s){let c=k.join(a,s);z(c,s);for(let f of Object.keys(m?.[s]||{})){let{filename:l}=o[s][f],y=m?.[s]?.[f];g(y,k.dirname(l),o),T(y,k.dirname(l),n),q(l,y)?N.warn(`warning: conflict for ${f} - file already exists with different content: ${u(l)} ... Skip.
8
8
  `):h(y,l),delete m?.[s]?.[f]}_e(e,s)},a=k.join(t,C);Be.mkdirSync(a,{recursive:!0}),H(m,r).forEach(p)}}import*as Me from"node:fs";import*as _ from"node:path";function Le({operations:e,operationFiles:t,asyncapiDir:o,outDir:n,componentsFiles:r,channelsFiles:m}){if(e){Me.mkdirSync(n,{recursive:!0});for(let a of Object.keys(e)){let i=e[a];if(d(i))continue;let p=t[a];g(i,_.dirname(p),r),T(i,_.dirname(p),m),h(i,p),e[a]={$ref:A(_.relative(o,p))},E(n,b,r)}}}function We({asyncapi:e,asyncapiDir:t,pathSeparator:o,ext:n,specVersion:r,source:m,fileNameConflictsSeverity:a}){let i=G.join(t,te),p=G.join(t,ne),s=r==="async3"?e.operations:void 0,c={},f=[];ve({asyncapi:e,asyncapiDir:t,componentsFiles:c,ext:n,specVersion:r,conflicts:f});let l=$(e.channels,`#/${te}`,t,i,o,n,f),y=$(s,`#/${ne}`,t,p,o,n,f);Y(f,m,a),Te({channels:e.channels,channelsFiles:l,asyncapiDir:t,outDir:i,componentsFiles:c}),Ie({asyncapi:e,asyncapiDir:t,componentsFiles:c,channelsFiles:l,specVersion:r}),Le({operations:s,operationFiles:y,asyncapiDir:t,outDir:p,componentsFiles:c,channelsFiles:l}),g(e,t,c),h(e,G.join(t,`asyncapi.${n}`))}import*as Q from"node:path";import*as se from"node:path";function X(e){return e?De.filter(t=>K(t)&&Object.keys(e).includes(t)):[]}function Ye(e,t,o,n,r){let{components:m}=e;if(!m)return;let a=se.join(t,C);for(let i of X(m)){let p=se.join(a,i),s=new Map;for(let c of Object.keys(m[i]||{})){let f=D(p,c,n,s,{conflicts:r,pointer:`#/components/${i}/${v(c)}`});F(t,f,c);let l=[];i==="schemas"&&(l=(m[i]?.[c]?.allOf||[]).map(({$ref:y})=>y).filter(ae)),o[i]=o[i]||{},o[i][c]={inherits:l,filename:f}}}}import*as Ke from"node:fs";import*as B from"node:path";import*as J from"node:path";function He(e,t,o,n){if(!e.discriminator)return;let r=`#/${C}/schemas/${t}`,m={};for(let[s,{inherits:c,filename:f}]of Object.entries(n))if(c.indexOf(r)>-1){let l=A(J.relative(J.dirname(o),f));m[s]=l.startsWith(".")?l:"./"+l}if(O(m))return;let a=e.properties[e.discriminator.propertyName],i=a&&a.enum,p=e.discriminator.mapping=e.discriminator.mapping||{};for(let s of Object.keys(m))i&&!i.includes(s)||(p[s]&&p[s]!==m[s]&&N.warn(`warning: explicit mapping overlaps with local mapping entry ${le(s)} at ${u(o)}. Please check it.`),p[s]=m[s])}function Ve(e,t){e.components&&O(e.components[t])&&delete e.components[t],O(e.components)&&delete e.components}function ze(e,t,o){let{components:n}=e;if(n){let a=function(i){let p=B.join(r,i);z(p,i);for(let s of Object.keys(n?.[i]||{})){let{filename:c}=o[i][s],f=n?.[i]?.[s];g(f,B.dirname(c),o),He(f,s,c,o.schemas||{}),q(c,f)?N.warn(`warning: conflict for ${s} - file already exists with different content: ${u(c)} ... Skip.
9
9
  `):h(f,c),delete e.components?.[i]?.[s]}Ve(e,i)},r=B.join(t,C);Ke.mkdirSync(r,{recursive:!0}),X(n).forEach(a)}}import*as I from"node:fs";import*as x from"node:path";function re(e,t,o,n,r,m,a=""){if(!e)return;I.mkdirSync(n,{recursive:!0});let i=new Map;for(let p of Object.keys(e)){let s=e[p];if(d(s))continue;let c=t[p];for(let f of Fe){let l=s[f],y=l?.["x-code-samples"]||l?.["x-codeSamples"];if(!(!y||!Array.isArray(y)))for(let w of y){if(w.source&&w.source.$ref)continue;let M=D(x.join(o,"code_samples",ue(w.lang),a+L(p,m)),f,Ce(w.lang).slice(1),i);F(o,M,w.lang),I.mkdirSync(x.dirname(M),{recursive:!0}),I.writeFileSync(M,w.source),w.source={$ref:A(x.relative(n,M))}}}h(s,c),e[p]={$ref:A(x.relative(o,c))},E(n,b,r)}}function qe(e,t,o,n,r,m){let a=Q.join(t,Z),i=Q.join(t,ee),p=e.webhooks||e["x-webhooks"],s="webhooks"in e&&e.webhooks?`#/${ee}`:`#/${Ne}`,c={},f=[];Ye(e,t,c,n,f);let l=$(e.paths,`#/${Z}`,t,a,o,n,f),y=$(p,s,t,i,o,n,f);Y(f,r,m),ze(e,t,c),re(e.paths,l,t,a,c,o),re(p,y,t,i,c,o,"webhook_"),g(e,t,c),h(e,Q.join(t,`openapi.${n}`))}async function ro({argv:e,collectSpecData:t}){let o=Xe.now(),{api:n,outDir:r,separator:m}=e,a=Oe(n);if(!U.existsSync(n))throw new S(`File ${u(n)} does not exist.`);let i=new fe(Ge.resolve(n),U.readFileSync(n,"utf-8")),p=pe(i.body,{filename:n});t?.({parsed:p});let s=he(p);switch(s){case"async2":case"async3":We({asyncapi:p,asyncapiDir:r,pathSeparator:m,ext:a,specVersion:s,source:i,fileNameConflictsSeverity:e["file-name-conflicts-severity"]});break;case"oas3_0":case"oas3_1":case"oas3_2":qe(p,r,m,a,i,e["file-name-conflicts-severity"]);break;case"oas2":throw new S("OpenAPI 2 is not supported by this command.");default:throw new S("File does not conform to the OpenAPI or AsyncAPI Specification. Version is not specified.")}N.info(`\u{1FA93} Document: ${u(n)} ${ye("is successfully split")}
10
10
  and all related files are saved to the directory: ${u(r)}
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as $,g as xt,h as et}from"./SLQPKXO2.js";import{a as wt}from"./64G5RPLP.js";import{b as lt,f as ut,m as gt,n as ht,s as yt}from"./F6IXS3RL.js";import{$ as D,V as Z,aa as G,b as N,ba as k,c as M,ca as v,d as it,g as at,i as U,ia as T,ka as tt,oa as w,qa as ft,r as E,va as ct,w as pt,wa as mt}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as Nt from"node:path";import{performance as jt}from"node:perf_hooks";import*as Ot from"node:path";function dt(t,e){xt(t,o=>{if(E(o)&&et(o.$ref)){let r=Ot.basename(o.$ref);o.$ref=o.$ref.replace(r,e+"_"+r)}else if(M(o.discriminator)&&M(o.discriminator.mapping)){let{mapping:r}=o.discriminator;for(let i of Object.keys(r)){let c=r[i];typeof c=="string"&&et(c)&&(r[i]=c.split("/").map((O,s,p)=>p.length-1===s&&!O.startsWith(e+"_")?e+"_"+O:O).join("/"))}}})}function j(t,e,o){if(!e)return"";if(!t)throw new w("Info section is not found in specification.");if(!t[e])throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value is not found in info section.`);if(!at(t[e]))throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value should be string.`);if(t[e].length>50)throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value length should not exceed 50 characters.`);return t[e].replaceAll(/\s/g,"_")}function ot(t,e){return e?t?.map(o=>{let r={};for(let[i,c]of Object.entries(o))Object.assign(r,{[e+"_"+i]:c});return r}):t}function C(t,e){return e?e+"_"+t:t}import*as Pt from"node:path";function H(t,e){return t.replace(/"(#\/components\/.*?)"/g,o=>{let r=Pt.basename(o);return o.replace(r,C(r,e))})}function B(t){return t.map(e=>({name:e}))}import*as q from"node:path";function bt(t){return q.basename(t,q.extname(t))}function vt(t){return Object.entries(t).filter(([e,o])=>o.length>1)}function rt(t,e){for(let[o,r]of e)T.warn(`Conflict on ${t} : ${D(o)} in files: ${v(r)}
7
+ import{a as $,g as xt,h as et}from"./SLQPKXO2.js";import{a as wt}from"./64G5RPLP.js";import{b as lt,f as ut,m as gt,n as ht,s as yt}from"./6NB3FKVN.js";import{$ as D,V as Z,aa as G,b as N,ba as k,c as M,ca as v,d as it,g as at,i as U,ia as T,ka as tt,oa as w,qa as ft,r as E,va as ct,w as pt,wa as mt}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import*as Nt from"node:path";import{performance as jt}from"node:perf_hooks";import*as Ot from"node:path";function dt(t,e){xt(t,o=>{if(E(o)&&et(o.$ref)){let r=Ot.basename(o.$ref);o.$ref=o.$ref.replace(r,e+"_"+r)}else if(M(o.discriminator)&&M(o.discriminator.mapping)){let{mapping:r}=o.discriminator;for(let i of Object.keys(r)){let c=r[i];typeof c=="string"&&et(c)&&(r[i]=c.split("/").map((O,s,p)=>p.length-1===s&&!O.startsWith(e+"_")?e+"_"+O:O).join("/"))}}})}function j(t,e,o){if(!e)return"";if(!t)throw new w("Info section is not found in specification.");if(!t[e])throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value is not found in info section.`);if(!at(t[e]))throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value should be string.`);if(t[e].length>50)throw new w(`${k(`prefix-${o}-with-info-prop`)} argument value length should not exceed 50 characters.`);return t[e].replaceAll(/\s/g,"_")}function ot(t,e){return e?t?.map(o=>{let r={};for(let[i,c]of Object.entries(o))Object.assign(r,{[e+"_"+i]:c});return r}):t}function C(t,e){return e?e+"_"+t:t}import*as Pt from"node:path";function H(t,e){return t.replace(/"(#\/components\/.*?)"/g,o=>{let r=Pt.basename(o);return o.replace(r,C(r,e))})}function B(t){return t.map(e=>({name:e}))}import*as q from"node:path";function bt(t){return q.basename(t,q.extname(t))}function vt(t){return Object.entries(t).filter(([e,o])=>o.length>1)}function rt(t,e){for(let[o,r]of e)T.warn(`Conflict on ${t} : ${D(o)} in files: ${v(r)}
8
8
  `)}function Tt(t){T.info(G(`
9
9
  ${t} conflict(s) on tags.
10
10
  Suggestion: please use ${v("prefix-tags-with-filename")}, ${v("prefix-tags-with-info-prop")} or ${v("without-x-tag-groups")} to prevent naming conflicts.
@@ -4,5 +4,5 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{u as o}from"./F6IXS3RL.js";import{ba as t}from"./22EANOP2.js";var r=" ",a=" ";function g(i){let p=Math.max(...i.map(n=>o(n).length)),e=p+a.length*2,c=r+t("\u2551"+" ".repeat(e)+"\u2551");return["",r+t("\u2554"+"\u2550".repeat(e)+"\u2557"),c,...i.map(n=>{let h=" ".repeat(p-o(n).length);return`${r}${t("\u2551")}${a}${n}${h}${a}${t("\u2551")}`}),c,r+t("\u255A"+"\u2550".repeat(e)+"\u255D"),"",""].join(`
7
+ import{u as o}from"./6NB3FKVN.js";import{ba as t}from"./22EANOP2.js";var r=" ",a=" ";function g(i){let p=Math.max(...i.map(n=>o(n).length)),e=p+a.length*2,c=r+t("\u2551"+" ".repeat(e)+"\u2551");return["",r+t("\u2554"+"\u2550".repeat(e)+"\u2557"),c,...i.map(n=>{let h=" ".repeat(p-o(n).length);return`${r}${t("\u2551")}${a}${n}${h}${a}${t("\u2551")}`}),c,r+t("\u255A"+"\u2550".repeat(e)+"\u255D"),"",""].join(`
8
8
  `)}export{g as a};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as F,b as O,c as k,d as g}from"./IRHTRVFK.js";import{a as A}from"./PTNNX4IU.js";import{c as d,d as M}from"./KRCCY64H.js";import{$ as C,Z as y,aa as R,ba as $,ea as S,ia as s,oa as l,pa as b}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{mkdir as z,writeFile as J}from"node:fs/promises";import V from"node:path";var E=20;function D(e){return e.total===0?void 0:Math.floor(e.covered/e.total*100)}function H(e){return e===void 0?"n/a":`${e}%`}function B(e,o){let t=e===void 0?0:Math.floor(e/100*E),r=`${"\u2588".repeat(t)}${"\u2591".repeat(E-t)}`;return!o||e===void 0?r:e>=80?R(r):e>=50?$(r):C(r)}function I(e,o){let t=[["operations",e.totals.operations],["parameters",e.totals.parameters],["schema properties",e.totals.properties],["response codes",e.totals.responses]],r=Math.max(...t.map(([,i])=>`${i.covered}/${i.total}`.length)),n="API coverage",a=[o?y(S(n)):n];for(let[i,c]of t){let f=D(c);a.push(` ${i.padEnd(18)} ${B(f,o)} ${H(f).padStart(5)} ${`${c.covered}/${c.total}`.padStart(r+3)}`)}return`${a.join(`
7
+ import{a as A}from"./PTNNX4IU.js";import{a as F,b as O,c as k,d as g}from"./YDVWNFMS.js";import{c as d,d as M}from"./KRCCY64H.js";import{$ as C,Z as y,aa as R,ba as $,ea as S,ia as s,oa as l,pa as b}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{mkdir as z,writeFile as J}from"node:fs/promises";import V from"node:path";var E=20;function D(e){return e.total===0?void 0:Math.floor(e.covered/e.total*100)}function H(e){return e===void 0?"n/a":`${e}%`}function B(e,o){let t=e===void 0?0:Math.floor(e/100*E),r=`${"\u2588".repeat(t)}${"\u2591".repeat(E-t)}`;return!o||e===void 0?r:e>=80?R(r):e>=50?$(r):C(r)}function I(e,o){let t=[["operations",e.totals.operations],["parameters",e.totals.parameters],["schema properties",e.totals.properties],["response codes",e.totals.responses]],r=Math.max(...t.map(([,i])=>`${i.covered}/${i.total}`.length)),n="API coverage",a=[o?y(S(n)):n];for(let[i,c]of t){let f=D(c);a.push(` ${i.padEnd(18)} ${B(f,o)} ${H(f).padStart(5)} ${`${c.covered}/${c.total}`.padStart(r+3)}`)}return`${a.join(`
8
8
  `)}
9
9
  `}function T(e,o){let t={version:1,meta:{...o,exchanges:e.exchanges},totals:e.totals,operations:e.operations};return`${JSON.stringify(t,null,2)}
10
10
  `}async function P(e){let o=await M(e.trafficPath);if(o.length===0)throw new Error("No traffic files found in the provided traffic path.");let t=O.create({openApiIndex:e.openApiIndex,matchMode:e.matchMode,ignoreCookies:e.ignoreCookies,ignoreHeaders:e.ignoreHeaders,previewFindingsLimit:e.previewFindingsLimit,activeRules:e.activeRules,server:e.server,minSeverity:e.minSeverity,coverage:e.coverage}),r=0,n=0;for(let a of o){let i=await A(a,e.format);if(!i){s.warn(`Skipping traffic file with unrecognized format: ${a}
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./OXA7GLZA.js";import"./MAHMSXK6.js";import"./6L6AYZQS.js";import"./ERFYZ47T.js";import"./V5CIDI6D.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as swrGenerator};
7
+ import{a}from"./DBBMGF4W.js";import"./XVZ7A34Y.js";import"./UFZ7VJKO.js";import"./UWK3L6LB.js";import"./5YW5LAGV.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as swrGenerator};
@@ -0,0 +1,9 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __pathDirname } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ var __filename = __fileURLToPath(import.meta.url);
6
+ var __dirname = __pathDirname(__filename);
7
+ import{a as ue}from"./LRUXN6H5.js";import{Aa as Y,j as b,l as I,o as z,oa as m,p as H,ta as q}from"./22EANOP2.js";import{e as ce}from"./RFWIIJFG.js";var _=ce(ue(),1);function V(){return process.env.HTTPS_PROXY||process.env.HTTP_PROXY||process.env.http_proxy||process.env.https_proxy}function K(n){let t=process.env.NO_PROXY||process.env.no_proxy;if(!t)return!1;let e=t.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean);if(e.length===0)return!1;let r;try{r=new URL(n).hostname.toLowerCase()}catch{return!1}return e.some(o=>!!(o==="*"||r===o||o.startsWith(".")&&r.endsWith(o)||!o.startsWith(".")&&r.endsWith("."+o)))}var G=async(n,{timeout:t,...e}={})=>{let r=V(),o=r&&!K(n),s,i=t?{connect:{timeout:t}}:{};return o?s=new _.ProxyAgent({uri:r,...i}):t&&(s=new _.Agent(i)),await fetch(n,{signal:t?AbortSignal.timeout(t):void 0,...e,dispatcher:s})};var le=/^[\x21-\x7e]+( [\x21-\x7e]+)*$/;function X(){let n=process.env.REDOCLY_ENVIRONMENT?.trim();return n&&le.test(n)?n:void 0}var u=class extends Error{status;constructor(t,e){super(t),this.status=e}},T=class{command;version;sunsetWarnings=[];constructor(t,e="2.0"){this.command=t,this.version=e}async request(t,e){let r=X(),o={...e.headers,"user-agent":`redocly-cli/${this.version} ${this.command}${r?` ${r}`:""}`};try{let s=await G(t,{...e,headers:o});return this.collectSunsetWarning(s),s}catch(s){let i="Failed to fetch.";throw s.cause&&(i+=` Caused by ${s.cause.message||s.cause.name}.`),(s.code||s.cause?.code)&&(i+=` Code: ${s.code||s.cause?.code}`),new Error(i)}}collectSunsetWarning(t){let e=this.getSunsetDate(t);if(!e)return;let r=new Date(e);e>Date.now()?this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!1}):this.sunsetWarnings.push({sunsetDate:r,isSunsetExpired:!0})}getSunsetDate(t){let{headers:e}=t;if(!e)return;let r=e.get("sunset")||e.get("Sunset");if(r)return Date.parse(r)}},U=class{client;domain;apiKey;constructor(t,e,r){this.client=t,this.domain=e,this.apiKey=r}async getParsedResponse(t){let e=await t.json();if(t.ok)return e;throw new u(`${e.title||t.statusText||"Unknown error"}.`,t.status)}},N=class extends U{async find(t,e){try{let r=await this.client.request(`${this.domain}/api/orgs/${encodeURIComponent(t)}/projects/${encodeURIComponent(e)}`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return r.status===404?void 0:await this.getParsedResponse(r)}catch(r){let o=`Failed to fetch project. ${r.message}`;throw r instanceof u?new u(o,r.status):new Error(o)}}},j=class extends U{async getDefaultBranch(t,e){try{let r=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/source`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return(await this.getParsedResponse(r)).branchName}catch(r){let o=`Failed to fetch default branch. ${r.message}`;throw r instanceof u?new u(o,r.status):new Error(o)}}async upsert(t,e,r){try{let o=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/remotes`,{timeout:6e3,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({mountPath:r.mountPath,mountBranchName:r.mountBranchName,type:"CICD",autoMerge:!0})});return await this.getParsedResponse(o)}catch(o){let s=`Failed to upsert remote. ${o.message}`;throw o instanceof u?new u(s,o.status):new Error(s)}}async push(t,e,r,o){let s=new globalThis.FormData;s.append("remoteId",r.remoteId),s.append("commit[message]",r.commit.message),s.append("commit[author][name]",r.commit.author.name),s.append("commit[author][email]",r.commit.author.email),s.append("commit[branchName]",r.commit.branchName),r.commit.url&&s.append("commit[url]",r.commit.url),r.commit.namespace&&s.append("commit[namespaceId]",r.commit.namespace),r.commit.sha&&s.append("commit[sha]",r.commit.sha),r.commit.repository&&s.append("commit[repositoryId]",r.commit.repository),r.commit.createdAt&&s.append("commit[createdAt]",r.commit.createdAt);for(let i of o){let a=Buffer.isBuffer(i.stream)?new Blob([i.stream]):new Blob([await de(i.stream)]);s.append(`files[${i.path}]`,a,i.path)}r.isMainBranch&&s.append("isMainBranch","true"),r.replace&&s.append("replace","true");try{let i=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/pushes`,{method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`},body:s});return await this.getParsedResponse(i)}catch(i){let a=`Failed to push. ${i.message}`;throw i instanceof u?new u(a,i.status):new Error(a)}}async getPush({organizationId:t,projectId:e,pushId:r}){try{let o=await this.client.request(`${this.domain}/api/orgs/${t}/projects/${e}/pushes/${r}`,{timeout:6e3,method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`}});return await this.getParsedResponse(o)}catch(o){let s=`Failed to get push status. ${o.message}`;throw o instanceof u?new u(s,o.status):new Error(s)}}},g=class{apiClient;projects;remotes;constructor({domain:t,apiKey:e,command:r,version:o}){this.apiClient=new T(r,o),this.projects=new N(this.apiClient,t,e),this.remotes=new j(this.apiClient,t,e)}getSunsetWarning(){return Z(this.apiClient.sunsetWarnings)}};function Z(n){let[t]=[...n].sort((e,r)=>e.isSunsetExpired!==r.isSunsetExpired?e.isSunsetExpired?-1:1:e.sunsetDate>r.sunsetDate?1:-1);return t}async function de(n){let t=[];for await(let e of n)t.push(e);return Buffer.concat(t)}function he(){if(process.env.REDOCLY_AUTHORIZATION)return process.env.REDOCLY_AUTHORIZATION;throw new Error("No api key provided, please use environment variable REDOCLY_AUTHORIZATION.")}var fe=/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?$/,P={us:"https://app.cloud.redocly.com",eu:"https://app.cloud.eu.redocly.com"};function pe(){return process.env.REDOCLY_DOMAIN||P.us}var J=me((n,t)=>{try{let e=t||n?.resolvedConfig.residency;return ge(e)?P[e]:e?new URL(e).origin:n?.resolvedConfig.scorecard?.fromProjectUrl?new URL(n.resolvedConfig.scorecard.fromProjectUrl).origin:P.us}catch{throw new R}});function O(n){try{J(void 0,n)}catch{return!1}return!0}function me(n){return(...t)=>{let e=n(...t);if(!e.startsWith("https://")&&!fe.test(e))throw new R;return e}}var R=class extends Error{constructor(){super("Invalid Reunite URL")}};function ge(n){return typeof n=="string"&&n in P}import{Buffer as D}from"node:buffer";import F from"node:crypto";import{mkdirSync as we,existsSync as ee,writeFileSync as ye,readFileSync as ve,rmSync as Te}from"node:fs";import{homedir as xe}from"node:os";import te from"node:path";import*as Q from"node:child_process";var w=class{baseUrl;apiClient;clientName="redocly-cli";constructor(t,e){this.baseUrl=t,this.apiClient=new T("login",e)}async run(t){let e=await this.getDeviceCode();t?.({verificationUri:e.verificationUri,verificationUriComplete:e.verificationUriComplete,userCode:e.userCode}),this.openBrowser(e.verificationUriComplete);let r=await this.pollingAccessToken(e.deviceCode,e.interval,e.expiresIn);return this.withResidency(r)}openBrowser(t){if(!/^https?:\/\//.test(t))return;let[e,r]=process.platform==="win32"?["rundll32",["url.dll,FileProtocolHandler",t]]:process.platform==="darwin"?["open",[t]]:["xdg-open",[t]];Q.spawn(e,r,{stdio:"ignore",detached:!0}).on("error",()=>{}).unref()}async verifyToken(t){try{return!!(await this.sendRequest("/session","GET",void 0,{Cookie:`accessToken=${t};`})).user}catch{return!1}}async verifyApiKey(t){try{return!!(await this.sendRequest("/api-keys-verify","POST",{apiKey:t})).success}catch{return!1}}async refreshToken(t){let e=await this.sendRequest("/device-rotate-token","POST",{grant_type:"refresh_token",client_name:this.clientName,refresh_token:t});if(!e.access_token)throw new Error("Failed to refresh token");return this.withResidency({access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in})}async pollingAccessToken(t,e,r){return new Promise((o,s)=>{let i=setInterval(async()=>{let c=await this.getAccessToken(t);c.access_token&&(clearInterval(i),clearTimeout(a),o(c)),c.error&&c.error!=="authorization_pending"&&(clearInterval(i),clearTimeout(a),s(c.error_description))},e*1e3),a=setTimeout(async()=>{clearInterval(i),clearTimeout(a),s("Authorization has expired. Please try again.")},r*1e3)})}async getAccessToken(t){return await this.sendRequest("/device-token","POST",{client_name:this.clientName,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})}async getDeviceCode(){let{device_code:t,user_code:e,verification_uri:r,verification_uri_complete:o,interval:s=10,expires_in:i=300}=await this.sendRequest("/device-authorize","POST",{client_name:this.clientName});return{deviceCode:t,userCode:e,verificationUri:r,verificationUriComplete:o,interval:s,expiresIn:i}}async sendRequest(t,e="GET",r=void 0,o={}){let s=`${this.baseUrl}/api${t}`,i=await this.apiClient.request(s,{body:r&&JSON.stringify(r),method:e,headers:{"Content-Type":"application/json",...o},timeout:6e3});return i.status===204?{success:!0}:await i.json()}withResidency(t){return{...t,residency:this.baseUrl}}};var Ce="4618dbc9-8aed-4e27-aaf0-225f4603e5a4",re="aes-256-cbc",k=class{version;credentialsFolderPath;credentialsFilePath;credentialsFileName;key;iv;constructor(t){this.version=t;let e=xe();this.credentialsFolderPath=te.join(e,".redocly"),this.credentialsFileName="credentials",this.credentialsFilePath=te.join(this.credentialsFolderPath,this.credentialsFileName),this.key=F.createHash("sha256").update(`${this.credentialsFolderPath}${Ce}`).digest(),this.iv=F.createHash("md5").update(this.credentialsFolderPath).digest(),we(this.credentialsFolderPath,{recursive:!0})}async login(t,e){let o=await new w(t,this.version).run(e);if(!o)throw new Error("Failed to login. No credentials received.");await this.saveCredentials(o)}async logout(){try{this.removeCredentials()}catch{}}async isAuthorized(t,e){return e?new w(t,this.version).verifyApiKey(e):!!await this.getAccessToken(t)}getAccessToken=async t=>{let e=new w(t,this.version),r=await this.readCredentials();if(!r||!O(t)||r.residency&&r.residency!==t)return null;if(await e.verifyToken(r.access_token))return r.access_token;try{let s=await e.refreshToken(r.refresh_token);return await this.saveCredentials(s),s.access_token}catch{return null}};async saveCredentials(t){try{let e=this.encryptCredentials(t);ye(this.credentialsFilePath,e,"utf8")}catch(e){throw new Error(`Failed to save credentials: ${e.message}`)}}async readCredentials(){if(!ee(this.credentialsFilePath))return null;try{let t=ve(this.credentialsFilePath,"utf8");return this.decryptCredentials(t)}catch{return null}}async removeCredentials(){ee(this.credentialsFilePath)&&Te(this.credentialsFilePath)}encryptCredentials(t){let e=F.createCipheriv(re,this.key,this.iv);return D.concat([e.update(JSON.stringify(t),"utf8"),e.final()]).toString("hex")}decryptCredentials(t){let e=F.createDecipheriv(re,this.key,this.iv),r=D.concat([e.update(D.from(t,"hex")),e.final()]);return JSON.parse(r.toString("utf8"))}};import*as y from"node:fs";import*as h from"node:path";var Pe=/\/orgs\/([^/]+)\/projects\//,Re=[401,403];async function x(n,{organization:t,project:e,onSlugDeprecated:r}){let o=await Ee(n,t,e);if(!o)return{organizationId:t,projectId:e};let s={organizationId:$e(o.uri),projectId:o.id};return(s.organizationId!==t||s.projectId!==e)&&r?.(s),s}async function Ee(n,t,e){try{let r=await n.projects.find(t,e);if(!r)throw new u(`Project "${e}" was not found in organization "${t}". Use the IDs from the organization and project settings in Reunite.`,404);return r}catch(r){if(r instanceof u&&Re.includes(r.status))return;throw r}}function $e(n){let t=n.match(Pe)?.[1];if(!t)throw new Error(`Could not read the organization ID from the project URI "${n}".`);return t}async function _e({domain:n,apiKey:t,organization:e,project:r,mountPath:o,files:s,defaultBranch:i,commit:a,version:c,replace:E,onUploadStart:$,onSunsetWarning:v,onSlugDeprecated:A}){let f=new g({domain:n,apiKey:t,command:"push",version:c});try{let{organizationId:d,projectId:l}=await x(f,{organization:e,project:r,onSlugDeprecated:A}),M=await f.remotes.getDefaultBranch(d,l),p=await f.remotes.upsert(d,l,{mountBranchName:M,mountPath:o});$?.(p);let{id:C}=await f.remotes.push(d,l,{remoteId:p.id,commit:a,isMainBranch:i===a.branchName,replace:E},s.map(W=>({path:z(W.name),stream:y.createReadStream(W.path)})));return{pushId:C,organizationId:d,projectId:l}}finally{let d=f.getSunsetWarning();d&&v?.(d)}}function Se(n,t){let e={};for(let o of n)if(y.statSync(o).isDirectory()){let s=o;ne(s,[]).forEach(a=>r(a,s))}else r(o,h.dirname(o));function r(o,s){let i=h.relative(s,o);e[i]&&t?.(e[i],o),e[i]=o}return Object.entries(e).map(([o,s])=>({name:o,path:h.resolve(s)}))}function ne(n,t){let e=y.readdirSync(n);for(let r of e){let o=h.join(n,r);y.statSync(o).isDirectory()?t=ne(o,t):t.push(o)}return t}async function se({operation:n,condition:t,onConditionNotMet:e,startTime:r=Date.now(),retryTimeoutMs:o=6e5,retryIntervalMs:s=5e3}){async function i(){let a=await n();if(t(a))return a;if(Date.now()-r>o)throw new Error("Timeout exceeded.");return await e?.(a),await b(s),i()}return i()}var Ue=1200,Fe=5e3,Ae=["pending","running"];async function Ie(n){let t=oe(n);try{let e=await x(t,n);return await ae(t,e,n.pushId)}finally{ie(t,n)}}async function Ne({buildType:n,maxExecutionTime:t=Ue,retryIntervalMs:e=Fe,startTime:r=Date.now(),onRetry:o,...s}){let i=oe(s);try{let a=await x(i,s);return await se({operation:()=>ae(i,a,s.pushId),condition:c=>!Ae.includes(c.status[n].deploy.status),onConditionNotMet:o,startTime:r,retryTimeoutMs:t*1e3,retryIntervalMs:e})}finally{ie(i,s)}}function oe({domain:n,apiKey:t,version:e}){return new g({domain:n,apiKey:t,command:"push-status",version:e})}function ie(n,{onSunsetWarning:t}){let e=n.getSunsetWarning();e&&t?.(e)}function ae(n,{organizationId:t,projectId:e},r){return n.remotes.getPush({organizationId:t,projectId:e,pushId:r})}async function je({projectUrl:n,auth:t,isApiKey:e=!1,onDebug:r}){let o=Oe(n);if(!o)throw new m(`Invalid project URL format: ${n}`);try{let s=await De({...o,auth:t,isApiKey:e,onDebug:r}),i=s.config.scorecardClassic||s.config.scorecard;if(!i)throw new Error("No scorecard configuration found.");let a=s.config.pluginsUrl,c=a?await ke(a,r):void 0;return{scorecard:i,plugins:c,pluginsUrl:a}}catch(s){throw new m(s instanceof Error?s.message:String(s))}}function Oe(n){let t=new URL(n),e=t.pathname.match(/\/org\/(?<orgSlug>[^/]+)\/project\/(?<projectSlug>[^/]+)/);if(!e?.groups)return;let{orgSlug:r,projectSlug:o}=e.groups;return{residency:t.origin,orgSlug:r,projectSlug:o}}async function De({residency:n,orgSlug:t,projectSlug:e,auth:r,isApiKey:o,onDebug:s}){let i=new URL(`${n}/api/orgs/${t}/projects/${e}`),a=await fetch(i,{headers:Le(r,o)});if(s?.(`Project fetch response status: ${a.status}`),a.status===401||a.status===403)throw s?.(`Authentication failed with status ${a.status}.`),s?.("Check that your credentials are valid and have the necessary permissions."),new Error(`Unauthorized access to project: ${e}. Please check your credentials.`);if(a.status!==200)throw new Error(`Failed to fetch project: ${e}. Status: ${a.status}`);return s?.("Successfully received project configuration."),a.json()}async function ke(n,t){t?.(`Fetching plugins from: ${n}`);try{let e=await fetch(n);if(t?.(`Plugins fetch response status: ${e.status}`),e.status!==200){t?.("Failed to fetch plugins");return}return e.text()}catch(e){t?.(`Error fetching plugins: ${e instanceof Error?e.message:String(e)}`);return}}function Le(n,t){return t?{Authorization:`Bearer ${n}`}:{Cookie:`accessToken=${n}`}}async function L(n,t,e=[],r=[],o){let s={};for(let i of e){let a={[i.name]:{root:n,rules:t}},c=await q({apis:a,...i,plugins:r},{configPath:o});s[i.name]=c.forAlias(i.name)}return s}function B(n,t){if(n){for(let e of n)if(Object.entries(e.where?.metadata||{}).every(([o,s])=>Be(o,s,t)))return e}}function Be(n,t,e){if(t.match(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}Z)?\/(\d{4}-\d{2}-\d{2})?$/)){if(!e[n])return!1;let[r,o]=t.split("/"),s=new Date(e[n]);return!(s<new Date(r)||o&&s>new Date(o))}else if(t.match(/^\/.*\//)){if(!e[n])return!1;try{return H(t).test(e[n])}catch{throw new m(`Invalid regex in scorecard target "${n}": ${t}`)}}return e[n]===t}import{pathToFileURL as Me}from"node:url";async function We(n,t){if(!n)return[];let e=Me(t??process.cwd()).href+"/",r=n.replaceAll("__redocly_dirname",`"${e}"`);return(await import(`data:text/javascript;base64,${btoa(r)}`)).default.map(i=>i())}var be=".redocly.com";function ze(n){try{return new URL(n).hostname.toLowerCase().endsWith(be)}catch{return!1}}async function He({apiPath:n,document:t,externalRefResolver:e,scorecardConfig:r,configPath:o,plugins:s=[],targetLevel:i,metadata:a={},onDebug:c}){let E=[],$=new Map,v=r.levels||[];if(i&&!v.some(l=>l.name===i))throw new m(`Target level "${i}" not found in the scorecard configuration levels.
8
+ `);let A=B(r.targets,a)?.rules,f=await L(n,A,v,s,o||"");for(let l of v){c?.(`
9
+ Validating level: "${l.name}"`),s.length>0&&c?.(`Using ${s.length} ${I("plugin",s.length)} for this level.`),c?.("Linting document against level rules...");let p=(await Y({document:t,externalRefResolver:e,config:f[l.name]})).filter(({ignored:C})=>!C).map(C=>({...C,scorecardLevel:l.name}));c?.(`Found ${p.length} ${I("problem",p.length)} for level "${l.name}".`),$.set(l.name,p),E.push(...p)}let d=qe($,v,i);return{problems:E,achievedLevel:d,targetLevelAchieved:i?d===i:!0}}function qe(n,t,e){let r=null;for(let o of t){if((n.get(o.name)||[]).some(a=>a.severity==="error"))return r||"Non Conformant";if(r=o.name,e&&o.name===e)return o.name}return r||"Non Conformant"}export{u as a,T as b,g as c,Z as d,he as e,P as f,pe as g,J as h,O as i,R as j,w as k,k as l,x as m,_e as n,Se as o,Ie as p,Ne as q,je as r,L as s,B as t,We as u,ze as v,He as w};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as Gre,b as Yre,c as qre}from"./UF2ZCH7W.js";import{a as p5}from"./ZOE6CZ74.js";import{b as d5,e as h5}from"./F6IXS3RL.js";import{d as g5,e as m5}from"./KVXNE2UB.js";import{Z as u5,ba as f5,ea as uR,ia as Ly,k as Wre,oa as k1,u as T1,y as c5,z as Vre}from"./22EANOP2.js";import"./NEWT5A6S.js";import{a as Tn,b as l5,c as W,d as Hre,e as qv,f as jre}from"./RFWIIJFG.js";var v5=W((y5,b5)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=(function(t){return function(n){t.console&&console.warn&&console.warn(n)}})(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),r=Object.keys(t),i=0;i<r.length;i++){var o=r[i],s=t[o];if(Array.isArray(s)){n[o]=s.slice();continue}if(typeof s=="string"||typeof s=="number"||typeof s=="boolean"){n[o]=s;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},e.FieldRef=function(t,n,r){this.docRef=t,this.fieldName=n,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var n=t.indexOf(e.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=t.slice(0,n),i=t.slice(n+1);return new e.FieldRef(i,r,t)},e.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue};e.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var n=0;n<this.length;n++)this.elements[t[n]]=!0}else this.length=0},e.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},e.Set.prototype.contains=function(t){return!!this.elements[t]},e.Set.prototype.intersect=function(t){var n,r,i,o=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(n=this,r=t):(n=t,r=this),i=Object.keys(n.elements);for(var s=0;s<i.length;s++){var a=i[s];a in r.elements&&o.push(a)}return new e.Set(o)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(t,n){var r=0;for(var i in t)i!="_index"&&(r+=Object.keys(t[i]).length);var o=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(o))},e.Token=function(t,n){this.str=t||"",this.metadata=n||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(n){return n},new e.Token(t(this.str,this.metadata),this.metadata)};e.tokenizer=function(t,n){if(t==null||t==null)return[];if(Array.isArray(t))return t.map(function(d){return new e.Token(e.utils.asString(d).toLowerCase(),e.utils.clone(n))});for(var r=t.toString().toLowerCase(),i=r.length,o=[],s=0,a=0;s<=i;s++){var l=r.charAt(s),c=s-a;if(l.match(e.tokenizer.separator)||s==i){if(c>0){var g=e.utils.clone(n)||{};g.position=[a,c],g.index=o.length,o.push(new e.Token(r.slice(a,s),g))}a=s+1}}return o},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
7
+ import{a as Gre,b as Yre,c as qre}from"./UF2ZCH7W.js";import{a as p5}from"./3DEJQSYG.js";import{b as d5,e as h5}from"./6NB3FKVN.js";import{d as g5,e as m5}from"./W3G6AQCC.js";import{Z as u5,ba as f5,ea as uR,ia as Ly,k as Wre,oa as k1,u as T1,y as c5,z as Vre}from"./22EANOP2.js";import"./NEWT5A6S.js";import{a as Tn,b as l5,c as W,d as Hre,e as qv,f as jre}from"./RFWIIJFG.js";var v5=W((y5,b5)=>{(function(){var e=function(t){var n=new e.Builder;return n.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),n.searchPipeline.add(e.stemmer),t.call(n,n),n.build()};e.version="2.3.9";e.utils={},e.utils.warn=(function(t){return function(n){t.console&&console.warn&&console.warn(n)}})(this),e.utils.asString=function(t){return t==null?"":t.toString()},e.utils.clone=function(t){if(t==null)return t;for(var n=Object.create(null),r=Object.keys(t),i=0;i<r.length;i++){var o=r[i],s=t[o];if(Array.isArray(s)){n[o]=s.slice();continue}if(typeof s=="string"||typeof s=="number"||typeof s=="boolean"){n[o]=s;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},e.FieldRef=function(t,n,r){this.docRef=t,this.fieldName=n,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var n=t.indexOf(e.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=t.slice(0,n),i=t.slice(n+1);return new e.FieldRef(i,r,t)},e.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue};e.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var n=0;n<this.length;n++)this.elements[t[n]]=!0}else this.length=0},e.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},e.Set.prototype.contains=function(t){return!!this.elements[t]},e.Set.prototype.intersect=function(t){var n,r,i,o=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(n=this,r=t):(n=t,r=this),i=Object.keys(n.elements);for(var s=0;s<i.length;s++){var a=i[s];a in r.elements&&o.push(a)}return new e.Set(o)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(t,n){var r=0;for(var i in t)i!="_index"&&(r+=Object.keys(t[i]).length);var o=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(o))},e.Token=function(t,n){this.str=t||"",this.metadata=n||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(n){return n},new e.Token(t(this.str,this.metadata),this.metadata)};e.tokenizer=function(t,n){if(t==null||t==null)return[];if(Array.isArray(t))return t.map(function(d){return new e.Token(e.utils.asString(d).toLowerCase(),e.utils.clone(n))});for(var r=t.toString().toLowerCase(),i=r.length,o=[],s=0,a=0;s<=i;s++){var l=r.charAt(s),c=s-a;if(l.match(e.tokenizer.separator)||s==i){if(c>0){var g=e.utils.clone(n)||{};g.position=[a,c],g.index=o.length,o.push(new e.Token(r.slice(a,s),g))}a=s+1}}return o},e.tokenizer.separator=/[\s\-]+/;e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,n){n in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+n),t.label=n,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var n=t.label&&t.label in this.registeredFunctions;n||e.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
8
8
  `,t)},e.Pipeline.load=function(t){var n=new e.Pipeline;return t.forEach(function(r){var i=e.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(n){e.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},e.Pipeline.prototype.after=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},e.Pipeline.prototype.before=function(t,n){e.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(t);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},e.Pipeline.prototype.remove=function(t){var n=this._stack.indexOf(t);n!=-1&&this._stack.splice(n,1)},e.Pipeline.prototype.run=function(t){for(var n=this._stack.length,r=0;r<n;r++){for(var i=this._stack[r],o=[],s=0;s<t.length;s++){var a=i(t[s],s,t);if(!(a==null||a===""))if(Array.isArray(a))for(var l=0;l<a.length;l++)o.push(a[l]);else o.push(a)}t=o}return t},e.Pipeline.prototype.runString=function(t,n){var r=new e.Token(t,n);return this.run([r]).map(function(i){return i.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})};e.Vector=function(t){this._magnitude=0,this.elements=t||[]},e.Vector.prototype.positionForIndex=function(t){if(this.elements.length==0)return 0;for(var n=0,r=this.elements.length/2,i=r-n,o=Math.floor(i/2),s=this.elements[o*2];i>1&&(s<t&&(n=o),s>t&&(r=o),s!=t);)i=r-n,o=n+Math.floor(i/2),s=this.elements[o*2];if(s==t||s>t)return o*2;if(s<t)return(o+1)*2},e.Vector.prototype.insert=function(t,n){this.upsert(t,n,function(){throw"duplicate index"})},e.Vector.prototype.upsert=function(t,n,r){this._magnitude=0;var i=this.positionForIndex(t);this.elements[i]==t?this.elements[i+1]=r(this.elements[i+1],n):this.elements.splice(i,0,t,n)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t=0,n=this.elements.length,r=1;r<n;r+=2){var i=this.elements[r];t+=i*i}return this._magnitude=Math.sqrt(t)},e.Vector.prototype.dot=function(t){for(var n=0,r=this.elements,i=t.elements,o=r.length,s=i.length,a=0,l=0,c=0,g=0;c<o&&g<s;)a=r[c],l=i[g],a<l?c+=2:a>l?g+=2:a==l&&(n+=r[c+1]*i[g+1],c+=2,g+=2);return n},e.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),n=1,r=0;n<this.elements.length;n+=2,r++)t[r]=this.elements[n];return t},e.Vector.prototype.toJSON=function(){return this.elements};e.stemmer=(function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",o=r+"[^aeiouy]*",s=i+"[aeiou]*",a="^("+o+")?"+s+o,l="^("+o+")?"+s+o+"("+s+")?$",c="^("+o+")?"+s+o+s+o,g="^("+o+")?"+i,d=new RegExp(a),v=new RegExp(c),x=new RegExp(l),T=new RegExp(g),O=/^(.+?)(ss|i)es$/,k=/^(.+?)([^s])s$/,R=/^(.+?)eed$/,N=/^(.+?)(ed|ing)$/,H=/.$/,V=/(at|bl|iz)$/,te=new RegExp("([^aeiouylsz])\\1$"),U=new RegExp("^"+o+i+"[^aeiouwxy]$"),ie=/^(.+?[^aeiou])y$/,z=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,$=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,re=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,fe=/^(.+?)(s|t)(ion)$/,he=/^(.+?)e$/,Y=/ll$/,le=new RegExp("^"+o+i+"[^aeiouwxy]$"),de=function(ue){var Ee,pe,Oe,se,Te,De,Ke;if(ue.length<3)return ue;if(Oe=ue.substr(0,1),Oe=="y"&&(ue=Oe.toUpperCase()+ue.substr(1)),se=O,Te=k,se.test(ue)?ue=ue.replace(se,"$1$2"):Te.test(ue)&&(ue=ue.replace(Te,"$1$2")),se=R,Te=N,se.test(ue)){var Ge=se.exec(ue);se=d,se.test(Ge[1])&&(se=H,ue=ue.replace(se,""))}else if(Te.test(ue)){var Ge=Te.exec(ue);Ee=Ge[1],Te=T,Te.test(Ee)&&(ue=Ee,Te=V,De=te,Ke=U,Te.test(ue)?ue=ue+"e":De.test(ue)?(se=H,ue=ue.replace(se,"")):Ke.test(ue)&&(ue=ue+"e"))}if(se=ie,se.test(ue)){var Ge=se.exec(ue);Ee=Ge[1],ue=Ee+"i"}if(se=z,se.test(ue)){var Ge=se.exec(ue);Ee=Ge[1],pe=Ge[2],se=d,se.test(Ee)&&(ue=Ee+t[pe])}if(se=$,se.test(ue)){var Ge=se.exec(ue);Ee=Ge[1],pe=Ge[2],se=d,se.test(Ee)&&(ue=Ee+n[pe])}if(se=re,Te=fe,se.test(ue)){var Ge=se.exec(ue);Ee=Ge[1],se=v,se.test(Ee)&&(ue=Ee)}else if(Te.test(ue)){var Ge=Te.exec(ue);Ee=Ge[1]+Ge[2],Te=v,Te.test(Ee)&&(ue=Ee)}if(se=he,se.test(ue)){var Ge=se.exec(ue);Ee=Ge[1],se=v,Te=x,De=le,(se.test(Ee)||Te.test(Ee)&&!De.test(Ee))&&(ue=Ee)}return se=Y,Te=v,se.test(ue)&&Te.test(ue)&&(se=H,ue=ue.replace(se,"")),Oe=="y"&&(ue=Oe.toLowerCase()+ue.substr(1)),ue};return function(we){return we.update(de)}})(),e.Pipeline.registerFunction(e.stemmer,"stemmer");e.generateStopWordFilter=function(t){var n=t.reduce(function(r,i){return r[i]=i,r},{});return function(r){if(r&&n[r.toString()]!==r.toString())return r}},e.stopWordFilter=e.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter");e.trimmer=function(t){return t.update(function(n){return n.replace(/^\W+/,"").replace(/\W+$/,"")})},e.Pipeline.registerFunction(e.trimmer,"trimmer");e.TokenSet=function(){this.final=!1,this.edges={},this.id=e.TokenSet._nextId,e.TokenSet._nextId+=1},e.TokenSet._nextId=1,e.TokenSet.fromArray=function(t){for(var n=new e.TokenSet.Builder,r=0,i=t.length;r<i;r++)n.insert(t[r]);return n.finish(),n.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,n){for(var r=new e.TokenSet,i=[{node:r,editsRemaining:n,str:t}];i.length;){var o=i.pop();if(o.str.length>0){var s=o.str.charAt(0),a;s in o.node.edges?a=o.node.edges[s]:(a=new e.TokenSet,o.node.edges[s]=a),o.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(o.editsRemaining!=0){if("*"in o.node.edges)var l=o.node.edges["*"];else{var l=new e.TokenSet;o.node.edges["*"]=l}if(o.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&i.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),o.str.length==1&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var c=o.node.edges["*"];else{var c=new e.TokenSet;o.node.edges["*"]=c}o.str.length==1&&(c.final=!0),i.push({node:c,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var g=o.str.charAt(0),d=o.str.charAt(1),v;d in o.node.edges?v=o.node.edges[d]:(v=new e.TokenSet,o.node.edges[d]=v),o.str.length==1&&(v.final=!0),i.push({node:v,editsRemaining:o.editsRemaining-1,str:g+o.str.slice(2)})}}}return r},e.TokenSet.fromString=function(t){for(var n=new e.TokenSet,r=n,i=0,o=t.length;i<o;i++){var s=t[i],a=i==o-1;if(s=="*")n.edges[s]=n,n.final=a;else{var l=new e.TokenSet;l.final=a,n.edges[s]=l,n=l}}return r},e.TokenSet.prototype.toArray=function(){for(var t=[],n=[{prefix:"",node:this}];n.length;){var r=n.pop(),i=Object.keys(r.node.edges),o=i.length;r.node.final&&(r.prefix.charAt(0),t.push(r.prefix));for(var s=0;s<o;s++){var a=i[s];n.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return t},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var t=this.final?"1":"0",n=Object.keys(this.edges).sort(),r=n.length,i=0;i<r;i++){var o=n[i],s=this.edges[o];t=t+o+s.id}return t},e.TokenSet.prototype.intersect=function(t){for(var n=new e.TokenSet,r=void 0,i=[{qNode:t,output:n,node:this}];i.length;){r=i.pop();for(var o=Object.keys(r.qNode.edges),s=o.length,a=Object.keys(r.node.edges),l=a.length,c=0;c<s;c++)for(var g=o[c],d=0;d<l;d++){var v=a[d];if(v==g||g=="*"){var x=r.node.edges[v],T=r.qNode.edges[g],O=x.final&&T.final,k=void 0;v in r.output.edges?(k=r.output.edges[v],k.final=k.final||O):(k=new e.TokenSet,k.final=O,r.output.edges[v]=k),i.push({qNode:T,output:k,node:x})}}}return n},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var n,r=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<t.length&&i<this.previousWord.length&&t[i]==this.previousWord[i];i++)r++;this.minimize(r),this.uncheckedNodes.length==0?n=this.root:n=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<t.length;i++){var o=new e.TokenSet,s=t[i];n.edges[s]=o,this.uncheckedNodes.push({parent:n,char:s,child:o}),n=o}n.final=!0,this.previousWord=t},e.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},e.TokenSet.Builder.prototype.minimize=function(t){for(var n=this.uncheckedNodes.length-1;n>=t;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};e.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},e.Index.prototype.search=function(t){return this.query(function(n){var r=new e.QueryParser(t,n);r.parse()})},e.Index.prototype.query=function(t){for(var n=new e.Query(this.fields),r=Object.create(null),i=Object.create(null),o=Object.create(null),s=Object.create(null),a=Object.create(null),l=0;l<this.fields.length;l++)i[this.fields[l]]=new e.Vector;t.call(n,n);for(var l=0;l<n.clauses.length;l++){var c=n.clauses[l],g=null,d=e.Set.empty;c.usePipeline?g=this.pipeline.runString(c.term,{fields:c.fields}):g=[c.term];for(var v=0;v<g.length;v++){var x=g[v];c.term=x;var T=e.TokenSet.fromClause(c),O=this.tokenSet.intersect(T).toArray();if(O.length===0&&c.presence===e.Query.presence.REQUIRED){for(var k=0;k<c.fields.length;k++){var R=c.fields[k];s[R]=e.Set.empty}break}for(var N=0;N<O.length;N++)for(var H=O[N],V=this.invertedIndex[H],te=V._index,k=0;k<c.fields.length;k++){var R=c.fields[k],U=V[R],ie=Object.keys(U),z=H+"/"+R,$=new e.Set(ie);if(c.presence==e.Query.presence.REQUIRED&&(d=d.union($),s[R]===void 0&&(s[R]=e.Set.complete)),c.presence==e.Query.presence.PROHIBITED){a[R]===void 0&&(a[R]=e.Set.empty),a[R]=a[R].union($);continue}if(i[R].upsert(te,c.boost,function(K,Le){return K+Le}),!o[z]){for(var re=0;re<ie.length;re++){var fe=ie[re],he=new e.FieldRef(fe,R),Y=U[fe],le;(le=r[he])===void 0?r[he]=new e.MatchData(H,R,Y):le.add(H,R,Y)}o[z]=!0}}}if(c.presence===e.Query.presence.REQUIRED)for(var k=0;k<c.fields.length;k++){var R=c.fields[k];s[R]=s[R].intersect(d)}}for(var de=e.Set.complete,we=e.Set.empty,l=0;l<this.fields.length;l++){var R=this.fields[l];s[R]&&(de=de.intersect(s[R])),a[R]&&(we=we.union(a[R]))}var ue=Object.keys(r),Ee=[],pe=Object.create(null);if(n.isNegated()){ue=Object.keys(this.fieldVectors);for(var l=0;l<ue.length;l++){var he=ue[l],Oe=e.FieldRef.fromString(he);r[he]=new e.MatchData}}for(var l=0;l<ue.length;l++){var Oe=e.FieldRef.fromString(ue[l]),se=Oe.docRef;if(de.contains(se)&&!we.contains(se)){var Te=this.fieldVectors[Oe],De=i[Oe.fieldName].similarity(Te),Ke;if((Ke=pe[se])!==void 0)Ke.score+=De,Ke.matchData.combine(r[Oe]);else{var Ge={ref:se,score:De,matchData:r[Oe]};pe[se]=Ge,Ee.push(Ge)}}}return Ee.sort(function(Se,Be){return Be.score-Se.score})},e.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(r){return[r,this.invertedIndex[r]]},this),n=Object.keys(this.fieldVectors).map(function(r){return[r,this.fieldVectors[r].toJSON()]},this);return{version:e.version,fields:this.fields,fieldVectors:n,invertedIndex:t,pipeline:this.pipeline.toJSON()}},e.Index.load=function(t){var n={},r={},i=t.fieldVectors,o=Object.create(null),s=t.invertedIndex,a=new e.TokenSet.Builder,l=e.Pipeline.load(t.pipeline);t.version!=e.version&&e.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+e.version+"' does not match serialized index '"+t.version+"'");for(var c=0;c<i.length;c++){var g=i[c],d=g[0],v=g[1];r[d]=new e.Vector(v)}for(var c=0;c<s.length;c++){var g=s[c],x=g[0],T=g[1];a.insert(x),o[x]=T}return a.finish(),n.fields=t.fields,n.fieldVectors=r,n.invertedIndex=o,n.tokenSet=a.root,n.pipeline=l,new e.Index(n)};e.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=e.tokenizer,this.pipeline=new e.Pipeline,this.searchPipeline=new e.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},e.Builder.prototype.ref=function(t){this._ref=t},e.Builder.prototype.field=function(t,n){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=n||{}},e.Builder.prototype.b=function(t){t<0?this._b=0:t>1?this._b=1:this._b=t},e.Builder.prototype.k1=function(t){this._k1=t},e.Builder.prototype.add=function(t,n){var r=t[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var o=0;o<i.length;o++){var s=i[o],a=this._fields[s].extractor,l=a?a(t):t[s],c=this.tokenizer(l,{fields:[s]}),g=this.pipeline.run(c),d=new e.FieldRef(r,s),v=Object.create(null);this.fieldTermFrequencies[d]=v,this.fieldLengths[d]=0,this.fieldLengths[d]+=g.length;for(var x=0;x<g.length;x++){var T=g[x];if(v[T]==null&&(v[T]=0),v[T]+=1,this.invertedIndex[T]==null){var O=Object.create(null);O._index=this.termIndex,this.termIndex+=1;for(var k=0;k<i.length;k++)O[i[k]]=Object.create(null);this.invertedIndex[T]=O}this.invertedIndex[T][s][r]==null&&(this.invertedIndex[T][s][r]=Object.create(null));for(var R=0;R<this.metadataWhitelist.length;R++){var N=this.metadataWhitelist[R],H=T.metadata[N];this.invertedIndex[T][s][r][N]==null&&(this.invertedIndex[T][s][r][N]=[]),this.invertedIndex[T][s][r][N].push(H)}}}},e.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),n=t.length,r={},i={},o=0;o<n;o++){var s=e.FieldRef.fromString(t[o]),a=s.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[s]}for(var l=Object.keys(this._fields),o=0;o<l.length;o++){var c=l[o];r[c]=r[c]/i[c]}this.averageFieldLength=r},e.Builder.prototype.createFieldVectors=function(){for(var t={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),o=0;o<r;o++){for(var s=e.FieldRef.fromString(n[o]),a=s.fieldName,l=this.fieldLengths[s],c=new e.Vector,g=this.fieldTermFrequencies[s],d=Object.keys(g),v=d.length,x=this._fields[a].boost||1,T=this._documents[s.docRef].boost||1,O=0;O<v;O++){var k=d[O],R=g[k],N=this.invertedIndex[k]._index,H,V,te;i[k]===void 0?(H=e.idf(this.invertedIndex[k],this.documentCount),i[k]=H):H=i[k],V=H*((this._k1+1)*R)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[a]))+R),V*=x,V*=T,te=Math.round(V*1e3)/1e3,c.insert(N,te)}t[s]=c}this.fieldVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},e.Builder.prototype.use=function(t){var n=Array.prototype.slice.call(arguments,1);n.unshift(this),t.apply(this,n)},e.MatchData=function(t,n,r){for(var i=Object.create(null),o=Object.keys(r||{}),s=0;s<o.length;s++){var a=o[s];i[a]=r[a].slice()}this.metadata=Object.create(null),t!==void 0&&(this.metadata[t]=Object.create(null),this.metadata[t][n]=i)},e.MatchData.prototype.combine=function(t){for(var n=Object.keys(t.metadata),r=0;r<n.length;r++){var i=n[r],o=Object.keys(t.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var s=0;s<o.length;s++){var a=o[s],l=Object.keys(t.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var c=0;c<l.length;c++){var g=l[c];this.metadata[i][a][g]==null?this.metadata[i][a][g]=t.metadata[i][a][g]:this.metadata[i][a][g]=this.metadata[i][a][g].concat(t.metadata[i][a][g])}}}},e.MatchData.prototype.add=function(t,n,r){if(!(t in this.metadata)){this.metadata[t]=Object.create(null),this.metadata[t][n]=r;return}if(!(n in this.metadata[t])){this.metadata[t][n]=r;return}for(var i=Object.keys(r),o=0;o<i.length;o++){var s=i[o];s in this.metadata[t][n]?this.metadata[t][n][s]=this.metadata[t][n][s].concat(r[s]):this.metadata[t][n][s]=r[s]}},e.Query=function(t){this.clauses=[],this.allFields=t},e.Query.wildcard=new String("*"),e.Query.wildcard.NONE=0,e.Query.wildcard.LEADING=1,e.Query.wildcard.TRAILING=2,e.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},e.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=e.Query.wildcard.NONE),t.wildcard&e.Query.wildcard.LEADING&&t.term.charAt(0)!=e.Query.wildcard&&(t.term="*"+t.term),t.wildcard&e.Query.wildcard.TRAILING&&t.term.slice(-1)!=e.Query.wildcard&&(t.term=""+t.term+"*"),"presence"in t||(t.presence=e.Query.presence.OPTIONAL),this.clauses.push(t),this},e.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=e.Query.presence.PROHIBITED)return!1;return!0},e.Query.prototype.term=function(t,n){if(Array.isArray(t))return t.forEach(function(i){this.term(i,e.utils.clone(n))},this),this;var r=n||{};return r.term=t.toString(),this.clause(r),this},e.QueryParseError=function(t,n,r){this.name="QueryParseError",this.message=t,this.start=n,this.end=r},e.QueryParseError.prototype=new Error,e.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},e.QueryLexer.prototype.run=function(){for(var t=e.QueryLexer.lexText;t;)t=t(this)},e.QueryLexer.prototype.sliceString=function(){for(var t=[],n=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],t.push(this.str.slice(n,r)),n=r+1;return t.push(this.str.slice(n,this.pos)),this.escapeCharPositions.length=0,t.join("")},e.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},e.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},e.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,n;do t=this.next(),n=t.charCodeAt(0);while(n>47&&n<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos<this.length},e.QueryLexer.EOS="EOS",e.QueryLexer.FIELD="FIELD",e.QueryLexer.TERM="TERM",e.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",e.QueryLexer.BOOST="BOOST",e.QueryLexer.PRESENCE="PRESENCE",e.QueryLexer.lexField=function(t){return t.backup(),t.emit(e.QueryLexer.FIELD),t.ignore(),e.QueryLexer.lexText},e.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var n=t.next();if(n==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){t.escapeCharacter();continue}if(n==":")return e.QueryLexer.lexField;if(n=="~")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if(n=="^")return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if(n=="+"&&t.width()===1||n=="-"&&t.width()===1)return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(n.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}},e.QueryParser=function(t,n){this.lexer=new e.QueryLexer(t),this.query=n,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},e.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},e.QueryParser.parseClause=function(t){var n=t.peekLexeme();if(n!=null)switch(n.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new e.QueryParseError(r,n.start,n.end)}},e.QueryParser.parsePresence=function(t){var n=t.consumeLexeme();if(n!=null){switch(n.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new e.QueryParseError(r,n.start,n.end)}var i=t.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new e.QueryParseError(r,n.start,n.end)}switch(i.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new e.QueryParseError(r,i.start,i.end)}}},e.QueryParser.parseField=function(t){var n=t.consumeLexeme();if(n!=null){if(t.query.allFields.indexOf(n.str)==-1){var r=t.query.allFields.map(function(s){return"'"+s+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.fields=[n.str];var o=t.peekLexeme();if(o==null){var i="expecting term, found nothing";throw new e.QueryParseError(i,n.start,n.end)}if(o.type===e.QueryLexer.TERM)return e.QueryParser.parseTerm;var i="expecting term, found '"+o.type+"'";throw new e.QueryParseError(i,o.start,o.end)}},e.QueryParser.parseTerm=function(t){var n=t.consumeLexeme();if(n!=null){t.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var r=t.peekLexeme();if(r==null){t.nextClause();return}switch(r.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new e.QueryParseError(i,r.start,r.end)}}},e.QueryParser.parseEditDistance=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.editDistance=r;var o=t.peekLexeme();if(o==null){t.nextClause();return}switch(o.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+o.type+"'";throw new e.QueryParseError(i,o.start,o.end)}}},e.QueryParser.parseBoost=function(t){var n=t.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new e.QueryParseError(i,n.start,n.end)}t.currentClause.boost=r;var o=t.peekLexeme();if(o==null){t.nextClause();return}switch(o.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+o.type+"'";throw new e.QueryParseError(i,o.start,o.end)}}},(function(t,n){typeof define=="function"&&define.amd?define(n):typeof y5=="object"?b5.exports=n():t.lunr=n()})(this,function(){return e})})()});var S5=W((LBe,w5)=>{"use strict";function Xre(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}w5.exports=Xre()});var _5=W((NBe,E5)=>{"use strict";var x5=S5();E5.exports=function(t,n){if(t){n.then(function(r){x5(function(){t(null,r)})},function(r){x5(function(){t(r)})});return}else return n}});var A5=W((DBe,P5)=>{P5.exports=DS;DS.default=DS;DS.stable=k5;DS.stableStringify=k5;var C1="[...]",O5="[Circular]",Dy=[],Ny=[];function T5(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function DS(e,t,n,r){typeof r>"u"&&(r=T5()),fR(e,"",0,[],void 0,0,r);var i;try{Ny.length===0?i=JSON.stringify(e,t,n):i=JSON.stringify(e,C5(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Dy.length!==0;){var o=Dy.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Xv(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);i.get!==void 0?i.configurable?(Object.defineProperty(r,n,{value:e}),Dy.push([r,n,t,i])):Ny.push([t,n,e]):(r[n]=e,Dy.push([r,n,t]))}function fR(e,t,n,r,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<r.length;a++)if(r[a]===e){Xv(O5,e,t,i);return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){Xv(C1,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){Xv(C1,e,t,i);return}if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)fR(e[a],a,a,r,e,o,s);else{var l=Object.keys(e);for(a=0;a<l.length;a++){var c=l[a];fR(e[c],c,a,r,e,o,s)}}r.pop()}}function Qre(e,t){return e<t?-1:e>t?1:0}function k5(e,t,n,r){typeof r>"u"&&(r=T5());var i=dR(e,"",0,[],void 0,0,r)||e,o;try{Ny.length===0?o=JSON.stringify(i,t,n):o=JSON.stringify(i,C5(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Dy.length!==0;){var s=Dy.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function dR(e,t,n,r,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<r.length;a++)if(r[a]===e){Xv(O5,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){Xv(C1,e,t,i);return}if(typeof s.edgesLimit<"u"&&n+1>s.edgesLimit){Xv(C1,e,t,i);return}if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)dR(e[a],a,a,r,e,o,s);else{var l={},c=Object.keys(e).sort(Qre);for(a=0;a<c.length;a++){var g=c[a];dR(e[g],g,a,r,e,o,s),l[g]=e[g]}if(typeof i<"u")Dy.push([i,t,e]),i[t]=l;else return l}r.pop()}}function C5(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if(Ny.length>0)for(var r=0;r<Ny.length;r++){var i=Ny[r];if(i[1]===t&&i[0]===n){n=i[2],Ny.splice(r,1);break}}return e.call(this,t,n)}}});var I5=W((FBe,R5)=>{R5.exports=(function(e,t){e||(e=document),t||(t=window);var n=[],r,i=!1,o=e.documentElement,s=function(){},a,l="hidden",c="visibilitychange";e.webkitHidden!==void 0&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||x();for(var g=["","-webkit-","-moz-","-ms-"],d=document.createElement("div"),v=g.length-1;v>=0;v--){try{d.style.position=g[v]+"sticky"}catch{}d.style.position!=""&&x()}k();function x(){pe=Ke=Oe=se=Te=De=s}function T(Se,Be){for(key in Be)Be.hasOwnProperty(key)&&(Se[key]=Be[key])}function O(Se){return parseFloat(Se)||0}function k(){r={top:t.pageYOffset,left:t.pageXOffset}}function R(){if(t.pageXOffset!=r.left){k(),Oe();return}t.pageYOffset!=r.top&&(k(),H())}function N(Se){setTimeout(function(){t.pageYOffset!=r.top&&(r.top=t.pageYOffset,H())},0)}function H(){for(var Se=n.length-1;Se>=0;Se--)V(n[Se])}function V(Se){if(Se.inited){var Be=r.top<=Se.limit.start?0:r.top>=Se.limit.end?2:1;Se.mode!=Be&&re(Se,Be)}}function te(){for(var Se=n.length-1;Se>=0;Se--)if(n[Se].inited){var Be=Math.abs(le(n[Se].clone)-n[Se].docOffsetTop),L=Math.abs(n[Se].parent.node.offsetHeight-n[Se].parent.height);if(Be>=2||L>=2)return!1}return!0}function U(Se){isNaN(parseFloat(Se.computed.top))||Se.isCell||(Se.inited=!0,Se.clone||fe(Se),Se.parent.computed.position!="absolute"&&Se.parent.computed.position!="relative"&&(Se.parent.node.style.position="relative"),V(Se),Se.parent.height=Se.parent.node.offsetHeight,Se.docOffsetTop=le(Se.clone))}function ie(Se){var Be=!0;Se.clone&&he(Se),T(Se.node.style,Se.css);for(var L=n.length-1;L>=0;L--)if(n[L].node!==Se.node&&n[L].parent.node===Se.parent.node){Be=!1;break}Be&&(Se.parent.node.style.position=Se.parent.css.position),Se.mode=-1}function z(){for(var Se=n.length-1;Se>=0;Se--)U(n[Se])}function $(){for(var Se=n.length-1;Se>=0;Se--)ie(n[Se])}function re(Se,Be){var L=Se.node.style;switch(Be){case 0:L.position="absolute",L.left=Se.offset.left+"px",L.right=Se.offset.right+"px",L.top=Se.offset.top+"px",L.bottom="auto",L.width="auto",L.marginLeft=0,L.marginRight=0,L.marginTop=0;break;case 1:L.position="fixed",L.left=Se.box.left+"px",L.right=Se.box.right+"px",L.top=Se.css.top,L.bottom="auto",L.width="auto",L.marginLeft=0,L.marginRight=0,L.marginTop=0;break;case 2:L.position="absolute",L.left=Se.offset.left+"px",L.right=Se.offset.right+"px",L.top="auto",L.bottom=0,L.width="auto",L.marginLeft=0,L.marginRight=0;break}Se.mode=Be}function fe(Se){Se.clone=document.createElement("div");var Be=Se.node.nextSibling||Se.node,L=Se.clone.style;L.height=Se.height+"px",L.width=Se.width+"px",L.marginTop=Se.computed.marginTop,L.marginBottom=Se.computed.marginBottom,L.marginLeft=Se.computed.marginLeft,L.marginRight=Se.computed.marginRight,L.padding=L.border=L.borderSpacing=0,L.fontSize="1em",L.position="static",L.cssFloat=Se.computed.cssFloat,Se.node.parentNode.insertBefore(Se.clone,Be)}function he(Se){Se.clone.parentNode.removeChild(Se.clone),Se.clone=void 0}function Y(Se){var Be=getComputedStyle(Se),L=Se.parentNode,K=getComputedStyle(L),Le=Se.style.position;Se.style.position="relative";var nt={top:Be.top,marginTop:Be.marginTop,marginBottom:Be.marginBottom,marginLeft:Be.marginLeft,marginRight:Be.marginRight,cssFloat:Be.cssFloat},Pe={top:O(Be.top),marginBottom:O(Be.marginBottom),paddingLeft:O(Be.paddingLeft),paddingRight:O(Be.paddingRight),borderLeftWidth:O(Be.borderLeftWidth),borderRightWidth:O(Be.borderRightWidth)};Se.style.position=Le;var ne={position:Se.style.position,top:Se.style.top,bottom:Se.style.bottom,left:Se.style.left,right:Se.style.right,width:Se.style.width,marginTop:Se.style.marginTop,marginLeft:Se.style.marginLeft,marginRight:Se.style.marginRight},Q=de(Se),Me=de(L),xe={node:L,css:{position:L.style.position},computed:{position:K.position},numeric:{borderLeftWidth:O(K.borderLeftWidth),borderRightWidth:O(K.borderRightWidth),borderTopWidth:O(K.borderTopWidth),borderBottomWidth:O(K.borderBottomWidth)}},it={node:Se,box:{left:Q.win.left,right:o.clientWidth-Q.win.right},offset:{top:Q.win.top-Me.win.top-xe.numeric.borderTopWidth,left:Q.win.left-Me.win.left-xe.numeric.borderLeftWidth,right:-Q.win.right+Me.win.right-xe.numeric.borderRightWidth},css:ne,isCell:Be.display=="table-cell",computed:nt,numeric:Pe,width:Q.win.right-Q.win.left,height:Q.win.bottom-Q.win.top,mode:-1,inited:!1,parent:xe,limit:{start:Q.doc.top-Pe.top,end:Me.doc.top+L.offsetHeight-xe.numeric.borderBottomWidth-Se.offsetHeight-Pe.top-Pe.marginBottom}};return it}function le(Se){for(var Be=0;Se;)Be+=Se.offsetTop,Se=Se.offsetParent;return Be}function de(Se){var Be=Se.getBoundingClientRect();return{doc:{top:Be.top+t.pageYOffset,left:Be.left+t.pageXOffset},win:Be}}function we(){a=setInterval(function(){!te()&&Oe()},500)}function ue(){clearInterval(a)}function Ee(){i&&(document[l]?ue():we())}function pe(){i||(k(),z(),t.addEventListener("scroll",R),t.addEventListener("wheel",N),t.addEventListener("resize",Oe),t.addEventListener("orientationchange",Oe),e.addEventListener(c,Ee),we(),i=!0)}function Oe(){if(i){$();for(var Se=n.length-1;Se>=0;Se--)n[Se]=Y(n[Se].node);z()}}function se(){t.removeEventListener("scroll",R),t.removeEventListener("wheel",N),t.removeEventListener("resize",Oe),t.removeEventListener("orientationchange",Oe),e.removeEventListener(c,Ee),ue(),i=!1}function Te(){se(),$()}function De(){for(Te();n.length;)n.pop()}function Ke(Se){for(var Be=n.length-1;Be>=0;Be--)if(n[Be].node===Se)return;var L=Y(Se);n.push(L),i?U(L):pe()}function Ge(Se){for(var Be=n.length-1;Be>=0;Be--)n[Be].node===Se&&(ie(n[Be]),n.splice(Be,1))}return{stickies:n,add:Ke,remove:Ge,init:pe,rebuild:Oe,pause:se,stop:Te,kill:De}})});var nr=W(ca=>{"use strict";var hR=Symbol.for("yaml.alias"),M5=Symbol.for("yaml.document"),P1=Symbol.for("yaml.map"),L5=Symbol.for("yaml.pair"),pR=Symbol.for("yaml.scalar"),A1=Symbol.for("yaml.seq"),lp=Symbol.for("yaml.node.type"),Kre=e=>!!e&&typeof e=="object"&&e[lp]===hR,Zre=e=>!!e&&typeof e=="object"&&e[lp]===M5,Jre=e=>!!e&&typeof e=="object"&&e[lp]===P1,$re=e=>!!e&&typeof e=="object"&&e[lp]===L5,N5=e=>!!e&&typeof e=="object"&&e[lp]===pR,eie=e=>!!e&&typeof e=="object"&&e[lp]===A1;function D5(e){if(e&&typeof e=="object")switch(e[lp]){case P1:case A1:return!0}return!1}function tie(e){if(e&&typeof e=="object")switch(e[lp]){case hR:case P1:case pR:case A1:return!0}return!1}var nie=e=>(N5(e)||D5(e))&&!!e.anchor;ca.ALIAS=hR;ca.DOC=M5;ca.MAP=P1;ca.NODE_TYPE=lp;ca.PAIR=L5;ca.SCALAR=pR;ca.SEQ=A1;ca.hasAnchor=nie;ca.isAlias=Kre;ca.isCollection=D5;ca.isDocument=Zre;ca.isMap=Jre;ca.isNode=tie;ca.isPair=$re;ca.isScalar=N5;ca.isSeq=eie});var FS=W(gR=>{"use strict";var ks=nr(),hc=Symbol("break visit"),F5=Symbol("skip children"),Qd=Symbol("remove node");function R1(e,t){let n=B5(t);ks.isDocument(e)?Qv(null,e.contents,n,Object.freeze([e]))===Qd&&(e.contents=null):Qv(null,e,n,Object.freeze([]))}R1.BREAK=hc;R1.SKIP=F5;R1.REMOVE=Qd;function Qv(e,t,n,r){let i=z5(e,t,n,r);if(ks.isNode(i)||ks.isPair(i))return U5(e,r,i),Qv(e,i,n,r);if(typeof i!="symbol"){if(ks.isCollection(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){let s=Qv(o,t.items[o],n,r);if(typeof s=="number")o=s-1;else{if(s===hc)return hc;s===Qd&&(t.items.splice(o,1),o-=1)}}}else if(ks.isPair(t)){r=Object.freeze(r.concat(t));let o=Qv("key",t.key,n,r);if(o===hc)return hc;o===Qd&&(t.key=null);let s=Qv("value",t.value,n,r);if(s===hc)return hc;s===Qd&&(t.value=null)}}return i}async function I1(e,t){let n=B5(t);ks.isDocument(e)?await Kv(null,e.contents,n,Object.freeze([e]))===Qd&&(e.contents=null):await Kv(null,e,n,Object.freeze([]))}I1.BREAK=hc;I1.SKIP=F5;I1.REMOVE=Qd;async function Kv(e,t,n,r){let i=await z5(e,t,n,r);if(ks.isNode(i)||ks.isPair(i))return U5(e,r,i),Kv(e,i,n,r);if(typeof i!="symbol"){if(ks.isCollection(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){let s=await Kv(o,t.items[o],n,r);if(typeof s=="number")o=s-1;else{if(s===hc)return hc;s===Qd&&(t.items.splice(o,1),o-=1)}}}else if(ks.isPair(t)){r=Object.freeze(r.concat(t));let o=await Kv("key",t.key,n,r);if(o===hc)return hc;o===Qd&&(t.key=null);let s=await Kv("value",t.value,n,r);if(s===hc)return hc;s===Qd&&(t.value=null)}}return i}function B5(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function z5(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(ks.isMap(t))return n.Map?.(e,t,r);if(ks.isSeq(t))return n.Seq?.(e,t,r);if(ks.isPair(t))return n.Pair?.(e,t,r);if(ks.isScalar(t))return n.Scalar?.(e,t,r);if(ks.isAlias(t))return n.Alias?.(e,t,r)}function U5(e,t,n){let r=t[t.length-1];if(ks.isCollection(r))r.items[e]=n;else if(ks.isPair(r))e==="key"?r.key=n:r.value=n;else if(ks.isDocument(r))r.contents=n;else{let i=ks.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}gR.visit=R1;gR.visitAsync=I1});var mR=W(j5=>{"use strict";var H5=nr(),rie=FS(),iie={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},oie=e=>e.replace(/[!,[\]{}]/g,t=>iie[t]),BS=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,s]=r;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,s),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let s=t.slice(2,-1);return s==="!"||s==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),s)}let[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(i)}catch(s){return n(String(s)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+oie(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(t&&r.length>0&&H5.isNode(t.contents)){let o={};rie.visit(t.contents,(s,a)=>{H5.isNode(a)&&a.tag&&(o[a.tag]=!0)}),i=Object.keys(o)}else i=[];for(let[o,s]of r)o==="!!"&&s==="tag:yaml.org,2002:"||(!t||i.some(a=>a.startsWith(s)))&&n.push(`%TAG ${o} ${s}`);return n.join(`
9
9
  `)}};BS.defaultYaml={explicit:!1,version:"1.2"};BS.defaultTags={"!!":"tag:yaml.org,2002:"};j5.Directives=BS});var M1=W(zS=>{"use strict";var W5=nr(),sie=FS();function aie(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function V5(e){let t=new Set;return sie.visit(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function G5(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function lie(e,t){let n=[],r=new Map,i=null;return{onAnchor:o=>{n.push(o),i??(i=V5(e));let s=G5(t,i);return i.add(s),s},setAnchors:()=>{for(let o of n){let s=r.get(o);if(typeof s=="object"&&s.anchor&&(W5.isScalar(s.node)||W5.isCollection(s.node)))s.node.anchor=s.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=o,a}}},sourceObjects:r}}zS.anchorIsValid=aie;zS.anchorNames=V5;zS.createNodeAnchors=lie;zS.findNewAnchor=G5});var yR=W(Y5=>{"use strict";function US(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,o=r.length;i<o;++i){let s=r[i],a=US(e,r,String(i),s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let o=r.get(i),s=US(e,r,i,o);s===void 0?r.delete(i):s!==o&&r.set(i,s)}else if(r instanceof Set)for(let i of Array.from(r)){let o=US(e,r,i,i);o===void 0?r.delete(i):o!==i&&(r.delete(i),r.add(o))}else for(let[i,o]of Object.entries(r)){let s=US(e,r,i,o);s===void 0?delete r[i]:s!==o&&(r[i]=s)}return e.call(t,n,r)}Y5.applyReviver=US});var Vg=W(X5=>{"use strict";var cie=nr();function q5(e,t,n){if(Array.isArray(e))return e.map((r,i)=>q5(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!cie.hasAnchor(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=o=>{r.res=o,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!n?.keep?Number(e):e}X5.toJS=q5});var L1=W(K5=>{"use strict";var uie=yR(),Q5=nr(),fie=Vg(),bR=class{constructor(t){Object.defineProperty(this,Q5.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){if(!Q5.isDocument(t))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=fie.toJS(this,"",s);if(typeof i=="function")for(let{count:l,res:c}of s.anchors.values())i(c,l);return typeof o=="function"?uie.applyReviver(o,{"":a},"",a):a}};K5.NodeBase=bR});var HS=W(Z5=>{"use strict";var die=M1(),hie=FS(),Zv=nr(),pie=L1(),gie=Vg(),vR=class extends pie.NodeBase{constructor(t){super(Zv.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],hie.visit(t,{Node:(o,s)=>{(Zv.isAlias(s)||Zv.hasAnchor(s))&&r.push(s)}}),n&&(n.aliasResolveCache=r));let i;for(let o of r){if(o===this)break;o.anchor===this.source&&(i=o)}if(i&&n){let{anchors:o,doc:s,maxAliasCount:a}=n,l=o.get(i);if(l||(gie.toJS(i,null,n),l=o.get(i)),l?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=N1(s,i,o)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return i}toJSON(t,n){if(!n)return{source:this.source};let r=this.resolve(n.doc,n);if(!r){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return n.anchors.get(r).res}toString(t,n,r){let i=`*${this.source}`;if(t){if(die.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${i} `}return i}};function N1(e,t,n){if(Zv.isAlias(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Zv.isCollection(t)){let r=0;for(let i of t.items){let o=N1(e,i,n);o>r&&(r=o)}return r}else if(Zv.isPair(t)){let r=N1(e,t.key,n),i=N1(e,t.value,n);return Math.max(r,i)}return 1}Z5.Alias=vR});var cs=W(wR=>{"use strict";var mie=nr(),yie=L1(),bie=Vg(),vie=e=>!e||typeof e!="function"&&typeof e!="object",Gg=class extends yie.NodeBase{constructor(t){super(mie.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:bie.toJS(this.value,t,n)}toString(){return String(this.value)}};Gg.BLOCK_FOLDED="BLOCK_FOLDED";Gg.BLOCK_LITERAL="BLOCK_LITERAL";Gg.PLAIN="PLAIN";Gg.QUOTE_DOUBLE="QUOTE_DOUBLE";Gg.QUOTE_SINGLE="QUOTE_SINGLE";wR.Scalar=Gg;wR.isScalarValue=vie});var jS=W($5=>{"use strict";var wie=HS(),Fy=nr(),J5=cs(),Sie="tag:yaml.org,2002:";function xie(e,t,n){if(t){let r=n.filter(o=>o.tag===t),i=r.find(o=>!o.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>r.identify?.(e)&&!r.format)}function Eie(e,t,n){if(Fy.isDocument(e)&&(e=e.contents),Fy.isNode(e))return e;if(Fy.isPair(e)){let d=n.schema[Fy.MAP].createNode?.(n.schema,null,n);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=n,l;if(r&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new wie.Alias(l.anchor);l={anchor:null,node:null},a.set(e,l)}t?.startsWith("!!")&&(t=Sie+t.slice(2));let c=xie(e,t,s.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new J5.Scalar(e);return l&&(l.node=d),d}c=e instanceof Map?s[Fy.MAP]:Symbol.iterator in Object(e)?s[Fy.SEQ]:s[Fy.MAP]}o&&(o(c),delete n.onTagObj);let g=c?.createNode?c.createNode(n.schema,e,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,e,n):new J5.Scalar(e);return t?g.tag=t:c.default||(g.tag=c.tag),l&&(l.node=g),g}$5.createNode=Eie});var F1=W(D1=>{"use strict";var _ie=jS(),Kd=nr(),Oie=L1();function SR(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){let o=t[i];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=r,r=s}else r=new Map([[o,r]])}return _ie.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var eU=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,xR=class extends Oie.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Kd.isNode(r)||Kd.isPair(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(eU(t))this.add(n);else{let[r,...i]=t,o=this.get(r,!0);if(Kd.isCollection(o))o.addIn(i,n);else if(o===void 0&&this.schema)this.set(r,SR(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){let[n,...r]=t;if(r.length===0)return this.delete(n);let i=this.get(n,!0);if(Kd.isCollection(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){let[r,...i]=t,o=this.get(r,!0);return i.length===0?!n&&Kd.isScalar(o)?o.value:o:Kd.isCollection(o)?o.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Kd.isPair(n))return!1;let r=n.value;return r==null||t&&Kd.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){let[n,...r]=t;if(r.length===0)return this.has(n);let i=this.get(n,!0);return Kd.isCollection(i)?i.hasIn(r):!1}setIn(t,n){let[r,...i]=t;if(i.length===0)this.set(r,n);else{let o=this.get(r,!0);if(Kd.isCollection(o))o.setIn(i,n);else if(o===void 0&&this.schema)this.set(r,SR(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};D1.Collection=xR;D1.collectionFromPath=SR;D1.isEmptyPath=eU});var WS=W(B1=>{"use strict";var Tie=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ER(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var kie=(e,t,n)=>e.endsWith(`
10
10
  `)?ER(n,t):n.includes(`
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as L}from"./XJE2OFDN.js";import{b as j,c as N,d as Q,e as G,f as Z,g as Y,h as X,i as ee,j as ne}from"./ERFYZ47T.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as W,c as M,d as x,e as _,g as A,h as D,i as z,j as K,k as J,l as O,n as V}from"./UW4UC7ZI.js";var B=M.go,P=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return x(t,{style:"camel",reserved:B})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
7
+ import{a as L}from"./XJE2OFDN.js";import{b as j,c as N,d as Q,e as G,f as Z,g as Y,h as X,i as ee,j as ne}from"./UWK3L6LB.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as W,c as M,d as x,e as _,g as A,h as D,i as z,j as K,k as J,l as O,n as V}from"./UW4UC7ZI.js";var B=M.go,P=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return x(t,{style:"camel",reserved:B})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
8
8
  `?n+="\\n":r==="\r"?n+="\\r":r===" "?n+="\\t":o<32||o===127?n+=`\\x${o.toString(16).padStart(2,"0")}`:o>=55296&&o<=57343?n+="\\uFFFD":n+=r}return n+'"'}literal(t){return t==null?"nil":typeof t=="boolean"||typeof t=="number"?String(t):typeof t=="string"?this.string(t):Array.isArray(t)?`[]any{${t.map(r=>this.literal(r)).join(", ")}}`:`map[string]any{${Object.entries(t).map(([r,o])=>`${this.string(r)}: ${this.literal(o)}`).join(", ")}}`}comment(t){for(let n of O(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=O(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let s of r.slice(1)){if(s===""){o||this.line("//"),o=!0;continue}this.line(`// ${s}`),o=!1}return this}layout(t){return ue(fe(t))}toString(){return this.layout(super.toString())}};function d(e){let t=x(e,{style:"pascal",reserved:B});return t.startsWith("_")?`N${t.slice(1)}`:t}function ue(e){return`${e.replace(/\n{3,}/g,`
9
9
 
10
10
  `).trimEnd()}