nitro-nightly 4.0.0-20251030-091344-d4418b98 → 4.0.0-20251030-122334-09c1a7a8

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 (334) hide show
  1. package/dist/_build/common.mjs +763 -0
  2. package/dist/_build/rolldown.mjs +216 -0
  3. package/dist/_build/rollup.mjs +359 -0
  4. package/dist/_build/vite.build.mjs +67 -0
  5. package/dist/_build/vite.plugin.mjs +762 -0
  6. package/dist/_chunks/B-7HiF0V.mjs +1303 -0
  7. package/dist/_chunks/B3asVbT4.mjs +151 -0
  8. package/dist/_chunks/B5ooyfLk.mjs +372 -0
  9. package/dist/_chunks/DXMHy5ca.mjs +43 -0
  10. package/dist/_dev.d.mts +12 -0
  11. package/dist/_dev.mjs +675 -0
  12. package/dist/_libs/acorn.mjs +5034 -0
  13. package/dist/_libs/c12.mjs +2798 -0
  14. package/dist/_libs/chokidar.mjs +1560 -0
  15. package/dist/_libs/citty.mjs +333 -0
  16. package/dist/_libs/commondir.mjs +22 -0
  17. package/dist/_libs/compatx.mjs +46 -0
  18. package/dist/_libs/confbox.mjs +2920 -0
  19. package/dist/_libs/debug.mjs +848 -0
  20. package/dist/_libs/deepmerge.mjs +86 -0
  21. package/dist/_libs/depd.mjs +314 -0
  22. package/dist/_libs/dot-prop.mjs +138 -0
  23. package/dist/_libs/duplexer.mjs +71 -0
  24. package/dist/_libs/ee-first.mjs +68 -0
  25. package/dist/_libs/encodeurl.mjs +49 -0
  26. package/dist/_libs/escape-html.mjs +58 -0
  27. package/dist/_libs/escape-string-regexp.mjs +8 -0
  28. package/dist/_libs/estree-walker.mjs +330 -0
  29. package/dist/_libs/etag.mjs +75 -0
  30. package/dist/{_chunks/_deps → _libs}/fdir.mjs +49 -104
  31. package/dist/_libs/fresh.mjs +85 -0
  32. package/dist/_libs/function-bind.mjs +63 -0
  33. package/dist/_libs/gen-mapping.mjs +612 -0
  34. package/dist/_libs/giget.mjs +19076 -0
  35. package/dist/_libs/gzip-size.mjs +21 -0
  36. package/dist/_libs/hasown.mjs +14 -0
  37. package/dist/_libs/http-errors.mjs +436 -0
  38. package/dist/_libs/httpxy.mjs +410 -0
  39. package/dist/_libs/is-core-module.mjs +220 -0
  40. package/dist/_libs/is-module.mjs +13 -0
  41. package/dist/_libs/is-reference.mjs +32 -0
  42. package/dist/{_chunks/_deps → _libs}/js-tokens.mjs +83 -112
  43. package/dist/_libs/klona.mjs +90 -0
  44. package/dist/_libs/knitwork.mjs +124 -0
  45. package/dist/_libs/local-pkg.mjs +1686 -0
  46. package/dist/{_chunks/_deps → _libs}/magic-string.mjs +272 -629
  47. package/dist/_libs/mime-db.mjs +7642 -0
  48. package/dist/_libs/mime-types.mjs +162 -0
  49. package/dist/_libs/mime.mjs +1391 -0
  50. package/dist/_libs/node-fetch-native.mjs +173 -0
  51. package/dist/_libs/on-finished.mjs +170 -0
  52. package/dist/_libs/parseurl.mjs +103 -0
  53. package/dist/_libs/path-parse.mjs +47 -0
  54. package/dist/_libs/pathe.mjs +41 -0
  55. package/dist/_libs/picomatch.mjs +1673 -0
  56. package/dist/_libs/plugin-alias.mjs +64 -0
  57. package/dist/_libs/plugin-commonjs.mjs +1489 -0
  58. package/dist/_libs/plugin-inject.mjs +135 -0
  59. package/dist/_libs/plugin-json.mjs +36 -0
  60. package/dist/_libs/plugin-node-resolve.mjs +1553 -0
  61. package/dist/_libs/plugin-replace.mjs +104 -0
  62. package/dist/_libs/pretty-bytes.mjs +116 -0
  63. package/dist/_libs/range-parser.mjs +102 -0
  64. package/dist/_libs/remapping.mjs +117 -0
  65. package/dist/{_chunks/_deps → _libs}/rou3.mjs +7 -22
  66. package/dist/_libs/send.mjs +857 -0
  67. package/dist/_libs/serve-static.mjs +124 -0
  68. package/dist/_libs/std-env.mjs +158 -0
  69. package/dist/_libs/strip-literal.mjs +51 -0
  70. package/dist/{_chunks/_deps → _libs}/tinyglobby.mjs +32 -33
  71. package/dist/_libs/ultrahtml.mjs +138 -0
  72. package/dist/_libs/unimport.mjs +3520 -0
  73. package/dist/_libs/untyped.mjs +271 -0
  74. package/dist/_libs/unwasm.mjs +5825 -0
  75. package/dist/{_chunks/_deps/@pi0 → _libs}/vite-plugin-fullstack.mjs +28 -42
  76. package/dist/_presets.mjs +1723 -0
  77. package/dist/builder.d.mts +37 -35
  78. package/dist/builder.mjs +45 -117
  79. package/dist/cli/_chunks/build.mjs +43 -0
  80. package/dist/cli/_chunks/common.mjs +15 -0
  81. package/dist/cli/_chunks/detect-acorn.mjs +12 -0
  82. package/dist/cli/_chunks/dev.mjs +79 -0
  83. package/dist/cli/_chunks/dist.mjs +3 -0
  84. package/dist/cli/_chunks/dist2.mjs +4 -0
  85. package/dist/cli/_chunks/esm.mjs +3 -0
  86. package/dist/cli/_chunks/json5.mjs +4 -0
  87. package/dist/cli/_chunks/jsonc.mjs +4 -0
  88. package/dist/cli/_chunks/list.mjs +27 -0
  89. package/dist/cli/_chunks/multipart-parser.mjs +6 -0
  90. package/dist/cli/_chunks/prepare.mjs +19 -0
  91. package/dist/cli/_chunks/run.mjs +55 -0
  92. package/dist/cli/_chunks/task.mjs +16 -0
  93. package/dist/cli/_chunks/toml.mjs +4 -0
  94. package/dist/cli/_chunks/yaml.mjs +4 -0
  95. package/dist/cli/index.d.mts +1 -1
  96. package/dist/cli/index.mjs +19 -18
  97. package/dist/presets/_nitro/runtime/nitro-dev.d.mts +1 -0
  98. package/dist/presets/_nitro/runtime/nitro-dev.mjs +42 -33
  99. package/dist/presets/_nitro/runtime/nitro-prerenderer.d.mts +2 -2
  100. package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +4 -8
  101. package/dist/presets/_nitro/runtime/service-worker.d.mts +1 -0
  102. package/dist/presets/_nitro/runtime/service-worker.mjs +14 -11
  103. package/dist/presets/aws-amplify/runtime/aws-amplify.d.mts +1 -0
  104. package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +6 -5
  105. package/dist/presets/aws-lambda/runtime/_utils.d.mts +8 -13
  106. package/dist/presets/aws-lambda/runtime/_utils.mjs +95 -81
  107. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +1 -2
  108. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +25 -27
  109. package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +7 -7
  110. package/dist/presets/azure/runtime/_utils.mjs +43 -43
  111. package/dist/presets/azure/runtime/azure-swa.d.mts +2 -2
  112. package/dist/presets/azure/runtime/azure-swa.mjs +22 -21
  113. package/dist/presets/bun/runtime/bun.d.mts +1 -0
  114. package/dist/presets/bun/runtime/bun.mjs +18 -17
  115. package/dist/presets/cloudflare/runtime/_module-handler.d.mts +10 -7
  116. package/dist/presets/cloudflare/runtime/_module-handler.mjs +78 -87
  117. package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +6 -14
  118. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +53 -58
  119. package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +1 -7
  120. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +12 -14
  121. package/dist/presets/cloudflare/runtime/cloudflare-pages.d.mts +12 -12
  122. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +35 -39
  123. package/dist/presets/cloudflare/runtime/plugin.dev.d.mts +2 -2
  124. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +86 -76
  125. package/dist/presets/deno/runtime/deno-deploy.d.mts +1 -0
  126. package/dist/presets/deno/runtime/deno-deploy.mjs +12 -11
  127. package/dist/presets/deno/runtime/deno-server.d.mts +2 -1
  128. package/dist/presets/deno/runtime/deno-server.mjs +31 -39
  129. package/dist/presets/netlify/runtime/netlify-edge.d.mts +2 -1
  130. package/dist/presets/netlify/runtime/netlify-edge.mjs +14 -11
  131. package/dist/presets/netlify/runtime/netlify.mjs +11 -17
  132. package/dist/presets/node/runtime/node-cluster.mjs +49 -48
  133. package/dist/presets/node/runtime/node-middleware.d.mts +3 -2
  134. package/dist/presets/node/runtime/node-middleware.mjs +7 -6
  135. package/dist/presets/node/runtime/node-server.mjs +33 -23
  136. package/dist/presets/standard/runtime/server.d.mts +1 -3
  137. package/dist/presets/standard/runtime/server.mjs +1 -3
  138. package/dist/presets/stormkit/runtime/stormkit.d.mts +13 -13
  139. package/dist/presets/stormkit/runtime/stormkit.mjs +20 -20
  140. package/dist/presets/vercel/runtime/vercel.d.mts +3 -3
  141. package/dist/presets/vercel/runtime/vercel.mjs +15 -14
  142. package/dist/presets/winterjs/runtime/winterjs.d.mts +2 -0
  143. package/dist/presets/winterjs/runtime/winterjs.mjs +72 -68
  144. package/dist/presets/zeabur/runtime/zeabur.d.mts +1 -1
  145. package/dist/runtime/index.d.mts +12 -1
  146. package/dist/runtime/index.mjs +12 -7
  147. package/dist/runtime/internal/app.mjs +175 -162
  148. package/dist/runtime/internal/cache.d.mts +10 -4
  149. package/dist/runtime/internal/cache.mjs +247 -216
  150. package/dist/runtime/internal/context.d.mts +9 -9
  151. package/dist/runtime/internal/context.mjs +17 -10
  152. package/dist/runtime/internal/database.mjs +8 -10
  153. package/dist/runtime/internal/error/dev.d.mts +5 -4
  154. package/dist/runtime/internal/error/dev.mjs +106 -105
  155. package/dist/runtime/internal/error/prod.d.mts +2 -2
  156. package/dist/runtime/internal/error/prod.mjs +48 -52
  157. package/dist/runtime/internal/error/utils.d.mts +4 -4
  158. package/dist/runtime/internal/error/utils.mjs +1 -1
  159. package/dist/runtime/internal/index.d.mts +2 -0
  160. package/dist/runtime/internal/index.mjs +2 -0
  161. package/dist/runtime/internal/lib/http-graceful-shutdown.d.mts +14 -14
  162. package/dist/runtime/internal/lib/http-graceful-shutdown.mjs +248 -209
  163. package/dist/runtime/internal/meta.d.mts +1 -1
  164. package/dist/runtime/internal/meta.mjs +1 -1
  165. package/dist/runtime/internal/plugin.d.mts +2 -2
  166. package/dist/runtime/internal/plugin.mjs +1 -1
  167. package/dist/runtime/internal/renderer.mjs +39 -31
  168. package/dist/runtime/internal/route-rules.d.mts +8 -8
  169. package/dist/runtime/internal/route-rules.mjs +53 -51
  170. package/dist/runtime/internal/routes/dev-tasks.d.mts +1 -30
  171. package/dist/runtime/internal/routes/dev-tasks.mjs +15 -17
  172. package/dist/runtime/internal/routes/openapi.d.mts +1 -0
  173. package/dist/runtime/internal/routes/openapi.mjs +81 -87
  174. package/dist/runtime/internal/routes/renderer-template.d.mts +1 -1
  175. package/dist/runtime/internal/routes/renderer-template.dev.d.mts +1 -2
  176. package/dist/runtime/internal/routes/renderer-template.dev.mjs +10 -17
  177. package/dist/runtime/internal/routes/renderer-template.mjs +1 -1
  178. package/dist/runtime/internal/routes/scalar.d.mts +1 -0
  179. package/dist/runtime/internal/routes/scalar.mjs +22 -23
  180. package/dist/runtime/internal/routes/swagger.d.mts +1 -0
  181. package/dist/runtime/internal/routes/swagger.mjs +9 -11
  182. package/dist/runtime/internal/runtime-config.d.mts +4 -4
  183. package/dist/runtime/internal/runtime-config.mjs +40 -35
  184. package/dist/runtime/internal/shutdown.d.mts +2 -7
  185. package/dist/runtime/internal/shutdown.mjs +30 -29
  186. package/dist/runtime/internal/static.mjs +63 -74
  187. package/dist/runtime/internal/storage.mjs +2 -2
  188. package/dist/runtime/internal/task.d.mts +6 -6
  189. package/dist/runtime/internal/task.mjs +56 -59
  190. package/dist/runtime/internal/utils.d.mts +1 -1
  191. package/dist/runtime/internal/utils.mjs +4 -10
  192. package/dist/types/index.d.mts +2566 -3851
  193. package/dist/types/index.mjs +1 -1
  194. package/dist/vite.d.mts +61 -51
  195. package/dist/vite.mjs +55 -132
  196. package/package.json +10 -10
  197. package/dist/_build/build.mjs +0 -368
  198. package/dist/_build/build2.mjs +0 -556
  199. package/dist/_build/info.mjs +0 -1002
  200. package/dist/_build/prepare.mjs +0 -1511
  201. package/dist/_build/snapshot.mjs +0 -185
  202. package/dist/_build/vite.mjs +0 -959
  203. package/dist/_build/vite2.mjs +0 -149
  204. package/dist/_chunks/_deps/@jridgewell/gen-mapping.mjs +0 -189
  205. package/dist/_chunks/_deps/@jridgewell/remapping.mjs +0 -137
  206. package/dist/_chunks/_deps/@jridgewell/resolve-uri.mjs +0 -231
  207. package/dist/_chunks/_deps/@jridgewell/sourcemap-codec.mjs +0 -173
  208. package/dist/_chunks/_deps/@jridgewell/trace-mapping.mjs +0 -170
  209. package/dist/_chunks/_deps/@rollup/plugin-alias.mjs +0 -89
  210. package/dist/_chunks/_deps/@rollup/plugin-commonjs.mjs +0 -2376
  211. package/dist/_chunks/_deps/@rollup/plugin-inject.mjs +0 -212
  212. package/dist/_chunks/_deps/@rollup/plugin-json.mjs +0 -37
  213. package/dist/_chunks/_deps/@rollup/plugin-node-resolve.mjs +0 -1386
  214. package/dist/_chunks/_deps/@rollup/plugin-replace.mjs +0 -133
  215. package/dist/_chunks/_deps/@rollup/pluginutils.mjs +0 -346
  216. package/dist/_chunks/_deps/acorn.mjs +0 -6225
  217. package/dist/_chunks/_deps/c12.mjs +0 -510
  218. package/dist/_chunks/_deps/chokidar.mjs +0 -1428
  219. package/dist/_chunks/_deps/citty.mjs +0 -460
  220. package/dist/_chunks/_deps/commondir.mjs +0 -77
  221. package/dist/_chunks/_deps/compatx.mjs +0 -76
  222. package/dist/_chunks/_deps/confbox.mjs +0 -300
  223. package/dist/_chunks/_deps/debug.mjs +0 -885
  224. package/dist/_chunks/_deps/deepmerge.mjs +0 -147
  225. package/dist/_chunks/_deps/depd.mjs +0 -550
  226. package/dist/_chunks/_deps/dot-prop.mjs +0 -282
  227. package/dist/_chunks/_deps/dotenv.mjs +0 -555
  228. package/dist/_chunks/_deps/duplexer.mjs +0 -1
  229. package/dist/_chunks/_deps/ee-first.mjs +0 -104
  230. package/dist/_chunks/_deps/encodeurl.mjs +0 -69
  231. package/dist/_chunks/_deps/escape-html.mjs +0 -87
  232. package/dist/_chunks/_deps/escape-string-regexp.mjs +0 -13
  233. package/dist/_chunks/_deps/estree-walker.mjs +0 -433
  234. package/dist/_chunks/_deps/etag.mjs +0 -147
  235. package/dist/_chunks/_deps/exsolve.mjs +0 -1416
  236. package/dist/_chunks/_deps/fresh.mjs +0 -145
  237. package/dist/_chunks/_deps/function-bind.mjs +0 -106
  238. package/dist/_chunks/_deps/giget.mjs +0 -451
  239. package/dist/_chunks/_deps/gzip-size.mjs +0 -19
  240. package/dist/_chunks/_deps/hasown.mjs +0 -19
  241. package/dist/_chunks/_deps/http-errors.mjs +0 -307
  242. package/dist/_chunks/_deps/httpxy.mjs +0 -580
  243. package/dist/_chunks/_deps/inherits.mjs +0 -57
  244. package/dist/_chunks/_deps/is-core-module.mjs +0 -596
  245. package/dist/_chunks/_deps/is-module.mjs +0 -25
  246. package/dist/_chunks/_deps/is-reference.mjs +0 -31
  247. package/dist/_chunks/_deps/klona.mjs +0 -137
  248. package/dist/_chunks/_deps/knitwork.mjs +0 -172
  249. package/dist/_chunks/_deps/local-pkg.mjs +0 -163
  250. package/dist/_chunks/_deps/mime-db.mjs +0 -11685
  251. package/dist/_chunks/_deps/mime-types.mjs +0 -287
  252. package/dist/_chunks/_deps/mime.mjs +0 -1172
  253. package/dist/_chunks/_deps/mlly.mjs +0 -2413
  254. package/dist/_chunks/_deps/ms.mjs +0 -172
  255. package/dist/_chunks/_deps/node-fetch-native.mjs +0 -3
  256. package/dist/_chunks/_deps/nypm.mjs +0 -219
  257. package/dist/_chunks/_deps/on-finished.mjs +0 -246
  258. package/dist/_chunks/_deps/parseurl.mjs +0 -168
  259. package/dist/_chunks/_deps/path-parse.mjs +0 -85
  260. package/dist/_chunks/_deps/pathe.mjs +0 -251
  261. package/dist/_chunks/_deps/perfect-debounce.mjs +0 -88
  262. package/dist/_chunks/_deps/picomatch.mjs +0 -2144
  263. package/dist/_chunks/_deps/pkg-types.mjs +0 -247
  264. package/dist/_chunks/_deps/pretty-bytes.mjs +0 -180
  265. package/dist/_chunks/_deps/quansync.mjs +0 -99
  266. package/dist/_chunks/_deps/range-parser.mjs +0 -171
  267. package/dist/_chunks/_deps/rc9.mjs +0 -219
  268. package/dist/_chunks/_deps/readdirp.mjs +0 -245
  269. package/dist/_chunks/_deps/resolve.mjs +0 -1260
  270. package/dist/_chunks/_deps/send.mjs +0 -1022
  271. package/dist/_chunks/_deps/serve-static.mjs +0 -228
  272. package/dist/_chunks/_deps/setprototypeof.mjs +0 -26
  273. package/dist/_chunks/_deps/statuses.mjs +0 -457
  274. package/dist/_chunks/_deps/std-env.mjs +0 -3
  275. package/dist/_chunks/_deps/strip-literal.mjs +0 -67
  276. package/dist/_chunks/_deps/supports-color.mjs +0 -44
  277. package/dist/_chunks/_deps/tinyexec.mjs +0 -552
  278. package/dist/_chunks/_deps/toidentifier.mjs +0 -41
  279. package/dist/_chunks/_deps/ultrahtml.mjs +0 -3
  280. package/dist/_chunks/_deps/unimport.mjs +0 -2267
  281. package/dist/_chunks/_deps/unplugin-utils.mjs +0 -65
  282. package/dist/_chunks/_deps/unplugin.mjs +0 -1294
  283. package/dist/_chunks/_deps/untyped.mjs +0 -375
  284. package/dist/_chunks/_deps/unwasm.mjs +0 -6959
  285. package/dist/_chunks/_deps/webpack-virtual-modules.mjs +0 -360
  286. package/dist/_chunks/_presets/_all.mjs +0 -59
  287. package/dist/_chunks/_presets/_nitro.mjs +0 -74
  288. package/dist/_chunks/_presets/_resolve.mjs +0 -64
  289. package/dist/_chunks/_presets/_static.mjs +0 -69
  290. package/dist/_chunks/_presets/_types.mjs +0 -3
  291. package/dist/_chunks/_presets/_utils.mjs +0 -31
  292. package/dist/_chunks/_presets/alwaysdata.mjs +0 -17
  293. package/dist/_chunks/_presets/aws-amplify.mjs +0 -111
  294. package/dist/_chunks/_presets/aws-lambda.mjs +0 -23
  295. package/dist/_chunks/_presets/azure.mjs +0 -162
  296. package/dist/_chunks/_presets/bun.mjs +0 -19
  297. package/dist/_chunks/_presets/cleavr.mjs +0 -15
  298. package/dist/_chunks/_presets/cloudflare.mjs +0 -608
  299. package/dist/_chunks/_presets/deno.mjs +0 -196
  300. package/dist/_chunks/_presets/digitalocean.mjs +0 -14
  301. package/dist/_chunks/_presets/firebase.mjs +0 -47
  302. package/dist/_chunks/_presets/flightcontrol.mjs +0 -14
  303. package/dist/_chunks/_presets/genezio.mjs +0 -13
  304. package/dist/_chunks/_presets/heroku.mjs +0 -14
  305. package/dist/_chunks/_presets/iis.mjs +0 -194
  306. package/dist/_chunks/_presets/index.mjs +0 -62
  307. package/dist/_chunks/_presets/koyeb.mjs +0 -14
  308. package/dist/_chunks/_presets/netlify.mjs +0 -241
  309. package/dist/_chunks/_presets/node.mjs +0 -54
  310. package/dist/_chunks/_presets/platform.mjs +0 -14
  311. package/dist/_chunks/_presets/render.mjs +0 -14
  312. package/dist/_chunks/_presets/standard.mjs +0 -23
  313. package/dist/_chunks/_presets/stormkit.mjs +0 -18
  314. package/dist/_chunks/_presets/vercel.mjs +0 -375
  315. package/dist/_chunks/_presets/winterjs.mjs +0 -22
  316. package/dist/_chunks/_presets/zeabur.mjs +0 -69
  317. package/dist/_chunks/_presets/zerops.mjs +0 -27
  318. package/dist/_chunks/app.mjs +0 -600
  319. package/dist/_chunks/builder.mjs +0 -648
  320. package/dist/_chunks/server.mjs +0 -256
  321. package/dist/_cli/build.mjs +0 -49
  322. package/dist/_cli/common.mjs +0 -13
  323. package/dist/_cli/dev.mjs +0 -121
  324. package/dist/_cli/index.mjs +0 -16
  325. package/dist/_cli/list.mjs +0 -33
  326. package/dist/_cli/prepare.mjs +0 -23
  327. package/dist/_cli/run.mjs +0 -59
  328. package/dist/presets/cloudflare/runtime/shims/workers.dev.d.mts +0 -21
  329. package/dist/runtime/internal/empty.d.mts +0 -0
  330. package/dist/runtime/internal/vite/dev-entry.d.mts +0 -1
  331. package/dist/runtime/internal/vite/dev-worker.d.mts +0 -1
  332. package/dist/runtime/internal/vite/prod-setup.d.mts +0 -4
  333. package/dist/runtime/internal/vite/ssr-renderer.d.mts +0 -4
  334. /package/lib/{indexd.mts → index.d.mts} +0 -0
@@ -0,0 +1,124 @@
1
+ import { i as __require, t as __commonJS } from "../_chunks/DXMHy5ca.mjs";
2
+ import { t as require_encodeurl } from "./encodeurl.mjs";
3
+ import { t as require_escape_html } from "./escape-html.mjs";
4
+ import { t as require_parseurl } from "./parseurl.mjs";
5
+ import { t as require_send } from "./send.mjs";
6
+
7
+ //#region node_modules/.pnpm/serve-static@2.2.0/node_modules/serve-static/index.js
8
+ var require_serve_static = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/serve-static@2.2.0/node_modules/serve-static/index.js": ((exports, module) => {
9
+ /**
10
+ * Module dependencies.
11
+ * @private
12
+ */
13
+ var encodeUrl = require_encodeurl();
14
+ var escapeHtml = require_escape_html();
15
+ var parseUrl = require_parseurl();
16
+ var resolve = __require("path").resolve;
17
+ var send = require_send();
18
+ var url = __require("url");
19
+ /**
20
+ * Module exports.
21
+ * @public
22
+ */
23
+ module.exports = serveStatic;
24
+ /**
25
+ * @param {string} root
26
+ * @param {object} [options]
27
+ * @return {function}
28
+ * @public
29
+ */
30
+ function serveStatic(root, options) {
31
+ if (!root) throw new TypeError("root path required");
32
+ if (typeof root !== "string") throw new TypeError("root path must be a string");
33
+ var opts = Object.create(options || null);
34
+ var fallthrough = opts.fallthrough !== false;
35
+ var redirect = opts.redirect !== false;
36
+ var setHeaders = opts.setHeaders;
37
+ if (setHeaders && typeof setHeaders !== "function") throw new TypeError("option setHeaders must be function");
38
+ opts.maxage = opts.maxage || opts.maxAge || 0;
39
+ opts.root = resolve(root);
40
+ var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener();
41
+ return function serveStatic$1(req, res, next) {
42
+ if (req.method !== "GET" && req.method !== "HEAD") {
43
+ if (fallthrough) return next();
44
+ res.statusCode = 405;
45
+ res.setHeader("Allow", "GET, HEAD");
46
+ res.setHeader("Content-Length", "0");
47
+ res.end();
48
+ return;
49
+ }
50
+ var forwardError = !fallthrough;
51
+ var originalUrl = parseUrl.original(req);
52
+ var path = parseUrl(req).pathname;
53
+ if (path === "/" && originalUrl.pathname.substr(-1) !== "/") path = "";
54
+ var stream = send(req, path, opts);
55
+ stream.on("directory", onDirectory);
56
+ if (setHeaders) stream.on("headers", setHeaders);
57
+ if (fallthrough) stream.on("file", function onFile() {
58
+ forwardError = true;
59
+ });
60
+ stream.on("error", function error(err) {
61
+ if (forwardError || !(err.statusCode < 500)) {
62
+ next(err);
63
+ return;
64
+ }
65
+ next();
66
+ });
67
+ stream.pipe(res);
68
+ };
69
+ }
70
+ /**
71
+ * Collapse all leading slashes into a single slash
72
+ * @private
73
+ */
74
+ function collapseLeadingSlashes(str) {
75
+ for (var i = 0; i < str.length; i++) if (str.charCodeAt(i) !== 47) break;
76
+ return i > 1 ? "/" + str.substr(i) : str;
77
+ }
78
+ /**
79
+ * Create a minimal HTML document.
80
+ *
81
+ * @param {string} title
82
+ * @param {string} body
83
+ * @private
84
+ */
85
+ function createHtmlDocument(title, body) {
86
+ return "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>" + title + "</title>\n</head>\n<body>\n<pre>" + body + "</pre>\n</body>\n</html>\n";
87
+ }
88
+ /**
89
+ * Create a directory listener that just 404s.
90
+ * @private
91
+ */
92
+ function createNotFoundDirectoryListener() {
93
+ return function notFound() {
94
+ this.error(404);
95
+ };
96
+ }
97
+ /**
98
+ * Create a directory listener that performs a redirect.
99
+ * @private
100
+ */
101
+ function createRedirectDirectoryListener() {
102
+ return function redirect(res) {
103
+ if (this.hasTrailingSlash()) {
104
+ this.error(404);
105
+ return;
106
+ }
107
+ var originalUrl = parseUrl.original(this.req);
108
+ originalUrl.path = null;
109
+ originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + "/");
110
+ var loc = encodeUrl(url.format(originalUrl));
111
+ var doc = createHtmlDocument("Redirecting", "Redirecting to " + escapeHtml(loc));
112
+ res.statusCode = 301;
113
+ res.setHeader("Content-Type", "text/html; charset=UTF-8");
114
+ res.setHeader("Content-Length", Buffer.byteLength(doc));
115
+ res.setHeader("Content-Security-Policy", "default-src 'none'");
116
+ res.setHeader("X-Content-Type-Options", "nosniff");
117
+ res.setHeader("Location", loc);
118
+ res.end(doc);
119
+ };
120
+ }
121
+ }) });
122
+
123
+ //#endregion
124
+ export { require_serve_static as t };
@@ -0,0 +1,158 @@
1
+ //#region node_modules/.pnpm/std-env@3.10.0/node_modules/std-env/dist/index.mjs
2
+ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
3
+ get(e, s) {
4
+ return i()[s] ?? r[s];
5
+ },
6
+ has(e, s) {
7
+ return s in i() || s in r;
8
+ },
9
+ set(e, s, E) {
10
+ const B = i(!0);
11
+ return B[s] = E, !0;
12
+ },
13
+ deleteProperty(e, s) {
14
+ if (!s) return !1;
15
+ const E = i(!0);
16
+ return delete E[s], !0;
17
+ },
18
+ ownKeys() {
19
+ const e = i(!0);
20
+ return Object.keys(e);
21
+ }
22
+ }), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f = [
23
+ ["APPVEYOR"],
24
+ [
25
+ "AWS_AMPLIFY",
26
+ "AWS_APP_ID",
27
+ { ci: !0 }
28
+ ],
29
+ ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
30
+ ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
31
+ ["APPCIRCLE", "AC_APPCIRCLE"],
32
+ ["BAMBOO", "bamboo_planKey"],
33
+ ["BITBUCKET", "BITBUCKET_COMMIT"],
34
+ ["BITRISE", "BITRISE_IO"],
35
+ ["BUDDY", "BUDDY_WORKSPACE_ID"],
36
+ ["BUILDKITE"],
37
+ ["CIRCLE", "CIRCLECI"],
38
+ ["CIRRUS", "CIRRUS_CI"],
39
+ [
40
+ "CLOUDFLARE_PAGES",
41
+ "CF_PAGES",
42
+ { ci: !0 }
43
+ ],
44
+ [
45
+ "CLOUDFLARE_WORKERS",
46
+ "WORKERS_CI",
47
+ { ci: !0 }
48
+ ],
49
+ ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
50
+ ["CODEFRESH", "CF_BUILD_ID"],
51
+ ["DRONE"],
52
+ ["DRONE", "DRONE_BUILD_EVENT"],
53
+ ["DSARI"],
54
+ ["GITHUB_ACTIONS"],
55
+ ["GITLAB", "GITLAB_CI"],
56
+ ["GITLAB", "CI_MERGE_REQUEST_ID"],
57
+ ["GOCD", "GO_PIPELINE_LABEL"],
58
+ ["LAYERCI"],
59
+ ["HUDSON", "HUDSON_URL"],
60
+ ["JENKINS", "JENKINS_URL"],
61
+ ["MAGNUM"],
62
+ ["NETLIFY"],
63
+ [
64
+ "NETLIFY",
65
+ "NETLIFY_LOCAL",
66
+ { ci: !1 }
67
+ ],
68
+ ["NEVERCODE"],
69
+ ["RENDER"],
70
+ ["SAIL", "SAILCI"],
71
+ ["SEMAPHORE"],
72
+ ["SCREWDRIVER"],
73
+ ["SHIPPABLE"],
74
+ ["SOLANO", "TDDIUM"],
75
+ ["STRIDER"],
76
+ ["TEAMCITY", "TEAMCITY_VERSION"],
77
+ ["TRAVIS"],
78
+ ["VERCEL", "NOW_BUILDER"],
79
+ [
80
+ "VERCEL",
81
+ "VERCEL",
82
+ { ci: !1 }
83
+ ],
84
+ [
85
+ "VERCEL",
86
+ "VERCEL_ENV",
87
+ { ci: !1 }
88
+ ],
89
+ ["APPCENTER", "APPCENTER_BUILD_ID"],
90
+ [
91
+ "CODESANDBOX",
92
+ "CODESANDBOX_SSE",
93
+ { ci: !1 }
94
+ ],
95
+ [
96
+ "CODESANDBOX",
97
+ "CODESANDBOX_HOST",
98
+ { ci: !1 }
99
+ ],
100
+ ["STACKBLITZ"],
101
+ ["STORMKIT"],
102
+ ["CLEAVR"],
103
+ ["ZEABUR"],
104
+ [
105
+ "CODESPHERE",
106
+ "CODESPHERE_APP_ID",
107
+ { ci: !0 }
108
+ ],
109
+ ["RAILWAY", "RAILWAY_PROJECT_ID"],
110
+ ["RAILWAY", "RAILWAY_SERVICE_ID"],
111
+ ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
112
+ [
113
+ "FIREBASE_APP_HOSTING",
114
+ "FIREBASE_APP_HOSTING",
115
+ { ci: !0 }
116
+ ]
117
+ ];
118
+ function b() {
119
+ if (globalThis.process?.env) for (const e of f) {
120
+ const s = e[1] || e[0];
121
+ if (globalThis.process?.env[s]) return {
122
+ name: e[0].toLowerCase(),
123
+ ...e[2]
124
+ };
125
+ }
126
+ return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? {
127
+ name: "stackblitz",
128
+ ci: !1
129
+ } : {
130
+ name: "",
131
+ ci: !1
132
+ };
133
+ }
134
+ const l = b(), p = l.name;
135
+ function n(e) {
136
+ return e ? e !== "false" : !1;
137
+ }
138
+ const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== !1, R = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), U = typeof window < "u", d = n(o.DEBUG), a = t === "test" || n(o.TEST), g = t === "production", h = t === "dev" || t === "development", v = n(o.MINIMAL) || T || a || !R, A = /^win/i.test(I), M = /^linux/i.test(I), m = /^darwin/i.test(I), Y = !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (R || A) && o.TERM !== "dumb" || T), C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null, V = Number(C?.split(".")[0]) || null, W = globalThis.process || Object.create(null), _ = { versions: {} }, y = new Proxy(W, { get(e, s) {
139
+ if (s === "env") return o;
140
+ if (s in e) return e[s];
141
+ if (s in _) return _[s];
142
+ } }), O = globalThis.process?.release?.name === "node", c = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
143
+ [S, "netlify"],
144
+ [u, "edge-light"],
145
+ [N, "workerd"],
146
+ [L, "fastly"],
147
+ [D, "deno"],
148
+ [c, "bun"],
149
+ [O, "node"]
150
+ ];
151
+ function G() {
152
+ const e = F.find((s) => s[0]);
153
+ if (e) return { name: e[1] };
154
+ }
155
+ const P = G(), K = P?.name || "";
156
+
157
+ //#endregion
158
+ export { p as i, a as n, d as r, T as t };
@@ -0,0 +1,51 @@
1
+ import { s as __toESM } from "../_chunks/DXMHy5ca.mjs";
2
+ import { t as require_js_tokens } from "./js-tokens.mjs";
3
+
4
+ //#region node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs
5
+ var import_js_tokens = /* @__PURE__ */ __toESM(require_js_tokens(), 1);
6
+ const FILL_COMMENT = " ";
7
+ function stripLiteralFromToken(token, fillChar, filter) {
8
+ if (token.type === "SingleLineComment") return FILL_COMMENT.repeat(token.value.length);
9
+ if (token.type === "MultiLineComment") return token.value.replace(/[^\n]/g, FILL_COMMENT);
10
+ if (token.type === "StringLiteral") {
11
+ if (!token.closed) return token.value;
12
+ const body = token.value.slice(1, -1);
13
+ if (filter(body)) return token.value[0] + fillChar.repeat(body.length) + token.value[token.value.length - 1];
14
+ }
15
+ if (token.type === "NoSubstitutionTemplate") {
16
+ const body = token.value.slice(1, -1);
17
+ if (filter(body)) return `\`${body.replace(/[^\n]/g, fillChar)}\``;
18
+ }
19
+ if (token.type === "RegularExpressionLiteral") {
20
+ const body = token.value;
21
+ if (filter(body)) return body.replace(/\/(.*)\/(\w?)$/g, (_, $1, $2) => `/${fillChar.repeat($1.length)}/${$2}`);
22
+ }
23
+ if (token.type === "TemplateHead") {
24
+ const body = token.value.slice(1, -2);
25
+ if (filter(body)) return `\`${body.replace(/[^\n]/g, fillChar)}\${`;
26
+ }
27
+ if (token.type === "TemplateTail") {
28
+ const body = token.value.slice(0, -2);
29
+ if (filter(body)) return `}${body.replace(/[^\n]/g, fillChar)}\``;
30
+ }
31
+ if (token.type === "TemplateMiddle") {
32
+ const body = token.value.slice(1, -2);
33
+ if (filter(body)) return `}${body.replace(/[^\n]/g, fillChar)}\${`;
34
+ }
35
+ return token.value;
36
+ }
37
+ function optionsWithDefaults(options) {
38
+ return {
39
+ fillChar: options?.fillChar ?? " ",
40
+ filter: options?.filter ?? (() => true)
41
+ };
42
+ }
43
+ function stripLiteral(code, options) {
44
+ let result = "";
45
+ const _options = optionsWithDefaults(options);
46
+ for (const token of (0, import_js_tokens.default)(code, { jsx: false })) result += stripLiteralFromToken(token, _options.fillChar, _options.filter);
47
+ return result;
48
+ }
49
+
50
+ //#endregion
51
+ export { stripLiteral as t };
@@ -1,10 +1,12 @@
1
- import V__default from 'fs';
2
- import sysPath__default, { posix } from 'path';
3
- import { fileURLToPath } from 'url';
4
- import { B as Builder } from './fdir.mjs';
5
- import { p as pm } from './picomatch.mjs';
1
+ import { s as __toESM } from "../_chunks/DXMHy5ca.mjs";
2
+ import { t as require_picomatch } from "./picomatch.mjs";
3
+ import { t as Builder } from "./fdir.mjs";
4
+ import nativeFs from "fs";
5
+ import path, { posix } from "path";
6
+ import { fileURLToPath } from "url";
6
7
 
7
- //#region src/utils.ts
8
+ //#region node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
9
+ var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
8
10
  const isReadonlyArray = Array.isArray;
9
11
  const isWin = process.platform === "win32";
10
12
  const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
@@ -18,7 +20,7 @@ function getPartialMatcher(patterns, options = {}) {
18
20
  patternsParts[i] = parts;
19
21
  const partsCount = parts.length;
20
22
  const partMatchers = Array(partsCount);
21
- for (let j = 0; j < partsCount; j++) partMatchers[j] = pm(parts[j], options);
23
+ for (let j = 0; j < partsCount; j++) partMatchers[j] = (0, import_picomatch.default)(parts[j], options);
22
24
  matchers[i] = partMatchers;
23
25
  }
24
26
  return (input) => {
@@ -33,8 +35,7 @@ function getPartialMatcher(patterns, options = {}) {
33
35
  while (j < minParts) {
34
36
  const part = patternParts[j];
35
37
  if (part.includes("/")) return true;
36
- const match = matcher[j](inputParts[j]);
37
- if (!match) break;
38
+ if (!matcher[j](inputParts[j])) break;
38
39
  if (globstarEnabled && part === "**") return true;
39
40
  j++;
40
41
  }
@@ -77,7 +78,7 @@ function buildRelative(cwd, root) {
77
78
  const splitPatternOptions = { parts: true };
78
79
  function splitPattern(path$1) {
79
80
  var _result$parts;
80
- const result = pm.scan(path$1, splitPatternOptions);
81
+ const result = import_picomatch.default.scan(path$1, splitPatternOptions);
81
82
  return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
82
83
  }
83
84
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
@@ -103,15 +104,13 @@ const escapePath = isWin ? escapeWin32Path : escapePosixPath;
103
104
  * @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
104
105
  */
105
106
  function isDynamicPattern(pattern, options) {
106
- const scan = pm.scan(pattern);
107
+ if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
108
+ const scan = import_picomatch.default.scan(pattern);
107
109
  return scan.isGlob || scan.negated;
108
110
  }
109
111
  function log(...tasks) {
110
112
  console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
111
113
  }
112
-
113
- //#endregion
114
- //#region src/index.ts
115
114
  const PARENT_DIRECTORY = /^(\/?\.\.)+/;
116
115
  const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
117
116
  const BACKSLASHES = /\\/g;
@@ -120,7 +119,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
120
119
  if (pattern.endsWith("/")) result = pattern.slice(0, -1);
121
120
  if (!result.endsWith("*") && expandDirectories) result += "/**";
122
121
  const escapedCwd = escapePath(cwd);
123
- if (sysPath__default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
122
+ if (path.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
124
123
  else result = posix.normalize(result);
125
124
  const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
126
125
  const parts = splitPattern(result);
@@ -177,17 +176,17 @@ function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories =
177
176
  ignore: ignorePatterns
178
177
  };
179
178
  }
180
- function formatPaths(paths, relative) {
179
+ function formatPaths(paths, relative$1) {
181
180
  for (let i = paths.length - 1; i >= 0; i--) {
182
181
  const path$1 = paths[i];
183
- paths[i] = relative(path$1);
182
+ paths[i] = relative$1(path$1);
184
183
  }
185
184
  return paths;
186
185
  }
187
186
  function normalizeCwd(cwd) {
188
187
  if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
189
188
  if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/");
190
- return sysPath__default.resolve(cwd).replace(BACKSLASHES, "/");
189
+ return path.resolve(cwd).replace(BACKSLASHES, "/");
191
190
  }
192
191
  function getCrawler(patterns, inputOptions = {}) {
193
192
  const options = process.env.TINYGLOBBY_DEBUG ? {
@@ -222,11 +221,11 @@ function getCrawler(patterns, inputOptions = {}) {
222
221
  noglobstar: options.globstar === false,
223
222
  posix: true
224
223
  };
225
- const matcher = pm(processed.match, {
224
+ const matcher = (0, import_picomatch.default)(processed.match, {
226
225
  ...matchOptions,
227
226
  ignore: processed.ignore
228
227
  });
229
- const ignore = pm(processed.ignore, matchOptions);
228
+ const ignore = (0, import_picomatch.default)(processed.ignore, matchOptions);
230
229
  const partialMatcher = getPartialMatcher(processed.match, matchOptions);
231
230
  const format = buildFormat(cwd, props.root, options.absolute);
232
231
  const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true);
@@ -248,12 +247,12 @@ function getCrawler(patterns, inputOptions = {}) {
248
247
  return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
249
248
  },
250
249
  fs: options.fs ? {
251
- readdir: options.fs.readdir || V__default.readdir,
252
- readdirSync: options.fs.readdirSync || V__default.readdirSync,
253
- realpath: options.fs.realpath || V__default.realpath,
254
- realpathSync: options.fs.realpathSync || V__default.realpathSync,
255
- stat: options.fs.stat || V__default.stat,
256
- statSync: options.fs.statSync || V__default.statSync
250
+ readdir: options.fs.readdir || nativeFs.readdir,
251
+ readdirSync: options.fs.readdirSync || nativeFs.readdirSync,
252
+ realpath: options.fs.realpath || nativeFs.realpath,
253
+ realpathSync: options.fs.realpathSync || nativeFs.realpathSync,
254
+ stat: options.fs.stat || nativeFs.stat,
255
+ statSync: options.fs.statSync || nativeFs.statSync
257
256
  } : void 0,
258
257
  pathSeparator: "/",
259
258
  relativePaths: true,
@@ -277,17 +276,17 @@ function getCrawler(patterns, inputOptions = {}) {
277
276
  props.root = props.root.replace(BACKSLASHES, "");
278
277
  const root = props.root;
279
278
  if (options.debug) log("internal properties:", props);
280
- const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
281
- return [new Builder(fdirOptions).crawl(root), relative];
279
+ const relative$1 = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
280
+ return [new Builder(fdirOptions).crawl(root), relative$1];
282
281
  }
283
282
  async function glob(patternsOrOptions, options) {
284
283
  if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
285
284
  const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string";
286
285
  const opts = isModern ? options : patternsOrOptions;
287
- const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns;
288
- const [crawler, relative] = getCrawler(patterns, opts);
289
- if (!relative) return crawler.withPromise();
290
- return formatPaths(await crawler.withPromise(), relative);
286
+ const [crawler, relative$1] = getCrawler(isModern ? patternsOrOptions : patternsOrOptions.patterns, opts);
287
+ if (!relative$1) return crawler.withPromise();
288
+ return formatPaths(await crawler.withPromise(), relative$1);
291
289
  }
292
290
 
293
- export { glob as g };
291
+ //#endregion
292
+ export { glob as t };
@@ -0,0 +1,138 @@
1
+ //#region node_modules/.pnpm/ultrahtml@1.6.0/node_modules/ultrahtml/dist/index.js
2
+ var S = Symbol("Fragment"), D = new Set([
3
+ "area",
4
+ "base",
5
+ "br",
6
+ "col",
7
+ "embed",
8
+ "hr",
9
+ "img",
10
+ "input",
11
+ "keygen",
12
+ "link",
13
+ "meta",
14
+ "param",
15
+ "source",
16
+ "track",
17
+ "wbr"
18
+ ]), x = new Set(["script", "style"]), o = /(?:<(\/?)([a-zA-Z][a-zA-Z0-9\:-]*)(?:\s([^>]*?))?((?:\s*\/)?)>|(<\!\-\-)([\s\S]*?)(\-\->)|(<\!)([\s\S]*?)(>))/gm, b = /[\@\.a-z0-9_\:\-]/i;
19
+ function I(e) {
20
+ let t = {};
21
+ if (e) {
22
+ let i = "none", r, n = "", a, l;
23
+ for (let c = 0; c < e.length; c++) {
24
+ let d = e[c];
25
+ i === "none" ? b.test(d) ? (r && (t[r] = n, r = void 0, n = ""), a = c, i = "key") : d === "=" && r && (i = "value") : i === "key" ? b.test(d) || (r = e.substring(a, c), d === "=" ? i = "value" : i = "none") : d === l && c > 0 && e[c - 1] !== "\\" ? l && (n = e.substring(a, c), l = void 0, i = "none") : (d === "\"" || d === "'") && !l && (a = c + 1, l = d);
26
+ }
27
+ i === "key" && a != null && a < e.length && (r = e.substring(a, e.length)), r && (t[r] = n);
28
+ }
29
+ return t;
30
+ }
31
+ function P(e) {
32
+ let t = typeof e == "string" ? e : e.value, i, r, n, a, l, c, d, m, s, u = [];
33
+ o.lastIndex = 0, r = i = {
34
+ type: 0,
35
+ children: []
36
+ };
37
+ let g = 0;
38
+ function h() {
39
+ a = t.substring(g, o.lastIndex - n[0].length), a && r.children.push({
40
+ type: 2,
41
+ value: a,
42
+ parent: r
43
+ });
44
+ }
45
+ for (; n = o.exec(t);) {
46
+ if (c = n[5] || n[8], d = n[6] || n[9], m = n[7] || n[10], x.has(r.name) && n[2] !== r.name) {
47
+ l = o.lastIndex - n[0].length, r.children.length > 0 && (r.children[0].value += n[0]);
48
+ continue;
49
+ } else if (c === "<!--") {
50
+ if (l = o.lastIndex - n[0].length, x.has(r.name)) continue;
51
+ s = {
52
+ type: 3,
53
+ value: d,
54
+ parent: r,
55
+ loc: [{
56
+ start: l,
57
+ end: l + c.length
58
+ }, {
59
+ start: o.lastIndex - m.length,
60
+ end: o.lastIndex
61
+ }]
62
+ }, u.push(s), s.parent.children.push(s);
63
+ } else if (c === "<!") l = o.lastIndex - n[0].length, s = {
64
+ type: 4,
65
+ value: d,
66
+ parent: r,
67
+ loc: [{
68
+ start: l,
69
+ end: l + c.length
70
+ }, {
71
+ start: o.lastIndex - m.length,
72
+ end: o.lastIndex
73
+ }]
74
+ }, u.push(s), s.parent.children.push(s);
75
+ else if (n[1] !== "/") if (h(), x.has(r.name)) {
76
+ g = o.lastIndex, h();
77
+ continue;
78
+ } else s = {
79
+ type: 1,
80
+ name: n[2] + "",
81
+ attributes: I(n[3]),
82
+ parent: r,
83
+ children: [],
84
+ loc: [{
85
+ start: o.lastIndex - n[0].length,
86
+ end: o.lastIndex
87
+ }]
88
+ }, u.push(s), s.parent.children.push(s), n[4] && n[4].indexOf("/") > -1 || D.has(s.name) ? (s.loc[1] = s.loc[0], s.isSelfClosingTag = !0) : r = s;
89
+ else h(), n[2] + "" === r.name ? (s = r, r = s.parent, s.loc.push({
90
+ start: o.lastIndex - n[0].length,
91
+ end: o.lastIndex
92
+ }), a = t.substring(s.loc[0].end, s.loc[1].start), s.children.length === 0 && s.children.push({
93
+ type: 2,
94
+ value: a,
95
+ parent: r
96
+ })) : n[2] + "" === u[u.length - 1].name && u[u.length - 1].isSelfClosingTag === !0 && (s = u[u.length - 1], s.loc.push({
97
+ start: o.lastIndex - n[0].length,
98
+ end: o.lastIndex
99
+ }));
100
+ g = o.lastIndex;
101
+ }
102
+ return a = t.slice(g), r.children.push({
103
+ type: 2,
104
+ value: a,
105
+ parent: r
106
+ }), i;
107
+ }
108
+ var T = class {
109
+ constructor(t) {
110
+ this.callback = t;
111
+ }
112
+ async visit(t, i, r) {
113
+ if (await this.callback(t, i, r), Array.isArray(t.children)) {
114
+ let n = [];
115
+ for (let a = 0; a < t.children.length; a++) {
116
+ let l = t.children[a];
117
+ n.push(this.visit(l, t, a));
118
+ }
119
+ await Promise.all(n);
120
+ }
121
+ }
122
+ }, O = class {
123
+ constructor(t) {
124
+ this.callback = t;
125
+ }
126
+ visit(t, i, r) {
127
+ if (this.callback(t, i, r), Array.isArray(t.children)) for (let n = 0; n < t.children.length; n++) {
128
+ let a = t.children[n];
129
+ this.visit(a, t, n);
130
+ }
131
+ }
132
+ }, p = Symbol("HTMLString"), M = Symbol("AttrString"), f = Symbol("RenderFn");
133
+ function z(e, t) {
134
+ return new T(t).visit(e);
135
+ }
136
+
137
+ //#endregion
138
+ export { z as n, P as t };