@visulima/vis 2.0.0 → 2.0.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 (215) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +2 -2
  5. package/dist/config/index.d.ts +1817 -1811
  6. package/dist/generate/index.d.ts +39 -39
  7. package/dist/packem_chunks/CONFIG_FILES.js +5 -5
  8. package/dist/packem_chunks/bloom-status.js +1 -1
  9. package/dist/packem_chunks/bloom-sync.js +1 -1
  10. package/dist/packem_chunks/cache-attestation.js +1 -1
  11. package/dist/packem_chunks/catalog.js +63 -61
  12. package/dist/packem_chunks/cli-exec.js +1 -1
  13. package/dist/packem_chunks/cli-main.js +133 -130
  14. package/dist/packem_chunks/detect.js +3 -3
  15. package/dist/packem_chunks/detect2.js +4 -4
  16. package/dist/packem_chunks/dispatch.js +3 -3
  17. package/dist/packem_chunks/extra-files.js +3 -3
  18. package/dist/packem_chunks/fix.js +8 -8
  19. package/dist/packem_chunks/handler.js +1 -1
  20. package/dist/packem_chunks/handler10.js +5 -5
  21. package/dist/packem_chunks/handler11.js +1 -1
  22. package/dist/packem_chunks/handler12.js +6 -6
  23. package/dist/packem_chunks/handler13.js +1 -1
  24. package/dist/packem_chunks/handler14.js +1 -1
  25. package/dist/packem_chunks/handler15.js +1 -1
  26. package/dist/packem_chunks/handler16.js +1 -1
  27. package/dist/packem_chunks/handler17.js +1 -1
  28. package/dist/packem_chunks/handler18.js +1 -1
  29. package/dist/packem_chunks/handler19.js +1 -1
  30. package/dist/packem_chunks/handler2.js +1 -1
  31. package/dist/packem_chunks/handler20.js +2 -2
  32. package/dist/packem_chunks/handler21.js +2 -2
  33. package/dist/packem_chunks/handler22.js +10 -10
  34. package/dist/packem_chunks/handler23.js +1 -1
  35. package/dist/packem_chunks/handler24.js +1 -1
  36. package/dist/packem_chunks/handler25.js +1 -1
  37. package/dist/packem_chunks/handler26.js +5 -5
  38. package/dist/packem_chunks/handler27.js +1 -1
  39. package/dist/packem_chunks/handler28.js +3 -3
  40. package/dist/packem_chunks/handler29.js +1 -1
  41. package/dist/packem_chunks/handler3.js +2 -3
  42. package/dist/packem_chunks/handler30.js +1 -1
  43. package/dist/packem_chunks/handler31.js +2 -2
  44. package/dist/packem_chunks/handler35.js +3 -3
  45. package/dist/packem_chunks/handler4.js +3 -3
  46. package/dist/packem_chunks/handler40.js +10 -10
  47. package/dist/packem_chunks/handler42.js +3 -3
  48. package/dist/packem_chunks/handler43.js +3 -3
  49. package/dist/packem_chunks/handler5.js +5 -5
  50. package/dist/packem_chunks/handler50.js +2 -2
  51. package/dist/packem_chunks/handler51.js +13 -13
  52. package/dist/packem_chunks/handler52.js +3 -3
  53. package/dist/packem_chunks/handler53.js +1 -1
  54. package/dist/packem_chunks/handler54.js +2 -2
  55. package/dist/packem_chunks/handler55.js +1 -1
  56. package/dist/packem_chunks/handler57.js +5 -5
  57. package/dist/packem_chunks/handler58.js +4 -4
  58. package/dist/packem_chunks/handler59.js +8 -8
  59. package/dist/packem_chunks/handler6.js +6 -6
  60. package/dist/packem_chunks/handler60.js +2 -2
  61. package/dist/packem_chunks/handler61.js +13 -13
  62. package/dist/packem_chunks/handler62.js +3 -3
  63. package/dist/packem_chunks/handler63.js +3 -3
  64. package/dist/packem_chunks/handler64.js +4 -4
  65. package/dist/packem_chunks/handler65.js +6 -6
  66. package/dist/packem_chunks/handler66.js +2 -2
  67. package/dist/packem_chunks/handler67.js +16 -16
  68. package/dist/packem_chunks/handler68.js +7 -7
  69. package/dist/packem_chunks/handler69.js +25 -25
  70. package/dist/packem_chunks/handler7.js +1 -1
  71. package/dist/packem_chunks/handler70.js +6 -6
  72. package/dist/packem_chunks/handler71.js +14 -14
  73. package/dist/packem_chunks/handler72.js +42 -42
  74. package/dist/packem_chunks/handler73.js +9 -9
  75. package/dist/packem_chunks/handler74.js +21 -21
  76. package/dist/packem_chunks/handler75.js +3 -3
  77. package/dist/packem_chunks/handler76.js +8 -8
  78. package/dist/packem_chunks/handler77.js +63 -64
  79. package/dist/packem_chunks/handler78.js +22 -22
  80. package/dist/packem_chunks/handler8.js +1 -1
  81. package/dist/packem_chunks/handler9.js +1 -1
  82. package/dist/packem_chunks/heal-accept.js +5 -5
  83. package/dist/packem_chunks/heal.js +8 -8
  84. package/dist/packem_chunks/help-command.js +26 -26
  85. package/dist/packem_chunks/index2.js +5 -5
  86. package/dist/packem_chunks/index3.js +2 -2
  87. package/dist/packem_chunks/index4.js +11 -11
  88. package/dist/packem_chunks/keys-refresh.js +1 -1
  89. package/dist/packem_chunks/lean.js +1 -1
  90. package/dist/packem_chunks/list.js +2 -2
  91. package/dist/packem_chunks/loader.js +4 -4
  92. package/dist/packem_chunks/orchestrator.js +14 -14
  93. package/dist/packem_chunks/pre-mode.js +2 -2
  94. package/dist/packem_chunks/prompts.js +3 -3
  95. package/dist/packem_chunks/prune.js +1 -1
  96. package/dist/packem_chunks/publish-guards.js +1 -1
  97. package/dist/packem_chunks/registry.js +17 -17
  98. package/dist/packem_chunks/resolveFormatter.js +5 -5
  99. package/dist/packem_chunks/shell-runner.js +1 -1
  100. package/dist/packem_chunks/snapshot.js +2 -2
  101. package/dist/packem_chunks/stage-publisher.js +1 -1
  102. package/dist/packem_chunks/staged-registry.js +2 -2
  103. package/dist/packem_chunks/state.js +3 -3
  104. package/dist/packem_chunks/status.js +1 -1
  105. package/dist/packem_chunks/sync.js +1 -1
  106. package/dist/packem_chunks/sync2.js +1 -1
  107. package/dist/packem_chunks/tar.js +3 -3
  108. package/dist/packem_chunks/tripwire.js +2 -2
  109. package/dist/packem_chunks/ts-loader.js +8 -8
  110. package/dist/packem_chunks/verify-lockfile.js +2 -2
  111. package/dist/packem_chunks/workspace.js +2 -2
  112. package/dist/packem_shared/advisories-BGeuHJQg.js +1 -0
  113. package/dist/packem_shared/affected-selection-B85ND6JV.js +1 -0
  114. package/dist/packem_shared/affected-shas-BWRRAB47.js +1 -0
  115. package/dist/packem_shared/ai-analysis-oNMAj1wd.js +68 -0
  116. package/dist/packem_shared/{ai-fix-CLfWbyqY.js → ai-fix-BgBU0TOz.js} +9 -9
  117. package/dist/packem_shared/{augment-BVuj3ee7.js → augment-HVeX6LpU.js} +4 -4
  118. package/dist/packem_shared/bin-DKod8Iqo.js +1 -0
  119. package/dist/packem_shared/build-scripts-CM8M1xcG.js +1 -0
  120. package/dist/packem_shared/{command-runtime-DTbo12cP.js → command-runtime-BVi4lL8k.js} +1 -1
  121. package/dist/packem_shared/cyclonedx-y7VLI-1d.js +4 -0
  122. package/dist/packem_shared/{dependency-scan-DZcSlSFp.js → dependency-scan-BAzKpXdW.js} +1 -1
  123. package/dist/packem_shared/{docker-69ybb6g7.js → docker-D1LStSlH.js} +36 -36
  124. package/dist/packem_shared/{en-C26W78--.js → en-BxrK-n-J.js} +10 -10
  125. package/dist/packem_shared/failure-log-ChuFC-8f.js +2 -0
  126. package/dist/packem_shared/giget-CAxjpwew.js +2 -0
  127. package/dist/packem_shared/glob-BUjyjdE8-BSrdzgma.js +1 -0
  128. package/dist/packem_shared/{index-Bhzio2RB.js → index-BJw7gKD1.js} +1 -1
  129. package/dist/packem_shared/index-BWl4DbMp.js +1 -0
  130. package/dist/packem_shared/index-DND6ptxQ.js +35 -0
  131. package/dist/packem_shared/{interface.d-B7VK2rcH.d.ts → interface.d-CRqRz4jt.d.ts} +39 -39
  132. package/dist/packem_shared/{interface.d-Cezzifoh.d.ts → interface.d-CrHOtJc1.d.ts} +37 -37
  133. package/dist/packem_shared/lifecycle-Db0qh6vR.js +2 -0
  134. package/dist/packem_shared/lockfile-CDQ0n4P5.js +1 -0
  135. package/dist/packem_shared/main-D_cam4hv.js +1 -0
  136. package/dist/packem_shared/manifests-Da_no4ZH.js +1 -0
  137. package/dist/packem_shared/{min-release-age-hK604veF.js → min-release-age-V6L6dpiP.js} +2 -2
  138. package/dist/packem_shared/missing-package-json-Jw8IEHct.js +1 -0
  139. package/dist/packem_shared/{native-config-sync-DDKjAy0i.js → native-config-sync-C0pUePad.js} +6 -6
  140. package/dist/packem_shared/osv-bloom-DNFpvSSO.js +2 -0
  141. package/dist/packem_shared/package-version-DjHDww_5.js +4 -0
  142. package/dist/packem_shared/packument-N3EWbZpL.js +1 -0
  143. package/dist/packem_shared/pm-runner-Bssje5qH.js +1 -0
  144. package/dist/packem_shared/project-name-filter-u2Q7YpQH.js +7 -0
  145. package/dist/packem_shared/prompt-BSAy8SMH.js +1 -0
  146. package/dist/packem_shared/{provenance-CRBV9cko.js → provenance-9OT8sTqn.js} +1 -1
  147. package/dist/packem_shared/{readJsonSync-DuMMeB3s-B9cGBVbJ.js → readJsonSync-BnWiH5-R-BpnwAB0Z.js} +1 -1
  148. package/dist/packem_shared/registry-keys-CYHd7qU2.js +1 -0
  149. package/dist/packem_shared/{resolve-explicit-BX6aMYl-.js → resolve-explicit-DC3XssJa.js} +1 -1
  150. package/dist/packem_shared/{resolve-runtime-COyiEML3.js → resolve-runtime-f5l4ODsH.js} +1 -1
  151. package/dist/packem_shared/run-file-zB4ACnUy.js +1 -0
  152. package/dist/packem_shared/{runtime-check-fzDkedMW.js → runtime-check-CWvAfu5u.js} +1 -1
  153. package/dist/packem_shared/s1ngularity-DsmC71xt.js +1 -0
  154. package/dist/packem_shared/{scan-progress-DQ9qIGzr.js → scan-progress-Ch8s3Uwl.js} +2 -2
  155. package/dist/packem_shared/selectors-CtxnIT4X.js +3 -0
  156. package/dist/packem_shared/signatures-Dwx5fD4g.js +2 -0
  157. package/dist/packem_shared/subtree-DSm0QEoE.js +2 -0
  158. package/dist/packem_shared/target-merge-b7bE1AEx.js +11 -0
  159. package/dist/packem_shared/target-options-BO4Uxt0k.js +1 -0
  160. package/dist/packem_shared/toolchain-BY8lJaSN.js +5 -0
  161. package/dist/packem_shared/typosquats-BUGgotNu.js +1 -0
  162. package/dist/packem_shared/{use-measured-height-DfNxp6nf.js → use-measured-height-BLZt9dW2.js} +1 -1
  163. package/dist/packem_shared/verify-B0ztxKMa.js +1 -0
  164. package/dist/packem_shared/vis-update-app-D1gLJB1O.js +1 -0
  165. package/dist/packem_shared/vis-user-error-DjFv8uxy.js +28 -0
  166. package/dist/packem_shared/watch-CGrUW_JD.js +1 -0
  167. package/dist/packem_shared/watch-loop-DIwSMjlA.js +11 -0
  168. package/dist/release/core/package-managers/index.d.ts +2 -2
  169. package/dist/release/core/version-actions/index.d.ts +10 -10
  170. package/dist/release/index.d.ts +60 -60
  171. package/dist/release/plugin-sdk.d.ts +80 -80
  172. package/dist/release/presets.d.ts +148 -148
  173. package/dist/release/types.d.ts +840 -840
  174. package/dist/runtime/preload.js +1 -1
  175. package/index.d.ts +204 -204
  176. package/index.js +52 -52
  177. package/package.json +12 -12
  178. package/schemas/project.schema.json +4 -1
  179. package/schemas/vis-config.schema.json +9 -3
  180. package/dist/packem_shared/advisories-B76fBVL-.js +0 -1
  181. package/dist/packem_shared/affected-shas-BOeR4vEc.js +0 -1
  182. package/dist/packem_shared/ai-analysis-D7HOdUwd.js +0 -68
  183. package/dist/packem_shared/bin-CkfFJCAM.js +0 -1
  184. package/dist/packem_shared/build-scripts-CfAqHBlq.js +0 -1
  185. package/dist/packem_shared/cyclonedx--L7NbMBH.js +0 -4
  186. package/dist/packem_shared/failure-log-BZQqxffZ.js +0 -2
  187. package/dist/packem_shared/giget-DVTFJlbR.js +0 -2
  188. package/dist/packem_shared/glob-DMbPwGSj-D2Hk3lFG.js +0 -1
  189. package/dist/packem_shared/index-2LCHaVNX.js +0 -35
  190. package/dist/packem_shared/index-B0EsgdzO.js +0 -1
  191. package/dist/packem_shared/index-Bq6YEpiq.js +0 -28
  192. package/dist/packem_shared/lifecycle-BcCMt9wn.js +0 -2
  193. package/dist/packem_shared/lockfile-Cwt0Nwr0.js +0 -1
  194. package/dist/packem_shared/main-B3juSU5z.js +0 -1
  195. package/dist/packem_shared/manifests-BshBdSb-.js +0 -1
  196. package/dist/packem_shared/missing-package-json-Cu0iWMT2.js +0 -1
  197. package/dist/packem_shared/osv-bloom-DMhXP184.js +0 -2
  198. package/dist/packem_shared/package-version-TsxLc6w2.js +0 -4
  199. package/dist/packem_shared/packument-CtVAoNo7.js +0 -1
  200. package/dist/packem_shared/pm-runner-CfyxALPK.js +0 -1
  201. package/dist/packem_shared/prompt-DjXHVgYU.js +0 -1
  202. package/dist/packem_shared/registry-keys-Ci2keQNi.js +0 -1
  203. package/dist/packem_shared/run-file-CTJfIZ0I.js +0 -1
  204. package/dist/packem_shared/s1ngularity-Cq1cCSpU.js +0 -1
  205. package/dist/packem_shared/selectors-B9dOMIMq.js +0 -3
  206. package/dist/packem_shared/signatures-DvD1E8Xa.js +0 -2
  207. package/dist/packem_shared/subtree-C7bZuiSQ.js +0 -2
  208. package/dist/packem_shared/target-merge-Dg25Izl5.js +0 -11
  209. package/dist/packem_shared/target-options-aPqByoww.js +0 -1
  210. package/dist/packem_shared/toolchain-CiaW3bx4.js +0 -5
  211. package/dist/packem_shared/typosquats-CRnvlYPw.js +0 -1
  212. package/dist/packem_shared/verify-23b6IfSg.js +0 -1
  213. package/dist/packem_shared/vis-update-app-De8JjZm0.js +0 -1
  214. package/dist/packem_shared/watch-B3P2dwoG.js +0 -1
  215. package/dist/packem_shared/watch-loop-B3_O8hF-.js +0 -11
@@ -1,2 +0,0 @@
1
- import{createRequire as ce}from"node:module";const le=ce(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=r=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[e,t]=y.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return y.getBuiltinModule(r)}return le(r)},{existsSync:m,openSync:ue,readSync:de,closeSync:pe,statSync:he,createWriteStream:X,readdirSync:fe,renameSync:me}=w("node:fs"),{readFile:q,mkdir:S,rm:x,writeFile:ge,mkdtemp:we}=w("node:fs/promises"),{PassThrough:V,Readable:z,pipeline:$e}=w("node:stream"),{pipeline:J}=w("node:stream/promises"),{spawn:Y}=w("node:child_process"),{basename:ve,normalize:be,delimiter:C,resolve:Z,dirname:F,join:I}=w("node:path"),{cwd:K}=y,_e=w("node:readline"),{homedir:ye,tmpdir:Q}=w("node:os"),{promisify:ke}=w("node:util");var G=Object.defineProperty,Ee=(r,e)=>{let t={};for(var n in r)G(t,n,{get:r[n],enumerable:!0});return G(t,Symbol.toStringTag,{value:"Module"}),t};const xe=/^[A-Za-z]:\//;function T(r=""){return r&&r.replace(/\\/g,"/").replace(xe,e=>e.toUpperCase())}const Ce=/^[/\\]{2}/,Te=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,ee=/^[A-Za-z]:$/,te=function(r){if(r.length===0)return".";r=T(r);let e=r.match(Ce),t=k(r),n=r[r.length-1]==="/";return r=re(r,!t),r.length===0?t?"/":n?"./":".":(n&&(r+="/"),ee.test(r)&&(r+="/"),e?t?`//${r}`:`//./${r}`:t&&!k(r)?`/${r}`:r)},M=function(...r){let e="";for(let t of r)if(t)if(e.length>0){let n=e[e.length-1]==="/",o=t[0]==="/";n&&o?e+=t.slice(1):e+=n||o?t:`/${t}`}else e+=t;return te(e)};function Oe(){return typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const f=function(...r){r=r.map(n=>T(n));let e="",t=!1;for(let n=r.length-1;n>=-1&&!t;n--){let o=n>=0?r[n]:Oe();!o||o.length===0||(e=`${o}/${e}`,t=k(o))}return e=re(e,!t),t&&!k(e)?`/${e}`:e.length>0?e:"."};function re(r,e){let t="",n=0,o=-1,s=0,i=null;for(let a=0;a<=r.length;++a){if(a<r.length)i=r[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(t.length<2||n!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let c=t.lastIndexOf("/");c===-1?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),o=a,s=0;continue}else if(t.length>0){t="",n=0,o=a,s=0;continue}}e&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${r.slice(o+1,a)}`:t=r.slice(o+1,a),n=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return t}const k=function(r){return Te.test(r)},ne=function(r){let e=T(r).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&ee.test(e[0])&&(e[0]+="/"),e.join("/")||(k(r)?"/":".")},oe=function(r,e){let t=T(r).split("/"),n="";for(let o=t.length-1;o>=0;o--){let s=t[o];if(s){n=s;break}}return n},Ae=/^path$/i,D={key:"PATH",value:""};function se(r){for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||!Ae.test(e))continue;let t=r[e];return t?{key:e,value:t}:D}return D}function Se(r,e){let t=e.value.split(C),n=[],o=r,s;do n.push(Z(o,"node_modules",".bin")),s=o,o=F(o);while(o!==s);n.push(F(process.execPath));let i=n.concat(t).join(C);return{key:e.key,value:i}}function je(r,e,t=!0){let n={...process.env,...e};if(!t)return n;let o=Se(r,se(n));return n[o.key]=o.value,n}const ze=r=>{let e=r.length,t=new V,n=()=>{--e===0&&t.end()};for(let o of r)J(o,t,{end:!1}).then(n).catch(n);return t},A=/([()\][%!^"`<>&|;, *?])/g,Fe=/^#!\s*(.+)/,Ie=/\.(?:com|exe)$/i,Ge=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,Me=process.platform==="win32",De=[".EXE",".CMD",".BAT",".COM"];function Pe(r,e=[],t={}){if(t.shell===!0||!Me)return{command:r,args:e,options:t};let n=P(r,t),o=null;if(n!==null){let s=Buffer.alloc(150),i=null;try{i=ue(n,"r"),de(i,s,0,150,0)}catch{}finally{i!==null&&pe(i)}let a=s.toString().match(Fe);if(a!==null){let c=a[1].trim(),d=c.indexOf(" "),l=d===-1?c:c.slice(0,d),h=d===-1?"":c.slice(d+1),p=ve(l);o=p==="env"?h||null:p}}if(o!==null&&n!==null&&(e=[n,...e],r=o,n=P(r,t)),n===null||!Ie.test(n)){let s=n!==null&&Ge.test(n);r=be(r),r=r.replace(A,"^$1"),e=e.map(i=>(i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(A,"^$1"),s&&(i=i.replace(A,"^$1")),i)),e=["/d","/s","/c",`"${[r,...e].join(" ")}"`],r=t.env?.comspec??"cmd.exe",t={...t,windowsVerbatimArguments:!0}}return{command:r,args:e,options:t}}function P(r,e){let t=(e.cwd??K()).toString(),n=e.env??process.env,o=se(n).value,s=r.includes("/")||r.includes("\\")?[""]:[t,...o.split(C)],i=n.PATHEXT?n.PATHEXT.split(C):De;r.includes(".")&&i[0]!==""&&i.unshift("");for(let a of s){let c=Z(t,a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,r);for(let d of i){let l=c+d;try{if(he(l).isFile())return l}catch{}}}return null}var B=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const Be={timeout:void 0,persist:!1},He={windowsHide:!0};function Ne(r){let e=new AbortController;for(let t of r){if(t.aborted)return e.abort(),t;t.addEventListener("abort",()=>{e.abort(t.reason)},{signal:e.signal})}return e.signal}async function H(r){let e="";try{for await(let t of r)e+=t.toString()}catch{}return e}var Re=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(e,t,n){this._options={...Be,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(o=>{this._resolveClose=o})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return Ue(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=ze(t),o=_e.createInterface({input:n});for await(let s of o)yield s.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new B(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error("No process was started");let[t,n]=await Promise.all([this._streamOut?H(this._streamOut):"",this._streamErr?H(this._streamErr):""]);await this._processClosed;let{stdin:o}=this._options;if(o&&typeof o!="string"&&await o,e.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new B(this,s);return s}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=K(),t=this._options,n={...He,...t.nodeOptions},o=[];this._resetState(),t.timeout!==void 0&&o.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&o.push(t.signal),t.persist===!0&&(n.detached=!0),o.length>0&&(n.signal=Ne(o)),n.env=je(e,n.env,t.nodePath);let s=Pe(this._command,this._args,n),i=Y(s.command,s.args,s.options);if(i.stderr&&(this._streamErr=i.stderr),i.stdout&&(this._streamOut=i.stdout),this._process=i,i.once("error",this._onError),i.once("close",this._onClose),i.stdin){let{stdin:a}=t;typeof a=="string"?i.stdin.end(a):a?.process?.stdout?.pipe(i.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name==="AbortError"&&(!(e.cause instanceof Error)||e.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const j=(r,e,t)=>{let n=new Re(r,e,t);return n.spawn(),n},Ue=j;var Le=Ee({detectPackageManager:()=>ie,installDependencies:()=>Ze,packageManagers:()=>v});async function We(r,e,t={}){let n=te(r).split("/");for(;n.length>0;){let o=await e(n.join("/")||"/");if(o||!t.includeParentDirs)return o;n.pop()}}function Xe(r){let e;return()=>(e===void 0&&(e=r().then(t=>(e=t,e))),e)}const qe=Xe(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:r}=await j("corepack",["--version"]);return r===0}catch{return!1}});async function Ve(r,e,t={}){let n=r!=="npm"&&r!=="bun"&&r!=="deno"&&t.corepack!==!1&&await qe()?["corepack",[r,...e]]:[r,e],{exitCode:o,stdout:s,stderr:i}=await j(n[0],n[1],{nodeOptions:{cwd:f(t.cwd||process.cwd()),env:t.env,stdio:t.silent?"pipe":"inherit"}});if(o!==0)throw Error(`\`${n.flat().join(" ")}\` failed.${t.silent?["",s,i].join(`
2
- `):""}`)}async function Je(r={}){let e=r.cwd||process.cwd(),t={...process.env,...r.env},n=(typeof r.packageManager=="string"?v.find(o=>o.name===r.packageManager):r.packageManager)||await ie(r.cwd||process.cwd());if(!n)throw Error("No package manager auto-detected.");return{cwd:e,env:t,silent:r.silent??!1,packageManager:n,dev:r.dev??!1,workspace:r.workspace,global:r.global??!1,dry:r.dry??!1,corepack:r.corepack??!0}}function Ye(r){let[e,t]=(r||"").split("@"),[n,o]=t?.split("+")||[];if(e&&e!=="-"&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(e))return{name:e,version:n,buildMeta:o};let s=(e||"").replace(/\W+/g,"");return{name:s,version:n,buildMeta:o,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${e}\` to \`${s}\``]}}const v=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function ie(r,e={}){let t=await We(f(r||"."),async n=>{if(!e.ignorePackageJSON){let o=M(n,"package.json");if(m(o)){let s=JSON.parse(await q(o,"utf8"));if(s?.packageManager){let{name:i,version:a="0.0.0",buildMeta:c,warnings:d}=Ye(s.packageManager);if(i){let l=a.split(".")[0],h=v.find(p=>p.name===i&&p.majorVersion===l)||v.find(p=>p.name===i);return{name:i,command:i,version:a,majorVersion:l,buildMeta:c,warnings:d,files:h?.files,lockFile:h?.lockFile}}}}if(m(M(n,"deno.json")))return v.find(s=>s.name==="deno")}if(!e.ignoreLockFile){for(let o of v)if([o.lockFile,o.files].flat().filter(Boolean).some(s=>m(f(n,s))))return{...o}}},{includeParentDirs:e.includeParentDirs??!0});if(!t&&!e.ignoreArgv){let n=process.argv[1];if(n){for(let o of v)if(RegExp(`[/\\\\]\\.?${o.command}`).test(n))return o}}return t}async function Ze(r={}){let e=await Je(r),t=r.frozenLockFile?{npm:["ci"],yarn:["install","--immutable"],bun:["install","--frozen-lockfile"],pnpm:["install","--frozen-lockfile"],deno:["install","--frozen"]}[e.packageManager.name]:["install"];return r.ignoreWorkspace&&e.packageManager.name==="pnpm"&&t.push("--ignore-workspace"),e.dry||await Ve(e.packageManager.command,t,{cwd:e.cwd,silent:e.silent,corepack:e.corepack}),{exec:{command:e.packageManager.command,args:t}}}const Ke=Object.defineProperty({__proto__:null,basename:oe,dirname:ne,dist_exports:Le,resolve:f},Symbol.toStringTag,{value:"Module"});async function Qe(r,e,t={}){const n=e+".json",o=JSON.parse(await q(n,"utf8").catch(()=>"{}")),s=(await E(r,{method:"HEAD",headers:t.headers}).catch(()=>{}))?.headers.get("etag");if(o.etag===s&&m(e))return;typeof s=="string"&&(o.etag=s);const i=await E(r,{headers:t.headers});if(i.status>=400)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);const a=X(e);await ke($e)(i.body,a),await ge(n,JSON.stringify(o),"utf8")}const et=/^(?<repo>[-\w.]+\/[-\w.]+)(?<subdir>[^#]+)?(?<ref>#[-\w./@]+)?/,tt=/^(?<repo>[-\w.]+(?:\/[-\w.]+)+?)(?:::(?<subdir>[^#]*))?(?<ref>#[-\w./@]+)?$/;function O(r,e){const t=e?.expandRepo||r.includes("::"),n=r.match(t?tt:et)?.groups||{},o=t?n.subdir?"/"+n.subdir:"/":n.subdir||"/";return{repo:n.repo||"",subdir:o,ref:n.ref?n.ref.slice(1):"main"}}function $(...r){process.env.DEBUG&&console.debug("[giget]",...r)}async function E(r,e={}){e.headers?.["sec-fetch-mode"]&&(e.mode=e.headers["sec-fetch-mode"]);const t=await fetch(r,{...e,headers:ae(e.headers)}).catch(n=>{throw new Error(`Failed to download ${r}: ${n}`,{cause:n})});if(e.validateStatus&&t.status>=400)throw new Error(`Failed to fetch ${r}: ${t.status} ${t.statusText}`);return t}function rt(){const r=process.env.XDG_CACHE_HOME?f(process.env.XDG_CACHE_HOME,"giget"):f(ye(),".cache/giget");if(process.platform==="win32"){const e=f(Q(),"giget");if(!m(e)&&m(r))try{me(r,e)}catch{}return e}return r}function ae(r={}){const e={};for(const[t,n]of Object.entries(r))n&&(e[t.toLowerCase()]=n);return e}const nt=(r,e)=>{const t=ot(r);return{name:t.name,version:t.subdir?`${t.version||"default"}-${t.subdir.replaceAll("/","-")}`:t.version,tar:({auth:n}={})=>st(t,n??e.auth)}};function ot(r,e={}){const t=e.cwd??process.cwd();let n=r.replace(/#.*$/,""),o;if(/^[./]/.test(r))n=f(t,n);else if(/^https?:\/\//.test(n)){const l=/^(https?:\/\/[^/]+)\/([\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,h,p,g]=l;n=`${h}/${p}`,g&&(o=g)}}else if(n.includes("@")){const l=/^(.*?:[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,h,p]=l;n=h,p&&(o=p)}}else{const l={"github:":"https://github.com/","gh:":"https://github.com/","gitlab:":"https://gitlab.com/","bitbucket:":"https://bitbucket.org/","sourcehut:":"https://git.sr.ht/~"},h=/^(.+?:)/.exec(n)?.at(1);h&&l[h]?n=n.replace(h,l[h]):h||(n=`${(process.env.GIGET_GIT_HOST||"https://github.com/").replace(/\/$/,"")}/${n}`);const p=/^(https?:\/\/[^/]+\/~?[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(p){const[,g,u]=p;n=g,u&&(o=u)}}const s=n.replace(/^https?:\/\//,"").replace(/^.+@/,"").replace(/(\.git)?(#.*)?$/,"").replace(/^\W+/,"").replaceAll(/[:/]/g,"-"),[i,a]=/#(.+)$/.exec(r)?.at(1)?.split(":")??[],c=i||void 0,d=a||o;return{uri:n,name:s,...c&&{version:c},...d&&{subdir:d}}}async function st(r,e){const t=await we(I(Q(),"giget-git-"));if(e&&/[\r\n]/.test(e))throw new Error("Auth token must not contain newline characters");const n={...process.env,GIT_TERMINAL_PROMPT:"0"};e&&(n.GIT_CONFIG_COUNT="1",n.GIT_CONFIG_KEY_0="http.extraHeader",n.GIT_CONFIG_VALUE_0=`Authorization: Bearer ${e}`);const o={env:n,timeout:6e4},s=it(),i=c=>R(c,o,s),a=c=>R(c,{...o,cwd:t},s);try{const c=["clone","--progress","--depth","1"];r.subdir&&c.push("--filter=blob:none","--sparse","--no-checkout"),r.version&&c.push("--branch",r.version),c.push("--",r.uri,t);try{s.update("Cloning..."),await i(c),s.update("Cloned.")}catch(u){if(!r.version)throw u;$("Shallow clone failed, falling back to full clone:",u),s.update("Shallow clone failed, cloning..."),await x(t,{recursive:!0,force:!0}),await S(t,{recursive:!0}),await a(["init"]),await a(["remote","add","origin",r.uri]),await a(["fetch","origin"]),await a(["checkout",r.version]),s.update("Fetched.")}r.subdir&&(s.update(`Sparse checkout ${r.subdir}...`),await a(["sparse-checkout","set",r.subdir]),await a(["checkout"])),s.update("Packing...");const d=r.subdir?I(t,r.subdir):t,{create:l}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);s.done();const h=l({gzip:!0,cwd:d,filter:u=>!u.startsWith(".git/")&&u!==".git"&&!u.startsWith("./.git/")&&u!=="./.git"},["."]).pipe(new V);let p=!1;const g=()=>{p||(p=!0,x(t,{recursive:!0,force:!0}))};return h.on("end",g),h.on("error",g),h.on("close",g),h}catch(c){throw s.done(),await x(t,{recursive:!0,force:!0}),c}}const N=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];function R(r,e,t){return new Promise((n,o)=>{const s=Y("git",r,{...e,stdio:["ignore","pipe","pipe"]});s.stdout.resume();let i="";s.stderr?.on("data",a=>{const c=a.toString();for(const d of c.split(/[\r\n]/)){const l=d.trim();l&&(i=l)}t&&t.update(i)}),s.on("close",a=>{a===0?n(i):o(new Error(`git ${r[0]} exited with code ${a}. Is git installed?`))}),s.on("error",a=>{a.code==="ENOENT"?o(new Error("git is not installed or not found in PATH")):o(a)})})}function it(){if(!process.stderr.isTTY)return{update(o){},done(){}};let r="",e=0;const t=()=>{const o=N[e%N.length];e++,process.stderr.write(`\x1B[2K\r\x1B[2m${o} ${r}\x1B[0m`)},n=setInterval(t,80);return{update(o){r=o,t()},done(){clearInterval(n),process.stderr.write("\x1B[2K\r")}}}const U=async(r,e)=>{if(r.endsWith(".json"))return await L(r,e);const t=new URL(r);let n=oe(t.pathname);try{const o=await E(t.href,{method:"HEAD",validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if((o.headers.get("content-type")||"").includes("application/json"))return await L(r,e);const s=o.headers.get("content-disposition")?.match(/filename="?(.+)"?/)?.[1];s&&(n=s.split(".")[0])}catch(o){$(`Failed to fetch HEAD for ${t.href}:`,o)}return{name:`${n}-${t.href.slice(0,8)}`,version:"",subdir:"",tar:t.href,defaultDir:n,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0}}},L=async(r,e)=>{const t=await(await E(r,{validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}})).json();if(!t.tar||!t.name)throw new Error(`Invalid template info from ${r}. name or tar fields are missing!`);return t},W=(r,e)=>{const t=O(r),n=process.env.GIGET_GITHUB_URL||"https://api.github.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},url:`${n.replace("api.github.com","github.com")}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/repos/${t.repo}/tarball/${t.ref}`}},at=(r,e)=>{const t=O(r,{expandRepo:!0}),n=process.env.GIGET_GITLAB_URL||"https://gitlab.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0,"sec-fetch-mode":"same-origin"},url:`${n}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/${t.repo}/-/archive/${t.ref}.tar.gz`}},ct=(r,e)=>{const t=O(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://bitbucket.com/${t.repo}/src/${t.ref}${t.subdir}`,tar:`https://bitbucket.org/${t.repo}/get/${t.ref}.tar.gz`}},lt=(r,e)=>{const t=O(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://git.sr.ht/~${t.repo}/tree/${t.ref}/item${t.subdir}`,tar:`https://git.sr.ht/~${t.repo}/archive/${t.ref}.tar.gz`}},ut={http:U,https:U,git:nt,github:W,gh:W,gitlab:at,bitbucket:ct,sourcehut:lt},dt="https://raw.githubusercontent.com/unjs/giget/main/templates",pt=(r=dt,e={})=>(async t=>{const n=Date.now(),o=`${r}/${t}.json`,s=await E(o,{headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if(s.status>=400)throw new Error(`Failed to download ${t} template info from ${o}: ${s.status} ${s.statusText}`);const i=await s.json();if(!i.tar||!i.name)throw new Error(`Invalid template info from ${o}. name or tar fields are missing!`);return $(`Fetched ${t} template info from ${o} in ${Date.now()-n}ms`),i}),ht=/^([\w+-.]+):/;function ft(r){if(!r)return;if(typeof r=="function")return r;const e=globalThis.process.getBuiltinModule?.("node:path")?.matchesGlob;if(typeof e!="function")throw new TypeError("Ignore patterns require `path.matchesGlob` which is supported in Node.js v22.5.0, v20.17.0 or later.");return t=>r.some(n=>e(t,n))}async function $t(r,e={}){const t=ft(e.ignore);e.registry=process.env.GIGET_REGISTRY??e.registry,e.auth=process.env.GIGET_AUTH??e.auth;const n=e.registry===!1?void 0:pt(e.registry,{auth:e.auth});let o=e.provider||(n?"registry":"github"),s=r;const i=r.match(ht);i&&(o=i[1],s=r.slice(i[0].length),(o==="http"||o==="https")&&(s=r)),o.endsWith("+git")&&(s=`${o.slice(0,-4)}:${s}`,o="git");const a=e.providers?.[o]||ut[o]||n;if(!a)throw new Error(`Unsupported provider: ${o}`);const c=await Promise.resolve().then(()=>a(s,{auth:e.auth})).catch(u=>{throw new Error(`Failed to download template from ${o}: ${u.message}`)});if(!c)throw new Error(`Failed to resolve template from ${o}`);c.name=(c.name||"template").replace(/[^\da-z-]/gi,"-"),c.defaultDir=(c.defaultDir||c.name).replace(/[^\da-z-]/gi,"-");const d=f(f(rt(),o,c.name),(c.version||c.name)+".tar.gz");if(e.preferOffline&&m(d)&&(e.offline=!0),!e.offline){await S(ne(d),{recursive:!0});const u=Date.now();if(typeof c.tar=="function"){const b=c.tar;await(async()=>{const _=await b({auth:e.auth});await J(_ instanceof z?_:z.fromWeb(_),X(d))})().catch(_=>{if(!m(d))throw _;$("Download error. Using cached version:",_),e.offline=!0})}else await Qe(c.tar,d,{headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,...ae(c.headers)}}).catch(b=>{if(!m(d))throw b;$("Download error. Using cached version:",b),e.offline=!0});$(`Downloaded to ${d} in ${Date.now()-u}ms`)}if(!m(d))throw new Error(`Tarball not found: ${d} (offline: ${e.offline})`);const l=f(f(e.cwd||"."),e.dir||c.defaultDir);if(e.forceClean&&await x(l,{recursive:!0,force:!0}),!e.force&&m(l)&&fe(l).length>0)throw new Error(`Destination ${l} already exists.`);await S(l,{recursive:!0});const h=Date.now(),p=c.subdir?.replace(/^\//,"")||"",{extract:g}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);if(await g({file:d,cwd:l,onReadEntry(u){u.path=u.path.split("/").splice(1).join("/"),p&&(u.path.startsWith(p+"/")?u.path=u.path.slice(p.length):u.path=""),t&&u.path&&t(u.path.replace(/^\//,""))&&(u.path="")}}),$(`Extracted to ${l} in ${Date.now()-h}ms`),e.install){$("Installing dependencies...");const{installDependencies:u}=await Promise.resolve().then(()=>Ke).then(b=>b.dist_exports);await u({cwd:l,silent:e.silent,...typeof e.install=="object"?e.install:{}})}return{...c,source:s,dir:l}}export{$t as f,Ee as l};
@@ -1 +0,0 @@
1
- import{W as o}from"./index-2LCHaVNX.js";const r=async(s,a)=>await o(s,a);export{r as s};
@@ -1,35 +0,0 @@
1
- import{createRequire as hr}from"node:module";import{E as it}from"./public-api-WqUCiyIe.js";const Er=hr(import.meta.url),Pu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cr=u=>{if(typeof Pu<"u"&&Pu.versions&&Pu.versions.node){const[e,t]=Pu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Pu.getBuiltinModule(u)}return Er(u)},{createRequire:I}=Cr("node:module"),ut=0,Fr=4,gr=Symbol("findUpStop"),Wi=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,dr=/^[A-Z]:\//i,Ou=(u="")=>u&&u.replaceAll("\\","/").replace(dr,e=>e.toUpperCase()),mr=/^[/\\]{2}/,yr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Mt=/^[A-Z]:$/i,at=/^\/([A-Z]:)?$/i,Br=/.(\.[^./]+)$/,br=/^[/\\]|^[a-z]:[/\\]/i,$r=/\/$/,vr=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",qi="/",jt=(u,e)=>{let t="",s=0,n=-1,r=0,o;for(let i=0;i<=u.length;++i){if(i<u.length)o=u[i];else{if(o==="/")break;o="/"}if(o==="/"){if(!(n===i-1||r===1))if(r===2){if(t.length<2||s!==2||!t.endsWith(".")||t.at(-2)!=="."){if(t.length>2){const l=t.lastIndexOf("/");l===-1?(t="",s=0):(t=t.slice(0,l),s=t.length-1-t.lastIndexOf("/")),n=i,r=0;continue}else if(t.length>0){t="",s=0,n=i,r=0;continue}}e&&(t+=t.length>0?"/..":"..",s=2)}else t.length>0?t+=`/${u.slice(n+1,i)}`:t=u.slice(n+1,i),s=i-n-1;n=i,r=0}else o==="."&&r!==-1?++r:r=-1}return t},Nu=u=>yr.test(u),Se=function(u){if(u.length===0)return".";u=Ou(u);const e=mr.exec(u),t=Nu(u),s=u.at(-1)==="/";return u=jt(u,!t),u.length===0?t?"/":s?"./":".":(s&&(u+="/"),Mt.test(u)&&(u+="/"),e?t?`//${u}`:`//./${u}`:t&&!Nu(u)?`/${u}`:u)},wr=(...u)=>{let e="";for(const t of u)if(t)if(e.length>0){const s=e.at(-1)==="/",n=t[0]==="/";s&&n?e+=t.slice(1):e+=s||n?t:`/${t}`}else e+=t;return Se(e)},Lu=function(...u){u=u.map(s=>Ou(s));let e="",t=!1;for(let s=u.length-1;s>=-1&&!t;s--){const n=s>=0?u[s]:vr();!n||n.length===0||(e=`${n}/${e}`,t=Nu(n))}return e=jt(e,!t),t&&!Nu(e)?`/${e}`:e.length>0?e:"."},Xi=function(u){return Ou(u)},xr=function(u){return Br.exec(Ou(u))?.[1]??""},Ki=function(u,e){const t=Lu(u).replace(at,"$1").split("/"),s=Lu(e).replace(at,"$1").split("/");if(s[0][1]===":"&&t[0][1]===":"&&t[0]!==s[0])return s.join("/");const n=Math.min(t.length,s.length);let r=0;for(;r<n&&t[r]===s[r];)r+=1;const o=t.length-r;return[...Array.from({length:o}).fill(".."),...s.slice(r)].join("/")},et=u=>{const e=Ou(u).replace($r,""),t=e.lastIndexOf("/");if(t===-1)return Nu(u)?"/":".";const s=e.slice(0,t);return Mt.test(s)?`${s}/`:s||(Nu(u)?"/":".")},Gt=(u,e)=>{const t=Ou(u),s=t.slice(t.lastIndexOf("/")+1);if(e&&s.endsWith(e)){if(e===t)return"";const n=s.slice(0,-e.length);if(n.length>0)return n}return s},Sr=function(u){const e=br.exec(u)?.[0]?.replaceAll("\\","/")??"",t=Gt(u),s=xr(t);return{base:t,dir:et(u),ext:s,name:t.slice(0,t.length-s.length),root:e}},_r=I(import.meta.url),Hu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tr=u=>{if(typeof Hu<"u"&&Hu.versions&&Hu.versions.node){const[e,t]=Hu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Hu.getBuiltinModule(u)}return _r(u)},{fileURLToPath:Rr}=Tr("node:url");function kr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var lt,ct;function Nr(){return ct||(ct=1,lt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),lt}var Or=Nr();const Lr=kr(Or);new Set(Lr);const Pr=/^(?:\.?\.[/\\]|\.\.\B)/,Vi=u=>Pr.test(u)||u==="..",yu=u=>Ou(u instanceof URL?Rr(u):u);let Hr=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const bu=u=>{if(!u||!(u instanceof URL)&&typeof u!="string")throw new TypeError("Path must be a non-empty string or URL.")},Ir=I(import.meta.url),Iu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mr=u=>{if(typeof Iu<"u"&&Iu.versions&&Iu.versions.node){const[e,t]=Iu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Iu.getBuiltinModule(u)}return Ir(u)};Mr("node:fs/promises");const jr=I(import.meta.url),Mu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Gr=u=>{if(typeof Mu<"u"&&Mu.versions&&Mu.versions.node){const[e,t]=Mu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Mu.getBuiltinModule(u)}return jr(u)};Gr("node:fs");const _e=u=>{if(u.isFile())return"file";if(u.isDirectory())return"dir";if(u.isSymbolicLink())return"symlink"},Ur=I(import.meta.url),ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zr=u=>{if(typeof ju<"u"&&ju.versions&&ju.versions.node){const[e,t]=ju.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ju.getBuiltinModule(u)}return Ur(u)},{lstat:Dt,mkdir:Wr}=zr("node:fs/promises"),Ji=async u=>{bu(u);try{const e=await Dt(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await Wr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=await Dt(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(t))}'`,{cause:e})}},qr=I(import.meta.url),Gu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xr=u=>{if(typeof Gu<"u"&&Gu.versions&&Gu.versions.node){const[e,t]=Gu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Gu.getBuiltinModule(u)}return qr(u)},{lstatSync:pt,mkdirSync:Kr}=Xr("node:fs"),Zi=u=>{bu(u);try{const e=pt(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{Kr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=pt(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(_e(t))}'`,{cause:e})}},Vr=I(import.meta.url),Uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qr=u=>{if(typeof Uu<"u"&&Uu.versions&&Uu.versions.node){const[e,t]=Uu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Uu.getBuiltinModule(u)}return Vr(u)};Qr("node:fs/promises");const Jr=I(import.meta.url),zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zr=u=>{if(typeof zu<"u"&&zu.versions&&zu.versions.node){const[e,t]=zu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return zu.getBuiltinModule(u)}return Jr(u)};Zr("node:fs");const Yr=I(import.meta.url),Wu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=u=>{if(typeof Wu<"u"&&Wu.versions&&Wu.versions.node){const[e,t]=Wu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Wu.getBuiltinModule(u)}return Yr(u)};us("node:fs/promises");const es=I(import.meta.url),qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ts=u=>{if(typeof qu<"u"&&qu.versions&&qu.versions.node){const[e,t]=qu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return qu.getBuiltinModule(u)}return es(u)};ts("node:fs");const rs=I(import.meta.url),Xu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=u=>{if(typeof Xu<"u"&&Xu.versions&&Xu.versions.node){const[e,t]=Xu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Xu.getBuiltinModule(u)}return rs(u)};ss("node:fs/promises");const ns=I(import.meta.url),Ku=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,os=u=>{if(typeof Ku<"u"&&Ku.versions&&Ku.versions.node){const[e,t]=Ku.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ku.getBuiltinModule(u)}return ns(u)};os("node:fs");I(import.meta.url);let ft=class extends Error{root;constructor(e,t){super(`${e instanceof Error?e.message:String(e)} for path "${t}"`),this.cause=e,this.root=t}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const At=u=>{const e=u.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(t){throw new Error(`Invalid glob pattern: ${u}`,{cause:t})}};let is=class{name;path;#u;constructor(e,t,s){this.#u=e,this.name=t,this.path=s}isDirectory(){return this.#u.isDirectory()}isFile(){return this.#u.isFile()}isSymbolicLink(){return this.#u.isSymbolicLink()}};const Ke=(u,e,t)=>new is(u,e,t),we=(u,e,t,s)=>{if(Array.isArray(e)&&e.length>0&&!e.some(r=>u.endsWith(r)))return!1;const n=u.includes("\\")?u.replaceAll("\\","/"):u;return t&&!t.some(r=>r.test(n))?!1:!s?.some(r=>r.test(n))},as=I(import.meta.url),Vu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=u=>{if(typeof Vu<"u"&&Vu.versions&&Vu.versions.node){const[e,t]=Vu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Vu.getBuiltinModule(u)}return as(u)};ls("node:fs/promises");const cs=I(import.meta.url),Qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ds=u=>{if(typeof Qu<"u"&&Qu.versions&&Qu.versions.node){const[e,t]=Qu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Qu.getBuiltinModule(u)}return cs(u)},{readdirSync:ps,realpathSync:fs,statSync:Ut}=Ds("node:fs"),As=u=>{const e=Se(u),t=Ut(e);return Ke(t,Gt(e),e)};function*hs(u,e={}){const{extensions:t,followSymlinks:s=!1,includeDirs:n=!0,includeFiles:r=!0,includeSymlinks:o=!0,match:i,maxDepth:l=Number.POSITIVE_INFINITY,skip:d}=e;if(bu(u),l<0)return;const p=e.visited??new Set,m=i?i.map(C=>typeof C=="string"?At(C):C):void 0,b=d?d.map(C=>typeof C=="string"?At(C):C):void 0;if(u=Lu(yu(u)),n&&we(u,t,m,b)&&(yield As(u)),!(l<1||!we(u,void 0,void 0,b)))try{const C=ps(u,{withFileTypes:!0});for(const f of C){let $=wr(u,f.name),F=f.isDirectory(),w=f.isFile();if(f.isSymbolicLink())if(s){const _=fs($);if(p.has(_))continue;$=_;const h=Ut(_);F=h.isDirectory(),w=h.isFile()}else if(o&&we($,t,m,b)){yield Ke(f,f.name,Se($));continue}else continue;F?(s&&p.add($),yield*hs($,{extensions:t,followSymlinks:s,includeDirs:n,includeFiles:r,includeSymlinks:o,match:m,maxDepth:l-1,skip:b,visited:p})):w&&r&&we($,t,m,b)&&(yield Ke(f,f.name,Se($)))}}catch(C){throw C instanceof ft?C:new ft(C,u)}}const Es=I(import.meta.url),Ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=u=>{if(typeof Ju<"u"&&Ju.versions&&Ju.versions.node){const[e,t]=Ju.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ju.getBuiltinModule(u)}return Es(u)};Cs("node:fs/promises");const Fs=I(import.meta.url),Zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gs=u=>{if(typeof Zu<"u"&&Zu.versions&&Zu.versions.node){const[e,t]=Zu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Zu.getBuiltinModule(u)}return Fs(u)},{statSync:ds,lstatSync:ms}=gs("node:fs"),ea=(u,e={})=>{if(typeof u!="string"&&!Array.isArray(u)&&typeof u!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const t=e.cwd?yu(e.cwd):process.cwd();let s=Lu(t);const{root:n}=Sr(s),r=yu(e.stopAt??n),o=Lu(s,r),i=e.type??"file",l=function(p){return typeof u=="function"?[u(p)]:typeof u=="string"?[u]:Array.isArray(u)?u:[u]};e.allowSymlinks??=!0;const d=e.allowSymlinks?ds:ms;for(;s&&s!==o&&s!==n;){for(let p of l(s)){if(p===gr)return;if(p===void 0)continue;Buffer.isBuffer(p)?p=p.toString():p instanceof URL&&(p=yu(p));const m=Nu(p)?p:Lu(s,p);try{const b=d(m);if(i==="file"&&b.isFile()||i==="directory"&&b.isDirectory())return m}catch{}}s=et(s)}};function tt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ht={},Oe,Et;function Re(){if(Et)return Oe;Et=1;const u="[^\\\\/]",e=Symbol("unignore"),t="\\.",s="\\+",n="\\?",r="\\/",o="(?=.)",i="[^/]",l=`(?:${r}|$)`,d=`(?:^|${r})`,p=`${t}{1,2}${l}`,m=`(?!${t})`,b=`(?!${d}${p})`,C=`(?!${t}{0,1}${l})`,f=`(?!${p})`,$=`[^.${r}]`,F=`${i}*?`,w="/",_={DOT_LITERAL:t,PLUS_LITERAL:s,QMARK_LITERAL:n,SLASH_LITERAL:r,ONE_CHAR:o,QMARK:i,END_ANCHOR:l,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:f,QMARK_NO_DOT:$,STAR:F,START_ANCHOR:d,SEP:w},h={..._,SLASH_LITERAL:"[\\\\/]",QMARK:u,STAR:`${u}*?`,DOTS_SLASH:`${t}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${t})`,NO_DOTS:`(?!(?:^|[\\\\/])${t}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${t}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${t}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},g={__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"};return Oe={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:g,UNIGNORE:e,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(a){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${a.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(a){return a===!0?h:_}},Oe}var Ct;function ke(){return Ct||(Ct=1,(function(u){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:t,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:n}=Re();u.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),u.hasRegexChars=r=>s.test(r),u.isRegexChar=r=>r.length===1&&u.hasRegexChars(r),u.escapeRegex=r=>r.replace(n,"\\$1"),u.toPosixSlashes=r=>r.replace(e,"/"),u.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return process.platform?process.platform==="win32":!1},u.removeBackslashes=r=>r.replace(t,o=>o==="\\"?"":o),u.escapeLast=(r,o,i)=>{const l=r.lastIndexOf(o,i);return l===-1?r:r[l-1]==="\\"?u.escapeLast(r,o,l-1):`${r.slice(0,l)}\\${r.slice(l)}`},u.removePrefix=(r,o={})=>{let i=r;return i.startsWith("./")&&(i=i.slice(2),o.prefix="./"),i},u.wrapOutput=(r,o={},i={})=>{const l=i.contains?"":"^",d=i.contains?"":"$";let p=`${l}(?:${r})${d}`;return o.negated===!0&&(p=`(?:^(?!${p}).*$)`),p},u.basename=(r,{windows:o}={})=>{const i=r.split(o?/[\\/]/:"/"),l=i[i.length-1];return l===""?i[i.length-2]:l}})(ht)),ht}var Le,Ft;function ys(){if(Ft)return Le;Ft=1;const u=ke(),{CHAR_ASTERISK:e,CHAR_AT:t,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:n,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:i,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:m,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:$}=Re(),F=_=>_===i||_===s,w=_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)};return Le=(_,h)=>{const g=h||{},a=_.length-1,T=g.parts===!0||g.scanToEnd===!0,O=[],x=[],S=[];let v=_,j=-1,q=0,au=0,gu=!1,lu=!1,Z=!1,cu=!1,$u=!1,Au=!1,Du=!1,Q=!1,hu=!1,ru=!1,vu=0,su,R,G={value:"",depth:0,isGlob:!1};const tu=()=>j>=a,A=()=>v.charCodeAt(j+1),X=()=>(su=R,v.charCodeAt(++j));for(;j<a;){R=X();let nu;if(R===s){Du=G.backslashes=!0,R=X(),R===l&&(Au=!0);continue}if(Au===!0||R===l){for(vu++;tu()!==!0&&(R=X());){if(R===s){Du=G.backslashes=!0,X();continue}if(R===l){vu++;continue}if(Au!==!0&&R===r&&(R=X())===r){if(gu=G.isBrace=!0,Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(Au!==!0&&R===n){if(gu=G.isBrace=!0,Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===C&&(vu--,vu===0)){Au=!1,gu=G.isBrace=!0,ru=!0;break}}if(T===!0)continue;break}if(R===i){if(O.push(j),x.push(G),G={value:"",depth:0,isGlob:!1},ru===!0)continue;if(su===r&&j===q+1){q+=2;continue}au=j+1;continue}if(g.noext!==!0&&(R===m||R===t||R===e||R===b||R===o)&&A()===d){if(Z=G.isGlob=!0,cu=G.isExtglob=!0,ru=!0,R===o&&j===q&&(hu=!0),T===!0){for(;tu()!==!0&&(R=X());){if(R===s){Du=G.backslashes=!0,R=X();continue}if(R===f){Z=G.isGlob=!0,ru=!0;break}}continue}break}if(R===e){if(su===e&&($u=G.isGlobstar=!0),Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===b){if(Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===p){for(;tu()!==!0&&(nu=X());){if(nu===s){Du=G.backslashes=!0,X();continue}if(nu===$){lu=G.isBracket=!0,Z=G.isGlob=!0,ru=!0;break}}if(T===!0)continue;break}if(g.nonegate!==!0&&R===o&&j===q){Q=G.negated=!0,q++;continue}if(g.noparen!==!0&&R===d){if(Z=G.isGlob=!0,T===!0){for(;tu()!==!0&&(R=X());){if(R===d){Du=G.backslashes=!0,R=X();continue}if(R===f){ru=!0;break}}continue}break}if(Z===!0){if(ru=!0,T===!0)continue;break}}g.noext===!0&&(cu=!1,Z=!1);let z=v,wu="",c="";q>0&&(wu=v.slice(0,q),v=v.slice(q),au-=q),z&&Z===!0&&au>0?(z=v.slice(0,au),c=v.slice(au)):Z===!0?(z="",c=v):z=v,z&&z!==""&&z!=="/"&&z!==v&&F(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),g.unescape===!0&&(c&&(c=u.removeBackslashes(c)),z&&Du===!0&&(z=u.removeBackslashes(z)));const D={prefix:wu,input:_,start:q,base:z,glob:c,isBrace:gu,isBracket:lu,isGlob:Z,isExtglob:cu,isGlobstar:$u,negated:Q,negatedExtglob:hu};if(g.tokens===!0&&(D.maxDepth=0,F(R)||x.push(G),D.tokens=x),g.parts===!0||g.tokens===!0){let nu;for(let M=0;M<O.length;M++){const pu=nu?nu+1:q,Eu=O[M],iu=_.slice(pu,Eu);g.tokens&&(M===0&&q!==0?(x[M].isPrefix=!0,x[M].value=wu):x[M].value=iu,w(x[M]),D.maxDepth+=x[M].depth),(M!==0||iu!=="")&&S.push(iu),nu=Eu}if(nu&&nu+1<_.length){const M=_.slice(nu+1);S.push(M),g.tokens&&(x[x.length-1].value=M,w(x[x.length-1]),D.maxDepth+=x[x.length-1].depth)}D.slashes=O,D.parts=S}return D},Le}var Pe,gt;function Bs(){if(gt)return Pe;gt=1;const u=Re(),e=ke(),{MAX_LENGTH:t,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=u,i=(h,g)=>typeof g.expandRange=="function"?g.expandRange(...h,g):(h.sort(),`[${h.join("-")}]`),l=(h,g)=>`Missing ${h}: "${g}" - use "\\\\${g}" to match literal characters`,d=h=>{const g=[];let a=0,T=0,O=0,x="",S=!1;for(const v of h){if(S===!0){x+=v,S=!1;continue}if(v==="\\"){x+=v,S=!0;continue}if(v==='"'){O=O===1?0:1,x+=v;continue}if(O===0){if(v==="[")a++;else if(v==="]"&&a>0)a--;else if(a===0){if(v==="(")T++;else if(v===")"&&T>0)T--;else if(v==="|"&&T===0){g.push(x),x="";continue}}}x+=v}return g.push(x),g},p=h=>{let g=!1;for(const a of h){if(g===!0){g=!1;continue}if(a==="\\"){g=!0;continue}if(/[?*+@!()[\]{}]/.test(a))return!1}return!0},m=h=>{let g=h.trim(),a=!0;for(;a===!0;)a=!1,/^@\([^\\()[\]{}|]+\)$/.test(g)&&(g=g.slice(2,-1),a=!0);if(p(g))return g.replace(/\\(.)/g,"$1")},b=h=>{const g=h.map(m).filter(Boolean);for(let a=0;a<g.length;a++)for(let T=a+1;T<g.length;T++){const O=g[a],x=g[T],S=O[0];if(!(!S||O!==S.repeat(O.length)||x!==S.repeat(x.length))&&(O===x||O.startsWith(x)||x.startsWith(O)))return!0}return!1},C=(h,g=!0)=>{if(h[0]!=="+"&&h[0]!=="*"||h[1]!=="(")return;let a=0,T=0,O=0,x=!1;for(let S=1;S<h.length;S++){const v=h[S];if(x===!0){x=!1;continue}if(v==="\\"){x=!0;continue}if(v==='"'){O=O===1?0:1;continue}if(O!==1){if(v==="["){a++;continue}if(v==="]"&&a>0){a--;continue}if(!(a>0)){if(v==="("){T++;continue}if(v===")"&&(T--,T===0))return g===!0&&S!==h.length-1?void 0:{type:h[0],body:h.slice(2,S),end:S}}}}},f=h=>`${h.length===1?e.escapeRegex(h[0]):`[${h.map(g=>e.escapeRegex(g)).join("")}]`}*`,$=h=>{let g=0;const a=[];for(;g<h.length;){const T=C(h.slice(g),!1);if(!T||T.type!=="*")return;const O=d(T.body).map(S=>S.trim());if(O.length!==1)return;const x=m(O[0]);if(!x||x.length!==1)return;a.push(x),g+=T.end+1}if(!(a.length<1))return a},F=h=>{let g=0,a=h.trim(),T=C(a);for(;T;)g++,a=T.body.trim(),T=C(a);return g},w=(h,g)=>{if(g.maxExtglobRecursion===!1)return{risky:!1};const a=typeof g.maxExtglobRecursion=="number"?g.maxExtglobRecursion:u.DEFAULT_MAX_EXTGLOB_RECURSION,T=d(h).map(v=>v.trim());if(T.length>1&&(T.some(v=>v==="")||T.some(v=>/^[*?]+$/.test(v))||b(T)))return{risky:!0};const O=[];let x=!1,S=!0;for(const v of T){const j=$(v);if(j){x=!0,O.push(...j);continue}const q=m(v);if(q&&q.length===1){O.push(q);continue}if(S=!1,F(v)>a)return{risky:!0}}return x?S?{risky:!0,safeOutput:f([...new Set(O)])}:{risky:!0}:{risky:!1}},_=(h,g)=>{if(typeof h!="string")throw new TypeError("Expected a string");h=o[h]||h;const a={...g},T=typeof a.maxLength=="number"?Math.min(t,a.maxLength):t;let O=h.length;if(O>T)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${T}`);const x={type:"bos",value:"",output:a.prepend||""},S=[x],v=a.capture?"":"?:",j=u.globChars(a.windows),q=u.extglobChars(j),{DOT_LITERAL:au,PLUS_LITERAL:gu,SLASH_LITERAL:lu,ONE_CHAR:Z,DOTS_SLASH:cu,NO_DOT:$u,NO_DOT_SLASH:Au,NO_DOTS_SLASH:Du,QMARK:Q,QMARK_NO_DOT:hu,STAR:ru,START_ANCHOR:vu}=j,su=B=>`(${v}(?:(?!${vu}${B.dot?cu:au}).)*?)`,R=a.dot?"":$u,G=a.dot?Q:hu;let tu=a.bash===!0?su(a):ru;a.capture&&(tu=`(${tu})`),typeof a.noext=="boolean"&&(a.noextglob=a.noext);const A={input:h,index:-1,start:0,dot:a.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};h=e.removePrefix(h,A),O=h.length;const X=[],z=[],wu=[];let c=x,D;const nu=()=>A.index===O-1,M=A.peek=(B=1)=>h[A.index+B],pu=A.advance=()=>h[++A.index]||"",Eu=()=>h.slice(A.index+1),iu=(B="",K=0)=>{A.consumed+=B,A.index+=K},be=B=>{A.output+=B.output!=null?B.output:B.value,iu(B.value)},fr=()=>{let B=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)pu(),A.start++,B++;return B%2===0?!1:(A.negated=!0,A.start++,!0)},$e=B=>{A[B]++,wu.push(B)},xu=B=>{A[B]--,wu.pop()},L=B=>{if(c.type==="globstar"){const K=A.braces>0&&(B.type==="comma"||B.type==="brace"),y=B.extglob===!0||X.length&&(B.type==="pipe"||B.type==="paren");B.type!=="slash"&&B.type!=="paren"&&!K&&!y&&(A.output=A.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=tu,A.output+=c.output)}if(X.length&&B.type!=="paren"&&(X[X.length-1].inner+=B.value),(B.value||B.output)&&be(B),c&&c.type==="text"&&B.type==="text"){c.output=(c.output||c.value)+B.value,c.value+=B.value;return}B.prev=c,S.push(B),c=B},ve=(B,K)=>{const y={...q[K],conditions:1,inner:""};y.prev=c,y.parens=A.parens,y.output=A.output,y.startIndex=A.index,y.tokensIndex=S.length;const P=(a.capture?"(":"")+y.open;$e("parens"),L({type:B,value:K,output:A.output?"":Z}),L({type:"paren",extglob:!0,value:pu(),output:P}),X.push(y)},Ar=B=>{const K=h.slice(B.startIndex,A.index+1),y=h.slice(B.startIndex+2,A.index),P=w(y,a);if((B.type==="plus"||B.type==="star")&&P.risky){const U=P.safeOutput?(B.output?"":Z)+(a.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Cu=S[B.tokensIndex];Cu.type="text",Cu.value=K,Cu.output=U||e.escapeRegex(K);for(let Fu=B.tokensIndex+1;Fu<S.length;Fu++)S[Fu].value="",S[Fu].output="",delete S[Fu].suffix;A.output=B.output+Cu.output,A.backtrack=!0,L({type:"paren",extglob:!0,value:D,output:""}),xu("parens");return}let J=B.close+(a.capture?")":""),uu;if(B.type==="negate"){let U=tu;if(B.inner&&B.inner.length>1&&B.inner.includes("/")&&(U=su(a)),(U!==tu||nu()||/^\)+$/.test(Eu()))&&(J=B.close=`)$))${U}`),B.inner.includes("*")&&(uu=Eu())&&/^\.[^\\/.]+$/.test(uu)){const Cu=_(uu,{...g,fastpaths:!1}).output;J=B.close=`)${Cu})${U})`}B.prev.type==="bos"&&(A.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:D,output:J}),xu("parens")};if(a.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(h)){let B=!1,K=h.replace(r,(y,P,J,uu,U,Cu)=>uu==="\\"?(B=!0,y):uu==="?"?P?P+uu+(U?Q.repeat(U.length):""):Cu===0?G+(U?Q.repeat(U.length):""):Q.repeat(J.length):uu==="."?au.repeat(J.length):uu==="*"?P?P+uu+(U?tu:""):tu:P?y:`\\${y}`);return B===!0&&(a.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,y=>y.length%2===0?"\\\\":y?"\\":"")),K===h&&a.contains===!0?(A.output=h,A):(A.output=e.wrapOutput(K,A,g),A)}for(;!nu();){if(D=pu(),D==="\0")continue;if(D==="\\"){const y=M();if(y==="/"&&a.bash!==!0||y==="."||y===";")continue;if(!y){D+="\\",L({type:"text",value:D});continue}const P=/^\\+/.exec(Eu());let J=0;if(P&&P[0].length>2&&(J=P[0].length,A.index+=J,J%2!==0&&(D+="\\")),a.unescape===!0?D=pu():D+=pu(),A.brackets===0){L({type:"text",value:D});continue}}if(A.brackets>0&&(D!=="]"||c.value==="["||c.value==="[^")){if(a.posix!==!1&&D===":"){const y=c.value.slice(1);if(y.includes("[")&&(c.posix=!0,y.includes(":"))){const P=c.value.lastIndexOf("["),J=c.value.slice(0,P),uu=c.value.slice(P+2),U=s[uu];if(U){c.value=J+U,A.backtrack=!0,pu(),!x.output&&S.indexOf(c)===1&&(x.output=Z);continue}}}(D==="["&&M()!==":"||D==="-"&&M()==="]")&&(D=`\\${D}`),D==="]"&&(c.value==="["||c.value==="[^")&&(D=`\\${D}`),a.posix===!0&&D==="!"&&c.value==="["&&(D="^"),c.value+=D,be({value:D});continue}if(A.quotes===1&&D!=='"'){D=e.escapeRegex(D),c.value+=D,be({value:D});continue}if(D==='"'){A.quotes=A.quotes===1?0:1,a.keepQuotes===!0&&L({type:"text",value:D});continue}if(D==="("){$e("parens"),L({type:"paren",value:D});continue}if(D===")"){if(A.parens===0&&a.strictBrackets===!0)throw new SyntaxError(l("opening","("));const y=X[X.length-1];if(y&&A.parens===y.parens+1){Ar(X.pop());continue}L({type:"paren",value:D,output:A.parens?")":"\\)"}),xu("parens");continue}if(D==="["){if(a.nobracket===!0||!Eu().includes("]")){if(a.nobracket!==!0&&a.strictBrackets===!0)throw new SyntaxError(l("closing","]"));D=`\\${D}`}else $e("brackets");L({type:"bracket",value:D});continue}if(D==="]"){if(a.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){L({type:"text",value:D,output:`\\${D}`});continue}if(A.brackets===0){if(a.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:D,output:`\\${D}`});continue}xu("brackets");const y=c.value.slice(1);if(c.posix!==!0&&y[0]==="^"&&!y.includes("/")&&(D=`/${D}`),c.value+=D,be({value:D}),a.literalBrackets===!1||e.hasRegexChars(y))continue;const P=e.escapeRegex(c.value);if(A.output=A.output.slice(0,-c.value.length),a.literalBrackets===!0){A.output+=P,c.value=P;continue}c.value=`(${v}${P}|${c.value})`,A.output+=c.value;continue}if(D==="{"&&a.nobrace!==!0){$e("braces");const y={type:"brace",value:D,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};z.push(y),L(y);continue}if(D==="}"){const y=z[z.length-1];if(a.nobrace===!0||!y){L({type:"text",value:D,output:D});continue}let P=")";if(y.dots===!0){const J=S.slice(),uu=[];for(let U=J.length-1;U>=0&&(S.pop(),J[U].type!=="brace");U--)J[U].type!=="dots"&&uu.unshift(J[U].value);P=i(uu,a),A.backtrack=!0}if(y.comma!==!0&&y.dots!==!0){const J=A.output.slice(0,y.outputIndex),uu=A.tokens.slice(y.tokensIndex);y.value=y.output="\\{",D=P="\\}",A.output=J;for(const U of uu)A.output+=U.output||U.value}L({type:"brace",value:D,output:P}),xu("braces"),z.pop();continue}if(D==="|"){X.length>0&&X[X.length-1].conditions++,L({type:"text",value:D});continue}if(D===","){let y=D;const P=z[z.length-1];P&&wu[wu.length-1]==="braces"&&(P.comma=!0,y="|"),L({type:"comma",value:D,output:y});continue}if(D==="/"){if(c.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",S.pop(),c=x;continue}L({type:"slash",value:D,output:lu});continue}if(D==="."){if(A.braces>0&&c.type==="dot"){c.value==="."&&(c.output=au);const y=z[z.length-1];c.type="dots",c.output+=D,c.value+=D,y.dots=!0;continue}if(A.braces+A.parens===0&&c.type!=="bos"&&c.type!=="slash"){L({type:"text",value:D,output:au});continue}L({type:"dot",value:D,output:au});continue}if(D==="?"){if(!(c&&c.value==="(")&&a.noextglob!==!0&&M()==="("&&M(2)!=="?"){ve("qmark",D);continue}if(c&&c.type==="paren"){const y=M();let P=D;(c.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Eu()))&&(P=`\\${D}`),L({type:"text",value:D,output:P});continue}if(a.dot!==!0&&(c.type==="slash"||c.type==="bos")){L({type:"qmark",value:D,output:hu});continue}L({type:"qmark",value:D,output:Q});continue}if(D==="!"){if(a.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){ve("negate",D);continue}if(a.nonegate!==!0&&A.index===0){fr();continue}}if(D==="+"){if(a.noextglob!==!0&&M()==="("&&M(2)!=="?"){ve("plus",D);continue}if(c&&c.value==="("||a.regex===!1){L({type:"plus",value:D,output:gu});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||A.parens>0){L({type:"plus",value:D});continue}L({type:"plus",value:gu});continue}if(D==="@"){if(a.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:D,output:""});continue}L({type:"text",value:D});continue}if(D!=="*"){(D==="$"||D==="^")&&(D=`\\${D}`);const y=n.exec(Eu());y&&(D+=y[0],A.index+=y[0].length),L({type:"text",value:D});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=D,c.output=tu,A.backtrack=!0,A.globstar=!0,iu(D);continue}let B=Eu();if(a.noextglob!==!0&&/^\([^?]/.test(B)){ve("star",D);continue}if(c.type==="star"){if(a.noglobstar===!0){iu(D);continue}const y=c.prev,P=y.prev,J=y.type==="slash"||y.type==="bos",uu=P&&(P.type==="star"||P.type==="globstar");if(a.bash===!0&&(!J||B[0]&&B[0]!=="/")){L({type:"star",value:D,output:""});continue}const U=A.braces>0&&(y.type==="comma"||y.type==="brace"),Cu=X.length&&(y.type==="pipe"||y.type==="paren");if(!J&&y.type!=="paren"&&!U&&!Cu){L({type:"star",value:D,output:""});continue}for(;B.slice(0,3)==="/**";){const Fu=h[A.index+4];if(Fu&&Fu!=="/")break;B=B.slice(3),iu("/**",3)}if(y.type==="bos"&&nu()){c.type="globstar",c.value+=D,c.output=su(a),A.output=c.output,A.globstar=!0,iu(D);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&!uu&&nu()){A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=su(a)+(a.strictSlashes?")":"|$)"),c.value+=D,A.globstar=!0,A.output+=y.output+c.output,iu(D);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&B[0]==="/"){const Fu=B[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=`${su(a)}${lu}|${lu}${Fu})`,c.value+=D,A.output+=y.output+c.output,A.globstar=!0,iu(D+pu()),L({type:"slash",value:"/",output:""});continue}if(y.type==="bos"&&B[0]==="/"){c.type="globstar",c.value+=D,c.output=`(?:^|${lu}|${su(a)}${lu})`,A.output=c.output,A.globstar=!0,iu(D+pu()),L({type:"slash",value:"/",output:""});continue}if(U&&B[0]==="/"){c.type="globstar",c.value+=D,c.output=`(?:^|${lu}|${su(a)}${lu})`,A.output+=c.output,A.globstar=!0,iu(D+pu()),L({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-c.output.length),c.type="globstar",c.output=su(a),c.value+=D,A.output+=c.output,A.globstar=!0,iu(D);continue}const K={type:"star",value:D,output:tu};if(a.bash===!0){K.output=".*?",(c.type==="bos"||c.type==="slash")&&(K.output=R+K.output),L(K);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&a.regex===!0){K.output=D,L(K);continue}(A.index===A.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(A.output+=Au,c.output+=Au):a.dot===!0?(A.output+=Du,c.output+=Du):(A.output+=R,c.output+=R),M()!=="*"&&(A.output+=Z,c.output+=Z)),L(K)}for(;A.brackets>0;){if(a.strictBrackets===!0)throw new SyntaxError(l("closing","]"));A.output=e.escapeLast(A.output,"["),xu("brackets")}for(;A.parens>0;){if(a.strictBrackets===!0)throw new SyntaxError(l("closing",")"));A.output=e.escapeLast(A.output,"("),xu("parens")}for(;A.braces>0;){if(a.strictBrackets===!0)throw new SyntaxError(l("closing","}"));A.output=e.escapeLast(A.output,"{"),xu("braces")}if(a.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${lu}?`}),A.backtrack===!0){A.output="";for(const B of A.tokens)A.output+=B.output!=null?B.output:B.value,B.suffix&&(A.output+=B.suffix)}return A};return _.fastpaths=(h,g)=>{const a={...g},T=typeof a.maxLength=="number"?Math.min(t,a.maxLength):t,O=h.length;if(O>T)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${T}`);h=o[h]||h;const{DOT_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:v,DOTS_SLASH:j,NO_DOT:q,NO_DOTS:au,NO_DOTS_SLASH:gu,STAR:lu,START_ANCHOR:Z}=u.globChars(a.windows),cu=a.dot?au:q,$u=a.dot?gu:q,Au=a.capture?"":"?:",Du={negated:!1,prefix:""};let Q=a.bash===!0?".*?":lu;a.capture&&(Q=`(${Q})`);const hu=R=>R.noglobstar===!0?Q:`(${Au}(?:(?!${Z}${R.dot?j:x}).)*?)`,ru=R=>{switch(R){case"*":return`${cu}${v}${Q}`;case".*":return`${x}${v}${Q}`;case"*.*":return`${cu}${Q}${x}${v}${Q}`;case"*/*":return`${cu}${Q}${S}${v}${$u}${Q}`;case"**":return cu+hu(a);case"**/*":return`(?:${cu}${hu(a)}${S})?${$u}${v}${Q}`;case"**/*.*":return`(?:${cu}${hu(a)}${S})?${$u}${Q}${x}${v}${Q}`;case"**/.*":return`(?:${cu}${hu(a)}${S})?${x}${v}${Q}`;default:{const G=/^(.*?)\.(\w+)$/.exec(R);if(!G)return;const tu=ru(G[1]);return tu?tu+x+G[2]:void 0}}},vu=e.removePrefix(h,Du);let su=ru(vu);return su&&a.strictSlashes!==!0&&(su+=`${S}?`),su},Pe=_,Pe}var He,dt;function bs(){if(dt)return He;dt=1;const u=ys(),e=Bs(),t=ke(),s=Re(),n=o=>o&&typeof o=="object"&&!Array.isArray(o),r=(o,i,l=!1)=>{if(Array.isArray(o)){const F=o.map(w=>r(w,i,l));return w=>{for(const _ of F){const h=_(w);if(h)return h}return!1}}const d=n(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!d)throw new TypeError("Expected pattern to be a non-empty string");const p=i||{},m=p.windows,b=d?r.compileRe(o,i):r.makeRe(o,i,!1,!0),C=b.state;delete b.state;let f=()=>!1;if(p.ignore){const F={...i,ignore:null,onMatch:null,onResult:null};f=r(p.ignore,F,l)}const $=(F,w=!1)=>{const{isMatch:_,match:h,output:g}=r.test(F,b,i,{glob:o,posix:m}),a={glob:o,state:C,regex:b,posix:m,input:F,output:g,match:h,isMatch:_};if(typeof p.onResult=="function"&&p.onResult(a),_===!1)return a.isMatch=!1,w?a:!1;u:if(f(F)){if(typeof p.onIgnore=="function"&&p.onIgnore(a)===s.UNIGNORE){a.isMatch=!0;break u}return a.isMatch=!1,w?a:!1}return typeof p.onMatch=="function"&&p.onMatch(a),w?a:!0};return l&&($.state=C),$};return r.test=(o,i,l,{glob:d,posix:p}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const m=l||{},b=m.format||(p?t.toPosixSlashes:null);let C=o===d,f=C&&b?b(o):o;return C===!1&&(f=b?b(o):o,C=f===d),(C===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?C=r.matchBase(o,i,l,p):C=i.exec(f)),{isMatch:!!C,match:C,output:f}},r.matchBase=(o,i,l,d=l&&l.windows)=>(i instanceof RegExp?i:r.makeRe(i,l)).test(t.basename(o,{windows:d})),r.isMatch=(o,i,l)=>r(i,l)(o),r.parse=(o,i)=>Array.isArray(o)?o.map(l=>r.parse(l,i)):e(o,{...i,fastpaths:!1}),r.scan=(o,i)=>u(o,i),r.compileRe=(o,i,l=!1,d=!1)=>{if(l===!0)return o.output;const p=i||{},m=p.contains?"":"^",b=p.contains?"":"$";let C=`${m}(?:${o.output})${b}`;o&&o.negated===!0&&(C=`^(?!${C}).*$`);const f=r.toRegex(C,i);return d===!0&&(f.state=o),f},r.makeRe=(o,i={},l=!1,d=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let p={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(p.output=e.fastpaths(o,i)),p.output||(p=e(o,i)),r.compileRe(p,i,l,d)},r.toRegex=(o,i)=>{try{const l=i||{};return new RegExp(o,l.flags||(l.nocase?"i":""))}catch(l){if(i&&i.debug===!0)throw l;return/$^/}},r.constants=s,He=r,He}var Ie,mt;function $s(){if(mt)return Ie;mt=1;const u=bs(),e=ke();function t(s,n,r=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:e.isWindows()}),u(s,n,r)}return Object.assign(t,u),Ie=t,Ie}var vs=$s();const Ru=tt(vs),ws=I(import.meta.url),Yu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ye=u=>{if(typeof Yu<"u"&&Yu.versions&&Yu.versions.node){const[e,t]=Yu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Yu.getBuiltinModule(u)}return ws(u)},yt=ye("fs"),xs={...yt,default:yt},{statSync:Ss,stat:_s,realpathSync:Ts,realpath:Rs,readdirSync:ks,readdir:Ns}=ye("fs"),{sep:zt,basename:Os,dirname:Ve,resolve:Wt,normalize:Ls,relative:Ps,posix:ku,isAbsolute:Hs}=ye("path"),{fileURLToPath:Is}=ye("url"),{createRequire:Ms}=ye("module");var Bt=Ms(import.meta.url);function js(u){let e=Ls(u);return e.length>1&&e[e.length-1]===zt&&(e=e.substring(0,e.length-1)),e}const Gs=/[\\/]/g;function qt(u,e){return u.replace(Gs,e)}const Us=/^[a-z]:[\\/]$/i;function zs(u){return u==="/"||Us.test(u)}function Me(u,e){const{resolvePaths:t,normalizePath:s,pathSeparator:n}=e,r=process.platform==="win32"&&u.includes("/")||u.startsWith(".");if(t&&(u=Wt(u)),(s||r)&&(u=js(u)),u===".")return"";const o=u[u.length-1]!==n;return qt(o?u+n:u,n)}function Xt(u,e){return e+u}function Ws(u,e){return function(t,s){return s.startsWith(u)?s.slice(u.length)+t:qt(Ps(u,s),e.pathSeparator)+e.pathSeparator+t}}function qs(u){return u}function Xs(u,e,t){return e+u+t}function Ks(u,e){const{relativePaths:t,includeBasePath:s}=e;return t&&u?Ws(u,e):s?Xt:qs}function Vs(u){return function(e,t){t.push(e.substring(u.length)||".")}}function Qs(u){return function(e,t,s){const n=e.substring(u.length)||".";s.every(r=>r(n,!0))&&t.push(n)}}const Js=(u,e)=>{e.push(u||".")},Zs=(u,e,t)=>{const s=u||".";t.every(n=>n(s,!0))&&e.push(s)},Ys=()=>{};function un(u,e){const{includeDirs:t,filters:s,relativePaths:n}=e;return t?n?s&&s.length?Qs(u):Vs(u):s&&s.length?Zs:Js:Ys}const en=(u,e,t,s)=>{s.every(n=>n(u,!1))&&t.files++},tn=(u,e,t,s)=>{s.every(n=>n(u,!1))&&e.push(u)},rn=(u,e,t,s)=>{t.files++},sn=(u,e)=>{e.push(u)},nn=()=>{};function on(u){const{excludeFiles:e,filters:t,onlyCounts:s}=u;return e?nn:t&&t.length?s?en:tn:s?rn:sn}const an=u=>u,ln=()=>[""].slice(0,0);function cn(u){return u.group?ln:an}const Dn=(u,e,t)=>{u.push({directory:e,files:t,dir:e})},pn=()=>{};function fn(u){return u.group?Dn:pn}const An=function(u,e,t){const{queue:s,fs:n,options:{suppressErrors:r}}=e;s.enqueue(),n.realpath(u,(o,i)=>{if(o)return s.dequeue(r?null:o,e);n.stat(i,(l,d)=>{if(l)return s.dequeue(r?null:l,e);if(d.isDirectory()&&Kt(u,i,e))return s.dequeue(null,e);t(d,i),s.dequeue(null,e)})})},hn=function(u,e,t){const{queue:s,fs:n,options:{suppressErrors:r}}=e;s.enqueue();try{const o=n.realpathSync(u),i=n.statSync(o);if(i.isDirectory()&&Kt(u,o,e))return;t(i,o)}catch(o){if(!r)throw o}};function En(u,e){return!u.resolveSymlinks||u.excludeSymlinks?null:e?hn:An}function Kt(u,e,t){if(t.options.useRealPaths)return Cn(e,t);let s=Ve(u),n=1;for(;s!==t.root&&n<2;){const r=t.symlinks.get(s);r&&(r===e||r.startsWith(e)||e.startsWith(r))?n++:s=Ve(s)}return t.symlinks.set(u,e),n>1}function Cn(u,e){return e.visited.includes(u+e.options.pathSeparator)}const Fn=u=>u.counts,gn=u=>u.groups,dn=u=>u.paths,mn=u=>u.paths.slice(0,u.options.maxFiles),yn=(u,e,t)=>(Ne(e,t,u.counts,u.options.suppressErrors),null),Bn=(u,e,t)=>(Ne(e,t,u.paths,u.options.suppressErrors),null),bn=(u,e,t)=>(Ne(e,t,u.paths.slice(0,u.options.maxFiles),u.options.suppressErrors),null),$n=(u,e,t)=>(Ne(e,t,u.groups,u.options.suppressErrors),null);function Ne(u,e,t,s){e(u&&!s?u:null,t)}function vn(u,e){const{onlyCounts:t,group:s,maxFiles:n}=u;return t?e?Fn:yn:s?e?gn:$n:n?e?mn:bn:e?dn:Bn}const Vt={withFileTypes:!0},wn=(u,e,t,s,n)=>{if(u.queue.enqueue(),s<0)return u.queue.dequeue(null,u);const{fs:r}=u;u.visited.push(e),u.counts.directories++,r.readdir(e||".",Vt,(o,i=[])=>{n(i,t,s),u.queue.dequeue(u.options.suppressErrors?null:o,u)})},xn=(u,e,t,s,n)=>{const{fs:r}=u;if(s<0)return;u.visited.push(e),u.counts.directories++;let o=[];try{o=r.readdirSync(e||".",Vt)}catch(i){if(!u.options.suppressErrors)throw i}n(o,t,s)};function Sn(u){return u?xn:wn}var _n=class{count=0;constructor(u){this.onQueueEmpty=u}enqueue(){return this.count++,this.count}dequeue(u,e){this.onQueueEmpty&&(--this.count<=0||u)&&(this.onQueueEmpty(u,e),u&&(e.controller.abort(),this.onQueueEmpty=void 0))}},Tn=class{_files=0;_directories=0;set files(u){this._files=u}get files(){return this._files}set directories(u){this._directories=u}get directories(){return this._directories}get dirs(){return this._directories}},Rn=class{aborted=!1;abort(){this.aborted=!0}},Qt=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,s){this.isSynchronous=!s,this.callbackInvoker=vn(t,this.isSynchronous),this.root=Me(e,t),this.state={root:zs(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Tn,options:t,queue:new _n((n,r)=>this.callbackInvoker(r,n,s)),symlinks:new Map,visited:[""].slice(0,0),controller:new Rn,fs:t.fs||xs},this.joinPath=Ks(this.root,t),this.pushDirectory=un(this.root,t),this.pushFile=on(t),this.getArray=cn(t),this.groupFiles=fn(t),this.resolveSymlink=En(t,this.isSynchronous),this.walkDirectory=Sn(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,s)=>{const{paths:n,options:{filters:r,resolveSymlinks:o,excludeSymlinks:i,exclude:l,maxFiles:d,signal:p,useRealPaths:m,pathSeparator:b},controller:C}=this.state;if(C.aborted||p&&p.aborted||d&&n.length>d)return;const f=this.getArray(this.state.paths);for(let $=0;$<e.length;++$){const F=e[$];if(F.isFile()||F.isSymbolicLink()&&!o&&!i){const w=this.joinPath(F.name,t);this.pushFile(w,f,this.state.counts,r)}else if(F.isDirectory()){let w=Xs(F.name,t,this.state.options.pathSeparator);if(l&&l(F.name,w))continue;this.pushDirectory(w,n,r),this.walkDirectory(this.state,w,w,s-1,this.walk)}else if(this.resolveSymlink&&F.isSymbolicLink()){let w=Xt(F.name,t);this.resolveSymlink(w,this.state,(_,h)=>{if(_.isDirectory()){if(h=Me(h,this.state.options),l&&l(F.name,m?h:w+b))return;this.walkDirectory(this.state,h,m?h:w+b,s-1,this.walk)}else{h=m?h:w;const g=Os(h),a=Me(Ve(h),this.state.options);h=this.joinPath(g,a),this.pushFile(h,f,this.state.counts,r)}})}}this.groupFiles(this.state.groups,t,f)}};function kn(u,e){return new Promise((t,s)=>{Jt(u,e,(n,r)=>{if(n)return s(n);t(r)})})}function Jt(u,e,t){new Qt(u,e,t).start()}function Nn(u,e){return new Qt(u,e).start()}var bt=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return kn(this.root,this.options)}withCallback(e){Jt(this.root,this.options,e)}sync(){return Nn(this.root,this.options)}};let Zt=null;try{Bt.resolve("picomatch"),Zt=Bt("picomatch")}catch{}var On=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:zt,filters:[]};globFunction;constructor(u){this.options={...this.options,...u},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(u){return this.options.pathSeparator=u,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(u){return this.options.maxDepth=u,this}withMaxFiles(u){return this.options.maxFiles=u,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:u=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=u,this.withFullPaths()}withAbortSignal(u){return this.options.signal=u,this}normalize(){return this.options.normalizePath=!0,this}filter(u){return this.options.filters.push(u),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(u){return this.options.exclude=u,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(u){return new bt(u||".",this.options)}withGlobFunction(u){return this.globFunction=u,this}crawlWithOptions(u,e){return this.options={...this.options,...e},new bt(u||".",this.options)}glob(...u){return this.globFunction?this.globWithOptions(u):this.globWithOptions(u,{dot:!0})}globWithOptions(u,...e){const t=this.globFunction||Zt;if(!t)throw new Error("Please specify a glob function to use glob matching.");var s=this.globCache[u.join("\0")];return s||(s=t(u,...e),this.globCache[u.join("\0")]=s),this.options.filters.push(n=>s(n)),this}};const Ln=Array.isArray,Yt=/\\/g,Pn=/^[A-Za-z]:$/,ur=process.platform==="win32",Hn=/^(\/?\.\.)+$/;function $t(u,e={}){const t=u.length,s=Array(t),n=Array(t);let r,o;for(r=0;r<t;r++){const i=er(u[r]);s[r]=i;const l=i.length,d=Array(l);for(o=0;o<l;o++)d[o]=Ru(i[o],e);n[r]=d}return i=>{const l=i.split("/");if(l[0]===".."&&Hn.test(i))return!0;for(r=0;r<t;r++){const d=s[r],p=n[r],m=l.length,b=Math.min(m,d.length);for(o=0;o<b;){const C=d[o];if(C.includes("/"))return!0;if(!p[o](l[o]))break;if(!e.noglobstar&&C==="**")return!0;o++}if(o===m)return!0}return!1}}const In=/^[A-Z]:\/$/i,Mn=ur?u=>In.test(u):u=>u==="/";function vt(u,e,t){if(u===e||e.startsWith(`${u}/`)){if(t){const n=u.length+ +!Mn(u);return(r,o)=>r.slice(n,o?-1:void 0)||"."}const s=e.slice(u.length+1);return s?(n,r)=>{if(n===".")return s;const o=`${s}/${n}`;return r?o.slice(0,-1):o}:(n,r)=>r&&n!=="."?n.slice(0,-1):n}return t?s=>ku.relative(u,s)||".":s=>ku.relative(u,`${e}/${s}`)||"."}function jn(u,e){if(e.startsWith(`${u}/`)){const t=e.slice(u.length+1);return s=>`${t}/${s}`}return t=>{const s=ku.relative(u,`${e}/${t}`);return t[t.length-1]==="/"&&s!==""?`${s}/`:s||"."}}function wt(u){return u.replace(Pn,e=>`${e}/`)}const Gn={parts:!0};function er(u){var e;const t=Ru.scan(u,Gn);return!((e=t.parts)===null||e===void 0)&&e.length?t.parts:[u]}const Un=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,zn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Wn=u=>u.replace(Un,"\\$&"),qn=u=>u.replace(zn,"\\$&"),Xn=ur?qn:Wn;function Kn(u,e){const t=Ru.scan(u);return t.isGlob||t.negated}function ge(...u){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...u)}function tr(u){return typeof u=="string"?[u]:u??[]}const Vn=/^(\/?\.\.)+/,Qn=/\\(?=[()[\]{}!*+?@|])/g;function je(u,e,t,s){var n;const r=e.cwd;let o=u;u[u.length-1]==="/"&&(o=u.slice(0,-1));const i=o.lastIndexOf("/"),l=(i===-1?o:o.slice(i+1)).startsWith("!(");o[o.length-1]!=="*"&&!l&&e.expandDirectories&&(o+="/**");const d=Xn(r);o=Hs(o.replace(Qn,""))?ku.relative(d,o):ku.normalize(o);const p=(n=Vn.exec(o))===null||n===void 0?void 0:n[0],m=er(o);if(p){const C=(p.length+1)/3;let f=0;const $=d.split("/");for(;f<C&&m[f+C]===$[$.length+f-C];)o=o.slice(0,(C-f-1)*3)+o.slice((C-f)*3+m[f+C].length+1)||".",f++;const F=ku.join(r,p.slice(f*3));F[0]!=="."&&t.root.length>F.length&&(t.root=wt(F),t.depthOffset=-C+f)}if(!s&&t.depthOffset>=0){var b;(b=t.commonPath)!==null&&b!==void 0||(t.commonPath=m);const C=[],f=Math.min(t.commonPath.length,m.length);for(let $=0;$<f;$++){const F=m[$];if(F==="**"&&!m[$+1]){C.pop();break}if($===m.length-1||F!==t.commonPath[$]||Kn(F))break;C.push(F)}t.depthOffset=C.length,t.commonPath=C,t.root=wt(C.length>0?ku.join(r,...C):r)}return o}function Jn(u,e,t){const s=[],n=[],r=[];for(const o of u.ignore)o&&(o[0]!=="!"||o[1]==="("?n.push(je(o,u,t,!0)):r.push(o.slice(1)));for(const o of e)o&&(o[0]!=="!"||o[1]==="("?s.push(je(o,u,t,!1)):(o[1]!=="!"||o[2]==="(")&&n.push(je(o.slice(1),u,t,!0)));return{match:s,ignore:n,unignore:r}}function Zn(u,e){const t=u.cwd,s={root:t,depthOffset:0},n=Jn(u,e,s);u.debug&&ge("internal processing patterns:",n);const{absolute:r,caseSensitiveMatch:o,debug:i,dot:l,followSymbolicLinks:d,onlyDirectories:p}=u,m=s.root.replace(Yt,""),b={dot:l,nobrace:u.braceExpansion===!1,nocase:!o,noextglob:u.extglob===!1,noglobstar:u.globstar===!1,posix:!0},C=n.unignore.length>0,f=C?Ru(n.unignore,b):void 0,$=C?$t(n.unignore,b):void 0,F=Ru(n.match,{...b,ignore:n.ignore,onIgnore:f?S=>f(S.output)&&Ru.constants.UNIGNORE:void 0}),w=Ru(n.ignore,b),_=$t(n.match,b),h=vt(t,m,r),g=r?h:vt(t,m,!0),a=n.match.length>0&&n.match.every(S=>S==="**"||S==="**/*"),T=n.ignore.length>0||C||!a?(S,v)=>{const j=g(v,!0);return j==="."||$&&$(j)?!1:!_(j)||w(j)}:void 0;let O;u.deep!==void 0&&(O=Math.round(u.deep-s.depthOffset));const x=new On({filters:[i?(S,v)=>{const j=h(S,v),q=F(j);return q&&ge(`matched ${j}`),q}:(S,v)=>{const j=h(S,v);return F(j)}],exclude:i&&T?(S,v)=>{const j=T(S,v);return ge(`${j?"skipped":"crawling"} ${v}`),j}:T,fs:u.fs,pathSeparator:"/",relativePaths:!r,resolvePaths:r,includeBasePath:r,resolveSymlinks:d,excludeSymlinks:!d,excludeFiles:p,includeDirs:p||!u.onlyFiles,maxDepth:O,signal:u.signal}).crawl(m);return u.debug&&ge("internal properties:",{...s,root:m}),[x,t!==m&&!r&&jn(t,m)]}function Yn(u,e){if(e)for(let t=u.length-1;t>=0;t--)u[t]=e(u[t]);return u}const xt={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function uo(u){const e=Object.assign({},u);for(const t in xt)e[t]===void 0&&Object.assign(e,{[t]:xt[t]});return e.cwd=(e.cwd instanceof URL?Is(e.cwd):Wt(e.cwd||process.cwd())).replace(Yt,"/"),e.ignore=tr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Ns,readdirSync:e.fs.readdirSync||ks,realpath:e.fs.realpath||Rs,realpathSync:e.fs.realpathSync||Ts,stat:e.fs.stat||_s,statSync:e.fs.statSync||Ss}),e.debug&&ge("globbing with options:",e),e}function eo(u,e={}){var t;if(u&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const s=Ln(u)||typeof u=="string",n=tr((t=s?u:u.patterns)!==null&&t!==void 0?t:"**/*"),r=uo(s?e:u);return n.length>0?Zn(r,n):[]}async function sa(u,e){const[t,s]=eo(u,e);return t?Yn(await t.withPromise(),s):[]}var Ge,St;function to(){if(St)return Ge;St=1;/*!
2
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
- *
4
- * Copyright (c) 2014-2016, Jon Schlinkert.
5
- * Licensed under the MIT License.
6
- */return Ge=function(u){if(typeof u!="string"||u==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(u);){if(e[2])return!0;u=u.slice(e.index+e[0].length)}return!1},Ge}var Ue,_t;function rr(){if(_t)return Ue;_t=1;/*!
7
- * is-glob <https://github.com/jonschlinkert/is-glob>
8
- *
9
- * Copyright (c) 2014-2017, Jon Schlinkert.
10
- * Released under the MIT License.
11
- */var u=to(),e={"{":"}","(":")","[":"]"},t=function(n){if(n[0]==="!")return!0;for(var r=0,o=-2,i=-2,l=-2,d=-2,p=-2;r<n.length;){if(n[r]==="*"||n[r+1]==="?"&&/[\].+)]/.test(n[r])||i!==-1&&n[r]==="["&&n[r+1]!=="]"&&(i<r&&(i=n.indexOf("]",r)),i>r&&(p===-1||p>i||(p=n.indexOf("\\",r),p===-1||p>i)))||l!==-1&&n[r]==="{"&&n[r+1]!=="}"&&(l=n.indexOf("}",r),l>r&&(p=n.indexOf("\\",r),p===-1||p>l))||d!==-1&&n[r]==="("&&n[r+1]==="?"&&/[:!=]/.test(n[r+2])&&n[r+3]!==")"&&(d=n.indexOf(")",r),d>r&&(p=n.indexOf("\\",r),p===-1||p>d))||o!==-1&&n[r]==="("&&n[r+1]!=="|"&&(o<r&&(o=n.indexOf("|",r)),o!==-1&&n[o+1]!==")"&&(d=n.indexOf(")",o),d>o&&(p=n.indexOf("\\",o),p===-1||p>d))))return!0;if(n[r]==="\\"){var m=n[r+1];r+=2;var b=e[m];if(b){var C=n.indexOf(b,r);C!==-1&&(r=C+1)}if(n[r]==="!")return!0}else r++}return!1},s=function(n){if(n[0]==="!")return!0;for(var r=0;r<n.length;){if(/[*?{}()[\]]/.test(n[r]))return!0;if(n[r]==="\\"){var o=n[r+1];r+=2;var i=e[o];if(i){var l=n.indexOf(i,r);l!==-1&&(r=l+1)}if(n[r]==="!")return!0}else r++}return!1};return Ue=function(n,r){if(typeof n!="string"||n==="")return!1;if(u(n))return!0;var o=t;return r&&r.strict===!1&&(o=s),o(n)},Ue}const ro=I(import.meta.url),ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,sr=u=>{if(typeof ue<"u"&&ue.versions&&ue.versions.node){const[e,t]=ue.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ue.getBuiltinModule(u)}return ro(u)},so=sr("path"),no=sr("os");var ze,Tt;function oo(){if(Tt)return ze;Tt=1;var u=rr(),e=so.posix.dirname,t=no.platform()==="win32",s="/",n=/\\/g,r=/\\([!*?|[\](){}])/g;ze=function(l,d){var p=Object.assign({flipBackslashes:!0},d);p.flipBackslashes&&t&&l.indexOf(s)<0&&(l=l.replace(n,s)),o(l)&&(l+=s),l+="a";do l=e(l);while(i(l));return l.replace(r,"$1")};function o(l){var d=l.slice(-1),p;switch(d){case"}":p="{";break;case"]":p="[";break;default:return!1}var m=l.indexOf(p);return m<0?!1:l.slice(m+1,-1).includes(s)}function i(l){return/\([^()]+$/.test(l)||l[0]==="{"||l[0]==="["||/[^\\][{[]/.test(l)?!0:u(l)}return ze}var io=oo();tt(io);const ao=I(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=u=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,t]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ee.getBuiltinModule(u)}return ao(u)},{access:co}=lo("node:fs/promises");async function na(u,e=ut){bu(u),u=yu(u);try{return await co(u,e),!0}catch{return!1}}const Do=I(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,po=u=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,t]=te.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return te.getBuiltinModule(u)}return Do(u)},{accessSync:fo}=po("node:fs");function Qe(u,e=ut){bu(u),u=yu(u);try{return fo(u,e),!0}catch{return!1}}var Ao=rr();tt(Ao);const ho=I(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=u=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,t]=re.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return re.getBuiltinModule(u)}return ho(u)};nr("node:fs/promises");nr("node:fs");let Eo=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},Co=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const or=(u,e)=>{const t=u?.code;return t==="ENOENT"?new Eo(`no such file or directory, open '${e}'`):t==="EACCES"||t==="EPERM"?new Co(`unable to read the non-readable file: ${e}`):u},Fo=I(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ir=u=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,t]=se.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return se.getBuiltinModule(u)}return Fo(u)},{readFile:go}=ir("node:fs/promises"),{unzip:mo,brotliDecompress:yo}=ir("node:zlib"),Bo={brotli:yo,gzip:mo,none:(u,e)=>{e(null,u)}},aa=async(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:s,encoding:n,flag:r}=e??{};let o;try{o=await go(u,r?{flag:r}:{})}catch(i){throw or(i,u)}return await new Promise((i,l)=>{Bo[s??"none"](o,(d,p)=>{d?l(d):i(t?p:p.toString(n??"utf8"))})})},bo=I(import.meta.url),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ar=u=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[e,t]=ne.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ne.getBuiltinModule(u)}return bo(u)},{readFileSync:$o}=ar("node:fs"),{unzipSync:vo,brotliDecompressSync:wo}=ar("node:zlib"),xo={brotli:wo,gzip:vo,none:u=>u},So=(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:s,encoding:n,flag:r}=e??{};let o;try{o=$o(u,r?{flag:r}:{})}catch(d){throw or(d,u)}const i=xo[s??"none"],l=i(o);return t?l:l.toString(n??"utf8")},_o=I(import.meta.url),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,To=u=>{if(typeof oe<"u"&&oe.versions&&oe.versions.node){const[e,t]=oe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return oe.getBuiltinModule(u)}return _o(u)},{createRequire:lr}=To("node:module"),Ro=globalThis.process??Object.create(null),Rt={versions:{}},kt=new Proxy(Ro,{get(u,e){if(e in u)return u[e];if(e in Rt)return Rt[e]}}),ko=u=>u.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
12
- `),No=(u,e,t,s)=>{const n={column:0,line:-1,...u.start},r={...n,...u.end},o=n.line,i=n.column,l=r.line,d=r.column;let p=Math.max(o-(t+1),0),m=Math.min(e.length,l+s);o===-1&&(p=0),l===-1&&(m=e.length);const b=l-o,C={};if(b)for(let f=0;f<=b;f++){const $=f+o;if(!i)C[$]=!0;else if(f===0){const F=e[$-1]?.length;C[$]=[i,(F??0)-i+1]}else if(f===b)C[$]=[0,d];else{const F=e[$-f]?.length;C[$]=[0,F]}}else i===d?C[o]=i?[i,0]:!0:C[o]=[i,(d??0)-(i??0)];return{end:m,markerLines:C,start:p}},Oo=kt.platform==="win32"&&!kt.env?.WT_SESSION?">":"❯",la=(u,e,t)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...t,color:{gutter:f=>f,marker:f=>f,message:f=>f,...t?.color}},n=typeof e.start.column=="number";let r=(u.includes("\r")?ko(u):u).split(`
13
- `);typeof s.tabWidth=="number"&&u.includes(" ")&&(r=r.map(f=>f.replaceAll(" "," ".repeat(s.tabWidth))));const{end:o,markerLines:i,start:l}=No(e,r,s.linesAbove,s.linesBelow),d=String(o).length,{gutter:p,marker:m,message:b}=s.color;let C=r.slice(l,o).map((f,$)=>{const F=l+1+$,w=i[F],_=String(F).padStart(d),h=!i[F+1],g=` ${_}${s.showGutter?" |":""}`;if(w){let a="";if(Array.isArray(w)){const T=f.replaceAll(/[^\t]/g," ").slice(0,Math.max(w[0]-1,0)),O=w[1]||1;a=[`
14
- `,s.prefix+p(g.replaceAll(/\d/g," "))," ",T,m("^").repeat(O)].join(""),h&&s.message&&(a+=` ${b(s.message)}`)}return[s.prefix+m(Oo),p(g),f.length>0?` ${f}`:"",a].join("")}return`${s.prefix} ${p(g)}${f.length>0?` ${f}`:""}`}).join(`
15
- `);return s.message&&!n&&(C=`${s.prefix+" ".repeat(d+1)+s.message}
16
- ${C}`),C},Nt=(u,e)=>{let t=0,s=e.length-2;for(;t<s;){const n=t+(s-t>>1);if(u<e[n])s=n-1;else if(u>=e[n+1])t=n+1;else{t=n;break}}return t},Lo=/\n|\r(?!\n)/,Po=u=>u.split(Lo).reduce((e,t)=>(e.push(e.at(-1)+t.length+1),e),[0]),ca=(u,e,t)=>{if(!Array.isArray(u)&&typeof u!="string"||(typeof u=="string"||Array.isArray(u))&&u.length===0)return{column:0,line:0};if(typeof e!="number"||typeof u=="string"&&e>=u.length||Array.isArray(u)&&e+1>=u.at(-1))return{column:0,line:0};if(typeof u=="string"){const n=Po(u),r=Nt(e,n);return{column:e-n[r]+1,line:r+1}}const s=Nt(e,u);return{column:e-u[s]+1,line:s+1}},Ho=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Ho.set("AggregateError",AggregateError);const Io=lr(import.meta.url),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mo=u=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,t]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ie.getBuiltinModule(u)}return Io(u)};Mo("node:util");const jo=lr(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rt=u=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,t]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ae.getBuiltinModule(u)}return jo(u)};rt("node:fs");rt("node:path");rt("node:url");let Da=class extends Error{fileName;codeFrame;name="JSONError";#u;constructor(e){super(),this.#u=e}get message(){return`${this.#u}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
17
-
18
- ${this.codeFrame}
19
- `:""}`}set message(e){this.#u=e}};const Go=u=>{const e={force:!0,recursive:!0};return u?.maxRetries!==void 0&&(e.maxRetries=u.maxRetries),u?.retryDelay!==void 0&&(e.retryDelay=u.retryDelay),e},Uo=I(import.meta.url),le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cr=u=>{if(typeof le<"u"&&le.versions&&le.versions.node){const[e,t]=le.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return le.getBuiltinModule(u)}return Uo(u)};cr("node:fs");cr("node:fs/promises");const zo=I(import.meta.url),ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wo=u=>{if(typeof ce<"u"&&ce.versions&&ce.versions.node){const[e,t]=ce.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ce.getBuiltinModule(u)}return zo(u)};Wo("node:fs");const qo=I(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xo=u=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,t]=De.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return De.getBuiltinModule(u)}return qo(u)};Xo("node:fs/promises");const Ko=I(import.meta.url),pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vo=u=>{if(typeof pe<"u"&&pe.versions&&pe.versions.node){const[e,t]=pe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return pe.getBuiltinModule(u)}return Ko(u)},{rmSync:Qo}=Vo("node:fs"),fa=(u,e={})=>{bu(u),Qo(u,Go(e))};I(import.meta.url);const Jo=u=>{if(typeof u!="string"&&!(u instanceof ArrayBuffer)&&!ArrayBuffer.isView(u))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},Zo=I(import.meta.url),fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yo=u=>{if(typeof fe<"u"&&fe.versions&&fe.versions.node){const[e,t]=fe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return fe.getBuiltinModule(u)}return Zo(u)},{randomBytes:ui}=Yo("node:crypto"),ei=u=>`${u}.${process.pid.toString(36)}.${ui(6).toString("hex")}.tmp`,ti=new TextEncoder,ri=u=>{if(u instanceof Uint8Array)return u;if(typeof u=="string")return ti.encode(u);if(u instanceof ArrayBuffer)return new Uint8Array(u);if(ArrayBuffer.isView(u)){const e=u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},si=I(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ni=u=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[e,t]=Ae.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ae.getBuiltinModule(u)}return si(u)};ni("node:fs/promises");const oi=I(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=u=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,t]=he.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return he.getBuiltinModule(u)}return oi(u)},{mkdirSync:ai,writeFileSync:li,statSync:ci,renameSync:Ot,chownSync:Di,chmodSync:pi,unlinkSync:fi}=ii("node:fs"),Ai=(u,e,t)=>{t={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},bu(u),Jo(e),u=yu(u);const s=Qe(u,ut);if(s&&!t.overwrite)throw new Hr(`file already exists, open '${u}'`);const n=ei(u);try{!s&&t.recursive&&ai(et(u),{recursive:!0});let r;if(li(n,typeof e=="string"?Buffer.from(e,t.encoding??"utf8"):ri(e),{flag:"wx"}),s&&t.backup&&(r=ci(u),t.chown??={gid:r.gid,uid:r.uid},Ot(u,`${u}.bak`)),t.chown)try{Di(n,t.chown.uid,t.chown.gid)}catch{}pi(n,r&&!t.mode?r.mode:t.mode??438),Ot(n,u)}catch(r){throw new Error(`Failed to write file at: ${u} - ${r.message}`,{cause:r})}finally{Qe(n)&&fi(n)}},hi=/^(?:( )+|\t+)/,Be="space";function Lt(u,e,t){return u&&e===Be&&t===1}function Pt(u,e){const t=new Map;let s=0,n,r;for(const o of u.split(/\n/g)){if(!o)continue;const i=o.match(hi);if(i===null)s=0,n="";else{const l=i[0].length,d=i[1]?Be:"tab";if(Lt(e,d,l))continue;d!==n&&(s=0),n=d;let p=1,m=0;const b=l-s;if(s=l,b===0)p=0,m=1;else{const f=Math.abs(b);if(Lt(e,d,f))continue;r=Ei(d,f)}const C=t.get(r);t.set(r,C===void 0?[1,0]:[C[0]+p,C[1]+m])}}return t}function Ei(u,e){return(u===Be?"s":"t")+String(e)}function Ci(u){const e=u[0]==="s"?Be:"tab",t=Number(u.slice(1));return{type:e,amount:t}}function Fi(u){let e,t=0,s=0;for(const[n,[r,o]]of u)(r>t||r===t&&o>s)&&(t=r,s=o,e=n);return e}function gi(u,e){return(u===Be?" ":" ").repeat(e)}function di(u){if(typeof u!="string")throw new TypeError("Expected a string");let e=Pt(u,!0);e.size===0&&(e=Pt(u,!1));const t=Fi(e);let s,n=0,r="";return t!==void 0&&({type:s,amount:n}=Ci(t),r=gi(s,n)),{amount:n,type:s,indent:r}}const mi=I(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yi=u=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[e,t]=Ee.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ee.getBuiltinModule(u)}return mi(u)};yi("node:fs/promises");const Bi=I(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bi=u=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[e,t]=Ce.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ce.getBuiltinModule(u)}return Bi(u)},{readFileSync:$i}=bi("node:fs"),Aa=(u,e,t={})=>{const{detectIndent:s,indent:n,replacer:r,stringify:o=JSON.stringify,...i}={indent:" ",...t};let l=n,d=`
20
- `;if(Qe(u,Fr))try{const m=$i(u,"utf8");if(s){const{indent:b}=di(m);l=b}d=m.endsWith(`
21
- `)?`
22
- `:""}catch(m){if(m.code!=="ENOENT")throw m}const p=o(e,r,l);Ai(u,`${p}${d}`,i)},vi=I(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,st=u=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[e,t]=Fe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Fe.getBuiltinModule(u)}return vi(u)},wi=st("fs"),xi=st("os"),Si=st("path");var We={},Ht;function _i(){if(Ht)return We;Ht=1;var u=Object.defineProperty,e=(p,m)=>u(p,"name",{value:m,configurable:!0}),t=wi,s=xi,n=Si;const r=e(p=>{let m="";for(let b=0;b<p.length;b+=1){const C=p[b],f=C.toUpperCase();m+=C===f?C.toLowerCase():f}return m},"invertCase"),o=new Map,i=e((p,m)=>{const b=n.join(p,`.is-fs-case-sensitive-test-${process.pid}`);try{return m.writeFileSync(b,""),!m.existsSync(r(b))}finally{try{m.unlinkSync(b)}catch{}}},"checkDirectoryCaseWithWrite"),l=e((p,m,b)=>{try{return i(p,b)}catch(C){if(m===void 0)return i(s.tmpdir(),b);throw C}},"checkDirectoryCaseWithFallback"),d=e((p,m=t,b=!0)=>{const C=p??process.cwd();if(b&&o.has(C))return o.get(C);let f;const $=r(C);return $!==C&&m.existsSync(C)?f=!m.existsSync($):f=l(C,p,m),b&&o.set(C,f),f},"isFsCaseSensitive");return We.isFsCaseSensitive=d,We}var Ti=_i();const ha=Ti.isFsCaseSensitive;function Ea(u,e,t){const{buffer:s,compression:n,encoding:r="utf8",flag:o,...i}={},l=So(u,{buffer:s,compression:n,encoding:r,flag:o});return typeof e=="function"?it(l,e,i):it(l,i)}var Ri=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ki=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Ni=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,qe={Space_Separator:Ri,ID_Start:ki,ID_Continue:Ni},Y={isSpaceSeparator(u){return typeof u=="string"&&qe.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||qe.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="‌"||u==="‍"||qe.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let Je,ou,mu,Te,Su,fu,eu,nt,me;var Oi=function(u,e){Je=String(u),ou="start",mu=[],Te=0,Su=1,fu=0,eu=void 0,nt=void 0,me=void 0;do eu=Li(),Ii[ou]();while(eu.type!=="eof");return typeof e=="function"?Ze({"":me},"",e):me};function Ze(u,e,t){const s=u[e];if(s!=null&&typeof s=="object")if(Array.isArray(s))for(let n=0;n<s.length;n++){const r=String(n),o=Ze(s,r,t);o===void 0?delete s[r]:Object.defineProperty(s,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const n in s){const r=Ze(s,n,t);r===void 0?delete s[n]:Object.defineProperty(s,n,{value:r,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,e,s)}let N,k,de,du,H;function Li(){for(N="default",k="",de=!1,du=1;;){H=Bu();const u=Dr[N]();if(u)return u}}function Bu(){if(Je[Te])return String.fromCodePoint(Je.codePointAt(Te))}function E(){const u=Bu();return u===`
23
- `?(Su++,fu=0):u?fu+=u.length:fu++,u&&(Te+=u.length),u}const Dr={default(){switch(H){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
24
- `:case"\r":case"\u2028":case"\u2029":E();return;case"/":E(),N="comment";return;case void 0:return E(),W("eof")}if(Y.isSpaceSeparator(H)){E();return}return Dr[ou]()},comment(){switch(H){case"*":E(),N="multiLineComment";return;case"/":E(),N="singleLineComment";return}throw V(E())},multiLineComment(){switch(H){case"*":E(),N="multiLineCommentAsterisk";return;case void 0:throw V(E())}E()},multiLineCommentAsterisk(){switch(H){case"*":E();return;case"/":E(),N="default";return;case void 0:throw V(E())}E(),N="multiLineComment"},singleLineComment(){switch(H){case`
25
- `:case"\r":case"\u2028":case"\u2029":E(),N="default";return;case void 0:return E(),W("eof")}E()},value(){switch(H){case"{":case"[":return W("punctuator",E());case"n":return E(),_u("ull"),W("null",null);case"t":return E(),_u("rue"),W("boolean",!0);case"f":return E(),_u("alse"),W("boolean",!1);case"-":case"+":E()==="-"&&(du=-1),N="sign";return;case".":k=E(),N="decimalPointLeading";return;case"0":k=E(),N="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),N="decimalInteger";return;case"I":return E(),_u("nfinity"),W("numeric",1/0);case"N":return E(),_u("aN"),W("numeric",NaN);case'"':case"'":de=E()==='"',k="",N="string";return}throw V(E())},identifierNameStartEscape(){if(H!=="u")throw V(E());E();const u=Ye();switch(u){case"$":case"_":break;default:if(!Y.isIdStartChar(u))throw It();break}k+=u,N="identifierName"},identifierName(){switch(H){case"$":case"_":case"‌":case"‍":k+=E();return;case"\\":E(),N="identifierNameEscape";return}if(Y.isIdContinueChar(H)){k+=E();return}return W("identifier",k)},identifierNameEscape(){if(H!=="u")throw V(E());E();const u=Ye();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!Y.isIdContinueChar(u))throw It();break}k+=u,N="identifierName"},sign(){switch(H){case".":k=E(),N="decimalPointLeading";return;case"0":k=E(),N="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),N="decimalInteger";return;case"I":return E(),_u("nfinity"),W("numeric",du*(1/0));case"N":return E(),_u("aN"),W("numeric",NaN)}throw V(E())},zero(){switch(H){case".":k+=E(),N="decimalPoint";return;case"e":case"E":k+=E(),N="decimalExponent";return;case"x":case"X":k+=E(),N="hexadecimal";return}return W("numeric",du*0)},decimalInteger(){switch(H){case".":k+=E(),N="decimalPoint";return;case"e":case"E":k+=E(),N="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalPointLeading(){if(Y.isDigit(H)){k+=E(),N="decimalFraction";return}throw V(E())},decimalPoint(){switch(H){case"e":case"E":k+=E(),N="decimalExponent";return}if(Y.isDigit(H)){k+=E(),N="decimalFraction";return}return W("numeric",du*Number(k))},decimalFraction(){switch(H){case"e":case"E":k+=E(),N="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalExponent(){switch(H){case"+":case"-":k+=E(),N="decimalExponentSign";return}if(Y.isDigit(H)){k+=E(),N="decimalExponentInteger";return}throw V(E())},decimalExponentSign(){if(Y.isDigit(H)){k+=E(),N="decimalExponentInteger";return}throw V(E())},decimalExponentInteger(){if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},hexadecimal(){if(Y.isHexDigit(H)){k+=E(),N="hexadecimalInteger";return}throw V(E())},hexadecimalInteger(){if(Y.isHexDigit(H)){k+=E();return}return W("numeric",du*Number(k))},string(){switch(H){case"\\":E(),k+=Pi();return;case'"':if(de)return E(),W("string",k);k+=E();return;case"'":if(!de)return E(),W("string",k);k+=E();return;case`
26
- `:case"\r":throw V(E());case"\u2028":case"\u2029":Mi(H);break;case void 0:throw V(E())}k+=E()},start(){switch(H){case"{":case"[":return W("punctuator",E())}N="value"},beforePropertyName(){switch(H){case"$":case"_":k=E(),N="identifierName";return;case"\\":E(),N="identifierNameStartEscape";return;case"}":return W("punctuator",E());case'"':case"'":de=E()==='"',N="string";return}if(Y.isIdStartChar(H)){k+=E(),N="identifierName";return}throw V(E())},afterPropertyName(){if(H===":")return W("punctuator",E());throw V(E())},beforePropertyValue(){N="value"},afterPropertyValue(){switch(H){case",":case"}":return W("punctuator",E())}throw V(E())},beforeArrayValue(){if(H==="]")return W("punctuator",E());N="value"},afterArrayValue(){switch(H){case",":case"]":return W("punctuator",E())}throw V(E())},end(){throw V(E())}};function W(u,e){return{type:u,value:e,line:Su,column:fu}}function _u(u){for(const e of u){if(Bu()!==e)throw V(E());E()}}function Pi(){switch(Bu()){case"b":return E(),"\b";case"f":return E(),"\f";case"n":return E(),`
27
- `;case"r":return E(),"\r";case"t":return E()," ";case"v":return E(),"\v";case"0":if(E(),Y.isDigit(Bu()))throw V(E());return"\0";case"x":return E(),Hi();case"u":return E(),Ye();case`
28
- `:case"\u2028":case"\u2029":return E(),"";case"\r":return E(),Bu()===`
29
- `&&E(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw V(E());case void 0:throw V(E())}return E()}function Hi(){let u="",e=Bu();if(!Y.isHexDigit(e)||(u+=E(),e=Bu(),!Y.isHexDigit(e)))throw V(E());return u+=E(),String.fromCodePoint(parseInt(u,16))}function Ye(){let u="",e=4;for(;e-- >0;){const t=Bu();if(!Y.isHexDigit(t))throw V(E());u+=E()}return String.fromCodePoint(parseInt(u,16))}const Ii={start(){if(eu.type==="eof")throw Tu();Xe()},beforePropertyName(){switch(eu.type){case"identifier":case"string":nt=eu.value,ou="afterPropertyName";return;case"punctuator":xe();return;case"eof":throw Tu()}},afterPropertyName(){if(eu.type==="eof")throw Tu();ou="beforePropertyValue"},beforePropertyValue(){if(eu.type==="eof")throw Tu();Xe()},beforeArrayValue(){if(eu.type==="eof")throw Tu();if(eu.type==="punctuator"&&eu.value==="]"){xe();return}Xe()},afterPropertyValue(){if(eu.type==="eof")throw Tu();switch(eu.value){case",":ou="beforePropertyName";return;case"}":xe()}},afterArrayValue(){if(eu.type==="eof")throw Tu();switch(eu.value){case",":ou="beforeArrayValue";return;case"]":xe()}},end(){}};function Xe(){let u;switch(eu.type){case"punctuator":switch(eu.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=eu.value;break}if(me===void 0)me=u;else{const e=mu[mu.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,nt,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")mu.push(u),Array.isArray(u)?ou="beforeArrayValue":ou="beforePropertyName";else{const e=mu[mu.length-1];e==null?ou="end":Array.isArray(e)?ou="afterArrayValue":ou="afterPropertyValue"}}function xe(){mu.pop();const u=mu[mu.length-1];u==null?ou="end":Array.isArray(u)?ou="afterArrayValue":ou="afterPropertyValue"}function V(u){return ot(u===void 0?`JSON5: invalid end of input at ${Su}:${fu}`:`JSON5: invalid character '${pr(u)}' at ${Su}:${fu}`)}function Tu(){return ot(`JSON5: invalid end of input at ${Su}:${fu}`)}function It(){return fu-=5,ot(`JSON5: invalid identifier character at ${Su}:${fu}`)}function Mi(u){console.warn(`JSON5: '${pr(u)}' in strings is not valid ECMAScript; consider escaping`)}function pr(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const t=u.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return u}function ot(u){const e=new SyntaxError(u);return e.lineNumber=Su,e.columnNumber=fu,e}var ji=function(u,e,t){const s=[];let n="",r,o,i="",l;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(t=e.space,l=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){r=[];for(const f of e){let $;typeof f=="string"?$=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&($=String(f)),$!==void 0&&r.indexOf($)<0&&r.push($)}}return t instanceof Number?t=Number(t):t instanceof String&&(t=String(t)),typeof t=="number"?t>0&&(t=Math.min(10,Math.floor(t)),i=" ".substr(0,t)):typeof t=="string"&&(i=t.substr(0,10)),d("",{"":u});function d(f,$){let F=$[f];switch(F!=null&&(typeof F.toJSON5=="function"?F=F.toJSON5(f):typeof F.toJSON=="function"&&(F=F.toJSON(f))),o&&(F=o.call($,f,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof F=="string")return p(F);if(typeof F=="number")return String(F);if(typeof F=="object")return Array.isArray(F)?C(F):m(F)}function p(f){const $={"'":.1,'"':.2},F={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let w="";for(let h=0;h<f.length;h++){const g=f[h];switch(g){case"'":case'"':$[g]++,w+=g;continue;case"\0":if(Y.isDigit(f[h+1])){w+="\\x00";continue}}if(F[g]){w+=F[g];continue}if(g<" "){let a=g.charCodeAt(0).toString(16);w+="\\x"+("00"+a).substring(a.length);continue}w+=g}const _=l||Object.keys($).reduce((h,g)=>$[h]<$[g]?h:g);return w=w.replace(new RegExp(_,"g"),F[_]),_+w+_}function m(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let $=n;n=n+i;let F=r||Object.keys(f),w=[];for(const h of F){const g=d(h,f);if(g!==void 0){let a=b(h)+":";i!==""&&(a+=" "),a+=g,w.push(a)}}let _;if(w.length===0)_="{}";else{let h;if(i==="")h=w.join(","),_="{"+h+"}";else{let g=`,
30
- `+n;h=w.join(g),_=`{
31
- `+n+h+`,
32
- `+$+"}"}}return s.pop(),n=$,_}function b(f){if(f.length===0)return p(f);const $=String.fromCodePoint(f.codePointAt(0));if(!Y.isIdStartChar($))return p(f);for(let F=$.length;F<f.length;F++)if(!Y.isIdContinueChar(String.fromCodePoint(f.codePointAt(F))))return p(f);return f}function C(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let $=n;n=n+i;let F=[];for(let _=0;_<f.length;_++){const h=d(String(_),f);F.push(h!==void 0?h:"null")}let w;if(F.length===0)w="[]";else if(i==="")w="["+F.join(",")+"]";else{let _=`,
33
- `+n,h=F.join(_);w=`[
34
- `+n+h+`,
35
- `+$+"]"}return s.pop(),n=$,w}};const Gi={parse:Oi,stringify:ji};var Ca=Gi;export{Nu as A,Lu as B,ea as F,et as H,hs as I,Gt as J,yu as L,Aa as O,Ai as T,la as U,sa as W,Zi as a,na as b,aa as c,Ji as d,Eo as e,Qe as f,Se as g,Vi as h,Ca as i,Sr as j,Wi as k,ha as l,wr as m,fa as n,qi as o,Da as s,Ea as u,So as v,Xi as w,Ki as y,ca as z};
@@ -1 +0,0 @@
1
- import{createRequire as r}from"node:module";const i=r(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{env:s}=t,o=e=>e in s&&s[e]!=="0"&&s[e]!=="false",_=o("CI")||o("CONTINUOUS_INTEGRATION");export{_ as I};
@@ -1,28 +0,0 @@
1
- import{createRequire as Dt}from"node:module";import{t as fe,g as Tt,p as G,b as jt,i as Ae,a as Rt,h as Bt,c as Wt,u as Se}from"./package-version-TsxLc6w2.js";const Ut=Dt(import.meta.url),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vt=t=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[e,n]=ne.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ne.getBuiltinModule(t)}return Ut(t)},{createRequire:Ce}=Vt("node:module"),zt=16,ge=32,Ft=64,j=128,he="positionals",qt=Ce(import.meta.url),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Gt=t=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,n]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ie.getBuiltinModule(t)}return qt(t)},{createRequire:at}=Gt("node:module"),Ht=globalThis.process??Object.create(null),Me={versions:{}},ke=new Proxy(Ht,{get(t,e){if(e in t)return t[e];if(e in Me)return Me[e]}}),Jt=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
- `),Kt=(t,e,n,i)=>{const s={column:0,line:-1,...t.start},o={...s,...t.end},c=s.line,a=s.column,u=o.line,r=o.column;let l=Math.max(c-(n+1),0),d=Math.min(e.length,u+i);c===-1&&(l=0),u===-1&&(d=e.length);const p=u-c,f={};if(p)for(let h=0;h<=p;h++){const g=h+c;if(!a)f[g]=!0;else if(h===0){const $=e[g-1]?.length;f[g]=[a,($??0)-a+1]}else if(h===p)f[g]=[0,r];else{const $=e[g-h]?.length;f[g]=[0,$]}}else a===r?f[c]=a?[a,0]:!0:f[c]=[a,(r??0)-(a??0)];return{end:d,markerLines:f,start:l}},Yt=ke.platform==="win32"&&!ke.env?.WT_SESSION?">":"❯",Xt=(t,e,n)=>{const i={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:h=>h,marker:h=>h,message:h=>h,...n?.color}},s=typeof e.start.column=="number";let o=(t.includes("\r")?Jt(t):t).split(`
3
- `);typeof i.tabWidth=="number"&&t.includes(" ")&&(o=o.map(h=>h.replaceAll(" "," ".repeat(i.tabWidth))));const{end:c,markerLines:a,start:u}=Kt(e,o,i.linesAbove,i.linesBelow),r=String(c).length,{gutter:l,marker:d,message:p}=i.color;let f=o.slice(u,c).map((h,g)=>{const $=u+1+g,w=a[$],y=String($).padStart(r),x=!a[$+1],N=` ${y}${i.showGutter?" |":""}`;if(w){let E="";if(Array.isArray(w)){const I=h.replaceAll(/[^\t]/g," ").slice(0,Math.max(w[0]-1,0)),O=w[1]||1;E=[`
4
- `,i.prefix+l(N.replaceAll(/\d/g," "))," ",I,d("^").repeat(O)].join(""),x&&i.message&&(E+=` ${p(i.message)}`)}return[i.prefix+d(Yt),l(N),h.length>0?` ${h}`:"",E].join("")}return`${i.prefix} ${l(N)}${h.length>0?` ${h}`:""}`}).join(`
5
- `);return i.message&&!s&&(f=`${i.prefix+" ".repeat(r+1)+i.message}
6
- ${f}`),f},Qt=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Qt.set("AggregateError",AggregateError);const Zt=at(import.meta.url),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,en=t=>{if(typeof oe<"u"&&oe.versions&&oe.versions.node){const[e,n]=oe.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return oe.getBuiltinModule(t)}return Zt(t)};en("node:util");const tn=()=>ke.env?.DEBUG==="true",J=(t,...e)=>{if(tn()){const n=e.map(i=>typeof i=="function"?i():i);console.debug(`error:parse-stacktrace: ${t}`,...n)}},K="<unknown>",nn=/^(?:node:internal\/|node:|internal\/)/,on=t=>t!==void 0&&nn.test(t),sn=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rn=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,an=/(.*?):(\d+):(\d+)(?:\s<-\s.+:\d+:\d+)?/,ln=/eval\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*<anonymous>?:(\d+)?:(\d+)/,cn=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,un=/in\s(.*)\s\(at\s(.+)\)\sat/,pn=/^(?:.*@)?(.*):(\d+):(\d+)$/,hn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,dn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,fn=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,Pe=/\(error: ([^)]*)\)/,mn=/at\s/,gn=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/,wn=/Error: |AggregateError:/,lt=/^Anonymous function$/,yn=/^\s*in\s.*/,vn=/^.*?\s*at\s.*/,$n=/^.*?\s*@.*|\[native code\]/,ct=(t,e)=>{const n=t.includes("safari-extension"),i=t.includes("safari-web-extension");return n||i?[t.includes("@")?t.split("@")[0]:K,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},ut=(t,e)=>{const n=an.exec(e);n&&(t.file=n[1],t.line=+n[2],t.column=+n[3])},xn=t=>{const e=un.exec(t);if(e){J(`parse nested node error stack line: "${t}"`,()=>`found: ${JSON.stringify(e)}`);const i=e[2].split(":");return{column:i[2]?+i[2]:void 0,file:i[0],line:i[1]?+i[1]:void 0,methodName:e[1]??K,raw:t,type:void 0}}const n=cn.exec(t);if(n){J(`parse node error stack line: "${t}"`,()=>`found: ${JSON.stringify(n)}`);const i={column:n[4]?+n[4]:void 0,file:n[2]?n[2].replace(mn,""):void 0,line:n[3]?+n[3]:void 0,methodName:n[1]??K,raw:t,type:t.startsWith("internal")?"internal":void 0};return ut(i,`${n[2]}:${n[3]}:${n[4]}`),i}},bn=t=>{const e=sn.exec(t);if(e){J(`parse chrome error stack line: "${t}"`,()=>`found: ${JSON.stringify(e)}`);const n=e[2]?.startsWith("native"),i=e[2]?.startsWith("eval")||e[1]?.startsWith("eval");let s,o;if(i){const r=rn.exec(t);if(r){const l=gn.exec(r[1]);l?(e[2]=l[4]??l[1],e[3]=l[5]??l[2],e[4]=l[3]):r[2]&&(e[2]=r[1]),r[2]&&(s={column:r[4]?+r[4]:void 0,file:r[2],line:r[3]?+r[3]:void 0,methodName:"eval",raw:t,type:"eval"})}else{const l=ln.exec(t);l&&(o={column:l[4]?+l[4]:void 0,file:l[2],line:l[3]?+l[3]:void 0},s={column:l[6]?+l[6]:void 0,file:l[1],line:l[5]?+l[5]:void 0,methodName:"eval",raw:l[0],type:"eval"})}}const[c,a]=ct(e[1]?e[1].replace(lt,"<anonymous>"):K,e[2]),u={column:e[4]?+e[4]:void 0,evalOrigin:s,file:a,line:e[3]?+e[3]:void 0,methodName:c,raw:t,type:i?"eval":n?"native":on(a)?"internal":void 0};return o?(u.column=o.column,u.file=o.file,u.line=o.line):ut(u,`${a}:${e[3]}:${e[4]}`),u}},Nn=(t,e)=>{const n=hn.exec(t);if(n){J(`parse gecko error stack line: "${t}"`,()=>`found: ${JSON.stringify(n)}`);const i=n[3]?.includes(" > eval"),s=i&&n[3]&&dn.exec(n[3]);let o;i&&s&&(n[3]=s[1],o={column:n[5]?+n[5]:void 0,file:n[3],line:n[4]?+n[4]:void 0,methodName:"eval",raw:t,type:"eval"},n[4]=s[2]);const[c,a]=ct(n[1]?n[1].replace(lt,"<anonymous>"):K,n[3]);let u;(e?.type==="safari"||!i&&e?.type==="firefox")&&e.column?u=e.column:!i&&n[5]&&(u=+n[5]);let r;return(e?.type==="safari"||!i&&e?.type==="firefox")&&e.line?r=e.line:n[4]&&(r=+n[4]),{column:u,evalOrigin:o,file:a,line:r,methodName:c,raw:t,type:i?"eval":a.includes("[native code]")?"native":void 0}}},An=(t,e)=>{const n=fn.exec(t);if(!(n&&n[2].includes(" > eval"))&&n)return J(`parse firefox error stack line: "${t}"`,()=>`found: ${JSON.stringify(n)}`),{column:n[4]?+n[4]:e?.column??void 0,file:n[2],line:n[3]?+n[3]:e?.line??void 0,methodName:n[1]||K,raw:t,type:void 0}},kn=t=>{const e=pn.exec(t);if(e)return J(`parse react android native error stack line: "${t}"`,()=>`found: ${JSON.stringify(e)}`),{column:e[3]?+e[3]:void 0,file:e[1],line:e[2]?+e[2]:void 0,methodName:K,raw:t,type:void 0}},pt=(t,{filter:e,frameLimit:n=50}={})=>{const i=t;let s=(typeof i.stacktrace=="string"?i.stacktrace:t.stack??"").split(`
7
- `).map(o=>(Pe.test(o)?o.replace(Pe,"$1"):o).trim()).filter(o=>!wn.test(o)&&o!=="eval code");return e&&(s=s.filter(o=>e(o))),s=s.slice(0,n),s.reduce((o,c,a)=>{if(!c||c.length>1024)return o;let u;if(yn.test(c))u=xn(c);else if(vn.test(c))u=bn(c);else if($n.test(c)){let r;if(a===0){const l=t,d=l.columnNumber,p=l.lineNumber,f=l.line,h=l.column;d||p?r={column:d,line:p,type:"firefox"}:(f||h)&&(r={column:h,line:f,type:"safari"})}u=An(c,r)??Nn(c,r)}else u=kn(c);return u?o.push(u):J(`parse error stack line: "${c}"`,"not parser found"),o},[])},En=at(import.meta.url),Z=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oe=t=>{if(typeof Z<"u"&&Z.versions&&Z.versions.node){const[e,n]=Z.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return Z.getBuiltinModule(t)}return En(t)},{existsSync:Cn,readFileSync:On}=Oe("node:fs"),{relative:_n,resolve:De,sep:In}=Oe("node:path"),{cwd:Ln}=Z,{fileURLToPath:Sn}=Oe("node:url"),Y=(t,e,n)=>n===0?t:e===" "?t+" ".repeat(n):t+" ".repeat(e*n),ht=t=>t.replaceAll("\\","/"),Mn=(t,e)=>{const n=t.replace("async file:","file:");return ht(_n(e,n.startsWith("file:")?Sn(n):n))},Pn=(t,e,n)=>{if(e)return n.title(t.message);const i=t.message?`: ${t.message}`:"";return n.title(t.name+i)},dt=(t,{color:e,hideErrorTitle:n,indentation:i,prefix:s},o)=>`${Y(s,i,o)}${Pn(t,n,e)}
8
- `,ft=(t,{color:e,indentation:n,prefix:i},s)=>{if(t.hint===void 0)return;const o=Y(i,n,s);let c="";if(Array.isArray(t.hint))for(const a of t.hint)c+=`${o+a}
9
- `;else c+=o+t.hint;return e.hint(c)},mt=(t,e)=>{if(!e||t.file===void 0||t.line===void 0)return{trace:t};try{const n=e({column:t.column,file:t.file,line:t.line});return n?{source:n.source,trace:{...t,column:n.column??t.column,file:n.file??t.file,line:n.line??t.line}}:{trace:t}}catch{return{trace:t}}},_e=(t,e,n=0)=>{const{color:i,cwd:s,displayShortPath:o,indentation:c,prefix:a}=e,{trace:u}=mt(t,e.sourceMap),r=o?Mn(u.file,s):ht(u.file),{fileLine:l,method:d}=i;return`${Y(a,c,n)}at ${u.methodName?`${d(u.methodName)} `:""}${l(r)}:${l(u.line?.toString()??"")}`},Dn=(t,e)=>{if(e.allowAllFilePaths)return!0;const n=De(e.cwd),i=De(n,t);return i===n||i.startsWith(n+In)},gt=(t,e,n)=>{const{color:i,indentation:s,linesAbove:o,linesBelow:c,prefix:a,showGutter:u,showLineNumbers:r,tabWidth:l}=e,{source:d,trace:p}=mt(t,e.sourceMap);if(p.file===void 0)return;let f;if(d===void 0){const h=p.file.replace("file://","");if(!Dn(h,e)||!Cn(h))return;f=On(h,"utf8")}else f=d;return Xt(f,{start:{column:p.column,line:p.line}},{color:i,linesAbove:o,linesBelow:c,prefix:Y(a,s,n),showGutter:u,showLineNumbers:r,tabWidth:l})},wt=(t,e,n)=>{if(t.errors.length===0)return;let i=`${Y(e.prefix,e.indentation,n)}Errors:
10
-
11
- `,s=!0;for(const o of t.errors)s?s=!1:i+=`
12
-
13
- `,i+=vt(o,{...e,framesMaxLimit:1,hideErrorCodeView:e.hideErrorErrorsCodeView},n+1);return`
14
- ${i}`},yt=(t,e,n,i=new Set)=>{i.add(t);let s=`${Y(e.prefix,e.indentation,n)}Caused by:
15
-
16
- `;const o=t.cause;s+=dt(o,e,n);const c=pt(o).shift(),a=ft(o,e,n);if(a&&(s+=`${a}
17
- `),c&&(s+=_e(c,e,n),!e.hideErrorCauseCodeView)){const u=gt(c,e,n);u!==void 0&&(s+=`
18
- ${u}`)}if(o instanceof AggregateError){const u=wt(o,e,n);u!==void 0&&(s+=`
19
- ${u}`)}return o.cause&&(s+=i.has(o)?`
20
- ${Y(e.prefix,e.indentation,n+1)}Caused by: [Circular]`:`
21
- ${yt(o,e,n+1,i)}`),`
22
- ${s}`},Un=(t,e)=>(t.length>0?`
23
- `:"")+t.map(n=>_e(n,e)).join(`
24
- `),vt=(t,e,n)=>{const i={allowAllFilePaths:!1,cwd:Ln(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...e,color:{fileLine:c=>c,gutter:c=>c,hint:c=>c,marker:c=>c,message:c=>c,method:c=>c,title:c=>c,...e.color}},s=pt(t,{filter:e.filterStacktrace,frameLimit:i.framesMaxLimit}),o=s.shift();return[e.hideMessage?void 0:dt(t,i,n),ft(t,i,n),o?_e(o,i,n):void 0,o&&!i.hideErrorCodeView?gt(o,i,n):void 0,t instanceof AggregateError?wt(t,i,n):void 0,t.cause===void 0?void 0:yt(t,i,n),s.length>0?Un(s,i):void 0].filter(Boolean).join(`
25
- `)},Vn=(t,e={})=>{if(e.framesMaxLimit!==void 0&&e.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return vt(t,e,0)};class te extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:i,message:s,name:o,stack:c,title:a}){super(s,{cause:e}),this.title=a,this.name=o,this.stack=c??this.stack,this.loc=i,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}}class k extends te{code;context;constructor(e,n,i){super({message:e,name:"CerebroError"}),this.code=n,this.context=i}}const R=new Uint32Array(65536),Tn=(t,e)=>{const n=t.length,i=e.length,s=1<<n-1;let o=-1,c=0,a=n,u=n;for(;u--;)R[t.charCodeAt(u)]|=1<<u;for(u=0;u<i;u++){let r=R[e.charCodeAt(u)];const l=r|c;r|=(r&o)+o^o,c|=~(r|o),o&=r,c&s&&a++,o&s&&a--,c=c<<1|1,o=o<<1|~(l|c),c&=l}for(u=n;u--;)R[t.charCodeAt(u)]=0;return a},jn=(t,e)=>{const n=e.length,i=t.length,s=[],o=[],c=Math.ceil(n/32),a=Math.ceil(i/32);for(let h=0;h<c;h++)o[h]=-1,s[h]=0;let u=0;for(;u<a-1;u++){let h=0,g=-1;const $=u*32,w=Math.min(32,i)+$;for(let y=$;y<w;y++)R[t.charCodeAt(y)]|=1<<y;for(let y=0;y<n;y++){const x=R[e.charCodeAt(y)],N=o[y/32|0]>>>y&1,E=s[y/32|0]>>>y&1,I=x|h,O=((x|E)&g)+g^g|x|E;let m=h|~(O|g),v=g&O;m>>>31^N&&(o[y/32|0]^=1<<y),v>>>31^E&&(s[y/32|0]^=1<<y),m=m<<1|N,v=v<<1|E,g=v|~(I|m),h=m&I}for(let y=$;y<w;y++)R[t.charCodeAt(y)]=0}let r=0,l=-1;const d=u*32,p=Math.min(32,i-d)+d;for(let h=d;h<p;h++)R[t.charCodeAt(h)]|=1<<h;let f=i;for(let h=0;h<n;h++){const g=R[e.charCodeAt(h)],$=o[h/32|0]>>>h&1,w=s[h/32|0]>>>h&1,y=g|r,x=((g|w)&l)+l^l|g|w;let N=r|~(x|l),E=l&x;f+=N>>>i-1&1,f-=E>>>i-1&1,N>>>31^$&&(o[h/32|0]^=1<<h),E>>>31^w&&(s[h/32|0]^=1<<h),N=N<<1|$,E=E<<1|w,l=E|~(y|N),r=N&y}for(let h=d;h<p;h++)R[t.charCodeAt(h)]=0;return f},Rn=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return e.length===0?t.length:t.length<=32?Tn(t,e):jn(t,e)},Bn=Ce(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wn=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,n]=se.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return se.getBuiltinModule(t)}return Bn(t)},{createRequire:zn}=Wn("node:module"),$t=String.raw,Ue=$t`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Fn=()=>new RegExp($t`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Ue}(?:\u200D${Ue})*`,"gu");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const os=/^[ \t]*(?:\r\n|\r|\n)/,ss=/(?:\r\n|\r|\n)[ \t]*$/,rs=/^(?:[\r\n]|$)/,as=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,ls=/^[ \t]*[\r\n][ \t\r\n]*$/,cs=/\r\n|\n|\r/g,us=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,ps=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,z=Fn(),qn=/[-_./\s]+/g,de=/(\u001B\[[0-9;]*[a-z])/i,Ve=new RegExp("\\p{Script=Arabic}","u"),Gn=new RegExp("\\p{Script=Bengali}","u"),X=new RegExp("\\p{Script=Cyrillic}","u"),Hn=new RegExp("\\p{Script=Devanagari}","u"),Jn=new RegExp("\\p{Script=Ethiopic}","u"),we=new RegExp("\\p{Script=Greek}","u"),Te=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),Kn=new RegExp("\\p{Script=Gujarati}","u"),Yn=new RegExp("\\p{Script=Gurmukhi}","u"),je=new RegExp("\\p{Script=Hangul}","u"),Re=new RegExp("\\p{Script=Hebrew}","u"),Xn=new RegExp("\\p{Script=Hiragana}","u"),Be=new RegExp("\\p{Script=Han}","u"),Qn=new RegExp("\\p{Script=Kannada}","u"),Zn=new RegExp("\\p{Script=Katakana}","u"),ei=new RegExp("\\p{Script=Khmer}","u"),ti=new RegExp("\\p{Script=Lao}","u"),P=new RegExp("\\p{Script=Latin}","u"),ni=new RegExp("\\p{Script=Malayalam}","u"),ii=new RegExp("\\p{Script=Myanmar}","u"),oi=new RegExp("\\p{Script=Oriya}","u"),si=new RegExp("\\p{Script=Sinhala}","u"),ri=new RegExp("\\p{Script=Tamil}","u"),ai=new RegExp("\\p{Script=Telugu}","u"),li=new RegExp("\\p{Script=Thai}","u"),ci=new RegExp("\\p{Script=Tibetan}","u"),We=/[\u02BB\u02BC\u0027]/u,ui=t=>t.replace(z,"");let pi=class{capacity;cache;constructor(e){this.capacity=e,this.cache=new Map}get(e){if(!this.cache.has(e))return;const n=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,n),n}has(e){return this.cache.has(e)}set(e,n){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.capacity){const i=this.cache.keys().next().value;i!==void 0&&this.cache.delete(i)}this.cache.set(e,n)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}size(){return this.cache.size}};const hi=zn(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,n]=re.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return re.getBuiltinModule(t)}return hi(t)},{stripVTControlCharacters:fi}=di("node:util"),ye=new pi(1e3),mi=/[.*+?^${}()|[\]\\]/g,gi=t=>{const e=t.join("");if(ye.has(e)){const s=ye.get(e);return s.lastIndex=0,s}const n=t.map(s=>s.replaceAll(mi,String.raw`\$&`)).join("|"),i=new RegExp(n,"g");return ye.set(e,i),i},wi=t=>{const e=[];let n=0,i;for(z.lastIndex=0;(i=z.exec(t))!==null;)i.index>n&&e.push(t.slice(n,i.index)),e.push(i[0]),n=z.lastIndex;return n<t.length&&e.push(t.slice(n)),e.filter(Boolean)},yi=/[ČŠŽĐ]/i,xt=new Uint8Array(128),bt=new Uint8Array(128),Nt=new Uint8Array(128);for(let t=0;t<128;t++)xt[t]=t>=65&&t<=90?1:0,bt[t]=t>=97&&t<=122?1:0,Nt[t]=t>=48&&t<=57?1:0;const ve=t=>xt[t],ze=t=>bt[t],$e=t=>Nt[t],B=(t,e,n,i,s)=>{if(t.length===0)return[];let o=!1;const c=Object.values(e);for(const f of c)if(f(t[0])){o=!0;break}if(!o&&!n)return[t];const a=[...t],u=[];let r=a[0],l="other";const d=Object.entries(e);for(const f of d){const[h,g]=f;if(g(a[0])){l=h;break}}let p=n&&i?a[0]===a[0].toLocaleUpperCase(i):!1;for(let f=1;f<a.length;f++){const h=a[f];let g="other";for(const y of d){const[x,N]=y;if(N(h)){g=x;break}}const $=n&&i?h===h.toLocaleUpperCase(i):!1;let w=!1;s?w=s(l,g,p,$,h,f,a):(l!==g&&l!=="other"&&g!=="other"&&(w=!0),n&&g!=="other"&&!p&&$&&(w=!0)),w?(u.push(r),r=h):r+=h,l=g,n&&(p=$)}return r&&r.length>0&&u.push(r),u.length>0?u:[t]},vi=(t,e,n,i)=>{if(n.size===0)return e;for(const s of n)if(t.startsWith(s,e))return i.push(s),e+s.length;return e},At=(t,e=new Set)=>{if(t.length===0)return[];if(t.toUpperCase()===t)return[t];let n=0;const i=[],s=t.length;for(let o=1;o<s;o++){const c=vi(t,n,e,i);if(c!==n){n=c,o=n-1;continue}const a=t.codePointAt(o-1),u=t.codePointAt(o),r=a&&a<128&&ve(a),l=u&&u<128&&ve(u),d=a&&a<128&&ze(a),p=a&&a<128&&$e(a),f=u&&u<128&&$e(u);if(d&&l){i.push(t.slice(n,o)),n=o;continue}if(p&&!f||!p&&f){i.push(t.slice(n,o)),n=o;continue}if(f&&!p){let h=!1,g=!1;if(o+1<s){const $=t.codePointAt(o+1);h=$&&$<128&&ve($),g=$&&$<128&&$e($)}if(!g&&h){i.push(t.slice(n,o),t.slice(o,o+1)),n=o+1;continue}}if(o+1<s){const h=t.codePointAt(o+1),g=h&&h<128&&ze(h);if(r&&l&&g){const $=t.slice(n,o+1);e.has($)||(i.push(t.slice(n,o)),n=o)}}}return n<s&&i.push(t.slice(n)),i.filter(o=>o!=="")},kt=(t,e,n)=>{if(t.length===0)return[];const i=t===t.toLocaleUpperCase(e);if(e.startsWith("de")){if(!i&&t.replaceAll("ß","SS")===t.toLocaleUpperCase(e))return[t];const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e),h=f,g=f?0:-1;for(let $=1;$<l;$++){const w=r[$],y=w===w.toLocaleUpperCase(e);if(y===f)p+=w;else if(y)p&&p.length>0&&(d.push(p),p=w),h=!0,g=$;else{if(h&&$-g>1){const x=r[$-1],N=p.slice(0,-1);N&&N.length>0&&d.push(N),p=x+w}else p+=w;h=!1,g=-1}f=y}return p&&p.length>0&&d.push(p),d}if(e.startsWith("uk")||e.startsWith("ru")||e.startsWith("bg")||e.startsWith("sr")||e.startsWith("mk")||e.startsWith("be")){if(!X.test(t)&&!P.test(t))return[t];const r=[...t],l=r.length,d=[];let p=r[0];const f=r[0];let h;X.test(f)?h=1:P.test(f)?h=2:h=0;let g=f===f.toLocaleUpperCase(e);for(let w=1;w<l;w++){const y=r[w];let x;X.test(y)?x=1:P.test(y)?x=2:x=0;const N=y===y.toLocaleUpperCase(e);h!==x&&(h===1||h===2)&&(x===1||x===2)||x===h&&!g&&N?(d.push(p),p=y):p+=y,h=x,g=N}p&&p.length>0&&d.push(p);const $=[];for(let w=0;w<d.length;w++)w<d.length-1&&d[w].length===1&&P.test(d[w])&&X.test(d[w+1][0])?($.push(d[w]+d[w+1]),w+=1):$.push(d[w]);return $}if(e.startsWith("el")){if(!we.test(t)&&!P.test(t))return[t];const r=[];Te.lastIndex=0;let l;for(;(l=Te.exec(t))!==null;)r.push(l[0]);r.length===0&&r.push(t);const d=[];if(r.length===1){const p=r[0];if(!p||!we.test(p[0])||p.length===1)return[p??t]}for(const p of r){if(!p)continue;if(!we.test(p[0])||p.length===1){d.push(p);continue}const f=p.length;let h=p[0],g=p[0]===p[0].toLocaleUpperCase(e);for(let $=1;$<f;$++){const w=p[$],y=w===w.toLocaleUpperCase(e);!g&&y?(d.push(h),h=w):h+=w,g=y}h&&d.push(h)}return d}if(e.startsWith("ja")||e.startsWith("ko")){const r=e.startsWith("ja"),l=r?{hiragana:p=>Xn.test(p),kanji:p=>Be.test(p),katakana:p=>Zn.test(p),latin:p=>P.test(p)}:{hangul:p=>je.test(p),latin:p=>P.test(p)},d=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(r){const p=B(t,l,!1,e,(h,g)=>h==="hiragana"&&g==="katakana"||h==="katakana"&&g==="hiragana"||h==="hiragana"&&g==="latin"||h==="katakana"&&g==="latin"||h==="kanji"&&g==="latin"||h==="latin"&&(g==="hiragana"||g==="katakana"||g==="kanji")),f=[];for(const h of p){const g=h;g.length===1&&d.has(g)&&f.length>0?f[f.length-1]=f.at(-1)+g:f.push(g)}return f.length>0?f:[t]}return B(t,l,!1,e,(p,f)=>p==="hangul"&&f==="latin"||p==="latin"&&f==="hangul")}if(e.startsWith("sl")){const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(let h=1;h<l;h++){const g=r[h],$=g===g.toLocaleUpperCase(e),w=yi.test(g),y=h<l-1&&r[h+1]===r[h+1].toLocaleUpperCase(e);!f&&$||w&&y?(d.push(p),p=g,w&&y&&(d.push(p),p="")):p+=g,f=$}return p&&p.length>0&&d.push(p),d}if(e.startsWith("zh"))return B(t,{han:r=>Be.test(r),latin:r=>P.test(r)},!1,e);if(["ar","fa","he","ur"].includes(e.split("-")[0])){const r=l=>Re.test(l)||Ve.test(l);return B(t,{latin:l=>P.test(l),rtl:l=>r(l)},!1,e)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(e.split("-")[0])){const r=l=>Hn.test(l)||Gn.test(l)||Kn.test(l)||Yn.test(l)||Qn.test(l)||ri.test(l)||ai.test(l)||ni.test(l)||si.test(l)||li.test(l)||ti.test(l)||ci.test(l)||ii.test(l)||Jn.test(l)||ei.test(l)||oi.test(l);return B(t,{indic:l=>r(l),latin:l=>P.test(l)},!1,e)}if(["be","bg","ru","sr","uk"].includes(e))return B(t,{cyrillic:r=>X.test(r),latin:r=>P.test(r)},!0,e);if(["ar","fa","he"].includes(e))return B(t,{latin:r=>P.test(r),rtl:r=>Re.test(r)||Ve.test(r)},!1,e);if(e.startsWith("ko"))return B(t,{hangul:r=>je.test(r),latin:r=>P.test(r)},!1,e);if(e.startsWith("uz")){if(!X.test(t)&&!P.test(t))return[t];const r=[...t],l=r.length,d=[];let p=r[0],f=r[0]===r[0].toLocaleUpperCase(e);for(let h=1;h<l;h++){const g=r[h],$=g===g.toLocaleUpperCase(e);if(We.test(g)||We.test(r[h-1])){p+=g;continue}!f&&$?(d.push(p),p=g):p+=g,f=$}return p&&p.length>0&&d.push(p),d}const s=[...t],o=s.length,c=[];let a=s[0],u=s[0]===s[0].toLocaleUpperCase(e);for(const r of n)if(t.startsWith(r)){c.push(r),a=s[r.length],u=a===a.toLocaleUpperCase(e);break}for(let r=1;r<o;r++){const l=s[r],d=l===l.toLocaleUpperCase(e);let p=0;for(const f of n)if(t.startsWith(f,r)){c.push(a,f),p=f.length,a="";const h=f.at(-1);h&&(u=h===h.toLocaleUpperCase(e));break}if(p>0){r+=p-1;continue}!u&&d?(c.push(a),a=l):a+=l,u=d}return a&&c.push(a),c},$i=(t,e,n)=>{const i=[],s=de.test(t)?t.split(de).filter(Boolean):[t];for(const o of s){const c=o;if(de.test(c))i.push(c);else{z.lastIndex=0;const a=z.test(c)?wi(c).filter(Boolean):[c];for(const u of a)if(z.lastIndex=0,z.test(u))i.push(u);else if(e){const r=e.toLowerCase().split("-")[0];i.push(...kt(u,r,n))}else i.push(...At(u,n))}}return i},xi=(t,e={})=>{if(!t||typeof t!="string")return[];const{handleAnsi:n=!1,handleEmoji:i=!1,knownAcronyms:s=[],locale:o,normalize:c=!1,separators:a,stripAnsi:u=!1,stripEmoji:r=!1}=e,l=new Set([...s].toSorted((w,y)=>y.length-w.length));let d=t;u&&(d=fi(d)),r&&(d=ui(d));let p;Array.isArray(a)?p=gi(a):a instanceof RegExp?p=a:p=qn;const f=[];let h=d;const g=p.flags.includes("g")?p:new RegExp(p.source,`${p.flags}g`);for(;h.length>0;){const w=g.exec(h);if(!w){h===".."?f.push(".."):h==="."?f.push("."):h.length>0&&f.push(h);break}const y=w.index,x=w[0],N=x.length,E=h.slice(0,y),I=h.slice(y+N);if(x.startsWith("../"))f.push(".."),h=h.slice(y+3);else if(x.startsWith("./"))f.push("."),h=h.slice(y+2);else if(y===0&&x==="..")f.push(".."),h=h.slice(2);else if(y===0&&x===".")f.push("."),h=h.slice(1);else{E.length>0&&f.push(E);let O=0;for(;(O=x.indexOf("../",O))!==-1;)f.push(".."),O+=3;for(O=0;(O=x.indexOf("./",O))!==-1;)(O===0||x[O-1]!==".")&&f.push("."),O+=2;let m=I;for(;m.startsWith("../");)f.push(".."),m=m.slice(3);for(;m.startsWith("./");)f.push("."),m=m.slice(2);if(m===".."){f.push("..");break}else if(m==="."){f.push(".");break}else h=m}g.lastIndex=0}if(f.length===0){const w=d.split(p).filter(Boolean);f.push(...w)}let $=[];for(const w of f)n||i?$.push(...$i(w,o,l)):o?$.push(...kt(w,o,l)):$.push(...At(w,l));return c&&($=$.map(w=>l.has(w)?w:o&&w===w.toLocaleUpperCase(o)?w[0]+w.slice(1).toLocaleLowerCase(o):w.toUpperCase()===w&&!l.has(w)?w.slice(0,1)+w.slice(1).toLowerCase():w)),$},bi=Ce(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ni=t=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,n]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ae.getBuiltinModule(t)}return bi(t)},{writeFile:Ai,stat:ki,rm:Ei,readFile:Fe,readdir:Ci,mkdir:Oi,access:_i}=Ni("node:fs/promises"),ce=[{alias:"v",description:"Turn on verbose output",group:"global",name:"verbose",type:Boolean},{description:"Turn on debugging output",group:"global",name:"debug",type:Boolean},{alias:"h",description:"Print out helpful usage information",group:"global",name:"help",type:Boolean},{alias:"q",description:"Silence output",group:"global",name:"quiet",type:Boolean},{alias:"V",description:"Print version info",group:"global",name:"version",type:Boolean},{description:"Turn off colored output",group:"global",name:"no-color",type:Boolean},{description:"Force colored output",group:"global",name:"color",type:Boolean}];let F=class extends k{commandName;constructor(t,e=[]){const n=`Command "${t}" not found${e.length>0?`. Did you mean: ${e.join(", ")}?`:""}`;super(n,"COMMAND_NOT_FOUND",{commandName:t,suggestions:e}),this.name="CommandNotFoundError",this.commandName=t,e.length>0&&(this.hint=`Try one of these commands: ${e.join(", ")}`)}},Et=class extends k{option1;option2;constructor(t,e){super(`Options "${t}" and "${e}" cannot be used together`,"CONFLICTING_OPTIONS",{option1:t,option2:e}),this.name="ConflictingOptionsError",this.option1=t,this.option2=e,this.hint=`Remove either --${t} or --${e}`}},Ii=class extends k{unknownOptions;constructor(t,e){const n=t.join(", "),i=`Found unknown ${t.length===1?"option":"options"}: ${n}`;super(i,"UNKNOWN_OPTION",{suggestions:e,unknownOptions:t}),this.name="UnknownOptionError",this.unknownOptions=t,e&&e.length>0&&(this.hint=`Did you mean: ${e.join(", ")}?`)}},Li=class extends k{pluginName;constructor(t,e,n){super(`Plugin "${t}" error: ${e}`,"PLUGIN_ERROR",{originalError:n,pluginName:t}),this.name="PluginError",this.pluginName=t,n&&(this.cause=n)}},Si=class{logger;plugins=new Map;initialized=!1;cachedDependencyOrder=void 0;constructor(t){this.logger=t}hasPlugins(){return this.plugins.size>0}register(t){if(this.initialized)throw new Error(`Cannot register plugin "${t.name}" after initialization`);if(this.plugins.has(t.name))throw new Error(`Plugin "${t.name}" is already registered`);fe().CEREBRO_OUTPUT_LEVEL===String(j)&&this.logger.debug(`registering plugin: ${t.name}`),this.plugins.set(t.name,t),this.cachedDependencyOrder=void 0}async init(t){if(this.initialized)throw new Error("PluginManager already initialized");if(this.plugins.size===0){this.logger.debug("no plugins registered, skipping initialization"),this.initialized=!0;return}this.validateDependencies();const e=this.getDependencyOrder();this.logger.debug(`initializing ${String(e.length)} plugin(s)...`);for(const n of e)if(typeof n.init=="function"){this.logger.debug(`initializing plugin: ${n.name}`);try{await n.init(t)}catch(i){const s=new Li(n.name,`Failed to initialize: ${i instanceof Error?i.message:String(i)}`,i instanceof Error?i:void 0);throw this.logger.error(s.message),s}}this.initialized=!0}async executeLifecycle(t,e,n){if(!this.initialized)throw new Error("PluginManager not initialized");if(this.plugins.size===0)return;const i=this.getDependencyOrder();for(const s of i){const o=s[t];if(typeof o=="function"){this.logger.debug(`executing ${t} hook for plugin: ${s.name}`);try{await(t==="afterCommand"?o(e,n):o(e))}catch(c){throw this.logger.error(`Error in ${t} hook for plugin "${s.name}":`,c),c}}}}async executeErrorHandlers(t,e){if(!this.initialized||this.plugins.size===0)return;const n=this.getDependencyOrder();for(const i of n)if(typeof i.onError=="function"){this.logger.debug(`executing error handler for plugin: ${i.name}`);try{await i.onError(t,e)}catch(s){this.logger.error(`Error in error handler for plugin "${i.name}":`,s)}}}getDependencyOrder(){if(this.cachedDependencyOrder!==void 0)return this.cachedDependencyOrder;const t=[],e=new Set,n=new Set,i=s=>{if(e.has(s))return;if(n.has(s))throw new Error(`Circular dependency detected involving plugin "${s}"`);const o=this.plugins.get(s);if(!o)throw new Error(`Plugin "${s}" not found`);if(n.add(s),o.dependencies)for(const c of o.dependencies)i(c);n.delete(s),e.add(s),t.push(o)};for(const s of this.plugins.keys())i(s);return this.cachedDependencyOrder=t,t}validateDependencies(){for(const t of this.plugins.values())if(t.dependencies){for(const e of t.dependencies)if(!this.plugins.has(e))throw new Error(`Plugin "${t.name}" depends on "${e}" which is not registered`)}}};const le=t=>t.type?.name==="Boolean",Mi=t=>{let e=t.type?t.type.name.toLowerCase():"string";const n=t.multiple??t.lazyMultiple?"[]":"";return e&&(e=e==="boolean"?"":`{underline ${e}${n}}`),e},qe=t=>(le(t)||(t.typeLabel=t.typeLabel??Mi(t),t.defaultOption&&(t.typeLabel=`${t.typeLabel} (D)`),t.required&&(t.typeLabel=`${t.typeLabel} (R)`)),t),Pi=new RegExp(/^-([^\d-])$/),Di=new RegExp(/^--(\S+)/),Ui=new RegExp(/^-([^\d-]{2,})$/),Vi=t=>Pi.test(t)||Di.test(t)||Ui.test(t),Ti=(t,e)=>{const n=e[0]&&Vi(e[0])||e.length===0?null:e.shift()??null;if(!t.includes(n)){const i=new Error(`Command not recognised: ${String(n)}`);throw i.command=n,i.name="INVALID_COMMAND",i}return{argv:e,command:n}};class Ie extends te{optionName;value;constructor(e,n,i){super({hint:`Pass a valid ${i} value for '${e}'.`,message:`Invalid ${i} value '${n}' for option '${e}'`,name:"INVALID_VALUE",title:"Invalid Value"}),this.optionName=e,this.value=n,Object.setPrototypeOf(this,Ie.prototype)}}let ji=class Ct extends te{optionName;constructor(e){super({cause:void 0,hint:`Remove the duplicate option '${e}' from your command line arguments.`,location:void 0,message:`Option '${e}' is already set`,name:"ALREADY_SET",stack:void 0,title:"Option Already Set"}),this.optionName=e,Object.setPrototypeOf(this,Ct.prototype)}},Ge=class Ot extends te{optionName;constructor(e){super({cause:void 0,hint:`Check your option definitions or remove the unknown option '${e}' from your command line arguments.`,location:void 0,message:`Unknown option: --${e}`,name:"UNKNOWN_OPTION",stack:void 0,title:"Unknown Option"}),this.optionName=`--${e}`,Object.setPrototypeOf(this,Ot.prototype)}},Ri=class _t extends te{value;constructor(e){super({hint:"Use a defined option or add a defaultOption to capture this value.",message:`Unknown value: ${e}`,name:"UNKNOWN_VALUE",title:"Unknown Value"}),this.value=e,Object.setPrototypeOf(this,_t.prototype)}};class S extends te{constructor(e,n){super({cause:void 0,hint:n,location:void 0,message:e,name:"INVALID_DEFINITIONS",stack:void 0,title:"Invalid Option Definition"}),Object.setPrototypeOf(this,S.prototype)}}const He=(t,e,n)=>{const i=Number(t);if(e&&Number.isNaN(i)&&String(t).trim().toLowerCase()!=="nan")throw new Ie(n??"",String(t),"Number");return i},Je=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Ke=t=>t===Number||typeof t=="function"&&t.name==="Number",Ye=t=>t===String||typeof t=="function"&&t.name==="String",Bi=(t,e,n={})=>{const{optionName:i,strictTypes:s}=n;return Array.isArray(t)?Je(e)?t.map(Boolean):Ke(e)?t.map(o=>He(o,s,i)):Ye(e)?t.map(String):t.map(o=>e(String(o))):t===null?null:Je(e)?!!t:Ke(e)?He(t,s,i):Ye(e)?typeof t=="string"?t:String(t):e(typeof t=="string"?t:String(t))},_=(t,e,n,...i)=>{t&&console.debug(`[command-line-args:${n}] ${e}`,...i)},Wi=/-([a-z])/g,zi=/^\d+$/,ue=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Fi=t=>t.codePointAt(0)===95,Xe=(t,e)=>Array.isArray(t)?[...t,...e]:[t,...e],Qe=t=>t==="__proto__"||t==="constructor"||t==="prototype",Ze=(t,e,n,i=!1)=>{t[e]===void 0?t[e]=i?[n]:n:i&&Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]},et=(t,e,n,i,s)=>{let o=e.get(t)??n.get(t);if(!o&&i){const c=t.toLowerCase();o=i.get(c)??s?.get(c)}return o},qi=(t,e,n,i)=>{const s=n.debug??!1;_(s,"resolveArgs called with options:","resolver",{partial:n.partial,stopAtFirstUnknown:n.stopAtFirstUnknown}),_(s,"Starting argument resolution","resolver"),_(s,"Tokens:","resolver",t),_(s,"Definitions:","resolver",e),_(s,"Processing tokens...","resolver");const o=new Map,c=new Map,a=n.caseInsensitive?new Map:void 0,u=n.caseInsensitive?new Map:void 0,r=n.camelCase?new Map:void 0,l=n.camelCase?new Map:void 0;for(const m of e)if(o.set(m.name,m),m.alias&&c.set(m.alias,m),n.caseInsensitive&&a&&(a.set(m.name.toLowerCase(),m),m.alias&&u&&u.set(m.alias.toLowerCase(),m)),n.camelCase&&r&&l){const v=m.name.replaceAll(Wi,(b,L)=>L.toUpperCase());r.set(m.name,v),l.set(v,m.name)}const d=Object.create(null),p=Object.create(null),f=[],h=[],g=new Set;let $=!1;const w=e.find(m=>m.defaultOption),y=e.some(m=>m.group),x=e.find(m=>m.type===Number);for(let m=0;m<t.length;m++){const v=t[m];if(v.kind==="option-terminator"){d._unknown=i.slice(v.index),$=!0;break}if(v.kind==="option"&&v.name){let b=et(v.name,o,c,a,u);!b&&v.value===void 0&&x&&zi.test(v.name)&&(b=x,v.value=v.name,v.name=x.name);let L=!1;if(!b&&n.negation&&v.value===void 0&&v.name.startsWith("no-")){const C=v.name.slice(3),D=et(C,o,c,a,u);D?.type&&ue(D.type)&&(b=D,L=!0)}const A=b?b.name:v.name,M=b?.multiple,U=b?.lazyMultiple;if(Object.hasOwn(p,A)&&p[A]!==void 0&&!M&&!U&&!n.partial)throw new ji(A);if(!b&&n.partial){const C=v.rawName??`--${v.name}${v.value!==void 0&&v.inlineValue?`=${v.value}`:""}`;f.push({index:v.index,value:C});continue}if(!b&&n.stopAtFirstUnknown){d._unknown=i.slice(v.index);break}if(!b&&!n.partial)throw new Ge(v.name);if(v.value===void 0){const C=t[m+1],D=C?.kind==="option"&&!("name"in C)&&C.value!==void 0,V=C&&b&&!(b.type&&ue(b.type))&&(C.kind==="positional"||D),Pt=b&&b.defaultOption&&!b.multiple&&!b.lazyMultiple;if(V&&(!b?.defaultOption||Pt))if(M){let T=m+1;const me=[];for(;T<t.length&&(t[T].kind==="positional"||t[T].kind==="option"&&!("name"in t[T])&&t[T].value!==void 0);)me.push(t[T].value),g.add(t[T].index),T++;p[A]=p[A]===void 0?me:Xe(p[A],me),m=T-1}else U?(Ze(p,A,C.value,!0),g.add(C.index),m++):(p[A]=C.value,g.add(C.index),m++);else b?.type&&ue(b.type)?Ze(p,A,!L,M):p[A]=M?[]:null}else{let{value:C}=v;if(b?.type&&ue(b.type))switch(C){case"":{if(n.partial){p._unknown??=[];const V=`${v.rawName??`--${v.name}`}${v.value?`=${v.value}`:""}`;p._unknown.push(V),h.push({index:v.index,value:V}),C=!0}else throw new Ge(v.name);break}case"false":{C=!1;break}case"true":{C=!0;break}default:C=!0}const D=[C];if(M){let V=m+1;for(;V<t.length&&t[V].kind==="positional";)D.push(t[V].value),g.add(t[V].index),V++;m=V-1}p[A]===void 0?p[A]=M||U?D:C:M||U?p[A]=Xe(p[A],D):p[A]=C}}else if(v.kind==="positional"&&n.stopAtFirstUnknown&&!g.has(v.index)&&!w){_(s,`Found unconsumed positional token at index ${String(v.index)}, stopping processing`,"resolver"),d._unknown=i.slice(v.index);break}}for(const[m,v]of Object.entries(p)){const b=o.get(m);b&&(b.multiple||b.lazyMultiple)&&!Array.isArray(v)&&(p[m]=[v])}const N=m=>m.kind==="option"&&!o.has(m.name??"")&&!c.has(m.name??"")&&(!n.caseInsensitive||!a?.has(m.name?.toLowerCase()??"")&&!u?.has(m.name?.toLowerCase()??""));let E=-1,I=Number.POSITIVE_INFINITY;if(n.stopAtFirstUnknown&&!$&&(E=t.findIndex(m=>N(m)),E!==-1&&(I=t[E].index)),w){const m=[],v=[];for(const b of t)b.kind==="positional"&&!g.has(b.index)&&b.index<I&&(m.push(b.value),v.push(b));if(m.length>0){const b=p[w.name],L=w.multiple??w.lazyMultiple;b===void 0?L?(v.forEach(A=>g.add(A.index)),p[w.name]=m):(g.add(v[0].index),p[w.name]=m[0]):L&&(v.forEach(A=>g.add(A.index)),p[w.name]=Array.isArray(b)?[...m,...b]:[...m,b])}}if(!n.partial){for(const m of t)if(m.kind==="positional"&&!g.has(m.index))throw new Ri(i[m.index])}if(n.partial&&!n.stopAtFirstUnknown){const m=[...f];if(p._unknown)for(const v of h)m.push({index:v.index,value:v.value});for(const v of t)v.kind==="positional"&&!g.has(v.index)&&m.push({index:v.index,value:i[v.index]});m.length>0&&(m.sort((v,b)=>v.index-b.index),d._unknown=m.map(v=>v.value))}if(n.stopAtFirstUnknown&&!$){const m=t.findIndex(b=>b.kind==="positional"&&!g.has(b.index));let v=-1;if(E!==-1&&m!==-1?v=Math.min(E,m):E!==-1?v=E:m!==-1&&(v=m),v>=0){const b=t[v].index;d._unknown=i.slice(b)}}else f.length>0&&!n.partial&&(d._unknown=f.map(m=>m.value));for(const[m,v]of Object.entries(p)){const b=n.camelCase?r?.get(m)??m:m,L=o.get(m);L?.type?d[b]=Bi(v,L.type,{optionName:L.name,strictTypes:n.strictTypes}):d[b]=v===void 0?null:v}for(const m of e){const v=n.camelCase?r?.get(m.name)??m.name:m.name;!(v in d)&&m.defaultValue!==void 0&&(m.multiple??m.lazyMultiple?d[v]=Array.isArray(m.defaultValue)?[...m.defaultValue]:[m.defaultValue]:d[v]=m.defaultValue)}if(y){const m={},v={},b={};for(const A of e)if(A.group){const M=Array.isArray(A.group)?A.group:[A.group];for(const U of M)Qe(U)||(m[U]??={})}for(const A of Object.keys(d))if(!Fi(A)){v[A]=d[A];let M=A;n.camelCase&&(M=l?.get(A)??A);const U=o.get(M);if(U?.group){const C=Array.isArray(U.group)?U.group:[U.group];for(const D of C)Qe(D)||m[D]&&(m[D][A]=d[A])}else b[A]=d[A]}const L={_all:v};for(const[A,M]of Object.entries(m))L[A]=M;Object.keys(b).length>0&&(L._none=b),d._unknown&&(L._unknown=d._unknown),Object.keys(d).forEach(A=>delete d[A]),Object.assign(d,L)}const O=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));return _(s,"Final parsed result:","resolver",O),O},ee="-".codePointAt(0),H="=",Gi=H.codePointAt(0),Hi="--",Ji="-",Ki="--",It=t=>t.length>2&&t.startsWith(Ki),Yi=t=>It(t)&&!t.includes(H,3),Xi=t=>It(t)&&t.includes(H,3),Qi=t=>{if(t.length!==2||t.codePointAt(0)!==ee||t.codePointAt(1)===ee)return!1;const e=t.codePointAt(1);return e!==void 0&&(e<48||e>57)},Zi=t=>!(t.length<=2||t.codePointAt(0)!==ee||t.codePointAt(1)===ee),eo=t=>{const e=[];let n=0,i=[],s=0,o=-1,c=0;for(;s<i.length||n<t.length;){let a;if(s<i.length?(a=i[s],s++):(a=t[n],n++),c>0?c--:o++,a===Hi){e.push({index:o,kind:"option-terminator"});const u=[...i.slice(s),...t.slice(n)],r=u.map((l,d)=>({index:o+d+1,kind:"positional",value:l}));e.push(...r),o+=u.length;break}if(Qi(a)){const u=a.charAt(1);e.push({index:o,kind:"option",name:u,rawName:a});continue}if(Zi(a)&&!a.includes(H)){const u=[];let r="",l=!1;for(let d=1;d<a.length;d++){const p=a.charAt(d);l?r+=p:p.codePointAt(0)===Gi?l=!0:u.push(`${Ji}${p}`)}if(l)if(u.length>0){const d=u.pop();u.push(`${d}=${r}`)}else u.push(r);i=s<i.length?[...u,...i.slice(s)]:u,s=0,c=u.length;continue}if(Yi(a)){const u=a.slice(2);e.push({index:o,kind:"option",name:u,rawName:a});continue}if(Xi(a)){const u=a.indexOf(H),r=a.slice(2,u),l=a.slice(u+1);e.push({index:o,inlineValue:!0,kind:"option",name:r,rawName:a,value:l});continue}if(a.length>2&&a.codePointAt(0)===ee&&a.codePointAt(1)!==ee&&a.includes(H)){const u=a.indexOf(H),r=a.charAt(1),l=a.slice(u+1);e.push({index:o,inlineValue:!0,kind:"option",name:r,rawName:a,value:l});continue}e.push({index:o,kind:"positional",value:a})}return e},to=/\d/,no=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",io=t=>typeof t=="function",oo=(t,e,n)=>{const i=n?.debug??!1;_(i,"Validating definitions:","validation",t,"caseInsensitive:",e);const s=new Set,o=new Set,c=new Set,a=new Set;let u=0;for(const r of t){if(_(i,"Checking definition:","validation",r),!r.name)throw _(i,"Validation failed: name is required","validation"),new S("Invalid option definition: name is required");if(typeof r.name!="string")throw new S("Invalid option definition: name must be a string");if(r.name.trim()==="")throw new S("Invalid option definition: name cannot be empty");const l=e?r.name.toLowerCase():"";if(s.has(r.name)||e&&c.has(l))throw new S(`Invalid option definition: duplicate name '${r.name}'`);if(o.has(r.name)||e&&a.has(l))throw new S(`Invalid option definition: name '${r.name}' conflicts with an existing alias`);if(s.add(r.name),e&&c.add(l),r.alias!==void 0){if(typeof r.alias!="string")throw new S("Invalid option definition: alias must be a string");if(r.alias.length!==1)throw new S("Invalid option definition: alias must be a single character");if(to.test(r.alias))throw new S("Invalid option definition: alias cannot be numeric");if(r.alias==="-")throw new S('Invalid option definition: alias cannot be "-"');const d=e?r.alias.toLowerCase():"";if(o.has(r.alias)||e&&a.has(d))throw new S(`Invalid option definition: duplicate alias '${r.alias}'`);if(s.has(r.alias)||e&&c.has(d))throw new S(`Invalid option definition: alias '${r.alias}' conflicts with an existing option name`);o.add(r.alias),e&&a.add(d)}if(r.defaultOption&&(u++,r.type!==void 0&&no(r.type)))throw new S("Invalid option definition: defaultOption cannot be Boolean type");if(r.type!==void 0&&!(r.type===Boolean||r.type===Number||r.type===String||typeof r.type=="function"&&io(r.type)))throw new S("Invalid option definition: invalid type")}if(u>1)throw _(i,"Validation failed: multiple defaultOptions not allowed","validation"),new S("Invalid option definition: multiple defaultOptions not allowed");_(i,"Validation completed successfully","validation")};function so(t,e={}){const n=e.debug??!1;_(n,"Starting command-line-args parsing","index"),_(n,"Options:","index",e);const i={...e};i.stopAtFirstUnknown&&(i.partial=!0);const s=Array.isArray(t)?t:[t];_(n,"Normalized definitions:","index",s),oo(s,i.caseInsensitive,n?i:void 0);let{argv:o}=i;if(!o&&(o=process.argv.slice(2),process.execArgv.length>0)){const r=new Set(process.execArgv);o=o.filter(l=>!r.has(l))}_(n,"Using argv:","index",o);let c=o;i.caseInsensitive&&(c=o.map(r=>{if(r.startsWith("--")){const l=r.indexOf("="),d=(l===-1?r.slice(2):r.slice(2,l)).toLowerCase();return l===-1?`--${d}`:`--${d}${r.slice(l)}`}if(r.startsWith("-")&&!r.startsWith("--")&&r.length>1){const l=r.slice(1).split("=",2),d=l[0],p=l[1];if(!d)return r;const f=d.toLowerCase();return p===void 0?`-${f}`:`-${f}=${p}`}return r}));const a=eo(c.map(String));_(n,"Tokenized arguments:","index",a);const u=qi(a,s,i,o);return _(n,"Command-line-args parsing completed","index"),u}class ro{result;argv;options;argument;command;commandName;env;logger;console;fs;process;runtime;rawUnknown;constructor(e,n){this.commandName=e,this.command=n}}let xe=class extends k{commandName;constructor(t,e,n){super(`Failed to load command "${t}": ${e}`,"COMMAND_LOADER_ERROR",{commandName:t,reason:e}),this.name="CommandLoaderError",this.commandName=t,this.hint="Ensure the loader resolves to a module with a default export that is the command handler function.",n!==void 0&&(this.cause=n)}};const ao=/^-{1,2}(\w+)(=(.+))?$/,Lt=(t,e,n,i)=>{const s=ao.exec(t);if(s===null)return{};const o=s[1];if(!o)return{};const c=n&&i?n.get(o)??i.get(o):e.find(a=>a.name===o||a.alias===o);return c!==void 0?{argName:c.name,argValue:s[3],option:c}:{}},tt=(t,e)=>{if(e.type===void 0)return t;if(e.type.name==="Boolean"){if(t==="true"||t==="1")return e.type(!0);if(t==="false"||t==="0")return e.type(!1)}return e.type(t)},lo=new Set(["0","1","false","true"]),co=(t,e,n,i)=>{if(e.length===0||t.length===0)return{};const s=(o,c)=>{const{argName:a,argValue:u,option:r}=Lt(c,e,n,i),{lastOption:l}=o;return r&&le(r)&&u&&a?o.partial[a]=tt(u,r):o.lastName&&l&&le(l)&&lo.has(c)&&(o.partial[o.lastName]=tt(c,l)),{lastName:a,lastOption:r,partial:o.partial}};return t.reduce(s,{partial:{}}).partial},uo=new Set(["0","1","false","true"]),po=(t,e,n,i)=>{if(e.length===0||t.length===0)return t;const s=(o,c)=>{const{argValue:a,option:u}=Lt(c,e,n,i),{lastOption:r}=o;if(r&&le(r)&&uo.has(c)){const{args:l}=o;return{args:l.slice(0,-1)}}return u&&le(u)&&a?{args:o.args}:{args:[...o.args,c],lastOption:u}};return t.reduce(s,{args:[]}).args},ho=t=>{const e=new Map;for(const n of t){const i=e.get(n.name);i?e.set(n.name,{...i,...n}):e.set(n.name,n)}return[...e.values()]},fo=t=>{if(t===void 0)return;const e=t.toLowerCase().trim();return e==="true"||e==="1"||e==="yes"||e==="on"},mo=(t,e)=>{if(!t.type)return e;if(e!==void 0){if(t.type===Boolean||typeof t.type=="function"&&t.type.name==="Boolean")return fo(e);if(t.type===Number||typeof t.type=="function"&&t.type.name==="Number"){const n=Number.parseFloat(e);return Number.isNaN(n)?void 0:n}return t.type===String||typeof t.type=="function"&&t.type.name==="String"?e:t.type(e)}},go=/_./g,wo=/^[A-Z]/,yo=t=>t.toLowerCase().replaceAll(go,e=>e[1]?.toUpperCase()??e).replace(wo,e=>e.toLowerCase()),vo=t=>{if(!t||t.length===0)return{};const e={},n=fe();for(const i of t){const s=n[i.name],o=mo(i,s),c=o===void 0?i.defaultValue:o,a=yo(i.name);e[a]=c}return e},$o=t=>{const e=new Map,n=new Map;for(const i of t)if(e.set(i.name,i),i.alias){const s=Array.isArray(i.alias)?i.alias:[i.alias];for(const o of s)n.set(o,i)}return{optionMapByAlias:n,optionMapByName:e}},St=async t=>{if(typeof t.__resolvedExecute__=="function")return t.__resolvedExecute__;if(typeof t.loader!="function")throw new xe(t.name,"no execute or loader defined");let e;try{e=await t.loader()}catch(i){throw new xe(t.name,i instanceof Error?i.message:String(i),i)}const n=e.default;if(typeof n!="function")throw new xe(t.name,"loader did not return a module with a default-exported handler function");return t.__resolvedExecute__=n,n},xo=(t,e,n,i)=>{const s=new ro(t.name,t),{_all:o,_unknown:c,positionals:a}=e,u=Object.keys(n).length>0?{...o,...n}:o;he in u&&delete u[he],s.argument=a?.[he]??[],s.rawUnknown=[...c??[]];const r=Object.keys(i).length>0;return s.options=r?{...u,...i}:u,s.env=vo(t.env),s},bo=(t,e,n)=>{const i=t.options??[],s=i.length>0;let o=ho(s?[...i,...n]:n);if(o.length>0){for(const r of o)if(r.multiple&&r.lazyMultiple)throw new Error(`Argument "${r.name}" cannot have both multiple and lazyMultiple options, please choose one.`)}t.argument&&(o=[{defaultOption:!0,description:t.argument.description,group:"positionals",multiple:!0,name:he,type:t.argument.type,typeLabel:t.argument.typeLabel},...o]);let c,a;if(s){const{optionMapByAlias:r,optionMapByName:l}=$o(i);c=po(e,i,l,r),a=co(e,i,l,r)}else c=e,a={};const u=so(o,{argv:c,camelCase:!0,partial:!0,stopAtFirstUnknown:!0});return{arguments_:o,booleanValues:a,parsedArgs:u}},Q=async(t,e,n)=>typeof t.execute=="function"?t.execute(e):(await St(t))(e);let No=class extends k{commandName;missingOptions;constructor(t,e){super(`Command "${t}" is missing required options: ${e.join(", ")}`,"COMMAND_VALIDATION_ERROR",{commandName:t,missingOptions:e}),this.name="CommandValidationError",this.commandName=t,this.missingOptions=e,this.hint=`Provide the following required options: ${e.join(", ")}`}},Ao=class extends k{choices;option;value;constructor(t,e,n){super(`Invalid value "${e}" for option "${t}". Allowed values: ${n.join(", ")}`,"INVALID_CHOICE",{choices:n,option:t,value:e}),this.name="InvalidChoiceError",this.option=t,this.value=e,this.choices=n,this.hint=`Use one of: ${n.map(i=>`--${t} ${i}`).join(", ")}`}};const nt=(t,e,n=!1)=>{const i=[];for(const s of t)if(!(!n&&!s.required)&&e[s.name]===void 0){if(s.type?.name==="Boolean"){e[s.name]=!1;continue}i.push(s)}return i},ko=(t,e)=>e.includes(t)?!0:Math.abs(t.length-e.length)>t.length/2?!1:Rn(t,e)<=t.length/3,W=(t,e)=>{const n=t.toLowerCase();return e.filter(i=>ko(i.toLowerCase(),n))},Eo=(t,e)=>{const n=[];if(t._unknown&&t._unknown.forEach(i=>{const s=i.startsWith("--");let o=`Found unknown ${s?"option":"argument"} "${i}"`;if(s){const c=W(i.replace("--",""),(e.options??[]).map(a=>a.name));if(c.length>0){const[a,...u]=c.map(r=>`--${r}`);o+=u.length>0?`, did you mean ${a??""} or ${u.join(", ")}?`:`, did you mean ${a??""}?`}}n.push(o)}),n.length>0)throw new Error(n.join(`
26
- `))},Co=(t,e,n)=>{const i=n.__requiredOptions__,s=i?nt(i,e,!0):nt(t,e,!1);if(s.length>0)throw new No(n.name,s.map(o=>o.name));e._unknown&&e._unknown.length>0&&!n.argument&&Eo(e,n)},Oo=(t,e,n)=>{const i=n.__conflictingOptions__??t.filter(s=>s.conflicts!==void 0);if(i.length>0){const s=i.find(o=>Array.isArray(o.conflicts)?o.conflicts.some(c=>e[c]!==void 0)&&e[o.name]!==void 0:e[o.conflicts]!==void 0&&e[o.name]!==void 0);if(s)throw new Et(s.name,typeof s.conflicts=="string"?s.conflicts:s.conflicts?.[0]??"unknown")}},_o=(t,e)=>{const n=e.options;if(n)for(const i of n){if(!i.choices||i.choices.length===0)continue;const s=t[i.name];if(s==null)continue;const o=Array.isArray(s)?s:[s];for(const c of o){const a=String(c);if(!i.choices.includes(a))throw new Ao(i.name,a,i.choices)}}},Io=t=>{if(!Array.isArray(t.options))return;const e=new Map,n=new Map;for(const s of t.options){if(s.name){const o=e.get(s.name)??[];o.push(s),e.set(s.name,o)}if(typeof s.alias=="string"&&s.alias.length>0){const o=n.get(s.alias)??[];o.push(s),n.set(s.alias,o)}else if(Array.isArray(s.alias)){for(const o of s.alias)if(o.length>0){const c=n.get(o)??[];c.push(s),n.set(o,c)}}}const i=[];for(const[s,o]of e)o.length>1&&i.push(`Duplicate option name "${s}" in command "${t.name}": ${JSON.stringify(o)}`);for(const[s,o]of n)o.length>1&&i.push(`Duplicate option alias "-${s}" used by options ${o.map(c=>`"${c.name}"`).join(", ")} in command "${t.name}"`);if(i.length>0)throw new Error(i.join(`
27
- `))},Lo=(t,e)=>{if(e.length===0)return{argv:[],commandPath:void 0};const n=[];let i;for(let s=1;s<=e.length;s+=1){const o=e[s-1];if(o===void 0||o.startsWith("-"))break;n.push(o);const c=n.join(" ");t.has(c)&&(i={commandPath:[...n],depth:s})}return i?{argv:e.slice(i.depth),commandPath:i.commandPath}:{argv:e,commandPath:void 0}},q=t=>t.join(" "),it=(t,e)=>e&&e.length>0?[...e,t]:[t],So=(t,e)=>typeof t!="string"||t===""?"":t[0].toLowerCase()+t.slice(1),Mo=(t,e)=>typeof t!="string"||t===""?"":t[0].toUpperCase()+t.slice(1),Po=(t,e)=>{const{length:n}=t;if(n===0)return"";if(n===1)return t[0];const i=[];let s="",o="";for(let c=0;c<n;c++){const a=t[c];if(de.test(a)){s?(i.push(s+o+a),s="",o=""):(i.length>0&&i.push(e),s=a);continue}s?(o&&(o+=e),o+=a):(i.length>0&&i.push(e),i.push(a))}return i.join("")},Mt=(t,e)=>{if(typeof t!="string"||!t)return"";let n=!0;return Po(xi(t,{handleAnsi:e?.handleAnsi,handleEmoji:e?.handleEmoji,knownAcronyms:e?.knownAcronyms,locale:e?.locale,normalize:e?.normalize,separators:void 0,stripAnsi:e?.stripAnsi,stripEmoji:e?.stripEmoji}).map(i=>{const s=i,o=s.toLowerCase();return n?(n=!1,So(o)):Mo(o)}),"")},Do=/^no-/,Uo=t=>{t.options?.forEach(e=>{e.__camelCaseName__=Mt(e.name)})},Vo=t=>{if(!Array.isArray(t.options)||t.options.length===0)return;const e=new Set;for(const i of t.options)e.add(i.name);const n=[];for(const i of t.options)if(i.name.startsWith("no-")){const s=i.name.replace(Do,"");if(!e.has(s)){if(i.type!==Boolean)throw new Error(`Cannot add negated option "${i.name}" to command "${t.name}" because it is not a boolean.`);const o={...i,defaultValue:i.defaultValue===void 0?!0:!i.defaultValue,name:s};n.push(o),e.add(s)}}n.length>0&&t.options.push(...n)},To=(t,e)=>{if(!e.options||e.options.length===0)return;const{options:n}=t,i=new Map;for(const o of e.options)if(o.name.startsWith("no-")){const c=Mt(o.name);i.set(c,o)}const s=Object.keys(n).filter(o=>i.has(o));if(s.length!==0)for(const o of s){const c=o.charAt(2);if(!c)continue;const a=c.toLowerCase()+o.slice(3),u=i.get(o);u&&(u.__negated__=!0),n[a]=!n[o],Reflect.deleteProperty(n,o)}},jo=(t,e)=>{if(!e.options||e.options.length===0)return;const n=new Map;for(const s of e.options)s.__camelCaseName__&&s.__negated__===void 0&&s.implies!==void 0&&n.set(s.__camelCaseName__,s);if(n.size===0)return;const{options:i}=t;for(const s of Object.keys(i)){const o=n.get(s);if(o?.implies){const{implies:c}=o;for(const[a,u]of Object.entries(c))i[a]===void 0&&(i[a]=u)}}},Ro=()=>!!process.versions.electron,Bo=()=>Ro()&&!process.defaultApp,Wo=()=>Bo()?0:1,zo=t=>t.slice(Wo()+1),Fo=" ",qo=(t,e)=>t===e?!0:t.length!==e.length?!1:t.every((n,i)=>n===e[i]),Go=t=>{if(typeof t=="string")return t.split(Fo);const e=Ae();return qo(t,e)?zo(t):t},Ho=t=>{const e=o=>{t.error(`Uncaught exception: ${o.message||o}`),o.stack&&t.error(o.stack),G(1)},n=(o,c)=>{if(o instanceof Error)t.error(`Promise rejection: ${o.message||o}`),o.stack&&t.error(o.stack);else{let a;if(typeof o=="string")a=o;else try{a=JSON.stringify(o)}catch{a=String(o)}t.error(`Promise rejection: ${a}`)}G(1)},i=Se("uncaughtException",e),s=Se("unhandledRejection",n);return()=>{i(),s()}},ot=100,Jo=/^[a-z][\w-]*$/i,Ee=(t,e)=>{if(typeof t!="string"||t.trim().length===0)throw new k(`${e} must be a non-empty string`,"INVALID_INPUT",{fieldName:e,value:t});return t.trim()},st=(t,e)=>{if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new k(`${e} must be an array of strings`,"INVALID_INPUT",{fieldName:e,value:t});return t},be=(t,e)=>{if(typeof t!="object"||t===null)throw new k(`${e} must be an object`,"INVALID_INPUT",{fieldName:e,value:t});return t},pe=t=>{const e=Ee(t,"Command name");if(e.length>ot)throw new k(`Command name is too long (maximum ${String(ot)} characters)`,"INVALID_COMMAND_NAME",{commandName:e,length:e.length});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new k(`Command name "${e}" contains invalid characters`,"INVALID_COMMAND_NAME",{commandName:e});if(!Jo.test(e))throw new k(`Command name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_COMMAND_NAME",{commandName:e});return e},Ko=new Set([`
28
- `,"\r"," ","\0",'"',"$","&","'","(",")",";","<",">","[","\\","]","`","{","|","}"]),Yo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Argument must be a string");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArgumentLength??1e6;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Argument is too long (maximum ${String(i)} characters)`);if(n.checkDangerousChars){for(const s of t)if(Ko.has(s))throw new Error(`Argument contains dangerous character: ${s}`)}return n.trim?t.trim():t},rt=(t,e={})=>{if(!Array.isArray(t))throw new TypeError("Arguments must be an array");const n=typeof e=="boolean"?{checkDangerousChars:e}:e,i=n.maxArguments??1e5;if(Number.isFinite(i)&&i>0&&t.length>i)throw new Error(`Too many arguments (maximum ${String(i)})`);return t.map(s=>Yo(s,n))},Xo=/^-([^\d-])$/,Qo=/^--(\S+)/,Zo=/^-([^\d-]{2,})$/,Ne=t=>Xo.test(t)||Qo.test(t)||Zo.test(t),es={access:(t,e)=>_i(t,e),mkdir:(t,e)=>Oi(t,e),readdir:t=>Ci(t),readFile:(async(t,e)=>e===void 0?Fe(t):Fe(t,e)),rm:(t,e)=>Ei(t,e),stat:t=>ki(t),writeFile:(t,e,n)=>Ai(t,e,n)},ts=(t,e,n)=>{const i=e.indexOf("--"),s=i===-1?new Set:new Set(e.slice(i+1)),o=n.filter(u=>u.startsWith("--")&&u!=="--"&&!s.has(u));if(o.length===0)return;const c=(t.options??[]).map(u=>u.name),a=o.flatMap(u=>W(u.slice(2),c).map(r=>`--${r}`));throw new Ii(o,a)};class Le{#t;#e;#u;#p;#f;#m;#A;#k;#E;#$;#C;#x;#O;#_=ge;#h;#n;#i;#o;#s;#r;#g=!1;#I;#L=!1;#w;#y;#v;#l=[];#U(){return this.#w===void 0&&(this.#w=[...this.#i.keys()]),this.#w}#S(){return this.#y===void 0&&(this.#y=[...this.#n.keys()]),this.#y}#a(){return this.#v===void 0&&(this.#v=[...this.#U(),...this.#S()]),this.#v}#M(){return this.#l.length===0?ce:[...ce,...this.#l]}#P(){this.#w=void 0,this.#y=void 0,this.#v=void 0}#b(){if(this.#u===void 0){const e=Go(this.#e.argv);this.#u=rt(e,{maxArguments:this.#x}),this.#V()}return this.#u}#N(){return this.#$??fe()}#d(e){this.#_=e,this.#N().CEREBRO_OUTPUT_LEVEL=String(e)}#c(){const e=this.#N().CEREBRO_OUTPUT_LEVEL,n=e===void 0?Number.NaN:Number(e);return Number.isNaN(n)?this.#_:n}#V(){if(!this.#u)return;let e=!1;for(const n of this.#u){if(n==="--quiet"||n==="-q"){this.#d(zt),e=!0;break}if(n==="--verbose"||n==="-v"){this.#d(Ft),e=!0;break}if(n==="--debug"){this.#d(j),e=!0;break}}e||this.#d(Object.hasOwn(this.#N(),"DEBUG")?j:ge)}#T(){this.#L||(this.#I=Ho(this.#t),this.#L=!0)}#j(){return{arch:jt(),argv:this.#b(),cwd:this.#p,env:this.#$??fe(),exit:this.#E??(e=>G(e??0)),platform:Tt(),stdin:this.#C}}#D(e,n,i,s){this.#c()===j&&this.#t.debug(`command '${s}' found, parsing command args: ${n.join(", ")}`);const{arguments_:o,booleanValues:c,parsedArgs:a}=bo(e,n,this.#M()),u=Object.keys(c).length>0;let r=a;u&&(r={...a,_all:{...a._all,...c}}),Co(o,r,e);const l=xo(e,a,c,i);l.runtime=this,l.argv=this.#b(),l.fs=this.#k??es,l.process=this.#j(),l.console=this.#t;const d=e.options&&e.options.length>0;if(d&&e.options){const p=e.options.filter(f=>f.name.startsWith("no-"));for(const f of p){const h=f.name.slice(3),g=`--${f.name}`,$=`--${h}`,w=n.includes(g),y=n.includes($);if(w&&y)throw new Et(h,f.name)}}return d&&(To(l,e),jo(l,e)),Oo(o,l.options,e),_o(l.options,e),this.#O&&ts(e,n,l.rawUnknown),this.#c()===j&&(this.#t.debug("command options parsed from options:"),this.#t.debug(JSON.stringify(l.options,null,2)),this.#t.debug("command argument parsed from argument:"),this.#t.debug(JSON.stringify(l.argument,null,2))),{arguments_:o,booleanValues:c,commandArgs:r,parsedArgs:a,toolbox:l}}constructor(e,n={}){if(typeof e!="string"||e.trim().length===0)throw new k("CLI name must be a non-empty string","INVALID_INPUT",{cliName:e});this.#f=e.trim();const i=n.argv??Ae(),s=n.cwd??Rt();if(this.#e={...n,argv:i,cwd:s},this.#e.argv&&!Array.isArray(this.#e.argv))throw new k("CLI argv option must be an array of strings","INVALID_INPUT",{argv:this.#e.argv});if(this.#e.cwd&&typeof this.#e.cwd!="string")throw new k("CLI cwd option must be a string","INVALID_INPUT",{cwd:this.#e.cwd});if(this.#e.packageName&&typeof this.#e.packageName!="string")throw new k("CLI packageName option must be a string","INVALID_INPUT",{packageName:this.#e.packageName});if(this.#e.packageVersion&&typeof this.#e.packageVersion!="string")throw new k("CLI packageVersion option must be a string","INVALID_INPUT",{packageVersion:this.#e.packageVersion});if(typeof this.#e.logger=="object"){const r=["debug","error","info","log","warn"],l=[],d=this.#e.logger;for(const p of r)typeof d[p]!="function"&&l.push(p);if(l.length>0)throw new k(`Logger object is missing required methods: ${l.join(", ")}`,"INVALID_INPUT",{logger:this.#e.logger,missingMethods:l});this.#t=this.#e.logger}else this.#t={...console,debug:(...r)=>{this.#c()===j&&console.debug(...r)}};this.#m=this.#e.packageVersion,this.#A=this.#e.packageName,this.#p=this.#e.cwd,this.#s="help",this.#r={};const o=n.fs;if(o!==void 0&&(typeof o!="object"||o===null))throw new k("CLI fs option must be an object implementing the CerebroFs interface","INVALID_INPUT",{fs:n.fs});const c=n.exit;if(c!==void 0&&typeof c!="function")throw new k("CLI exit option must be a function","INVALID_INPUT",{exit:n.exit});const a=n.env;if(a!==void 0&&(typeof a!="object"||a===null))throw new k("CLI env option must be a record of string keys","INVALID_INPUT",{env:n.env});const u=n.stdin;if(u!==void 0&&typeof u!="string")throw new k("CLI stdin option must be a string","INVALID_INPUT",{stdin:n.stdin});this.#k=n.fs,this.#E=n.exit,this.#$=n.env,this.#C=n.stdin??"",this.#x=n.maxArguments,this.#O=n.strictOptions??!1,this.#d(ge),this.#n=new Map,this.#i=new Map,this.#o=new Map}setCommandSection(e){return this.#r=e,this}getCommandSection(){return this.#r.header||(this.#r.header=`${this.#f}${this.#m?` v${this.#m}`:""}`),this.#r}setDefaultCommand(e){return this.#s=e,this}get defaultCommand(){return this.#s}addCommand(e){be(e,"Command"),pe(e.name);const n=typeof e.execute=="function",i=typeof e.loader=="function";if(n&&i)throw new k(`Command "${e.name}" cannot define both "execute" and "loader" — choose one`,"INVALID_COMMAND",{commandName:e.name});if(!n&&!i)throw new k(`Command "${e.name}" must define either "execute" or "loader"`,"INVALID_COMMAND",{commandName:e.name});e.alias&&(typeof e.alias=="string"?pe(e.alias):st(e.alias,"Command alias").forEach(r=>pe(r))),e.argument&&be(e.argument,"Command argument"),e.options&&be(e.options,"Command options"),e.commandPath&&(st(e.commandPath,"Command commandPath"),e.commandPath.forEach(r=>{pe(r)}));const s=it(e.name,e.commandPath),o=q(s);if(this.#i.has(o))throw new k(`Command with path "${o}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name,commandPath:e.commandPath});const c=Array.isArray(e.commandPath)&&e.commandPath.length>0,a=this.#n.get(e.name),u=a!==void 0&&(a.commandPath===void 0||a.commandPath.length===0);if(!c&&u)throw new k(`Command with name "${e.name}" already exists`,"DUPLICATE_COMMAND",{commandName:e.name});if(e.options)for(const r of e.options)qe(r);if(Io(e),Vo(e),Uo(e),e.options&&(e.__conflictingOptions__=e.options.filter(r=>r.conflicts!==void 0),e.__requiredOptions__=e.options.filter(r=>r.required===!0)),c&&a!==void 0)this.#n.set(o,e);else{if(!c&&a!==void 0&&!u){const r=it(a.name,a.commandPath);this.#n.set(q(r),a)}this.#n.set(e.name,e)}if(this.#i.set(o,s),this.#o.set(o,e),this.#P(),e.alias!==void 0){const r=typeof e.alias=="string"?[e.alias]:e.alias;for(const l of r){if(this.#c()===j&&this.#t.debug("adding alias",l),this.#n.has(l))throw new k(`Command alias "${l}" conflicts with existing command`,"DUPLICATE_COMMAND",{alias:l,commandName:e.name});this.#n.set(l,e)}}return this}addGlobalOption(e){const n=e,i=new Set(ce.map(o=>o.name)),s=new Set(ce.map(o=>o.alias).filter(Boolean));if(i.has(n.name))throw new k(`Cannot add global option "--${n.name}": it conflicts with a built-in global option`,"DUPLICATE_OPTION",{optionName:n.name});if(n.alias&&s.has(n.alias))throw new k(`Cannot add global option with alias "-${n.alias}": it conflicts with a built-in global option alias`,"DUPLICATE_OPTION",{alias:n.alias,optionName:n.name});if(new Set(this.#l.map(o=>o.name)).has(n.name))throw new k(`Global option "--${n.name}" has already been added`,"DUPLICATE_OPTION",{optionName:n.name});return n.group="global",qe(n),this.#l.push(n),this}getGlobalOptions(){return this.#M()}addPlugin(e){return this.getPluginManager().register(e),this}getPluginManager(){return this.#h?this.#h:(this.#h=new Si(this.#t),this.#h.register({description:"Attaches the logger to the toolbox",execute:e=>{e.logger=this.#t,e.console=e.logger},name:"logger"}),this.#h)}getCliName(){return this.#f}getPackageVersion(){return this.#m}getPackageName(){return this.#A}getCommands(){return this.#n}getCwd(){return this.#p}dispose(){this.#I?.()}async run(e={}){const{autoDispose:n=!0,shouldExitProcess:i=!0,...s}=e;if(!this.#n.has("help")){const{default:y}=await import("../packem_chunks/help-command.js");this.addCommand(new y(this.#n))}const o=this.#S(),c=this.#i;this.#T();const a=this.#b();let u,r=[...a];this.#c()===j&&(this.#t.debug(`process.execPath: ${Bt()}`),this.#t.debug(`process.execArgv: ${Wt().join(" ")}`),this.#t.debug(`process.argv: ${Ae().join(" ")}`));const l=Lo(c,[...a]);if(l.commandPath)u=l.commandPath,r=l.argv;else{if(a.length>1&&a[0]&&a[1]&&!Ne(a[0])&&!Ne(a[1])){const x=[];let N=0;for(;N<a.length;){const I=a[N];if(!I||Ne(I))break;x.push(I),N+=1}const E=q(x);if(x[0]&&!o.includes(x[0])){const I=this.#a(),O=W(E,I);throw new F(E,O)}}let y;try{y=Ti([null,...o],[...a])}catch(x){if(x instanceof Error&&x.name==="INVALID_COMMAND"&&"command"in x){const N=x.command,E=this.#a(),I=W(N,E);throw new F(N,I)}throw x}y.command&&(u=[y.command],r=y.argv)}if(!u)if(this.#s)u=[this.#s];else{const y=this.#a();throw new F("",y)}const d=q(u),p=this.#i.get(d);let f;if(p){if(f=this.#o.get(d),!f||q(p)!==d){const y=this.#a(),x=W(d,y);throw new F(d,x)}}else{const y=u.at(-1);if(f=y?this.#n.get(y):void 0,!f){const x=this.#a(),N=W(d,x);throw new F(d,N)}}if(typeof f.execute!="function"&&typeof f.loader!="function")return this.#t.error(`Command "${f.name}" has no function to execute.`),i?G(1):void 0;const h=r;let g,$;try{({commandArgs:g,toolbox:$}=this.#D(f,h,s,d))}catch(y){if(this.#t.error(y),i)return G(1);throw y}const w=this.getPluginManager();try{!this.#g&&w.hasPlugins()&&(await w.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await w.executeLifecycle("execute",$),await w.executeLifecycle("beforeCommand",$);let y;const x=g.global;if(x?.help){const N=this.#n.get("help");if(!N)throw new k("Help command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else if(x?.version??x?.V){const N=this.#n.get("version");if(!N)throw new k("Version command not found","COMMAND_NOT_FOUND");y=await Q(N,$)}else y=await Q(f,$);return await w.executeLifecycle("afterCommand",$,y),i?G(0):void 0}catch(y){throw await w.executeErrorHandlers(y,$),y}finally{n&&this.dispose()}}async runCommand(e,n={}){const{argv:i=[],...s}=n;Ee(e,"Command name");const o=e.split(" ").filter(Boolean),c=q(o),a=this.#i.get(c)?this.#o.get(c):this.#n.get(e);if(!a){const p=this.#a(),f=W(c||e,p);throw new F(e,f)}if(typeof a.execute!="function"&&typeof a.loader!="function")throw new k(`Command "${a.name}" has no function to execute`,"INVALID_COMMAND",{commandName:a.name});const u=[...rt(i,{maxArguments:this.#x})];this.#c()===j&&this.#t.debug(`running command '${e}' programmatically with args: ${u.join(", ")}`);const{commandArgs:r,toolbox:l}=this.#D(a,u,s,c||e),d=this.getPluginManager();try{!this.#g&&d.hasPlugins()&&(await d.init({cli:this,cwd:this.#p,logger:this.#t}),this.#g=!0),await d.executeLifecycle("execute",l),await d.executeLifecycle("beforeCommand",l);let p;const f=r.global;if(f?.help){const h=this.#n.get("help");if(!h)throw new k("Help command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else if(f?.version??f?.V){const h=this.#n.get("version");if(!h)throw new k("Version command not found","COMMAND_NOT_FOUND");p=await Q(h,l)}else p=await Q(a,l);return await d.executeLifecycle("afterCommand",l,p),p}catch(p){throw await d.executeErrorHandlers(p,l),p}}clone(e){const n={...this.#e,...e},i=new Le(this.#f,n);for(const[s,o]of this.#n)i.#n.set(s,o);for(const[s,o]of this.#i)i.#i.set(s,[...o]);for(const[s,o]of this.#o)i.#o.set(s,o);for(const s of this.#l)i.#l.push(s);return i.#s=this.#s,i.#r={...this.#r},i.#P(),i}async getAction(e){Ee(e,"Command name");const n=e.split(" ").filter(Boolean),i=q(n),s=this.#i.get(i)?this.#o.get(i):this.#n.get(e);if(!s){const o=this.#a(),c=W(i||e,o);throw new F(e,c)}if(typeof s.execute=="function")return s.execute;if(typeof s.loader=="function")return St(s);throw new k(`Command "${s.name}" has no execute or loader defined`,"INVALID_COMMAND",{commandName:s.name})}}const ds=(t,e)=>new Le(t,e),fs=(t={})=>({description:"Enhanced error handling and reporting with beautiful code frames",name:"error-handler",onError:(e,n)=>{const{logger:i,runtime:s}=n,{detailed:o=!1,exitOnError:c=!0,formatter:a,logErrors:u=!0,renderOptions:r={}}=t;if(u)if(a)i.error(a(e));else if(o){const l=s.getCwd(),d=Vn(e,{cwd:l,hideErrorCodeView:!1,hideErrorTitle:!1,hideMessage:!1,linesAbove:2,linesBelow:3,...r});i.error(d)}else i.error(e);c&&G(1)},version:"1.0.0"}),ms=async t=>{try{await t.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}},gs={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"],["vis install && vis dlx --offline typescript tsc --version","Hardened: pre-install + offline (no registry fetch on dlx)"],["vis dlx --info create-vite","Always show the first-run panel (size, score, permissions, changelog)"],["vis dlx --yes create-vite my-app","Skip the first-run panel and confirmation"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler66.js"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean},{defaultValue:!1,description:"Resolve from local store only — fail rather than fetch from the registry. Pair with `vis install` for hardened npx-style workflows.",name:"offline",type:Boolean},{alias:"y",defaultValue:!1,description:"Skip the first-run info panel and confirmation prompt (also via VIS_DLX_YES — note this auto-approves every package)",name:"yes",type:Boolean},{defaultValue:!1,description:"Always show the first-run info panel (size, security score, permissions, changelog), even for an approved package",name:"info",type:Boolean},{defaultValue:!1,description:"Disable the first-run info panel entirely (also via VIS_DLX_NO_INFO)",name:"no-info",type:Boolean}]};export{z as L,ds as V,cs as a,as as b,k as c,gs as e,fs as h,ls as i,rs as n,us as o,ps as p,ms as r,ss as s,os as t};