@redocly/cli 2.65.0 → 2.65.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/lib/chunks/{UE7IAPIP.js → 25STMLZM.js} +1 -1
  2. package/lib/chunks/{KKAYPMM3.js → 2AC4OXSZ.js} +1 -1
  3. package/lib/chunks/{BAIZWXC6.js → 2IWPVA32.js} +1 -1
  4. package/lib/chunks/{C462YNOX.js → 2Y42T65U.js} +1 -1
  5. package/lib/chunks/{ZB7MWGMD.js → 3JAAMD2R.js} +1 -1
  6. package/lib/chunks/{4K73EOV3.js → 4JADC334.js} +1 -1
  7. package/lib/chunks/{FGKVDZSD.js → 4ZSE2QKC.js} +1 -1
  8. package/lib/chunks/{YLLKDBIZ.js → 5LDTRSKM.js} +3 -3
  9. package/lib/chunks/{47H5P7DF.js → 5LKBZN75.js} +1 -1
  10. package/lib/chunks/{HNEOPZAP.js → 5UVEGDN5.js} +1 -1
  11. package/lib/chunks/{472CS7HK.js → 6IEALFNR.js} +1 -1
  12. package/lib/chunks/{6TFC2OYQ.js → 6O4EZZCB.js} +1 -1
  13. package/lib/chunks/{M2DYVAS3.js → 6OKAMFUS.js} +1 -1
  14. package/lib/chunks/{IFWW4AH6.js → 76L5Y4E5.js} +1 -1
  15. package/lib/chunks/{PUFMOTSK.js → 7HX75VPL.js} +1 -1
  16. package/lib/chunks/{2WJNLVFJ.js → 7XEJIRRE.js} +1 -1
  17. package/lib/chunks/{HQSXMF3M.js → AHV2L4AT.js} +1 -1
  18. package/lib/chunks/{IJJGUPFL.js → AVRP5K2W.js} +1 -1
  19. package/lib/chunks/{MQWGV2WY.js → BM3HLVGR.js} +1 -1
  20. package/lib/chunks/{5KWYBSEY.js → DLTGH5OY.js} +1 -1
  21. package/lib/chunks/{XIQZ6CQT.js → EGRWOCUZ.js} +1 -1
  22. package/lib/chunks/{7IN56VMG.js → F6CK2H55.js} +1 -1
  23. package/lib/chunks/FTJ2GLND.js +9 -0
  24. package/lib/chunks/{FRHR2DRO.js → GJJKLLSJ.js} +1 -1
  25. package/lib/chunks/{2XSAJEYO.js → GMPZCENU.js} +1 -1
  26. package/lib/chunks/{EIGOI65B.js → GPHT4S2M.js} +1 -1
  27. package/lib/chunks/{K6KXLY2V.js → GY5LIRXF.js} +1 -1
  28. package/lib/chunks/{A55KSVEI.js → HTZ66OYY.js} +1 -1
  29. package/lib/chunks/{N7JGYQGR.js → K7YR4ZCE.js} +1 -1
  30. package/lib/chunks/{7BZGNWGO.js → KTG4J5LM.js} +1 -1
  31. package/lib/chunks/{C6QQGZXT.js → L7EAVWQA.js} +1 -1
  32. package/lib/chunks/{JUZHXP62.js → LLF5CY3L.js} +1 -1
  33. package/lib/chunks/{6D4QQEWE.js → LMOHVXBG.js} +1 -1
  34. package/lib/chunks/{OD47UYXG.js → LVTNHX3K.js} +1 -1
  35. package/lib/chunks/{7Y45I5SU.js → M3F2P6PS.js} +1 -1
  36. package/lib/chunks/{ZCLACSBJ.js → M6USEZHV.js} +1 -1
  37. package/lib/chunks/{CBJ23L7Q.js → N7DGFIVS.js} +1 -1
  38. package/lib/chunks/{KIY6ZQFM.js → NCJ56PXB.js} +1 -1
  39. package/lib/chunks/{AAMQ6PF3.js → OAZXHMUB.js} +1 -1
  40. package/lib/chunks/{QV24OXH3.js → PDOJBUHH.js} +2 -2
  41. package/lib/chunks/{WDTMN7JE.js → PDRYPWBF.js} +1 -1
  42. package/lib/chunks/{SCB6ZITR.js → PFDVXHFS.js} +1 -1
  43. package/lib/chunks/{JIU326EH.js → PTPIZYEL.js} +2 -2
  44. package/lib/chunks/{TYX2MLO5.js → Q3SW35UY.js} +1 -1
  45. package/lib/chunks/{ME4RMLPZ.js → Q4UXM33T.js} +1 -1
  46. package/lib/chunks/{6D6SERR2.js → QET7LMPQ.js} +1 -1
  47. package/lib/chunks/{RR6N3VYB.js → QLVSL5ZF.js} +1 -1
  48. package/lib/chunks/{LUYLXWYZ.js → QRGB7OHQ.js} +1 -1
  49. package/lib/chunks/{J7YUB7EL.js → RC2SP4YD.js} +1 -1
  50. package/lib/chunks/{MWJKN6NG.js → SCSGALAM.js} +1 -1
  51. package/lib/chunks/{PO4VK5GM.js → SDI3BFVE.js} +1 -1
  52. package/lib/chunks/{S242M5IF.js → TNOMHRE3.js} +1 -1
  53. package/lib/chunks/{BWA2MZEG.js → TWAEUQN5.js} +1 -1
  54. package/lib/chunks/{ZGFTDVO4.js → UFQAPCO4.js} +1 -1
  55. package/lib/chunks/{B6HQPQVF.js → VAWGDT2W.js} +1 -1
  56. package/lib/chunks/{SEKSITHZ.js → VMZQPXC5.js} +1 -1
  57. package/lib/chunks/{U2GUGMK3.js → W7XDH65E.js} +1 -1
  58. package/lib/chunks/{B6V4SOCA.js → WJHTYCZL.js} +1 -1
  59. package/lib/chunks/{WUOVEP7D.js → XGUY3CME.js} +1 -1
  60. package/lib/chunks/{O7U2BX37.js → XLDZKMWY.js} +1 -1
  61. package/lib/chunks/{4BWADBBP.js → XLPP6YHU.js} +1 -1
  62. package/lib/chunks/{QJUYBSEZ.js → XVSKACRN.js} +1 -1
  63. package/lib/chunks/{2N5733QR.js → Y3UYQPDY.js} +1 -1
  64. package/lib/chunks/{T66YKREQ.js → YMEXZJK4.js} +1 -1
  65. package/lib/chunks/{VAPFU7OM.js → YUBO3M45.js} +2 -2
  66. package/lib/chunks/{SEYOG575.js → YW65CIDB.js} +1 -1
  67. package/lib/chunks/{SDQYWQUI.js → YWLFGM2W.js} +2 -2
  68. package/lib/chunks/{PBXLYXXR.js → Z3O5AH5W.js} +1 -1
  69. package/lib/chunks/{SMBH5JAE.js → Z4H5FLK2.js} +1 -1
  70. package/lib/chunks/{H2G6FSDS.js → ZHVZ22LO.js} +1 -1
  71. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  72. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  73. package/lib/eject-assets/generators/cli/index.ts +2 -2
  74. package/lib/eject-assets/generators/cli/render.ts +1 -1
  75. package/lib/eject-assets/generators/go/client.ts +1 -1
  76. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  77. package/lib/eject-assets/generators/go/index.ts +2 -2
  78. package/lib/eject-assets/generators/go/models.ts +1 -1
  79. package/lib/eject-assets/generators/go/naming.ts +1 -1
  80. package/lib/eject-assets/generators/go/operations.ts +1 -1
  81. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  82. package/lib/eject-assets/generators/go/types.ts +1 -1
  83. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  84. package/lib/eject-assets/generators/mock/index.ts +2 -2
  85. package/lib/eject-assets/generators/mock/render.ts +1 -1
  86. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  87. package/lib/eject-assets/generators/mock/values.ts +1 -1
  88. package/lib/eject-assets/generators/php/client.ts +1 -1
  89. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  90. package/lib/eject-assets/generators/php/index.ts +2 -2
  91. package/lib/eject-assets/generators/php/models.ts +1 -1
  92. package/lib/eject-assets/generators/php/naming.ts +1 -1
  93. package/lib/eject-assets/generators/php/operations.ts +1 -1
  94. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  95. package/lib/eject-assets/generators/php/types.ts +1 -1
  96. package/lib/eject-assets/generators/python/client.ts +1 -1
  97. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  98. package/lib/eject-assets/generators/python/index.ts +2 -2
  99. package/lib/eject-assets/generators/python/models.ts +1 -1
  100. package/lib/eject-assets/generators/python/naming.ts +1 -1
  101. package/lib/eject-assets/generators/python/operations.ts +1 -1
  102. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  103. package/lib/eject-assets/generators/python/types.ts +1 -1
  104. package/lib/eject-assets/generators/swr/index.ts +2 -2
  105. package/lib/eject-assets/generators/swr/render.ts +1 -1
  106. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  107. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  108. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  109. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  110. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  111. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  112. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  113. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  114. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  115. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  116. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  117. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  118. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  119. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  120. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  121. package/lib/eject-assets/generators/zod/index.ts +2 -2
  122. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  123. package/lib/index.js +5 -5
  124. package/package.json +1 -1
  125. package/lib/chunks/5BB2E772.js +0 -9
@@ -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 p,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"./PBXLYXXR.js";import{a as B,e as C,g as G}from"./JIU326EH.js";import{a}from"./WZXA5XPB.js";import"./VAPFU7OM.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o}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,g as deref,i as discriminatorCases,m as docText,l as enumValues,h as flattenAllOf,I as generateClient,D as groupSlug,o as headerCoerceType,e as identifierFor,u as isBinaryContentType,s as isMultipartBody,j as isNullable,t as isUntypedMultipartBody,q as jsonSuccessSchema,F as mergeConfig,x as paginationItemSchema,p as paginationRuleFor,y as renderReferencePage,n as resolveSchemaPointer,n as schemaAtPointer,w as securityRequirements,v as serverUrlParts,r as sseResponse,f as uniqueIdentifiers,k as unwrapNullable};
7
+ import{a as p,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"./Z3O5AH5W.js";import{a as B,e as C,g as G}from"./PTPIZYEL.js";import{a}from"./WZXA5XPB.js";import"./YUBO3M45.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o}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,g as deref,i as discriminatorCases,m as docText,l as enumValues,h as flattenAllOf,I as generateClient,D as groupSlug,o as headerCoerceType,e as identifierFor,u as isBinaryContentType,s as isMultipartBody,j as isNullable,t as isUntypedMultipartBody,q as jsonSuccessSchema,F as mergeConfig,x as paginationItemSchema,p as paginationRuleFor,y as renderReferencePage,n as resolveSchemaPointer,n as schemaAtPointer,w as securityRequirements,v as serverUrlParts,r as sseResponse,f as uniqueIdentifiers,k 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{O as ks,P as $s,X as Np,Y as jp,ba as ho,c as Se,ca as go,ga as hr,ia as _e,oa as ye,pa as Ps}from"./VAPFU7OM.js";import"./NEWT5A6S.js";import{a as Oe,c as ae,d as mo,e as mr}from"./RFWIIJFG.js";var ql=ae((kb,Ul)=>{Ul.exports=Ll;Ll.sync=Mh;var Ml=Oe("fs");function jh(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var o=0;o<r.length;o++){var n=r[o].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}function Dl(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:jh(t,r)}function Ll(e,t,r){Ml.stat(e,function(o,n){r(o,o?!1:Dl(n,e,t))})}function Mh(e,t){return Dl(Ml.statSync(e),e,t)}});var Wl=ae(($b,Jl)=>{Jl.exports=Vl;Vl.sync=Dh;var Fl=Oe("fs");function Vl(e,t,r){Fl.stat(e,function(o,n){r(o,o?!1:Hl(n,t))})}function Dh(e,t){return Hl(Fl.statSync(e),t)}function Hl(e,t){return e.isFile()&&Lh(e,t)}function Lh(e,t){var r=e.mode,o=e.uid,n=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),p=a|c,d=r&u||r&c&&n===i||r&a&&o===s||r&p&&s===0;return d}});var Gl=ae((Tb,Bl)=>{var Pb=Oe("fs"),co;process.platform==="win32"||global.TESTING_WINDOWS?co=ql():co=Wl();Bl.exports=ls;ls.sync=Uh;function ls(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,n){ls(e,t||{},function(s,i){s?n(s):o(i)})})}co(e,t||{},function(o,n){o&&(o.code==="EACCES"||t&&t.ignoreErrors)&&(o=null,n=!1),r(o,n)})}function Uh(e,t){try{return co.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var rp=ae((Rb,tp)=>{var St=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Kl=Oe("path"),qh=St?";":":",Xl=Gl(),Yl=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ql=(e,t)=>{let r=t.colon||qh,o=e.match(/\//)||St&&e.match(/\\/)?[""]:[...St?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],n=St?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=St?n.split(r):[""];return St&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:o,pathExt:s,pathExtExe:n}},ep=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:o,pathExt:n,pathExtExe:s}=Ql(e,t),i=[],a=u=>new Promise((p,d)=>{if(u===o.length)return t.all&&i.length?p(i):d(Yl(e));let m=o[u],h=/^".*"$/.test(m)?m.slice(1,-1):m,_=Kl.join(h,e),w=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+_:_;p(c(w,u,0))}),c=(u,p,d)=>new Promise((m,h)=>{if(d===n.length)return m(a(p+1));let _=n[d];Xl(u+_,{pathExt:s},(w,v)=>{if(!w&&v)if(t.all)i.push(u+_);else return m(u+_);return m(c(u,p,d+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},Fh=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:o,pathExtExe:n}=Ql(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Kl.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let d=0;d<o.length;d++){let m=p+o[d];try{if(Xl.sync(m,{pathExt:n}))if(t.all)s.push(m);else return m}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Yl(e)};tp.exports=ep;ep.sync=Fh});var np=ae((Eb,ps)=>{"use strict";var op=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};ps.exports=op;ps.exports.default=op});var cp=ae((Cb,ap)=>{"use strict";var sp=Oe("path"),Vh=rp(),Hh=np();function ip(e,t){let r=e.options.env||process.env,o=process.cwd(),n=e.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=Vh.sync(e.command,{path:r[Hh({env:r})],pathExt:t?sp.delimiter:void 0})}catch{}finally{s&&process.chdir(o)}return i&&(i=sp.resolve(n?e.options.cwd:"",i)),i}function Jh(e){return ip(e)||ip(e,!0)}ap.exports=Jh});var up=ae((Ib,fs)=>{"use strict";var ds=/([()\][%!^"`<>&|;, *?])/g;function Wh(e){return e=e.replace(ds,"^$1"),e}function Bh(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(ds,"^$1"),t&&(e=e.replace(ds,"^$1")),e}fs.exports.command=Wh;fs.exports.argument=Bh});var pp=ae((Ob,lp)=>{"use strict";lp.exports=/^#!(.*)/});var fp=ae((Zb,dp)=>{"use strict";var Gh=pp();dp.exports=(e="")=>{let t=e.match(Gh);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?o:o?`${n} ${o}`:n}});var hp=ae((Ab,mp)=>{"use strict";var ms=Oe("fs"),Kh=fp();function Xh(e){let r=Buffer.alloc(150),o;try{o=ms.openSync(e,"r"),ms.readSync(o,r,0,150,0),ms.closeSync(o)}catch{}return Kh(r.toString())}mp.exports=Xh});var xp=ae((Nb,yp)=>{"use strict";var Yh=Oe("path"),gp=cp(),_p=up(),Qh=hp(),eg=process.platform==="win32",tg=/\.(?:com|exe)$/i,rg=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function og(e){e.file=gp(e);let t=e.file&&Qh(e.file);return t?(e.args.unshift(e.file),e.command=t,gp(e)):e.file}function ng(e){if(!eg)return e;let t=og(e),r=!tg.test(t);if(e.options.forceShell||r){let o=rg.test(t);e.command=Yh.normalize(e.command),e.command=_p.command(e.command),e.args=e.args.map(s=>_p.argument(s,o));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function sg(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let o={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?o:ng(o)}yp.exports=sg});var vp=ae((jb,wp)=>{"use strict";var hs=process.platform==="win32";function gs(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function ig(e,t){if(!hs)return;let r=e.emit;e.emit=function(o,n){if(o==="exit"){let s=zp(n,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function zp(e,t){return hs&&e===1&&!t.file?gs(t.original,"spawn"):null}function ag(e,t){return hs&&e===1&&!t.file?gs(t.original,"spawnSync"):null}wp.exports={hookChildProcess:ig,verifyENOENT:zp,verifyENOENTSync:ag,notFoundError:gs}});var kp=ae((Mb,kt)=>{"use strict";var bp=Oe("child_process"),_s=xp(),ys=vp();function Sp(e,t,r){let o=_s(e,t,r),n=bp.spawn(o.command,o.args,o.options);return ys.hookChildProcess(n,o),n}function cg(e,t,r){let o=_s(e,t,r),n=bp.spawnSync(o.command,o.args,o.options);return n.error=n.error||ys.verifyENOENTSync(n.status,o),n}kt.exports=Sp;kt.exports.spawn=Sp;kt.exports.sync=cg;kt.exports._parse=_s;kt.exports._enoent=ys});var Cp=ae(zs=>{"use strict";var Tp=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,mg=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Rp=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,hg=/\\([\u000b\u0020-\u00ff])/g,gg=/([\\"])/g,Ep=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;zs.format=_g;zs.parse=yg;function _g(e){if(!e||typeof e!="object")throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!Ep.test(r))throw new TypeError("invalid type");var o=r;if(t&&typeof t=="object")for(var n,s=Object.keys(t).sort(),i=0;i<s.length;i++){if(n=s[i],!Rp.test(n))throw new TypeError("invalid parameter name");o+="; "+n+"="+zg(t[n])}return o}function yg(e){if(!e)throw new TypeError("argument string is required");var t=typeof e=="object"?xg(e):e;if(typeof t!="string")throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),o=r!==-1?t.slice(0,r).trim():t.trim();if(!Ep.test(o))throw new TypeError("invalid media type");var n=new wg(o.toLowerCase());if(r!==-1){var s,i,a;for(Tp.lastIndex=r;i=Tp.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,s=i[1].toLowerCase(),a=i[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(hg,"$1"))),n.parameters[s]=a}if(r!==t.length)throw new TypeError("invalid parameter format")}return n}function xg(e){var t;if(typeof e.getHeader=="function"?t=e.getHeader("content-type"):typeof e.headers=="object"&&(t=e.headers&&e.headers["content-type"]),typeof t!="string")throw new TypeError("content-type header is missing from object");return t}function zg(e){var t=String(e);if(Rp.test(t))return t;if(t.length>0&&!mg.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(gg,"\\$1")+'"'}function wg(e){this.parameters=Object.create(null),this.type=e}});import{existsSync as Pg,mkdirSync as Tg,readFileSync as Rg,writeFileSync as Eg}from"node:fs";import{dirname as Cg}from"node:path";import{isDeepStrictEqual as Pt}from"node:util";function $t(e){let t=new Map;for(let r of Array.isArray(e)?e:[])Se(r)&&t.set(r.name,r);return t}function gr(e,t,r){let o=$t(t);return e.map(n=>{let s=o.get(n.name),i={};for(let a of r)s&&s[a]!==void 0&&(i[a]=s[a]);return{...n,...i}})}function Mp(e,t){let r=$t(t);return gr(e,t,["tags","security"]).map(o=>{if(!o.arguments)return o;let n=r.get(o.name)?.arguments;return{...o,arguments:gr(o.arguments,n,["example"])}})}function _o(e,t,r){let o=e??{openapi:"3.1.0",info:{title:t.serverInfo?.title||t.serverInfo?.name||"MCP API",...t.instructions?{description:t.instructions}:{},version:t.serverInfo?.version||"1.0.0"},paths:{}},n=Se(o["x-mcp"])?o["x-mcp"]:{},s={...n};if(t.protocolVersion&&(s.protocolVersion=t.protocolVersion),r){let i=Array.isArray(s.servers)?s.servers:[];i.some(a=>Se(a)&&a.url===r)||i.push({url:r}),s.servers=i}return t.capabilities&&(s.capabilities=t.capabilities),t.capabilities?.tools?s.tools=gr(t.tools,n.tools,["tags","security"]):delete s.tools,t.capabilities?.prompts?s.prompts=Mp(t.prompts,n.prompts):delete s.prompts,t.capabilities?.resources?s.resources=gr(t.resources,n.resources,["tags","security"]):delete s.resources,o["x-mcp"]=s,o}function Dp(e,t){let r=$t(e),o=$t(t),n=[...o.keys()].filter(c=>!r.has(c)),s=[...r.keys()].filter(c=>!o.has(c)),i=[...o.keys()].filter(c=>r.has(c)&&!Pt(r.get(c),o.get(c))),a=[];return n.length>0&&a.push(`added: ${n.join(", ")}`),s.length>0&&a.push(`removed: ${s.join(", ")}`),i.length>0&&a.push(`changed: ${i.join(", ")}`),a.length>0?a.join("; "):void 0}function Ts(e,t){if(Pt(e,t))return[];let r=Se(e["x-mcp"])?e["x-mcp"]:{},o=Se(t["x-mcp"])?t["x-mcp"]:{},n=[];for(let s of["tools","prompts","resources"]){let i=Dp(r[s],o[s]);i&&n.push(`${s} - ${i}`)}return Pt(r.protocolVersion,o.protocolVersion)||n.push(`protocolVersion - ${r.protocolVersion??"not set"} -> ${o.protocolVersion}`),Pt(r.capabilities,o.capabilities)||n.push("capabilities changed"),Pt(r.servers,o.servers)||n.push("servers - the MCP server URL is not listed"),n.length===0&&n.push("x-mcp changed"),n}var Rs,yo=Object.freeze({status:"aborted"});function f(e,t,r){function o(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=i.prototype,p=Object.keys(u);for(let d=0;d<p.length;d++){let m=p[d];m in a||(a[m]=u[m].bind(a))}}let n=r?.Parent??Object;class s extends n{}Object.defineProperty(s,"name",{value:e});function i(a){var c;let u=r?.Parent?new s:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let p of u._zod.deferred)p();return u}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}var ve=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},rt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Rs=globalThis).__zod_globalConfig??(Rs.__zod_globalConfig={});var ot=globalThis.__zod_globalConfig;function ce(e){return e&&Object.assign(ot,e),ot}var E={};mo(E,{BIGINT_FORMAT_RANGES:()=>Os,Class:()=>zo,NUMBER_FORMAT_RANGES:()=>$o,aborted:()=>Ne,allowsEval:()=>bo,assert:()=>Vp,assertEqual:()=>Lp,assertIs:()=>qp,assertNever:()=>Fp,assertNotEqual:()=>Up,assignProp:()=>Ze,base64ToUint8Array:()=>As,base64urlToUint8Array:()=>ad,cached:()=>st,captureStackTrace:()=>xr,cleanEnum:()=>id,cleanRegex:()=>Ct,clone:()=>fe,cloneDef:()=>Jp,createTransparentProxy:()=>Yp,defineLazy:()=>Z,esc:()=>yr,escapeRegex:()=>$e,explicitlyAborted:()=>Po,extend:()=>td,finalizeIssue:()=>me,floatSafeRemainder:()=>wo,getElementAtPath:()=>Wp,getEnumValues:()=>Rt,getLengthableOrigin:()=>It,getParsedType:()=>Xp,getSizableOrigin:()=>Zs,hexToUint8Array:()=>ud,isObject:()=>Ve,isPlainObject:()=>Ae,issue:()=>it,joinValues:()=>_r,jsonStringifyReplacer:()=>nt,merge:()=>od,mergeDefs:()=>ke,normalizeParams:()=>S,nullish:()=>Et,numKeys:()=>Kp,objectClone:()=>Hp,omit:()=>ed,optionalKeys:()=>ko,parsedType:()=>To,partial:()=>nd,pick:()=>Qp,prefixIssues:()=>Pe,primitiveTypes:()=>Is,promiseAllObject:()=>Bp,propertyKeyTypes:()=>So,randomString:()=>Gp,required:()=>sd,safeExtend:()=>rd,shallowClone:()=>Cs,slugify:()=>vo,stringifyPrimitive:()=>zr,uint8ArrayToBase64:()=>Ns,uint8ArrayToBase64url:()=>cd,uint8ArrayToHex:()=>ld,unwrapMessage:()=>Tt});function Lp(e){return e}function Up(e){return e}function qp(e){}function Fp(e){throw new Error("Unexpected value in exhaustive check")}function Vp(e){}function Rt(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function _r(e,t="|"){return e.map(r=>zr(r)).join(t)}function nt(e,t){return typeof t=="bigint"?t.toString():t}function st(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Et(e){return e==null}function Ct(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function wo(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Es=Symbol("evaluating");function Z(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Es)return o===void 0&&(o=Es,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Hp(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ze(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ke(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function Jp(e){return ke(e._zod.def)}function Wp(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function Bp(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let s=0;s<t.length;s++)n[t[s]]=o[s];return n})}function Gp(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function yr(e){return JSON.stringify(e)}function vo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var xr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var bo=st(()=>{if(ot.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ae(e){if(Ve(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ve(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Cs(e){return Ae(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Kp(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Xp=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},So=new Set(["string","number","symbol"]),Is=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function S(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Yp(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,s){return t??(t=e()),Reflect.set(t,o,n,s)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function zr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ko(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var $o={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Os={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Qp(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=ke(e._zod.def,{get shape(){let i={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Ze(this,"shape",i),i},checks:[]});return fe(e,s)}function ed(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=ke(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Ze(this,"shape",i),i},checks:[]});return fe(e,s)}function td(e,t){if(!Ae(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let s=e._zod.def.shape;for(let i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=ke(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t};return Ze(this,"shape",s),s}});return fe(e,n)}function rd(e,t){if(!Ae(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ke(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ze(this,"shape",o),o}});return fe(e,r)}function od(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=ke(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ze(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return fe(e,r)}function nd(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let i=ke(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Ze(this,"shape",c),c},checks:[]});return fe(t,i)}function sd(e,t,r){let o=ke(t._zod.def,{get shape(){let n=t._zod.def.shape,s={...n};if(r)for(let i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(let i in n)s[i]=new e({type:"nonoptional",innerType:n[i]});return Ze(this,"shape",s),s}});return fe(t,o)}function Ne(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Po(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Pe(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Tt(e){return typeof e=="string"?e:e?.message}function me(e,t,r){let o=e.message?e.message:Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input",{inst:n,continue:s,input:i,...a}=e;return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=i),a}function Zs(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function It(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function To(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function it(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function id(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function As(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Ns(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function ad(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return As(t+r)}function cd(e){return Ns(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ud(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function ld(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var zo=class{constructor(...t){}};var js=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wr=f("$ZodError",js),Ro=f("$ZodError",js,{Parent:Error});function Eo(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Co(e,t=r=>r.message){let r={_errors:[]},o=(n,s=[])=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")o({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")o({issues:i.issues},[...s,...i.path]);else{let a=[...s,...i.path];if(a.length===0)r._errors.push(t(i));else{let c=r,u=0;for(;u<a.length;){let p=a[u];u===a.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(t(i))):c[p]=c[p]||{_errors:[]},c=c[p],u++}}}};return o(e),r}var vr=e=>(t,r,o,n)=>{let s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new ve;if(i.issues.length){let a=new(n?.Err??e)(i.issues.map(c=>me(c,s,ce())));throw xr(a,n?.callee),a}return i.value};var br=e=>async(t,r,o,n)=>{let s=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){let a=new(n?.Err??e)(i.issues.map(c=>me(c,s,ce())));throw xr(a,n?.callee),a}return i.value};var Ot=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},n);if(s instanceof Promise)throw new ve;return s.issues.length?{success:!1,error:new(e??wr)(s.issues.map(i=>me(i,n,ce())))}:{success:!0,data:s.value}},Zt=Ot(Ro),At=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},n);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>me(i,n,ce())))}:{success:!0,data:s.value}},Sr=At(Ro),Ms=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return vr(e)(t,r,n)};var Ds=e=>(t,r,o)=>vr(e)(t,r,o);var Ls=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return br(e)(t,r,n)};var Us=e=>async(t,r,o)=>br(e)(t,r,o);var qs=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Ot(e)(t,r,n)};var Fs=e=>(t,r,o)=>Ot(e)(t,r,o);var Vs=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return At(e)(t,r,n)};var Hs=e=>async(t,r,o)=>At(e)(t,r,o);var Js=/^[cC][0-9a-z]{6,}$/,Ws=/^[0-9a-z]+$/,Bs=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gs=/^[0-9a-vA-V]{20}$/,Ks=/^[A-Za-z0-9]{27}$/,Xs=/^[a-zA-Z0-9_-]{21}$/,Ys=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Qs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Io=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;var ei=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var dd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ti(){return new RegExp(dd,"u")}var ri=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var ni=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,si=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ii=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Oo=/^[A-Za-z0-9_-]*$/;var ai=/^https?$/,ci=/^\+[1-9]\d{6,14}$/,ui="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",li=new RegExp(`^${ui}$`);function pi(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function di(e){return new RegExp(`^${pi(e)}$`)}function fi(e){let t=pi({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${ui}T(?:${o})$`)}var mi=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},hi=/^-?\d+n?$/,gi=/^-?\d+$/,Zo=/^-?\d+(?:\.\d+)?$/,_i=/^(?:true|false)$/i,yi=/^null$/i;var xi=/^[^A-Z]*$/,zi=/^[^a-z]*$/;var Q=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),wi={number:"number",bigint:"bigint",object:"date"},Ao=f("$ZodCheckLessThan",(e,t)=>{Q.init(e,t);let r=wi[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,s=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),No=f("$ZodCheckGreaterThan",(e,t)=>{Q.init(e,t);let r=wi[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,s=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vi=f("$ZodCheckMultipleOf",(e,t)=>{Q.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):wo(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),bi=f("$ZodCheckNumberFormat",(e,t)=>{Q.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,s]=$o[t.format];e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,a.minimum=n,a.maximum=s,r&&(a.pattern=gi)}),e._zod.check=i=>{let a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}a<n&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}});var Si=f("$ZodCheckMaxLength",(e,t)=>{var r;Q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Et(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let i=It(n);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ki=f("$ZodCheckMinLength",(e,t)=>{var r;Q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Et(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let i=It(n);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),$i=f("$ZodCheckLengthEquals",(e,t)=>{var r;Q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Et(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,s=n.length;if(s===t.length)return;let i=It(n),a=s>t.length;o.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),jt=f("$ZodCheckStringFormat",(e,t)=>{var r,o;Q.init(e,t),e._zod.onattach.push(n=>{let s=n._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Pi=f("$ZodCheckRegex",(e,t)=>{jt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ti=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=xi),jt.init(e,t)}),Ri=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=zi),jt.init(e,t)}),Ei=f("$ZodCheckIncludes",(e,t)=>{Q.init(e,t);let r=$e(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ci=f("$ZodCheckStartsWith",(e,t)=>{Q.init(e,t);let r=new RegExp(`^${$e(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Ii=f("$ZodCheckEndsWith",(e,t)=>{Q.init(e,t);let r=new RegExp(`.*${$e(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var Oi=f("$ZodCheckOverwrite",(e,t)=>{Q.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var kr=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
7
+ import{O as ks,P as $s,X as Np,Y as jp,ba as ho,c as Se,ca as go,ga as hr,ia as _e,oa as ye,pa as Ps}from"./YUBO3M45.js";import"./NEWT5A6S.js";import{a as Oe,c as ae,d as mo,e as mr}from"./RFWIIJFG.js";var ql=ae((kb,Ul)=>{Ul.exports=Ll;Ll.sync=Mh;var Ml=Oe("fs");function jh(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var o=0;o<r.length;o++){var n=r[o].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}function Dl(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:jh(t,r)}function Ll(e,t,r){Ml.stat(e,function(o,n){r(o,o?!1:Dl(n,e,t))})}function Mh(e,t){return Dl(Ml.statSync(e),e,t)}});var Wl=ae(($b,Jl)=>{Jl.exports=Vl;Vl.sync=Dh;var Fl=Oe("fs");function Vl(e,t,r){Fl.stat(e,function(o,n){r(o,o?!1:Hl(n,t))})}function Dh(e,t){return Hl(Fl.statSync(e),t)}function Hl(e,t){return e.isFile()&&Lh(e,t)}function Lh(e,t){var r=e.mode,o=e.uid,n=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),p=a|c,d=r&u||r&c&&n===i||r&a&&o===s||r&p&&s===0;return d}});var Gl=ae((Tb,Bl)=>{var Pb=Oe("fs"),co;process.platform==="win32"||global.TESTING_WINDOWS?co=ql():co=Wl();Bl.exports=ls;ls.sync=Uh;function ls(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,n){ls(e,t||{},function(s,i){s?n(s):o(i)})})}co(e,t||{},function(o,n){o&&(o.code==="EACCES"||t&&t.ignoreErrors)&&(o=null,n=!1),r(o,n)})}function Uh(e,t){try{return co.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var rp=ae((Rb,tp)=>{var St=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Kl=Oe("path"),qh=St?";":":",Xl=Gl(),Yl=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ql=(e,t)=>{let r=t.colon||qh,o=e.match(/\//)||St&&e.match(/\\/)?[""]:[...St?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],n=St?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=St?n.split(r):[""];return St&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:o,pathExt:s,pathExtExe:n}},ep=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:o,pathExt:n,pathExtExe:s}=Ql(e,t),i=[],a=u=>new Promise((p,d)=>{if(u===o.length)return t.all&&i.length?p(i):d(Yl(e));let m=o[u],h=/^".*"$/.test(m)?m.slice(1,-1):m,_=Kl.join(h,e),w=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+_:_;p(c(w,u,0))}),c=(u,p,d)=>new Promise((m,h)=>{if(d===n.length)return m(a(p+1));let _=n[d];Xl(u+_,{pathExt:s},(w,v)=>{if(!w&&v)if(t.all)i.push(u+_);else return m(u+_);return m(c(u,p,d+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},Fh=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:o,pathExtExe:n}=Ql(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Kl.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let d=0;d<o.length;d++){let m=p+o[d];try{if(Xl.sync(m,{pathExt:n}))if(t.all)s.push(m);else return m}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Yl(e)};tp.exports=ep;ep.sync=Fh});var np=ae((Eb,ps)=>{"use strict";var op=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};ps.exports=op;ps.exports.default=op});var cp=ae((Cb,ap)=>{"use strict";var sp=Oe("path"),Vh=rp(),Hh=np();function ip(e,t){let r=e.options.env||process.env,o=process.cwd(),n=e.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=Vh.sync(e.command,{path:r[Hh({env:r})],pathExt:t?sp.delimiter:void 0})}catch{}finally{s&&process.chdir(o)}return i&&(i=sp.resolve(n?e.options.cwd:"",i)),i}function Jh(e){return ip(e)||ip(e,!0)}ap.exports=Jh});var up=ae((Ib,fs)=>{"use strict";var ds=/([()\][%!^"`<>&|;, *?])/g;function Wh(e){return e=e.replace(ds,"^$1"),e}function Bh(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(ds,"^$1"),t&&(e=e.replace(ds,"^$1")),e}fs.exports.command=Wh;fs.exports.argument=Bh});var pp=ae((Ob,lp)=>{"use strict";lp.exports=/^#!(.*)/});var fp=ae((Zb,dp)=>{"use strict";var Gh=pp();dp.exports=(e="")=>{let t=e.match(Gh);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?o:o?`${n} ${o}`:n}});var hp=ae((Ab,mp)=>{"use strict";var ms=Oe("fs"),Kh=fp();function Xh(e){let r=Buffer.alloc(150),o;try{o=ms.openSync(e,"r"),ms.readSync(o,r,0,150,0),ms.closeSync(o)}catch{}return Kh(r.toString())}mp.exports=Xh});var xp=ae((Nb,yp)=>{"use strict";var Yh=Oe("path"),gp=cp(),_p=up(),Qh=hp(),eg=process.platform==="win32",tg=/\.(?:com|exe)$/i,rg=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function og(e){e.file=gp(e);let t=e.file&&Qh(e.file);return t?(e.args.unshift(e.file),e.command=t,gp(e)):e.file}function ng(e){if(!eg)return e;let t=og(e),r=!tg.test(t);if(e.options.forceShell||r){let o=rg.test(t);e.command=Yh.normalize(e.command),e.command=_p.command(e.command),e.args=e.args.map(s=>_p.argument(s,o));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function sg(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let o={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?o:ng(o)}yp.exports=sg});var vp=ae((jb,wp)=>{"use strict";var hs=process.platform==="win32";function gs(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function ig(e,t){if(!hs)return;let r=e.emit;e.emit=function(o,n){if(o==="exit"){let s=zp(n,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function zp(e,t){return hs&&e===1&&!t.file?gs(t.original,"spawn"):null}function ag(e,t){return hs&&e===1&&!t.file?gs(t.original,"spawnSync"):null}wp.exports={hookChildProcess:ig,verifyENOENT:zp,verifyENOENTSync:ag,notFoundError:gs}});var kp=ae((Mb,kt)=>{"use strict";var bp=Oe("child_process"),_s=xp(),ys=vp();function Sp(e,t,r){let o=_s(e,t,r),n=bp.spawn(o.command,o.args,o.options);return ys.hookChildProcess(n,o),n}function cg(e,t,r){let o=_s(e,t,r),n=bp.spawnSync(o.command,o.args,o.options);return n.error=n.error||ys.verifyENOENTSync(n.status,o),n}kt.exports=Sp;kt.exports.spawn=Sp;kt.exports.sync=cg;kt.exports._parse=_s;kt.exports._enoent=ys});var Cp=ae(zs=>{"use strict";var Tp=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,mg=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,Rp=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,hg=/\\([\u000b\u0020-\u00ff])/g,gg=/([\\"])/g,Ep=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;zs.format=_g;zs.parse=yg;function _g(e){if(!e||typeof e!="object")throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!Ep.test(r))throw new TypeError("invalid type");var o=r;if(t&&typeof t=="object")for(var n,s=Object.keys(t).sort(),i=0;i<s.length;i++){if(n=s[i],!Rp.test(n))throw new TypeError("invalid parameter name");o+="; "+n+"="+zg(t[n])}return o}function yg(e){if(!e)throw new TypeError("argument string is required");var t=typeof e=="object"?xg(e):e;if(typeof t!="string")throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),o=r!==-1?t.slice(0,r).trim():t.trim();if(!Ep.test(o))throw new TypeError("invalid media type");var n=new wg(o.toLowerCase());if(r!==-1){var s,i,a;for(Tp.lastIndex=r;i=Tp.exec(t);){if(i.index!==r)throw new TypeError("invalid parameter format");r+=i[0].length,s=i[1].toLowerCase(),a=i[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(hg,"$1"))),n.parameters[s]=a}if(r!==t.length)throw new TypeError("invalid parameter format")}return n}function xg(e){var t;if(typeof e.getHeader=="function"?t=e.getHeader("content-type"):typeof e.headers=="object"&&(t=e.headers&&e.headers["content-type"]),typeof t!="string")throw new TypeError("content-type header is missing from object");return t}function zg(e){var t=String(e);if(Rp.test(t))return t;if(t.length>0&&!mg.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(gg,"\\$1")+'"'}function wg(e){this.parameters=Object.create(null),this.type=e}});import{existsSync as Pg,mkdirSync as Tg,readFileSync as Rg,writeFileSync as Eg}from"node:fs";import{dirname as Cg}from"node:path";import{isDeepStrictEqual as Pt}from"node:util";function $t(e){let t=new Map;for(let r of Array.isArray(e)?e:[])Se(r)&&t.set(r.name,r);return t}function gr(e,t,r){let o=$t(t);return e.map(n=>{let s=o.get(n.name),i={};for(let a of r)s&&s[a]!==void 0&&(i[a]=s[a]);return{...n,...i}})}function Mp(e,t){let r=$t(t);return gr(e,t,["tags","security"]).map(o=>{if(!o.arguments)return o;let n=r.get(o.name)?.arguments;return{...o,arguments:gr(o.arguments,n,["example"])}})}function _o(e,t,r){let o=e??{openapi:"3.1.0",info:{title:t.serverInfo?.title||t.serverInfo?.name||"MCP API",...t.instructions?{description:t.instructions}:{},version:t.serverInfo?.version||"1.0.0"},paths:{}},n=Se(o["x-mcp"])?o["x-mcp"]:{},s={...n};if(t.protocolVersion&&(s.protocolVersion=t.protocolVersion),r){let i=Array.isArray(s.servers)?s.servers:[];i.some(a=>Se(a)&&a.url===r)||i.push({url:r}),s.servers=i}return t.capabilities&&(s.capabilities=t.capabilities),t.capabilities?.tools?s.tools=gr(t.tools,n.tools,["tags","security"]):delete s.tools,t.capabilities?.prompts?s.prompts=Mp(t.prompts,n.prompts):delete s.prompts,t.capabilities?.resources?s.resources=gr(t.resources,n.resources,["tags","security"]):delete s.resources,o["x-mcp"]=s,o}function Dp(e,t){let r=$t(e),o=$t(t),n=[...o.keys()].filter(c=>!r.has(c)),s=[...r.keys()].filter(c=>!o.has(c)),i=[...o.keys()].filter(c=>r.has(c)&&!Pt(r.get(c),o.get(c))),a=[];return n.length>0&&a.push(`added: ${n.join(", ")}`),s.length>0&&a.push(`removed: ${s.join(", ")}`),i.length>0&&a.push(`changed: ${i.join(", ")}`),a.length>0?a.join("; "):void 0}function Ts(e,t){if(Pt(e,t))return[];let r=Se(e["x-mcp"])?e["x-mcp"]:{},o=Se(t["x-mcp"])?t["x-mcp"]:{},n=[];for(let s of["tools","prompts","resources"]){let i=Dp(r[s],o[s]);i&&n.push(`${s} - ${i}`)}return Pt(r.protocolVersion,o.protocolVersion)||n.push(`protocolVersion - ${r.protocolVersion??"not set"} -> ${o.protocolVersion}`),Pt(r.capabilities,o.capabilities)||n.push("capabilities changed"),Pt(r.servers,o.servers)||n.push("servers - the MCP server URL is not listed"),n.length===0&&n.push("x-mcp changed"),n}var Rs,yo=Object.freeze({status:"aborted"});function f(e,t,r){function o(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=i.prototype,p=Object.keys(u);for(let d=0;d<p.length;d++){let m=p[d];m in a||(a[m]=u[m].bind(a))}}let n=r?.Parent??Object;class s extends n{}Object.defineProperty(s,"name",{value:e});function i(a){var c;let u=r?.Parent?new s:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let p of u._zod.deferred)p();return u}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}var ve=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},rt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Rs=globalThis).__zod_globalConfig??(Rs.__zod_globalConfig={});var ot=globalThis.__zod_globalConfig;function ce(e){return e&&Object.assign(ot,e),ot}var E={};mo(E,{BIGINT_FORMAT_RANGES:()=>Os,Class:()=>zo,NUMBER_FORMAT_RANGES:()=>$o,aborted:()=>Ne,allowsEval:()=>bo,assert:()=>Vp,assertEqual:()=>Lp,assertIs:()=>qp,assertNever:()=>Fp,assertNotEqual:()=>Up,assignProp:()=>Ze,base64ToUint8Array:()=>As,base64urlToUint8Array:()=>ad,cached:()=>st,captureStackTrace:()=>xr,cleanEnum:()=>id,cleanRegex:()=>Ct,clone:()=>fe,cloneDef:()=>Jp,createTransparentProxy:()=>Yp,defineLazy:()=>Z,esc:()=>yr,escapeRegex:()=>$e,explicitlyAborted:()=>Po,extend:()=>td,finalizeIssue:()=>me,floatSafeRemainder:()=>wo,getElementAtPath:()=>Wp,getEnumValues:()=>Rt,getLengthableOrigin:()=>It,getParsedType:()=>Xp,getSizableOrigin:()=>Zs,hexToUint8Array:()=>ud,isObject:()=>Ve,isPlainObject:()=>Ae,issue:()=>it,joinValues:()=>_r,jsonStringifyReplacer:()=>nt,merge:()=>od,mergeDefs:()=>ke,normalizeParams:()=>S,nullish:()=>Et,numKeys:()=>Kp,objectClone:()=>Hp,omit:()=>ed,optionalKeys:()=>ko,parsedType:()=>To,partial:()=>nd,pick:()=>Qp,prefixIssues:()=>Pe,primitiveTypes:()=>Is,promiseAllObject:()=>Bp,propertyKeyTypes:()=>So,randomString:()=>Gp,required:()=>sd,safeExtend:()=>rd,shallowClone:()=>Cs,slugify:()=>vo,stringifyPrimitive:()=>zr,uint8ArrayToBase64:()=>Ns,uint8ArrayToBase64url:()=>cd,uint8ArrayToHex:()=>ld,unwrapMessage:()=>Tt});function Lp(e){return e}function Up(e){return e}function qp(e){}function Fp(e){throw new Error("Unexpected value in exhaustive check")}function Vp(e){}function Rt(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function _r(e,t="|"){return e.map(r=>zr(r)).join(t)}function nt(e,t){return typeof t=="bigint"?t.toString():t}function st(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Et(e){return e==null}function Ct(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function wo(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Es=Symbol("evaluating");function Z(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Es)return o===void 0&&(o=Es,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Hp(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ze(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ke(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function Jp(e){return ke(e._zod.def)}function Wp(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function Bp(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let s=0;s<t.length;s++)n[t[s]]=o[s];return n})}function Gp(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function yr(e){return JSON.stringify(e)}function vo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var xr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var bo=st(()=>{if(ot.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ae(e){if(Ve(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ve(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Cs(e){return Ae(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Kp(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Xp=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},So=new Set(["string","number","symbol"]),Is=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function S(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Yp(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,s){return t??(t=e()),Reflect.set(t,o,n,s)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function zr(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ko(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var $o={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Os={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Qp(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=ke(e._zod.def,{get shape(){let i={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return Ze(this,"shape",i),i},checks:[]});return fe(e,s)}function ed(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=ke(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return Ze(this,"shape",i),i},checks:[]});return fe(e,s)}function td(e,t){if(!Ae(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let s=e._zod.def.shape;for(let i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=ke(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t};return Ze(this,"shape",s),s}});return fe(e,n)}function rd(e,t){if(!Ae(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ke(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ze(this,"shape",o),o}});return fe(e,r)}function od(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=ke(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ze(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return fe(e,r)}function nd(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let i=ke(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let u in r){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Ze(this,"shape",c),c},checks:[]});return fe(t,i)}function sd(e,t,r){let o=ke(t._zod.def,{get shape(){let n=t._zod.def.shape,s={...n};if(r)for(let i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(let i in n)s[i]=new e({type:"nonoptional",innerType:n[i]});return Ze(this,"shape",s),s}});return fe(t,o)}function Ne(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Po(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Pe(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Tt(e){return typeof e=="string"?e:e?.message}function me(e,t,r){let o=e.message?e.message:Tt(e.inst?._zod.def?.error?.(e))??Tt(t?.error?.(e))??Tt(r.customError?.(e))??Tt(r.localeError?.(e))??"Invalid input",{inst:n,continue:s,input:i,...a}=e;return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=i),a}function Zs(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function It(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function To(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function it(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function id(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function As(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Ns(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function ad(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return As(t+r)}function cd(e){return Ns(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ud(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function ld(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var zo=class{constructor(...t){}};var js=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wr=f("$ZodError",js),Ro=f("$ZodError",js,{Parent:Error});function Eo(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Co(e,t=r=>r.message){let r={_errors:[]},o=(n,s=[])=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")o({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")o({issues:i.issues},[...s,...i.path]);else{let a=[...s,...i.path];if(a.length===0)r._errors.push(t(i));else{let c=r,u=0;for(;u<a.length;){let p=a[u];u===a.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(t(i))):c[p]=c[p]||{_errors:[]},c=c[p],u++}}}};return o(e),r}var vr=e=>(t,r,o,n)=>{let s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new ve;if(i.issues.length){let a=new(n?.Err??e)(i.issues.map(c=>me(c,s,ce())));throw xr(a,n?.callee),a}return i.value};var br=e=>async(t,r,o,n)=>{let s=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){let a=new(n?.Err??e)(i.issues.map(c=>me(c,s,ce())));throw xr(a,n?.callee),a}return i.value};var Ot=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},n);if(s instanceof Promise)throw new ve;return s.issues.length?{success:!1,error:new(e??wr)(s.issues.map(i=>me(i,n,ce())))}:{success:!0,data:s.value}},Zt=Ot(Ro),At=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},n);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>me(i,n,ce())))}:{success:!0,data:s.value}},Sr=At(Ro),Ms=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return vr(e)(t,r,n)};var Ds=e=>(t,r,o)=>vr(e)(t,r,o);var Ls=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return br(e)(t,r,n)};var Us=e=>async(t,r,o)=>br(e)(t,r,o);var qs=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Ot(e)(t,r,n)};var Fs=e=>(t,r,o)=>Ot(e)(t,r,o);var Vs=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return At(e)(t,r,n)};var Hs=e=>async(t,r,o)=>At(e)(t,r,o);var Js=/^[cC][0-9a-z]{6,}$/,Ws=/^[0-9a-z]+$/,Bs=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gs=/^[0-9a-vA-V]{20}$/,Ks=/^[A-Za-z0-9]{27}$/,Xs=/^[a-zA-Z0-9_-]{21}$/,Ys=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Qs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Io=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;var ei=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var dd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ti(){return new RegExp(dd,"u")}var ri=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var ni=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,si=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ii=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Oo=/^[A-Za-z0-9_-]*$/;var ai=/^https?$/,ci=/^\+[1-9]\d{6,14}$/,ui="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",li=new RegExp(`^${ui}$`);function pi(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function di(e){return new RegExp(`^${pi(e)}$`)}function fi(e){let t=pi({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${ui}T(?:${o})$`)}var mi=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},hi=/^-?\d+n?$/,gi=/^-?\d+$/,Zo=/^-?\d+(?:\.\d+)?$/,_i=/^(?:true|false)$/i,yi=/^null$/i;var xi=/^[^A-Z]*$/,zi=/^[^a-z]*$/;var Q=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),wi={number:"number",bigint:"bigint",object:"date"},Ao=f("$ZodCheckLessThan",(e,t)=>{Q.init(e,t);let r=wi[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,s=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),No=f("$ZodCheckGreaterThan",(e,t)=>{Q.init(e,t);let r=wi[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,s=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vi=f("$ZodCheckMultipleOf",(e,t)=>{Q.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):wo(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),bi=f("$ZodCheckNumberFormat",(e,t)=>{Q.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,s]=$o[t.format];e._zod.onattach.push(i=>{let a=i._zod.bag;a.format=t.format,a.minimum=n,a.maximum=s,r&&(a.pattern=gi)}),e._zod.check=i=>{let a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}a<n&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}});var Si=f("$ZodCheckMaxLength",(e,t)=>{var r;Q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Et(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let i=It(n);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ki=f("$ZodCheckMinLength",(e,t)=>{var r;Q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Et(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let i=It(n);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),$i=f("$ZodCheckLengthEquals",(e,t)=>{var r;Q.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Et(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,s=n.length;if(s===t.length)return;let i=It(n),a=s>t.length;o.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),jt=f("$ZodCheckStringFormat",(e,t)=>{var r,o;Q.init(e,t),e._zod.onattach.push(n=>{let s=n._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Pi=f("$ZodCheckRegex",(e,t)=>{jt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ti=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=xi),jt.init(e,t)}),Ri=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=zi),jt.init(e,t)}),Ei=f("$ZodCheckIncludes",(e,t)=>{Q.init(e,t);let r=$e(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let s=n._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ci=f("$ZodCheckStartsWith",(e,t)=>{Q.init(e,t);let r=new RegExp(`^${$e(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Ii=f("$ZodCheckEndsWith",(e,t)=>{Q.init(e,t);let r=new RegExp(`.*${$e(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var Oi=f("$ZodCheckOverwrite",(e,t)=>{Q.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var kr=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
8
8
  `).filter(i=>i),n=Math.min(...o.map(i=>i.length-i.trimStart().length)),s=o.map(i=>i.slice(n)).map(i=>" ".repeat(this.indent*2)+i);for(let i of s)this.content.push(i)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...r,n.join(`
9
9
  `))}};var Ai={major:4,minor:4,patch:3};var N=f("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ai;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let s of n._zod.onattach)s(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(i,a,c)=>{let u=Ne(i),p;for(let d of a){if(d._zod.def.when){if(Po(i)||!d._zod.def.when(i))continue}else if(u)continue;let m=i.issues.length,h=d._zod.check(i);if(h instanceof Promise&&c?.async===!1)throw new ve;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,i.issues.length!==m&&(u||(u=Ne(i,m)))});else{if(i.issues.length===m)continue;u||(u=Ne(i,m))}}return p?p.then(()=>i):i},s=(i,a,c)=>{if(Ne(i))return i.aborted=!0,i;let u=n(a,o,c);if(u instanceof Promise){if(c.async===!1)throw new ve;return u.then(p=>e._zod.parse(p,c))}return e._zod.parse(u,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){let u=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(p=>s(p,i,a)):s(u,i,a)}let c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new ve;return c.then(u=>n(u,o,a))}return n(c,o,a)}}Z(e,"~standard",()=>({validate:n=>{try{let s=Zt(e,n);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Sr(e,n).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),Tr=f("$ZodString",(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mi(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),U=f("$ZodStringFormat",(e,t)=>{jt.init(e,t),Tr.init(e,t)}),Vi=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qs),U.init(e,t)}),Hi=f("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Io(o))}else t.pattern??(t.pattern=Io());U.init(e,t)}),Ji=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ei),U.init(e,t)}),Wi=f("$ZodURL",(e,t)=>{U.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===ai.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Bi=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ti()),U.init(e,t)}),Gi=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Xs),U.init(e,t)}),Ki=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Js),U.init(e,t)}),Xi=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ws),U.init(e,t)}),Yi=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bs),U.init(e,t)}),Qi=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Gs),U.init(e,t)}),ea=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ks),U.init(e,t)}),ta=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fi(t)),U.init(e,t)}),ra=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=li),U.init(e,t)}),oa=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=di(t)),U.init(e,t)}),na=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ys),U.init(e,t)}),sa=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ri),U.init(e,t),e._zod.bag.format="ipv4"}),ia=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oi),U.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}});var aa=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ni),U.init(e,t)}),ca=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=si),U.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,s]=o;if(!s)throw new Error;let i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ua(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var la=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ii),U.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ua(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function hd(e){if(!Oo.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ua(r)}var pa=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Oo),U.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{hd(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),da=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ci),U.init(e,t)});function gd(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var fa=f("$ZodJWT",(e,t)=>{U.init(e,t),e._zod.check=r=>{gd(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var Mo=f("$ZodNumber",(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zo,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let s=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...s?{received:s}:{}}),r}}),ma=f("$ZodNumberFormat",(e,t)=>{bi.init(e,t),Mo.init(e,t)}),ha=f("$ZodBoolean",(e,t)=>{N.init(e,t),e._zod.pattern=_i,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),ga=f("$ZodBigInt",(e,t)=>{N.init(e,t),e._zod.pattern=hi,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var _a=f("$ZodNull",(e,t)=>{N.init(e,t),e._zod.pattern=yi,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),ya=f("$ZodAny",(e,t)=>{N.init(e,t),e._zod.parse=r=>r}),xa=f("$ZodUnknown",(e,t)=>{N.init(e,t),e._zod.parse=r=>r}),za=f("$ZodNever",(e,t)=>{N.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});var wa=f("$ZodDate",(e,t)=>{N.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,s=n instanceof Date;return s&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...s?{received:"Invalid Date"}:{},inst:e}),r}});function Ni(e,t,r){e.issues.length&&t.issues.push(...Pe(r,e.issues)),t.value[r]=e.value}var va=f("$ZodArray",(e,t)=>{N.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let s=[];for(let i=0;i<n.length;i++){let a=n[i],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?s.push(c.then(u=>Ni(u,r,i))):Ni(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Pr(e,t,r,o,n,s){let i=r in o;if(e.issues.length){if(n&&s&&!i)return;t.issues.push(...Pe(r,e.issues))}if(!i&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?i&&(t.value[r]=void 0):t.value[r]=e.value}function ba(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=ko(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Sa(e,t,r,o,n,s){let i=[],a=n.keySet,c=n.catchall._zod,u=c.def.type,p=c.optin==="optional",d=c.optout==="optional";for(let m in t){if(m==="__proto__"||a.has(m))continue;if(u==="never"){i.push(m);continue}let h=c.run({value:t[m],issues:[]},o);h instanceof Promise?e.push(h.then(_=>Pr(_,r,m,t,p,d))):Pr(h,r,m,t,p,d)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}var _d=f("$ZodObject",(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=st(()=>ba(t));Z(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let p=a[u]._zod;if(p.values){c[u]??(c[u]=new Set);for(let d of p.values)c[u].add(d)}}return c});let n=Ve,s=t.catchall,i;e._zod.parse=(a,c)=>{i??(i=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let p=[],d=i.shape;for(let m of i.keys){let h=d[m],_=h._zod.optin==="optional",w=h._zod.optout==="optional",v=h._zod.run({value:u[m],issues:[]},c);v instanceof Promise?p.push(v.then(L=>Pr(L,a,m,u,_,w))):Pr(v,a,m,u,_,w)}return s?Sa(p,u,a,c,o.value,e):p.length?Promise.all(p).then(()=>a):a}}),ka=f("$ZodObjectJIT",(e,t)=>{_d.init(e,t);let r=e._zod.parse,o=st(()=>ba(t)),n=m=>{let h=new kr(["shape","payload","ctx"]),_=o.value,w=A=>{let I=yr(A);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let v=Object.create(null),L=0;for(let A of _.keys)v[A]=`key_${L++}`;h.write("const newResult = {};");for(let A of _.keys){let I=v[A],g=yr(A),z=m[A],T=z?._zod?.optin==="optional",W=z?._zod?.optout==="optional";h.write(`const ${I} = ${w(A)};`),T&&W?h.write(`
10
10
  if (${I}.issues.length) {
@@ -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{ca as e,ia as t}from"./VAPFU7OM.js";function r({verificationUri:o,userCode:n}){t.output(`Attempting to automatically open the SSO authorization page in your default browser.
7
+ import{ca as e,ia as t}from"./YUBO3M45.js";function r({verificationUri:o,userCode:n}){t.output(`Attempting to automatically open the SSO authorization page in your default browser.
8
8
  `),t.output(`If the browser does not open or you wish to use a different device to authorize this request, open the following URL:
9
9
 
10
10
  `),t.output(e(o)),t.output(`
@@ -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 o,b as t,c as e}from"./HBUZKWXC.js";import{ia as r}from"./VAPFU7OM.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as p}from"node:child_process";var u=async({argv:n})=>{r.info(`
7
+ import{a as o,b as t,c as e}from"./HBUZKWXC.js";import{ia as r}from"./YUBO3M45.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{spawn as p}from"node:child_process";var u=async({argv:n})=>{r.info(`
8
8
  Launching translate using NPX.
9
9
 
10
10
  `);let{npxExecutableName:s,sanitize:a,shell:i}=e(),l=a(n["project-dir"],o),c=a(n.locale,t);p(s,["-y","@redocly/realm","translate",c,`-d=${l}`],{stdio:"inherit",shell:i}).on("error",m=>{throw r.info(`Translate launch failed: ${m.message}`),new Error("Translate launch failed.")})};export{u as handleTranslations};
@@ -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{$ as P,O as D,P as h,Q as O,U as C,aa as j,ba as S,ca as f,d as E,e as A,f as $,ga as b,ia as o,l,oa as a,u}from"./VAPFU7OM.js";var y=["json","yaml","yml"];import*as i from"node:fs";import{basename as T,dirname as d,extname as g,join as N,resolve as m,relative as R}from"node:path";import*as p from"node:process";import{performance as F}from"perf_hooks";async function te(e,n){let r=!A(e)&&$(n.resolvedConfig.apis)?G(n):await W(e,n),c=r.filter(({path:s})=>!z(s));if(A(c)){for(let{path:s}of c)o.warn(`
7
+ import{$ as P,O as D,P as h,Q as O,U as C,aa as j,ba as S,ca as f,d as E,e as A,f as $,ga as b,ia as o,l,oa as a,u}from"./YUBO3M45.js";var y=["json","yaml","yml"];import*as i from"node:fs";import{basename as T,dirname as d,extname as g,join as N,resolve as m,relative as R}from"node:path";import*as p from"node:process";import{performance as F}from"perf_hooks";async function te(e,n){let r=!A(e)&&$(n.resolvedConfig.apis)?G(n):await W(e,n),c=r.filter(({path:s})=>!z(s));if(A(c)){for(let{path:s}of c)o.warn(`
8
8
  ${q(s)} ${P(`does not exist or is invalid.
9
9
 
10
10
  `)}`);throw new a("Please provide a valid path.")}if(r.length===0)throw new a("No APIs were provided. Specify an API via the command argument or define one in your config.");return r}function w(e){return e.configPath?d(e.configPath):p.cwd()}function z(e){if(!e.trim())throw new a("Path cannot be empty.");return i.existsSync(e)||u(e)?e:void 0}function G(e){return Object.entries(e.resolvedConfig.apis||{}).map(([n,{root:t,output:r}])=>({path:u(t)?t:m(w(e),t),alias:n,output:r&&m(w(e),r)}))}function k(e,n){let t=w(e),r=e.resolvedConfig.apis?.[n];return r?{path:u(r.root)?r.root:m(t,r.root),alias:n,output:r.output&&m(t,r.output)}:{path:n,alias:Object.entries(e.resolvedConfig.apis||{}).find(([c,s])=>m(t,s.root)===m(n))?.[0]??void 0}}async function W(e,n){let{hasMagic:t,glob:r}=await import("./SJHPKWSD.js");return(await Promise.all(e.map(async c=>t(c)&&!u(c)?(await r(c,{cwd:w(n)})).map(I=>k(n,I)):k(n,c)))).flat()}function L(e){return p.env.NODE_ENV==="test"?"<test>ms":`${Math.ceil(F.now()-e)}ms`}function oe(e,n,t){let r=L(n);o.info(b(`
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as bs}from"./H4VN2RX3.js";import{c as xs,d as ni}from"./JUZHXP62.js";import{$ as ot,A as im,B as om,C as sm,D as am,E as lm,F as um,G as cm,H as fm,I as pm,J as mm,K as dm,Q as ls,S as us,U as cs,V as fs,W as ps,Y as ms,aa as et,ba as ze,c as $t,ea as Me,g as os,ga as ds,ia as G,ka as ti,la as hs,ma as gs,pa as xn,q as ss,u as pt,ua as ys,w as as,x as rm}from"./VAPFU7OM.js";import"./NEWT5A6S.js";import{c as it,d as nm,e as At}from"./RFWIIJFG.js";var ws=it(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var hm=lm(),gm=um(),ym=cm(),xm=fm(),ks=pm(),bm=[hm.default,gm.default,(0,ym.default)(),xm.default,ks.metadataVocabulary,ks.contentVocabulary];ri.default=bm});var Ss=it((tw,km)=>{km.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ls=it((Se,ii)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var wm=am(),Sm=ws(),Cm=mm(),Cs=Ss(),Lm=["/properties"],Yn="http://json-schema.org/draft-07/schema",Ut=class extends wm.default{_addVocabularies(){super._addVocabularies(),Sm.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(Cm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(Cs,Lm):Cs;this.addMetaSchema(n,Yn,!1),this.refs["http://json-schema.org/schema"]=Yn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yn)?Yn:void 0)}};Se.Ajv=Ut;ii.exports=Se=Ut;ii.exports.Ajv=Ut;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Ut;var Am=im();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Am.KeywordCxt}});var Wt=rm();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Wt._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Wt.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Wt.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Wt.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Wt.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Wt.CodeGen}});var Em=om();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return Em.default}});var Tm=sm();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return Tm.default}})});var Sn=it((Nw,Pa)=>{"use strict";var Fa="[^\\\\/]",pd="(?=.)",Oa="[^/]",Pi="(?:\\/|$)",Na="(?:^|\\/)",Di=`\\.{1,2}${Pi}`,md="(?!\\.)",dd=`(?!${Na}${Di})`,hd=`(?!\\.{0,1}${Pi})`,gd=`(?!${Di})`,yd="[^.\\/]",xd=`${Oa}*?`,bd="/",Ma={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:pd,QMARK:Oa,END_ANCHOR:Pi,DOTS_SLASH:Di,NO_DOT:md,NO_DOTS:dd,NO_DOT_SLASH:hd,NO_DOTS_SLASH:gd,QMARK_NO_DOT:yd,STAR:xd,START_ANCHOR:Na,SEP:bd},kd={...Ma,SLASH_LITERAL:"[\\\\/]",QMARK:Fa,STAR:`${Fa}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},wd={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Pa.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wd,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?kd:Ma}}});var Cn=it(je=>{"use strict";var{REGEX_BACKSLASH:Sd,REGEX_REMOVE_BACKSLASH:Cd,REGEX_SPECIAL_CHARS:Ld,REGEX_SPECIAL_CHARS_GLOBAL:Ad}=Sn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Ld.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Ad,"\\$1");je.toPosixSlashes=e=>e.replace(Sd,"/");je.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};je.removeBackslashes=e=>e.replace(Cd,n=>n==="\\"?"":n);je.escapeLast=(e,n,t)=>{let r=e.lastIndexOf(n,t);return r===-1?e:e[r-1]==="\\"?je.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};je.removePrefix=(e,n={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),n.prefix="./"),t};je.wrapOutput=(e,n={},t={})=>{let r=t.contains?"":"^",i=t.contains?"":"$",o=`${r}(?:${e})${i}`;return n.negated===!0&&(o=`(?:^(?!${o}).*$)`),o};je.basename=(e,{windows:n}={})=>{let t=e.split(n?/[\\/]/:"/"),r=t[t.length-1];return r===""?t[t.length-2]:r}});var Wa=it((Pw,Ua)=>{"use strict";var Da=Cn(),{CHAR_ASTERISK:Bi,CHAR_AT:Ed,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Td,CHAR_DOT:qi,CHAR_EXCLAMATION_MARK:Hi,CHAR_FORWARD_SLASH:ja,CHAR_LEFT_CURLY_BRACE:zi,CHAR_LEFT_PARENTHESES:rr,CHAR_LEFT_SQUARE_BRACKET:Rd,CHAR_PLUS:vd,CHAR_QUESTION_MARK:Ba,CHAR_RIGHT_CURLY_BRACE:Id,CHAR_RIGHT_PARENTHESES:qa,CHAR_RIGHT_SQUARE_BRACKET:$d}=Sn(),Ha=e=>e===ja||e===Kt,za=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},_d=(e,n)=>{let t=n||{},r=e.length-1,i=t.parts===!0||t.tokens===!0||t.scanToEnd===!0,o=[],s=[],a=[],l=e,u=-1,c=0,p=0,m=!1,d=!1,h=!1,w=!1,k=!1,y=!1,S=!1,L=!1,_=!1,B=!1,R=0,I,N,v={value:"",depth:0,isGlob:!1},b=()=>u>=r,Z=()=>l.charCodeAt(u+1),X=()=>(I=N,l.charCodeAt(++u));for(;u<r;){N=X();let re;if(N===Kt){S=v.backslashes=!0,N=X(),N===zi&&(y=!0);continue}if(y===!0||N===zi){for(R++;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===zi){R++;continue}if(y!==!0&&N===qi&&(N=X())===qi){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(y!==!0&&N===Td){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Id&&(R--,R===0)){y=!1,m=v.isBrace=!0,B=!0;break}}if(i===!0)continue;break}if(N===ja){if(o.push(u),s.push(v),v={value:"",depth:0,isGlob:!1},B===!0)continue;if(I===qi&&u===c+1){c+=2;continue}p=u+1;continue}if(t.noext!==!0&&(N===vd||N===Ed||N===Bi||N===Ba||N===Hi)===!0&&Z()===rr){if(h=v.isGlob=!0,w=v.isExtglob=!0,B=!0,N===Hi&&u===c&&(_=!0),i===!0){let be=0;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){be++;continue}if(N===qa&&--be===0){B=!0;break}}continue}break}if(N===Bi){if(I===Bi&&(k=v.isGlobstar=!0),h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Ba){if(h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Rd){for(;b()!==!0&&(re=X());){if(re===Kt){S=v.backslashes=!0,X();continue}if(re===$d){d=v.isBracket=!0,h=v.isGlob=!0,B=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&N===Hi&&u===c){L=v.negated=!0,c++;continue}if(t.noparen!==!0&&N===rr){if(h=v.isGlob=!0,i===!0){let de=1;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){de++;continue}if(N===qa&&--de===0){B=!0;break}}continue}break}if(h===!0){if(B=!0,i===!0)continue;break}}t.noext===!0&&(w=!1,h=!1);let Y=l,E="",x="";c>0&&(E=l.slice(0,c),l=l.slice(c),p-=c),Y&&h===!0&&p>0?(Y=l.slice(0,p),x=l.slice(p)):h===!0?(Y="",x=l):Y=l,Y&&Y!==""&&Y!=="/"&&Y!==l&&Ha(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),t.unescape===!0&&(x&&(x=Da.removeBackslashes(x)),Y&&S===!0&&(Y=Da.removeBackslashes(Y)));let P={prefix:E,input:e,start:c,base:Y,glob:x,isBrace:m,isBracket:d,isGlob:h,isExtglob:w,isGlobstar:k,negated:L,negatedExtglob:_};if(t.tokens===!0&&(P.maxDepth=0,Ha(N)||s.push(v),P.tokens=s),t.parts===!0||t.tokens===!0){let re;for(let C=0;C<o.length;C++){let le=re!==void 0?re+1:c,Le=o[C],A=e.slice(le,Le);t.tokens&&(C===0&&c!==0?(s[C].isPrefix=!0,s[C].value=E):s[C].value=A,za(s[C]),P.maxDepth+=s[C].depth),Le>=c&&(a.push(A),re=Le)}let de=re!==void 0?re+1:c,be=e.slice(de);a.push(be),t.tokens&&re&&re+1<e.length&&(s[s.length-1].value=be,za(s[s.length-1]),P.maxDepth+=s[s.length-1].depth),P.slashes=o,P.parts=a}return P};Ua.exports=_d});var Ya=it((Dw,Ga)=>{"use strict";var Ln=Sn(),Ke=Cn(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:Fd,REGEX_NON_SPECIAL_CHARS:Od,REGEX_SPECIAL_CHARS_BACKREF:Nd,REPLACEMENTS:Va}=Ln,Md=(e,n)=>{if(typeof n.expandRange=="function")return n.expandRange(...e,n);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(i=>Ke.escapeRegex(i)).join("..")}return t},Gt=(e,n)=>`Missing ${e}: "${n}" - use "\\\\${n}" to match literal characters`,Ka=e=>{let n=[],t=0,r=0,i=0,o="",s=!1;for(let a of e){if(s===!0){o+=a,s=!1;continue}if(a==="\\"){o+=a,s=!0;continue}if(a==='"'){i=i===1?0:1,o+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){n.push(o),o="";continue}}}o+=a}return n.push(o),n},Pd=e=>{let n=!1;for(let t of e){if(n===!0){n=!1;continue}if(t==="\\"){n=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Ui=e=>{let n=e.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(n)&&(n=n.slice(2,-1),t=!0);if(Pd(n))return n.replace(/\\(.)/g,"$1")},Dd=e=>{let n=e.map(Ui).filter(Boolean);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],o=n[r],s=i[0];if(!(!s||i!==s.repeat(i.length)||o!==s.repeat(o.length))&&(i===o||i.startsWith(o)||o.startsWith(i)))return!0}return!1},ji=(e,n=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let t=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(o===!0){o=!1;continue}if(a==="\\"){o=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return n===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},Bd=e=>`${e.length===1?Ke.escapeRegex(e[0]):`[${e.map(t=>Ke.escapeRegex(t)).join("")}]`}*`,qd=e=>{let n=0,t=[];for(;n<e.length;){let r=ji(e.slice(n),!1);if(!r||r.type!=="*")return;let i=Ka(r.body).map(s=>s.trim());if(i.length!==1)return;let o=Ui(i[0]);if(!o||o.length!==1)return;t.push(o),n+=r.end+1}if(!(t.length<1))return t},Hd=e=>{let n=0,t=e.trim(),r=ji(t);for(;r;)n++,t=r.body.trim(),r=ji(t);return n},zd=(e,n)=>{if(n.maxExtglobRecursion===!1)return{risky:!1};let t=typeof n.maxExtglobRecursion=="number"?n.maxExtglobRecursion:Ln.DEFAULT_MAX_EXTGLOB_RECURSION,r=Ka(e).map(a=>a.trim());if(r.length>1&&(r.some(a=>a==="")||r.some(a=>/^[*?]+$/.test(a))||Dd(r)))return{risky:!0};let i=[],o=!1,s=!0;for(let a of r){let l=qd(a);if(l){o=!0,i.push(...l);continue}let u=Ui(a);if(u&&u.length===1){i.push(u);continue}if(s=!1,Hd(a)>t)return{risky:!0}}return o?s?{risky:!0,safeOutput:Bd([...new Set(i)])}:{risky:!0}:{risky:!1}},Wi=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Va[e]||e;let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",l=Ln.globChars(t.windows),u=Ln.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:w,NO_DOT_SLASH:k,NO_DOTS_SLASH:y,QMARK:S,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:B}=l,R=j=>`(${a}(?:(?!${B}${j.dot?h:c}).)*?)`,I=t.dot?"":w,N=t.dot?S:L,v=t.bash===!0?R(t):_;t.capture&&(v=`(${v})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let b={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=Ke.removePrefix(e,b),i=e.length;let Z=[],X=[],Y=[],E=o,x,P=()=>b.index===i-1,re=b.peek=(j=1)=>e[b.index+j],de=b.advance=()=>e[++b.index]||"",be=()=>e.slice(b.index+1),C=(j="",ge=0)=>{b.consumed+=j,b.index+=ge},le=j=>{b.output+=j.output!=null?j.output:j.value,C(j.value)},Le=()=>{let j=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)de(),b.start++,j++;return j%2===0?!1:(b.negated=!0,b.start++,!0)},A=j=>{b[j]++,Y.push(j)},ke=j=>{b[j]--,Y.pop()},ee=j=>{if(E.type==="globstar"){let ge=b.braces>0&&(j.type==="comma"||j.type==="brace"),z=j.extglob===!0||Z.length&&(j.type==="pipe"||j.type==="paren");j.type!=="slash"&&j.type!=="paren"&&!ge&&!z&&(b.output=b.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=v,b.output+=E.output)}if(Z.length&&j.type!=="paren"&&(Z[Z.length-1].inner+=j.value),(j.value||j.output)&&le(j),E&&E.type==="text"&&j.type==="text"){E.output=(E.output||E.value)+j.value,E.value+=j.value;return}j.prev=E,s.push(j),E=j},$e=(j,ge)=>{let z={...u[ge],conditions:1,inner:""};z.prev=E,z.parens=b.parens,z.output=b.output,z.startIndex=b.index,z.tokensIndex=s.length;let oe=(t.capture?"(":"")+z.open;A("parens"),ee({type:j,value:ge,output:b.output?"":d}),ee({type:"paren",extglob:!0,value:de(),output:oe}),Z.push(z)},Qe=j=>{let ge=e.slice(j.startIndex,b.index+1),z=e.slice(j.startIndex+2,b.index),oe=zd(z,t);if((j.type==="plus"||j.type==="star")&&oe.risky){let ye=oe.safeOutput?(j.output?"":d)+(t.capture?`(${oe.safeOutput})`:oe.safeOutput):void 0,Oe=s[j.tokensIndex];Oe.type="text",Oe.value=ge,Oe.output=ye||Ke.escapeRegex(ge);for(let Xe=j.tokensIndex+1;Xe<s.length;Xe++)s[Xe].value="",s[Xe].output="",delete s[Xe].suffix;b.output=j.output+Oe.output,b.backtrack=!0,ee({type:"paren",extglob:!0,value:x,output:""}),ke("parens");return}let he=j.close+(t.capture?")":""),we;if(j.type==="negate"){let ye=v;if(j.inner&&j.inner.length>1&&j.inner.includes("/")&&(ye=R(t)),(ye!==v||P()||/^\)+$/.test(be()))&&(he=j.close=`)$))${ye}`),j.inner.includes("*")&&(we=be())&&/^\.[^\\/.]+$/.test(we)){let Oe=Wi(we,{...n,fastpaths:!1}).output;he=j.close=`)${Oe})${ye})`}j.prev.type==="bos"&&(b.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:x,output:he}),ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let j=!1,ge=e.replace(Nd,(z,oe,he,we,ye,Oe)=>we==="\\"?(j=!0,z):we==="?"?oe?oe+we+(ye?S.repeat(ye.length):""):Oe===0?N+(ye?S.repeat(ye.length):""):S.repeat(he.length):we==="."?c.repeat(he.length):we==="*"?oe?oe+we+(ye?v:""):v:oe?z:`\\${z}`);return j===!0&&(t.unescape===!0?ge=ge.replace(/\\/g,""):ge=ge.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ge===e&&t.contains===!0?(b.output=e,b):(b.output=Ke.wrapOutput(ge,b,n),b)}for(;!P();){if(x=de(),x==="\0")continue;if(x==="\\"){let z=re();if(z==="/"&&t.bash!==!0||z==="."||z===";")continue;if(!z){x+="\\",ee({type:"text",value:x});continue}let oe=/^\\+/.exec(be()),he=0;if(oe&&oe[0].length>2&&(he=oe[0].length,b.index+=he,he%2!==0&&(x+="\\")),t.unescape===!0?x=de():x+=de(),b.brackets===0){ee({type:"text",value:x});continue}}if(b.brackets>0&&(x!=="]"||E.value==="["||E.value==="[^")){if(t.posix!==!1&&x===":"){let z=E.value.slice(1);if(z.includes("[")&&(E.posix=!0,z.includes(":"))){let oe=E.value.lastIndexOf("["),he=E.value.slice(0,oe),we=E.value.slice(oe+2),ye=Fd[we];if(ye){E.value=he+ye,b.backtrack=!0,de(),!o.output&&s.indexOf(E)===1&&(o.output=d);continue}}}(x==="["&&re()!==":"||x==="-"&&re()==="]")&&(x=`\\${x}`),x==="]"&&(E.value==="["||E.value==="[^")&&(x=`\\${x}`),t.posix===!0&&x==="!"&&E.value==="["&&(x="^"),E.value+=x,le({value:x});continue}if(b.quotes===1&&x!=='"'){x=Ke.escapeRegex(x),E.value+=x,le({value:x});continue}if(x==='"'){b.quotes=b.quotes===1?0:1,t.keepQuotes===!0&&ee({type:"text",value:x});continue}if(x==="("){A("parens"),ee({type:"paren",value:x});continue}if(x===")"){if(b.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Gt("opening","("));let z=Z[Z.length-1];if(z&&b.parens===z.parens+1){Qe(Z.pop());continue}ee({type:"paren",value:x,output:b.parens?")":"\\)"}),ke("parens");continue}if(x==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));x=`\\${x}`}else A("brackets");ee({type:"bracket",value:x});continue}if(x==="]"){if(t.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){ee({type:"text",value:x,output:`\\${x}`});continue}if(b.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Gt("opening","["));ee({type:"text",value:x,output:`\\${x}`});continue}ke("brackets");let z=E.value.slice(1);if(E.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(x=`/${x}`),E.value+=x,le({value:x}),t.literalBrackets===!1||Ke.hasRegexChars(z))continue;let oe=Ke.escapeRegex(E.value);if(b.output=b.output.slice(0,-E.value.length),t.literalBrackets===!0){b.output+=oe,E.value=oe;continue}E.value=`(${a}${oe}|${E.value})`,b.output+=E.value;continue}if(x==="{"&&t.nobrace!==!0){A("braces");let z={type:"brace",value:x,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};X.push(z),ee(z);continue}if(x==="}"){let z=X[X.length-1];if(t.nobrace===!0||!z){ee({type:"text",value:x,output:x});continue}let oe=")";if(z.dots===!0){let he=s.slice(),we=[];for(let ye=he.length-1;ye>=0&&(s.pop(),he[ye].type!=="brace");ye--)he[ye].type!=="dots"&&we.unshift(he[ye].value);oe=Md(we,t),b.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let he=b.output.slice(0,z.outputIndex),we=b.tokens.slice(z.tokensIndex);z.value=z.output="\\{",x=oe="\\}",b.output=he;for(let ye of we)b.output+=ye.output||ye.value}ee({type:"brace",value:x,output:oe}),ke("braces"),X.pop();continue}if(x==="|"){Z.length>0&&Z[Z.length-1].conditions++,ee({type:"text",value:x});continue}if(x===","){let z=x,oe=X[X.length-1];oe&&Y[Y.length-1]==="braces"&&(oe.comma=!0,z="|"),ee({type:"comma",value:x,output:z});continue}if(x==="/"){if(E.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),E=o;continue}ee({type:"slash",value:x,output:m});continue}if(x==="."){if(b.braces>0&&E.type==="dot"){E.value==="."&&(E.output=c);let z=X[X.length-1];E.type="dots",E.output+=x,E.value+=x,z.dots=!0;continue}if(b.braces+b.parens===0&&E.type!=="bos"&&E.type!=="slash"){ee({type:"text",value:x,output:c});continue}ee({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(E&&E.value==="(")&&t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("qmark",x);continue}if(E&&E.type==="paren"){let oe=re(),he=x;(E.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(be()))&&(he=`\\${x}`),ee({type:"text",value:x,output:he});continue}if(t.dot!==!0&&(E.type==="slash"||E.type==="bos")){ee({type:"qmark",value:x,output:L});continue}ee({type:"qmark",value:x,output:S});continue}if(x==="!"){if(t.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){$e("negate",x);continue}if(t.nonegate!==!0&&b.index===0){Le();continue}}if(x==="+"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("plus",x);continue}if(E&&E.value==="("||t.regex===!1){ee({type:"plus",value:x,output:p});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||b.parens>0){ee({type:"plus",value:x});continue}ee({type:"plus",value:p});continue}if(x==="@"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){ee({type:"at",extglob:!0,value:x,output:""});continue}ee({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let z=Od.exec(be());z&&(x+=z[0],b.index+=z[0].length),ee({type:"text",value:x});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=x,E.output=v,b.backtrack=!0,b.globstar=!0,C(x);continue}let j=be();if(t.noextglob!==!0&&/^\([^?]/.test(j)){$e("star",x);continue}if(E.type==="star"){if(t.noglobstar===!0){C(x);continue}let z=E.prev,oe=z.prev,he=z.type==="slash"||z.type==="bos",we=oe&&(oe.type==="star"||oe.type==="globstar");if(t.bash===!0&&(!he||j[0]&&j[0]!=="/")){ee({type:"star",value:x,output:""});continue}let ye=b.braces>0&&(z.type==="comma"||z.type==="brace"),Oe=Z.length&&(z.type==="pipe"||z.type==="paren");if(!he&&z.type!=="paren"&&!ye&&!Oe){ee({type:"star",value:x,output:""});continue}for(;j.slice(0,3)==="/**";){let Ne=e[b.index+4];if(Ne&&Ne!=="/")break;j=j.slice(3),C("/**",3)}let Xe=P()||b.parens>0&&j===")".repeat(b.parens)&&!Z.some(Ne=>Ne.type==="negate");if(z.type==="bos"&&P()){E.type="globstar",E.value+=x,E.output=R(t),b.output=E.output,b.globstar=!0,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&Xe){b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=R(t)+(t.strictSlashes?")":"|$)"),E.value+=x,b.globstar=!0,b.output+=z.output+E.output,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&j[0]==="/"){let Ne=j[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=`${R(t)}${m}|${m}${Ne})`,E.value+=x,b.output+=z.output+E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&j[0]==="/"){E.type="globstar",E.value+=x,E.output=`(?:^|${m}|${R(t)}${m})`,b.output=E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-E.output.length),E.type="globstar",E.output=R(t),E.value+=x,b.output+=E.output,b.globstar=!0,C(x);continue}let ge={type:"star",value:x,output:v};if(t.bash===!0){ge.output=".*?",(E.type==="bos"||E.type==="slash")&&(ge.output=I+ge.output),ee(ge);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&t.regex===!0){ge.output=x,ee(ge);continue}(b.index===b.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(b.output+=k,E.output+=k):t.dot===!0?(b.output+=y,E.output+=y):(b.output+=I,E.output+=I),re()!=="*"&&(b.output+=d,E.output+=d)),ee(ge)}for(;b.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));b.output=Ke.escapeLast(b.output,"["),ke("brackets")}for(;b.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing",")"));b.output=Ke.escapeLast(b.output,"("),ke("parens")}for(;b.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","}"));b.output=Ke.escapeLast(b.output,"{"),ke("braces")}if(t.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${m}?`}),b.backtrack===!0){b.output="";for(let j of b.tokens)b.output+=j.output!=null?j.output:j.value,j.suffix&&(b.output+=j.suffix)}return b};Wi.fastpaths=(e,n)=>{let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=Va[e]||e;let{DOT_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:c,NO_DOTS_SLASH:p,STAR:m,START_ANCHOR:d}=Ln.globChars(t.windows),h=t.dot?c:u,w=t.dot?p:u,k=t.capture?"":"?:",y={negated:!1,prefix:""},S=t.bash===!0?".*?":m;t.capture&&(S=`(${S})`);let L=I=>I.noglobstar===!0?S:`(${k}(?:(?!${d}${I.dot?l:o}).)*?)`,_=I=>{switch(I){case"*":return`${h}${a}${S}`;case".*":return`${o}${a}${S}`;case"*.*":return`${h}${S}${o}${a}${S}`;case"*/*":return`${h}${S}${s}${a}${w}${S}`;case"**":return h+L(t);case"**/*":return`(?:${h}${L(t)}${s})?${w}${a}${S}`;case"**/*.*":return`(?:${h}${L(t)}${s})?${w}${S}${o}${a}${S}`;case"**/.*":return`(?:${h}${L(t)}${s})?${o}${a}${S}`;default:{let N=/^(.*?)\.(\w+)$/.exec(I);if(!N)return;let v=_(N[1]);return v?v+o+N[2]:void 0}}},B=Ke.removePrefix(e,y),R=_(B);return R&&t.strictSlashes!==!0&&(R+=`${s}?`),R};Ga.exports=Wi});var Za=it((Bw,Xa)=>{"use strict";var jd=Wa(),Vi=Ya(),Qa=Cn(),Ud=Sn(),Wd=e=>e&&typeof e=="object"&&!Array.isArray(e),Ee=(e,n,t=!1)=>{if(Array.isArray(e)){let c=e.map(m=>Ee(m,n,t));return m=>{for(let d of c){let h=d(m);if(h)return h}return!1}}let r=Wd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=n||{},o=i.windows,s=r?Ee.compileRe(e,n):Ee.makeRe(e,n,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(i.ignore){let c={...n,ignore:null,onMatch:null,onResult:null};l=Ee(i.ignore,c,t)}let u=(c,p=!1)=>{let{isMatch:m,match:d,output:h}=Ee.test(c,s,n,{glob:e,posix:o}),w={glob:e,state:a,regex:s,posix:o,input:c,output:h,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof i.onMatch=="function"&&i.onMatch(w),p?w:!0)};return t&&(u.state=a),u};Ee.test=(e,n,t,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Qa.toPosixSlashes:null),a=e===r,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ee.matchBase(e,n,t,i):a=n.exec(l)),{isMatch:!!a,match:a,output:l}};Ee.matchBase=(e,n,t,r=t&&t.windows)=>(n instanceof RegExp?n:Ee.makeRe(n,t)).test(Qa.basename(e,{windows:r}));Ee.isMatch=(e,n,t)=>Ee(n,t)(e);Ee.parse=(e,n)=>Array.isArray(e)?e.map(t=>Ee.parse(t,n)):Vi(e,{...n,fastpaths:!1});Ee.scan=(e,n)=>jd(e,n);Ee.compileRe=(e,n,t=!1,r=!1)=>{if(t===!0)return e.output;let i=n||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=Ee.toRegex(a,n);return r===!0&&(l.state=e),l};Ee.makeRe=(e,n={},t=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return n.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=Vi.fastpaths(e,n)),i.output||(i=Vi(e,n)),Ee.compileRe(i,n,t,r)};Ee.toRegex=(e,n)=>{try{let t=n||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(n&&n.debug===!0)throw t;return/$^/}};Ee.constants=Ud;Xa.exports=Ee});var or=it((qw,tl)=>{"use strict";var Ja=Za(),Vd=Cn();function el(e,n,t=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:Vd.isWindows()}),Ja(e,n,t)}Object.assign(el,Ja);tl.exports=el});var _l=it((NL,mo)=>{(function(){var e;typeof mo<"u"?e=mo.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,p=!1,m,d,h=!1,w,k=function(){return s[o++]},y=function(){for(var S="";/\d/.test(i[a]);)S+=i[a++],c=i[a];return S.length>0?parseInt(S):null};a<l;++a)if(c=i[a],p)switch(p=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,w=y(),c){case"b":u+=parseInt(k(),10).toString(2);break;case"c":m=k(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(k(),10);break;case"f":d=String(parseFloat(k()).toFixed(w||6)),u+=h?d:d.replace(/^0/,"");break;case"j":u+=JSON.stringify(k());break;case"o":u+="0"+parseInt(k(),10).toString(8);break;case"s":u+=k();break;case"x":u+="0x"+parseInt(k(),10).toString(16);break;case"X":u+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?p=!0:u+=c;return u}})()});var Yf=At(Ls(),1),Qf=At(ms(),1);function Rm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={},Qn={},Et={},As;function bn(){if(As)return Et;As=1;function e(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function t(s){return Array.isArray(s)?s:e(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){let p=l[u];s[p]=a[p]}}return s}function i(s,a){let l="";for(let u=0;u<a;u+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Et.isNothing=e,Et.isObject=n,Et.toArray=t,Et.repeat=i,Et.isNegativeZero=o,Et.extend=r,Et}var oi,Es;function kn(){if(Es)return oi;Es=1;function e(t,r){let i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
7
+ import{a as bs}from"./H4VN2RX3.js";import{c as xs,d as ni}from"./LLF5CY3L.js";import{$ as ot,A as im,B as om,C as sm,D as am,E as lm,F as um,G as cm,H as fm,I as pm,J as mm,K as dm,Q as ls,S as us,U as cs,V as fs,W as ps,Y as ms,aa as et,ba as ze,c as $t,ea as Me,g as os,ga as ds,ia as G,ka as ti,la as hs,ma as gs,pa as xn,q as ss,u as pt,ua as ys,w as as,x as rm}from"./YUBO3M45.js";import"./NEWT5A6S.js";import{c as it,d as nm,e as At}from"./RFWIIJFG.js";var ws=it(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var hm=lm(),gm=um(),ym=cm(),xm=fm(),ks=pm(),bm=[hm.default,gm.default,(0,ym.default)(),xm.default,ks.metadataVocabulary,ks.contentVocabulary];ri.default=bm});var Ss=it((tw,km)=>{km.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Ls=it((Se,ii)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var wm=am(),Sm=ws(),Cm=mm(),Cs=Ss(),Lm=["/properties"],Yn="http://json-schema.org/draft-07/schema",Ut=class extends wm.default{_addVocabularies(){super._addVocabularies(),Sm.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(Cm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(Cs,Lm):Cs;this.addMetaSchema(n,Yn,!1),this.refs["http://json-schema.org/schema"]=Yn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Yn)?Yn:void 0)}};Se.Ajv=Ut;ii.exports=Se=Ut;ii.exports.Ajv=Ut;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=Ut;var Am=im();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return Am.KeywordCxt}});var Wt=rm();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Wt._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Wt.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Wt.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Wt.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Wt.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return Wt.CodeGen}});var Em=om();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return Em.default}});var Tm=sm();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return Tm.default}})});var Sn=it((Nw,Pa)=>{"use strict";var Fa="[^\\\\/]",pd="(?=.)",Oa="[^/]",Pi="(?:\\/|$)",Na="(?:^|\\/)",Di=`\\.{1,2}${Pi}`,md="(?!\\.)",dd=`(?!${Na}${Di})`,hd=`(?!\\.{0,1}${Pi})`,gd=`(?!${Di})`,yd="[^.\\/]",xd=`${Oa}*?`,bd="/",Ma={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:pd,QMARK:Oa,END_ANCHOR:Pi,DOTS_SLASH:Di,NO_DOT:md,NO_DOTS:dd,NO_DOT_SLASH:hd,NO_DOTS_SLASH:gd,QMARK_NO_DOT:yd,STAR:xd,START_ANCHOR:Na,SEP:bd},kd={...Ma,SLASH_LITERAL:"[\\\\/]",QMARK:Fa,STAR:`${Fa}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},wd={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Pa.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wd,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?kd:Ma}}});var Cn=it(je=>{"use strict";var{REGEX_BACKSLASH:Sd,REGEX_REMOVE_BACKSLASH:Cd,REGEX_SPECIAL_CHARS:Ld,REGEX_SPECIAL_CHARS_GLOBAL:Ad}=Sn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Ld.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Ad,"\\$1");je.toPosixSlashes=e=>e.replace(Sd,"/");je.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};je.removeBackslashes=e=>e.replace(Cd,n=>n==="\\"?"":n);je.escapeLast=(e,n,t)=>{let r=e.lastIndexOf(n,t);return r===-1?e:e[r-1]==="\\"?je.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};je.removePrefix=(e,n={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),n.prefix="./"),t};je.wrapOutput=(e,n={},t={})=>{let r=t.contains?"":"^",i=t.contains?"":"$",o=`${r}(?:${e})${i}`;return n.negated===!0&&(o=`(?:^(?!${o}).*$)`),o};je.basename=(e,{windows:n}={})=>{let t=e.split(n?/[\\/]/:"/"),r=t[t.length-1];return r===""?t[t.length-2]:r}});var Wa=it((Pw,Ua)=>{"use strict";var Da=Cn(),{CHAR_ASTERISK:Bi,CHAR_AT:Ed,CHAR_BACKWARD_SLASH:Kt,CHAR_COMMA:Td,CHAR_DOT:qi,CHAR_EXCLAMATION_MARK:Hi,CHAR_FORWARD_SLASH:ja,CHAR_LEFT_CURLY_BRACE:zi,CHAR_LEFT_PARENTHESES:rr,CHAR_LEFT_SQUARE_BRACKET:Rd,CHAR_PLUS:vd,CHAR_QUESTION_MARK:Ba,CHAR_RIGHT_CURLY_BRACE:Id,CHAR_RIGHT_PARENTHESES:qa,CHAR_RIGHT_SQUARE_BRACKET:$d}=Sn(),Ha=e=>e===ja||e===Kt,za=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},_d=(e,n)=>{let t=n||{},r=e.length-1,i=t.parts===!0||t.tokens===!0||t.scanToEnd===!0,o=[],s=[],a=[],l=e,u=-1,c=0,p=0,m=!1,d=!1,h=!1,w=!1,k=!1,y=!1,S=!1,L=!1,_=!1,B=!1,R=0,I,N,v={value:"",depth:0,isGlob:!1},b=()=>u>=r,Z=()=>l.charCodeAt(u+1),X=()=>(I=N,l.charCodeAt(++u));for(;u<r;){N=X();let re;if(N===Kt){S=v.backslashes=!0,N=X(),N===zi&&(y=!0);continue}if(y===!0||N===zi){for(R++;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===zi){R++;continue}if(y!==!0&&N===qi&&(N=X())===qi){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(y!==!0&&N===Td){if(m=v.isBrace=!0,h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Id&&(R--,R===0)){y=!1,m=v.isBrace=!0,B=!0;break}}if(i===!0)continue;break}if(N===ja){if(o.push(u),s.push(v),v={value:"",depth:0,isGlob:!1},B===!0)continue;if(I===qi&&u===c+1){c+=2;continue}p=u+1;continue}if(t.noext!==!0&&(N===vd||N===Ed||N===Bi||N===Ba||N===Hi)===!0&&Z()===rr){if(h=v.isGlob=!0,w=v.isExtglob=!0,B=!0,N===Hi&&u===c&&(_=!0),i===!0){let be=0;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){be++;continue}if(N===qa&&--be===0){B=!0;break}}continue}break}if(N===Bi){if(I===Bi&&(k=v.isGlobstar=!0),h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Ba){if(h=v.isGlob=!0,B=!0,i===!0)continue;break}if(N===Rd){for(;b()!==!0&&(re=X());){if(re===Kt){S=v.backslashes=!0,X();continue}if(re===$d){d=v.isBracket=!0,h=v.isGlob=!0,B=!0;break}}if(i===!0)continue;break}if(t.nonegate!==!0&&N===Hi&&u===c){L=v.negated=!0,c++;continue}if(t.noparen!==!0&&N===rr){if(h=v.isGlob=!0,i===!0){let de=1;for(;b()!==!0&&(N=X());){if(N===Kt){S=v.backslashes=!0,X();continue}if(N===rr){de++;continue}if(N===qa&&--de===0){B=!0;break}}continue}break}if(h===!0){if(B=!0,i===!0)continue;break}}t.noext===!0&&(w=!1,h=!1);let Y=l,E="",x="";c>0&&(E=l.slice(0,c),l=l.slice(c),p-=c),Y&&h===!0&&p>0?(Y=l.slice(0,p),x=l.slice(p)):h===!0?(Y="",x=l):Y=l,Y&&Y!==""&&Y!=="/"&&Y!==l&&Ha(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),t.unescape===!0&&(x&&(x=Da.removeBackslashes(x)),Y&&S===!0&&(Y=Da.removeBackslashes(Y)));let P={prefix:E,input:e,start:c,base:Y,glob:x,isBrace:m,isBracket:d,isGlob:h,isExtglob:w,isGlobstar:k,negated:L,negatedExtglob:_};if(t.tokens===!0&&(P.maxDepth=0,Ha(N)||s.push(v),P.tokens=s),t.parts===!0||t.tokens===!0){let re;for(let C=0;C<o.length;C++){let le=re!==void 0?re+1:c,Le=o[C],A=e.slice(le,Le);t.tokens&&(C===0&&c!==0?(s[C].isPrefix=!0,s[C].value=E):s[C].value=A,za(s[C]),P.maxDepth+=s[C].depth),Le>=c&&(a.push(A),re=Le)}let de=re!==void 0?re+1:c,be=e.slice(de);a.push(be),t.tokens&&re&&re+1<e.length&&(s[s.length-1].value=be,za(s[s.length-1]),P.maxDepth+=s[s.length-1].depth),P.slashes=o,P.parts=a}return P};Ua.exports=_d});var Ya=it((Dw,Ga)=>{"use strict";var Ln=Sn(),Ke=Cn(),{MAX_LENGTH:ir,POSIX_REGEX_SOURCE:Fd,REGEX_NON_SPECIAL_CHARS:Od,REGEX_SPECIAL_CHARS_BACKREF:Nd,REPLACEMENTS:Va}=Ln,Md=(e,n)=>{if(typeof n.expandRange=="function")return n.expandRange(...e,n);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t)}catch{return e.map(i=>Ke.escapeRegex(i)).join("..")}return t},Gt=(e,n)=>`Missing ${e}: "${n}" - use "\\\\${n}" to match literal characters`,Ka=e=>{let n=[],t=0,r=0,i=0,o="",s=!1;for(let a of e){if(s===!0){o+=a,s=!1;continue}if(a==="\\"){o+=a,s=!0;continue}if(a==='"'){i=i===1?0:1,o+=a;continue}if(i===0){if(a==="[")t++;else if(a==="]"&&t>0)t--;else if(t===0){if(a==="(")r++;else if(a===")"&&r>0)r--;else if(a==="|"&&r===0){n.push(o),o="";continue}}}o+=a}return n.push(o),n},Pd=e=>{let n=!1;for(let t of e){if(n===!0){n=!1;continue}if(t==="\\"){n=!0;continue}if(/[?*+@!()[\]{}]/.test(t))return!1}return!0},Ui=e=>{let n=e.trim(),t=!0;for(;t===!0;)t=!1,/^@\([^\\()[\]{}|]+\)$/.test(n)&&(n=n.slice(2,-1),t=!0);if(Pd(n))return n.replace(/\\(.)/g,"$1")},Dd=e=>{let n=e.map(Ui).filter(Boolean);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],o=n[r],s=i[0];if(!(!s||i!==s.repeat(i.length)||o!==s.repeat(o.length))&&(i===o||i.startsWith(o)||o.startsWith(i)))return!0}return!1},ji=(e,n=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let t=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(o===!0){o=!1;continue}if(a==="\\"){o=!0;continue}if(a==='"'){i=i===1?0:1;continue}if(i!==1){if(a==="["){t++;continue}if(a==="]"&&t>0){t--;continue}if(!(t>0)){if(a==="("){r++;continue}if(a===")"&&(r--,r===0))return n===!0&&s!==e.length-1?void 0:{type:e[0],body:e.slice(2,s),end:s}}}}},Bd=e=>`${e.length===1?Ke.escapeRegex(e[0]):`[${e.map(t=>Ke.escapeRegex(t)).join("")}]`}*`,qd=e=>{let n=0,t=[];for(;n<e.length;){let r=ji(e.slice(n),!1);if(!r||r.type!=="*")return;let i=Ka(r.body).map(s=>s.trim());if(i.length!==1)return;let o=Ui(i[0]);if(!o||o.length!==1)return;t.push(o),n+=r.end+1}if(!(t.length<1))return t},Hd=e=>{let n=0,t=e.trim(),r=ji(t);for(;r;)n++,t=r.body.trim(),r=ji(t);return n},zd=(e,n)=>{if(n.maxExtglobRecursion===!1)return{risky:!1};let t=typeof n.maxExtglobRecursion=="number"?n.maxExtglobRecursion:Ln.DEFAULT_MAX_EXTGLOB_RECURSION,r=Ka(e).map(a=>a.trim());if(r.length>1&&(r.some(a=>a==="")||r.some(a=>/^[*?]+$/.test(a))||Dd(r)))return{risky:!0};let i=[],o=!1,s=!0;for(let a of r){let l=qd(a);if(l){o=!0,i.push(...l);continue}let u=Ui(a);if(u&&u.length===1){i.push(u);continue}if(s=!1,Hd(a)>t)return{risky:!0}}return o?s?{risky:!0,safeOutput:Bd([...new Set(i)])}:{risky:!0}:{risky:!1}},Wi=(e,n)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Va[e]||e;let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",l=Ln.globChars(t.windows),u=Ln.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:p,SLASH_LITERAL:m,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:w,NO_DOT_SLASH:k,NO_DOTS_SLASH:y,QMARK:S,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:B}=l,R=j=>`(${a}(?:(?!${B}${j.dot?h:c}).)*?)`,I=t.dot?"":w,N=t.dot?S:L,v=t.bash===!0?R(t):_;t.capture&&(v=`(${v})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let b={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=Ke.removePrefix(e,b),i=e.length;let Z=[],X=[],Y=[],E=o,x,P=()=>b.index===i-1,re=b.peek=(j=1)=>e[b.index+j],de=b.advance=()=>e[++b.index]||"",be=()=>e.slice(b.index+1),C=(j="",ge=0)=>{b.consumed+=j,b.index+=ge},le=j=>{b.output+=j.output!=null?j.output:j.value,C(j.value)},Le=()=>{let j=1;for(;re()==="!"&&(re(2)!=="("||re(3)==="?");)de(),b.start++,j++;return j%2===0?!1:(b.negated=!0,b.start++,!0)},A=j=>{b[j]++,Y.push(j)},ke=j=>{b[j]--,Y.pop()},ee=j=>{if(E.type==="globstar"){let ge=b.braces>0&&(j.type==="comma"||j.type==="brace"),z=j.extglob===!0||Z.length&&(j.type==="pipe"||j.type==="paren");j.type!=="slash"&&j.type!=="paren"&&!ge&&!z&&(b.output=b.output.slice(0,-E.output.length),E.type="star",E.value="*",E.output=v,b.output+=E.output)}if(Z.length&&j.type!=="paren"&&(Z[Z.length-1].inner+=j.value),(j.value||j.output)&&le(j),E&&E.type==="text"&&j.type==="text"){E.output=(E.output||E.value)+j.value,E.value+=j.value;return}j.prev=E,s.push(j),E=j},$e=(j,ge)=>{let z={...u[ge],conditions:1,inner:""};z.prev=E,z.parens=b.parens,z.output=b.output,z.startIndex=b.index,z.tokensIndex=s.length;let oe=(t.capture?"(":"")+z.open;A("parens"),ee({type:j,value:ge,output:b.output?"":d}),ee({type:"paren",extglob:!0,value:de(),output:oe}),Z.push(z)},Qe=j=>{let ge=e.slice(j.startIndex,b.index+1),z=e.slice(j.startIndex+2,b.index),oe=zd(z,t);if((j.type==="plus"||j.type==="star")&&oe.risky){let ye=oe.safeOutput?(j.output?"":d)+(t.capture?`(${oe.safeOutput})`:oe.safeOutput):void 0,Oe=s[j.tokensIndex];Oe.type="text",Oe.value=ge,Oe.output=ye||Ke.escapeRegex(ge);for(let Xe=j.tokensIndex+1;Xe<s.length;Xe++)s[Xe].value="",s[Xe].output="",delete s[Xe].suffix;b.output=j.output+Oe.output,b.backtrack=!0,ee({type:"paren",extglob:!0,value:x,output:""}),ke("parens");return}let he=j.close+(t.capture?")":""),we;if(j.type==="negate"){let ye=v;if(j.inner&&j.inner.length>1&&j.inner.includes("/")&&(ye=R(t)),(ye!==v||P()||/^\)+$/.test(be()))&&(he=j.close=`)$))${ye}`),j.inner.includes("*")&&(we=be())&&/^\.[^\\/.]+$/.test(we)){let Oe=Wi(we,{...n,fastpaths:!1}).output;he=j.close=`)${Oe})${ye})`}j.prev.type==="bos"&&(b.negatedExtglob=!0)}ee({type:"paren",extglob:!0,value:x,output:he}),ke("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let j=!1,ge=e.replace(Nd,(z,oe,he,we,ye,Oe)=>we==="\\"?(j=!0,z):we==="?"?oe?oe+we+(ye?S.repeat(ye.length):""):Oe===0?N+(ye?S.repeat(ye.length):""):S.repeat(he.length):we==="."?c.repeat(he.length):we==="*"?oe?oe+we+(ye?v:""):v:oe?z:`\\${z}`);return j===!0&&(t.unescape===!0?ge=ge.replace(/\\/g,""):ge=ge.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),ge===e&&t.contains===!0?(b.output=e,b):(b.output=Ke.wrapOutput(ge,b,n),b)}for(;!P();){if(x=de(),x==="\0")continue;if(x==="\\"){let z=re();if(z==="/"&&t.bash!==!0||z==="."||z===";")continue;if(!z){x+="\\",ee({type:"text",value:x});continue}let oe=/^\\+/.exec(be()),he=0;if(oe&&oe[0].length>2&&(he=oe[0].length,b.index+=he,he%2!==0&&(x+="\\")),t.unescape===!0?x=de():x+=de(),b.brackets===0){ee({type:"text",value:x});continue}}if(b.brackets>0&&(x!=="]"||E.value==="["||E.value==="[^")){if(t.posix!==!1&&x===":"){let z=E.value.slice(1);if(z.includes("[")&&(E.posix=!0,z.includes(":"))){let oe=E.value.lastIndexOf("["),he=E.value.slice(0,oe),we=E.value.slice(oe+2),ye=Fd[we];if(ye){E.value=he+ye,b.backtrack=!0,de(),!o.output&&s.indexOf(E)===1&&(o.output=d);continue}}}(x==="["&&re()!==":"||x==="-"&&re()==="]")&&(x=`\\${x}`),x==="]"&&(E.value==="["||E.value==="[^")&&(x=`\\${x}`),t.posix===!0&&x==="!"&&E.value==="["&&(x="^"),E.value+=x,le({value:x});continue}if(b.quotes===1&&x!=='"'){x=Ke.escapeRegex(x),E.value+=x,le({value:x});continue}if(x==='"'){b.quotes=b.quotes===1?0:1,t.keepQuotes===!0&&ee({type:"text",value:x});continue}if(x==="("){A("parens"),ee({type:"paren",value:x});continue}if(x===")"){if(b.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Gt("opening","("));let z=Z[Z.length-1];if(z&&b.parens===z.parens+1){Qe(Z.pop());continue}ee({type:"paren",value:x,output:b.parens?")":"\\)"}),ke("parens");continue}if(x==="["){if(t.nobracket===!0||!be().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));x=`\\${x}`}else A("brackets");ee({type:"bracket",value:x});continue}if(x==="]"){if(t.nobracket===!0||E&&E.type==="bracket"&&E.value.length===1){ee({type:"text",value:x,output:`\\${x}`});continue}if(b.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Gt("opening","["));ee({type:"text",value:x,output:`\\${x}`});continue}ke("brackets");let z=E.value.slice(1);if(E.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(x=`/${x}`),E.value+=x,le({value:x}),t.literalBrackets===!1||Ke.hasRegexChars(z))continue;let oe=Ke.escapeRegex(E.value);if(b.output=b.output.slice(0,-E.value.length),t.literalBrackets===!0){b.output+=oe,E.value=oe;continue}E.value=`(${a}${oe}|${E.value})`,b.output+=E.value;continue}if(x==="{"&&t.nobrace!==!0){A("braces");let z={type:"brace",value:x,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};X.push(z),ee(z);continue}if(x==="}"){let z=X[X.length-1];if(t.nobrace===!0||!z){ee({type:"text",value:x,output:x});continue}let oe=")";if(z.dots===!0){let he=s.slice(),we=[];for(let ye=he.length-1;ye>=0&&(s.pop(),he[ye].type!=="brace");ye--)he[ye].type!=="dots"&&we.unshift(he[ye].value);oe=Md(we,t),b.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let he=b.output.slice(0,z.outputIndex),we=b.tokens.slice(z.tokensIndex);z.value=z.output="\\{",x=oe="\\}",b.output=he;for(let ye of we)b.output+=ye.output||ye.value}ee({type:"brace",value:x,output:oe}),ke("braces"),X.pop();continue}if(x==="|"){Z.length>0&&Z[Z.length-1].conditions++,ee({type:"text",value:x});continue}if(x===","){let z=x,oe=X[X.length-1];oe&&Y[Y.length-1]==="braces"&&(oe.comma=!0,z="|"),ee({type:"comma",value:x,output:z});continue}if(x==="/"){if(E.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),E=o;continue}ee({type:"slash",value:x,output:m});continue}if(x==="."){if(b.braces>0&&E.type==="dot"){E.value==="."&&(E.output=c);let z=X[X.length-1];E.type="dots",E.output+=x,E.value+=x,z.dots=!0;continue}if(b.braces+b.parens===0&&E.type!=="bos"&&E.type!=="slash"){ee({type:"text",value:x,output:c});continue}ee({type:"dot",value:x,output:c});continue}if(x==="?"){if(!(E&&E.value==="(")&&t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("qmark",x);continue}if(E&&E.type==="paren"){let oe=re(),he=x;(E.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(be()))&&(he=`\\${x}`),ee({type:"text",value:x,output:he});continue}if(t.dot!==!0&&(E.type==="slash"||E.type==="bos")){ee({type:"qmark",value:x,output:L});continue}ee({type:"qmark",value:x,output:S});continue}if(x==="!"){if(t.noextglob!==!0&&re()==="("&&(re(2)!=="?"||!/[!=<:]/.test(re(3)))){$e("negate",x);continue}if(t.nonegate!==!0&&b.index===0){Le();continue}}if(x==="+"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){$e("plus",x);continue}if(E&&E.value==="("||t.regex===!1){ee({type:"plus",value:x,output:p});continue}if(E&&(E.type==="bracket"||E.type==="paren"||E.type==="brace")||b.parens>0){ee({type:"plus",value:x});continue}ee({type:"plus",value:p});continue}if(x==="@"){if(t.noextglob!==!0&&re()==="("&&re(2)!=="?"){ee({type:"at",extglob:!0,value:x,output:""});continue}ee({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let z=Od.exec(be());z&&(x+=z[0],b.index+=z[0].length),ee({type:"text",value:x});continue}if(E&&(E.type==="globstar"||E.star===!0)){E.type="star",E.star=!0,E.value+=x,E.output=v,b.backtrack=!0,b.globstar=!0,C(x);continue}let j=be();if(t.noextglob!==!0&&/^\([^?]/.test(j)){$e("star",x);continue}if(E.type==="star"){if(t.noglobstar===!0){C(x);continue}let z=E.prev,oe=z.prev,he=z.type==="slash"||z.type==="bos",we=oe&&(oe.type==="star"||oe.type==="globstar");if(t.bash===!0&&(!he||j[0]&&j[0]!=="/")){ee({type:"star",value:x,output:""});continue}let ye=b.braces>0&&(z.type==="comma"||z.type==="brace"),Oe=Z.length&&(z.type==="pipe"||z.type==="paren");if(!he&&z.type!=="paren"&&!ye&&!Oe){ee({type:"star",value:x,output:""});continue}for(;j.slice(0,3)==="/**";){let Ne=e[b.index+4];if(Ne&&Ne!=="/")break;j=j.slice(3),C("/**",3)}let Xe=P()||b.parens>0&&j===")".repeat(b.parens)&&!Z.some(Ne=>Ne.type==="negate");if(z.type==="bos"&&P()){E.type="globstar",E.value+=x,E.output=R(t),b.output=E.output,b.globstar=!0,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&Xe){b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=R(t)+(t.strictSlashes?")":"|$)"),E.value+=x,b.globstar=!0,b.output+=z.output+E.output,C(x);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&j[0]==="/"){let Ne=j[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(z.output+E.output).length),z.output=`(?:${z.output}`,E.type="globstar",E.output=`${R(t)}${m}|${m}${Ne})`,E.value+=x,b.output+=z.output+E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&j[0]==="/"){E.type="globstar",E.value+=x,E.output=`(?:^|${m}|${R(t)}${m})`,b.output=E.output,b.globstar=!0,C(x+de()),ee({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-E.output.length),E.type="globstar",E.output=R(t),E.value+=x,b.output+=E.output,b.globstar=!0,C(x);continue}let ge={type:"star",value:x,output:v};if(t.bash===!0){ge.output=".*?",(E.type==="bos"||E.type==="slash")&&(ge.output=I+ge.output),ee(ge);continue}if(E&&(E.type==="bracket"||E.type==="paren")&&t.regex===!0){ge.output=x,ee(ge);continue}(b.index===b.start||E.type==="slash"||E.type==="dot")&&(E.type==="dot"?(b.output+=k,E.output+=k):t.dot===!0?(b.output+=y,E.output+=y):(b.output+=I,E.output+=I),re()!=="*"&&(b.output+=d,E.output+=d)),ee(ge)}for(;b.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","]"));b.output=Ke.escapeLast(b.output,"["),ke("brackets")}for(;b.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing",")"));b.output=Ke.escapeLast(b.output,"("),ke("parens")}for(;b.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Gt("closing","}"));b.output=Ke.escapeLast(b.output,"{"),ke("braces")}if(t.strictSlashes!==!0&&(E.type==="star"||E.type==="bracket")&&ee({type:"maybe_slash",value:"",output:`${m}?`}),b.backtrack===!0){b.output="";for(let j of b.tokens)b.output+=j.output!=null?j.output:j.value,j.suffix&&(b.output+=j.suffix)}return b};Wi.fastpaths=(e,n)=>{let t={...n},r=typeof t.maxLength=="number"?Math.min(ir,t.maxLength):ir,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=Va[e]||e;let{DOT_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:c,NO_DOTS_SLASH:p,STAR:m,START_ANCHOR:d}=Ln.globChars(t.windows),h=t.dot?c:u,w=t.dot?p:u,k=t.capture?"":"?:",y={negated:!1,prefix:""},S=t.bash===!0?".*?":m;t.capture&&(S=`(${S})`);let L=I=>I.noglobstar===!0?S:`(${k}(?:(?!${d}${I.dot?l:o}).)*?)`,_=I=>{switch(I){case"*":return`${h}${a}${S}`;case".*":return`${o}${a}${S}`;case"*.*":return`${h}${S}${o}${a}${S}`;case"*/*":return`${h}${S}${s}${a}${w}${S}`;case"**":return h+L(t);case"**/*":return`(?:${h}${L(t)}${s})?${w}${a}${S}`;case"**/*.*":return`(?:${h}${L(t)}${s})?${w}${S}${o}${a}${S}`;case"**/.*":return`(?:${h}${L(t)}${s})?${o}${a}${S}`;default:{let N=/^(.*?)\.(\w+)$/.exec(I);if(!N)return;let v=_(N[1]);return v?v+o+N[2]:void 0}}},B=Ke.removePrefix(e,y),R=_(B);return R&&t.strictSlashes!==!0&&(R+=`${s}?`),R};Ga.exports=Wi});var Za=it((Bw,Xa)=>{"use strict";var jd=Wa(),Vi=Ya(),Qa=Cn(),Ud=Sn(),Wd=e=>e&&typeof e=="object"&&!Array.isArray(e),Ee=(e,n,t=!1)=>{if(Array.isArray(e)){let c=e.map(m=>Ee(m,n,t));return m=>{for(let d of c){let h=d(m);if(h)return h}return!1}}let r=Wd(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=n||{},o=i.windows,s=r?Ee.compileRe(e,n):Ee.makeRe(e,n,!1,!0),a=s.state;delete s.state;let l=()=>!1;if(i.ignore){let c={...n,ignore:null,onMatch:null,onResult:null};l=Ee(i.ignore,c,t)}let u=(c,p=!1)=>{let{isMatch:m,match:d,output:h}=Ee.test(c,s,n,{glob:e,posix:o}),w={glob:e,state:a,regex:s,posix:o,input:c,output:h,match:d,isMatch:m};return typeof i.onResult=="function"&&i.onResult(w),m===!1?(w.isMatch=!1,p?w:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(w),w.isMatch=!1,p?w:!1):(typeof i.onMatch=="function"&&i.onMatch(w),p?w:!0)};return t&&(u.state=a),u};Ee.test=(e,n,t,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Qa.toPosixSlashes:null),a=e===r,l=a&&s?s(e):e;return a===!1&&(l=s?s(e):e,a=l===r),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Ee.matchBase(e,n,t,i):a=n.exec(l)),{isMatch:!!a,match:a,output:l}};Ee.matchBase=(e,n,t,r=t&&t.windows)=>(n instanceof RegExp?n:Ee.makeRe(n,t)).test(Qa.basename(e,{windows:r}));Ee.isMatch=(e,n,t)=>Ee(n,t)(e);Ee.parse=(e,n)=>Array.isArray(e)?e.map(t=>Ee.parse(t,n)):Vi(e,{...n,fastpaths:!1});Ee.scan=(e,n)=>jd(e,n);Ee.compileRe=(e,n,t=!1,r=!1)=>{if(t===!0)return e.output;let i=n||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=Ee.toRegex(a,n);return r===!0&&(l.state=e),l};Ee.makeRe=(e,n={},t=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return n.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=Vi.fastpaths(e,n)),i.output||(i=Vi(e,n)),Ee.compileRe(i,n,t,r)};Ee.toRegex=(e,n)=>{try{let t=n||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(n&&n.debug===!0)throw t;return/$^/}};Ee.constants=Ud;Xa.exports=Ee});var or=it((qw,tl)=>{"use strict";var Ja=Za(),Vd=Cn();function el(e,n,t=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:Vd.isWindows()}),Ja(e,n,t)}Object.assign(el,Ja);tl.exports=el});var _l=it((NL,mo)=>{(function(){var e;typeof mo<"u"?e=mo.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,p=!1,m,d,h=!1,w,k=function(){return s[o++]},y=function(){for(var S="";/\d/.test(i[a]);)S+=i[a++],c=i[a];return S.length>0?parseInt(S):null};a<l;++a)if(c=i[a],p)switch(p=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,w=y(),c){case"b":u+=parseInt(k(),10).toString(2);break;case"c":m=k(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(k(),10);break;case"f":d=String(parseFloat(k()).toFixed(w||6)),u+=h?d:d.replace(/^0/,"");break;case"j":u+=JSON.stringify(k());break;case"o":u+="0"+parseInt(k(),10).toString(8);break;case"s":u+=k();break;case"x":u+="0x"+parseInt(k(),10).toString(16);break;case"X":u+="0x"+parseInt(k(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?p=!0:u+=c;return u}})()});var Yf=At(Ls(),1),Qf=At(ms(),1);function Rm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e={},Qn={},Et={},As;function bn(){if(As)return Et;As=1;function e(s){return typeof s>"u"||s===null}function n(s){return typeof s=="object"&&s!==null}function t(s){return Array.isArray(s)?s:e(s)?[]:[s]}function r(s,a){if(a){let l=Object.keys(a);for(let u=0,c=l.length;u<c;u+=1){let p=l[u];s[p]=a[p]}}return s}function i(s,a){let l="";for(let u=0;u<a;u+=1)l+=s;return l}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Et.isNothing=e,Et.isObject=n,Et.toArray=t,Et.repeat=i,Et.isNegativeZero=o,Et.extend=r,Et}var oi,Es;function kn(){if(Es)return oi;Es=1;function e(t,r){let i="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
8
8
 
9
9
  `+t.mark.snippet),o+" "+i):o}function n(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(r){return this.name+": "+e(this,r)},oi=n,oi}var si,Ts;function vm(){if(Ts)return si;Ts=1;let e=bn();function n(i,o,s,a,l){let u="",c="",p=Math.floor(l/2)-1;return a-o>p&&(u=" ... ",o=a-p+u.length),s-a>p&&(c=" ...",s=a+p-c.length),{str:u+i.slice(o,s).replace(/\t/g,"\u2192")+c,pos:a-o+u.length}}function t(i,o){return e.repeat(" ",o-i.length)+i}function r(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],l=[],u,c=-1;for(;u=s.exec(i.buffer);)l.push(u.index),a.push(u.index+u[0].length),i.position<=u.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);let p="",m=Math.min(i.line+o.linesAfter,l.length).toString().length,d=o.maxLength-(o.indent+m+3);for(let w=1;w<=o.linesBefore&&!(c-w<0);w++){let k=n(i.buffer,a[c-w],l[c-w],i.position-(a[c]-a[c-w]),d);p=e.repeat(" ",o.indent)+t((i.line-w+1).toString(),m)+" | "+k.str+`
10
10
  `+p}let h=n(i.buffer,a[c],l[c],i.position,d);p+=e.repeat(" ",o.indent)+t((i.line+1).toString(),m)+" | "+h.str+`
@@ -4,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{b as xe,f as Pe}from"./JUZHXP62.js";import{$ as fe,V as le,W as he,Z as b,aa as de,ba as j,c as L,da as ye,ea as U,f as ie,fa as A,ia as k,ja as Se,ka as ge,la as Q,ma as K,oa as Ce,q as ae,r as pe,ra as be,s as ce,v as me,w as ue}from"./VAPFU7OM.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as mt}from"perf_hooks";var D={thresholds:{maxParamsGood:5,maxDepthGood:4,maxPolymorphismGood:2,maxDependencyDepthGood:3,maxAmbiguousGood:0,maxOperationsForDiscoverability:1e3},weights:{parameterSimplicity:.1,schemaSimplicity:.1,documentationQuality:.18,constraintClarity:.12,exampleCoverage:.18,errorClarity:.12,dependencyClarity:.1,identifierClarity:.05,polymorphismClarity:.05,anyOfPenaltyMultiplier:2,discoverabilityWeight:.1},hotspotLimit:10},Oe=new Set(["id","name","type","value","data","key","status","state","code","result","item","object","resource","entity","input","output","payload","body","content","info"]);function B(e){if(e.length===0)return 0;let r=[...e].sort((o,n)=>o-n),t=Math.floor(r.length/2);return r.length%2!==0?r[t]:(r[t-1]+r[t])/2}function He(e,r,t=D){let{thresholds:o,weights:n}=t,s=x(1-e.parameterCount/(o.maxParamsGood*2)),a=Math.max(e.maxRequestSchemaDepth,e.maxResponseSchemaDepth)/(o.maxDepthGood*2),c=De(e,n.anyOfPenaltyMultiplier)/(o.maxPolymorphismGood*3),h=x(1-a-c),u=(e.operationDescriptionPresent?1:0)+e.paramsWithDescription+e.schemaPropertiesWithDescription,f=1+e.parameterCount+e.totalSchemaProperties,$=f>0?x(u/f):1,O=e.totalSchemaProperties>0?x(e.constraintCount/e.totalSchemaProperties):1,y=(e.requestExamplePresent?1:0)+(e.responseExamplePresent?1:0),g=(e.requestBodyPresent?1:0)+1,M=x(y/g),T=e.totalErrorResponses>0?x(e.structuredErrorResponseCount/e.totalErrorResponses):1,I=x(1-r/(o.maxDependencyDepthGood*2)),l=x(1-e.ambiguousIdentifierCount/Math.max(o.maxAmbiguousGood+3,1)),m=De(e,n.anyOfPenaltyMultiplier),d=m===0?1:e.hasDiscriminator?x(1-m/(o.maxPolymorphismGood*4)):x(1-m/(o.maxPolymorphismGood*2));return{parameterSimplicity:s,schemaSimplicity:h,documentationQuality:$,constraintClarity:O,exampleCoverage:M,errorClarity:T,dependencyClarity:I,identifierClarity:l,polymorphismClarity:d}}function ze(e,r=D){let t=r.weights,o=e.parameterSimplicity*t.parameterSimplicity+e.schemaSimplicity*t.schemaSimplicity+e.documentationQuality*t.documentationQuality+e.constraintClarity*t.constraintClarity+e.exampleCoverage*t.exampleCoverage+e.errorClarity*t.errorClarity+e.dependencyClarity*t.dependencyClarity+e.identifierClarity*t.identifierClarity+e.polymorphismClarity*t.polymorphismClarity;return $e(x(o)*100)}function Re(e,r,t=D){let o=new Map;for(let[n,s]of e.operations){let i=r.get(n)??0,a=He(s,i,t);o.set(n,{agentReadiness:ze(a,t),subscores:a})}return o}function Me(e,r=D){return x(1-e/r.thresholds.maxOperationsForDiscoverability)}function ve(e,r,t=D){if(e.size===0)return{agentReadiness:100};let o=[];for(let i of e.values())o.push(i.agentReadiness);let n=t.weights.discoverabilityWeight,s=r*100;return{agentReadiness:$e(B(o)*(1-n)+s*n)}}function J(e,r,t){return e-r+r*t}function De(e,r){return J(e.polymorphismCount,e.anyOfCount,r)}function x(e){return Math.max(0,Math.min(1,e))}function Ee(e){let r=e.size||1,t={parameterSimplicity:0,schemaSimplicity:0,documentationQuality:0,constraintClarity:0,exampleCoverage:0,errorClarity:0,dependencyClarity:0,identifierClarity:0,polymorphismClarity:0};for(let o of e.values())t.parameterSimplicity+=o.subscores.parameterSimplicity,t.schemaSimplicity+=o.subscores.schemaSimplicity,t.documentationQuality+=o.subscores.documentationQuality,t.constraintClarity+=o.subscores.constraintClarity,t.exampleCoverage+=o.subscores.exampleCoverage,t.errorClarity+=o.subscores.errorClarity,t.dependencyClarity+=o.subscores.dependencyClarity,t.identifierClarity+=o.subscores.identifierClarity,t.polymorphismClarity+=o.subscores.polymorphismClarity;return t.parameterSimplicity/=r,t.schemaSimplicity/=r,t.documentationQuality/=r,t.constraintClarity/=r,t.exampleCoverage/=r,t.errorClarity/=r,t.dependencyClarity/=r,t.identifierClarity/=r,t.polymorphismClarity/=r,t}function $e(e){return Math.round(e*10)/10}function we(e,r,t){let o=Math.max(1,e);return r/o+t/o}function Qe(e,r){return r.totalSchemaProperties>e.totalSchemaProperties?!0:r.totalSchemaProperties<e.totalSchemaProperties?!1:we(r.totalSchemaProperties,r.schemaPropertiesWithDescription,r.constraintCount)>we(e.totalSchemaProperties,e.schemaPropertiesWithDescription,e.constraintCount)}var Ke=["enum","const","format","pattern","minimum","maximum","minLength","maxLength","minItems","maxItems","minProperties","maxProperties","multipleOf","exclusiveMinimum","exclusiveMaximum","uniqueItems"];function Y(){return{depth:-1,maxDepth:0,polymorphismCount:0,anyOfCount:0,hasDiscriminator:!1,totalSchemaProperties:0,schemaPropertiesWithDescription:0,constraintCount:0,hasPropertyExamples:!1,writableTopLevelFields:0,refsUsed:[],debugEntries:null,pendingRef:null}}function Ie(e){Object.assign(e,Y())}function Le(e){return{ref:{enter(r){typeof r?.$ref=="string"&&(e.refsUsed.push(r.$ref),e.pendingRef=r.$ref)}},Schema:{enter(r,t){e.depth++,e.maxDepth=Math.max(e.maxDepth,e.depth);let o=0;for(let i of Ke)r[i]!==void 0&&(e.constraintCount++,o++);r.discriminator?.propertyName&&(e.hasDiscriminator=!0);let n={};for(let i of["oneOf","anyOf","allOf"]){let a=r[i];Array.isArray(a)&&(e.polymorphismCount+=a.length,i==="anyOf"&&(e.anyOfCount+=a.length),n[i]=a.length)}let s=[];if(L(r.properties)){let i=Object.entries(r.properties);e.totalSchemaProperties+=i.length;for(let[a,c]of i){s.push(a);let h=c&&"$ref"in c&&c.$ref?t.resolve(c)?.node??c:c;h?.description&&e.schemaPropertiesWithDescription++,(h?.example!==void 0||h?.examples)&&(e.hasPropertyExamples=!0),h?.readOnly||e.writableTopLevelFields++}}e.debugEntries!==null&&e.debugEntries.push({ref:e.pendingRef,depth:e.depth,propertyNames:s,polymorphism:Object.keys(n).length>0?n:{},constraintCount:o}),e.pendingRef=null},leave(){e.depth--}}}}function qe(e,r,t){return{operations:new Map,currentPath:"",pathLevelParams:[],current:null,walkSchema:e,anyOfPenaltyMultiplier:r,debugOperationId:t,debugLogs:[]}}function Je(e,r,t){return{path:e,method:r,operationId:t.operationId,operationDescriptionPresent:!!t.description,parameterCount:0,requiredParameterCount:0,paramsWithDescription:0,ambiguousIdentifierCount:0,maxRequestSchemaDepth:0,maxResponseSchemaDepth:0,totalSchemaProperties:0,schemaPropertiesWithDescription:0,constraintCount:0,polymorphismCount:0,anyOfCount:0,hasDiscriminator:!1,topLevelWritableFieldCount:0,requestBodyPresent:!1,requestExamplePresent:!1,responseExamplePresent:!1,structuredErrorResponseCount:0,totalErrorResponses:0,inRequestBody:!1,inResponse:!1,currentResponseCode:"",errorStructuredCounted:!1,maxEffectivePolymorphism:-1,refsUsed:new Set}}function Ye(e){let{inRequestBody:r,inResponse:t,currentResponseCode:o,errorStructuredCounted:n,maxEffectivePolymorphism:s,...i}=e;return i}function We(e){return{RequestBody:{enter(){e.current&&(e.current.requestBodyPresent=!0,e.current.inRequestBody=!0)},leave(){e.current&&(e.current.inRequestBody=!1)}},Response:{enter(r,t){let o=e.current;if(!o)return;let n=String(t.key);o.inResponse=!0,o.currentResponseCode=n,o.errorStructuredCounted=!1,Te(n)&&(o.totalErrorResponses++,!r.content&&r.description&&(o.structuredErrorResponseCount++,o.errorStructuredCounted=!0))},leave(){e.current&&(e.current.inResponse=!1)}},MediaType:{enter(r){let t=e.current;if(t&&(Ze(r)&&(t.inRequestBody&&(t.requestExamplePresent=!0),t.inResponse&&(t.responseExamplePresent=!0)),t.inResponse&&Te(t.currentResponseCode)&&!t.errorStructuredCounted&&(t.structuredErrorResponseCount++,t.errorStructuredCounted=!0),r.schema)){let o=!!e.debugOperationId&&(t.operationId===e.debugOperationId||`${t.method.toUpperCase()} ${t.path}`===e.debugOperationId),n=e.walkSchema(r.schema,o);Qe(t,n)&&(t.totalSchemaProperties=n.totalSchemaProperties,t.schemaPropertiesWithDescription=n.schemaPropertiesWithDescription,t.constraintCount=n.constraintCount);let s=J(n.polymorphismCount,n.anyOfCount,e.anyOfPenaltyMultiplier);s>t.maxEffectivePolymorphism&&(t.maxEffectivePolymorphism=s,t.polymorphismCount=n.polymorphismCount,t.anyOfCount=n.anyOfCount),n.hasDiscriminator&&(t.hasDiscriminator=!0);for(let i of n.refsUsed)t.refsUsed.add(i);if(n.hasPropertyExamples&&(t.inRequestBody&&(t.requestExamplePresent=!0),t.inResponse&&(t.responseExamplePresent=!0)),t.inRequestBody&&(t.maxRequestSchemaDepth=Math.max(t.maxRequestSchemaDepth,n.maxDepth),t.topLevelWritableFieldCount=Math.max(t.topLevelWritableFieldCount,n.writableTopLevelFields)),t.inResponse&&(t.maxResponseSchemaDepth=Math.max(t.maxResponseSchemaDepth,n.maxDepth)),o&&n.debugEntries){let i=t.inRequestBody?"REQUEST BODY":`RESPONSE ${t.currentResponseCode}`;e.debugLogs.push({context:i,entries:n.debugEntries,totalProperties:n.totalSchemaProperties,totalPolymorphism:n.polymorphismCount,totalConstraints:n.constraintCount,maxDepth:n.maxDepth})}}}},Paths:{PathItem:{enter(r,t){e.currentPath=String(t.key),e.pathLevelParams=r.parameters??[]},Operation:{enter(r,t){let o=String(t.key),n=Je(e.currentPath,o,r);e.current=n;let s=Xe(e.pathLevelParams,r.parameters??[],t.resolve);for(let i of s.values())n.parameterCount++,i.required&&n.requiredParameterCount++,i.description&&n.paramsWithDescription++,et(i)&&n.ambiguousIdentifierCount++},leave(r){let t=e.current;if(!t)return;let o=r.operationId??`${t.method.toUpperCase()} ${t.path}`;e.operations.set(o,Ye(t)),e.current=null}}}}}}function Ue(e){return{operationCount:e.operations.size,operations:e.operations}}function Ae(e,r){return r(e).node}function Xe(e,r,t){let o=new Map;for(let n of e){let s=Ae(n,t);s?.name&&s.in&&o.set(`${s.in}:${s.name}`,s)}for(let n of r){let s=Ae(n,t);s?.name&&s.in&&o.set(`${s.in}:${s.name}`,s)}return o}function Ze(e){return e.example!==void 0||ie(e.examples)}function et(e){if(e.description)return!1;let r=(e.name??"").toLowerCase();return Oe.has(r)}function Te(e){if(e==="default"||/^4xx$/i.test(e)||/^5xx$/i.test(e))return!0;let r=parseInt(e,10);return r>=400&&r<600}function tt(e,r){if(!r.startsWith("#/"))return;let t=e;for(let o of r.slice(2).split("/"))t=t?.[ce(o)];return t}function ke({document:e,types:r,resolvedRefMap:t,ctx:o,debugOperationId:n,scoringConstants:s}){let i=s?.weights.anyOfPenaltyMultiplier??D.weights.anyOfPenaltyMultiplier,a=Y(),c=Le(a),h=Q([{severity:"warn",ruleId:"score-schema",visitor:c}],r),u=(l,m)=>{Ie(a),m&&(a.debugEntries=[]),K({document:{...e,parsed:l},rootType:r.Schema,normalizedVisitors:h,resolvedRefMap:t,ctx:o});let{depth:d,pendingRef:w,debugEntries:_,...N}=a;return{...N,refsUsed:[...a.refsUsed],debugEntries:m?a.debugEntries??void 0:void 0}},f=new Map,$=new WeakSet,O={maxDepth:0,polymorphismCount:0,anyOfCount:0,hasDiscriminator:!1,totalSchemaProperties:0,schemaPropertiesWithDescription:0,constraintCount:0,hasPropertyExamples:!1,writableTopLevelFields:0,refsUsed:[]};function y(l,m){return{maxDepth:Math.max(l.maxDepth,m.maxDepth),polymorphismCount:l.polymorphismCount+m.polymorphismCount,anyOfCount:l.anyOfCount+m.anyOfCount,hasDiscriminator:l.hasDiscriminator||m.hasDiscriminator,totalSchemaProperties:l.totalSchemaProperties+m.totalSchemaProperties,schemaPropertiesWithDescription:l.schemaPropertiesWithDescription+m.schemaPropertiesWithDescription,constraintCount:l.constraintCount+m.constraintCount,hasPropertyExamples:l.hasPropertyExamples||m.hasPropertyExamples,writableTopLevelFields:l.writableTopLevelFields+m.writableTopLevelFields,refsUsed:[...l.refsUsed,...m.refsUsed],debugEntries:l.debugEntries||m.debugEntries?[...l.debugEntries??[],...m.debugEntries??[]]:void 0}}let g=(l,m=!1)=>{let d=l,w=pe(l)?l.$ref:void 0;if(w){if(!m){let S=f.get(w);if(S)return S}d=tt(e.parsed,w)??l}if(L(d)&&$.has(d))return{...O};L(d)&&$.add(d);let _=d?.oneOf,N=d?.anyOf,Z=Array.isArray(_)&&_.length>1,ee=Array.isArray(N)&&N.length>1,G=Z||ee,te=Array.isArray(d?.allOf)&&d.allOf.length>0,V=d?.discriminator,q=!G&&L(V?.mapping)?Object.values(V.mapping).filter(S=>typeof S=="string"&&me(S)).map(S=>({$ref:S})):null,re=Array.isArray(q)&&q.length>0,C;if(G||te||re){let S={...d},F=null,oe=P=>{F=F?y(F,P):P},ne=(P,v)=>{let E=g(v[0],m);for(let z=1;z<v.length;z++){let se=g(v[z],m);se.totalSchemaProperties>E.totalSchemaProperties&&(E=se)}return{...E,polymorphismCount:E.polymorphismCount+v.length,anyOfCount:E.anyOfCount+(P==="anyOf"?v.length:0),hasDiscriminator:E.hasDiscriminator||!!V}};G&&delete S.discriminator,Z&&(delete S.oneOf,oe(ne("oneOf",_))),ee&&(delete S.anyOf,oe(ne("anyOf",N)));let H=null;if(re){delete S.discriminator;let P=g(q[0],m);for(let v=1;v<q.length;v++){let E=g(q[v],m);E.totalSchemaProperties>P.totalSchemaProperties&&(P=E)}H={...P,polymorphismCount:P.polymorphismCount+q.length,hasDiscriminator:!0}}let W=null;if(te){delete S.allOf,W={...O};for(let P of d.allOf)W=y(W,g(P,m));W.polymorphismCount+=d.allOf.length}C=u(S,m),W&&(C=y(C,W)),F&&(C=y(C,F)),H&&(C=y(C,H)),w&&(C={...C,refsUsed:[w,...C.refsUsed]})}else C=u(l,m);return L(d)&&$.delete(d),w&&!m&&f.set(w,C),C},M=qe(g,i,n),T=We(M),I=Q([{severity:"warn",ruleId:"score",visitor:T}],r);return K({document:e,rootType:r.Root,normalizedVisitors:I,resolvedRefMap:t,ctx:o}),{metrics:Ue(M),debugLogs:M.debugLogs}}function Ne(e){let r=new Map;for(let[n,s]of e)for(let i of s.refsUsed){let a=r.get(i);a||(a=new Set,r.set(i,a)),a.add(n)}let t=new Map;for(let n of e.keys())t.set(n,new Set);for(let n of r.values()){if(n.size<2)continue;let s=Array.from(n);for(let i=0;i<s.length;i++)for(let a=i+1;a<s.length;a++)t.get(s[i]).add(s[a]),t.get(s[a]).add(s[i])}let o=new Map;for(let n of e.keys()){let s=rt(n,t);o.set(n,s)}return o}function rt(e,r){let t=new Set([e]),o=[e],n=0;for(;o.length>0;){let s=[];for(let i of o)for(let a of r.get(i)??[])t.has(a)||(t.add(a),s.push(a));s.length>0&&n++,o=s}return n}function Fe(e){let r={agentReadiness:e.agentReadiness,discoverability:Math.round(e.discoverability*100),subscores:e.subscores,rawMetrics:{operationCount:e.rawMetrics.operationCount,operations:Object.fromEntries(Array.from(e.rawMetrics.operations.entries()).map(([t,o])=>{let{refsUsed:n,...s}=o;return[t,s]}))},operationScores:Object.fromEntries(e.operationScores),dependencyDepths:Object.fromEntries(e.dependencyDepths),hotspots:e.hotspots};k.output(JSON.stringify(r,null,2))}function je(e,r=!1){ot(e),nt(e),it(e),r&&at(e),pt(e)}function _e(e){return e>=80?de:e>=50?j:fe}function Be(e){return _e(e)(b(e.toFixed(1)))}function p(e){k.output(e+`
7
+ import{b as xe,f as Pe}from"./LLF5CY3L.js";import{$ as fe,V as le,W as he,Z as b,aa as de,ba as j,c as L,da as ye,ea as U,f as ie,fa as A,ia as k,ja as Se,ka as ge,la as Q,ma as K,oa as Ce,q as ae,r as pe,ra as be,s as ce,v as me,w as ue}from"./YUBO3M45.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";import{performance as mt}from"perf_hooks";var D={thresholds:{maxParamsGood:5,maxDepthGood:4,maxPolymorphismGood:2,maxDependencyDepthGood:3,maxAmbiguousGood:0,maxOperationsForDiscoverability:1e3},weights:{parameterSimplicity:.1,schemaSimplicity:.1,documentationQuality:.18,constraintClarity:.12,exampleCoverage:.18,errorClarity:.12,dependencyClarity:.1,identifierClarity:.05,polymorphismClarity:.05,anyOfPenaltyMultiplier:2,discoverabilityWeight:.1},hotspotLimit:10},Oe=new Set(["id","name","type","value","data","key","status","state","code","result","item","object","resource","entity","input","output","payload","body","content","info"]);function B(e){if(e.length===0)return 0;let r=[...e].sort((o,n)=>o-n),t=Math.floor(r.length/2);return r.length%2!==0?r[t]:(r[t-1]+r[t])/2}function He(e,r,t=D){let{thresholds:o,weights:n}=t,s=x(1-e.parameterCount/(o.maxParamsGood*2)),a=Math.max(e.maxRequestSchemaDepth,e.maxResponseSchemaDepth)/(o.maxDepthGood*2),c=De(e,n.anyOfPenaltyMultiplier)/(o.maxPolymorphismGood*3),h=x(1-a-c),u=(e.operationDescriptionPresent?1:0)+e.paramsWithDescription+e.schemaPropertiesWithDescription,f=1+e.parameterCount+e.totalSchemaProperties,$=f>0?x(u/f):1,O=e.totalSchemaProperties>0?x(e.constraintCount/e.totalSchemaProperties):1,y=(e.requestExamplePresent?1:0)+(e.responseExamplePresent?1:0),g=(e.requestBodyPresent?1:0)+1,M=x(y/g),T=e.totalErrorResponses>0?x(e.structuredErrorResponseCount/e.totalErrorResponses):1,I=x(1-r/(o.maxDependencyDepthGood*2)),l=x(1-e.ambiguousIdentifierCount/Math.max(o.maxAmbiguousGood+3,1)),m=De(e,n.anyOfPenaltyMultiplier),d=m===0?1:e.hasDiscriminator?x(1-m/(o.maxPolymorphismGood*4)):x(1-m/(o.maxPolymorphismGood*2));return{parameterSimplicity:s,schemaSimplicity:h,documentationQuality:$,constraintClarity:O,exampleCoverage:M,errorClarity:T,dependencyClarity:I,identifierClarity:l,polymorphismClarity:d}}function ze(e,r=D){let t=r.weights,o=e.parameterSimplicity*t.parameterSimplicity+e.schemaSimplicity*t.schemaSimplicity+e.documentationQuality*t.documentationQuality+e.constraintClarity*t.constraintClarity+e.exampleCoverage*t.exampleCoverage+e.errorClarity*t.errorClarity+e.dependencyClarity*t.dependencyClarity+e.identifierClarity*t.identifierClarity+e.polymorphismClarity*t.polymorphismClarity;return $e(x(o)*100)}function Re(e,r,t=D){let o=new Map;for(let[n,s]of e.operations){let i=r.get(n)??0,a=He(s,i,t);o.set(n,{agentReadiness:ze(a,t),subscores:a})}return o}function Me(e,r=D){return x(1-e/r.thresholds.maxOperationsForDiscoverability)}function ve(e,r,t=D){if(e.size===0)return{agentReadiness:100};let o=[];for(let i of e.values())o.push(i.agentReadiness);let n=t.weights.discoverabilityWeight,s=r*100;return{agentReadiness:$e(B(o)*(1-n)+s*n)}}function J(e,r,t){return e-r+r*t}function De(e,r){return J(e.polymorphismCount,e.anyOfCount,r)}function x(e){return Math.max(0,Math.min(1,e))}function Ee(e){let r=e.size||1,t={parameterSimplicity:0,schemaSimplicity:0,documentationQuality:0,constraintClarity:0,exampleCoverage:0,errorClarity:0,dependencyClarity:0,identifierClarity:0,polymorphismClarity:0};for(let o of e.values())t.parameterSimplicity+=o.subscores.parameterSimplicity,t.schemaSimplicity+=o.subscores.schemaSimplicity,t.documentationQuality+=o.subscores.documentationQuality,t.constraintClarity+=o.subscores.constraintClarity,t.exampleCoverage+=o.subscores.exampleCoverage,t.errorClarity+=o.subscores.errorClarity,t.dependencyClarity+=o.subscores.dependencyClarity,t.identifierClarity+=o.subscores.identifierClarity,t.polymorphismClarity+=o.subscores.polymorphismClarity;return t.parameterSimplicity/=r,t.schemaSimplicity/=r,t.documentationQuality/=r,t.constraintClarity/=r,t.exampleCoverage/=r,t.errorClarity/=r,t.dependencyClarity/=r,t.identifierClarity/=r,t.polymorphismClarity/=r,t}function $e(e){return Math.round(e*10)/10}function we(e,r,t){let o=Math.max(1,e);return r/o+t/o}function Qe(e,r){return r.totalSchemaProperties>e.totalSchemaProperties?!0:r.totalSchemaProperties<e.totalSchemaProperties?!1:we(r.totalSchemaProperties,r.schemaPropertiesWithDescription,r.constraintCount)>we(e.totalSchemaProperties,e.schemaPropertiesWithDescription,e.constraintCount)}var Ke=["enum","const","format","pattern","minimum","maximum","minLength","maxLength","minItems","maxItems","minProperties","maxProperties","multipleOf","exclusiveMinimum","exclusiveMaximum","uniqueItems"];function Y(){return{depth:-1,maxDepth:0,polymorphismCount:0,anyOfCount:0,hasDiscriminator:!1,totalSchemaProperties:0,schemaPropertiesWithDescription:0,constraintCount:0,hasPropertyExamples:!1,writableTopLevelFields:0,refsUsed:[],debugEntries:null,pendingRef:null}}function Ie(e){Object.assign(e,Y())}function Le(e){return{ref:{enter(r){typeof r?.$ref=="string"&&(e.refsUsed.push(r.$ref),e.pendingRef=r.$ref)}},Schema:{enter(r,t){e.depth++,e.maxDepth=Math.max(e.maxDepth,e.depth);let o=0;for(let i of Ke)r[i]!==void 0&&(e.constraintCount++,o++);r.discriminator?.propertyName&&(e.hasDiscriminator=!0);let n={};for(let i of["oneOf","anyOf","allOf"]){let a=r[i];Array.isArray(a)&&(e.polymorphismCount+=a.length,i==="anyOf"&&(e.anyOfCount+=a.length),n[i]=a.length)}let s=[];if(L(r.properties)){let i=Object.entries(r.properties);e.totalSchemaProperties+=i.length;for(let[a,c]of i){s.push(a);let h=c&&"$ref"in c&&c.$ref?t.resolve(c)?.node??c:c;h?.description&&e.schemaPropertiesWithDescription++,(h?.example!==void 0||h?.examples)&&(e.hasPropertyExamples=!0),h?.readOnly||e.writableTopLevelFields++}}e.debugEntries!==null&&e.debugEntries.push({ref:e.pendingRef,depth:e.depth,propertyNames:s,polymorphism:Object.keys(n).length>0?n:{},constraintCount:o}),e.pendingRef=null},leave(){e.depth--}}}}function qe(e,r,t){return{operations:new Map,currentPath:"",pathLevelParams:[],current:null,walkSchema:e,anyOfPenaltyMultiplier:r,debugOperationId:t,debugLogs:[]}}function Je(e,r,t){return{path:e,method:r,operationId:t.operationId,operationDescriptionPresent:!!t.description,parameterCount:0,requiredParameterCount:0,paramsWithDescription:0,ambiguousIdentifierCount:0,maxRequestSchemaDepth:0,maxResponseSchemaDepth:0,totalSchemaProperties:0,schemaPropertiesWithDescription:0,constraintCount:0,polymorphismCount:0,anyOfCount:0,hasDiscriminator:!1,topLevelWritableFieldCount:0,requestBodyPresent:!1,requestExamplePresent:!1,responseExamplePresent:!1,structuredErrorResponseCount:0,totalErrorResponses:0,inRequestBody:!1,inResponse:!1,currentResponseCode:"",errorStructuredCounted:!1,maxEffectivePolymorphism:-1,refsUsed:new Set}}function Ye(e){let{inRequestBody:r,inResponse:t,currentResponseCode:o,errorStructuredCounted:n,maxEffectivePolymorphism:s,...i}=e;return i}function We(e){return{RequestBody:{enter(){e.current&&(e.current.requestBodyPresent=!0,e.current.inRequestBody=!0)},leave(){e.current&&(e.current.inRequestBody=!1)}},Response:{enter(r,t){let o=e.current;if(!o)return;let n=String(t.key);o.inResponse=!0,o.currentResponseCode=n,o.errorStructuredCounted=!1,Te(n)&&(o.totalErrorResponses++,!r.content&&r.description&&(o.structuredErrorResponseCount++,o.errorStructuredCounted=!0))},leave(){e.current&&(e.current.inResponse=!1)}},MediaType:{enter(r){let t=e.current;if(t&&(Ze(r)&&(t.inRequestBody&&(t.requestExamplePresent=!0),t.inResponse&&(t.responseExamplePresent=!0)),t.inResponse&&Te(t.currentResponseCode)&&!t.errorStructuredCounted&&(t.structuredErrorResponseCount++,t.errorStructuredCounted=!0),r.schema)){let o=!!e.debugOperationId&&(t.operationId===e.debugOperationId||`${t.method.toUpperCase()} ${t.path}`===e.debugOperationId),n=e.walkSchema(r.schema,o);Qe(t,n)&&(t.totalSchemaProperties=n.totalSchemaProperties,t.schemaPropertiesWithDescription=n.schemaPropertiesWithDescription,t.constraintCount=n.constraintCount);let s=J(n.polymorphismCount,n.anyOfCount,e.anyOfPenaltyMultiplier);s>t.maxEffectivePolymorphism&&(t.maxEffectivePolymorphism=s,t.polymorphismCount=n.polymorphismCount,t.anyOfCount=n.anyOfCount),n.hasDiscriminator&&(t.hasDiscriminator=!0);for(let i of n.refsUsed)t.refsUsed.add(i);if(n.hasPropertyExamples&&(t.inRequestBody&&(t.requestExamplePresent=!0),t.inResponse&&(t.responseExamplePresent=!0)),t.inRequestBody&&(t.maxRequestSchemaDepth=Math.max(t.maxRequestSchemaDepth,n.maxDepth),t.topLevelWritableFieldCount=Math.max(t.topLevelWritableFieldCount,n.writableTopLevelFields)),t.inResponse&&(t.maxResponseSchemaDepth=Math.max(t.maxResponseSchemaDepth,n.maxDepth)),o&&n.debugEntries){let i=t.inRequestBody?"REQUEST BODY":`RESPONSE ${t.currentResponseCode}`;e.debugLogs.push({context:i,entries:n.debugEntries,totalProperties:n.totalSchemaProperties,totalPolymorphism:n.polymorphismCount,totalConstraints:n.constraintCount,maxDepth:n.maxDepth})}}}},Paths:{PathItem:{enter(r,t){e.currentPath=String(t.key),e.pathLevelParams=r.parameters??[]},Operation:{enter(r,t){let o=String(t.key),n=Je(e.currentPath,o,r);e.current=n;let s=Xe(e.pathLevelParams,r.parameters??[],t.resolve);for(let i of s.values())n.parameterCount++,i.required&&n.requiredParameterCount++,i.description&&n.paramsWithDescription++,et(i)&&n.ambiguousIdentifierCount++},leave(r){let t=e.current;if(!t)return;let o=r.operationId??`${t.method.toUpperCase()} ${t.path}`;e.operations.set(o,Ye(t)),e.current=null}}}}}}function Ue(e){return{operationCount:e.operations.size,operations:e.operations}}function Ae(e,r){return r(e).node}function Xe(e,r,t){let o=new Map;for(let n of e){let s=Ae(n,t);s?.name&&s.in&&o.set(`${s.in}:${s.name}`,s)}for(let n of r){let s=Ae(n,t);s?.name&&s.in&&o.set(`${s.in}:${s.name}`,s)}return o}function Ze(e){return e.example!==void 0||ie(e.examples)}function et(e){if(e.description)return!1;let r=(e.name??"").toLowerCase();return Oe.has(r)}function Te(e){if(e==="default"||/^4xx$/i.test(e)||/^5xx$/i.test(e))return!0;let r=parseInt(e,10);return r>=400&&r<600}function tt(e,r){if(!r.startsWith("#/"))return;let t=e;for(let o of r.slice(2).split("/"))t=t?.[ce(o)];return t}function ke({document:e,types:r,resolvedRefMap:t,ctx:o,debugOperationId:n,scoringConstants:s}){let i=s?.weights.anyOfPenaltyMultiplier??D.weights.anyOfPenaltyMultiplier,a=Y(),c=Le(a),h=Q([{severity:"warn",ruleId:"score-schema",visitor:c}],r),u=(l,m)=>{Ie(a),m&&(a.debugEntries=[]),K({document:{...e,parsed:l},rootType:r.Schema,normalizedVisitors:h,resolvedRefMap:t,ctx:o});let{depth:d,pendingRef:w,debugEntries:_,...N}=a;return{...N,refsUsed:[...a.refsUsed],debugEntries:m?a.debugEntries??void 0:void 0}},f=new Map,$=new WeakSet,O={maxDepth:0,polymorphismCount:0,anyOfCount:0,hasDiscriminator:!1,totalSchemaProperties:0,schemaPropertiesWithDescription:0,constraintCount:0,hasPropertyExamples:!1,writableTopLevelFields:0,refsUsed:[]};function y(l,m){return{maxDepth:Math.max(l.maxDepth,m.maxDepth),polymorphismCount:l.polymorphismCount+m.polymorphismCount,anyOfCount:l.anyOfCount+m.anyOfCount,hasDiscriminator:l.hasDiscriminator||m.hasDiscriminator,totalSchemaProperties:l.totalSchemaProperties+m.totalSchemaProperties,schemaPropertiesWithDescription:l.schemaPropertiesWithDescription+m.schemaPropertiesWithDescription,constraintCount:l.constraintCount+m.constraintCount,hasPropertyExamples:l.hasPropertyExamples||m.hasPropertyExamples,writableTopLevelFields:l.writableTopLevelFields+m.writableTopLevelFields,refsUsed:[...l.refsUsed,...m.refsUsed],debugEntries:l.debugEntries||m.debugEntries?[...l.debugEntries??[],...m.debugEntries??[]]:void 0}}let g=(l,m=!1)=>{let d=l,w=pe(l)?l.$ref:void 0;if(w){if(!m){let S=f.get(w);if(S)return S}d=tt(e.parsed,w)??l}if(L(d)&&$.has(d))return{...O};L(d)&&$.add(d);let _=d?.oneOf,N=d?.anyOf,Z=Array.isArray(_)&&_.length>1,ee=Array.isArray(N)&&N.length>1,G=Z||ee,te=Array.isArray(d?.allOf)&&d.allOf.length>0,V=d?.discriminator,q=!G&&L(V?.mapping)?Object.values(V.mapping).filter(S=>typeof S=="string"&&me(S)).map(S=>({$ref:S})):null,re=Array.isArray(q)&&q.length>0,C;if(G||te||re){let S={...d},F=null,oe=P=>{F=F?y(F,P):P},ne=(P,v)=>{let E=g(v[0],m);for(let z=1;z<v.length;z++){let se=g(v[z],m);se.totalSchemaProperties>E.totalSchemaProperties&&(E=se)}return{...E,polymorphismCount:E.polymorphismCount+v.length,anyOfCount:E.anyOfCount+(P==="anyOf"?v.length:0),hasDiscriminator:E.hasDiscriminator||!!V}};G&&delete S.discriminator,Z&&(delete S.oneOf,oe(ne("oneOf",_))),ee&&(delete S.anyOf,oe(ne("anyOf",N)));let H=null;if(re){delete S.discriminator;let P=g(q[0],m);for(let v=1;v<q.length;v++){let E=g(q[v],m);E.totalSchemaProperties>P.totalSchemaProperties&&(P=E)}H={...P,polymorphismCount:P.polymorphismCount+q.length,hasDiscriminator:!0}}let W=null;if(te){delete S.allOf,W={...O};for(let P of d.allOf)W=y(W,g(P,m));W.polymorphismCount+=d.allOf.length}C=u(S,m),W&&(C=y(C,W)),F&&(C=y(C,F)),H&&(C=y(C,H)),w&&(C={...C,refsUsed:[w,...C.refsUsed]})}else C=u(l,m);return L(d)&&$.delete(d),w&&!m&&f.set(w,C),C},M=qe(g,i,n),T=We(M),I=Q([{severity:"warn",ruleId:"score",visitor:T}],r);return K({document:e,rootType:r.Root,normalizedVisitors:I,resolvedRefMap:t,ctx:o}),{metrics:Ue(M),debugLogs:M.debugLogs}}function Ne(e){let r=new Map;for(let[n,s]of e)for(let i of s.refsUsed){let a=r.get(i);a||(a=new Set,r.set(i,a)),a.add(n)}let t=new Map;for(let n of e.keys())t.set(n,new Set);for(let n of r.values()){if(n.size<2)continue;let s=Array.from(n);for(let i=0;i<s.length;i++)for(let a=i+1;a<s.length;a++)t.get(s[i]).add(s[a]),t.get(s[a]).add(s[i])}let o=new Map;for(let n of e.keys()){let s=rt(n,t);o.set(n,s)}return o}function rt(e,r){let t=new Set([e]),o=[e],n=0;for(;o.length>0;){let s=[];for(let i of o)for(let a of r.get(i)??[])t.has(a)||(t.add(a),s.push(a));s.length>0&&n++,o=s}return n}function Fe(e){let r={agentReadiness:e.agentReadiness,discoverability:Math.round(e.discoverability*100),subscores:e.subscores,rawMetrics:{operationCount:e.rawMetrics.operationCount,operations:Object.fromEntries(Array.from(e.rawMetrics.operations.entries()).map(([t,o])=>{let{refsUsed:n,...s}=o;return[t,s]}))},operationScores:Object.fromEntries(e.operationScores),dependencyDepths:Object.fromEntries(e.dependencyDepths),hotspots:e.hotspots};k.output(JSON.stringify(r,null,2))}function je(e,r=!1){ot(e),nt(e),it(e),r&&at(e),pt(e)}function _e(e){return e>=80?de:e>=50?j:fe}function Be(e){return _e(e)(b(e.toFixed(1)))}function p(e){k.output(e+`
8
8
  `)}function ot(e){p(""),p(b(A(" Scores"))),p(""),p(` Agent Readiness: ${Be(e.agentReadiness)}/100`),p("")}function nt(e){p(b(A(" Subscores"))),p("");let r=e.subscores;R("Parameter Simplicity",r.parameterSimplicity),R("Schema Simplicity",r.schemaSimplicity),R("Documentation Quality",r.documentationQuality),R("Constraint Clarity",r.constraintClarity),R("Example Coverage",r.exampleCoverage),R("Error Clarity",r.errorClarity),R("Dependency Clarity",r.dependencyClarity),R("Identifier Clarity",r.identifierClarity),R("Polymorphism Clarity",r.polymorphismClarity),R("Discoverability",e.discoverability),p("")}function R(e,r){let t=Math.round(r*100),o=st(r);p(` ${e.padEnd(24)} ${o} ${_e(t)(t+"%")}`)}function st(e){let t=Math.round(e*20);return U("["+"\u2588".repeat(t)+"\u2591".repeat(20-t)+"]")}function it(e){if(p(b(A(" Raw Metrics Summary"))),p(""),p(` Total operations: ${e.rawMetrics.operationCount}`),e.rawMetrics.operationCount===0){p("");return}let r=[],t=[],o=[],n=[],s=0,i=0,a=0;for(let u of e.rawMetrics.operations.values())r.push(u.parameterCount),t.push(Math.max(u.maxRequestSchemaDepth,u.maxResponseSchemaDepth)),o.push(u.polymorphismCount),n.push(u.totalSchemaProperties),u.requestExamplePresent&&s++,u.responseExamplePresent&&i++,u.operationDescriptionPresent&&a++;let c=e.rawMetrics.operationCount;function h(u,f){let O=(f.reduce((T,I)=>T+I,0)/c).toFixed(1),y=B(f).toFixed(1),g=Math.min(...f),M=Math.max(...f);p(` ${u.padEnd(26)} avg ${O.padStart(6)} median ${y.padStart(6)} min ${String(g).padStart(5)} max ${String(M).padStart(5)}`)}h("Parameters/operation:",r),h("Schema depth:",t),h("Polymorphism/operation:",o),h("Properties/operation:",n),p(` Operations with request examples: ${s}/${c} (${X(s,c)})`),p(` Operations with response examples: ${i}/${c} (${X(i,c)})`),p(` Operations with description: ${a}/${c} (${X(a,c)})`),p("")}function X(e,r){return r>0?`${Math.round(e/r*100)}%`:"N/A"}function at(e){p(b(A(" Per-Operation Metrics"))),p("");let r=" "+"Operation".padEnd(50)+"Props".padStart(7)+"Poly".padStart(7)+"Depth".padStart(7)+"Params".padStart(8)+"Constr".padStart(8);p(U(r)),p(U(" "+"\u2500".repeat(r.length-2)));let t=[...e.rawMetrics.operations.entries()].sort(([,o],[,n])=>n.totalSchemaProperties-o.totalSchemaProperties);for(let[,o]of t){let n=(o.operationId??`${o.method.toUpperCase()} ${o.path}`).slice(0,48),s=Math.max(o.maxRequestSchemaDepth,o.maxResponseSchemaDepth),i=" "+n.padEnd(50)+String(o.totalSchemaProperties).padStart(7)+String(o.polymorphismCount).padStart(7)+String(s).padStart(7)+String(o.parameterCount).padStart(8)+String(o.constraintCount).padStart(8);p(i)}p("")}function Ge(e,r){if(p(""),p(b(A(` Debug: ${e} schema breakdown`))),p(""),r.length===0){p(j(` No schemas found for operation "${e}".`)),p(j(' Make sure the value matches an operationId or "METHOD /path" exactly.')),p("");return}for(let t of r){p(b(U(` ${t.context}`))),p(U(" "+"\u2500".repeat(70)));let o=new Map;for(let s of t.entries){let i=s.ref??`(inline depth ${s.depth})`,a=o.get(i);if(a){a.count++,a.totalProps+=s.propertyNames.length;for(let c of s.propertyNames)a.propNames.includes(c)||a.propNames.push(c)}else o.set(i,{count:1,totalProps:s.propertyNames.length,propNames:[...s.propertyNames]})}for(let s of t.entries){let i=s.ref??"(inline)",a=" ".repeat(Math.min(s.depth,6)),c=s.propertyNames.length,h=` ${a}${i}`;c>0&&(h+=` (${c} properties)`);let u=[];if(s.polymorphism.oneOf&&u.push(`oneOf:${s.polymorphism.oneOf}`),s.polymorphism.anyOf&&u.push(`anyOf:${s.polymorphism.anyOf}`),s.polymorphism.allOf&&u.push(`allOf:${s.polymorphism.allOf}`),u.length>0&&(h+=` [${u.join(", ")}]`),s.constraintCount>0&&(h+=` {${s.constraintCount} constraints}`),p(h),c>0&&c<=20)p(` ${a} properties: ${s.propertyNames.join(", ")}`);else if(c>20){let f=s.propertyNames.slice(0,15).join(", ");p(` ${a} properties: ${f}, ... +${c-15} more`)}}p(""),p(` Totals: ${t.totalProperties} properties, ${t.totalPolymorphism} polymorphism items, ${t.totalConstraints} constraints, max depth ${t.maxDepth}`);let n=[...o.entries()].filter(([,s])=>s.totalProps>0).sort(([,s],[,i])=>i.totalProps-s.totalProps).slice(0,10);if(n.length>0){p(""),p(b(" Top schemas by property count:"));for(let[s,i]of n)p(` ${s}: ${i.totalProps} properties`)}p("")}}function pt(e){if(e.hotspots.length===0){p(b(A(" No hotspot operations found."))),p("");return}p(b(A(` Top ${e.hotspots.length} Hotspot Operations`))),p("");for(let r of e.hotspots){let t=r.operationId?`${r.method.toUpperCase()} ${r.path} (${r.operationId})`:`${r.method.toUpperCase()} ${r.path}`;p(b(` ${t}`)),p(` Agent Readiness: ${Be(r.agentReadinessScore)}`);for(let o of r.reasons)p(j(` - ${o}`));p("")}}function Ve(e,r,t,o=D){let n=[];for(let[s,i]of r){let a=e.operations.get(s);if(!a)continue;let c=ct(a,t.get(s)??0,o);c.length!==0&&n.push({path:a.path,method:a.method,operationId:a.operationId,agentReadinessScore:i.agentReadiness,reasons:c})}return n.sort((s,i)=>s.reasons.length!==i.reasons.length?i.reasons.length-s.reasons.length:s.agentReadinessScore-i.agentReadinessScore),n.slice(0,o.hotspotLimit)}function ct(e,r,t){let{thresholds:o}=t,n=[];e.parameterCount>o.maxParamsGood&&n.push(`High parameter count (${e.parameterCount})`);let s=Math.max(e.maxRequestSchemaDepth,e.maxResponseSchemaDepth);s>o.maxDepthGood&&n.push(`Deep schema nesting (depth ${s})`),e.anyOfCount>0&&!e.hasDiscriminator?n.push(`Polymorphism (anyOf) without discriminator (${e.anyOfCount} anyOf)`):e.polymorphismCount>o.maxPolymorphismGood&&n.push(`High polymorphism count (${e.polymorphismCount})`);let i=e.requestBodyPresent&&!e.requestExamplePresent,a=!e.responseExamplePresent;return i&&a?n.push("Missing request and response examples"):i?n.push("Missing request body examples"):a&&n.push("Missing response examples"),e.totalErrorResponses>0&&e.structuredErrorResponseCount===0&&n.push("No structured error responses (4xx/5xx)"),e.operationDescriptionPresent||n.push("Missing operation description"),e.parameterCount>0&&e.paramsWithDescription===0&&n.push("No parameter descriptions"),r>o.maxDependencyDepthGood&&n.push(`High dependency depth (${r})`),e.ambiguousIdentifierCount>o.maxAmbiguousGood&&n.push(`Ambiguous identifiers (${e.ambiguousIdentifierCount})`),n}async function Vt({argv:e,config:r,collectSpecData:t}){let[{path:o}]=await xe(e.api?[e.api]:[],r),n=new le(r.resolve),{bundle:s}=await be({config:r,ref:o});t?.(s);let i=ge(s.parsed);if(Se(i)!=="oas3")throw new Ce(`The score command currently supports only OpenAPI 3.x. Detected: ${i}`);let a=mt.now(),c=ae(r.extendTypes(ue(i),i),r),h=await he({rootDocument:s,rootType:c.Root,externalRefResolver:n}),u=e["debug-operation-id"],{metrics:f,debugLogs:$}=ke({document:s,types:c,resolvedRefMap:h,ctx:{problems:[],specVersion:i,config:r,visitorsData:{}},debugOperationId:u}),O=Ne(f.operations),y=Re(f,O),g=Me(f.operationCount),{agentReadiness:M}=ve(y,g),T=Ve(f,y,O),I={agentReadiness:M,discoverability:g,subscores:Ee(y),rawMetrics:f,hotspots:T,operationScores:y,dependencyDepths:O};ut(I,o,a,e.format,!!e["operation-details"],u?{operationId:u,logs:$}:void 0)}function ut(e,r,t,o,n,s){k.info(`Document: ${ye(r)} score:
9
9
  `),o==="json"?Fe(e):je(e,n),s&&Ge(s.operationId,s.logs),Pe("score",t,r)}export{Vt as handleScore};
@@ -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"./BAIZWXC6.js";import"./HAOBCQWB.js";import"./PBXLYXXR.js";import"./JIU326EH.js";import"./WZXA5XPB.js";import"./VAPFU7OM.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
7
+ import{a,b,c,d,e}from"./2IWPVA32.js";import"./HAOBCQWB.js";import"./Z3O5AH5W.js";import"./PTPIZYEL.js";import"./WZXA5XPB.js";import"./YUBO3M45.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
@@ -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"./7BZGNWGO.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./5BB2E772.js";import{b as J,d as M,e as Y,v as L}from"./JUZHXP62.js";import"./GKXY6U4S.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"./VAPFU7OM.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"./KTG4J5LM.js";import{h as H,l as B,r as z,t as K,u as V,v as Z,w as _}from"./FTJ2GLND.js";import{b as J,d as M,e as Y,v as L}from"./LLF5CY3L.js";import"./GKXY6U4S.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"./YUBO3M45.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,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{ia as t}from"./VAPFU7OM.js";import*as e from"node:process";var o=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],n=class{frames;currentFrame;intervalId;message;constructor(){this.frames=o,this.currentFrame=0,this.intervalId=null,this.message=""}showFrame(){t.info("\r"+this.frames[this.currentFrame]+" "+this.message),this.currentFrame=(this.currentFrame+1)%this.frames.length}start(r){if(this.message!==r){if(this.message=r,!e.stderr.isTTY){t.info(`${r}...
7
+ import{ia as t}from"./YUBO3M45.js";import*as e from"node:process";var o=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],n=class{frames;currentFrame;intervalId;message;constructor(){this.frames=o,this.currentFrame=0,this.intervalId=null,this.message=""}showFrame(){t.info("\r"+this.frames[this.currentFrame]+" "+this.message),this.currentFrame=(this.currentFrame+1)%this.frames.length}start(r){if(this.message!==r){if(this.message=r,!e.stderr.isTTY){t.info(`${r}...
8
8
  `);return}this.intervalId===null&&(this.intervalId=setInterval(()=>{this.showFrame()},100))}}stop(){this.intervalId!==null&&(clearInterval(this.intervalId),this.intervalId=null,t.info("\r")),this.message=""}};function h(i){i.stop(),e.stderr.isTTY&&t.info("\x1B[2K")}function m(i,r){let[s]=r.inFlight;if(!s)return;let a=r.inFlight.size>1?` (+${r.inFlight.size-1} more)`:"";i.start(`[${r.position}/${r.total}] ${r.action} ${s}${a}`)}export{n as a,h as b,m as c};