@genai-fi/nanogpt 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/dist/{DatasetBuilder-DU1G1OKX.js → DatasetBuilder-DRDW8tcM.js} +85 -86
  2. package/dist/Generator-BcR_14Cj.js +316 -0
  3. package/dist/{RealDiv-CSnvtN2E.js → RealDiv-Cl8k3YTx.js} +54 -62
  4. package/dist/{Reshape-BlylqwWy.js → Reshape-CKxKPKqi.js} +9 -12
  5. package/dist/Reshape-H5zZRgr9.js +16 -0
  6. package/dist/RoPECache-dYscFINl.js +722 -0
  7. package/dist/TeachableLLM.js +29 -34
  8. package/dist/api/beamer.js +5 -6
  9. package/dist/api/responses.js +11 -12
  10. package/dist/api/training.js +12 -14
  11. package/dist/axis_util-rF9RnwKE.js +37 -0
  12. package/dist/backend.js +5 -6
  13. package/dist/{backend_util-DAV0I34P.js → backend_util-Cpp0Gwlp.js} +180 -185
  14. package/dist/{binary_op_util-CrYk9LXL.js → binary_op_util-WY9YIl0q.js} +3 -7
  15. package/dist/broadcast_to-CGvLNiQ0.js +20 -0
  16. package/dist/checks/appendCache.js +7 -7
  17. package/dist/checks/attentionMask.js +9 -8
  18. package/dist/checks/check.js +1 -2
  19. package/dist/checks/gelu.js +6 -6
  20. package/dist/checks/index.js +24 -25
  21. package/dist/checks/matMulGelu.js +7 -7
  22. package/dist/checks/normRMS.js +14 -12
  23. package/dist/checks/normRMSGrad.js +9 -8
  24. package/dist/checks/packUnpack.js +7 -7
  25. package/dist/checks/qkv.js +1 -34
  26. package/dist/checks/rope.js +6 -6
  27. package/dist/checks/weights.js +1 -2
  28. package/dist/clip_by_value-D-UX9am5.js +13 -0
  29. package/dist/complex-Cl904TqN.js +13 -0
  30. package/dist/{complex_util-CkazZsaH.js → complex_util-BBlPAm-s.js} +1 -2
  31. package/dist/concat-Oip5acVY.js +14 -0
  32. package/dist/{concat_util-CWzvQQlK.js → concat_util-CY45Hf4F.js} +2 -3
  33. package/dist/data/docx.js +3 -4
  34. package/dist/data/pdf.js +11 -14
  35. package/dist/data/stream.js +1 -2
  36. package/dist/data/textLoader.js +16 -15
  37. package/dist/data-CV_i_H6B.js +11 -0
  38. package/dist/data.js +5 -12
  39. package/dist/dist-CMMLi-qO.js +2675 -0
  40. package/dist/{dist-BGVm64AY.js → dist-DeVH1nGn.js} +1465 -1573
  41. package/dist/{dist-CwK5S7Ls.js → dist-DyL7qSLJ.js} +2664 -2400
  42. package/dist/dropout16-CA31Ud5a.js +20 -0
  43. package/dist/dropout_util-SiFMbFXz.js +22 -0
  44. package/dist/{eventemitter3-D_qV3Lof.js → eventemitter3-wmfmOP_f.js} +2 -3
  45. package/dist/expand_dims-Dh3Fulyn.js +10 -0
  46. package/dist/floor-BwjmUb7X.js +8 -0
  47. package/dist/gather-B5Z1RFt5.js +14 -0
  48. package/dist/gatherSub-CRUfUzBa.js +22 -0
  49. package/dist/gelu-Xx9-ohH9.js +25 -0
  50. package/dist/{gpgpu_math-20tPK8LM.js → gpgpu_math-48m8q3jI.js} +265 -286
  51. package/dist/inference/Beamer.js +34 -27
  52. package/dist/inference/Generator.js +1 -273
  53. package/dist/inference/tokenisePrompt.js +5 -4
  54. package/dist/inference/types.d.ts +6 -0
  55. package/dist/inference/utilities.js +1 -2
  56. package/dist/{jszip.min-DKa1Rjyn.js → jszip.min-Btv48m44.js} +68 -64
  57. package/dist/{kernel_funcs_utils-ql8Y8qPn.js → kernel_funcs_utils-BYRpSfV_.js} +39 -42
  58. package/dist/layers/BaseLayer.js +9 -10
  59. package/dist/layers/GQA.js +45 -44
  60. package/dist/layers/HeadLayer.js +13 -13
  61. package/dist/layers/LoRA.js +17 -20
  62. package/dist/layers/MHA.d.ts +2 -2
  63. package/dist/layers/MHA.js +46 -45
  64. package/dist/layers/MLP.js +22 -21
  65. package/dist/layers/PositionEmbedding.js +14 -13
  66. package/dist/layers/RMSNorm.js +14 -13
  67. package/dist/layers/RoPECache.js +1 -338
  68. package/dist/layers/TiedEmbedding.js +15 -14
  69. package/dist/layers/TransformerBlock.d.ts +3 -9
  70. package/dist/layers/TransformerBlock.js +29 -30
  71. package/dist/layers/WeightStore.js +4 -5
  72. package/dist/layers-CFqEip3s.js +13 -0
  73. package/dist/layers.js +3 -11
  74. package/dist/loader/load.js +27 -24
  75. package/dist/loader/loadHF.js +3 -3
  76. package/dist/loader/loadTransformers.js +5 -6
  77. package/dist/loader/loadZipMeta.js +1 -2
  78. package/dist/loader/newZipLoad.js +1 -2
  79. package/dist/loader/oldZipLoad.js +8 -9
  80. package/dist/loader/save.js +15 -16
  81. package/dist/main.js +3281 -3463
  82. package/dist/{matMul16-CO1QhsRt.js → matMul16-tE26fnhf.js} +29 -27
  83. package/dist/{matMulGelu-CBoqTZM7.js → matMulGelu-ASUWlKqu.js} +33 -33
  84. package/dist/mat_mul-R9_DWmIT.js +16 -0
  85. package/dist/models/Llama.js +48 -49
  86. package/dist/models/NanoGPTV1.js +53 -54
  87. package/dist/models/NanoGPTV2.js +48 -49
  88. package/dist/models/Qwen3.js +48 -49
  89. package/dist/models/config.js +3 -8
  90. package/dist/models/factory.js +7 -8
  91. package/dist/models/model.d.ts +5 -7
  92. package/dist/models/model.js +1 -2
  93. package/dist/models-DyBpJJwM.js +13 -0
  94. package/dist/models.js +6 -14
  95. package/dist/mul16-C7sqgqik.js +41 -0
  96. package/dist/non_max_suppression_impl-B0H318rb.js +72 -0
  97. package/dist/not_equal-Bu3O8rh_.js +67 -0
  98. package/dist/one_hot-TEMPumJj.js +14 -0
  99. package/dist/ones-DpPXWa6A.js +13 -0
  100. package/dist/ops/adamAdjust.js +2 -3
  101. package/dist/ops/adamMoments.js +2 -3
  102. package/dist/ops/add16.js +2 -3
  103. package/dist/ops/appendCache.js +9 -8
  104. package/dist/ops/attentionMask.d.ts +1 -1
  105. package/dist/ops/attentionMask.js +8 -5
  106. package/dist/ops/concat16.js +5 -5
  107. package/dist/ops/cpu/adamAdjust.js +7 -8
  108. package/dist/ops/cpu/adamMoments.js +5 -5
  109. package/dist/ops/cpu/appendCache.js +3 -3
  110. package/dist/ops/cpu/attentionMask.js +12 -8
  111. package/dist/ops/cpu/fusedSoftmax.js +3 -3
  112. package/dist/ops/cpu/gatherSub.js +1 -12
  113. package/dist/ops/cpu/gelu.js +12 -13
  114. package/dist/ops/cpu/matMul16.js +7 -7
  115. package/dist/ops/cpu/matMulGelu.js +21 -18
  116. package/dist/ops/cpu/matMulMul.js +8 -9
  117. package/dist/ops/cpu/mulDropout.js +8 -9
  118. package/dist/ops/cpu/normRMS.js +12 -13
  119. package/dist/ops/cpu/qkv.js +14 -13
  120. package/dist/ops/cpu/rope.js +11 -8
  121. package/dist/ops/cpu/scatterSub.js +1 -12
  122. package/dist/ops/dot16.js +16 -17
  123. package/dist/ops/dropout.js +9 -8
  124. package/dist/ops/dropout16.js +1 -22
  125. package/dist/ops/gatherSub.js +3 -4
  126. package/dist/ops/gelu.js +1 -2
  127. package/dist/ops/globalNorm.js +10 -10
  128. package/dist/ops/grads/add16.js +16 -17
  129. package/dist/ops/grads/attentionMask.js +6 -7
  130. package/dist/ops/grads/dropout16.js +1 -1
  131. package/dist/ops/grads/gelu.js +1 -2
  132. package/dist/ops/grads/matMul16.js +1 -2
  133. package/dist/ops/grads/matMulGelu.js +6 -7
  134. package/dist/ops/grads/mul16.js +1 -1
  135. package/dist/ops/grads/normRMS.js +8 -9
  136. package/dist/ops/grads/pack16.js +1 -2
  137. package/dist/ops/grads/qkv.js +10 -10
  138. package/dist/ops/grads/rope.js +1 -2
  139. package/dist/ops/grads/silu.js +1 -2
  140. package/dist/ops/grads/softmax16.js +6 -7
  141. package/dist/ops/grads/unpack16.js +1 -2
  142. package/dist/ops/grads/utils.js +1 -2
  143. package/dist/ops/matMul16.d.ts +1 -1
  144. package/dist/ops/matMul16.js +1 -2
  145. package/dist/ops/matMulGelu.js +3 -4
  146. package/dist/ops/matMulMul.js +2 -3
  147. package/dist/ops/mul16.js +1 -43
  148. package/dist/ops/mulDrop.js +2 -3
  149. package/dist/ops/normRMS.js +2 -3
  150. package/dist/ops/pack16.js +1 -2
  151. package/dist/ops/qkv.js +2 -3
  152. package/dist/ops/reshape16.js +11 -11
  153. package/dist/ops/rope.js +1 -2
  154. package/dist/ops/scatterSub.js +3 -4
  155. package/dist/ops/silu.js +1 -2
  156. package/dist/ops/slice16.js +5 -5
  157. package/dist/ops/softmax16.js +3 -4
  158. package/dist/ops/sub16.js +3 -4
  159. package/dist/ops/sum16.js +3 -3
  160. package/dist/ops/transpose16.js +16 -15
  161. package/dist/ops/unpack16.js +1 -2
  162. package/dist/ops/webgl/adamAdjust.js +8 -9
  163. package/dist/ops/webgl/adamMoments.js +2 -3
  164. package/dist/ops/webgl/appendCache.js +2 -3
  165. package/dist/ops/webgl/attentionMask.js +2 -3
  166. package/dist/ops/webgl/dropout16.js +2 -3
  167. package/dist/ops/webgl/fusedSoftmax.js +13 -13
  168. package/dist/ops/webgl/gatherSub.js +2 -3
  169. package/dist/ops/webgl/gelu.js +11 -12
  170. package/dist/ops/webgl/log.js +10 -10
  171. package/dist/ops/webgl/matMul16.js +31 -24
  172. package/dist/ops/webgl/matMulGelu.js +1 -2
  173. package/dist/ops/webgl/matMulMul.js +3 -4
  174. package/dist/ops/webgl/mulDropout.js +2 -3
  175. package/dist/ops/webgl/normRMS.js +11 -10
  176. package/dist/ops/webgl/qkv.js +2 -3
  177. package/dist/ops/webgl/rope.js +4 -5
  178. package/dist/ops/webgl/scatterSub.js +2 -3
  179. package/dist/ops/webgpu/adamAdjust.js +13 -14
  180. package/dist/ops/webgpu/adamMoments.js +13 -14
  181. package/dist/ops/webgpu/add16.js +3 -4
  182. package/dist/ops/webgpu/appendCache.js +20 -21
  183. package/dist/ops/webgpu/attentionMask.js +18 -19
  184. package/dist/ops/webgpu/attentionMask32_program.js +7 -8
  185. package/dist/ops/webgpu/clipScale.js +11 -12
  186. package/dist/ops/webgpu/concat16.js +17 -18
  187. package/dist/ops/webgpu/dropout16.js +6 -7
  188. package/dist/ops/webgpu/gatherSub.js +11 -12
  189. package/dist/ops/webgpu/gelu.js +10 -11
  190. package/dist/ops/webgpu/index.js +17 -17
  191. package/dist/ops/webgpu/matMul16.js +74 -63
  192. package/dist/ops/webgpu/matMul16_program.d.ts +2 -1
  193. package/dist/ops/webgpu/matMul16_program.js +29 -21
  194. package/dist/ops/webgpu/mul16.js +3 -4
  195. package/dist/ops/webgpu/norm2.js +9 -10
  196. package/dist/ops/webgpu/normRMS.js +9 -10
  197. package/dist/ops/webgpu/normRMS16_program.js +1 -2
  198. package/dist/ops/webgpu/normRMS32_program.js +1 -2
  199. package/dist/ops/webgpu/normRMSGrad.js +30 -30
  200. package/dist/ops/webgpu/pack16.js +2 -3
  201. package/dist/ops/webgpu/pack16_program.js +3 -4
  202. package/dist/ops/webgpu/qkv.js +10 -11
  203. package/dist/ops/webgpu/rope.js +26 -27
  204. package/dist/ops/webgpu/scatterSub.js +12 -13
  205. package/dist/ops/webgpu/silu.js +10 -11
  206. package/dist/ops/webgpu/slice16.js +17 -18
  207. package/dist/ops/webgpu/softmax16.js +9 -9
  208. package/dist/ops/webgpu/softmax16_program.js +9 -10
  209. package/dist/ops/webgpu/softmax16_subgroup_program.js +11 -12
  210. package/dist/ops/webgpu/softmax16grad.js +8 -9
  211. package/dist/ops/webgpu/sub16.js +3 -4
  212. package/dist/ops/webgpu/sum16.js +16 -15
  213. package/dist/ops/webgpu/transpose16.js +13 -12
  214. package/dist/ops/webgpu/transpose16_program.js +3 -4
  215. package/dist/ops/webgpu/transpose16_shared_program.js +17 -18
  216. package/dist/ops/webgpu/unpack16.js +8 -9
  217. package/dist/ops/webgpu/utils/binary_op.js +20 -21
  218. package/dist/ops/webgpu/utils/deviceInfo.js +1 -2
  219. package/dist/ops/webgpu/utils/reductions.js +21 -20
  220. package/dist/ops-Be5ACU5R.js +13 -0
  221. package/dist/ops-C1UpdEYM.js +509 -0
  222. package/dist/{pack16-BhuXNUS7.js → pack16-BHO4t1-M.js} +14 -17
  223. package/dist/pad-Dy-1IP3A.js +13 -0
  224. package/dist/patches/webgpu_backend.js +18 -19
  225. package/dist/patches/webgpu_base.js +2 -3
  226. package/dist/patches/webgpu_program.js +21 -22
  227. package/dist/{pdf-Bzuk68Vy.js → pdf-CbnQ75VG.js} +380 -701
  228. package/dist/{picomatch-BO4HbNfo.js → picomatch--TW6gyBJ.js} +229 -291
  229. package/dist/qkv-BQfNPucX.js +42 -0
  230. package/dist/rand_util-_vCY93Uw.js +44 -0
  231. package/dist/random_normal-DUIT8kyC.js +11 -0
  232. package/dist/range-CYvQC3fW.js +13 -0
  233. package/dist/relu-C4XULT8A.js +8 -0
  234. package/dist/reshape-DJb1jgMt.js +8 -0
  235. package/dist/resize_nearest_neighbor-DAqcTYUe.js +188 -0
  236. package/dist/{chunk-CWhphoD1.js → rolldown-runtime-CwxnZyOB.js} +4 -5
  237. package/dist/{rope-BPu_uooz.js → rope-JjBVufF_.js} +6 -8
  238. package/dist/scatterSub-BOnqk-uY.js +27 -0
  239. package/dist/scatter_nd_util-BepMCpLY.js +34 -0
  240. package/dist/seedrandom-SHEGFK6H.js +282 -0
  241. package/dist/selu_util-DeOTf-sc.js +27 -0
  242. package/dist/shared-BIDMUBCs.js +1864 -0
  243. package/dist/{shared-CfTzpULd.js → shared-CX_iPI5K.js} +2 -3
  244. package/dist/silu-DsAE2cJ5.js +23 -0
  245. package/dist/slice-Dlb1FlzG.js +13 -0
  246. package/dist/{slice_util-Dve4TkDn.js → slice_util-BVgPRoij.js} +3 -4
  247. package/dist/softmax-Dpav_dWw.js +10 -0
  248. package/dist/split-DYnT8chz.js +11 -0
  249. package/dist/squeeze-B3XYGAlg.js +9 -0
  250. package/dist/stack-Dbbt9mIk.js +10 -0
  251. package/dist/step-DA-5DNu9.js +348 -0
  252. package/dist/{stream-BpAwcvHz.js → stream-BBe2apn4.js} +68 -88
  253. package/dist/sum-C8qNbFNp.js +13 -0
  254. package/dist/tensor-ALxWZfmz.js +7 -0
  255. package/dist/tensor1d-BHgkkhTE.js +9 -0
  256. package/dist/tensor2d-ARItvqVn.js +10 -0
  257. package/dist/tensor4d-D1zRBipJ.js +10 -0
  258. package/dist/tfjs_backend-CsXOum0h.js +685 -0
  259. package/dist/tile-DfyQ0KX-.js +10 -0
  260. package/dist/tokenise-DbS2Ea-T.js +14 -0
  261. package/dist/tokenise.js +6 -15
  262. package/dist/tokeniser/BaseTokeniser.js +5 -9
  263. package/dist/tokeniser/CharTokeniser.js +1 -2
  264. package/dist/tokeniser/bpe.js +19 -20
  265. package/dist/topk-BrU2pkrR.js +19 -0
  266. package/dist/training/AdamW.js +35 -31
  267. package/dist/training/BasicTrainer.js +56 -56
  268. package/dist/training/DatasetBuilder.js +1 -2
  269. package/dist/training/Evaluator.js +4 -4
  270. package/dist/training/LRScheduler.js +1 -2
  271. package/dist/training/PreTrainer.js +7 -8
  272. package/dist/training/SFTTrainer.js +7 -8
  273. package/dist/training/configure.js +16 -15
  274. package/dist/training/factory.js +1 -2
  275. package/dist/training/loss.js +1 -2
  276. package/dist/training/orthoGrad.js +2 -3
  277. package/dist/training/prepareData.js +18 -17
  278. package/dist/training/sparseCrossEntropy.js +38 -32
  279. package/dist/training/tasks/TokenStore.js +21 -22
  280. package/dist/training/tasks/tokenStream.js +1 -2
  281. package/dist/training/validateOptions.js +1 -2
  282. package/dist/training/validation.js +1 -2
  283. package/dist/transpose-BC-M_OoT.js +34 -0
  284. package/dist/unsorted_segment_sum-BelC7R-q.js +408 -0
  285. package/dist/utilities/arrayClose.js +5 -4
  286. package/dist/utilities/arrayShape.js +1 -2
  287. package/dist/utilities/datasetID.js +1 -2
  288. package/dist/utilities/dummy.js +15 -15
  289. package/dist/utilities/float16.js +10 -10
  290. package/dist/utilities/maxHeap.js +1 -2
  291. package/dist/utilities/multinomialCPU.d.ts +1 -2
  292. package/dist/utilities/multinomialCPU.js +6 -8
  293. package/dist/utilities/packed.js +2 -3
  294. package/dist/utilities/parameters.js +3 -4
  295. package/dist/utilities/performance.js +2 -3
  296. package/dist/utilities/profile.js +3 -4
  297. package/dist/utilities/random.js +1 -2
  298. package/dist/utilities/safetensors.js +14 -14
  299. package/dist/utilities/sentences.js +16 -13
  300. package/dist/utilities/tokenParse.js +1 -2
  301. package/dist/utilities/tokens.js +5 -6
  302. package/dist/utilities/topP.d.ts +1 -0
  303. package/dist/utilities/topP.js +20 -13
  304. package/dist/utilities/waitForModel.js +1 -2
  305. package/dist/utilities/weights.js +4 -4
  306. package/dist/utilities/yielder.js +1 -2
  307. package/dist/{v4-BK7K-jy_.js → v4-YCkfo8OR.js} +4 -7
  308. package/dist/{webgpu-IAn9VotJ.js → webgpu-BHX-uBym.js} +156 -163
  309. package/dist/{webgpu_program-B0PokuRJ.js → webgpu_program-DvkFqRlR.js} +28 -29
  310. package/dist/{webgpu_util-DfODg6XI.js → webgpu_util-5QTyovaf.js} +2 -3
  311. package/dist/zeros-hxKGkRfl.js +12 -0
  312. package/package.json +3 -3
  313. package/dist/Reshape-CwxdaU8n.js +0 -17
  314. package/dist/dist-Da20xy8E.js +0 -6375
  315. package/dist/gelu-B6637MKa.js +0 -27
  316. package/dist/selu_util-B_AFEfoz.js +0 -24
  317. package/dist/shared-24EoeHJl.js +0 -1314
  318. package/dist/silu-B6bvCgJ7.js +0 -25
  319. package/dist/tfjs_backend-h5weiy1O.js +0 -614
@@ -1,6 +1,11 @@
1
- import { t as e } from "./chunk-CWhphoD1.js";
2
- //#region node_modules/picomatch/lib/constants.js
3
- var t = /* @__PURE__ */ e(((e, t) => {
1
+ import { t as e } from "./rolldown-runtime-CwxnZyOB.js";
2
+ import { rt as t } from "./dist-CMMLi-qO.js";
3
+ // node_modules/@tensorflow/tfjs-core/dist/ops/variable.js
4
+ function n(e, n = !0, r, i) {
5
+ return t.makeVariable(e, n, r, i);
6
+ }
7
+ // node_modules/picomatch/lib/constants.js
8
+ var r = /* @__PURE__ */ e(((e, t) => {
4
9
  var n = "\\\\/", r = `[^${n}]`, i = 0, a = "\\.", o = "\\+", s = "\\?", c = "\\/", l = "(?=.)", u = "[^/]", d = `(?:${c}|$)`, f = `(?:^|${c})`, p = `${a}{1,2}${d}`, m = {
5
10
  DOT_LITERAL: a,
6
11
  PLUS_LITERAL: o,
@@ -35,7 +40,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
35
40
  };
36
41
  t.exports = {
37
42
  DEFAULT_MAX_EXTGLOB_RECURSION: i,
38
- MAX_LENGTH: 1024 * 64,
43
+ MAX_LENGTH: 65536,
39
44
  POSIX_REGEX_SOURCE: {
40
45
  __proto__: null,
41
46
  alnum: "a-zA-Z0-9",
@@ -141,15 +146,15 @@ var t = /* @__PURE__ */ e(((e, t) => {
141
146
  return e === !0 ? h : m;
142
147
  }
143
148
  };
144
- })), n = /* @__PURE__ */ e(((e) => {
145
- var { REGEX_BACKSLASH: n, REGEX_REMOVE_BACKSLASH: r, REGEX_SPECIAL_CHARS: i, REGEX_SPECIAL_CHARS_GLOBAL: a } = t();
146
- e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => i.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(a, "\\$1"), e.toPosixSlashes = (e) => e.replace(n, "/"), e.isWindows = () => {
149
+ })), i = /* @__PURE__ */ e(((e) => {
150
+ var { REGEX_BACKSLASH: t, REGEX_REMOVE_BACKSLASH: n, REGEX_SPECIAL_CHARS: i, REGEX_SPECIAL_CHARS_GLOBAL: a } = r();
151
+ e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => i.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(a, "\\$1"), e.toPosixSlashes = (e) => e.replace(t, "/"), e.isWindows = () => {
147
152
  if (typeof navigator < "u" && navigator.platform) {
148
153
  let e = navigator.platform.toLowerCase();
149
154
  return e === "win32" || e === "windows";
150
155
  }
151
156
  return typeof process < "u" && process.platform ? process.platform === "win32" : !1;
152
- }, e.removeBackslashes = (e) => e.replace(r, (e) => e === "\\" ? "" : e), e.escapeLast = (t, n, r) => {
157
+ }, e.removeBackslashes = (e) => e.replace(n, (e) => e === "\\" ? "" : e), e.escapeLast = (t, n, r) => {
153
158
  let i = t.lastIndexOf(n, r);
154
159
  return i === -1 ? t : t[i - 1] === "\\" ? e.escapeLast(t, n, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`;
155
160
  }, e.removePrefix = (e, t = {}) => {
@@ -162,128 +167,105 @@ var t = /* @__PURE__ */ e(((e, t) => {
162
167
  let n = e.split(t ? /[\\/]/ : "/"), r = n[n.length - 1];
163
168
  return r === "" ? n[n.length - 2] : r;
164
169
  };
165
- })), r = /* @__PURE__ */ e(((e, r) => {
166
- var i = n(), { CHAR_ASTERISK: a, CHAR_AT: o, CHAR_BACKWARD_SLASH: s, CHAR_COMMA: c, CHAR_DOT: l, CHAR_EXCLAMATION_MARK: u, CHAR_FORWARD_SLASH: d, CHAR_LEFT_CURLY_BRACE: f, CHAR_LEFT_PARENTHESES: p, CHAR_LEFT_SQUARE_BRACKET: m, CHAR_PLUS: h, CHAR_QUESTION_MARK: g, CHAR_RIGHT_CURLY_BRACE: _, CHAR_RIGHT_PARENTHESES: v, CHAR_RIGHT_SQUARE_BRACKET: y } = t(), b = (e) => e === d || e === s, x = (e) => {
170
+ })), a = /* @__PURE__ */ e(((e, t) => {
171
+ var n = i(), { CHAR_ASTERISK: a, CHAR_AT: o, CHAR_BACKWARD_SLASH: s, CHAR_COMMA: c, CHAR_DOT: l, CHAR_EXCLAMATION_MARK: u, CHAR_FORWARD_SLASH: d, CHAR_LEFT_CURLY_BRACE: f, CHAR_LEFT_PARENTHESES: p, CHAR_LEFT_SQUARE_BRACKET: m, CHAR_PLUS: h, CHAR_QUESTION_MARK: g, CHAR_RIGHT_CURLY_BRACE: _, CHAR_RIGHT_PARENTHESES: v, CHAR_RIGHT_SQUARE_BRACKET: y } = r(), b = (e) => e === d || e === s, x = (e) => {
167
172
  e.isPrefix !== !0 && (e.depth = e.isGlobstar ? Infinity : 1);
168
173
  };
169
- r.exports = (e, t) => {
170
- let n = t || {}, r = e.length - 1, S = n.parts === !0 || n.scanToEnd === !0, C = [], w = [], T = [], E = e, D = -1, O = 0, k = 0, A = !1, j = !1, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, R = !1, z = !1, B = 0, V, H, U = {
174
+ t.exports = (e, t) => {
175
+ let r = t || {}, i = e.length - 1, S = r.parts === !0 || r.tokens === !0 || r.scanToEnd === !0, C = [], w = [], T = [], E = e, D = -1, O = 0, k = 0, A = !1, j = !1, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, R = !1, z = !1, B = 0, V, H, U = {
171
176
  value: "",
172
177
  depth: 0,
173
178
  isGlob: !1
174
- }, W = () => D >= r, G = () => E.charCodeAt(D + 1), K = () => (V = H, E.charCodeAt(++D));
175
- for (; D < r;) {
179
+ }, W = () => D >= i, G = () => E.charCodeAt(D + 1), K = () => (V = H, E.charCodeAt(++D));
180
+ for (; D < i;) {
176
181
  H = K();
177
182
  let e;
178
- if (H === s) {
179
- I = U.backslashes = !0, H = K(), H === f && (F = !0);
180
- continue;
181
- }
182
- if (F === !0 || H === f) {
183
- for (B++; W() !== !0 && (H = K());) {
184
- if (H === s) {
185
- I = U.backslashes = !0, K();
186
- continue;
183
+ if (H === s) I = U.backslashes = !0, H = K(), H === f && (F = !0);
184
+ else {
185
+ if (F === !0 || H === f) {
186
+ for (B++; W() !== !0 && (H = K());) if (H === s) I = U.backslashes = !0, K();
187
+ else if (H === f) B++;
188
+ else {
189
+ if (F !== !0 && H === l && (H = K()) === l || F !== !0 && H === c) {
190
+ if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
191
+ break;
192
+ }
193
+ if (H === _ && (B--, B === 0)) {
194
+ F = !1, A = U.isBrace = !0, z = !0;
195
+ break;
196
+ }
187
197
  }
188
- if (H === f) {
189
- B++;
198
+ if (S === !0) continue;
199
+ break;
200
+ }
201
+ if (H === d) {
202
+ if (C.push(D), w.push(U), U = {
203
+ value: "",
204
+ depth: 0,
205
+ isGlob: !1
206
+ }, z === !0) continue;
207
+ if (V === l && D === O + 1) {
208
+ O += 2;
190
209
  continue;
191
210
  }
192
- if (F !== !0 && H === l && (H = K()) === l) {
193
- if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
211
+ k = D + 1;
212
+ } else {
213
+ if (r.noext !== !0 && (H === h || H === o || H === a || H === g || H === u) && G() === p) {
214
+ if (M = U.isGlob = !0, N = U.isExtglob = !0, z = !0, H === u && D === O && (R = !0), S === !0) {
215
+ let e = 0;
216
+ for (; W() !== !0 && (H = K());) if (H === s) I = U.backslashes = !0, K();
217
+ else if (H === p) e++;
218
+ else if (H === v && --e === 0) {
219
+ z = !0;
220
+ break;
221
+ }
222
+ continue;
223
+ }
194
224
  break;
195
225
  }
196
- if (F !== !0 && H === c) {
197
- if (A = U.isBrace = !0, M = U.isGlob = !0, z = !0, S === !0) continue;
226
+ if (H === a) {
227
+ if (V === a && (P = U.isGlobstar = !0), M = U.isGlob = !0, z = !0, S === !0) continue;
198
228
  break;
199
229
  }
200
- if (H === _ && (B--, B === 0)) {
201
- F = !1, A = U.isBrace = !0, z = !0;
230
+ if (H === g) {
231
+ if (M = U.isGlob = !0, z = !0, S === !0) continue;
202
232
  break;
203
233
  }
204
- }
205
- if (S === !0) continue;
206
- break;
207
- }
208
- if (H === d) {
209
- if (C.push(D), w.push(U), U = {
210
- value: "",
211
- depth: 0,
212
- isGlob: !1
213
- }, z === !0) continue;
214
- if (V === l && D === O + 1) {
215
- O += 2;
216
- continue;
217
- }
218
- k = D + 1;
219
- continue;
220
- }
221
- if (n.noext !== !0 && (H === h || H === o || H === a || H === g || H === u) && G() === p) {
222
- if (M = U.isGlob = !0, N = U.isExtglob = !0, z = !0, H === u && D === O && (R = !0), S === !0) {
223
- for (; W() !== !0 && (H = K());) {
224
- if (H === s) {
225
- I = U.backslashes = !0, H = K();
226
- continue;
227
- }
228
- if (H === v) {
229
- M = U.isGlob = !0, z = !0;
234
+ if (H === m) {
235
+ for (; W() !== !0 && (e = K());) if (e === s) I = U.backslashes = !0, K();
236
+ else if (e === y) {
237
+ j = U.isBracket = !0, M = U.isGlob = !0, z = !0;
230
238
  break;
231
239
  }
232
- }
233
- continue;
234
- }
235
- break;
236
- }
237
- if (H === a) {
238
- if (V === a && (P = U.isGlobstar = !0), M = U.isGlob = !0, z = !0, S === !0) continue;
239
- break;
240
- }
241
- if (H === g) {
242
- if (M = U.isGlob = !0, z = !0, S === !0) continue;
243
- break;
244
- }
245
- if (H === m) {
246
- for (; W() !== !0 && (e = K());) {
247
- if (e === s) {
248
- I = U.backslashes = !0, K();
249
- continue;
250
- }
251
- if (e === y) {
252
- j = U.isBracket = !0, M = U.isGlob = !0, z = !0;
240
+ if (S === !0) continue;
253
241
  break;
254
242
  }
255
- }
256
- if (S === !0) continue;
257
- break;
258
- }
259
- if (n.nonegate !== !0 && H === u && D === O) {
260
- L = U.negated = !0, O++;
261
- continue;
262
- }
263
- if (n.noparen !== !0 && H === p) {
264
- if (M = U.isGlob = !0, S === !0) {
265
- for (; W() !== !0 && (H = K());) {
266
- if (H === p) {
267
- I = U.backslashes = !0, H = K();
268
- continue;
243
+ if (r.nonegate !== !0 && H === u && D === O) L = U.negated = !0, O++;
244
+ else {
245
+ if (r.noparen !== !0 && H === p) {
246
+ if (M = U.isGlob = !0, S === !0) {
247
+ let e = 1;
248
+ for (; W() !== !0 && (H = K());) if (H === s) I = U.backslashes = !0, K();
249
+ else if (H === p) e++;
250
+ else if (H === v && --e === 0) {
251
+ z = !0;
252
+ break;
253
+ }
254
+ continue;
255
+ }
256
+ break;
269
257
  }
270
- if (H === v) {
271
- z = !0;
258
+ if (M === !0) {
259
+ if (z = !0, S === !0) continue;
272
260
  break;
273
261
  }
274
262
  }
275
- continue;
276
263
  }
277
- break;
278
- }
279
- if (M === !0) {
280
- if (z = !0, S === !0) continue;
281
- break;
282
264
  }
283
265
  }
284
- n.noext === !0 && (N = !1, M = !1);
266
+ r.noext === !0 && (N = !1, M = !1);
285
267
  let q = E, J = "", Y = "";
286
- O > 0 && (J = E.slice(0, O), E = E.slice(O), k -= O), q && M === !0 && k > 0 ? (q = E.slice(0, k), Y = E.slice(k)) : M === !0 ? (q = "", Y = E) : q = E, q && q !== "" && q !== "/" && q !== E && b(q.charCodeAt(q.length - 1)) && (q = q.slice(0, -1)), n.unescape === !0 && (Y &&= i.removeBackslashes(Y), q && I === !0 && (q = i.removeBackslashes(q)));
268
+ O > 0 && (J = E.slice(0, O), E = E.slice(O), k -= O), q && M === !0 && k > 0 ? (q = E.slice(0, k), Y = E.slice(k)) : M === !0 ? (q = "", Y = E) : q = E, q && q !== "" && q !== "/" && q !== E && b(q.charCodeAt(q.length - 1)) && (q = q.slice(0, -1)), r.unescape === !0 && (Y &&= n.removeBackslashes(Y), q && I === !0 && (q = n.removeBackslashes(q)));
287
269
  let X = {
288
270
  prefix: J,
289
271
  input: e,
@@ -298,22 +280,19 @@ var t = /* @__PURE__ */ e(((e, t) => {
298
280
  negated: L,
299
281
  negatedExtglob: R
300
282
  };
301
- if (n.tokens === !0 && (X.maxDepth = 0, b(H) || w.push(U), X.tokens = w), n.parts === !0 || n.tokens === !0) {
283
+ if (r.tokens === !0 && (X.maxDepth = 0, b(H) || w.push(U), X.tokens = w), r.parts === !0 || r.tokens === !0) {
302
284
  let t;
303
- for (let r = 0; r < C.length; r++) {
304
- let i = t ? t + 1 : O, a = C[r], o = e.slice(i, a);
305
- n.tokens && (r === 0 && O !== 0 ? (w[r].isPrefix = !0, w[r].value = J) : w[r].value = o, x(w[r]), X.maxDepth += w[r].depth), (r !== 0 || o !== "") && T.push(o), t = a;
306
- }
307
- if (t && t + 1 < e.length) {
308
- let r = e.slice(t + 1);
309
- T.push(r), n.tokens && (w[w.length - 1].value = r, x(w[w.length - 1]), X.maxDepth += w[w.length - 1].depth);
285
+ for (let n = 0; n < C.length; n++) {
286
+ let i = t === void 0 ? O : t + 1, a = C[n], o = e.slice(i, a);
287
+ r.tokens && (n === 0 && O !== 0 ? (w[n].isPrefix = !0, w[n].value = J) : w[n].value = o, x(w[n]), X.maxDepth += w[n].depth), a >= O && (T.push(o), t = a);
310
288
  }
311
- X.slashes = C, X.parts = T;
289
+ let n = t === void 0 ? O : t + 1, i = e.slice(n);
290
+ T.push(i), r.tokens && t && t + 1 < e.length && (w[w.length - 1].value = i, x(w[w.length - 1]), X.maxDepth += w[w.length - 1].depth), X.slashes = C, X.parts = T;
312
291
  }
313
292
  return X;
314
293
  };
315
- })), i = /* @__PURE__ */ e(((e, r) => {
316
- var i = t(), a = n(), { MAX_LENGTH: o, POSIX_REGEX_SOURCE: s, REGEX_NON_SPECIAL_CHARS: c, REGEX_SPECIAL_CHARS_BACKREF: l, REPLACEMENTS: u } = i, d = (e, t) => {
294
+ })), o = /* @__PURE__ */ e(((e, t) => {
295
+ var n = r(), a = i(), { MAX_LENGTH: o, POSIX_REGEX_SOURCE: s, REGEX_NON_SPECIAL_CHARS: c, REGEX_SPECIAL_CHARS_BACKREF: l, REPLACEMENTS: u } = n, d = (e, t) => {
317
296
  if (typeof t.expandRange == "function") return t.expandRange(...e, t);
318
297
  e.sort();
319
298
  let n = `[${e.join("-")}]`;
@@ -325,19 +304,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
325
304
  return n;
326
305
  }, f = (e, t) => `Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`, p = (e) => {
327
306
  let t = [], n = 0, r = 0, i = 0, a = "", o = !1;
328
- for (let s of e) {
329
- if (o === !0) {
330
- a += s, o = !1;
331
- continue;
332
- }
333
- if (s === "\\") {
334
- a += s, o = !0;
335
- continue;
336
- }
337
- if (s === "\"") {
338
- i = i === 1 ? 0 : 1, a += s;
339
- continue;
340
- }
307
+ for (let s of e) if (o === !0) a += s, o = !1;
308
+ else if (s === "\\") a += s, o = !0;
309
+ else if (s === "\"") i = i === 1 ? 0 : 1, a += s;
310
+ else {
341
311
  if (i === 0) {
342
312
  if (s === "[") n++;
343
313
  else if (s === "]" && n > 0) n--;
@@ -355,17 +325,9 @@ var t = /* @__PURE__ */ e(((e, t) => {
355
325
  return t.push(a), t;
356
326
  }, m = (e) => {
357
327
  let t = !1;
358
- for (let n of e) {
359
- if (t === !0) {
360
- t = !1;
361
- continue;
362
- }
363
- if (n === "\\") {
364
- t = !0;
365
- continue;
366
- }
367
- if (/[?*+@!()[\]{}]/.test(n)) return !1;
368
- }
328
+ for (let n of e) if (t === !0) t = !1;
329
+ else if (n === "\\") t = !0;
330
+ else if (/[?*+@!()[\]{}]/.test(n)) return !1;
369
331
  return !0;
370
332
  }, h = (e) => {
371
333
  let t = e.trim(), n = !0;
@@ -375,7 +337,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
375
337
  let t = e.map(h).filter(Boolean);
376
338
  for (let e = 0; e < t.length; e++) for (let n = e + 1; n < t.length; n++) {
377
339
  let r = t[e], i = t[n], a = r[0];
378
- if (!(!a || r !== a.repeat(r.length) || i !== a.repeat(i.length)) && (r === i || r.startsWith(i) || i.startsWith(r))) return !0;
340
+ if (a && r === a.repeat(r.length) && i === a.repeat(i.length) && (r === i || r.startsWith(i) || i.startsWith(r))) return !0;
379
341
  }
380
342
  return !1;
381
343
  }, _ = (e, t = !0) => {
@@ -383,33 +345,15 @@ var t = /* @__PURE__ */ e(((e, t) => {
383
345
  let n = 0, r = 0, i = 0, a = !1;
384
346
  for (let o = 1; o < e.length; o++) {
385
347
  let s = e[o];
386
- if (a === !0) {
387
- a = !1;
388
- continue;
389
- }
390
- if (s === "\\") {
391
- a = !0;
392
- continue;
393
- }
394
- if (s === "\"") {
395
- i = i === 1 ? 0 : 1;
396
- continue;
397
- }
398
- if (i !== 1) {
399
- if (s === "[") {
400
- n++;
401
- continue;
402
- }
403
- if (s === "]" && n > 0) {
404
- n--;
405
- continue;
406
- }
407
- if (!(n > 0)) {
408
- if (s === "(") {
409
- r++;
410
- continue;
411
- }
412
- if (s === ")" && (r--, r === 0)) return t === !0 && o !== e.length - 1 ? void 0 : {
348
+ if (a === !0) a = !1;
349
+ else if (s === "\\") a = !0;
350
+ else if (s === "\"") i = i === 1 ? 0 : 1;
351
+ else if (i !== 1) {
352
+ if (s === "[") n++;
353
+ else if (s === "]" && n > 0) n--;
354
+ else if (!(n > 0)) {
355
+ if (s === "(") r++;
356
+ else if (s === ")" && (r--, r === 0)) return t === !0 && o !== e.length - 1 ? void 0 : {
413
357
  type: e[0],
414
358
  body: e.slice(2, o),
415
359
  end: o
@@ -417,7 +361,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
417
361
  }
418
362
  }
419
363
  }
420
- }, v = (e) => {
364
+ }, v = (e) => `${e.length === 1 ? a.escapeRegex(e[0]) : `[${e.map((e) => a.escapeRegex(e)).join("")}]`}*`, y = (e) => {
421
365
  let t = 0, n = [];
422
366
  for (; t < e.length;) {
423
367
  let r = _(e.slice(t), !1);
@@ -428,40 +372,46 @@ var t = /* @__PURE__ */ e(((e, t) => {
428
372
  if (!a || a.length !== 1) return;
429
373
  n.push(a), t += r.end + 1;
430
374
  }
431
- if (!(n.length < 1)) return `${n.length === 1 ? a.escapeRegex(n[0]) : `[${n.map((e) => a.escapeRegex(e)).join("")}]`}*`;
432
- }, y = (e) => {
375
+ if (!(n.length < 1)) return n;
376
+ }, b = (e) => {
433
377
  let t = 0, n = e.trim(), r = _(n);
434
378
  for (; r;) t++, n = r.body.trim(), r = _(n);
435
379
  return t;
436
- }, b = (e, t) => {
380
+ }, x = (e, t) => {
437
381
  if (t.maxExtglobRecursion === !1) return { risky: !1 };
438
- let n = typeof t.maxExtglobRecursion == "number" ? t.maxExtglobRecursion : i.DEFAULT_MAX_EXTGLOB_RECURSION, r = p(e).map((e) => e.trim());
439
- if (r.length > 1 && (r.some((e) => e === "") || r.some((e) => /^[*?]+$/.test(e)) || g(r))) return { risky: !0 };
440
- for (let e of r) {
441
- let t = v(e);
442
- if (t) return {
443
- risky: !0,
444
- safeOutput: t
445
- };
446
- if (y(e) > n) return { risky: !0 };
382
+ let r = typeof t.maxExtglobRecursion == "number" ? t.maxExtglobRecursion : n.DEFAULT_MAX_EXTGLOB_RECURSION, i = p(e).map((e) => e.trim());
383
+ if (i.length > 1 && (i.some((e) => e === "") || i.some((e) => /^[*?]+$/.test(e)) || g(i))) return { risky: !0 };
384
+ let a = [], o = !1, s = !0;
385
+ for (let e of i) {
386
+ let t = y(e);
387
+ if (t) {
388
+ o = !0, a.push(...t);
389
+ continue;
390
+ }
391
+ let n = h(e);
392
+ if (n && n.length === 1) a.push(n);
393
+ else if (s = !1, b(e) > r) return { risky: !0 };
447
394
  }
448
- return { risky: !1 };
449
- }, x = (e, t) => {
395
+ return o ? s ? {
396
+ risky: !0,
397
+ safeOutput: v([...new Set(a)])
398
+ } : { risky: !0 } : { risky: !1 };
399
+ }, S = (e, t) => {
450
400
  if (typeof e != "string") throw TypeError("Expected a string");
451
401
  e = u[e] || e;
452
- let n = { ...t }, r = typeof n.maxLength == "number" ? Math.min(o, n.maxLength) : o, p = e.length;
453
- if (p > r) throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${r}`);
402
+ let r = { ...t }, i = typeof r.maxLength == "number" ? Math.min(o, r.maxLength) : o, p = e.length;
403
+ if (p > i) throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${i}`);
454
404
  let m = {
455
405
  type: "bos",
456
406
  value: "",
457
- output: n.prepend || ""
458
- }, h = [m], g = n.capture ? "" : "?:", _ = i.globChars(n.windows), v = i.extglobChars(_), { DOT_LITERAL: y, PLUS_LITERAL: S, SLASH_LITERAL: C, ONE_CHAR: w, DOTS_SLASH: T, NO_DOT: E, NO_DOT_SLASH: D, NO_DOTS_SLASH: O, QMARK: k, QMARK_NO_DOT: A, STAR: j, START_ANCHOR: M } = _, N = (e) => `(${g}(?:(?!${M}${e.dot ? T : y}).)*?)`, P = n.dot ? "" : E, F = n.dot ? k : A, I = n.bash === !0 ? N(n) : j;
459
- n.capture && (I = `(${I})`), typeof n.noext == "boolean" && (n.noextglob = n.noext);
407
+ output: r.prepend || ""
408
+ }, h = [m], g = r.capture ? "" : "?:", _ = n.globChars(r.windows), v = n.extglobChars(_), { DOT_LITERAL: y, PLUS_LITERAL: b, SLASH_LITERAL: C, ONE_CHAR: w, DOTS_SLASH: T, NO_DOT: E, NO_DOT_SLASH: D, NO_DOTS_SLASH: O, QMARK: k, QMARK_NO_DOT: A, STAR: j, START_ANCHOR: M } = _, N = (e) => `(${g}(?:(?!${M}${e.dot ? T : y}).)*?)`, P = r.dot ? "" : E, F = r.dot ? k : A, I = r.bash === !0 ? N(r) : j;
409
+ r.capture && (I = `(${I})`), typeof r.noext == "boolean" && (r.noextglob = r.noext);
460
410
  let L = {
461
411
  input: e,
462
412
  index: -1,
463
413
  start: 0,
464
- dot: n.dot === !0,
414
+ dot: r.dot === !0,
465
415
  consumed: "",
466
416
  output: "",
467
417
  prefix: "",
@@ -482,7 +432,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
482
432
  }, Y = () => {
483
433
  let e = 1;
484
434
  for (; W() === "!" && (W(2) !== "(" || W(3) === "?");) G(), L.start++, e++;
485
- return e % 2 == 0 ? !1 : (L.negated = !0, L.start++, !0);
435
+ return e % 2 != 0 && (L.negated = !0, L.start++, !0);
486
436
  }, X = (e) => {
487
437
  L[e]++, B.push(e);
488
438
  }, Z = (e) => {
@@ -492,19 +442,15 @@ var t = /* @__PURE__ */ e(((e, t) => {
492
442
  let t = L.braces > 0 && (e.type === "comma" || e.type === "brace"), n = e.extglob === !0 || R.length && (e.type === "pipe" || e.type === "paren");
493
443
  e.type !== "slash" && e.type !== "paren" && !t && !n && (L.output = L.output.slice(0, -V.output.length), V.type = "star", V.value = "*", V.output = I, L.output += V.output);
494
444
  }
495
- if (R.length && e.type !== "paren" && (R[R.length - 1].inner += e.value), (e.value || e.output) && J(e), V && V.type === "text" && e.type === "text") {
496
- V.output = (V.output || V.value) + e.value, V.value += e.value;
497
- return;
498
- }
499
- e.prev = V, h.push(e), V = e;
445
+ R.length && e.type !== "paren" && (R[R.length - 1].inner += e.value), (e.value || e.output) && J(e), V && V.type === "text" && e.type === "text" ? (V.output = (V.output || V.value) + e.value, V.value += e.value) : (e.prev = V, h.push(e), V = e);
500
446
  }, $ = (e, t) => {
501
- let r = {
447
+ let n = {
502
448
  ...v[t],
503
449
  conditions: 1,
504
450
  inner: ""
505
451
  };
506
- r.prev = V, r.parens = L.parens, r.output = L.output, r.startIndex = L.index, r.tokensIndex = h.length;
507
- let i = (n.capture ? "(" : "") + r.open;
452
+ n.prev = V, n.parens = L.parens, n.output = L.output, n.startIndex = L.index, n.tokensIndex = h.length;
453
+ let i = (r.capture ? "(" : "") + n.open;
508
454
  X("parens"), Q({
509
455
  type: e,
510
456
  value: t,
@@ -514,14 +460,14 @@ var t = /* @__PURE__ */ e(((e, t) => {
514
460
  extglob: !0,
515
461
  value: G(),
516
462
  output: i
517
- }), R.push(r);
518
- }, ee = (r) => {
519
- let i = e.slice(r.startIndex, L.index + 1), o = b(e.slice(r.startIndex + 2, L.index), n);
520
- if ((r.type === "plus" || r.type === "star") && o.risky) {
521
- let e = o.safeOutput ? (r.output ? "" : w) + (n.capture ? `(${o.safeOutput})` : o.safeOutput) : void 0, t = h[r.tokensIndex];
463
+ }), R.push(n);
464
+ }, ee = (n) => {
465
+ let i = e.slice(n.startIndex, L.index + 1), o = x(e.slice(n.startIndex + 2, L.index), r);
466
+ if ((n.type === "plus" || n.type === "star") && o.risky) {
467
+ let e = o.safeOutput ? (n.output ? "" : w) + (r.capture ? `(${o.safeOutput})` : o.safeOutput) : void 0, t = h[n.tokensIndex];
522
468
  t.type = "text", t.value = i, t.output = e || a.escapeRegex(i);
523
- for (let e = r.tokensIndex + 1; e < h.length; e++) h[e].value = "", h[e].output = "", delete h[e].suffix;
524
- L.output = r.output + t.output, L.backtrack = !0, Q({
469
+ for (let e = n.tokensIndex + 1; e < h.length; e++) h[e].value = "", h[e].output = "", delete h[e].suffix;
470
+ L.output = n.output + t.output, L.backtrack = !0, Q({
525
471
  type: "paren",
526
472
  extglob: !0,
527
473
  value: H,
@@ -529,13 +475,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
529
475
  }), Z("parens");
530
476
  return;
531
477
  }
532
- let s = r.close + (n.capture ? ")" : ""), c;
533
- if (r.type === "negate") {
478
+ let s = n.close + (r.capture ? ")" : ""), c;
479
+ if (n.type === "negate") {
534
480
  let e = I;
535
- r.inner && r.inner.length > 1 && r.inner.includes("/") && (e = N(n)), (e !== I || U() || /^\)+$/.test(K())) && (s = r.close = `)$))${e}`), r.inner.includes("*") && (c = K()) && /^\.[^\\/.]+$/.test(c) && (s = r.close = `)${x(c, {
481
+ n.inner && n.inner.length > 1 && n.inner.includes("/") && (e = N(r)), (e !== I || U() || /^\)+$/.test(K())) && (s = n.close = `)$))${e}`), n.inner.includes("*") && (c = K()) && /^\.[^\\/.]+$/.test(c) && (s = n.close = `)${S(c, {
536
482
  ...t,
537
483
  fastpaths: !1
538
- }).output})${e})`), r.prev.type === "bos" && (L.negatedExtglob = !0);
484
+ }).output})${e})`), n.prev.type === "bos" && (L.negatedExtglob = !0);
539
485
  }
540
486
  Q({
541
487
  type: "paren",
@@ -544,15 +490,15 @@ var t = /* @__PURE__ */ e(((e, t) => {
544
490
  output: s
545
491
  }), Z("parens");
546
492
  };
547
- if (n.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
548
- let r = !1, i = e.replace(l, (e, t, n, i, a, o) => i === "\\" ? (r = !0, e) : i === "?" ? t ? t + i + (a ? k.repeat(a.length) : "") : o === 0 ? F + (a ? k.repeat(a.length) : "") : k.repeat(n.length) : i === "." ? y.repeat(n.length) : i === "*" ? t ? t + i + (a ? I : "") : I : t ? e : `\\${e}`);
549
- return r === !0 && (i = n.unescape === !0 ? i.replace(/\\/g, "") : i.replace(/\\+/g, (e) => e.length % 2 == 0 ? "\\\\" : e ? "\\" : "")), i === e && n.contains === !0 ? (L.output = e, L) : (L.output = a.wrapOutput(i, L, t), L);
493
+ if (r.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
494
+ let n = !1, i = e.replace(l, (e, t, r, i, a, o) => i === "\\" ? (n = !0, e) : i === "?" ? t ? t + i + (a ? k.repeat(a.length) : "") : o === 0 ? F + (a ? k.repeat(a.length) : "") : k.repeat(r.length) : i === "." ? y.repeat(r.length) : i === "*" ? t ? t + i + (a ? I : "") : I : t ? e : `\\${e}`);
495
+ return n === !0 && (i = r.unescape === !0 ? i.replace(/\\/g, "") : i.replace(/\\+/g, (e) => e.length % 2 == 0 ? "\\\\" : e ? "\\" : "")), i === e && r.contains === !0 ? (L.output = e, L) : (L.output = a.wrapOutput(i, L, t), L);
550
496
  }
551
497
  for (; !U();) {
552
498
  if (H = G(), H === "\0") continue;
553
499
  if (H === "\\") {
554
500
  let e = W();
555
- if (e === "/" && n.bash !== !0 || e === "." || e === ";") continue;
501
+ if (e === "/" && r.bash !== !0 || e === "." || e === ";") continue;
556
502
  if (!e) {
557
503
  H += "\\", Q({
558
504
  type: "text",
@@ -560,8 +506,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
560
506
  });
561
507
  continue;
562
508
  }
563
- let t = /^\\+/.exec(K()), r = 0;
564
- if (t && t[0].length > 2 && (r = t[0].length, L.index += r, r % 2 != 0 && (H += "\\")), n.unescape === !0 ? H = G() : H += G(), L.brackets === 0) {
509
+ let t = /^\\+/.exec(K()), n = 0;
510
+ if (t && t[0].length > 2 && (n = t[0].length, L.index += n, n % 2 != 0 && (H += "\\")), r.unescape === !0 ? H = G() : H += G(), L.brackets === 0) {
565
511
  Q({
566
512
  type: "text",
567
513
  value: H
@@ -570,7 +516,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
570
516
  }
571
517
  }
572
518
  if (L.brackets > 0 && (H !== "]" || V.value === "[" || V.value === "[^")) {
573
- if (n.posix !== !1 && H === ":") {
519
+ if (r.posix !== !1 && H === ":") {
574
520
  let e = V.value.slice(1);
575
521
  if (e.includes("[") && (V.posix = !0, e.includes(":"))) {
576
522
  let e = V.value.lastIndexOf("["), t = V.value.slice(0, e), n = s[V.value.slice(e + 2)];
@@ -580,7 +526,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
580
526
  }
581
527
  }
582
528
  }
583
- (H === "[" && W() !== ":" || H === "-" && W() === "]") && (H = `\\${H}`), H === "]" && (V.value === "[" || V.value === "[^") && (H = `\\${H}`), n.posix === !0 && H === "!" && V.value === "[" && (H = "^"), V.value += H, J({ value: H });
529
+ (H === "[" && W() !== ":" || H === "-" && W() === "]") && (H = `\\${H}`), H === "]" && (V.value === "[" || V.value === "[^") && (H = `\\${H}`), r.posix === !0 && H === "!" && V.value === "[" && (H = "^"), V.value += H, J({ value: H });
584
530
  continue;
585
531
  }
586
532
  if (L.quotes === 1 && H !== "\"") {
@@ -588,7 +534,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
588
534
  continue;
589
535
  }
590
536
  if (H === "\"") {
591
- L.quotes = L.quotes === 1 ? 0 : 1, n.keepQuotes === !0 && Q({
537
+ L.quotes = L.quotes === 1 ? 0 : 1, r.keepQuotes === !0 && Q({
592
538
  type: "text",
593
539
  value: H
594
540
  });
@@ -602,7 +548,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
602
548
  continue;
603
549
  }
604
550
  if (H === ")") {
605
- if (L.parens === 0 && n.strictBrackets === !0) throw SyntaxError(f("opening", "("));
551
+ if (L.parens === 0 && r.strictBrackets === !0) throw SyntaxError(f("opening", "("));
606
552
  let e = R[R.length - 1];
607
553
  if (e && L.parens === e.parens + 1) {
608
554
  ee(R.pop());
@@ -616,8 +562,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
616
562
  continue;
617
563
  }
618
564
  if (H === "[") {
619
- if (n.nobracket === !0 || !K().includes("]")) {
620
- if (n.nobracket !== !0 && n.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
565
+ if (r.nobracket === !0 || !K().includes("]")) {
566
+ if (r.nobracket !== !0 && r.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
621
567
  H = `\\${H}`;
622
568
  } else X("brackets");
623
569
  Q({
@@ -627,7 +573,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
627
573
  continue;
628
574
  }
629
575
  if (H === "]") {
630
- if (n.nobracket === !0 || V && V.type === "bracket" && V.value.length === 1) {
576
+ if (r.nobracket === !0 || V && V.type === "bracket" && V.value.length === 1) {
631
577
  Q({
632
578
  type: "text",
633
579
  value: H,
@@ -636,7 +582,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
636
582
  continue;
637
583
  }
638
584
  if (L.brackets === 0) {
639
- if (n.strictBrackets === !0) throw SyntaxError(f("opening", "["));
585
+ if (r.strictBrackets === !0) throw SyntaxError(f("opening", "["));
640
586
  Q({
641
587
  type: "text",
642
588
  value: H,
@@ -646,16 +592,16 @@ var t = /* @__PURE__ */ e(((e, t) => {
646
592
  }
647
593
  Z("brackets");
648
594
  let e = V.value.slice(1);
649
- if (V.posix !== !0 && e[0] === "^" && !e.includes("/") && (H = `/${H}`), V.value += H, J({ value: H }), n.literalBrackets === !1 || a.hasRegexChars(e)) continue;
595
+ if (V.posix !== !0 && e[0] === "^" && !e.includes("/") && (H = `/${H}`), V.value += H, J({ value: H }), r.literalBrackets === !1 || a.hasRegexChars(e)) continue;
650
596
  let t = a.escapeRegex(V.value);
651
- if (L.output = L.output.slice(0, -V.value.length), n.literalBrackets === !0) {
597
+ if (L.output = L.output.slice(0, -V.value.length), r.literalBrackets === !0) {
652
598
  L.output += t, V.value = t;
653
599
  continue;
654
600
  }
655
601
  V.value = `(${g}${t}|${V.value})`, L.output += V.value;
656
602
  continue;
657
603
  }
658
- if (H === "{" && n.nobrace !== !0) {
604
+ if (H === "{" && r.nobrace !== !0) {
659
605
  X("braces");
660
606
  let e = {
661
607
  type: "brace",
@@ -669,7 +615,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
669
615
  }
670
616
  if (H === "}") {
671
617
  let e = z[z.length - 1];
672
- if (n.nobrace === !0 || !e) {
618
+ if (r.nobrace === !0 || !e) {
673
619
  Q({
674
620
  type: "text",
675
621
  value: H,
@@ -679,9 +625,9 @@ var t = /* @__PURE__ */ e(((e, t) => {
679
625
  }
680
626
  let t = ")";
681
627
  if (e.dots === !0) {
682
- let e = h.slice(), r = [];
683
- for (let t = e.length - 1; t >= 0 && (h.pop(), e[t].type !== "brace"); t--) e[t].type !== "dots" && r.unshift(e[t].value);
684
- t = d(r, n), L.backtrack = !0;
628
+ let e = h.slice(), n = [];
629
+ for (let t = e.length - 1; t >= 0 && (h.pop(), e[t].type !== "brace"); t--) e[t].type !== "dots" && n.unshift(e[t].value);
630
+ t = d(n, r), L.backtrack = !0;
685
631
  }
686
632
  if (e.comma !== !0 && e.dots !== !0) {
687
633
  let n = L.output.slice(0, e.outputIndex), r = L.tokens.slice(e.tokensIndex);
@@ -746,7 +692,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
746
692
  continue;
747
693
  }
748
694
  if (H === "?") {
749
- if (!(V && V.value === "(") && n.noextglob !== !0 && W() === "(" && W(2) !== "?") {
695
+ if (!(V && V.value === "(") && r.noextglob !== !0 && W() === "(" && W(2) !== "?") {
750
696
  $("qmark", H);
751
697
  continue;
752
698
  }
@@ -759,7 +705,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
759
705
  });
760
706
  continue;
761
707
  }
762
- if (n.dot !== !0 && (V.type === "slash" || V.type === "bos")) {
708
+ if (r.dot !== !0 && (V.type === "slash" || V.type === "bos")) {
763
709
  Q({
764
710
  type: "qmark",
765
711
  value: H,
@@ -775,25 +721,25 @@ var t = /* @__PURE__ */ e(((e, t) => {
775
721
  continue;
776
722
  }
777
723
  if (H === "!") {
778
- if (n.noextglob !== !0 && W() === "(" && (W(2) !== "?" || !/[!=<:]/.test(W(3)))) {
724
+ if (r.noextglob !== !0 && W() === "(" && (W(2) !== "?" || !/[!=<:]/.test(W(3)))) {
779
725
  $("negate", H);
780
726
  continue;
781
727
  }
782
- if (n.nonegate !== !0 && L.index === 0) {
728
+ if (r.nonegate !== !0 && L.index === 0) {
783
729
  Y();
784
730
  continue;
785
731
  }
786
732
  }
787
733
  if (H === "+") {
788
- if (n.noextglob !== !0 && W() === "(" && W(2) !== "?") {
734
+ if (r.noextglob !== !0 && W() === "(" && W(2) !== "?") {
789
735
  $("plus", H);
790
736
  continue;
791
737
  }
792
- if (V && V.value === "(" || n.regex === !1) {
738
+ if (V && V.value === "(" || r.regex === !1) {
793
739
  Q({
794
740
  type: "plus",
795
741
  value: H,
796
- output: S
742
+ output: b
797
743
  });
798
744
  continue;
799
745
  }
@@ -806,12 +752,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
806
752
  }
807
753
  Q({
808
754
  type: "plus",
809
- value: S
755
+ value: b
810
756
  });
811
757
  continue;
812
758
  }
813
759
  if (H === "@") {
814
- if (n.noextglob !== !0 && W() === "(" && W(2) !== "?") {
760
+ if (r.noextglob !== !0 && W() === "(" && W(2) !== "?") {
815
761
  Q({
816
762
  type: "at",
817
763
  extglob: !0,
@@ -840,17 +786,17 @@ var t = /* @__PURE__ */ e(((e, t) => {
840
786
  continue;
841
787
  }
842
788
  let t = K();
843
- if (n.noextglob !== !0 && /^\([^?]/.test(t)) {
789
+ if (r.noextglob !== !0 && /^\([^?]/.test(t)) {
844
790
  $("star", H);
845
791
  continue;
846
792
  }
847
793
  if (V.type === "star") {
848
- if (n.noglobstar === !0) {
794
+ if (r.noglobstar === !0) {
849
795
  q(H);
850
796
  continue;
851
797
  }
852
- let r = V.prev, i = r.prev, a = r.type === "slash" || r.type === "bos", o = i && (i.type === "star" || i.type === "globstar");
853
- if (n.bash === !0 && (!a || t[0] && t[0] !== "/")) {
798
+ let n = V.prev, i = n.prev, a = n.type === "slash" || n.type === "bos", o = i && (i.type === "star" || i.type === "globstar");
799
+ if (r.bash === !0 && (!a || t[0] && t[0] !== "/")) {
854
800
  Q({
855
801
  type: "star",
856
802
  value: H,
@@ -858,8 +804,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
858
804
  });
859
805
  continue;
860
806
  }
861
- let s = L.braces > 0 && (r.type === "comma" || r.type === "brace"), c = R.length && (r.type === "pipe" || r.type === "paren");
862
- if (!a && r.type !== "paren" && !s && !c) {
807
+ let s = L.braces > 0 && (n.type === "comma" || n.type === "brace"), c = R.length && (n.type === "pipe" || n.type === "paren");
808
+ if (!a && n.type !== "paren" && !s && !c) {
863
809
  Q({
864
810
  type: "star",
865
811
  value: H,
@@ -872,62 +818,55 @@ var t = /* @__PURE__ */ e(((e, t) => {
872
818
  if (n && n !== "/") break;
873
819
  t = t.slice(3), q("/**", 3);
874
820
  }
875
- if (r.type === "bos" && U()) {
876
- V.type = "globstar", V.value += H, V.output = N(n), L.output = V.output, L.globstar = !0, q(H);
821
+ let l = U() || L.parens > 0 && t === ")".repeat(L.parens) && !R.some((e) => e.type === "negate");
822
+ if (n.type === "bos" && U()) {
823
+ V.type = "globstar", V.value += H, V.output = N(r), L.output = V.output, L.globstar = !0, q(H);
877
824
  continue;
878
825
  }
879
- if (r.type === "slash" && r.prev.type !== "bos" && !o && U()) {
880
- L.output = L.output.slice(0, -(r.output + V.output).length), r.output = `(?:${r.output}`, V.type = "globstar", V.output = N(n) + (n.strictSlashes ? ")" : "|$)"), V.value += H, L.globstar = !0, L.output += r.output + V.output, q(H);
826
+ if (n.type === "slash" && n.prev.type !== "bos" && !o && l) {
827
+ L.output = L.output.slice(0, -(n.output + V.output).length), n.output = `(?:${n.output}`, V.type = "globstar", V.output = N(r) + (r.strictSlashes ? ")" : "|$)"), V.value += H, L.globstar = !0, L.output += n.output + V.output, q(H);
881
828
  continue;
882
829
  }
883
- if (r.type === "slash" && r.prev.type !== "bos" && t[0] === "/") {
830
+ if (n.type === "slash" && n.prev.type !== "bos" && t[0] === "/") {
884
831
  let e = t[1] === void 0 ? "" : "|$";
885
- L.output = L.output.slice(0, -(r.output + V.output).length), r.output = `(?:${r.output}`, V.type = "globstar", V.output = `${N(n)}${C}|${C}${e})`, V.value += H, L.output += r.output + V.output, L.globstar = !0, q(H + G()), Q({
832
+ L.output = L.output.slice(0, -(n.output + V.output).length), n.output = `(?:${n.output}`, V.type = "globstar", V.output = `${N(r)}${C}|${C}${e})`, V.value += H, L.output += n.output + V.output, L.globstar = !0, q(H + G()), Q({
886
833
  type: "slash",
887
834
  value: "/",
888
835
  output: ""
889
836
  });
890
837
  continue;
891
838
  }
892
- if (r.type === "bos" && t[0] === "/") {
893
- V.type = "globstar", V.value += H, V.output = `(?:^|${C}|${N(n)}${C})`, L.output = V.output, L.globstar = !0, q(H + G()), Q({
839
+ if (n.type === "bos" && t[0] === "/") {
840
+ V.type = "globstar", V.value += H, V.output = `(?:^|${C}|${N(r)}${C})`, L.output = V.output, L.globstar = !0, q(H + G()), Q({
894
841
  type: "slash",
895
842
  value: "/",
896
843
  output: ""
897
844
  });
898
845
  continue;
899
846
  }
900
- L.output = L.output.slice(0, -V.output.length), V.type = "globstar", V.output = N(n), V.value += H, L.output += V.output, L.globstar = !0, q(H);
847
+ L.output = L.output.slice(0, -V.output.length), V.type = "globstar", V.output = N(r), V.value += H, L.output += V.output, L.globstar = !0, q(H);
901
848
  continue;
902
849
  }
903
- let r = {
850
+ let n = {
904
851
  type: "star",
905
852
  value: H,
906
853
  output: I
907
854
  };
908
- if (n.bash === !0) {
909
- r.output = ".*?", (V.type === "bos" || V.type === "slash") && (r.output = P + r.output), Q(r);
910
- continue;
911
- }
912
- if (V && (V.type === "bracket" || V.type === "paren") && n.regex === !0) {
913
- r.output = H, Q(r);
914
- continue;
915
- }
916
- (L.index === L.start || V.type === "slash" || V.type === "dot") && (V.type === "dot" ? (L.output += D, V.output += D) : n.dot === !0 ? (L.output += O, V.output += O) : (L.output += P, V.output += P), W() !== "*" && (L.output += w, V.output += w)), Q(r);
855
+ r.bash === !0 ? (n.output = ".*?", (V.type === "bos" || V.type === "slash") && (n.output = P + n.output), Q(n)) : V && (V.type === "bracket" || V.type === "paren") && r.regex === !0 ? (n.output = H, Q(n)) : ((L.index === L.start || V.type === "slash" || V.type === "dot") && (V.type === "dot" ? (L.output += D, V.output += D) : r.dot === !0 ? (L.output += O, V.output += O) : (L.output += P, V.output += P), W() !== "*" && (L.output += w, V.output += w)), Q(n));
917
856
  }
918
857
  for (; L.brackets > 0;) {
919
- if (n.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
858
+ if (r.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
920
859
  L.output = a.escapeLast(L.output, "["), Z("brackets");
921
860
  }
922
861
  for (; L.parens > 0;) {
923
- if (n.strictBrackets === !0) throw SyntaxError(f("closing", ")"));
862
+ if (r.strictBrackets === !0) throw SyntaxError(f("closing", ")"));
924
863
  L.output = a.escapeLast(L.output, "("), Z("parens");
925
864
  }
926
865
  for (; L.braces > 0;) {
927
- if (n.strictBrackets === !0) throw SyntaxError(f("closing", "}"));
866
+ if (r.strictBrackets === !0) throw SyntaxError(f("closing", "}"));
928
867
  L.output = a.escapeLast(L.output, "{"), Z("braces");
929
868
  }
930
- if (n.strictSlashes !== !0 && (V.type === "star" || V.type === "bracket") && Q({
869
+ if (r.strictSlashes !== !0 && (V.type === "star" || V.type === "bracket") && Q({
931
870
  type: "maybe_slash",
932
871
  value: "",
933
872
  output: `${C}?`
@@ -937,25 +876,25 @@ var t = /* @__PURE__ */ e(((e, t) => {
937
876
  }
938
877
  return L;
939
878
  };
940
- x.fastpaths = (e, t) => {
941
- let n = { ...t }, r = typeof n.maxLength == "number" ? Math.min(o, n.maxLength) : o, s = e.length;
942
- if (s > r) throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);
879
+ S.fastpaths = (e, t) => {
880
+ let r = { ...t }, i = typeof r.maxLength == "number" ? Math.min(o, r.maxLength) : o, s = e.length;
881
+ if (s > i) throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${i}`);
943
882
  e = u[e] || e;
944
- let { DOT_LITERAL: c, SLASH_LITERAL: l, ONE_CHAR: d, DOTS_SLASH: f, NO_DOT: p, NO_DOTS: m, NO_DOTS_SLASH: h, STAR: g, START_ANCHOR: _ } = i.globChars(n.windows), v = n.dot ? m : p, y = n.dot ? h : p, b = n.capture ? "" : "?:", x = {
883
+ let { DOT_LITERAL: c, SLASH_LITERAL: l, ONE_CHAR: d, DOTS_SLASH: f, NO_DOT: p, NO_DOTS: m, NO_DOTS_SLASH: h, STAR: g, START_ANCHOR: _ } = n.globChars(r.windows), v = r.dot ? m : p, y = r.dot ? h : p, b = r.capture ? "" : "?:", x = {
945
884
  negated: !1,
946
885
  prefix: ""
947
- }, S = n.bash === !0 ? ".*?" : g;
948
- n.capture && (S = `(${S})`);
886
+ }, S = r.bash === !0 ? ".*?" : g;
887
+ r.capture && (S = `(${S})`);
949
888
  let C = (e) => e.noglobstar === !0 ? S : `(${b}(?:(?!${_}${e.dot ? f : c}).)*?)`, w = (e) => {
950
889
  switch (e) {
951
890
  case "*": return `${v}${d}${S}`;
952
891
  case ".*": return `${c}${d}${S}`;
953
892
  case "*.*": return `${v}${S}${c}${d}${S}`;
954
893
  case "*/*": return `${v}${S}${l}${d}${y}${S}`;
955
- case "**": return v + C(n);
956
- case "**/*": return `(?:${v}${C(n)}${l})?${y}${d}${S}`;
957
- case "**/*.*": return `(?:${v}${C(n)}${l})?${y}${S}${c}${d}${S}`;
958
- case "**/.*": return `(?:${v}${C(n)}${l})?${c}${d}${S}`;
894
+ case "**": return v + C(r);
895
+ case "**/*": return `(?:${v}${C(r)}${l})?${y}${d}${S}`;
896
+ case "**/*.*": return `(?:${v}${C(r)}${l})?${y}${S}${c}${d}${S}`;
897
+ case "**/.*": return `(?:${v}${C(r)}${l})?${c}${d}${S}`;
959
898
  default: {
960
899
  let t = /^(.*?)\.(\w+)$/.exec(e);
961
900
  if (!t) return;
@@ -964,10 +903,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
964
903
  }
965
904
  }
966
905
  }, T = w(a.removePrefix(e, x));
967
- return T && n.strictSlashes !== !0 && (T += `${l}?`), T;
968
- }, r.exports = x;
969
- })), a = /* @__PURE__ */ e(((e, a) => {
970
- var o = r(), s = i(), c = n(), l = t(), u = (e) => e && typeof e == "object" && !Array.isArray(e), d = (e, t, n = !1) => {
906
+ return T && r.strictSlashes !== !0 && (T += `${l}?`), T;
907
+ }, t.exports = S;
908
+ })), s = /* @__PURE__ */ e(((e, t) => {
909
+ var n = a(), s = o(), c = i(), l = r(), u = (e) => e && typeof e == "object" && !Array.isArray(e), d = (e, t, n = !1) => {
971
910
  if (Array.isArray(e)) {
972
911
  let r = e.map((e) => d(e, t, n));
973
912
  return (e) => {
@@ -1006,7 +945,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1006
945
  match: u,
1007
946
  isMatch: l
1008
947
  };
1009
- return typeof i.onResult == "function" && i.onResult(p), l === !1 ? (p.isMatch = !1, r ? p : !1) : c(n) ? (typeof i.onIgnore == "function" && i.onIgnore(p), p.isMatch = !1, r ? p : !1) : (typeof i.onMatch == "function" && i.onMatch(p), r ? p : !0);
948
+ return typeof i.onResult == "function" && i.onResult(p), l === !1 ? (p.isMatch = !1, r ? p : !1) : c(n) ? (typeof i.onIgnore == "function" && i.onIgnore(p), p.isMatch = !1, r ? p : !1) : (typeof i.onMatch == "function" && i.onMatch(p), !r || p);
1010
949
  };
1011
950
  return n && (l.state = s), l;
1012
951
  };
@@ -1022,10 +961,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
1022
961
  match: s,
1023
962
  output: l
1024
963
  };
1025
- }, d.matchBase = (e, t, n) => (t instanceof RegExp ? t : d.makeRe(t, n)).test(c.basename(e)), d.isMatch = (e, t, n) => d(t, n)(e), d.parse = (e, t) => Array.isArray(e) ? e.map((e) => d.parse(e, t)) : s(e, {
964
+ }, d.matchBase = (e, t, n, r = n && n.windows) => (t instanceof RegExp ? t : d.makeRe(t, n)).test(c.basename(e, { windows: r })), d.isMatch = (e, t, n) => d(t, n)(e), d.parse = (e, t) => Array.isArray(e) ? e.map((e) => d.parse(e, t)) : s(e, {
1026
965
  ...t,
1027
966
  fastpaths: !1
1028
- }), d.scan = (e, t) => o(e, t), d.compileRe = (e, t, n = !1, r = !1) => {
967
+ }), d.scan = (e, t) => n(e, t), d.compileRe = (e, t, n = !1, r = !1) => {
1029
968
  if (n === !0) return e.output;
1030
969
  let i = t || {}, a = i.contains ? "" : "^", o = i.contains ? "" : "$", s = `${a}(?:${e.output})${o}`;
1031
970
  e && e.negated === !0 && (s = `^(?!${s}).*$`);
@@ -1046,16 +985,15 @@ var t = /* @__PURE__ */ e(((e, t) => {
1046
985
  if (t && t.debug === !0) throw e;
1047
986
  return /$^/;
1048
987
  }
1049
- }, d.constants = l, a.exports = d;
1050
- })), o = /* @__PURE__ */ e(((e, t) => {
1051
- var r = a(), i = n();
1052
- function o(e, t, n = !1) {
988
+ }, d.constants = l, t.exports = d;
989
+ })), c = /* @__PURE__ */ e(((e, t) => {
990
+ var n = s(), r = i();
991
+ function a(e, t, i = !1) {
1053
992
  return t && (t.windows === null || t.windows === void 0) && (t = {
1054
993
  ...t,
1055
- windows: i.isWindows()
1056
- }), r(e, t, n);
994
+ windows: r.isWindows()
995
+ }), n(e, t, i);
1057
996
  }
1058
- Object.assign(o, r), t.exports = o;
997
+ Object.assign(a, n), t.exports = a;
1059
998
  }));
1060
- //#endregion
1061
- export { o as t };
999
+ export { n, c as t };