@stacksjs/bunpress 0.1.0 → 0.1.3

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 (54) hide show
  1. package/README.md +257 -26
  2. package/dist/bin/cli.js +2 -104
  3. package/dist/chunk-1ymh7yt2.js +9656 -0
  4. package/dist/chunk-8qj79f0y.js +2 -0
  5. package/dist/chunk-szme5v1e.js +8 -0
  6. package/dist/chunk-z0redasq.js +530 -0
  7. package/dist/config.d.ts +3 -5
  8. package/dist/highlighter.d.ts +2 -1
  9. package/dist/index.d.ts +2 -1
  10. package/dist/robots.d.ts +5 -0
  11. package/dist/rss.d.ts +16 -0
  12. package/dist/serve.d.ts +11 -1
  13. package/dist/sitemap.d.ts +5 -0
  14. package/dist/src/index.js +1 -1
  15. package/dist/template-loader.d.ts +5 -3
  16. package/dist/templates/blocks/alerts/caution.stx +9 -0
  17. package/dist/templates/blocks/alerts/important.stx +9 -0
  18. package/dist/templates/blocks/alerts/note.stx +9 -0
  19. package/dist/templates/blocks/alerts/tip.stx +9 -0
  20. package/dist/templates/blocks/alerts/warning.stx +9 -0
  21. package/dist/templates/blocks/containers/danger.stx +6 -0
  22. package/dist/templates/blocks/containers/details.stx +6 -0
  23. package/dist/templates/blocks/containers/info.stx +6 -0
  24. package/dist/templates/blocks/containers/raw.stx +3 -0
  25. package/dist/templates/blocks/containers/tip.stx +6 -0
  26. package/dist/templates/blocks/containers/warning.stx +6 -0
  27. package/dist/templates/blocks/inline/code.stx +1 -0
  28. package/dist/templates/blocks/inline/del.stx +1 -0
  29. package/dist/templates/blocks/inline/em.stx +1 -0
  30. package/dist/templates/blocks/inline/mark.stx +1 -0
  31. package/dist/templates/blocks/inline/strong.stx +1 -0
  32. package/dist/templates/blocks/inline/sub.stx +1 -0
  33. package/dist/templates/blocks/inline/sup.stx +1 -0
  34. package/dist/templates/features.stx +20 -0
  35. package/dist/templates/hero.stx +10 -0
  36. package/dist/templates/layout-doc.stx +157 -0
  37. package/dist/templates/layout-home.stx +23 -0
  38. package/dist/templates/layout-page.stx +40 -0
  39. package/dist/templates/page-toc.stx +267 -0
  40. package/dist/templates/sidebar-section.stx +42 -0
  41. package/dist/templates/sidebar.stx +54 -0
  42. package/dist/themes/bun/index.d.ts +34 -0
  43. package/dist/themes/index.d.ts +24 -0
  44. package/dist/themes/vitepress/base.css +549 -0
  45. package/dist/themes/vitepress/code-group.css +121 -0
  46. package/dist/themes/vitepress/custom-block.css +330 -0
  47. package/dist/themes/vitepress/index.d.ts +29 -0
  48. package/dist/themes/vitepress/index.ts +1963 -0
  49. package/dist/themes/vitepress/vars.css +436 -0
  50. package/dist/toc.d.ts +1 -1
  51. package/dist/types.d.ts +86 -5
  52. package/package.json +12 -39
  53. package/dist/chunk-he6c5f4e.js +0 -1354
  54. package/dist/plugin.d.ts +0 -0
package/README.md CHANGED
@@ -14,16 +14,36 @@ BunPress is a lightning-fast static site generator designed specifically for doc
14
14
 
15
15
  ## Features
16
16
 
17
- - **Lightning Fast** - Powered by Bun runtime for incredible performance
18
- - 📝 **Rich Markdown** - Enhanced markdown with containers, emojis, math, and syntax highlighting
19
- - 📋 **Smart TOC** - Automatic table of contents with customization and interactive features
20
- - 🛠️ **Developer Friendly** - TypeScript support, plugin system, and extensive customization options
21
- - 🔍 **Advanced Search** - Local search with indexing, keyboard shortcuts, and smart ranking
22
- - 🎨 **Theme System** - Complete theme customization with colors, fonts, and dark mode
23
- - 📱 **Responsive Design** - Mobile-first design that works beautifully on all devices
24
- - 🧭 **Navigation** - Flexible navigation with active states, nested menus, and icons
25
- - 📊 **Sidebar** - Collapsible sidebar with groups, search, and smooth animations
26
- - 🎯 **Multiple Layouts** - Home, documentation, and page layouts with custom templates
17
+ ### Core Features
18
+
19
+ - **Lightning Fast** - 0.18s build time (4,000 files), 11x faster than Eleventy
20
+ - 📝 **Rich Markdown** - VitePress-compatible markdown with containers, alerts, code groups, and syntax highlighting
21
+ - 📋 **Smart TOC** - Automatic table of contents with filtering, positioning (sidebar/inline/floating), and interactive navigation
22
+ - 🛠️ **Developer Friendly** - Native TypeScript support, comprehensive CLI (15+ commands), and extensive customization
23
+
24
+ ### SEO & Analytics
25
+
26
+ - 🔍 **Complete SEO** - Auto-generated sitemap.xml, robots.txt, Open Graph tags, and JSON-LD structured data
27
+ - 📊 **Fathom Analytics** - Privacy-focused analytics with GDPR/CCPA compliance and DNT support
28
+ - 🔎 **SEO Validation** - Built-in SEO checker with auto-fix mode for common issues
29
+
30
+ ### Markdown Extensions (VitePress-Compatible)
31
+
32
+ - ✅ Custom containers (info, tip, warning, danger, details, raw)
33
+ - ✅ GitHub-flavored alerts (note, tip, important, warning, caution)
34
+ - ✅ Code features (line highlighting, line numbers, focus, diffs, errors/warnings, groups)
35
+ - ✅ Code imports from files with line ranges and regions
36
+ - ✅ Tables with alignment and formatting
37
+ - ✅ Image enhancements with captions and lazy loading
38
+ - ✅ Custom header anchors and inline TOC
39
+ - ✅ **STX template syntax** in markdown — dynamic content with `@if`, `@foreach`, `{{ }}`, `<script server>`
40
+
41
+ ### Developer Experience
42
+
43
+ - 🚀 **Fast Dev Server** - ~100ms startup, hot reload, and instant feedback
44
+ - 📦 **Small Bundles** - ~45KB per page (HTML + JS + CSS)
45
+ - 💚 **Low Memory** - ~50MB dev server, ~250MB peak for 1000 files
46
+ - 🎯 **15+ CLI Commands** - Build, dev, preview, stats, doctor, SEO check, and more
27
47
 
28
48
  ## Quick Start
29
49
 
@@ -72,30 +92,241 @@ Configure your site in `bunpress.config.ts`:
72
92
 
73
93
  ```typescript
74
94
  export default {
95
+ title: 'My Documentation',
96
+ description: 'Built with BunPress',
75
97
  nav: [
76
98
  { text: 'Home', link: '/' },
77
99
  { text: 'Guide', link: '/guide' },
78
100
  { text: 'API', link: '/api' }
79
101
  ],
80
- markdown: {
81
- themeConfig: {
82
- colors: {
83
- primary: '#3b82f6'
84
- }
85
- }
86
- }
102
+
103
+ // SEO Configuration
104
+ sitemap: {
105
+ enabled: true,
106
+ baseUrl: 'https://mysite.com',
107
+ },
108
+ robots: {
109
+ enabled: true,
110
+ },
111
+
112
+ // Analytics
113
+ fathom: {
114
+ enabled: true,
115
+ siteId: 'YOUR_SITE_ID',
116
+ honorDNT: true,
117
+ },
87
118
  }
88
119
  ```
89
120
 
121
+ ## STX Templates in Markdown
122
+
123
+ BunPress supports [STX](https://stx.sh) template syntax directly inside markdown files. This enables dynamic content generation — conditionals, loops, computed values, and more — powered by the STX templating engine.
124
+
125
+ ### Server Scripts
126
+
127
+ Define variables and logic in `<script server>` blocks:
128
+
129
+ ```markdown
130
+ <script server>
131
+ const features = [
132
+ { name: 'Fast', desc: 'Built with Zig for maximum performance' },
133
+ { name: 'Modern', desc: 'ES modules and TypeScript native' },
134
+ { name: 'Simple', desc: 'Zero config, one binary' },
135
+ ]
136
+ const showBeta = false
137
+ </script>
138
+
139
+ # Features
140
+
141
+ @foreach (features as feature)
142
+ ### {{ feature.name }}
143
+
144
+ {{ feature.desc }}
145
+
146
+ @endforeach
147
+
148
+ @if (showBeta)
149
+ ## Beta Features
150
+
151
+ These features are coming soon.
152
+ @endif
153
+ ```
154
+
155
+ ### Available Directives
156
+
157
+ | Directive | Description |
158
+ |-----------|------------|
159
+ | `<script server>` | Define variables and run server-side logic |
160
+ | `{{ expression }}` | Output an escaped expression |
161
+ | `{!! expression !!}` | Output raw (unescaped) HTML |
162
+ | `@if (condition)` / `@else` / `@endif` | Conditional rendering |
163
+ | `@foreach (array as item)` / `@endforeach` | Iterate over arrays |
164
+ | `@foreach (array as item, index)` | Iterate with index |
165
+ | `@for (let i = 0; i < n; i++)` / `@endfor` | C-style for loops |
166
+ | `@include('Component')` | Include STX components |
167
+
168
+ ### Frontmatter Access
169
+
170
+ Frontmatter values are automatically available in STX expressions:
171
+
172
+ ```markdown
173
+ ---
174
+ title: My Page
175
+ author: Chris
176
+ ---
177
+
178
+ # {{ title }}
179
+
180
+ Written by {{ author }}.
181
+ ```
182
+
183
+ ### Inline Expressions
184
+
185
+ Use expressions anywhere in your markdown:
186
+
187
+ ```markdown
188
+ <script server>
189
+ const count = 42
190
+ const items = ['Alpha', 'Beta', 'Gamma']
191
+ </script>
192
+
193
+ There are {{ count }} items and {{ items.length }} categories.
194
+ The sum is {{ 10 + 20 + 12 }}.
195
+ ```
196
+
197
+ STX processing happens before markdown conversion, so the output of STX directives is treated as regular markdown and rendered accordingly — headings, lists, bold, code blocks, and all other markdown features work as expected.
198
+
199
+ ## CLI Commands
200
+
201
+ BunPress provides a comprehensive CLI for managing your documentation:
202
+
203
+ ```bash
204
+ # Development
205
+ bunpress dev # Start dev server with hot reload
206
+ bunpress build # Build for production
207
+ bunpress preview # Preview production build
208
+
209
+ # Content Management
210
+ bunpress new <path> # Create new markdown file
211
+ bunpress init # Initialize new project
212
+
213
+ # Maintenance
214
+ bunpress clean # Remove build artifacts
215
+ bunpress stats # Show documentation statistics
216
+ bunpress doctor # Run diagnostic checks
217
+
218
+ # SEO
219
+ bunpress seo:check # Check SEO for all pages
220
+ bunpress seo:check --fix # Auto-fix SEO issues
221
+
222
+ # Configuration
223
+ bunpress config:show # Show current configuration
224
+ bunpress config:validate # Validate configuration
225
+ ```
226
+
227
+ ## Performance Benchmarks
228
+
229
+ BunPress is **the fastest** documentation generator available, powered by Bun's built-in Zig-based markdown parser.
230
+
231
+ ### Markdown Engine Benchmarks
232
+
233
+ Real benchmark results comparing BunPress against documentation frameworks and popular markdown engines. All engines configured with equivalent GFM features (tables, strikethrough, task lists, autolinks). Tested on Apple M3 Pro, 18GB RAM, Bun 1.3.10.
234
+
235
+ > **Fairness note:** These results are conservative. Real VitePress adds Shiki syntax highlighting + Vue plugins on top of markdown-it. Real Astro adds Shiki on top of remark/rehype. commonmark.js does not support GFM, so it processes fewer features and appears artificially fast.
236
+
237
+ #### Simple Markdown (paragraph + inline formatting)
238
+
239
+ | Engine | Avg Time | vs BunPress |
240
+ |--------|---------|-------------|
241
+ | **BunPress** | **2.09 µs** | - |
242
+ | commonmark (no GFM) | 3.91 µs | 1.9x slower |
243
+ | Eleventy | 4.93 µs | 2.4x slower |
244
+ | VitePress | 7.87 µs | 3.8x slower |
245
+ | marked | 29.67 µs | 14x slower |
246
+ | showdown | 32.48 µs | 16x slower |
247
+ | micromark | 120.10 µs | 57x slower |
248
+ | Astro | 126.36 µs | 60x slower |
249
+
250
+ #### Real-World Doc Page (~3KB markdown)
251
+
252
+ | Engine | Avg Time | vs BunPress |
253
+ |--------|---------|-------------|
254
+ | **BunPress** | **28.60 µs** | - |
255
+ | commonmark (no GFM) | 101.47 µs | 3.5x slower |
256
+ | Eleventy | 124.67 µs | 4.4x slower |
257
+ | VitePress | 178.68 µs | 6.2x slower |
258
+ | showdown | 791.29 µs | 28x slower |
259
+ | marked | 841.17 µs | 29x slower |
260
+ | micromark | 2.03 ms | 71x slower |
261
+ | Astro | 2.56 ms | 90x slower |
262
+
263
+ #### Large Document Stress Test (~33KB markdown)
264
+
265
+ | Engine | Avg Time | vs BunPress |
266
+ |--------|---------|-------------|
267
+ | **BunPress** | **204.97 µs** | - |
268
+ | commonmark (no GFM) | 1.01 ms | 4.9x slower |
269
+ | Eleventy | 1.07 ms | 5.2x slower |
270
+ | VitePress | 1.40 ms | 6.8x slower |
271
+ | showdown | 12.76 ms | 62x slower |
272
+ | micromark | 21.61 ms | 105x slower |
273
+ | Astro | 26.56 ms | 130x slower |
274
+ | marked | 47.41 ms | 231x slower |
275
+
276
+ #### Throughput: 100 Mixed Documents
277
+
278
+ | Engine | Avg Time | vs BunPress |
279
+ |--------|---------|-------------|
280
+ | **BunPress** | **827.40 µs** | - |
281
+ | commonmark (no GFM) | 3.45 ms | 4.2x slower |
282
+ | Eleventy | 3.80 ms | 4.6x slower |
283
+ | VitePress | 4.85 ms | 5.9x slower |
284
+ | marked | 17.43 ms | 21x slower |
285
+ | showdown | 25.29 ms | 31x slower |
286
+ | micromark | 72.79 ms | 88x slower |
287
+ | Astro | 84.95 ms | 103x slower |
288
+
289
+ ### Build Performance (4,000 markdown files)
290
+
291
+ Using the same methodology as [11ty's official performance tests](https://www.11ty.dev/docs/performance/):
292
+
293
+ | Generator | Build Time | vs BunPress |
294
+ |-----------|-----------|-------------|
295
+ | **BunPress** | **0.18s** | - |
296
+ | Eleventy | 1.93s | 11x slower |
297
+ | VitePress | 8.50s | 47x slower |
298
+ | Astro | 22.90s | 130x slower |
299
+ | Gatsby | 29.05s | 165x slower |
300
+ | Next.js | 70.65s | 401x slower |
301
+
302
+ ### Full-Featured Build (with syntax highlighting)
303
+
304
+ | Generator | Build Time | vs BunPress |
305
+ |-----------|-----------|-------------|
306
+ | **BunPress** | **4.12s** | - |
307
+ | VitePress | 8.50s | 2x slower |
308
+ | Astro | 22.90s | 5.6x slower |
309
+ | Gatsby | 29.05s | 7x slower |
310
+ | Next.js | 70.65s | 17x slower |
311
+
312
+ Run the benchmarks yourself:
313
+
314
+ ```bash
315
+ cd benchmark && bun install && bun run bench
316
+ ```
317
+
90
318
  ## Testing
91
319
 
92
320
  ```bash
93
- bun test
321
+ bun test # Run all tests
322
+ bun test:quick # Quick test run (10s timeout)
323
+ bun run typecheck # Type checking
324
+ bun run lint # Lint code
94
325
  ```
95
326
 
96
327
  ## Changelog
97
328
 
98
- Please see our [releases](https://github.com/stackjs/bun-ts-starter/releases) page for more information on what has changed recently.
329
+ Please see our [releases](https://github.com/stacksjs/bunpress/releases) page for more information on what has changed recently.
99
330
 
100
331
  ## Contributing
101
332
 
@@ -105,7 +336,7 @@ Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
105
336
 
106
337
  For help, discussion about best practices, or any other conversation that would benefit from being searchable:
107
338
 
108
- [Discussions on GitHub](https://github.com/stacksjs/ts-starter/discussions)
339
+ [Discussions on GitHub](https://github.com/stacksjs/bunpress/discussions)
109
340
 
110
341
  For casual chit-chat with others using this package:
111
342
 
@@ -131,10 +362,10 @@ The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
131
362
  Made with 💙
132
363
 
133
364
  <!-- Badges -->
134
- [npm-version-src]: https://img.shields.io/npm/v/bun-ts-starter?style=flat-square
135
- [npm-version-href]: https://npmjs.com/package/bun-ts-starter
136
- [github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/ts-starter/ci.yml?style=flat-square&branch=main
137
- [github-actions-href]: https://github.com/stacksjs/ts-starter/actions?query=workflow%3Aci
365
+ [npm-version-src]: https://img.shields.io/npm/v/@stacksjs/bunpress?style=flat-square
366
+ [npm-version-href]: https://npmjs.com/package/@stacksjs/bunpress
367
+ [github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/bunpress/ci.yml?style=flat-square&branch=main
368
+ [github-actions-href]: https://github.com/stacksjs/bunpress/actions?query=workflow%3Aci
138
369
 
139
- <!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/ts-starter/main?style=flat-square
140
- [codecov-href]: https://codecov.io/gh/stacksjs/ts-starter -->
370
+ <!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/bunpress/main?style=flat-square
371
+ [codecov-href]: https://codecov.io/gh/stacksjs/bunpress -->
package/dist/bin/cli.js CHANGED
@@ -1,105 +1,3 @@
1
+ #!/usr/bin/env bun
1
2
  // @bun
2
- import{C as L0,b as i}from"../chunk-he6c5f4e.js";var{Glob:M0}=globalThis.Bun;import{copyFile as b6,mkdir as N0,readdir as I6}from"fs/promises";import{join as R}from"path";import O0 from"process";import{EventEmitter as A0}from"events";import t from"process";import m from"process";import C from"process";import m0,{stdin as d6,stdout as u6}from"process";import Q0,{stdin as n0,stdout as a0}from"process";import c0 from"readline";var{create:T0,getPrototypeOf:w0,defineProperty:e,getOwnPropertyNames:P0}=Object,b0=Object.prototype.hasOwnProperty,L=(Z,$,Q)=>{Q=Z!=null?T0(w0(Z)):{};let z=$||!Z||!Z.__esModule?e(Q,"default",{value:Z,enumerable:!0}):Q;for(let J of P0(Z))if(!b0.call(z,J))e(z,J,{get:()=>Z[J],enumerable:!0});return z},x=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports),I0=x((Z,$)=>{function Q(J){return J==null?[]:Array.isArray(J)?J:[J]}function z(J,Y,X,j){var q,G=J[Y],U=~j.string.indexOf(Y)?X==null||X===!0?"":String(X):typeof X==="boolean"?X:~j.boolean.indexOf(Y)?X==="false"?!1:X==="true"||(J._.push((q=+X,q*0===0)?q:X),!!X):(q=+X,q*0===0)?q:X;J[Y]=G==null?U:Array.isArray(G)?G.concat(U):[G,U]}$.exports=function(J,Y){J=J||[],Y=Y||{};var X,j,q,G,U,K={_:[]},H=0,V=0,F=0,w=J.length;let f=Y.alias!==void 0,S=Y.unknown!==void 0,r=Y.default!==void 0;if(Y.alias=Y.alias||{},Y.string=Q(Y.string),Y.boolean=Q(Y.boolean),f)for(X in Y.alias){j=Y.alias[X]=Q(Y.alias[X]);for(H=0;H<j.length;H++)(Y.alias[j[H]]=j.concat(X)).splice(H,1)}for(H=Y.boolean.length;H-- >0;){j=Y.alias[Y.boolean[H]]||[];for(V=j.length;V-- >0;)Y.boolean.push(j[V])}for(H=Y.string.length;H-- >0;){j=Y.alias[Y.string[H]]||[];for(V=j.length;V-- >0;)Y.string.push(j[V])}if(r){for(X in Y.default)if(G=typeof Y.default[X],j=Y.alias[X]=Y.alias[X]||[],Y[G]!==void 0){Y[G].push(X);for(H=0;H<j.length;H++)Y[G].push(j[H])}}let s=S?Object.keys(Y.alias):[];for(H=0;H<w;H++){if(q=J[H],q==="--"){K._=K._.concat(J.slice(++H));break}for(V=0;V<q.length;V++)if(q.charCodeAt(V)!==45)break;if(V===0)K._.push(q);else if(q.substring(V,V+3)==="no-"){if(G=q.substring(V+3),S&&!~s.indexOf(G))return Y.unknown(q);K[G]=!1}else{for(F=V+1;F<q.length;F++)if(q.charCodeAt(F)===61)break;G=q.substring(V,F),U=q.substring(++F)||(H+1===w||(""+J[H+1]).charCodeAt(0)===45||J[++H]),j=V===2?[G]:G;for(F=0;F<j.length;F++){if(G=j[F],S&&!~s.indexOf(G))return Y.unknown("-".repeat(V)+G);z(K,G,F+1<j.length||U,Y)}}}if(r){for(X in Y.default)if(K[X]===void 0)K[X]=Y.default[X]}if(f)for(X in K){j=Y.alias[X]||[];while(j.length>0)K[j.shift()]=K[X]}return K}}),N=x((Z,$)=>{var Q=process||{},z=Q.argv||[],J=Q.env||{},Y=!(!!J.NO_COLOR||z.includes("--no-color"))&&(!!J.FORCE_COLOR||z.includes("--color")||Q.platform==="win32"||(Q.stdout||{}).isTTY&&J.TERM!=="dumb"||!!J.CI),X=(G,U,K=G)=>(H)=>{let V=""+H,F=V.indexOf(U,G.length);return~F?G+j(V,U,K,F)+U:G+V+U},j=(G,U,K,H)=>{let V="",F=0;do V+=G.substring(F,H)+K,F=H+U.length,H=G.indexOf(U,F);while(~H);return V+G.substring(F)},q=(G=Y)=>{let U=G?X:()=>String;return{isColorSupported:G,reset:U("\x1B[0m","\x1B[0m"),bold:U("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:U("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:U("\x1B[3m","\x1B[23m"),underline:U("\x1B[4m","\x1B[24m"),inverse:U("\x1B[7m","\x1B[27m"),hidden:U("\x1B[8m","\x1B[28m"),strikethrough:U("\x1B[9m","\x1B[29m"),black:U("\x1B[30m","\x1B[39m"),red:U("\x1B[31m","\x1B[39m"),green:U("\x1B[32m","\x1B[39m"),yellow:U("\x1B[33m","\x1B[39m"),blue:U("\x1B[34m","\x1B[39m"),magenta:U("\x1B[35m","\x1B[39m"),cyan:U("\x1B[36m","\x1B[39m"),white:U("\x1B[37m","\x1B[39m"),gray:U("\x1B[90m","\x1B[39m"),bgBlack:U("\x1B[40m","\x1B[49m"),bgRed:U("\x1B[41m","\x1B[49m"),bgGreen:U("\x1B[42m","\x1B[49m"),bgYellow:U("\x1B[43m","\x1B[49m"),bgBlue:U("\x1B[44m","\x1B[49m"),bgMagenta:U("\x1B[45m","\x1B[49m"),bgCyan:U("\x1B[46m","\x1B[49m"),bgWhite:U("\x1B[47m","\x1B[49m"),blackBright:U("\x1B[90m","\x1B[39m"),redBright:U("\x1B[91m","\x1B[39m"),greenBright:U("\x1B[92m","\x1B[39m"),yellowBright:U("\x1B[93m","\x1B[39m"),blueBright:U("\x1B[94m","\x1B[39m"),magentaBright:U("\x1B[95m","\x1B[39m"),cyanBright:U("\x1B[96m","\x1B[39m"),whiteBright:U("\x1B[97m","\x1B[39m"),bgBlackBright:U("\x1B[100m","\x1B[49m"),bgRedBright:U("\x1B[101m","\x1B[49m"),bgGreenBright:U("\x1B[102m","\x1B[49m"),bgYellowBright:U("\x1B[103m","\x1B[49m"),bgBlueBright:U("\x1B[104m","\x1B[49m"),bgMagentaBright:U("\x1B[105m","\x1B[49m"),bgCyanBright:U("\x1B[106m","\x1B[49m"),bgWhiteBright:U("\x1B[107m","\x1B[49m")}};$.exports=q(),$.exports.createColors=q}),R0=x((Z,$)=>{$.exports=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}}),E0=L(I0(),1);function q0(Z){return Z.replace(/[<[].+/,"").trim()}function C0(Z){let $=/<([^>]+)>/g,Q=/\[([^\]]+)\]/g,z=[],J=(j)=>{let q=!1,G=j[1];if(G.startsWith("..."))G=G.slice(3),q=!0;return{required:j[0].startsWith("<"),value:G,variadic:q}},Y;while(Y=$.exec(Z))z.push(J(Y));let X;while(X=Q.exec(Z))z.push(J(X));return z}function k0(Z){let $={alias:{},boolean:[]};for(let[Q,z]of Z.entries()){if(z.names.length>1)$.alias[z.names[0]]=z.names.slice(1);if(z.isBoolean)if(z.negated){if(!Z.some((Y,X)=>{return X!==Q&&Y.names.some((j)=>z.names.includes(j))&&typeof Y.required==="boolean"}))$.boolean.push(z.names[0])}else $.boolean.push(z.names[0])}return $}function o(Z){return Z.sort(($,Q)=>{return $.length>Q.length?-1:1})[0]}function Z0(Z,$){return Z.length>=$?Z:`${Z}${" ".repeat($-Z.length)}`}function h0(Z){return Z.replace(/([a-z])-([a-z])/g,($,Q,z)=>{return Q+z.toUpperCase()})}function y0(Z,$,Q){let z=0,J=$.length,Y=Z,X;for(;z<J;++z)X=Y[$[z]],Y=Y[$[z]]=z===J-1?Q:X!=null?X:!!~$[z+1].indexOf(".")||!(+$[z+1]>-1)?{}:[]}function v0(Z,$){for(let Q of Object.keys($)){let z=$[Q];if(z.shouldTransform){if(Z[Q]=Array.prototype.concat.call([],Z[Q]),typeof z.transformFunction==="function")Z[Q]=Z[Q].map(z.transformFunction)}}}function f0(Z){let $=/([^\\/]+)$/.exec(Z);return $?$[1]:""}function G0(Z){return Z.split(".").map(($,Q)=>{return Q===0?h0($):$}).join(".")}class A extends Error{constructor(Z){super(Z);if(this.name=this.constructor.name,typeof Error.captureStackTrace==="function")Error.captureStackTrace(this,this.constructor);else this.stack=Error(Z).stack}}function S0(){let{env:Z}=t,{TERM:$,TERM_PROGRAM:Q}=Z;if(t.platform!=="win32")return $!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||Q==="Terminus-Sublime"||Q==="vscode"||$==="xterm-256color"||$==="alacritty"||$==="rxvt-unicode"||$==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var h="\x1B",M=`${h}[`;var B={to(Z,$){if(!$)return`${M}${Z+1}G`;return`${M}${$+1};${Z+1}H`},move(Z,$){let Q="";if(Z<0)Q+=`${M}${-Z}D`;else if(Z>0)Q+=`${M}${Z}C`;if($<0)Q+=`${M}${-$}A`;else if($>0)Q+=`${M}${$}B`;return Q},up:(Z=1)=>`${M}${Z}A`,down:(Z=1)=>`${M}${Z}B`,forward:(Z=1)=>`${M}${Z}C`,backward:(Z=1)=>`${M}${Z}D`,nextLine:(Z=1)=>`${M}E`.repeat(Z),prevLine:(Z=1)=>`${M}F`.repeat(Z),left:`${M}G`,hide:`${M}?25l`,show:`${M}?25h`,save:`${h}7`,restore:`${h}8`};var g={screen:`${M}2J`,up:(Z=1)=>`${M}1J`.repeat(Z),down:(Z=1)=>`${M}J`.repeat(Z),line:`${M}2K`,lineEnd:`${M}K`,lineStart:`${M}1K`,lines(Z){let $="";for(let Q=0;Q<Z;Q++)$+=this.line+(Q<Z-1?B.up():"");if(Z)$+=B.left;return $}},y6={screen:`${h}c`};class K0{rawName;description;name;names;isBoolean;required;config;negated;constructor(Z,$,Q){if(this.rawName=Z,this.description=$,this.config=Object.assign({},Q),Z=Z.replace(/\.\*/g,""),this.negated=!1,this.names=q0(Z).split(",").map((z)=>{let J=z.trim().replace(/^-{1,2}/,"");if(J.startsWith("no-"))this.negated=!0,J=J.replace(/^no-/,"");return G0(J)}).sort((z,J)=>z.length>J.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null)this.config.default=!0;if(Z.includes("<"))this.required=!0;else if(Z.includes("["))this.required=!1;else this.isBoolean=!0}}var f6=m.argv,g0=`${m.platform}-${m.arch} bun-v${typeof Bun<"u"?Bun.version:"unknown"}`,_0=C.argv,d0=`${C.platform}-${C.arch} node-${C.version}`;class l{rawName;description;config;cli;options;aliasNames;name;args;commandAction;usageText;versionNumber;examples;helpCallback;globalCommand;constructor(Z,$,Q,z){if(this.rawName=Z,this.description=$,this.config=Q,this.cli=z,this.options=[],this.aliasNames=[],this.name=q0(Z),this.args=C0(Z),this.examples=[],!Q)this.config={}}usage(Z){return this.usageText=Z,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(Z,$="-v, --version"){return this.versionNumber=Z,this.option($,"Display version number"),this}example(Z){return this.examples.push(Z),this}option(Z,$,Q){let z=new K0(Z,$,Q);return this.options.push(z),this}alias(Z){return this.aliasNames.push(Z),this}action(Z){return this.commandAction=Z,this}isMatched(Z){return this.name===Z||this.aliasNames.includes(Z)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof n}hasOption(Z){return Z=Z.split(".")[0],!!this.options.find(($)=>{return $.names.includes(Z)})}outputHelp(){let{name:Z,commands:$}=this.cli,{versionNumber:Q,options:z,helpCallback:J}=this.cli.globalCommand,Y=[{body:`${Z}${Q?`/${Q}`:""}`}];if(Y.push({title:"Usage",body:` $ ${Z} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&$.length>0){let q=o($.map((G)=>G.rawName));Y.push({title:"Commands",body:$.map((G)=>{return` ${Z0(G.rawName,q.length)} ${G.description}`}).join(`
3
- `)}),Y.push({title:"For more info, run any command with the `--help` flag",body:$.map((G)=>` $ ${Z}${G.name===""?"":` ${G.name}`} --help`).join(`
4
- `)})}let j=this.isGlobalCommand?z:[...this.options,...z||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand)j=j.filter((q)=>q.name!=="version");if(j.length>0){let q=o(j.map((G)=>G.rawName));Y.push({title:"Options",body:j.map((G)=>{return` ${Z0(G.rawName,q.length)} ${G.description} ${G.config.default===void 0?"":`(default: ${G.config.default})`}`}).join(`
5
- `)})}if(this.examples.length>0)Y.push({title:"Examples",body:this.examples.map((q)=>{if(typeof q==="function")return q(Z);return q}).join(`
6
- `)});if(J)Y=J(Y)||Y;console.log(Y.map((q)=>{return q.title?`${q.title}:
7
- ${q.body}`:q.body}).join(`
8
-
9
- `))}outputVersion(){let{name:Z}=this.cli,{versionNumber:$}=this.cli.globalCommand;if($){let Q;if(Bun)Q=g0;else Q=d0;console.log(`${Z}/${$} ${Q}`)}}checkRequiredArgs(){let Z=this.args.filter(($)=>$.required).length;if(this.cli.args.length<Z)throw new A(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:Z,globalCommand:$}=this.cli;if(!this.config.allowUnknownOptions){for(let Q of Object.keys(Z))if(Q!=="--"&&!this.hasOption(Q)&&!$.hasOption(Q))throw new A(`Unknown option \`${Q.length>1?`--${Q}`:`-${Q}`}\``)}}checkOptionValue(){let{options:Z,globalCommand:$}=this.cli,Q=[...$.options,...this.options];for(let z of Q){let J=Z[z.name.split(".")[0]];if(z.required){let Y=Q.some((X)=>X.negated&&X.names.includes(z.name));if(J===!0||J===!1&&!Y)throw new A(`option \`${z.rawName}\` value is missing`)}}}}class n extends l{constructor(Z){super("@@global@@","",{},Z)}}var u0=l;class a extends A0{name;commands;globalCommand;matchedCommand;matchedCommandName;rawArgs;args;options;showHelpOnExit;showVersionOnExit;constructor(Z=""){super();this.name=Z,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new n(this),this.globalCommand.usage("<command> [options]")}usage(Z){return this.globalCommand.usage(Z),this}command(Z,$,Q){if(!Q)Q={};let z=new u0(Z,$||"",Q,this);return z.globalCommand=this.globalCommand,this.commands.push(z),z}option(Z,$,Q){return this.globalCommand.option(Z,$,Q),this}help(Z){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=Z,this.showHelpOnExit=!0,this}version(Z,$="-v, --version"){return this.globalCommand.version(Z,$),this.showVersionOnExit=!0,this}example(Z){return this.globalCommand.example(Z),this}outputHelp(){if(this.matchedCommand)this.matchedCommand.outputHelp();else this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:Z,options:$},Q,z){if(this.args=Z,this.options=$,Q)this.matchedCommand=Q;if(z)this.matchedCommandName=z;return this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(Z=_0,{run:$=!0}={}){if(this.rawArgs=Z,!this.name)this.name=Z[1]?f0(Z[1]):"cli";let Q=!0;for(let J of this.commands){let Y=this.mri(Z.slice(2),J),X=Y.args[0];if(J.isMatched(X)){Q=!1;let j={...Y,args:Y.args.slice(1)};this.setParsedInfo(j,J,X),this.emit(`command:${X}`,J)}}if(Q){for(let J of this.commands)if(J.name===""){Q=!1;let Y=this.mri(Z.slice(2),J);this.setParsedInfo(Y,J),this.emit("command:!",J)}}if(Q){let J=this.mri(Z.slice(2));this.setParsedInfo(J)}if(this.options.help&&this.showHelpOnExit)this.outputHelp(),$=!1,this.unsetMatchedCommand();if(this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null)this.outputVersion(),$=!1,this.unsetMatchedCommand();let z={args:this.args,options:this.options};if($)this.runMatchedCommand();if(!this.matchedCommand&&this.args[0])this.emit("command:*");return z}mri(Z,$){let Q=[...this.globalCommand.options,...$?$.options:[]],z=k0(Q),J=[],Y=Z.indexOf("--");if(Y>-1)J=Z.slice(Y+1),Z=Z.slice(0,Y);let X=E0.default(Z,z);X=Object.keys(X).reduce((K,H)=>{return{...K,[G0(H)]:X[H]}},{_:[]});let j=X._,q={"--":J},G=$&&$.config.ignoreOptionDefaultValue?$.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,U=Object.create(null);for(let K of Q){if(!G&&K.config.default!==void 0)for(let H of K.names)q[H]=K.config.default;if(Array.isArray(K.config.type)){if(U[K.name]===void 0)U[K.name]=Object.create(null),U[K.name].shouldTransform=!0,U[K.name].transformFunction=K.config.type[0]}}for(let K of Object.keys(X))if(K!=="_"){let H=K.split(".");y0(q,H,X[K]),v0(q,U)}return{args:j,options:q}}runMatchedCommand(){let{args:Z,options:$,matchedCommand:Q}=this;if(!Q||!Q.commandAction)return;Q.checkUnknownOptions(),Q.checkOptionValue(),Q.checkRequiredArgs();let z=[];return Q.args.forEach((J,Y)=>{if(J.variadic)z.push(Z.slice(Y));else z.push(Z[Y])}),z.push($),Q.commandAction.apply(this,z)}}var g6=L(N(),1),x0=["up","down","left","right","space","enter","cancel"],k={actions:new Set(x0),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"}};function H0(Z,$){if(typeof Z==="string")return k.aliases.get(Z)===$;for(let Q of Z){if(Q===void 0)continue;if(H0(Q,$))return!0}return!1}function l0(Z,$){if(Z===$)return[];let Q=Z.split(`
10
- `),z=$.split(`
11
- `),J=[];for(let Y=0;Y<Math.max(Q.length,z.length);Y++)if(Q[Y]!==z[Y])J.push(Y);return J}var m6=m0.platform.startsWith("win"),$0=Symbol("clapp:cancel");function E(Z,$){let Q=Z;if(Q.isTTY)Q.setRawMode($)}var _=L(N(),1);function p0({onlyFirst:Z=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",Z?void 0:"g")}var i0=p0();function V0(Z){if(typeof Z!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof Z}\``);return Z.replace(i0,"")}function r0(Z){return Z===161||Z===164||Z===167||Z===168||Z===170||Z===173||Z===174||Z>=176&&Z<=180||Z>=182&&Z<=186||Z>=188&&Z<=191||Z===198||Z===208||Z===215||Z===216||Z>=222&&Z<=225||Z===230||Z>=232&&Z<=234||Z===236||Z===237||Z===240||Z===242||Z===243||Z>=247&&Z<=250||Z===252||Z===254||Z===257||Z===273||Z===275||Z===283||Z===294||Z===295||Z===299||Z>=305&&Z<=307||Z===312||Z>=319&&Z<=322||Z===324||Z>=328&&Z<=331||Z===333||Z===338||Z===339||Z===358||Z===359||Z===363||Z===462||Z===464||Z===466||Z===468||Z===470||Z===472||Z===474||Z===476||Z===593||Z===609||Z===708||Z===711||Z>=713&&Z<=715||Z===717||Z===720||Z>=728&&Z<=731||Z===733||Z===735||Z>=768&&Z<=879||Z>=913&&Z<=929||Z>=931&&Z<=937||Z>=945&&Z<=961||Z>=963&&Z<=969||Z===1025||Z>=1040&&Z<=1103||Z===1105||Z===8208||Z>=8211&&Z<=8214||Z===8216||Z===8217||Z===8220||Z===8221||Z>=8224&&Z<=8226||Z>=8228&&Z<=8231||Z===8240||Z===8242||Z===8243||Z===8245||Z===8251||Z===8254||Z===8308||Z===8319||Z>=8321&&Z<=8324||Z===8364||Z===8451||Z===8453||Z===8457||Z===8467||Z===8470||Z===8481||Z===8482||Z===8486||Z===8491||Z===8531||Z===8532||Z>=8539&&Z<=8542||Z>=8544&&Z<=8555||Z>=8560&&Z<=8569||Z===8585||Z>=8592&&Z<=8601||Z===8632||Z===8633||Z===8658||Z===8660||Z===8679||Z===8704||Z===8706||Z===8707||Z===8711||Z===8712||Z===8715||Z===8719||Z===8721||Z===8725||Z===8730||Z>=8733&&Z<=8736||Z===8739||Z===8741||Z>=8743&&Z<=8748||Z===8750||Z>=8756&&Z<=8759||Z===8764||Z===8765||Z===8776||Z===8780||Z===8786||Z===8800||Z===8801||Z>=8804&&Z<=8807||Z===8810||Z===8811||Z===8814||Z===8815||Z===8834||Z===8835||Z===8838||Z===8839||Z===8853||Z===8857||Z===8869||Z===8895||Z===8978||Z>=9312&&Z<=9449||Z>=9451&&Z<=9547||Z>=9552&&Z<=9587||Z>=9600&&Z<=9615||Z>=9618&&Z<=9621||Z===9632||Z===9633||Z>=9635&&Z<=9641||Z===9650||Z===9651||Z===9654||Z===9655||Z===9660||Z===9661||Z===9664||Z===9665||Z>=9670&&Z<=9672||Z===9675||Z>=9678&&Z<=9681||Z>=9698&&Z<=9701||Z===9711||Z===9733||Z===9734||Z===9737||Z===9742||Z===9743||Z===9756||Z===9758||Z===9792||Z===9794||Z===9824||Z===9825||Z>=9827&&Z<=9829||Z>=9831&&Z<=9834||Z===9836||Z===9837||Z===9839||Z===9886||Z===9887||Z===9919||Z>=9926&&Z<=9933||Z>=9935&&Z<=9939||Z>=9941&&Z<=9953||Z===9955||Z===9960||Z===9961||Z>=9963&&Z<=9969||Z===9972||Z>=9974&&Z<=9977||Z===9979||Z===9980||Z===9982||Z===9983||Z===10045||Z>=10102&&Z<=10111||Z>=11094&&Z<=11097||Z>=12872&&Z<=12879||Z>=57344&&Z<=63743||Z>=65024&&Z<=65039||Z===65533||Z>=127232&&Z<=127242||Z>=127248&&Z<=127277||Z>=127280&&Z<=127337||Z>=127344&&Z<=127373||Z===127375||Z===127376||Z>=127387&&Z<=127404||Z>=917760&&Z<=917999||Z>=983040&&Z<=1048573||Z>=1048576&&Z<=1114109}function s0(Z){return Z===12288||Z>=65281&&Z<=65376||Z>=65504&&Z<=65510}function e0(Z){return Z>=4352&&Z<=4447||Z===8986||Z===8987||Z===9001||Z===9002||Z>=9193&&Z<=9196||Z===9200||Z===9203||Z===9725||Z===9726||Z===9748||Z===9749||Z>=9776&&Z<=9783||Z>=9800&&Z<=9811||Z===9855||Z>=9866&&Z<=9871||Z===9875||Z===9889||Z===9898||Z===9899||Z===9917||Z===9918||Z===9924||Z===9925||Z===9934||Z===9940||Z===9962||Z===9970||Z===9971||Z===9973||Z===9978||Z===9981||Z===9989||Z===9994||Z===9995||Z===10024||Z===10060||Z===10062||Z>=10067&&Z<=10069||Z===10071||Z>=10133&&Z<=10135||Z===10160||Z===10175||Z===11035||Z===11036||Z===11088||Z===11093||Z>=11904&&Z<=11929||Z>=11931&&Z<=12019||Z>=12032&&Z<=12245||Z>=12272&&Z<=12287||Z>=12289&&Z<=12350||Z>=12353&&Z<=12438||Z>=12441&&Z<=12543||Z>=12549&&Z<=12591||Z>=12593&&Z<=12686||Z>=12688&&Z<=12773||Z>=12783&&Z<=12830||Z>=12832&&Z<=12871||Z>=12880&&Z<=42124||Z>=42128&&Z<=42182||Z>=43360&&Z<=43388||Z>=44032&&Z<=55203||Z>=63744&&Z<=64255||Z>=65040&&Z<=65049||Z>=65072&&Z<=65106||Z>=65108&&Z<=65126||Z>=65128&&Z<=65131||Z>=94176&&Z<=94180||Z===94192||Z===94193||Z>=94208&&Z<=100343||Z>=100352&&Z<=101589||Z>=101631&&Z<=101640||Z>=110576&&Z<=110579||Z>=110581&&Z<=110587||Z===110589||Z===110590||Z>=110592&&Z<=110882||Z===110898||Z>=110928&&Z<=110930||Z===110933||Z>=110948&&Z<=110951||Z>=110960&&Z<=111355||Z>=119552&&Z<=119638||Z>=119648&&Z<=119670||Z===126980||Z===127183||Z===127374||Z>=127377&&Z<=127386||Z>=127488&&Z<=127490||Z>=127504&&Z<=127547||Z>=127552&&Z<=127560||Z===127568||Z===127569||Z>=127584&&Z<=127589||Z>=127744&&Z<=127776||Z>=127789&&Z<=127797||Z>=127799&&Z<=127868||Z>=127870&&Z<=127891||Z>=127904&&Z<=127946||Z>=127951&&Z<=127955||Z>=127968&&Z<=127984||Z===127988||Z>=127992&&Z<=128062||Z===128064||Z>=128066&&Z<=128252||Z>=128255&&Z<=128317||Z>=128331&&Z<=128334||Z>=128336&&Z<=128359||Z===128378||Z===128405||Z===128406||Z===128420||Z>=128507&&Z<=128591||Z>=128640&&Z<=128709||Z===128716||Z>=128720&&Z<=128722||Z>=128725&&Z<=128727||Z>=128732&&Z<=128735||Z===128747||Z===128748||Z>=128756&&Z<=128764||Z>=128992&&Z<=129003||Z===129008||Z>=129292&&Z<=129338||Z>=129340&&Z<=129349||Z>=129351&&Z<=129535||Z>=129648&&Z<=129660||Z>=129664&&Z<=129673||Z>=129679&&Z<=129734||Z>=129742&&Z<=129756||Z>=129759&&Z<=129769||Z>=129776&&Z<=129784||Z>=131072&&Z<=196605||Z>=196608&&Z<=262141}function t0(Z){if(!Number.isSafeInteger(Z))throw TypeError(`Expected a code point, got \`${typeof Z}\`.`)}function o0(Z,{ambiguousAsWide:$=!1}={}){if(t0(Z),s0(Z)||e0(Z)||$&&r0(Z))return 2;return 1}var Z6=L(R0(),1),$6=new Intl.Segmenter,Q6=/^\p{Default_Ignorable_Code_Point}$/u;function I(Z,$={}){if(typeof Z!=="string"||Z.length===0)return 0;let{ambiguousIsNarrow:Q=!0,countAnsiEscapeCodes:z=!1}=$;if(!z)Z=V0(Z);if(Z.length===0)return 0;let J=0,Y={ambiguousAsWide:!Q};for(let{segment:X}of $6.segment(Z)){let j=X.codePointAt(0);if(j<=31||j>=127&&j<=159)continue;if(j>=8203&&j<=8207||j===65279)continue;if(j>=768&&j<=879||j>=6832&&j<=6911||j>=7616&&j<=7679||j>=8400&&j<=8447||j>=65056&&j<=65071)continue;if(j>=55296&&j<=57343)continue;if(j>=65024&&j<=65039)continue;if(Q6.test(X))continue;if(Z6.default().test(X)){J+=2;continue}J+=o0(j,Y)}return J}var d=10,z0=(Z=0)=>($)=>`\x1B[${$+Z}m`,J0=(Z=0)=>($)=>`\x1B[${38+Z};5;${$}m`,Y0=(Z=0)=>($,Q,z)=>`\x1B[${38+Z};2;${$};${Q};${z}m`,D={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},n6=Object.keys(D.modifier),z6=Object.keys(D.color),J6=Object.keys(D.bgColor),a6=[...z6,...J6];function Y6(){let Z=new Map;for(let[$,Q]of Object.entries(D)){for(let[z,J]of Object.entries(Q))D[z]={open:`\x1B[${J[0]}m`,close:`\x1B[${J[1]}m`},Q[z]=D[z],Z.set(J[0],J[1]);Object.defineProperty(D,$,{value:Q,enumerable:!1})}return Object.defineProperty(D,"codes",{value:Z,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=z0(),D.color.ansi256=J0(),D.color.ansi16m=Y0(),D.bgColor.ansi=z0(d),D.bgColor.ansi256=J0(d),D.bgColor.ansi16m=Y0(d),Object.defineProperties(D,{rgbToAnsi256:{value:($,Q,z)=>{if($===Q&&Q===z){if($<8)return 16;if($>248)return 231;return Math.round(($-8)/247*24)+232}return 16+36*Math.round($/255*5)+6*Math.round(Q/255*5)+Math.round(z/255*5)},enumerable:!1},hexToRgb:{value:($)=>{let Q=/[a-f\d]{6}|[a-f\d]{3}/i.exec($.toString(16));if(!Q)return[0,0,0];let[z]=Q;if(z.length===3)z=[...z].map((Y)=>Y+Y).join("");let J=Number.parseInt(z,16);return[J>>16&255,J>>8&255,J&255]},enumerable:!1},hexToAnsi256:{value:($)=>D.rgbToAnsi256(...D.hexToRgb($)),enumerable:!1},ansi256ToAnsi:{value:($)=>{if($<8)return 30+$;if($<16)return 90+($-8);let Q,z,J;if($>=232)Q=(($-232)*10+8)/255,z=Q,J=Q;else{$-=16;let j=$%36;Q=Math.floor($/36)/5,z=Math.floor(j/6)/5,J=j%6/5}let Y=Math.max(Q,z,J)*2;if(Y===0)return 30;let X=30+(Math.round(J)<<2|Math.round(z)<<1|Math.round(Q));if(Y===2)X+=60;return X},enumerable:!1},rgbToAnsi:{value:($,Q,z)=>D.ansi256ToAnsi(D.rgbToAnsi256($,Q,z)),enumerable:!1},hexToAnsi:{value:($)=>D.ansi256ToAnsi(D.hexToAnsi256($)),enumerable:!1}}),D}var X6=Y6(),j6=X6,v=new Set(["\x1B","\x9B"]),U6=39,c="\x07",F0="[",q6="]",D0="m",y=`${q6}8;;`,X0=(Z)=>`${v.values().next().value}${F0}${Z}${D0}`,j0=(Z)=>`${v.values().next().value}${y}${Z}${c}`,G6=(Z)=>Z.split(" ").map(($)=>I($)),u=(Z,$,Q)=>{let z=[...$],J=!1,Y=!1,X=I(V0(Z.at(-1)));for(let[j,q]of z.entries()){let G=I(q);if(X+G<=Q)Z[Z.length-1]+=q;else Z.push(q),X=0;if(v.has(q))J=!0,Y=z.slice(j+1,j+1+y.length).join("")===y;if(J){if(Y){if(q===c)J=!1,Y=!1}else if(q===D0)J=!1;continue}if(X+=G,X===Q&&j<z.length-1)Z.push(""),X=0}if(!X&&Z.at(-1).length>0&&Z.length>1)Z[Z.length-2]+=Z.pop()},K6=(Z)=>{let $=Z.split(" "),Q=$.length;while(Q>0){if(I($[Q-1])>0)break;Q--}if(Q===$.length)return Z;return $.slice(0,Q).join(" ")+$.slice(Q).join("")},H6=(Z,$,Q={})=>{if(Q.trim!==!1&&Z.trim()==="")return"";let z="",J,Y,X=G6(Z),j=[""];for(let[K,H]of Z.split(" ").entries()){if(Q.trim!==!1)j[j.length-1]=j.at(-1).trimStart();let V=I(j.at(-1));if(K!==0){if(V>=$&&(Q.wordWrap===!1||Q.trim===!1))j.push(""),V=0;if(V>0||Q.trim===!1)j[j.length-1]+=" ",V++}if(Q.hard&&X[K]>$){let F=$-V,w=1+Math.floor((X[K]-F-1)/$);if(Math.floor((X[K]-1)/$)<w)j.push("");u(j,H,$);continue}if(V+X[K]>$&&V>0&&X[K]>0){if(Q.wordWrap===!1&&V<$){u(j,H,$);continue}j.push("")}if(V+X[K]>$&&Q.wordWrap===!1){u(j,H,$);continue}j[j.length-1]+=H}if(Q.trim!==!1)j=j.map((K)=>K6(K));let q=j.join(`
12
- `),G=[...q],U=0;for(let[K,H]of G.entries()){if(z+=H,v.has(H)){let{groups:F}=new RegExp(`(?:\\${F0}(?<code>\\d+)m|\\${y}(?<uri>.*)${c})`).exec(q.slice(U))||{groups:{}};if(F.code!==void 0){let w=Number.parseFloat(F.code);J=w===U6?void 0:w}else if(F.uri!==void 0)Y=F.uri.length===0?void 0:F.uri}let V=j6.codes.get(Number(J));if(G[K+1]===`
13
- `){if(Y)z+=j0("");if(J&&V)z+=X0(V)}else if(H===`
14
- `){if(J&&V)z+=X0(J);if(Y)z+=j0(Y)}U+=H.length}return z};function U0(Z,$,Q){return String(Z).normalize().replaceAll(`\r
15
- `,`
16
- `).split(`
17
- `).map((z)=>H6(z,$,Q)).join(`
18
- `)}class p{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;_manualLine="";state="initial";error="";value;userInput="";constructor(Z,$=!0){let{input:Q=n0,output:z=a0,render:J,signal:Y,...X}=Z;this.opts=X,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=J.bind(this),this._track=$,this._abortSignal=Y,this.input=Q,this.output=z}unsubscribe(){this._subscribers.clear()}setSubscriber(Z,$){let Q=this._subscribers.get(Z)??[];Q.push($),this._subscribers.set(Z,Q)}on(Z,$){return this.setSubscriber(Z,{cb:$}),this}once(Z,$){return this.setSubscriber(Z,{cb:$,once:!0}),this}emit(Z,...$){let Q=this._subscribers.get(Z)??[],z=[];for(let J of Q)if(J.cb(...$),J.once)z.push(()=>Q.splice(Q.indexOf(J),1));for(let J of z)J();return this}prompt(){return new Promise((Z)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),Z($0);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}if(this.rl=c0.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0)this._setUserInput(this.opts.initialUserInput,!0);this.input.on("keypress",this.onKeypress),E(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(B.show),this.output.off("resize",this.render),E(this.input,!1),Z(this.value)}),this.once("cancel",()=>{this.output.write(B.show),this.output.off("resize",this.render),E(this.input,!1),Z($0)})})}_isActionKey(Z,$){return Z==="\t"}_setValue(Z){this.value=Z,this.emit("value",this.value)}_setUserInput(Z,$){if(this.userInput=Z??"",this.emit("userInput",this.userInput),$&&this._track&&this.rl)this.rl.write(this.userInput),this._cursor=this.rl.cursor}onKeypress(Z,$){if(this._track&&$.name!=="return"){if($.name&&this._isActionKey(Z,$))this.rl?.write(null,{ctrl:!0,name:"h"});this._cursor=this.rl?.cursor??0;let Q=$.name==="tab"||$.name==="escape"||$.name==="backspace"||$.name==="delete"||$.name==="enter"||$.name==="return"||$.name&&["up","down","left","right"].includes($.name);if(Z&&!Q&&Z.length===1&&Z>=" ")this._manualLine+=Z;else if($.name==="backspace"&&this._manualLine.length>0)this._manualLine=this._manualLine.slice(0,-1);let z=this._manualLine.length>=(this.rl?.line?.length||0)?this._manualLine:this.rl?.line;this._setUserInput(z)}if(this.state==="error")this.state="active",this.error="";if($?.name){if(!this._track&&k.aliases.has($.name))this.emit("cursor",k.aliases.get($.name));if(k.actions.has($.name))this.emit("cursor",$.name)}if(Z&&(Z.toLowerCase()==="y"||Z.toLowerCase()==="n"))this.emit("confirm",Z.toLowerCase()==="y");if(this.emit("key",Z?.toLowerCase(),$),$?.name==="return"){if(this.opts.validate){let Q=this.opts.validate(this.value);if(Q)this.error=Q instanceof Error?Q.message:Q,this.state="error"}if(this.state!=="error")this.state="submit"}if(H0([Z,$?.name,$?.sequence],"cancel"))this.state="cancel";if(this.state==="submit"||this.state==="cancel")this.emit("finalize");if(this.render(),this.state==="submit"||this.state==="cancel")this.close()}close(){if(this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
19
- `),E(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.state==="cancel")setTimeout(()=>{this.unsubscribe()},10);else this.unsubscribe()}restoreCursor(){let Z=U0(this._prevFrame,Q0.stdout.columns,{hard:!0,trim:!1}).split(`
20
- `).length-1;this.output.write(B.move(-999,Z*-1))}render(){let Z=U0(this._render(this)??"",Q0.stdout.columns,{hard:!0,trim:!1});if(Z===this._prevFrame)return;if(this.state==="initial")this.output.write(B.hide);else{let $=l0(this._prevFrame,Z);if(this.restoreCursor(),$&&$?.length===1){let Q=$[0];this.output.write(B.move(0,Q)),this.output.write(g.lines(1));let z=Z.split(`
21
- `);this.output.write(z[Q]),this._prevFrame=Z,this.output.write(B.move(0,z.length-Q-1));return}if($&&$?.length>1){let Q=$[0];this.output.write(B.move(0,Q)),this.output.write(g.down());let J=Z.split(`
22
- `).slice(Q);this.output.write(J.join(`
23
- `)),this._prevFrame=Z;return}this.output.write(g.down())}if(this.output.write(Z),this.state==="initial")this.state="active";this._prevFrame=Z}}function V6(Z,$){if(Z===void 0)return 0;if($.length===0)return 0;let z=$.findIndex((J)=>J.value===Z);return z!==-1?z:0}function F6(Z,$){return($.label??String($.value)).toLowerCase().includes(Z.toLowerCase())}function D6(Z,$){if(!$)return;if(Z)return $;return $[0]}class W6 extends p{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#Z=0;#Q="";#z;#$;get cursor(){return this.#Z}get userInputWithCursor(){if(!this.userInput)return _.default.inverse(_.default.hidden("_"));if(this._cursor>=this.userInput.length)return`${this.userInput}\u2588`;let Z=this.userInput.slice(0,this._cursor),[$,...Q]=this.userInput.slice(this._cursor);return`${Z}${_.default.inverse($)}${Q.join("")}`}get options(){if(typeof this.#$==="function")return this.#$();return this.#$}constructor(Z){super(Z);this.#$=Z.options;let $=this.options;this.filteredOptions=[...$],this.multiple=Z.multiple===!0,this.#z=Z.filter??F6;let Q;if(Z.initialValue&&Array.isArray(Z.initialValue))if(this.multiple)Q=Z.initialValue;else Q=Z.initialValue.slice(0,1);else if(!this.multiple&&this.options.length>0)Q=[this.options[0].value];if(Q)for(let z of Q){let J=$.findIndex((Y)=>Y.value===z);if(J!==-1)this.toggleSelected(z),this.#Z=J}this.focusedValue=this.options[this.#Z]?.value,this.on("key",(z,J)=>this.#J(z,J)),this.on("userInput",(z)=>this.#Y(z))}_isActionKey(Z,$){return Z==="\t"||this.multiple&&this.isNavigating&&$.name==="space"&&Z!==void 0&&Z!==""}#J(Z,$){let Q=$.name==="up",z=$.name==="down",J=$.name==="return";if(Q||z){if(this.#Z=Math.max(0,Math.min(this.#Z+(Q?-1:1),this.filteredOptions.length-1)),this.focusedValue=this.filteredOptions[this.#Z]?.value,!this.multiple)this.selectedValues=[this.focusedValue];this.isNavigating=!0}else if(J)this.value=D6(this.multiple,this.selectedValues);else if(this.multiple)if(this.focusedValue!==void 0&&($.name==="tab"||this.isNavigating&&$.name==="space"))this.toggleSelected(this.focusedValue);else this.isNavigating=!1;else{if(this.focusedValue)this.selectedValues=[this.focusedValue];this.isNavigating=!1}}deselectAll(){this.selectedValues=[]}toggleSelected(Z){if(this.filteredOptions.length===0)return;if(this.multiple)if(this.selectedValues.includes(Z))this.selectedValues=this.selectedValues.filter(($)=>$!==Z);else this.selectedValues=[...this.selectedValues,Z];else this.selectedValues=[Z]}#Y(Z){if(Z!==this.#Q){this.#Q=Z;let $=this.options;if(Z)this.filteredOptions=$.filter((Q)=>this.#z(Z,Q));else this.filteredOptions=[...$];if(this.#Z=V6(this.focusedValue,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#Z]?.value,!this.multiple)if(this.focusedValue!==void 0)this.toggleSelected(this.focusedValue);else this.deselectAll()}}}class L6 extends p{options;cursor=0;#Z;getGroupItems(Z){return this.options.filter(($)=>$.group===Z)}isGroupSelected(Z){let $=this.getGroupItems(Z),Q=this.value;if(Q===void 0)return!1;return $.every((z)=>Q.includes(z.value))}toggleValue(){let Z=this.options[this.cursor];if(this.value===void 0)this.value=[];if(Z.group===!0){let $=Z.value,Q=this.getGroupItems($);if(this.isGroupSelected($))this.value=this.value.filter((z)=>Q.findIndex((J)=>J.value===z)===-1);else this.value=[...this.value,...Q.map((z)=>z.value)];this.value=Array.from(new Set(this.value))}else{let $=this.value.includes(Z.value);this.value=$?this.value.filter((Q)=>Q!==Z.value):[...this.value,Z.value]}}constructor(Z){super(Z,!1);let{options:$}=Z;this.#Z=Z.selectableGroups!==!1,this.options=Object.entries($).flatMap(([Q,z])=>[{value:Q,group:!0,label:Q},...z.map((J)=>({...J,group:Q}))]),this.value=[...Z.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:Q})=>Q===Z.cursorAt),this.#Z?0:1),this.on("cursor",(Q)=>{switch(Q){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let z=this.options[this.cursor]?.group===!0;if(!this.#Z&&z)this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;let z=this.options[this.cursor]?.group===!0;if(!this.#Z&&z)this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}case"space":this.toggleValue();break}})}}var c6=L(N(),1);var p6=L(N(),1);var i6=L(N(),1),T={red:["\x1B[31m","\x1B[39m"],green:["\x1B[32m","\x1B[39m"],blue:["\x1B[34m","\x1B[39m"],yellow:["\x1B[33m","\x1B[39m"],cyan:["\x1B[36m","\x1B[39m"],magenta:["\x1B[35m","\x1B[39m"],white:["\x1B[37m","\x1B[39m"],gray:["\x1B[90m","\x1B[39m"],bgRed:["\x1B[41m","\x1B[49m"],bgGreen:["\x1B[42m","\x1B[49m"],bgBlue:["\x1B[44m","\x1B[49m"],bgYellow:["\x1B[43m","\x1B[49m"],bgCyan:["\x1B[46m","\x1B[49m"],bgMagenta:["\x1B[45m","\x1B[49m"],bold:["\x1B[1m","\x1B[22m"],italic:["\x1B[3m","\x1B[23m"],underline:["\x1B[4m","\x1B[24m"],dim:["\x1B[2m","\x1B[22m"],inverse:["\x1B[7m","\x1B[27m"],hidden:["\x1B[8m","\x1B[28m"],strikethrough:["\x1B[9m","\x1B[29m"]},b={primary:"blue",secondary:"cyan",success:"green",warning:"yellow",error:"red",info:"magenta",muted:"gray"};function M6(){return!0}function N6(){let Z={};Z.supportsColor=M6();function $(z,J=[]){let Y=z===""?[]:[...J,z],X=function(q){if(!Z.supportsColor)return q;let G="",U="";for(let K of Y)if(K in b&&b[K]in T){let H=b[K];G+=T[H][0],U=T[H][1]+U}else if(K in T)G+=T[K][0],U=T[K][1]+U;return G+q+U},j=[...Object.keys(T),...Object.keys(b)];for(let q of j)if(!(q in X))Object.defineProperty(X,q,{get(){return $(q,Y)}});return X}let Q=[...Object.keys(T),...Object.keys(b)];for(let z of Q)if(!(z in Z))Object.defineProperty(Z,z,{get(){return $(z)}});return Z}var r6=N6();var O6=S0();var W=(Z,$)=>O6?Z:$,s6=W("\u25C6","*"),e6=W("\u25A0","x"),t6=W("\u25B2","x"),o6=W("\u25C7","o"),Z1=W("\u250C","T"),B6=W("\u2502","|"),$1=W("\u2514","\u2014"),Q1=W("\u25CF",">"),z1=W("\u25CB"," "),J1=W("\u25FB","[\u2022]"),Y1=W("\u25FC","[+]"),X1=W("\u25FB","[ ]"),j1=W("\u25AA","\u2022"),U1=W("\u2500","-"),q1=W("\u256E","+"),G1=W("\u251C","+"),K1=W("\u256F","+"),H1=W("\u25CF","\u2022"),V1=W("\u25C6","*"),F1=W("\u25B2","!"),D1=W("\u25A0","x");var W1=L(N(),1);var L1=L(N(),1);var M1=L(N(),1);var N1=L(N(),1);var O1=L(N(),1);var B1=L(N(),1);var T1=L(N(),1);var w1=L(N(),1);var P1=L(N(),1),b1=L(N(),1);var I1={light:W("\u2500","-"),heavy:W("\u2501","="),block:W("\u2588","#")};var R1=L(N(),1);var E1=L(N(),1);var T6=L(N(),1);function w6(){return`${T6.default.gray(B6)} `}var A1=w6();var C1=L(N(),1);var k1=L(N(),1);var W0="0.1.0";var P=new a("bunpress"),O={outdir:"./dist",port:3000,open:!0,watch:!0,verbose:i.verbose};async function B0(Z){let $=new M0("**/*.md"),Q=[];for await(let z of $.scan(Z))Q.push(R(Z,z));return Q}async function R6(Z,$=!1){try{await I6("./docs/public");let z=new M0("**/*");for await(let J of z.scan("./docs/public")){let Y=R("./docs/public",J),X=R(Z,J);await N0(R(Z,J.split("/").slice(0,-1).join("/")),{recursive:!0}),await b6(Y,X)}}catch{if($)console.log("No public directory found, skipping static assets copy")}}async function E6(Z={}){let $=Z.outdir||O.outdir,Q=Z.verbose??O.verbose;await N0($,{recursive:!0});let J=await B0("./docs");if(J.length===0)return console.log("No markdown files found in docs directory"),!1;if(Q)console.log(`Found ${J.length} markdown files:`),J.forEach((Y)=>console.log(`- ${Y}`));try{let Y=await Bun.build({entrypoints:J,outdir:$});if(!Y.success){console.error("Build failed:");for(let X of Y.logs)console.error(X);return!1}if(await R6($,Q),Q){console.log("Build successful!"),console.log("Generated files:");for(let X of Y.outputs)console.log(`- ${X.path}`)}return await A6($,J),!0}catch(Y){return console.error("Error during build:",Y),!1}}async function A6(Z,$){let z=`<!DOCTYPE html>
24
- <html lang="en">
25
- <head>
26
- <meta charset="UTF-8">
27
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
28
- <title>BunPress Documentation</title>
29
- <style>
30
- body {
31
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
32
- line-height: 1.6;
33
- color: #333;
34
- max-width: 800px;
35
- margin: 0 auto;
36
- padding: 2rem;
37
- }
38
-
39
- .markdown-body {
40
- padding: 1rem;
41
- }
42
-
43
- a {
44
- color: #1F1FE9;
45
- text-decoration: none;
46
- }
47
-
48
- a:hover {
49
- text-decoration: underline;
50
- }
51
-
52
- h1 {
53
- border-bottom: 1px solid #eaecef;
54
- padding-bottom: 0.3em;
55
- }
56
-
57
- ul {
58
- padding-left: 2rem;
59
- }
60
-
61
- li {
62
- margin-bottom: 0.5rem;
63
- }
64
- </style>
65
- </head>
66
- <body>
67
- <div class="markdown-body">
68
- <h1>BunPress Documentation</h1>
69
-
70
- <p>Welcome to the BunPress documentation! BunPress is a modern documentation engine powered by Bun.</p>
71
-
72
- <h2>Documentation Pages</h2>
73
-
74
- <ul>
75
- ${$.map((J)=>{let Y=J.replace("./docs/",""),X=Y.replace(".md",".html"),j=Y.replace(".md","").replace(/\.([^.]+)$/,""),q=j.charAt(0).toUpperCase()+j.slice(1).replace(/-/g," ");return`<li><a href="${X}">${q}</a></li>`}).join(`
76
- `)}
77
- </ul>
78
-
79
- <h2>About BunPress</h2>
80
-
81
- <p>BunPress is a documentation engine that converts Markdown files to HTML. It offers full customization of the generated HTML, including custom CSS, scripts, and templates.</p>
82
-
83
- <p>Visit the <a href="https://github.com/stacksjs/bunpress">GitHub repository</a> to learn more.</p>
84
- </div>
85
- </body>
86
- </html>`;await Bun.write(R(Z,"index.html"),z)}P.command("build","Build the documentation site").option("--outdir <outdir>","Output directory",{default:O.outdir}).option("--config <config>","Path to config file").option("--verbose","Enable verbose logging",{default:O.verbose}).action(async(Z)=>{if(!await E6(Z))O0.exit(1);console.log("Documentation built successfully!")});P.command("dev","Build and serve documentation using BunPress server").option("--port <port>","Port to listen on",{default:O.port}).option("--dir <dir>","Documentation directory",{default:"./docs"}).option("--watch","Watch for changes",{default:O.watch}).option("--verbose","Enable verbose logging",{default:O.verbose}).action(async(Z)=>{let $=Z.port||O.port,Q=Z.dir||"./docs",z=Z.watch??O.watch,J=Z.verbose??O.verbose;if(J)console.log("Starting BunPress dev server with options:",{port:$,root:Q,watch:z,verbose:J});await L0({port:$,root:Q,watch:z,config:i})});async function C6(Z={}){let $=Z.dir||"./docs",Q=Z.output||"./docs.md",z=Z.full??!1,J=Z.verbose??O.verbose;if(J)console.log(`Generating LLM markdown from ${$}`),console.log(`Output file: ${Q}`),console.log(`Full content: ${z}`);let Y=await B0($);if(Y.length===0)return console.log("No markdown files found in docs directory"),!1;if(J)console.log(`Found ${Y.length} markdown files`);Y.sort();let X=`# Documentation
87
-
88
- `;X+=`Generated: ${new Date().toISOString()}
89
-
90
- `,X+=`Total files: ${Y.length}
91
-
92
- `,X+=`---
93
-
94
- `;for(let j of Y){let q=j.replace(`${$}/`,""),G=await Bun.file(j).text();if(J)console.log(`Processing: ${q}`);if(X+=`## File: ${q}
95
-
96
- `,z)X+=G,X+=`
97
-
98
- `;else{let U=G.split(`
99
- `),K=!1,H="";for(let V of U){if(V.trim()==="---")if(!K){K=!0;continue}else{if(K=!1,H)X+="**Frontmatter:**\n```yaml\n",X+=H,X+="```\n\n",H="";continue}if(K){H+=`${V}
100
- `;continue}if(V.match(/^#{1,6}\s+/))X+=`${V}
101
- `}X+=`
102
- `}X+=`---
103
-
104
- `}return await Bun.write(Q,X),console.log(`
105
- LLM markdown generated successfully: ${Q}`),console.log(`Total size: ${(X.length/1024).toFixed(2)} KB`),!0}P.command("llm","Generate LLM-friendly markdown file from documentation").option("--dir <dir>","Documentation directory",{default:"./docs"}).option("--output <output>","Output file path",{default:"./docs.md"}).option("--full","Include full content (not just titles and headings)",{default:!1}).option("--verbose","Enable verbose logging",{default:O.verbose}).action(async(Z)=>{if(!await C6(Z))O0.exit(1)});P.help();P.version(W0);P.parse();export{B0 as findMarkdownFiles,E6 as buildDocs};
3
+ import{e as a,f as b}from"../chunk-z0redasq.js";import"../chunk-1ymh7yt2.js";export{a as findMarkdownFiles,b as buildDocs};