@redocly/cli 2.61.0 → 2.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/THIRD_PARTY_NOTICES +22 -1
  2. package/lib/chunks/{3QZ3M2JX.js → 2EP764NP.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 → 4WO6ZSKT.js} +1 -1
  9. package/lib/chunks/{6ETCN64B.js → 53INGMTO.js} +1 -1
  10. package/lib/chunks/5NOJ76EP.js +9 -0
  11. package/lib/chunks/{FAIK7Y6U.js → 66GKT2TZ.js} +1 -1
  12. package/lib/chunks/{WSOBFTCE.js → 6EGJEFXO.js} +1 -1
  13. package/lib/chunks/{F6IXS3RL.js → 6NB3FKVN.js} +8 -8
  14. package/lib/chunks/{GLOLLUKD.js → 75SLMDAN.js} +1 -1
  15. package/lib/chunks/{SFNDGMJM.js → AB2EMYEK.js} +1 -1
  16. package/lib/chunks/{DNQSGL2N.js → AZO6SCNH.js} +1 -1
  17. package/lib/chunks/{OXA7GLZA.js → B2J7WNDG.js} +1 -1
  18. package/lib/chunks/{ERFYZ47T.js → C67OKMFJ.js} +1 -1
  19. package/lib/chunks/{MUKYSFRK.js → DC2HDHGE.js} +1 -1
  20. package/lib/chunks/{6GH5BRNP.js → DFWXX7E2.js} +1 -1
  21. package/lib/chunks/{7RZON3J3.js → G5N3UXMR.js} +1 -1
  22. package/lib/chunks/{HHJX3B7U.js → GVQMC2WB.js} +1 -1
  23. package/lib/chunks/{GGRILIN6.js → HBENVUR4.js} +1 -1
  24. package/lib/chunks/{WCWEP2X5.js → HN2ZK7LZ.js} +1 -1
  25. package/lib/chunks/{DDAZZC3I.js → I6AAWNTY.js} +1 -1
  26. package/lib/chunks/{6ZVVKLZR.js → KPPPJNVL.js} +1 -1
  27. package/lib/chunks/LNYTDBAU.js +12 -0
  28. package/lib/chunks/{MK6X55UC.js → LVGVWPDB.js} +1 -1
  29. package/lib/chunks/{QFJ6QZPG.js → N3GO4LRW.js} +1 -1
  30. package/lib/chunks/{YEOWW3LR.js → NBI4EQPC.js} +1 -1
  31. package/lib/chunks/{2KG4GEMM.js → NENSYJQB.js} +1 -1
  32. package/lib/chunks/{45DZYRBQ.js → NFRA6IE2.js} +1 -1
  33. package/lib/chunks/{6L6AYZQS.js → OMIM3KH6.js} +1 -1
  34. package/lib/chunks/{PSEWUH36.js → OT7Y7FIM.js} +1 -1
  35. package/lib/chunks/{SZVRKEMY.js → PXCT44HL.js} +3 -3
  36. package/lib/chunks/{IKDYY4XW.js → QAUXTHD6.js} +1 -1
  37. package/lib/chunks/{GZ7EDJXV.js → R2TPTKNR.js} +1 -1
  38. package/lib/chunks/{E5BMYA7V.js → REIGI2Y7.js} +1 -1
  39. package/lib/chunks/{LR2FZ43E.js → RGU6OZYB.js} +1 -1
  40. package/lib/chunks/{2WJSVZYJ.js → RUIEI3YV.js} +1 -1
  41. package/lib/chunks/{MAHMSXK6.js → S3STDXJN.js} +1 -1
  42. package/lib/chunks/{LXU55G2P.js → S6NFOZ34.js} +1 -1
  43. package/lib/chunks/{V5CIDI6D.js → SS6PCAMM.js} +1 -1
  44. package/lib/chunks/{JP2RKFML.js → SXBAAS4M.js} +1 -1
  45. package/lib/chunks/{ZH5HJBCG.js → T4Y6M5MJ.js} +1 -1
  46. package/lib/chunks/{GJDVFWVH.js → TF4PPK4N.js} +1 -1
  47. package/lib/chunks/{MXOINKB2.js → TWWNWQRB.js} +1 -1
  48. package/lib/chunks/VGM6NIVC.js +8 -0
  49. package/lib/chunks/{KVXNE2UB.js → VX2VONNO.js} +1 -1
  50. package/lib/chunks/{RPQMBRTA.js → VXLODB3S.js} +1 -1
  51. package/lib/chunks/{IMYWYFYT.js → WQ3XMPU7.js} +1 -1
  52. package/lib/chunks/{HBPMIV7U.js → XJTGJYVS.js} +1 -1
  53. package/lib/chunks/YDVWNFMS.js +24 -0
  54. package/lib/chunks/{FUH5ZFZ2.js → YPYZCXVX.js} +1 -1
  55. package/lib/chunks/{6NGWHZCB.js → ZYQDPQVA.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
@@ -0,0 +1,12 @@
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{i as c,l as a}from"./5NOJ76EP.js";import"./LRUXN6H5.js";import{ia as s}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function g({operation:i,input:r,version:n}){let t=await l(r),e=`${t.protocol}://${t.host}`;if(i!=="get"||!c(e))return"";let o=process.env.REDOCLY_AUTHORIZATION||await new a(n).getAccessToken(e);return o?`username=redocly
8
+ password=${o}
9
+ `:(s.error(`You are not logged in to ${e}. Run \`redocly login --residency ${e}\` or set the REDOCLY_AUTHORIZATION environment variable.
10
+ `),`quit=1
11
+ `)}async function l(i){let r="";for await(let t of i)r+=t.toString();let n={};for(let t of r.split(`
12
+ `)){let[,e,o]=t.match(/^([^=]+)=(.*)$/)??[];e&&(n[e]=o)}return n}export{g as handleProjectGitCredentials};
@@ -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{b as k,f as v}from"./F6IXS3RL.js";import{L as A,M as S,N as y,V as f,W as w,da as d,ha as l,ia as n,ka as x,la as h,ma as O,oa as g,q as u,ra as b,w as p}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as F}from"perf_hooks";function I(o){let t=Object.fromEntries(Object.entries(o).map(([s,{metric:e,total:r,counts:a}])=>[s,{metric:e,total:r,counts:a}]));n.output(JSON.stringify(t,null,2))}function P(o){let t=`| Feature | Count |
7
+ import{b as k,f as v}from"./6NB3FKVN.js";import{L as A,M as S,N as y,V as f,W as w,da as d,ha as l,ia as n,ka as x,la as h,ma as O,oa as g,q as u,ra as b,w as p}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as F}from"perf_hooks";function I(o){let t=Object.fromEntries(Object.entries(o).map(([s,{metric:e,total:r,counts:a}])=>[s,{metric:e,total:r,counts:a}]));n.output(JSON.stringify(t,null,2))}function P(o){let t=`| Feature | Count |
8
8
  | --- | --- |
9
9
  `,s=[];for(let{metric:e,total:r,counts:a}of Object.values(o)){t+=`| ${e} | ${r} |
10
10
  `;let c=Object.entries(a??{});c.length&&s.push(`
@@ -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 h}from"./V5CIDI6D.js";import{e as g,h as p,k as $}from"./LD5MEXEL.js";import{join as R}from"node:path";var a=" ";function m(e){return`${$(e)}Schema`}var y=new Map;function u(e,r=y,t=""){return j(w(e,r,t),e)}function w(e,r,t){switch(e.kind){case"scalar":return z(e.scalar,e.metadata);case"object":return b(e.properties,r,t);case"array":return`z.array(${u(e.items,r,t)})`;case"record":return`z.record(z.string(), ${u(e.value,r,t)})`;case"ref":return`z.lazy(() => ${m(e.name)})`;case"literal":return`z.literal(${p(e.value)})`;case"enum":return q(e.values);case"union":return k(e.members,r,t);case"intersection":return e.members.map(n=>u(n,r,t)).reduce((n,o)=>`${n}.and(${o})`);case"null":return"z.null()";case"unknown":return"z.unknown()";case"omit":return E(e.base,e.keys,r,t)}}function z(e,r){switch(e){case"string":return r?.format==="binary"?"z.instanceof(Blob)":"z.string()";case"integer":return"z.number().int()";case"number":return"z.number()";case"boolean":return"z.boolean()"}}function c(e){return g(e)===e?e:JSON.stringify(e)}function b(e,r,t){if(e.length===0)return"z.object({})";let n=t+a;return`z.object({
7
+ import{a as h}from"./SS6PCAMM.js";import{e as g,h as p,k as $}from"./LD5MEXEL.js";import{join as R}from"node:path";var a=" ";function m(e){return`${$(e)}Schema`}var y=new Map;function u(e,r=y,t=""){return j(w(e,r,t),e)}function w(e,r,t){switch(e.kind){case"scalar":return z(e.scalar,e.metadata);case"object":return b(e.properties,r,t);case"array":return`z.array(${u(e.items,r,t)})`;case"record":return`z.record(z.string(), ${u(e.value,r,t)})`;case"ref":return`z.lazy(() => ${m(e.name)})`;case"literal":return`z.literal(${p(e.value)})`;case"enum":return q(e.values);case"union":return k(e.members,r,t);case"intersection":return e.members.map(n=>u(n,r,t)).reduce((n,o)=>`${n}.and(${o})`);case"null":return"z.null()";case"unknown":return"z.unknown()";case"omit":return E(e.base,e.keys,r,t)}}function z(e,r){switch(e){case"string":return r?.format==="binary"?"z.instanceof(Blob)":"z.string()";case"integer":return"z.number().int()";case"number":return"z.number()";case"boolean":return"z.boolean()"}}function c(e){return g(e)===e?e:JSON.stringify(e)}function b(e,r,t){if(e.length===0)return"z.object({})";let n=t+a;return`z.object({
8
8
  ${e.map((s,i)=>{let d=u(s.schema,r,n),l=s.required?d:`${d}.optional()`,x=i===e.length-1?"":",";return`${n}${c(s.name)}: ${l}${x}`}).join(`
9
9
  `)}
10
10
  ${t}})`}function q(e){return e.every(r=>typeof r=="string")?`z.enum([${e.map(r=>JSON.stringify(r)).join(", ")}])`:`z.union([${e.map(r=>`z.literal(${p(r)})`).join(", ")}])`}function k(e,r,t){let n=e.map(o=>u(o,r,t));return n.length===1?n[0]:`z.union([${n.join(", ")}])`}function E(e,r,t,n){let o=t.get(e);if(o&&o.kind!=="object")return u(f(o,r,t,new Set([e])),t,n);let s=r.map(i=>`${c(i)}: true`).join(", ");return`${m(e)}.omit({ ${s} })`}function f(e,r,t,n){switch(e.kind){case"object":return{...e,properties:e.properties.filter(o=>!r.includes(o.name))};case"union":case"intersection":return{...e,members:e.members.map(o=>f(o,r,t,n))};case"ref":{if(n.has(e.name))return e;let o=t.get(e.name);if(!o)return e;if(o.kind==="object"){let s=r.filter(i=>o.properties.some(d=>d.name===i));return s.length>0?{kind:"omit",base:e.name,keys:s}:e}return f(o,r,t,new Set([...n,e.name]))}default:return e}}function j(e,r){let t=r.metadata;if(!t)return e;let n=e;return r.kind==="scalar"&&r.scalar==="string"&&(t.minLength!==void 0&&(n=`${n}.min(${t.minLength})`),t.maxLength!==void 0&&(n=`${n}.max(${t.maxLength})`),t.pattern!==void 0&&(n=`${n}.regex(new RegExp(${JSON.stringify(t.pattern)}))`)),r.kind==="scalar"&&(r.scalar==="number"||r.scalar==="integer")&&(t.minimum!==void 0&&(n=`${n}.min(${t.minimum})`),t.maximum!==void 0&&(n=`${n}.max(${t.maximum})`),t.exclusiveMinimum!==void 0&&(n=`${n}.gt(${t.exclusiveMinimum})`),t.exclusiveMaximum!==void 0&&(n=`${n}.lt(${t.exclusiveMaximum})`)),r.kind==="array"&&(t.minItems!==void 0&&(n=`${n}.min(${t.minItems})`),t.maxItems!==void 0&&(n=`${n}.max(${t.maxItems})`)),n}function Z(e,r){let t=[];for(let n of h(e.services)){if(n.sse!==void 0)continue;let o=n.requestBody,s=o&&o.contentType.toLowerCase().includes("json")?u(o.schema,r,a):void 0,i=n.successResponses.find(l=>l.contentType.toLowerCase().includes("json")),d=i?u(i.schema,r,a):void 0;!s&&!d||t.push({name:n.specName??n.name,request:s,response:d})}return t}function I(e){let r=e.flatMap(n=>[`${a}${c(n.name)}: {`,...n.request?[`${a}${a}request: z.ZodType;`]:[],...n.response?[`${a}${a}response: z.ZodType;`]:[],`${a}};`]),t=e.map((n,o)=>{let s=[...n.request?[`request: ${n.request}`]:[],...n.response?[`response: ${n.response}`]:[]].join(", "),i=o===e.length-1?"":",";return`${a}${c(n.name)}: { ${s} }${i}`});return["/**"," * Request/response validators by operationId \u2014 powers `zodValidation`, or import one directly."," */","export const operationSchemas: {",...r,"} = {",...t,"};"].join(`
@@ -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{l as t}from"./3TBVUHVH.js";import"./LRUXN6H5.js";import{ia as o}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function i({version:n}){new t(n).logout(),o.output(`Logged out from the Redocly account. \u270B
7
+ import{l as t}from"./5NOJ76EP.js";import"./LRUXN6H5.js";import{ia as o}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function i({version:n}){new t(n).logout(),o.output(`Logged out from the Redocly account. \u270B
8
8
  `)}export{i as handleLogout};
@@ -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"./FAIK7Y6U.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 tanstackQueryGenerator};
7
+ import{a}from"./66GKT2TZ.js";import"./S3STDXJN.js";import"./OMIM3KH6.js";import"./C67OKMFJ.js";import"./SS6PCAMM.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};
@@ -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 as l}from"./DNQSGL2N.js";import{a as R,b as u,c as f,d}from"./6GH5BRNP.js";import{d as y,e as G,f as x}from"./WCWEP2X5.js";import{c as g,d as S,e as h}from"./6ETCN64B.js";import{c as k,d as v,e as b}from"./DDAZZC3I.js";import{a as D,b as E,c as q,d as z}from"./IMYWYFYT.js";import{a as o}from"./FAIK7Y6U.js";import{a,b as p,c as s}from"./MUKYSFRK.js";import"./XJE2OFDN.js";import{a as m}from"./QFJ6QZPG.js";import{a as i}from"./JM7BMZLD.js";import{a as c}from"./OXA7GLZA.js";import"./MAHMSXK6.js";import{a as I,d as M,e as N}from"./6L6AYZQS.js";import{a as H,b as er,c as tr,d as or,e as nr,f as ar,g as pr,h as sr,i as mr,j as ir,k as cr}from"./ERFYZ47T.js";import"./V5CIDI6D.js";import{a as U}from"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import{e as T,h as j,k as w}from"./LD5MEXEL.js";import{a as _,b as B,c as F,d as J,e as Q,f as K,g as P,h as V,i as W,j as X,k as Y,l as Z,m as $,n as rr}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";var A={typescript:{run:a,sample:s,docs:p},zod:{run:m},transformers:{run:i},"tanstack-query":{run:o("react")},"tanstack-query-vue":{run:o("vue")},"tanstack-query-svelte":{run:o("svelte")},"tanstack-query-solid":{run:o("solid")},swr:{run:c},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:y,sample:G,docs:x},go:{run:g,sample:S,docs:h},php:{run:k,sample:v,docs:b}},L=Object.fromEntries(Object.entries(D).map(([e,{load:r,...t}])=>[e,{...t,...A[e]}]));function n(){return new Map(Object.entries(L))}function C(e,r,t=n(),O){E(e,r,t,O)}function Er(e,r){let t=r.registry??n();return C(r.generators,r.emit,t,r.outputMode),q(e,{...r,registry:t})}export{cr as AUTHORING_HELPER_NAMES,U as NotSupportedError,_ as Printer,F as RESERVED_WORDS,B as casing,j as codeLiteral,Er as collectGeneratedFiles,K as deref,V as discriminatorCases,Z as docText,Y as enumValues,P as flattenAllOf,z as generateClient,rr as headerCoerceType,J as identifierFor,ar as isBinaryContentType,or as isMultipartBody,W as isNullable,nr as isUntypedMultipartBody,er as jsonSuccessSchema,I as operationSignature,mr as paginationItemSchema,H as paginationRuleFor,w as pascalCase,R as renderComposedCliEntry,ir as renderReferencePage,T as safeIdent,$ as schemaAtPointer,sr as securityRequirements,pr as serverUrlParts,tr as sseResponse,M as tsJsdoc,N as tsType,Q as uniqueIdentifiers,X as unwrapNullable};
7
+ import{a as l}from"./AZO6SCNH.js";import{a as R,b as u,c as f,d}from"./DFWXX7E2.js";import{d as y,e as G,f as x}from"./HN2ZK7LZ.js";import{c as g,d as S,e as h}from"./53INGMTO.js";import{c as k,d as v,e as b}from"./I6AAWNTY.js";import{a as D,b as E,c as q,d as z}from"./WQ3XMPU7.js";import{a as o}from"./66GKT2TZ.js";import{a,b as p,c as s}from"./DC2HDHGE.js";import"./XJE2OFDN.js";import{a as m}from"./N3GO4LRW.js";import{a as i}from"./JM7BMZLD.js";import{a as c}from"./B2J7WNDG.js";import"./S3STDXJN.js";import{a as I,d as M,e as N}from"./OMIM3KH6.js";import{a as H,b as er,c as tr,d as or,e as nr,f as ar,g as pr,h as sr,i as mr,j as ir,k as cr}from"./C67OKMFJ.js";import"./SS6PCAMM.js";import{a as U}from"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import{e as T,h as j,k as w}from"./LD5MEXEL.js";import{a as _,b as B,c as F,d as J,e as Q,f as K,g as P,h as V,i as W,j as X,k as Y,l as Z,m as $,n as rr}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";var A={typescript:{run:a,sample:s,docs:p},zod:{run:m},transformers:{run:i},"tanstack-query":{run:o("react")},"tanstack-query-vue":{run:o("vue")},"tanstack-query-svelte":{run:o("svelte")},"tanstack-query-solid":{run:o("solid")},swr:{run:c},mock:{run:l},cli:{run:u,sample:d,docs:f},python:{run:y,sample:G,docs:x},go:{run:g,sample:S,docs:h},php:{run:k,sample:v,docs:b}},L=Object.fromEntries(Object.entries(D).map(([e,{load:r,...t}])=>[e,{...t,...A[e]}]));function n(){return new Map(Object.entries(L))}function C(e,r,t=n(),O){E(e,r,t,O)}function Er(e,r){let t=r.registry??n();return C(r.generators,r.emit,t,r.outputMode),q(e,{...r,registry:t})}export{cr as AUTHORING_HELPER_NAMES,U as NotSupportedError,_ as Printer,F as RESERVED_WORDS,B as casing,j as codeLiteral,Er as collectGeneratedFiles,K as deref,V as discriminatorCases,Z as docText,Y as enumValues,P as flattenAllOf,z as generateClient,rr as headerCoerceType,J as identifierFor,ar as isBinaryContentType,or as isMultipartBody,W as isNullable,nr as isUntypedMultipartBody,er as jsonSuccessSchema,I as operationSignature,mr as paginationItemSchema,H as paginationRuleFor,w as pascalCase,R as renderComposedCliEntry,ir as renderReferencePage,T as safeIdent,$ as schemaAtPointer,sr as securityRequirements,pr as serverUrlParts,tr as sseResponse,M as tsJsdoc,N as tsType,Q as uniqueIdentifiers,X as unwrapNullable};
@@ -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{f as k}from"./ERFYZ47T.js";import{a as B}from"./V5CIDI6D.js";import{a as x,e as P,f as v,i as H,j as C,k as p,l as M}from"./LD5MEXEL.js";import{n as N}from"./UW4UC7ZI.js";function y(e){let t=new Map(e.pathParams.map(r=>[r.name,r])),n=[];for(let r of e.path.matchAll(/\{([^{}]+)\}/g)){let s=t.get(r[1]);s!==void 0&&n.push(s)}return n}function I(e){let t=y(e),n=e.queryParams.length>0,r=!!e.requestBody,s=e.headerParams.length>0,o=e.cookieParams.length>0;return{hasQuery:n,hasBody:r,hasHeaders:s,hasCookies:o,hasInputs:t.length>0||n||r||s||o,varsRequired:t.length>0||e.queryParams.some(a=>a.required)||(e.requestBody?.required??!1)||e.headerParams.some(a=>a.required)||e.cookieParams.some(a=>a.required),variablesTypeName:`${p(e.name)}Variables`}}var E=" ";function $(e,t,n){let r=C(e,t);return r===void 0?[]:[`${n}/**`,...H(r).split(`
7
+ import{f as k}from"./C67OKMFJ.js";import{a as B}from"./SS6PCAMM.js";import{a as x,e as P,f as v,i as H,j as C,k as p,l as M}from"./LD5MEXEL.js";import{n as N}from"./UW4UC7ZI.js";function y(e){let t=new Map(e.pathParams.map(r=>[r.name,r])),n=[];for(let r of e.path.matchAll(/\{([^{}]+)\}/g)){let s=t.get(r[1]);s!==void 0&&n.push(s)}return n}function I(e){let t=y(e),n=e.queryParams.length>0,r=!!e.requestBody,s=e.headerParams.length>0,o=e.cookieParams.length>0;return{hasQuery:n,hasBody:r,hasHeaders:s,hasCookies:o,hasInputs:t.length>0||n||r||s||o,varsRequired:t.length>0||e.queryParams.some(a=>a.required)||(e.requestBody?.required??!1)||e.headerParams.some(a=>a.required)||e.cookieParams.some(a=>a.required),variablesTypeName:`${p(e.name)}Variables`}}var E=" ";function $(e,t,n){let r=C(e,t);return r===void 0?[]:[`${n}/**`,...H(r).split(`
8
8
  `).map(s=>`${n} * ${s}`.replace(/ +$/,"")),`${n} */`]}function O(e){return typeof e=="string"?JSON.stringify(e):String(e)}function F(e,t,n){switch(e){case"string":return t?.format==="binary"?"Blob":n==="Date"&&(t?.format==="date-time"||t?.format==="date")?"Date":"string";case"number":case"integer":return"number";case"boolean":return"boolean"}}function j(e){return e.kind==="union"||e.kind==="intersection"||e.kind==="enum"&&e.values.length>1}function c(e,t="string",n=""){switch(e.kind){case"scalar":return F(e.scalar,e.metadata,t);case"ref":return e.name;case"literal":return O(e.value);case"enum":return e.values.map(O).join(" | ");case"null":return"null";case"unknown":return"unknown";case"array":{let r=c(e.items,t,n);return j(e.items)?`(${r})[]`:`${r}[]`}case"record":return`Record<string, ${c(e.value,t,n)}>`;case"object":{if(e.properties.length===0)return"{}";let r=n+E;return`{
9
9
  ${e.properties.flatMap(o=>K(o,t,r)).join(`
10
10
  `)}
@@ -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"./QFJ6QZPG.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 zodGenerator};
7
+ import{a}from"./N3GO4LRW.js";import"./C67OKMFJ.js";import"./SS6PCAMM.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
@@ -4,10 +4,10 @@ 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,b as v,c as U,d as F,e as R}from"./U5DIFWGH.js";import{b as O}from"./F6IXS3RL.js";import{ba as k,c as G,ca as $,ga as S,ia as b,l as P,oa as g}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{readFileSync as z}from"node:fs";import{mkdir as H,writeFile as B}from"node:fs/promises";import{basename as T,dirname as A,extname as I,isAbsolute as N,relative as j,resolve as f}from"node:path";var V=/^[a-z][a-z0-9+.-]+:/i;function L(e,n){let{setup:o}=e;if(typeof o!="string")return e;if(V.test(o))throw new g(`
7
+ import{a as l,b as v,c as U,d as F,e as R}from"./U5DIFWGH.js";import{b as O}from"./6NB3FKVN.js";import{ba as k,c as G,ca as $,ga as S,ia as b,l as P,oa as g}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{readFileSync as z}from"node:fs";import{mkdir as H,writeFile as B}from"node:fs/promises";import{basename as T,dirname as A,extname as I,isAbsolute as N,relative as j,resolve as f}from"node:path";var V=/^[a-z][a-z0-9+.-]+:/i;function L(e,n){let{setup:o}=e;if(typeof o!="string")return e;if(V.test(o))throw new g(`
8
8
  \u274C \`client.setup\` must be a local file path \u2014 remote setup modules are not supported.
9
9
  Got: ${o}
10
- `);return N(o)?e:{...e,setup:f(n,o)}}function q(e){return`${e.replace(/[\\/]/g,"_")}.client.ts`}function D(e){if(e.startsWith("//"))return!1;if(e.startsWith("/"))return!0;try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}async function ie({argv:e,config:n}){let{AUTHORING_HELPER_NAMES:o,generateClient:c,mergeConfig:m}=await import("./MXOINKB2.js"),t=n.configPath?A(n.configPath):process.cwd(),s={serverUrl:e["server-url"],outputMode:e["output-mode"],runtime:e.runtime,importExt:e["import-ext"],goPackage:e["go-package"],argsStyle:e["args-style"],errorMode:e["error-mode"],dateType:e["date-type"],mockData:e["mock-data"],mockSeed:e["mock-seed"],docs:e.docs,generators:e.generator?.map(a=>a.startsWith(".")?f(a):a),setup:e.setup===void 0?void 0:L({setup:e.setup},process.cwd()).setup},r=n.resolvedConfig.apis??{},i=Object.keys(r).filter(a=>G(r[a].client)||r[a].clientOutput!==void 0);if(e.api===void 0){if(e.output)throw new g("\n\u274C --output can't target multiple APIs. Set `clientOutput` under each api in redocly.yaml, or pass a single <api>.\n");if(i.length===0)throw new g("\n\u274C No API to generate. Add a `client` block or `clientOutput` under an `apis:` entry, or pass <api> (a file/URL or an `apis:` alias).\n")}let u=await O(e.api===void 0?i:[e.api],n),p={config:n,configDir:t,cliFlags:s,outputFlag:e.output,toolkit:{generateClient:c,mergeConfig:m,helperNames:o},seenOutputs:new Set,composable:[]};for(let a of u)await J(a,p);let y=G(n.resolvedConfig.client)?n.resolvedConfig.client:{};y.cliOutput!==void 0&&e.api===void 0&&p.composable.length>0&&await K(y.cliOutput,p)}async function J(e,{config:n,configDir:o,cliFlags:c,outputFlag:m,toolkit:t,seenOutputs:s,composable:r}){let{path:i,alias:u}=e,p=u??T(i,I(i)),y=n.forAlias(u),{client:a,clientOutput:E}=y.resolvedConfig,W=L(G(a)?a:{},o),h=t.mergeConfig(W,c);Q(h.generators??[],t.helperNames,o);let C=m!==void 0?f(m):E!==void 0?f(o,E):f(o,q(p));if(!C.endsWith(".ts"))throw new g(`
10
+ `);return N(o)?e:{...e,setup:f(n,o)}}function q(e){return`${e.replace(/[\\/]/g,"_")}.client.ts`}function D(e){if(e.startsWith("//"))return!1;if(e.startsWith("/"))return!0;try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}async function ie({argv:e,config:n}){let{AUTHORING_HELPER_NAMES:o,generateClient:c,mergeConfig:m}=await import("./TWWNWQRB.js"),t=n.configPath?A(n.configPath):process.cwd(),s={serverUrl:e["server-url"],outputMode:e["output-mode"],runtime:e.runtime,importExt:e["import-ext"],goPackage:e["go-package"],argsStyle:e["args-style"],errorMode:e["error-mode"],dateType:e["date-type"],mockData:e["mock-data"],mockSeed:e["mock-seed"],docs:e.docs,generators:e.generator?.map(a=>a.startsWith(".")?f(a):a),setup:e.setup===void 0?void 0:L({setup:e.setup},process.cwd()).setup},r=n.resolvedConfig.apis??{},i=Object.keys(r).filter(a=>G(r[a].client)||r[a].clientOutput!==void 0);if(e.api===void 0){if(e.output)throw new g("\n\u274C --output can't target multiple APIs. Set `clientOutput` under each api in redocly.yaml, or pass a single <api>.\n");if(i.length===0)throw new g("\n\u274C No API to generate. Add a `client` block or `clientOutput` under an `apis:` entry, or pass <api> (a file/URL or an `apis:` alias).\n")}let u=await O(e.api===void 0?i:[e.api],n),p={config:n,configDir:t,cliFlags:s,outputFlag:e.output,toolkit:{generateClient:c,mergeConfig:m,helperNames:o},seenOutputs:new Set,composable:[]};for(let a of u)await J(a,p);let y=G(n.resolvedConfig.client)?n.resolvedConfig.client:{};y.cliOutput!==void 0&&e.api===void 0&&p.composable.length>0&&await K(y.cliOutput,p)}async function J(e,{config:n,configDir:o,cliFlags:c,outputFlag:m,toolkit:t,seenOutputs:s,composable:r}){let{path:i,alias:u}=e,p=u??T(i,I(i)),y=n.forAlias(u),{client:a,clientOutput:E}=y.resolvedConfig,W=L(G(a)?a:{},o),h=t.mergeConfig(W,c);Q(h.generators??[],t.helperNames,o);let C=m!==void 0?f(m):E!==void 0?f(o,E):f(o,q(p));if(!C.endsWith(".ts"))throw new g(`
11
11
  \u274C output must point at a TypeScript file (ending in .ts).
12
12
  Got: ${C}
13
13
  `);if(s.has(C))throw new g(`
@@ -23,7 +23,7 @@ import{a as l,b as v,c as U,d as F,e as R}from"./U5DIFWGH.js";import{b as O}from
23
23
  `)}catch(d){let w=d instanceof Error?d.message:String(d);throw l.generate_client_error_category=R(w),new g(`
24
24
  \u274C Failed to generate client for ${p}.
25
25
  ${w}
26
- `)}}async function K(e,{configDir:n,seenOutputs:o,composable:c}){let{renderComposedCliEntry:m}=await import("./45DZYRBQ.js"),t=f(n,e);if(!t.endsWith(".ts"))throw new g(`
26
+ `)}}async function K(e,{configDir:n,seenOutputs:o,composable:c}){let{renderComposedCliEntry:m}=await import("./NFRA6IE2.js"),t=f(n,e);if(!t.endsWith(".ts"))throw new g(`
27
27
  \u274C client.cliOutput must point at a TypeScript file (ending in .ts).
28
28
  Got: ${t}
29
29
  `);if(o.has(t))throw new g(`
@@ -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"./VX2VONNO.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,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,b,c,d,e}from"./6ETCN64B.js";import"./XJE2OFDN.js";import"./ERFYZ47T.js";import"./V5CIDI6D.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
7
+ import{a,b,c,d,e}from"./53INGMTO.js";import"./XJE2OFDN.js";import"./C67OKMFJ.js";import"./SS6PCAMM.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
@@ -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}from"./US7X4XPD.js";import{a as b,d as A,e as E,g as O,p as B,q as h}from"./3TBVUHVH.js";import{f as I}from"./F6IXS3RL.js";import{$ as v,aa as j,ba as u,da as c,ea as d,ia as a,m as l,oa as m}from"./22EANOP2.js";var y=class extends Error{};async function Z({argv:t,version:e}){let n=performance.now(),o=new F,{organization:s,project:p,pushId:w,wait:g}=t,U=t.domain||O(),S=t["continue-on-deploy-failures"]||!1,M=t["start-time"]||Date.now(),R=[],f={organization:s,project:p};try{let $=E(),P={domain:U,apiKey:$,...f,pushId:w,version:e,onSunsetWarning:i=>R.push(i),onSlugDeprecated:i=>{K(i),f={organization:i.organizationId,project:i.projectId}}},D={...P,maxExecutionTime:t["max-execution-time"],retryIntervalMs:t["retry-interval"]?t["retry-interval"]*1e3:void 0,startTime:M},x=i=>T=>{let{status:C,url:N}=T.status[i].deploy;o.start(L({status:C,url:N,buildType:i,wait:g}))},r=g?await h({...D,buildType:"preview",onRetry:x("preview")}):await B(P);return W({buildType:"preview",spinner:o,push:r,continueOnDeployFailures:S}),z(r.status.preview.scorecard),g&&r.isMainBranch&&r.status.preview.deploy.status==="success"&&(r=await h({...D,...f,buildType:"production",onRetry:x("production")})),r.isMainBranch&&(W({buildType:"production",spinner:o,push:r,continueOnDeployFailures:S}),z(r.status.production.scorecard)),V({organization:s,project:p,pushId:w,startedAt:n}),{preview:r.status.preview,production:r.isMainBranch?r.status.production:null,commit:r.commit}}catch($){o.stop(),k("\u2717 Failed to get push status.",$)}finally{o.stop(),H("push-status",R)}}function k(t,e){throw e instanceof y?new m(e.message):e instanceof b?new m(`${t} Reason: ${e.message} (status: ${e.status})
7
+ import{a as F}from"./US7X4XPD.js";import{a as b,d as A,e as E,g as O,p as B,q as h}from"./5NOJ76EP.js";import{f as I}from"./6NB3FKVN.js";import{$ as v,aa as j,ba as u,da as c,ea as d,ia as a,m as l,oa as m}from"./22EANOP2.js";var y=class extends Error{};async function Z({argv:t,version:e}){let n=performance.now(),o=new F,{organization:s,project:p,pushId:w,wait:g}=t,U=t.domain||O(),S=t["continue-on-deploy-failures"]||!1,M=t["start-time"]||Date.now(),R=[],f={organization:s,project:p};try{let $=E(),P={domain:U,apiKey:$,...f,pushId:w,version:e,onSunsetWarning:i=>R.push(i),onSlugDeprecated:i=>{K(i),f={organization:i.organizationId,project:i.projectId}}},D={...P,maxExecutionTime:t["max-execution-time"],retryIntervalMs:t["retry-interval"]?t["retry-interval"]*1e3:void 0,startTime:M},x=i=>T=>{let{status:C,url:N}=T.status[i].deploy;o.start(L({status:C,url:N,buildType:i,wait:g}))},r=g?await h({...D,buildType:"preview",onRetry:x("preview")}):await B(P);return W({buildType:"preview",spinner:o,push:r,continueOnDeployFailures:S}),z(r.status.preview.scorecard),g&&r.isMainBranch&&r.status.preview.deploy.status==="success"&&(r=await h({...D,...f,buildType:"production",onRetry:x("production")})),r.isMainBranch&&(W({buildType:"production",spinner:o,push:r,continueOnDeployFailures:S}),z(r.status.production.scorecard)),V({organization:s,project:p,pushId:w,startedAt:n}),{preview:r.status.preview,production:r.isMainBranch?r.status.production:null,commit:r.commit}}catch($){o.stop(),k("\u2717 Failed to get push status.",$)}finally{o.stop(),H("push-status",R)}}function k(t,e){throw e instanceof y?new m(e.message):e instanceof b?new m(`${t} Reason: ${e.message} (status: ${e.status})
8
8
  `):new m(`${t} Reason: ${e.message}
9
9
  `)}function K({organizationId:t,projectId:e}){a.warn(`Organization and project slugs are deprecated. Use the ids instead: --organization ${t} --project ${e}
10
10
  `)}function H(t,e){let n=A(e);if(!n)return;let o='Update to the latest version by running "npm install @redocly/cli@latest".';n.isSunsetExpired?a.error(`The "${t}" command is not compatible with your version of Redocly CLI. ${o}
@@ -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,b,c,d,e}from"./E5BMYA7V.js";import"./US7X4XPD.js";import"./3TBVUHVH.js";import"./F6IXS3RL.js";import"./LRUXN6H5.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as DeploymentError,b as handlePushStatus,c as handleReuniteError,d as printSlugDeprecation,e as printSunsetWarning};
7
+ import{a,b,c,d,e}from"./REIGI2Y7.js";import"./US7X4XPD.js";import"./5NOJ76EP.js";import"./6NB3FKVN.js";import"./LRUXN6H5.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";export{a as DeploymentError,b as handlePushStatus,c as handleReuniteError,d as printSlugDeprecation,e as printSunsetWarning};
@@ -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 q}from"./6DO6IN4A.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./3TBVUHVH.js";import{b as J,d as M,e as Y,v as L}from"./F6IXS3RL.js";import"./LRUXN6H5.js";import{$ as O,V as N,Z as v,aa as A,ba as j,ca as b,ea as y,fa as C,ga as R,ia as e,l as h,oa as w,pa as D,ua as S,xa as g}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{dirname as le}from"node:path";function W(r,t,o,n){n&&e.info(C(v(`
7
+ import{a as q}from"./6DO6IN4A.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./5NOJ76EP.js";import{b as J,d as M,e as Y,v as L}from"./6NB3FKVN.js";import"./LRUXN6H5.js";import{$ as O,V as N,Z as v,aa as A,ba as j,ca as b,ea as y,fa as C,ga as R,ia as e,l as h,oa as w,pa as D,ua as S,xa as g}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{dirname as le}from"node:path";function W(r,t,o,n){n&&e.info(C(v(`
8
8
  \u2611\uFE0F Achieved Level: ${y(o)}
9
9
 
10
10
  `))),e.output(`<?xml version="1.0" encoding="UTF-8"?>
@@ -4,6 +4,6 @@ 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"./6L6AYZQS.js";import{ia as p}from"./22EANOP2.js";function g(t,r){let n=t.services.flatMap(e=>e.operations),s=n.filter(e=>e.sse!==void 0);s.length>0&&p.warn(`generate-client: ${r} skipped ${s.length} server-sent-events operation(s) \u2014 iterate the sdk's exported async generators directly: ${s.map(e=>e.name).join(", ")}.
7
+ import{a}from"./OMIM3KH6.js";import{ia as p}from"./22EANOP2.js";function g(t,r){let n=t.services.flatMap(e=>e.operations),s=n.filter(e=>e.sse!==void 0);s.length>0&&p.warn(`generate-client: ${r} skipped ${s.length} server-sent-events operation(s) \u2014 iterate the sdk's exported async generators directly: ${s.map(e=>e.name).join(", ")}.
8
8
  `);let i=new Set(t.schemas.map(e=>e.name)),o=n.filter(e=>e.sse===void 0&&m(e,i));return o.length>0&&p.warn(`generate-client: ${r} skipped ${o.length} operation(s) whose variables type name collides with a schema \u2014 rename the schema or the operation: ${o.map(e=>e.name).join(", ")}.
9
9
  `),n.filter(e=>e.sse===void 0&&!m(e,i))}function m(t,r){let n=a(t);return n.hasInputs&&r.has(n.variablesTypeName)}function x(t){return t.method==="get"||t.method==="head"}function u(t){return a(t).hasInputs}function f(t){return a(t).variablesTypeName}function $(t,r,n){let s=[];return a(t).hasInputs?s.push(r):n&&s.push("{}"),n&&s.push("{ ...init, envelope: undefined }"),`${t.name}(${s.join(", ")})`}function v(t,r,n){let s=t.map(e=>e.name).sort(),i=t.filter(u).map(f).sort();return n&&i.push("RequestOptions"),`import { ${[...s,...i.map(e=>`type ${e}`)].join(", ")} } from ${JSON.stringify(r)};`}export{g as a,x as b,u as c,f as d,$ as e,v as f};
@@ -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{b as $,e as T,o as E,p as F,r as I,t as L,v as m}from"./F6IXS3RL.js";import{ca as w,ga as l,ia as n,l as x,pa as h,va as A,wa as g,ya as k}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as O}from"perf_hooks";async function X({argv:e,config:t,version:u,collectSpecData:P,collectResults:R}){let c=await $(e.apis,t),r={errors:0,warnings:0,ignored:0},p=0,b=e.format==="checkstyle"||e.format==="junit",y=[];for(let{path:o,alias:f}of c)try{let d=O.now(),s=t.forAlias(f);L(s.rules),s.skipRules(e["skip-rule"]),s.skipPreprocessors(e["skip-preprocessor"]),typeof t.document?.parsed>"u"&&!e.extends&&n.info(`No configurations were provided -- using built in ${w("recommended")} configuration by default.
7
+ import{b as $,e as T,o as E,p as F,r as I,t as L,v as m}from"./6NB3FKVN.js";import{ca as w,ga as l,ia as n,l as x,pa as h,va as A,wa as g,ya as k}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as O}from"perf_hooks";async function X({argv:e,config:t,version:u,collectSpecData:P,collectResults:R}){let c=await $(e.apis,t),r={errors:0,warnings:0,ignored:0},p=0,b=e.format==="checkstyle"||e.format==="junit",y=[];for(let{path:o,alias:f}of c)try{let d=O.now(),s=t.forAlias(f);L(s.rules),s.skipRules(e["skip-rule"]),s.skipPreprocessors(e["skip-preprocessor"]),typeof t.document?.parsed>"u"&&!e.extends&&n.info(`No configurations were provided -- using built in ${w("recommended")} configuration by default.
8
8
 
9
9
  `),f===void 0?n.info(l(`validating ${m(o)}...
10
10
  `)):n.info(l(`validating ${m(o)} using lint rules for api '${f}'...
@@ -5443,4 +5443,4 @@ async function runSingle(
5443
5443
  }
5444
5444
  return fail(1, detail);
5445
5445
  }
5446
- }`},S=["ApiError","ApiErrorLike","AuthCredentials","BodyMethod","Capabilities","CliAuthScheme","CliCommand","CliFlag","CliGlobals","CliInvocation","CliWiring","Client","ClientConfig","ClientCore","CommandContext","CommandSource","CustomCommand","Envelope","EnvelopeResult","EnvelopeResultForKnownInit","FRAME_DELIMITER","GLOBAL_FLAGS","HeadersOf","IDEMPOTENT_METHODS","LAYERS","LAYER_OF","LinkPageCall","Middleware","NoRequiredKeys","OperationArgs","OperationContext","OperationDescriptor","OperationMethodIdentity","OpsShape","PageOf","Paginated","PaginationSpec","ParamSpec","ParseAs","QueryStyle","QueryValue","RequestContext","RequestOptions","ResolvedCommand","ResponseHeaderSpec","Result","RetryConfig","RetryContext","RetryStrategy","SecuritySpec","SendCapabilities","ServerSentEvent","SseOptions","SseParseError","TRANSIENT_STATUS","ThrowMethod","TimeoutError","TokenProvider","abortError","acceptFor","buildUrl","callInputs","coerceResponseHeader","commandContract","constantCase","createClientCore","defaultRetryOn","encodeBase64","encodeReserved","execute","groupSlug","inputOf","invokedName","isConfigured","items","itemsByLink","kindFor","linkNext","linkPageCall","loadBody","mergeSetup","middlewareChain","namespaceArgs","normalizeCommands","oneLine","pageCall","pages","pagesByLink","paginateCapability","parse","parseInvocation","parseSseFrame","prepareRequest","queryStyles","readEnvelopeHeaders","readError","redactHeaders","renderComposedHelp","renderHelp","resolveAuth","resolvePointer","resolveToken","retryDelay","runCli","runSingle","runSources","send","shadowedCommandName","sleep","splitArgs","sse","stringHeaders","substitutePath","toFormData","toHeaderRecord"];var j=["client","OPERATIONS","Ops","OperationId","OperationPath","OperationTag","createClient","mergeSetup","ApiError","TimeoutError","configure","use","auth","defaultRetryOn","ClientConfig","RequestOptions","SseOptions","Middleware","OperationDescriptor","ServerSentEvent","Result","Envelope","EnvelopeResult","TokenProvider","__redoclySetup"],$=["z","http","HttpResponse","handlers","faker","queryOptions","useSWR","useSWRMutation","__Writable"],N=["AbortSignal","Array","ArrayBuffer","ArrayBufferView","AsyncGenerator","AsyncIterable","Blob","BodyInit","Boolean","DOMException","Date","Error","Extract","FormData","Headers","HeadersInit","JSON","Map","Math","NonNullable","Number","Object","Omit","Partial","Promise","ReadableStream","Record","RegExp","RegExpExecArray","Request","RequestInit","Response","Set","String","Symbol","TextDecoder","TextEncoder","TypeError","Uint8Array","URL","URLSearchParams","btoa","clearTimeout","crypto","decodeURIComponent","document","encodeURIComponent","fetch","globalThis","setTimeout","undefined"],w;function Q(){return w===void 0&&(w=new Set([...j,...$,...N,...S])),w}var A={name:"@redocly/client-generator",version:"0.5.0",description:"Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",type:"module",types:"lib/index.d.ts",sideEffects:!1,exports:{".":{types:"./lib/index.d.ts",import:"./lib/index.js",default:"./lib/index.js"},"./generate":{types:"./lib/generate.d.ts",import:"./lib/generate.js",default:"./lib/generate.js"},"./printers/python":{types:"./lib/printers/python.d.ts",import:"./lib/printers/python.js",default:"./lib/printers/python.js"},"./printers/go":{types:"./lib/printers/go.d.ts",import:"./lib/printers/go.js",default:"./lib/printers/go.js"},"./printers/php":{types:"./lib/printers/php.d.ts",import:"./lib/printers/php.js",default:"./lib/printers/php.js"},"./printers/typescript":{types:"./lib/printers/typescript.d.ts",import:"./lib/printers/typescript.js",default:"./lib/printers/typescript.js"},"./printers":{types:"./lib/printers/index.d.ts",import:"./lib/printers/index.js",default:"./lib/printers/index.js"},"./contracts/typescript":{types:"./lib/contracts/typescript.d.ts",import:"./lib/contracts/typescript.js",default:"./lib/contracts/typescript.js"},"./runtime-sources":{types:"./lib/runtime-sources.d.ts",import:"./lib/runtime-sources.js",default:"./lib/runtime-sources.js"},"./package.json":"./package.json"},engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{"examples:regen":"node scripts/regenerate-examples.mjs",prepare:"node scripts/generate-runtime-sources.mjs && node scripts/generate-eject-assets.mjs","typecheck:examples":"node scripts/typecheck-examples.mjs"},license:"MIT",repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["OpenAPI","Swagger","TypeScript","client","generator","codegen","fetch"],contributors:["Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"],dependencies:{"@redocly/openapi-core":"2.61.0"},peerDependencies:{typescript:">=5.5.0"},peerDependenciesMeta:{typescript:{optional:!0}},devDependencies:{typescript:"6.0.2"},files:["lib","eject-assets"]};var ee=A.version;function T(e){let n=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e.trim());return n===null?void 0:[Number(n[1]),Number(n[2]),Number(n[3])]}function v(e,n){return e[0]-n[0]||e[1]-n[1]||e[2]-n[2]}function ne(e,n){let s=/^[\^~]|^>=/.exec(n.trim())?.[0]??"",r=T(n.trim().slice(s.length)),a=T(e);if(!(r===void 0||a===void 0))return v(a,r)<0?!1:s===">="?!0:s===""?v(a,r)===0:s==="~"?a[0]===r[0]&&a[1]===r[1]:r[0]!==0?a[0]===r[0]:r[1]!==0?a[0]===0&&a[1]===r[1]:v(a,r)===0}export{C as a,H as b,G as c,W as d,j as e,Q as f,ee as g,ne as h};
5446
+ }`},S=["ApiError","ApiErrorLike","AuthCredentials","BodyMethod","Capabilities","CliAuthScheme","CliCommand","CliFlag","CliGlobals","CliInvocation","CliWiring","Client","ClientConfig","ClientCore","CommandContext","CommandSource","CustomCommand","Envelope","EnvelopeResult","EnvelopeResultForKnownInit","FRAME_DELIMITER","GLOBAL_FLAGS","HeadersOf","IDEMPOTENT_METHODS","LAYERS","LAYER_OF","LinkPageCall","Middleware","NoRequiredKeys","OperationArgs","OperationContext","OperationDescriptor","OperationMethodIdentity","OpsShape","PageOf","Paginated","PaginationSpec","ParamSpec","ParseAs","QueryStyle","QueryValue","RequestContext","RequestOptions","ResolvedCommand","ResponseHeaderSpec","Result","RetryConfig","RetryContext","RetryStrategy","SecuritySpec","SendCapabilities","ServerSentEvent","SseOptions","SseParseError","TRANSIENT_STATUS","ThrowMethod","TimeoutError","TokenProvider","abortError","acceptFor","buildUrl","callInputs","coerceResponseHeader","commandContract","constantCase","createClientCore","defaultRetryOn","encodeBase64","encodeReserved","execute","groupSlug","inputOf","invokedName","isConfigured","items","itemsByLink","kindFor","linkNext","linkPageCall","loadBody","mergeSetup","middlewareChain","namespaceArgs","normalizeCommands","oneLine","pageCall","pages","pagesByLink","paginateCapability","parse","parseInvocation","parseSseFrame","prepareRequest","queryStyles","readEnvelopeHeaders","readError","redactHeaders","renderComposedHelp","renderHelp","resolveAuth","resolvePointer","resolveToken","retryDelay","runCli","runSingle","runSources","send","shadowedCommandName","sleep","splitArgs","sse","stringHeaders","substitutePath","toFormData","toHeaderRecord"];var j=["client","OPERATIONS","Ops","OperationId","OperationPath","OperationTag","createClient","mergeSetup","ApiError","TimeoutError","configure","use","auth","defaultRetryOn","ClientConfig","RequestOptions","SseOptions","Middleware","OperationDescriptor","ServerSentEvent","Result","Envelope","EnvelopeResult","TokenProvider","__redoclySetup"],$=["z","http","HttpResponse","handlers","faker","queryOptions","useSWR","useSWRMutation","__Writable"],N=["AbortSignal","Array","ArrayBuffer","ArrayBufferView","AsyncGenerator","AsyncIterable","Blob","BodyInit","Boolean","DOMException","Date","Error","Extract","FormData","Headers","HeadersInit","JSON","Map","Math","NonNullable","Number","Object","Omit","Partial","Promise","ReadableStream","Record","RegExp","RegExpExecArray","Request","RequestInit","Response","Set","String","Symbol","TextDecoder","TextEncoder","TypeError","Uint8Array","URL","URLSearchParams","btoa","clearTimeout","crypto","decodeURIComponent","document","encodeURIComponent","fetch","globalThis","setTimeout","undefined"],w;function Q(){return w===void 0&&(w=new Set([...j,...$,...N,...S])),w}var A={name:"@redocly/client-generator",version:"0.5.1",description:"Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",type:"module",types:"lib/index.d.ts",sideEffects:!1,exports:{".":{types:"./lib/index.d.ts",import:"./lib/index.js",default:"./lib/index.js"},"./generate":{types:"./lib/generate.d.ts",import:"./lib/generate.js",default:"./lib/generate.js"},"./printers/python":{types:"./lib/printers/python.d.ts",import:"./lib/printers/python.js",default:"./lib/printers/python.js"},"./printers/go":{types:"./lib/printers/go.d.ts",import:"./lib/printers/go.js",default:"./lib/printers/go.js"},"./printers/php":{types:"./lib/printers/php.d.ts",import:"./lib/printers/php.js",default:"./lib/printers/php.js"},"./printers/typescript":{types:"./lib/printers/typescript.d.ts",import:"./lib/printers/typescript.js",default:"./lib/printers/typescript.js"},"./printers":{types:"./lib/printers/index.d.ts",import:"./lib/printers/index.js",default:"./lib/printers/index.js"},"./contracts/typescript":{types:"./lib/contracts/typescript.d.ts",import:"./lib/contracts/typescript.js",default:"./lib/contracts/typescript.js"},"./runtime-sources":{types:"./lib/runtime-sources.d.ts",import:"./lib/runtime-sources.js",default:"./lib/runtime-sources.js"},"./package.json":"./package.json"},engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{"examples:regen":"node scripts/regenerate-examples.mjs",prepare:"node scripts/generate-runtime-sources.mjs && node scripts/generate-eject-assets.mjs","typecheck:examples":"node scripts/typecheck-examples.mjs"},license:"MIT",repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["OpenAPI","Swagger","TypeScript","client","generator","codegen","fetch"],contributors:["Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"],dependencies:{"@redocly/openapi-core":"2.62.0"},peerDependencies:{typescript:">=5.5.0"},peerDependenciesMeta:{typescript:{optional:!0}},devDependencies:{typescript:"6.0.2"},files:["lib","eject-assets"]};var ee=A.version;function T(e){let n=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e.trim());return n===null?void 0:[Number(n[1]),Number(n[2]),Number(n[3])]}function v(e,n){return e[0]-n[0]||e[1]-n[1]||e[2]-n[2]}function ne(e,n){let s=/^[\^~]|^>=/.exec(n.trim())?.[0]??"",r=T(n.trim().slice(s.length)),a=T(e);if(!(r===void 0||a===void 0))return v(a,r)<0?!1:s===">="?!0:s===""?v(a,r)===0:s==="~"?a[0]===r[0]&&a[1]===r[1]:r[0]!==0?a[0]===r[0]:r[1]!==0?a[0]===0&&a[1]===r[1]:v(a,r)===0}export{C as a,H as b,G as c,W as d,j as e,Q as f,ee as g,ne as h};
@@ -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{b as D}from"./F6IXS3RL.js";import{V as C,W as j,ia as $,ka as k,la as M,ma as S,oa as b,q as F,u as R,w as x}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{relative as I,resolve as U}from"node:path";var A=20;async function B({argv:o,config:t,collectSpecData:r}){let[{path:s}]=await D([o.api],t),n=new C(t.resolve),e=await n.resolveDocument(null,s,!0);r?.(e);let i=k(e.parsed),d=F(t.extendTypes(x(i),i),t),p=new Map,u=({source:l,pointer:c},f,N)=>{let v=`${l.absoluteRef}${c}`,y=p.get(v);if(!y){p.set(v,{absoluteRef:l.absoluteRef,pointer:c,types:[f],resolvesTo:N});return}y.types.includes(f)||y.types.push(f),y.resolvesTo||(y.resolvesTo=N)},m={any:{enter(l,{location:c,type:f}){u(c,f.name)}},ref(l,{location:c,type:f},N){u(c,f.name,N.location)}},h={problems:[],specVersion:i,config:t,visitorsData:{}},a=await j({rootDocument:e,rootType:d.Root,externalRefResolver:n});if(S({document:e,rootType:d.Root,normalizedVisitors:M([{severity:"warn",ruleId:"inspect-node-types",visitor:m}],d),resolvedRefMap:a,ctx:h}),o.pointer){let l=W(p,o.pointer,e.source.absoluteRef);o.parents?L(w(p,l,e.source.absoluteRef)):$.output(`${l.types.join(`
7
+ import{b as D}from"./6NB3FKVN.js";import{V as C,W as j,ia as $,ka as k,la as M,ma as S,oa as b,q as F,u as R,w as x}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{relative as I,resolve as U}from"node:path";var A=20;async function B({argv:o,config:t,collectSpecData:r}){let[{path:s}]=await D([o.api],t),n=new C(t.resolve),e=await n.resolveDocument(null,s,!0);r?.(e);let i=k(e.parsed),d=F(t.extendTypes(x(i),i),t),p=new Map,u=({source:l,pointer:c},f,N)=>{let v=`${l.absoluteRef}${c}`,y=p.get(v);if(!y){p.set(v,{absoluteRef:l.absoluteRef,pointer:c,types:[f],resolvesTo:N});return}y.types.includes(f)||y.types.push(f),y.resolvesTo||(y.resolvesTo=N)},m={any:{enter(l,{location:c,type:f}){u(c,f.name)}},ref(l,{location:c,type:f},N){u(c,f.name,N.location)}},h={problems:[],specVersion:i,config:t,visitorsData:{}},a=await j({rootDocument:e,rootType:d.Root,externalRefResolver:n});if(S({document:e,rootType:d.Root,normalizedVisitors:M([{severity:"warn",ruleId:"inspect-node-types",visitor:m}],d),resolvedRefMap:a,ctx:h}),o.pointer){let l=W(p,o.pointer,e.source.absoluteRef);o.parents?L(w(p,l,e.source.absoluteRef)):$.output(`${l.types.join(`
8
8
  `)}
9
9
  `);return}let g=[...p.values()];if(o.summary)V(g);else if(o.type){let l=o.type,c=g.filter(({types:f})=>f.includes(l));if(c.length===0)throw new b(`No nodes of type '${l}'. Run the command with --summary to see the types used in this description.`);o.parents?L(c.flatMap(f=>w(p,f,e.source.absoluteRef)),l):E(c)}else E(g)}function w(o,t,r,s=new Set){let n=`${t.absoluteRef}${t.pointer}`;if(s.has(n))return[[t]];s.add(n);let e=[],i=t.pointer.split("/");for(let p=1;p<i.length;p++){let u=p===1?"#/":i.slice(0,p).join("/");if(u===t.pointer)continue;let m=o.get(`${t.absoluteRef}${u}`);m&&e.push(m)}e.push(t);let d=[];e[0].absoluteRef===r&&e[0].pointer==="#/"&&d.push(e);for(let[p,u]of e.entries()){let m=[...o.values()].filter(a=>a.resolvesTo?.source.absoluteRef===u.absoluteRef&&a.resolvesTo.pointer===u.pointer),h=e.slice(p+1);for(let a of m)d.push(...w(o,a,r,s).map(g=>[...g,...h]))}return d.length?d:[e]}function L(o,t){let r=new Set(o.map(s=>s.map(({types:n})=>t&&n.includes(t)?t:n.join(", ")).join(" \u2192 ")));for(let s of r)$.output(`${s}
10
10
  `)}function W(o,t,r){let[s,n]=t.split("#"),e=s?R(s)?s:U(process.cwd(),s):r,i=o.get(`${e}#${n||"/"}`);if(!i)throw new b(`No node at ${t}. ${z(o,e,`#${n||"/"}`,s)??`Check the pointer, and make sure the file is referenced from ${T(r)}.`}`);return i}function z(o,t,r,s){let n=r.split("/");for(let e=n.length-1;e>=1;e--){let i=e===1?"#/":n.slice(0,e).join("/"),d=o.get(`${t}${i}`);if(!d)continue;let p=n[e].toLowerCase(),u=e===1?"#/":`${i}/`,m=[...o.values()].filter(c=>c.absoluteRef===t&&c.pointer.startsWith(u)&&!c.pointer.slice(u.length).includes("/")),h=m.filter(c=>c.pointer.slice(u.length).toLowerCase().includes(p)),a=(h.length?h:m).map(c=>` ${s}${c.pointer}`),g=a.length-A;g>0&&(a.length=A,a.push(` \u2026and ${g} more`));let l=`The closest node is ${d.types.join(", ")} at ${s}${i}.`;return a.length?`${l} Did you mean:
@@ -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,b,c,d,e,f}from"./WCWEP2X5.js";import"./XJE2OFDN.js";import"./ERFYZ47T.js";import"./V5CIDI6D.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{f as pythonDocs,d as pythonGenerator,c as pythonOptions,e as pythonSample,a as pythonType,b as renderPythonModels};
7
+ import{a,b,c,d,e,f}from"./HN2ZK7LZ.js";import"./XJE2OFDN.js";import"./C67OKMFJ.js";import"./SS6PCAMM.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{f as pythonDocs,d as pythonGenerator,c as pythonOptions,e as pythonSample,a as pythonType,b as renderPythonModels};
@@ -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{b as a,c as b,d as c}from"./6GH5BRNP.js";import"./XJE2OFDN.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{b as cliDocs,a as cliGenerator,c as cliSample};
7
+ import{b as a,c as b,d as c}from"./DFWXX7E2.js";import"./XJE2OFDN.js";import"./S3STDXJN.js";import"./OMIM3KH6.js";import"./C67OKMFJ.js";import"./SS6PCAMM.js";import"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as cliDocs,a as cliGenerator,c as cliSample};
@@ -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 as g,b as q,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as z,l as A,m as D,n as E,o as F,p as H,q as I}from"./ERFYZ47T.js";import{a as B,e as C,g as G}from"./V5CIDI6D.js";import{a}from"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{z as AUTHORING_HELPER_NAMES,G as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,C as WIRING_NAMES,B as allOperations,c as casing,E as constantCase,A as defineClientSetup,H as defineGenerator,h as deref,j as discriminatorCases,n as docText,m as enumValues,i as flattenAllOf,I as generateClient,D as groupSlug,p as headerCoerceType,e as identifierFor,u as isBinaryContentType,s as isMultipartBody,k as isNullable,t as isUntypedMultipartBody,q as jsonSuccessSchema,F as mergeConfig,x as paginationItemSchema,g as paginationRuleFor,y as renderReferencePage,o as resolveSchemaPointer,o as schemaAtPointer,w as securityRequirements,v as serverUrlParts,r as sseResponse,f as uniqueIdentifiers,l as unwrapNullable};
7
+ import{a as g,b as q,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as z,l as A,m as D,n as E,o as F,p as H,q as I}from"./C67OKMFJ.js";import{a as B,e as C,g as G}from"./SS6PCAMM.js";import{a}from"./WZXA5XPB.js";import"./22EANOP2.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{z as AUTHORING_HELPER_NAMES,G as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,C as WIRING_NAMES,B as allOperations,c as casing,E as constantCase,A as defineClientSetup,H as defineGenerator,h as deref,j as discriminatorCases,n as docText,m as enumValues,i as flattenAllOf,I as generateClient,D as groupSlug,p as headerCoerceType,e as identifierFor,u as isBinaryContentType,s as isMultipartBody,k as isNullable,t as isUntypedMultipartBody,q as jsonSuccessSchema,F as mergeConfig,x as paginationItemSchema,g as paginationRuleFor,y as renderReferencePage,o as resolveSchemaPointer,o as schemaAtPointer,w as securityRequirements,v as serverUrlParts,r as sseResponse,f as uniqueIdentifiers,l as unwrapNullable};
@@ -0,0 +1,8 @@
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{h as l}from"./5NOJ76EP.js";import"./LRUXN6H5.js";import{ia as p,oa as i}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as j}from"node:child_process";import{existsSync as y}from"node:fs";import*as c from"node:path";function d(e,t,o){return`${e}/api/orgs/${encodeURIComponent(t)}/projects/${encodeURIComponent(o)}/git`}function m(e,t){let o=`credential.${e}/.helper`,r=P("redocly")?"redocly":`npx --yes @redocly/cli@${t}`;return[`${o}=`,`${o}=!REDOCLY_SUPPRESS_UPDATE_NOTICE=true ${r} project git-credentials`]}async function a(e){return new Promise((t,o)=>{let r=j("git",e,{stdio:"inherit",env:{...process.env,GIT_TERMINAL_PROMPT:"0"}});r.on("error",n=>o(x(n))),r.on("close",n=>t(n??1))})}function P(e){let t=process.platform==="win32"?[".cmd",".exe"]:[""];return(process.env.PATH??"").split(c.delimiter).some(o=>o&&t.some(r=>y(c.join(o,e+r))))}function x(e){return e.code==="ENOENT"?new i("git is not installed or not on PATH."):e}async function S({argv:e,config:t,version:o}){let[r,n,...g]=e.project.split("/");if(!r||!n||g.length>0)throw new i(`Specify the project as \`<organization>/<project>\`, for example \`acme/developer-portal\`. Got: \`${e.project}\`.`);let s=l(t,e.residency),f=d(s,r,n),u=m(s,o);if(p.info(`Cloning ${r}/${n} from ${s}
8
+ `),await a(["clone",...u.flatMap(C=>["--config",C]),f,e.directory??n])!==0)throw new i("git clone failed.")}export{S as handleProjectClone};
@@ -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
- var e={name:"@redocly/cli",version:"2.61.0",description:"",license:"MIT",bin:{redocly:"bin/cli.js",openapi:"bin/cli.js"},type:"module",engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{build:"node ./scripts/build.mjs","prepare:publish-dir":"node ./scripts/prepare-publish-dir.mjs","clean:publish-dir":`node -e "require('fs').rmSync('.publish', {recursive:true, force:true})"`},publishConfig:{directory:".publish"},repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["linter","OpenAPI","Swagger","OpenAPI linter","Swagger linter","AsyncAPI linter","Arazzo linter","oas"],contributors:["Roman Hotsiy <roman@redocly.com> (https://redocly.com/)"],devDependencies:{"@modelcontextprotocol/sdk":"^1.32.1","@opentelemetry/exporter-trace-otlp-http":"0.219.0","@opentelemetry/resources":"2.8.0","@opentelemetry/sdk-trace-node":"2.8.0","@opentelemetry/semantic-conventions":"1.41.1","@redocly/cli-otel":"0.3.7","@redocly/client-generator":"0.5.0","@redocly/openapi-core":"2.61.0","@redocly/recheck":"2.61.0","@redocly/respect-core":"2.61.0","@redocly/reunite-integration":"2.61.0","@types/cookie":"0.6.0","@types/har-format":"^1.2.16","@types/react":"^17.0.0 || ^18.2.21 || ^19.2.16","@types/react-dom":"^17.0.0 || ^18.2.7 || ^19.2.3","@types/semver":"^7.5.0","@types/set-cookie-parser":"2.4.10","@types/yargs":"17.0.32",colorette:"^1.2.0",cookie:"^0.7.2",dotenv:"16.4.7",esbuild:"^0.28.0",glob:"^13.0.5",handlebars:"^4.7.9",react:"^17.0.0 || ^18.2.0 || ^19.2.7","react-dom":"^17.0.0 || ^18.2.0 || ^19.2.7",redoc:"2.5.4",semver:"^7.5.2","set-cookie-parser":"^2.3.5","styled-components":"6.4.2",typescript:"6.0.2",ulid:"^3.0.1",undici:"^6.29.0",yargs:"17.0.1"}};var{version:c,name:i,engines:s}=e,n=e.devDependencies.redoc,p="sha384-w447zOpYfw/1Tv/5AK9NfHTlQIqE3RVR6KY62jCyy9zNDgO64cMwGGP1Fj0zJVf5";export{c as a,i as b,s as c,n as d,p as e};
7
+ var e={name:"@redocly/cli",version:"2.62.0",description:"",license:"MIT",bin:{redocly:"bin/cli.js",openapi:"bin/cli.js"},type:"module",engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{build:"node ./scripts/build.mjs","prepare:publish-dir":"node ./scripts/prepare-publish-dir.mjs","clean:publish-dir":`node -e "require('fs').rmSync('.publish', {recursive:true, force:true})"`},publishConfig:{directory:".publish"},repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["linter","OpenAPI","Swagger","OpenAPI linter","Swagger linter","AsyncAPI linter","Arazzo linter","oas"],contributors:["Roman Hotsiy <roman@redocly.com> (https://redocly.com/)"],devDependencies:{"@modelcontextprotocol/sdk":"^1.32.1","@opentelemetry/exporter-trace-otlp-http":"0.219.0","@opentelemetry/resources":"2.8.0","@opentelemetry/sdk-trace-node":"2.8.0","@opentelemetry/semantic-conventions":"1.41.1","@redocly/cli-otel":"0.3.7","@redocly/client-generator":"0.5.1","@redocly/openapi-core":"2.62.0","@redocly/recheck":"2.62.0","@redocly/respect-core":"2.62.0","@redocly/reunite-integration":"2.62.0","@types/cookie":"0.6.0","@types/har-format":"^1.2.16","@types/react":"^17.0.0 || ^18.2.21 || ^19.2.16","@types/react-dom":"^17.0.0 || ^18.2.7 || ^19.2.3","@types/semver":"^7.5.0","@types/set-cookie-parser":"2.4.10","@types/yargs":"17.0.32",colorette:"^1.2.0",cookie:"^0.7.2",dotenv:"16.4.7",esbuild:"^0.28.0",glob:"^13.0.5",handlebars:"^4.7.9",react:"^17.0.0 || ^18.2.0 || ^19.2.7","react-dom":"^17.0.0 || ^18.2.0 || ^19.2.7",redoc:"2.5.4",semver:"^7.5.2","set-cookie-parser":"^2.3.5","styled-components":"6.4.2",typescript:"6.0.2",ulid:"^3.0.1",undici:"^6.29.0",yargs:"17.0.1"}};var{version:c,name:i,engines:s}=e,n=e.devDependencies.redoc,p="sha384-w447zOpYfw/1Tv/5AK9NfHTlQIqE3RVR6KY62jCyy9zNDgO64cMwGGP1Fj0zJVf5";export{c as a,i as b,s as c,n as d,p as e};
@@ -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}from"./6DO6IN4A.js";import{h as s,l as a}from"./3TBVUHVH.js";import"./LRUXN6H5.js";import{aa as t,ia as e,oa as i}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function y({argv:r,config:l,version:d}){let o=s(l,r.residency);try{let n=new a(d);r.verbose&&(e.info(`OAuth client initialized.
7
+ import{a as c}from"./6DO6IN4A.js";import{h as s,l as a}from"./5NOJ76EP.js";import"./LRUXN6H5.js";import{aa as t,ia as e,oa as i}from"./22EANOP2.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function y({argv:r,config:l,version:d}){let o=s(l,r.residency);try{let n=new a(d);r.verbose&&(e.info(`OAuth client initialized.
8
8
  `),e.info(`Local credentials file path: ${n.credentialsFilePath}
9
9
  `)),await n.login(o,c),e.output(t(`\u2705 Logged in
10
10
 
@@ -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 ee,b as te,f as ne,g as E,h as re}from"./V5CIDI6D.js";import{a as y}from"./WZXA5XPB.js";import{Aa as Z,P as W,V,c as x,ia as b,ka as Q,r as v,ra as Y,s as H,ta as T,u as J}from"./22EANOP2.js";import{b as A,c as G,k as D}from"./LD5MEXEL.js";import{mkdir as ct,readFile as ut,writeFile as dt}from"node:fs/promises";import{dirname as ke,parse as ft,resolve as R,sep as pt}from"node:path";function M(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./2KG4GEMM.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./GLOLLUKD.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./PSEWUH36.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":M("react"),"tanstack-query-vue":M("vue"),"tanstack-query-svelte":M("svelte"),"tanstack-query-solid":M("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./FAZWASU6.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./3QZ3M2JX.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./GJDVFWVH.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./ZH5HJBCG.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./GZ7EDJXV.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./6NGWHZCB.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function oe(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
7
+ import{a as ee,b as te,f as ne,g as E,h as re}from"./SS6PCAMM.js";import{a as y}from"./WZXA5XPB.js";import{Aa as Z,P as W,V,c as x,ia as b,ka as Q,r as v,ra as Y,s as H,ta as T,u as J}from"./22EANOP2.js";import{b as A,c as G,k as D}from"./LD5MEXEL.js";import{mkdir as ct,readFile as ut,writeFile as dt}from"node:fs/promises";import{dirname as ke,parse as ft,resolve as R,sep as pt}from"node:path";function M(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./NENSYJQB.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./75SLMDAN.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./OT7Y7FIM.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":M("react"),"tanstack-query-vue":M("vue"),"tanstack-query-svelte":M("svelte"),"tanstack-query-solid":M("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./4WO6ZSKT.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./2EP764NP.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./TF4PPK4N.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./T4Y6M5MJ.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./R2TPTKNR.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./ZYQDPQVA.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function oe(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
8
8
  `);let o=t.errorMode??"throw",i=t.dateType??"string";for(let a of e){let c=n.get(a);if(!c)throw new y(`Unknown generator: ${a}`);for(let d of c.requires??[])if(!s.has(d)){let f=[...new Set([d,...e])].map(m=>`--generator ${m}`).join(" ");throw new y(`The "${a}" generator requires the "${d}" generator. Add it, e.g. ${f}.`)}if(c.errorModes&&!c.errorModes.includes(o))throw new y(`The "${a}" generator does not support --error-mode "${o}" (supported: ${c.errorModes.join(", ")}).`);if(c.dateTypes&&!c.dateTypes.includes(i))throw new y(`The "${a}" generator requires --date-type ${c.dateTypes.join(" or ")} (got "${i}") so the runtime values match the generated types.`);let u={...t,outputMode:r};for(let[d,f]of Object.entries(c.notApplicable??{}))u[d]!==void 0&&b.warn(`generate-client: the "${a}" generator ignores ${d} \u2014 ${f}.
9
9
  `)}}function se(e,t,n){let r=new Map;for(let s of e){let o=t.get(s)?.options,i=n?.[s];if(o===void 0){i!==void 0&&b.warn(`generate-client: the "${s}" generator declares no options, so client.options.${s} is ignored.
10
10
  `),r.set(s,{});continue}r.set(s,ve(s,o,i))}return r}function ve(e,t,n){if(n!==void 0&&!x(n))throw new y(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},s=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!s.includes(i))throw new y(`The "${e}" generator got an unknown option "${i}". Declared options: ${s.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new y(`The "${e}" generator requires the "${i}" option.`);let o={...r};for(let[i,a]of Object.entries(t.properties)){if(o[i]===void 0){a.default!==void 0&&(o[i]=a.default);continue}let c=Se(a,o[i]);if(c!==void 0)throw new y(`The "${e}" generator's "${i}" ${c}.`)}return o}function Se(e,t){if("enum"in e)return e.enum.includes(t)?void 0:`must be one of: ${e.enum.join(", ")}`;if(e.type==="array"){let n=e.items.type;return Array.isArray(t)&&t.every(r=>typeof r===n)?void 0:`must be an array of ${n}`}return typeof t===e.type?void 0:`must be a ${e.type}`}import{isAbsolute as xe,resolve as qe}from"node:path";import{pathToFileURL as Pe}from"node:url";var Oe=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,s,o,i){return r?t?".jsx":".js":s&&(!o||!i)?n:s+o+"."+i.toLowerCase()+"js"}):e};async function ae(e,t={}){let n=new Map;for(let a of t.customGenerators??[])ce(n,a);let r=[];for(let a of e)r.push(await ie(a,n,t.configDir));let s=[],o=new Set,i=async a=>{if(!(s.includes(a)||o.has(a))){o.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in I)&&await i(await ie(c,n,t.configDir));o.delete(a),s.push(a)}};for(let a of r)await i(a);return{selected:s,registry:n}}async function ie(e,t,n){if(t.has(e))return e;let r=I[e];if(r!==void 0){let{load:o,...i}=r;return t.set(e,{...i,...await o()}),e}if(e==="sdk")throw new y('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let s=await je(e,n??process.cwd());return ce(t,s),s.name}function ce(e,t){if(!x(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new y("Invalid custom generator: expected an object with a non-empty string `name` and a `run` function (build one with `defineGenerator`).");if(e.has(t.name))throw new y(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=re(E,t.requiresGenerator);if(n===void 0)throw new y(`Generator "${t.name}" declares requiresGenerator "${t.requiresGenerator}", which is not a range we read. Use ^1.2.0, ~1.2.0, >=1.2.0, or an exact version.`);if(!n)throw new y(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${E}. Upgrade @redocly/cli if the generator is newer, or update the generator \u2014 \`redocly eject-generator <name> --update\` for an ejected file, or upgrade its package.`)}t.name in I&&b.warn(`generate-client: custom generator "${t.name}" takes over the built-in generator of the same name.