@teammy/server 0.1.4 → 0.1.6

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 (585) hide show
  1. package/dist/main.js +11646 -7952
  2. package/dist/native-pi-entry.js +14 -1
  3. package/dist/project-pi-entry.js +46 -8
  4. package/dist/runtime/workflows/task-bootstrap/prompt.md +2 -0
  5. package/dist/web/assets/{Assistant-B3h2yQF3.css → Assistant-4yZWjYm-.css} +1 -1
  6. package/dist/web/assets/Assistant-BNVXOHQZ.js +1 -0
  7. package/dist/web/assets/Dashboard-zKTK6EZD.js +1 -0
  8. package/dist/web/assets/Files-DI98WkdW.js +1 -0
  9. package/dist/web/assets/{Markdown-Bq8P_NBV.js → Markdown-D3cU0ani.js} +4 -4
  10. package/dist/web/assets/Materials-CK-mbNmo.css +1 -0
  11. package/dist/web/assets/Materials-CWptgAHz.js +6 -0
  12. package/dist/web/assets/Sessions-DiDwqXLI.js +1 -0
  13. package/dist/web/assets/WorkspaceTree-DeAA1QtV.js +1 -0
  14. package/dist/web/assets/{file-links-CFCIacLV.js → file-links-GfCXWkEh.js} +1 -1
  15. package/dist/web/assets/index-BwEl1PIa.js +66 -0
  16. package/dist/web/assets/{index-B-MqU_88.css → index-CTIAGUGG.css} +1 -1
  17. package/dist/web/downloads/teammy-skill.zip +0 -0
  18. package/dist/web/index.html +2 -2
  19. package/node_modules/@isaacs/nonrecursive-glob-match/LICENSE.md +55 -0
  20. package/node_modules/@isaacs/nonrecursive-glob-match/README.md +333 -0
  21. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts +114 -0
  22. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts.map +1 -0
  23. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js +762 -0
  24. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js.map +1 -0
  25. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js +3 -0
  26. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js.map +7 -0
  27. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/package.json +3 -0
  28. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts +4 -0
  29. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts.map +1 -0
  30. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js +142 -0
  31. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js.map +1 -0
  32. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts +114 -0
  33. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts.map +1 -0
  34. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js +758 -0
  35. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js.map +1 -0
  36. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js +3 -0
  37. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js.map +7 -0
  38. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/package.json +3 -0
  39. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts +4 -0
  40. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts.map +1 -0
  41. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js +138 -0
  42. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js.map +1 -0
  43. package/node_modules/@isaacs/nonrecursive-glob-match/package.json +56 -0
  44. package/node_modules/@isaacs/nonrecursive-glob-match/src/index.ts +900 -0
  45. package/node_modules/@isaacs/nonrecursive-glob-match/src/parse-class.ts +158 -0
  46. package/node_modules/@wecom/aibot-node-sdk/README.md +786 -0
  47. package/node_modules/@wecom/aibot-node-sdk/dist/api.d.ts +17 -0
  48. package/node_modules/@wecom/aibot-node-sdk/dist/client.d.ts +217 -0
  49. package/node_modules/@wecom/aibot-node-sdk/dist/crypto.d.ts +12 -0
  50. package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js +1563 -0
  51. package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js.map +1 -0
  52. package/node_modules/@wecom/aibot-node-sdk/dist/index.d.ts +1324 -0
  53. package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js +1544 -0
  54. package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js.map +1 -0
  55. package/node_modules/@wecom/aibot-node-sdk/dist/logger.d.ts +14 -0
  56. package/node_modules/@wecom/aibot-node-sdk/dist/message-handler.d.ts +29 -0
  57. package/node_modules/@wecom/aibot-node-sdk/dist/types/api.d.ts +466 -0
  58. package/node_modules/@wecom/aibot-node-sdk/dist/types/common.d.ts +30 -0
  59. package/node_modules/@wecom/aibot-node-sdk/dist/types/config.d.ts +34 -0
  60. package/node_modules/@wecom/aibot-node-sdk/dist/types/event.d.ts +109 -0
  61. package/node_modules/@wecom/aibot-node-sdk/dist/types/index.d.ts +10 -0
  62. package/node_modules/@wecom/aibot-node-sdk/dist/types/message.d.ts +158 -0
  63. package/node_modules/@wecom/aibot-node-sdk/dist/utils.d.ts +19 -0
  64. package/node_modules/@wecom/aibot-node-sdk/dist/wecom-crypto/index.d.ts +46 -0
  65. package/node_modules/@wecom/aibot-node-sdk/dist/ws.d.ts +161 -0
  66. package/node_modules/@wecom/aibot-node-sdk/package.json +43 -0
  67. package/node_modules/asynckit/LICENSE +21 -0
  68. package/node_modules/asynckit/README.md +233 -0
  69. package/node_modules/asynckit/bench.js +76 -0
  70. package/node_modules/asynckit/index.js +6 -0
  71. package/node_modules/asynckit/lib/abort.js +29 -0
  72. package/node_modules/asynckit/lib/async.js +34 -0
  73. package/node_modules/asynckit/lib/defer.js +26 -0
  74. package/node_modules/asynckit/lib/iterate.js +75 -0
  75. package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  76. package/node_modules/asynckit/lib/readable_parallel.js +25 -0
  77. package/node_modules/asynckit/lib/readable_serial.js +25 -0
  78. package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  79. package/node_modules/asynckit/lib/state.js +37 -0
  80. package/node_modules/asynckit/lib/streamify.js +141 -0
  81. package/node_modules/asynckit/lib/terminator.js +29 -0
  82. package/node_modules/asynckit/package.json +63 -0
  83. package/node_modules/asynckit/parallel.js +43 -0
  84. package/node_modules/asynckit/serial.js +17 -0
  85. package/node_modules/asynckit/serialOrdered.js +75 -0
  86. package/node_modules/asynckit/stream.js +21 -0
  87. package/node_modules/axios/CHANGELOG.md +1934 -0
  88. package/node_modules/axios/LICENSE +7 -0
  89. package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  90. package/node_modules/axios/README.md +2786 -0
  91. package/node_modules/axios/dist/axios.js +6460 -0
  92. package/node_modules/axios/dist/axios.min.js +5 -0
  93. package/node_modules/axios/dist/axios.min.js.map +1 -0
  94. package/node_modules/axios/dist/browser/axios.cjs +6509 -0
  95. package/node_modules/axios/dist/esm/axios.js +6530 -0
  96. package/node_modules/axios/dist/esm/axios.min.js +3 -0
  97. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  98. package/node_modules/axios/dist/node/axios.cjs +7491 -0
  99. package/node_modules/axios/index.d.cts +785 -0
  100. package/node_modules/axios/index.d.ts +804 -0
  101. package/node_modules/axios/index.js +45 -0
  102. package/node_modules/axios/lib/adapters/README.md +36 -0
  103. package/node_modules/axios/lib/adapters/adapters.js +132 -0
  104. package/node_modules/axios/lib/adapters/fetch.js +749 -0
  105. package/node_modules/axios/lib/adapters/http.js +1609 -0
  106. package/node_modules/axios/lib/adapters/xhr.js +384 -0
  107. package/node_modules/axios/lib/axios.js +89 -0
  108. package/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  109. package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  110. package/node_modules/axios/lib/cancel/isCancel.js +5 -0
  111. package/node_modules/axios/lib/core/Axios.js +361 -0
  112. package/node_modules/axios/lib/core/AxiosError.js +278 -0
  113. package/node_modules/axios/lib/core/AxiosHeaders.js +487 -0
  114. package/node_modules/axios/lib/core/InterceptorManager.js +182 -0
  115. package/node_modules/axios/lib/core/README.md +8 -0
  116. package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
  117. package/node_modules/axios/lib/core/buildFullPath.js +76 -0
  118. package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
  119. package/node_modules/axios/lib/core/dispatchRequest.js +115 -0
  120. package/node_modules/axios/lib/core/mergeConfig.js +237 -0
  121. package/node_modules/axios/lib/core/methodList.js +17 -0
  122. package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  123. package/node_modules/axios/lib/core/settle.js +27 -0
  124. package/node_modules/axios/lib/core/transformData.js +28 -0
  125. package/node_modules/axios/lib/defaults/index.js +178 -0
  126. package/node_modules/axios/lib/defaults/transitional.js +11 -0
  127. package/node_modules/axios/lib/env/README.md +3 -0
  128. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  129. package/node_modules/axios/lib/env/data.js +1 -0
  130. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +165 -0
  131. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  132. package/node_modules/axios/lib/helpers/Http2Sessions.js +122 -0
  133. package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  134. package/node_modules/axios/lib/helpers/README.md +7 -0
  135. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  136. package/node_modules/axios/lib/helpers/bind.js +14 -0
  137. package/node_modules/axios/lib/helpers/buildURL.js +69 -0
  138. package/node_modules/axios/lib/helpers/callbackify.js +18 -0
  139. package/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  140. package/node_modules/axios/lib/helpers/composeSignals.js +71 -0
  141. package/node_modules/axios/lib/helpers/cookies.js +88 -0
  142. package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  143. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +193 -0
  144. package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
  145. package/node_modules/axios/lib/helpers/formDataToJSON.js +149 -0
  146. package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  147. package/node_modules/axios/lib/helpers/fromDataURI.js +75 -0
  148. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  149. package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  150. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +11 -0
  151. package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  152. package/node_modules/axios/lib/helpers/null.js +2 -0
  153. package/node_modules/axios/lib/helpers/parseHeaders.js +72 -0
  154. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  155. package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  156. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  157. package/node_modules/axios/lib/helpers/resolveConfig.js +120 -0
  158. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  159. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +520 -0
  160. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  161. package/node_modules/axios/lib/helpers/spread.js +28 -0
  162. package/node_modules/axios/lib/helpers/throttle.js +45 -0
  163. package/node_modules/axios/lib/helpers/toFormData.js +279 -0
  164. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  165. package/node_modules/axios/lib/helpers/trackStream.js +89 -0
  166. package/node_modules/axios/lib/helpers/validator.js +112 -0
  167. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  168. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  169. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  170. package/node_modules/axios/lib/platform/browser/index.js +13 -0
  171. package/node_modules/axios/lib/platform/common/utils.js +52 -0
  172. package/node_modules/axios/lib/platform/index.js +7 -0
  173. package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  174. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  175. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  176. package/node_modules/axios/lib/platform/node/index.js +37 -0
  177. package/node_modules/axios/lib/utils.js +1201 -0
  178. package/node_modules/axios/node_modules/agent-base/README.md +145 -0
  179. package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
  180. package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
  181. package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
  182. package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  183. package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
  184. package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  185. package/node_modules/axios/node_modules/agent-base/package.json +64 -0
  186. package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
  187. package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
  188. package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
  189. package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  190. package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
  191. package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  192. package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  193. package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
  194. package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  195. package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  196. package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  197. package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  198. package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
  199. package/node_modules/axios/package.json +202 -0
  200. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  201. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  202. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  203. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  204. package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  205. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  206. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  207. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  208. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  209. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  210. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  211. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  212. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  213. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  214. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  215. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  216. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  217. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  218. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  219. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  220. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  221. package/node_modules/combined-stream/License +19 -0
  222. package/node_modules/combined-stream/Readme.md +138 -0
  223. package/node_modules/combined-stream/lib/combined_stream.js +208 -0
  224. package/node_modules/combined-stream/package.json +25 -0
  225. package/node_modules/delayed-stream/.npmignore +1 -0
  226. package/node_modules/delayed-stream/License +19 -0
  227. package/node_modules/delayed-stream/Makefile +7 -0
  228. package/node_modules/delayed-stream/Readme.md +141 -0
  229. package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  230. package/node_modules/delayed-stream/package.json +27 -0
  231. package/node_modules/dunder-proto/.eslintrc +5 -0
  232. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  233. package/node_modules/dunder-proto/.nycrc +13 -0
  234. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  235. package/node_modules/dunder-proto/LICENSE +21 -0
  236. package/node_modules/dunder-proto/README.md +54 -0
  237. package/node_modules/dunder-proto/get.d.ts +5 -0
  238. package/node_modules/dunder-proto/get.js +30 -0
  239. package/node_modules/dunder-proto/package.json +76 -0
  240. package/node_modules/dunder-proto/set.d.ts +5 -0
  241. package/node_modules/dunder-proto/set.js +35 -0
  242. package/node_modules/dunder-proto/test/get.js +34 -0
  243. package/node_modules/dunder-proto/test/index.js +4 -0
  244. package/node_modules/dunder-proto/test/set.js +50 -0
  245. package/node_modules/dunder-proto/tsconfig.json +9 -0
  246. package/node_modules/es-define-property/.eslintrc +13 -0
  247. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  248. package/node_modules/es-define-property/.nycrc +9 -0
  249. package/node_modules/es-define-property/CHANGELOG.md +29 -0
  250. package/node_modules/es-define-property/LICENSE +21 -0
  251. package/node_modules/es-define-property/README.md +49 -0
  252. package/node_modules/es-define-property/index.d.ts +3 -0
  253. package/node_modules/es-define-property/index.js +14 -0
  254. package/node_modules/es-define-property/package.json +81 -0
  255. package/node_modules/es-define-property/test/index.js +56 -0
  256. package/node_modules/es-define-property/tsconfig.json +10 -0
  257. package/node_modules/es-errors/.eslintrc +5 -0
  258. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  259. package/node_modules/es-errors/CHANGELOG.md +40 -0
  260. package/node_modules/es-errors/LICENSE +21 -0
  261. package/node_modules/es-errors/README.md +55 -0
  262. package/node_modules/es-errors/eval.d.ts +3 -0
  263. package/node_modules/es-errors/eval.js +4 -0
  264. package/node_modules/es-errors/index.d.ts +3 -0
  265. package/node_modules/es-errors/index.js +4 -0
  266. package/node_modules/es-errors/package.json +80 -0
  267. package/node_modules/es-errors/range.d.ts +3 -0
  268. package/node_modules/es-errors/range.js +4 -0
  269. package/node_modules/es-errors/ref.d.ts +3 -0
  270. package/node_modules/es-errors/ref.js +4 -0
  271. package/node_modules/es-errors/syntax.d.ts +3 -0
  272. package/node_modules/es-errors/syntax.js +4 -0
  273. package/node_modules/es-errors/test/index.js +19 -0
  274. package/node_modules/es-errors/tsconfig.json +49 -0
  275. package/node_modules/es-errors/type.d.ts +3 -0
  276. package/node_modules/es-errors/type.js +4 -0
  277. package/node_modules/es-errors/uri.d.ts +3 -0
  278. package/node_modules/es-errors/uri.js +4 -0
  279. package/node_modules/es-object-atoms/.eslintrc +16 -0
  280. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  281. package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
  282. package/node_modules/es-object-atoms/LICENSE +21 -0
  283. package/node_modules/es-object-atoms/README.md +63 -0
  284. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  285. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  286. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  287. package/node_modules/es-object-atoms/ToObject.js +10 -0
  288. package/node_modules/es-object-atoms/index.d.ts +3 -0
  289. package/node_modules/es-object-atoms/index.js +4 -0
  290. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  291. package/node_modules/es-object-atoms/isObject.js +6 -0
  292. package/node_modules/es-object-atoms/package.json +79 -0
  293. package/node_modules/es-object-atoms/test/index.js +38 -0
  294. package/node_modules/es-object-atoms/tsconfig.json +7 -0
  295. package/node_modules/es-set-tostringtag/.eslintrc +13 -0
  296. package/node_modules/es-set-tostringtag/.nycrc +9 -0
  297. package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
  298. package/node_modules/es-set-tostringtag/LICENSE +21 -0
  299. package/node_modules/es-set-tostringtag/README.md +53 -0
  300. package/node_modules/es-set-tostringtag/index.d.ts +10 -0
  301. package/node_modules/es-set-tostringtag/index.js +35 -0
  302. package/node_modules/es-set-tostringtag/package.json +78 -0
  303. package/node_modules/es-set-tostringtag/test/index.js +85 -0
  304. package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
  305. package/node_modules/eventemitter3/LICENSE +21 -0
  306. package/node_modules/eventemitter3/README.md +85 -0
  307. package/node_modules/eventemitter3/dist/eventemitter3.esm.js +355 -0
  308. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
  309. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
  310. package/node_modules/eventemitter3/dist/eventemitter3.umd.js +363 -0
  311. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
  312. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
  313. package/node_modules/eventemitter3/index.d.ts +135 -0
  314. package/node_modules/eventemitter3/index.js +336 -0
  315. package/node_modules/eventemitter3/index.mjs +4 -0
  316. package/node_modules/eventemitter3/package.json +62 -0
  317. package/node_modules/follow-redirects/LICENSE +18 -0
  318. package/node_modules/follow-redirects/README.md +183 -0
  319. package/node_modules/follow-redirects/debug.js +15 -0
  320. package/node_modules/follow-redirects/http.js +1 -0
  321. package/node_modules/follow-redirects/https.js +1 -0
  322. package/node_modules/follow-redirects/index.js +714 -0
  323. package/node_modules/follow-redirects/package.json +58 -0
  324. package/node_modules/form-data/CHANGELOG.md +686 -0
  325. package/node_modules/form-data/License +19 -0
  326. package/node_modules/form-data/README.md +355 -0
  327. package/node_modules/form-data/index.d.ts +62 -0
  328. package/node_modules/form-data/lib/browser.js +4 -0
  329. package/node_modules/form-data/lib/form_data.js +506 -0
  330. package/node_modules/form-data/lib/populate.js +10 -0
  331. package/node_modules/form-data/package.json +82 -0
  332. package/node_modules/function-bind/.eslintrc +21 -0
  333. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  334. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  335. package/node_modules/function-bind/.nycrc +13 -0
  336. package/node_modules/function-bind/CHANGELOG.md +136 -0
  337. package/node_modules/function-bind/LICENSE +20 -0
  338. package/node_modules/function-bind/README.md +46 -0
  339. package/node_modules/function-bind/implementation.js +84 -0
  340. package/node_modules/function-bind/index.js +5 -0
  341. package/node_modules/function-bind/package.json +87 -0
  342. package/node_modules/function-bind/test/.eslintrc +9 -0
  343. package/node_modules/function-bind/test/index.js +252 -0
  344. package/node_modules/get-intrinsic/.eslintrc +42 -0
  345. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  346. package/node_modules/get-intrinsic/.nycrc +9 -0
  347. package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  348. package/node_modules/get-intrinsic/LICENSE +21 -0
  349. package/node_modules/get-intrinsic/README.md +71 -0
  350. package/node_modules/get-intrinsic/index.js +378 -0
  351. package/node_modules/get-intrinsic/package.json +97 -0
  352. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  353. package/node_modules/get-proto/.eslintrc +10 -0
  354. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  355. package/node_modules/get-proto/.nycrc +9 -0
  356. package/node_modules/get-proto/CHANGELOG.md +21 -0
  357. package/node_modules/get-proto/LICENSE +21 -0
  358. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  359. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  360. package/node_modules/get-proto/README.md +50 -0
  361. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  362. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  363. package/node_modules/get-proto/index.d.ts +5 -0
  364. package/node_modules/get-proto/index.js +27 -0
  365. package/node_modules/get-proto/package.json +81 -0
  366. package/node_modules/get-proto/test/index.js +68 -0
  367. package/node_modules/get-proto/tsconfig.json +9 -0
  368. package/node_modules/glob/README.md +388 -214
  369. package/node_modules/glob/dist/commonjs/glob.d.ts +20 -11
  370. package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -1
  371. package/node_modules/glob/dist/commonjs/glob.js +22 -29
  372. package/node_modules/glob/dist/commonjs/glob.js.map +1 -1
  373. package/node_modules/glob/dist/commonjs/has-magic.d.ts +1 -1
  374. package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -1
  375. package/node_modules/glob/dist/commonjs/has-magic.js +1 -4
  376. package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -1
  377. package/node_modules/glob/dist/commonjs/ignore.d.ts +16 -4
  378. package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -1
  379. package/node_modules/glob/dist/commonjs/ignore.js +24 -4
  380. package/node_modules/glob/dist/commonjs/ignore.js.map +1 -1
  381. package/node_modules/glob/dist/commonjs/index.d.ts +3 -2
  382. package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -1
  383. package/node_modules/glob/dist/commonjs/index.js.map +1 -1
  384. package/node_modules/glob/dist/commonjs/index.min.js +2 -3
  385. package/node_modules/glob/dist/commonjs/index.min.js.map +4 -4
  386. package/node_modules/glob/dist/commonjs/pattern.d.ts +10 -3
  387. package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -1
  388. package/node_modules/glob/dist/commonjs/pattern.js +27 -15
  389. package/node_modules/glob/dist/commonjs/pattern.js.map +1 -1
  390. package/node_modules/glob/dist/commonjs/processor.d.ts +23 -10
  391. package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -1
  392. package/node_modules/glob/dist/commonjs/processor.js +36 -23
  393. package/node_modules/glob/dist/commonjs/processor.js.map +1 -1
  394. package/node_modules/glob/dist/commonjs/walker.d.ts +19 -17
  395. package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -1
  396. package/node_modules/glob/dist/commonjs/walker.js +50 -35
  397. package/node_modules/glob/dist/commonjs/walker.js.map +1 -1
  398. package/node_modules/glob/dist/esm/glob.d.ts +20 -11
  399. package/node_modules/glob/dist/esm/glob.d.ts.map +1 -1
  400. package/node_modules/glob/dist/esm/glob.js +22 -29
  401. package/node_modules/glob/dist/esm/glob.js.map +1 -1
  402. package/node_modules/glob/dist/esm/has-magic.d.ts +1 -1
  403. package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -1
  404. package/node_modules/glob/dist/esm/has-magic.js +1 -4
  405. package/node_modules/glob/dist/esm/has-magic.js.map +1 -1
  406. package/node_modules/glob/dist/esm/ignore.d.ts +16 -4
  407. package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -1
  408. package/node_modules/glob/dist/esm/ignore.js +25 -5
  409. package/node_modules/glob/dist/esm/ignore.js.map +1 -1
  410. package/node_modules/glob/dist/esm/index.d.ts +3 -2
  411. package/node_modules/glob/dist/esm/index.d.ts.map +1 -1
  412. package/node_modules/glob/dist/esm/index.js.map +1 -1
  413. package/node_modules/glob/dist/esm/index.min.js +2 -3
  414. package/node_modules/glob/dist/esm/index.min.js.map +4 -4
  415. package/node_modules/glob/dist/esm/pattern.d.ts +10 -3
  416. package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -1
  417. package/node_modules/glob/dist/esm/pattern.js +27 -15
  418. package/node_modules/glob/dist/esm/pattern.js.map +1 -1
  419. package/node_modules/glob/dist/esm/processor.d.ts +23 -10
  420. package/node_modules/glob/dist/esm/processor.d.ts.map +1 -1
  421. package/node_modules/glob/dist/esm/processor.js +36 -23
  422. package/node_modules/glob/dist/esm/processor.js.map +1 -1
  423. package/node_modules/glob/dist/esm/walker.d.ts +19 -17
  424. package/node_modules/glob/dist/esm/walker.d.ts.map +1 -1
  425. package/node_modules/glob/dist/esm/walker.js +51 -36
  426. package/node_modules/glob/dist/esm/walker.js.map +1 -1
  427. package/node_modules/glob/package.json +28 -12
  428. package/node_modules/glob/src/glob.ts +655 -0
  429. package/node_modules/glob/src/has-magic.ts +23 -0
  430. package/node_modules/glob/src/ignore.ts +162 -0
  431. package/node_modules/glob/src/index.ts +225 -0
  432. package/node_modules/glob/src/pattern.ts +286 -0
  433. package/node_modules/glob/src/processor.ts +333 -0
  434. package/node_modules/glob/src/walker.ts +523 -0
  435. package/node_modules/gopd/.eslintrc +16 -0
  436. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  437. package/node_modules/gopd/CHANGELOG.md +45 -0
  438. package/node_modules/gopd/LICENSE +21 -0
  439. package/node_modules/gopd/README.md +40 -0
  440. package/node_modules/gopd/gOPD.d.ts +1 -0
  441. package/node_modules/gopd/gOPD.js +4 -0
  442. package/node_modules/gopd/index.d.ts +5 -0
  443. package/node_modules/gopd/index.js +15 -0
  444. package/node_modules/gopd/package.json +77 -0
  445. package/node_modules/gopd/test/index.js +36 -0
  446. package/node_modules/gopd/tsconfig.json +9 -0
  447. package/node_modules/has-symbols/.eslintrc +11 -0
  448. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  449. package/node_modules/has-symbols/.nycrc +9 -0
  450. package/node_modules/has-symbols/CHANGELOG.md +91 -0
  451. package/node_modules/has-symbols/LICENSE +21 -0
  452. package/node_modules/has-symbols/README.md +46 -0
  453. package/node_modules/has-symbols/index.d.ts +3 -0
  454. package/node_modules/has-symbols/index.js +14 -0
  455. package/node_modules/has-symbols/package.json +111 -0
  456. package/node_modules/has-symbols/shams.d.ts +3 -0
  457. package/node_modules/has-symbols/shams.js +45 -0
  458. package/node_modules/has-symbols/test/index.js +22 -0
  459. package/node_modules/has-symbols/test/shams/core-js.js +29 -0
  460. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  461. package/node_modules/has-symbols/test/tests.js +58 -0
  462. package/node_modules/has-symbols/tsconfig.json +10 -0
  463. package/node_modules/has-tostringtag/.eslintrc +5 -0
  464. package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
  465. package/node_modules/has-tostringtag/.nycrc +13 -0
  466. package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
  467. package/node_modules/has-tostringtag/LICENSE +21 -0
  468. package/node_modules/has-tostringtag/README.md +46 -0
  469. package/node_modules/has-tostringtag/index.d.ts +3 -0
  470. package/node_modules/has-tostringtag/index.js +8 -0
  471. package/node_modules/has-tostringtag/package.json +108 -0
  472. package/node_modules/has-tostringtag/shams.d.ts +3 -0
  473. package/node_modules/has-tostringtag/shams.js +8 -0
  474. package/node_modules/has-tostringtag/test/index.js +21 -0
  475. package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
  476. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
  477. package/node_modules/has-tostringtag/test/tests.js +15 -0
  478. package/node_modules/has-tostringtag/tsconfig.json +49 -0
  479. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  480. package/node_modules/hasown/.nycrc +13 -0
  481. package/node_modules/hasown/CHANGELOG.md +58 -0
  482. package/node_modules/hasown/LICENSE +21 -0
  483. package/node_modules/hasown/README.md +40 -0
  484. package/node_modules/hasown/eslint.config.mjs +6 -0
  485. package/node_modules/hasown/index.d.ts +3 -0
  486. package/node_modules/hasown/index.js +8 -0
  487. package/node_modules/hasown/package.json +91 -0
  488. package/node_modules/hasown/tsconfig.json +6 -0
  489. package/node_modules/math-intrinsics/.eslintrc +16 -0
  490. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  491. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  492. package/node_modules/math-intrinsics/LICENSE +21 -0
  493. package/node_modules/math-intrinsics/README.md +50 -0
  494. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  495. package/node_modules/math-intrinsics/abs.js +4 -0
  496. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  497. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  498. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  499. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  500. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  501. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  502. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  503. package/node_modules/math-intrinsics/floor.js +4 -0
  504. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  505. package/node_modules/math-intrinsics/isFinite.js +12 -0
  506. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  507. package/node_modules/math-intrinsics/isInteger.js +16 -0
  508. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  509. package/node_modules/math-intrinsics/isNaN.js +6 -0
  510. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  511. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  512. package/node_modules/math-intrinsics/max.d.ts +1 -0
  513. package/node_modules/math-intrinsics/max.js +4 -0
  514. package/node_modules/math-intrinsics/min.d.ts +1 -0
  515. package/node_modules/math-intrinsics/min.js +4 -0
  516. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  517. package/node_modules/math-intrinsics/mod.js +9 -0
  518. package/node_modules/math-intrinsics/package.json +86 -0
  519. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  520. package/node_modules/math-intrinsics/pow.js +4 -0
  521. package/node_modules/math-intrinsics/round.d.ts +1 -0
  522. package/node_modules/math-intrinsics/round.js +4 -0
  523. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  524. package/node_modules/math-intrinsics/sign.js +11 -0
  525. package/node_modules/math-intrinsics/test/index.js +192 -0
  526. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  527. package/node_modules/mime-db/HISTORY.md +507 -0
  528. package/node_modules/mime-db/LICENSE +23 -0
  529. package/node_modules/mime-db/README.md +100 -0
  530. package/node_modules/mime-db/db.json +8519 -0
  531. package/node_modules/mime-db/index.js +12 -0
  532. package/node_modules/mime-db/package.json +60 -0
  533. package/node_modules/mime-types/HISTORY.md +397 -0
  534. package/node_modules/mime-types/LICENSE +23 -0
  535. package/node_modules/mime-types/README.md +113 -0
  536. package/node_modules/mime-types/index.js +188 -0
  537. package/node_modules/mime-types/package.json +44 -0
  538. package/node_modules/minimatch/README.md +125 -107
  539. package/node_modules/minimatch/dist/commonjs/index.d.ts +49 -38
  540. package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -1
  541. package/node_modules/minimatch/dist/commonjs/index.js +782 -359
  542. package/node_modules/minimatch/dist/commonjs/index.js.map +1 -1
  543. package/node_modules/minimatch/dist/esm/index.d.ts +49 -38
  544. package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -1
  545. package/node_modules/minimatch/dist/esm/index.js +781 -356
  546. package/node_modules/minimatch/dist/esm/index.js.map +1 -1
  547. package/node_modules/minimatch/package.json +5 -4
  548. package/node_modules/path-scurry/README.md +0 -1
  549. package/node_modules/path-scurry/dist/commonjs/index.d.ts +7 -0
  550. package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -1
  551. package/node_modules/path-scurry/dist/commonjs/index.js +59 -21
  552. package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -1
  553. package/node_modules/path-scurry/dist/esm/index.d.ts +7 -0
  554. package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -1
  555. package/node_modules/path-scurry/dist/esm/index.js +42 -14
  556. package/node_modules/path-scurry/dist/esm/index.js.map +1 -1
  557. package/node_modules/path-scurry/package.json +4 -4
  558. package/node_modules/proxy-from-env/LICENSE +20 -0
  559. package/node_modules/proxy-from-env/README.md +163 -0
  560. package/node_modules/proxy-from-env/index.cjs +105 -0
  561. package/node_modules/proxy-from-env/index.js +103 -0
  562. package/node_modules/proxy-from-env/package.json +43 -0
  563. package/package.json +3 -1
  564. package/dist/web/assets/Assistant-DSQAdSiW.js +0 -1
  565. package/dist/web/assets/Dashboard-dCu2Cdxd.js +0 -1
  566. package/dist/web/assets/Files-cRhoWviM.js +0 -1
  567. package/dist/web/assets/Sessions-BxHsX1C5.js +0 -1
  568. package/dist/web/assets/WorkspaceTree-CD94JsaJ.js +0 -1
  569. package/dist/web/assets/index-BXpTaAUz.js +0 -66
  570. package/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -22
  571. package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
  572. package/node_modules/minimatch/dist/commonjs/ast.js +0 -845
  573. package/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
  574. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
  575. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
  576. package/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -150
  577. package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
  578. package/node_modules/minimatch/dist/esm/ast.d.ts +0 -22
  579. package/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
  580. package/node_modules/minimatch/dist/esm/ast.js +0 -841
  581. package/node_modules/minimatch/dist/esm/ast.js.map +0 -1
  582. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
  583. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
  584. package/node_modules/minimatch/dist/esm/brace-expressions.js +0 -146
  585. package/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
@@ -0,0 +1,762 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Matcher = void 0;
4
+ const parse_class_js_1 = require("./parse-class.js");
5
+ // the end of the pattern, or of a negated sub-pattern
6
+ const MATCH = { t: 'match', id: 0 };
7
+ const extTypes = '!?+*@';
8
+ const lit = (ch) => ({ t: 'lit', ch });
9
+ const reEscape = (s) => s.replace(/[\\^$.*+?()[\]{}|/]/g, '\\$&');
10
+ // a RegExp that only matches `s`, with unicode case folding
11
+ const newFoldRe = (s) => new RegExp(`^${reEscape(s)}$`, 'iu');
12
+ // foldRe for one literal char. The same chars are in most patterns,
13
+ // so keep them. A RegExp without the `g` or `y` flag has no state to
14
+ // share.
15
+ const foldCache = new Map();
16
+ const foldRe = (ch) => {
17
+ let re = foldCache.get(ch);
18
+ if (!re) {
19
+ re = newFoldRe(ch);
20
+ if (foldCache.size >= 1000)
21
+ foldCache.clear();
22
+ foldCache.set(ch, re);
23
+ }
24
+ return re;
25
+ };
26
+ const litMatch = (l, c) => {
27
+ if (c === l.ch)
28
+ return true;
29
+ if (!l.re)
30
+ return false;
31
+ const code = c.charCodeAt(0);
32
+ if (code >= 128)
33
+ return l.re.test(c);
34
+ const ascii = (l.ascii ??= new Uint8Array(128));
35
+ ascii[code] ||= l.re.test(c) ? 1 : 2;
36
+ return ascii[code] === 1;
37
+ };
38
+ const tokenize = (p, nocase, noext, form) => {
39
+ const toks = [];
40
+ for (let i = 0; i < p.length;) {
41
+ const c = String.fromCodePoint(p.codePointAt(i));
42
+ if (c === '\\') {
43
+ // a trailing \ is a literal \
44
+ const e = p.codePointAt(i + 1);
45
+ const ch = e === undefined ? c : String.fromCodePoint(e);
46
+ toks.push(lit(ch));
47
+ i += 1 + ch.length;
48
+ continue;
49
+ }
50
+ if (c === '[') {
51
+ const [re, consumed] = (0, parse_class_js_1.parseClass)(p, i, nocase, form);
52
+ if (consumed) {
53
+ toks.push({ t: 'class', re });
54
+ i += consumed;
55
+ continue;
56
+ }
57
+ }
58
+ if (!noext && extTypes.includes(c) && p[i + 1] === '(') {
59
+ toks.push({ t: 'open', type: c });
60
+ i += 2;
61
+ continue;
62
+ }
63
+ toks.push(!noext && c === '|' ? { t: 'bar' }
64
+ : !noext && c === ')' ? { t: 'close' }
65
+ : c === '*' ? { t: 'star' }
66
+ : c === '?' ? { t: 'any' }
67
+ : lit(c));
68
+ i += c.length;
69
+ }
70
+ return toks;
71
+ };
72
+ // map each open token index to the index of its close token
73
+ const pair = (toks) => {
74
+ const pairs = new Map();
75
+ const stack = [];
76
+ toks.forEach((tok, i) => {
77
+ if (tok.t === 'open')
78
+ stack.push(i);
79
+ else if (tok.t === 'close' && stack.length)
80
+ pairs.set(stack.pop(), i);
81
+ });
82
+ return pairs;
83
+ };
84
+ // build the alternatives between start and end. An open token that
85
+ // is not closed is never inside a closed extglob, so bar and close
86
+ // tokens are only literal at the top level.
87
+ const build = (toks, pairs, start, end, top) => {
88
+ let seq = [];
89
+ const alts = [seq];
90
+ for (let i = start; i < end; i++) {
91
+ const tok = toks[i];
92
+ const close = pairs.get(i);
93
+ if (tok.t === 'open' && close !== undefined) {
94
+ const sub = build(toks, pairs, i + 1, close, false);
95
+ seq.push({ t: 'ext', type: tok.type, alts: sub });
96
+ i = close;
97
+ }
98
+ else if (tok.t === 'bar' && !top) {
99
+ alts.push((seq = []));
100
+ }
101
+ else if (tok.t === 'open') {
102
+ seq.push(lit(tok.type), lit('('));
103
+ }
104
+ else if (tok.t === 'bar') {
105
+ seq.push(lit('|'));
106
+ }
107
+ else if (tok.t === 'close') {
108
+ seq.push(lit(')'));
109
+ }
110
+ else {
111
+ seq.push(tok);
112
+ }
113
+ }
114
+ return alts;
115
+ };
116
+ // normalize each run of literal chars as one string, so that a char
117
+ // and the combining marks after it compose (or decompose) together.
118
+ // Syntax is already parsed, so a char that normalizes to a syntax
119
+ // char (such as full-width `*` in NFKC) stays a literal.
120
+ const normalize = (items, form) => {
121
+ const out = [];
122
+ let run = '';
123
+ const flush = () => {
124
+ for (const ch of run.normalize(form))
125
+ out.push(lit(ch));
126
+ run = '';
127
+ };
128
+ for (const it of items) {
129
+ if (it.t === 'lit') {
130
+ run += it.ch;
131
+ continue;
132
+ }
133
+ flush();
134
+ out.push(it.t === 'ext' ?
135
+ { ...it, alts: it.alts.map(a => normalize(a, form)) }
136
+ : it);
137
+ }
138
+ flush();
139
+ return out;
140
+ };
141
+ // the start node, and the number of node ids. Ids are dense, from 0
142
+ // for the match node.
143
+ const compile = (items, nocase) => {
144
+ let id = 1;
145
+ const split = (out) => ({ t: 'split', id: id++, out });
146
+ const seq = (items, next) => items.reduceRight((next, it) => item(it, next), next);
147
+ const item = (it, next) => {
148
+ switch (it.t) {
149
+ case 'lit':
150
+ const re = nocase ? foldRe(it.ch) : undefined;
151
+ return { t: 'lit', id: id++, ch: it.ch, re, next };
152
+ case 'any':
153
+ case 'star':
154
+ return { t: it.t, id: id++, next };
155
+ case 'class':
156
+ return { t: 'class', id: id++, re: it.re, next };
157
+ }
158
+ const alts = (next) => it.alts.map(a => seq(a, next));
159
+ switch (it.type) {
160
+ case '@':
161
+ return split(alts(next));
162
+ case '?':
163
+ return split([next, ...alts(next)]);
164
+ case '!':
165
+ return { t: 'neg', id: id++, sub: split(alts(MATCH)), next };
166
+ }
167
+ // * and +, loop back after each match
168
+ const after = split([]);
169
+ const entry = split(alts(after));
170
+ after.out.push(next, entry);
171
+ return it.type === '*' ? after : entry;
172
+ };
173
+ const start = seq(items, MATCH);
174
+ return [start, id];
175
+ };
176
+ // one line per node, in the order that a walk from the start
177
+ // reaches them. Edges point to node ids. The nodes of a negated
178
+ // sub-pattern are indented under their negation.
179
+ const show = (start) => {
180
+ const lines = [];
181
+ const seen = new Set();
182
+ const ref = (n) => (n.t === 'match' ? 'match' : String(n.id));
183
+ const walk = (n, indent) => {
184
+ if (n.t === 'match' || seen.has(n))
185
+ return;
186
+ seen.add(n);
187
+ const line = (desc) => lines.push(`${indent}${n.id}: ${desc}`);
188
+ switch (n.t) {
189
+ case 'split':
190
+ line(`split -> ${n.out.map(ref).join(', ')}`);
191
+ for (const o of n.out)
192
+ walk(o, indent);
193
+ return;
194
+ case 'neg':
195
+ line(`!(${ref(n.sub)}) -> ${ref(n.next)}`);
196
+ walk(n.sub, indent + ' ');
197
+ return walk(n.next, indent);
198
+ case 'lit':
199
+ line(`${JSON.stringify(n.ch)} -> ${ref(n.next)}`);
200
+ break;
201
+ case 'class':
202
+ line(`${n.re} -> ${ref(n.next)}`);
203
+ break;
204
+ default:
205
+ line(`${n.t === 'any' ? '?' : '*'} -> ${ref(n.next)}`);
206
+ }
207
+ walk(n.next, indent);
208
+ };
209
+ walk(start, '');
210
+ return [`start -> ${ref(start)}`, ...lines].join('\n');
211
+ };
212
+ // The threads at one position in the string. Each node thread is
213
+ // only kept once, and runs with the same state are only kept once,
214
+ // so that identical threads merge. The match node is not in
215
+ // `threads`, because it can not step. It sets `match` instead.
216
+ class State {
217
+ // set by the Sim, to mark the nodes that this state has
218
+ gen;
219
+ threads = [];
220
+ match = false;
221
+ runs = [];
222
+ // the sorted ids of the threads, with 0 for a match, once the
223
+ // state is done
224
+ ids = [];
225
+ constructor(gen) {
226
+ this.gen = gen;
227
+ }
228
+ // no threads, so nothing more can match
229
+ get dead() {
230
+ return !this.threads.length && !this.match && !this.runs.length;
231
+ }
232
+ }
233
+ // true if the two states hold the same threads
234
+ const sameState = (a, b) => {
235
+ if (a.ids.length !== b.ids.length)
236
+ return false;
237
+ if (a.runs.length !== b.runs.length)
238
+ return false;
239
+ if (a.ids.some((id, i) => id !== b.ids[i]))
240
+ return false;
241
+ return a.runs.every(r => b.runs.some(o => o.neg === r.neg && sameState(o.state, r.state)));
242
+ };
243
+ const marks = (size) => ({
244
+ has: new Float64Array(size),
245
+ seen: new Float64Array(size),
246
+ gen: 0,
247
+ });
248
+ class Sim {
249
+ // `.` and `..` only match literal dots, even with `dot:true`
250
+ dots;
251
+ // the string starts with `.`, and `dot:true` is not set
252
+ dotStart;
253
+ #marks;
254
+ constructor(dots, dotStart, marks) {
255
+ this.dots = dots;
256
+ this.dotStart = dotStart;
257
+ this.#marks = marks;
258
+ }
259
+ state() {
260
+ return new State(++this.#marks.gen);
261
+ }
262
+ // sort the ids of a state, once it has all of its threads
263
+ done(state) {
264
+ state.ids = state.threads.map(n => n.id).sort((a, b) => a - b);
265
+ if (state.match)
266
+ state.ids.unshift(MATCH.id);
267
+ return state;
268
+ }
269
+ // true the first time that the state walks through the node, so
270
+ // that loops in the graph stop
271
+ #visit(state, node) {
272
+ const { seen } = this.#marks;
273
+ if (seen[node.id] === state.gen)
274
+ return false;
275
+ seen[node.id] = state.gen;
276
+ return true;
277
+ }
278
+ #addThread(state, node) {
279
+ const { has } = this.#marks;
280
+ if (has[node.id] === state.gen)
281
+ return false;
282
+ has[node.id] = state.gen;
283
+ state.threads.push(node);
284
+ return true;
285
+ }
286
+ // wildcards only match a leading dot if `dot:true`. In a negated
287
+ // sub-pattern, this does not apply, because the negation itself
288
+ // can not match a leading dot.
289
+ restricted(i, top) {
290
+ return top && (this.dots || (this.dotStart && i === 0));
291
+ }
292
+ add(state, node, i, top) {
293
+ switch (node.t) {
294
+ case 'split':
295
+ if (!this.#visit(state, node))
296
+ return;
297
+ for (const o of node.out)
298
+ this.add(state, o, i, top);
299
+ return;
300
+ case 'neg':
301
+ if (!this.#visit(state, node))
302
+ return;
303
+ const sub = this.state();
304
+ this.add(sub, node.sub, i, false);
305
+ this.done(sub);
306
+ return this.addRun(state, { t: 'run', neg: node, state: sub }, i, top);
307
+ case 'star':
308
+ // a * can not start a dotfile, even if it matches nothing
309
+ if (this.restricted(i, top))
310
+ return;
311
+ if (this.#addThread(state, node))
312
+ this.add(state, node.next, i, top);
313
+ return;
314
+ case 'match':
315
+ state.match = true;
316
+ return;
317
+ default:
318
+ this.#addThread(state, node);
319
+ }
320
+ }
321
+ addRun(state, run, i, top) {
322
+ for (const r of state.runs) {
323
+ if (r.neg === run.neg && sameState(r.state, run.state))
324
+ return;
325
+ }
326
+ state.runs.push(run);
327
+ if (!run.state.match) {
328
+ this.add(state, run.neg.next, i, top);
329
+ }
330
+ }
331
+ // the threads after char `c`, at index `i`
332
+ step(state, c, i, top) {
333
+ const next = this.state();
334
+ for (const th of state.threads) {
335
+ switch (th.t) {
336
+ case 'lit':
337
+ if (litMatch(th, c)) {
338
+ this.add(next, th.next, i + 1, top);
339
+ }
340
+ break;
341
+ case 'any':
342
+ if (!this.restricted(i, top))
343
+ this.add(next, th.next, i + 1, top);
344
+ break;
345
+ case 'class':
346
+ if (!this.restricted(i, top) && th.re.test(c)) {
347
+ this.add(next, th.next, i + 1, top);
348
+ }
349
+ break;
350
+ case 'star':
351
+ if (!this.restricted(i, top))
352
+ this.add(next, th, i + 1, top);
353
+ }
354
+ }
355
+ if (!this.restricted(i, top)) {
356
+ for (const run of state.runs) {
357
+ // a sub-pattern with no threads can not match again, so the
358
+ // run stays the same
359
+ if (run.state.dead) {
360
+ this.addRun(next, run, i + 1, top);
361
+ continue;
362
+ }
363
+ const sub = this.step(run.state, c, i, false);
364
+ this.addRun(next, { t: 'run', neg: run.neg, state: sub }, i + 1, top);
365
+ }
366
+ }
367
+ return this.done(next);
368
+ }
369
+ }
370
+ // A canonical key for the threads in a state. States with the same
371
+ // key hold the same threads, so they match the same strings.
372
+ const stateKey = (state) => {
373
+ const ids = state.ids.join();
374
+ if (!state.runs.length)
375
+ return ids;
376
+ const runs = state.runs.map(r => `${r.neg.id}(${stateKey(r.state)})`);
377
+ return `${ids}|${runs.sort().join('|')}`;
378
+ };
379
+ // The cache can hold about this many chars of state keys and
380
+ // transitions. When it is full, it is cleared, so that a pattern
381
+ // can not use an unbounded amount of memory.
382
+ const DFA_BUDGET = 1 << 18;
383
+ // A cache of the states that the simulation reaches, built as the
384
+ // matcher is used. Each char of a string is then one Map lookup,
385
+ // once the states that it leads to are known.
386
+ //
387
+ // The dot rules only restrict the first char of a dotfile (strings
388
+ // that are only `.` or `..` do not use the cache). So a dotfile
389
+ // starts at its own state, which takes its first step with the
390
+ // restriction, and every other state takes steps without it.
391
+ class Dfa {
392
+ #start;
393
+ #states = new Map();
394
+ #size = 0;
395
+ #plain;
396
+ #dotStart;
397
+ #sim;
398
+ #dotSim;
399
+ constructor(start, marks) {
400
+ this.#start = start;
401
+ this.#sim = new Sim(false, false, marks);
402
+ this.#dotSim = new Sim(false, true, marks);
403
+ }
404
+ #make(state) {
405
+ return {
406
+ state,
407
+ match: state.match,
408
+ dead: state.dead,
409
+ next: new Map(),
410
+ };
411
+ }
412
+ #intern(state) {
413
+ const key = stateKey(state);
414
+ const found = this.#states.get(key);
415
+ if (found)
416
+ return found;
417
+ if (this.#size > DFA_BUDGET)
418
+ this.#clear();
419
+ const d = this.#make(state);
420
+ this.#states.set(key, d);
421
+ this.#size += key.length + 1;
422
+ return d;
423
+ }
424
+ #clear() {
425
+ this.#states.clear();
426
+ this.#size = 0;
427
+ this.#plain = undefined;
428
+ this.#dotStart = undefined;
429
+ }
430
+ start(dotStart) {
431
+ if (dotStart) {
432
+ if (this.#dotStart)
433
+ return this.#dotStart;
434
+ const state = this.#dotSim.state();
435
+ this.#dotSim.add(state, this.#start, 0, true);
436
+ return (this.#dotStart = this.#make(this.#dotSim.done(state)));
437
+ }
438
+ if (this.#plain)
439
+ return this.#plain;
440
+ const state = this.#sim.state();
441
+ this.#sim.add(state, this.#start, 0, true);
442
+ return (this.#plain = this.#intern(this.#sim.done(state)));
443
+ }
444
+ // the next state, after a miss in `d.ascii`
445
+ next(d, c) {
446
+ const code = c.charCodeAt(0);
447
+ const found = code < 128 ? undefined : d.next.get(c);
448
+ if (found)
449
+ return found;
450
+ // the dotfile start is not in the cache, so it is never shared
451
+ const n = d === this.#dotStart ?
452
+ this.#intern(this.#dotSim.step(d.state, c, 0, true))
453
+ : this.#intern(this.#sim.step(d.state, c, 1, true));
454
+ if (code < 128) {
455
+ if (!d.ascii) {
456
+ d.ascii = new Array(128);
457
+ this.#size += 128;
458
+ }
459
+ d.ascii[code] = n;
460
+ }
461
+ else {
462
+ d.next.set(c, n);
463
+ }
464
+ this.#size++;
465
+ return n;
466
+ }
467
+ }
468
+ // the nodes in order, if the graph is a single chain
469
+ const linear = (start) => {
470
+ const nodes = [];
471
+ for (let n = start; n.t !== 'match'; n = n.next) {
472
+ if (n.t === 'split' || n.t === 'neg')
473
+ return undefined;
474
+ nodes.push(n);
475
+ }
476
+ return nodes;
477
+ };
478
+ // Match a chain of nodes. Each node other than `*` matches exactly
479
+ // one char, so on a failure it is enough to go back to the last `*`
480
+ // and let it match one more char. This takes at most
481
+ // nodes.length * chars.length steps.
482
+ const testLinear = (nodes, chars, start, end) => {
483
+ let ni = 0;
484
+ let ci = start;
485
+ let starNi = -1;
486
+ let starCi = 0;
487
+ while (ci < end) {
488
+ const n = nodes[ni];
489
+ if (n?.t === 'star') {
490
+ starNi = ni++;
491
+ starCi = ci;
492
+ continue;
493
+ }
494
+ const c = chars[ci];
495
+ if (n &&
496
+ (n.t === 'any' ||
497
+ (n.t === 'lit' && litMatch(n, c)) ||
498
+ (n.t === 'class' && n.re.test(c)))) {
499
+ ni++;
500
+ ci++;
501
+ continue;
502
+ }
503
+ if (starNi === -1)
504
+ return false;
505
+ ni = starNi + 1;
506
+ ci = ++starCi;
507
+ }
508
+ while (nodes[ni]?.t === 'star')
509
+ ni++;
510
+ return ni === nodes.length;
511
+ };
512
+ // The least and most chars that the items can match. These are only
513
+ // bounds: a negation can match a string of any length, so it counts
514
+ // as 0 to Infinity.
515
+ const lengths = (items) => {
516
+ let min = 0;
517
+ let max = 0;
518
+ for (const it of items) {
519
+ const [lo, hi] = itemLengths(it);
520
+ min += lo;
521
+ max += hi;
522
+ }
523
+ return [min, max];
524
+ };
525
+ const itemLengths = (it) => {
526
+ if (it.t === 'star')
527
+ return [0, Infinity];
528
+ if (it.t !== 'ext')
529
+ return [1, 1];
530
+ if (it.type === '!')
531
+ return [0, Infinity];
532
+ const alts = it.alts.map(lengths);
533
+ const min = Math.min(...alts.map(a => a[0]));
534
+ const max = Math.max(...alts.map(a => a[1]));
535
+ // a loop of alternatives that only match the empty string is empty
536
+ const loop = max === 0 ? 0 : Infinity;
537
+ return (it.type === '@' ? [min, max]
538
+ : it.type === '?' ? [0, max]
539
+ : it.type === '*' ? [0, loop]
540
+ : [min, loop]);
541
+ };
542
+ // true if the chars from `start` match the literals
543
+ const hasAffix = (lits, chars, start) => {
544
+ for (let j = 0; j < lits.length; j++) {
545
+ if (!litMatch(lits[j], chars[start + j]))
546
+ return false;
547
+ }
548
+ return true;
549
+ };
550
+ // a `/`, or half of a surrogate pair
551
+ const slashOrSurrogate = /[/\ud800-\udfff]/;
552
+ const surrogate = /[\ud800-\udfff]/;
553
+ // a string can be indexed by code point, unless it has surrogate
554
+ // pairs
555
+ const codePoints = (s) => surrogate.test(s) ? [...s] : s;
556
+ const noSlash = (s) => {
557
+ if (s.includes('/')) {
558
+ throw new Error('can only match a single path portion, got: ' + s);
559
+ }
560
+ };
561
+ class Matcher {
562
+ pattern;
563
+ options;
564
+ #start;
565
+ // the number of node ids
566
+ #size;
567
+ #marks;
568
+ // the Sim for strings that are only `.` or `..`
569
+ #dotsSim;
570
+ // the string to compare, if the pattern has no magic. With
571
+ // `nocase:true`, the RegExp that folds case is made when it is
572
+ // first used.
573
+ #literal;
574
+ #literalFold = false;
575
+ #literalRe;
576
+ // the nodes between the prefix and suffix, if the graph is a
577
+ // single chain
578
+ #linear;
579
+ // the linear nodes are only `*` and `?`, so the length bounds and
580
+ // the prefix and suffix decide the match
581
+ #wild = false;
582
+ // the least and most chars that a match can have
583
+ #min = 0;
584
+ #max = Infinity;
585
+ // the literals that a match must start and end with. Each one
586
+ // matches exactly one char, and they are distinct items in the
587
+ // pattern, so a string that does not have them can not match.
588
+ #prefix = [];
589
+ #suffix = [];
590
+ // the prefix and suffix as strings, if they do not fold case
591
+ #prefixStr;
592
+ #suffixStr;
593
+ // there is a prefix or suffix to check
594
+ #affix = false;
595
+ #dfa;
596
+ #form;
597
+ constructor(pattern, options = {}) {
598
+ if (pattern.includes('/')) {
599
+ throw new Error('can only match a single path portion, got pattern: ' + pattern);
600
+ }
601
+ this.pattern = pattern;
602
+ this.options = options;
603
+ const { nocase = false, noext = false, normalize: n } = options;
604
+ this.#form = n === true ? 'NFC' : n || undefined;
605
+ // a pattern that is only an empty extglob is a literal string,
606
+ // except for `!()`, which matches any non-empty string
607
+ const literal = /^[?*+@]\(\)$/.test(pattern);
608
+ const toks = tokenize(pattern, nocase, noext || literal, this.#form);
609
+ let [items] = build(toks, pair(toks), 0, toks.length, true);
610
+ if (this.#form)
611
+ items = normalize(items, this.#form);
612
+ const [start, size] = compile(items, nocase);
613
+ this.#start = start;
614
+ this.#size = size;
615
+ if (items.every(it => it.t === 'lit')) {
616
+ this.#literal = items.map(it => it.ch).join('');
617
+ this.#literalFold = nocase;
618
+ }
619
+ else {
620
+ const lit = (it) => it.t !== 'lit' ? undefined
621
+ : nocase ? { ch: it.ch, re: foldRe(it.ch) }
622
+ : { ch: it.ch };
623
+ for (const it of items) {
624
+ const l = lit(it);
625
+ if (!l)
626
+ break;
627
+ this.#prefix.push(l);
628
+ }
629
+ for (let j = items.length - 1; j >= 0; j--) {
630
+ const l = lit(items[j]);
631
+ if (!l)
632
+ break;
633
+ this.#suffix.unshift(l);
634
+ }
635
+ this.#affix = !!(this.#prefix.length || this.#suffix.length);
636
+ if (!nocase) {
637
+ this.#prefixStr = this.#prefix.map(l => l.ch).join('');
638
+ this.#suffixStr = this.#suffix.map(l => l.ch).join('');
639
+ }
640
+ this.#linear = linear(this.#start)?.slice(this.#prefix.length, -this.#suffix.length || undefined);
641
+ this.#wild = !!this.#linear?.every(n => n.t === 'star' || n.t === 'any');
642
+ const [min, max] = lengths(items);
643
+ this.#min = min;
644
+ this.#max = max;
645
+ }
646
+ }
647
+ test(s) {
648
+ // The `/` check uses the string as given, so with normalization it
649
+ // is a separate step. Otherwise, one scan finds both a `/` and the
650
+ // surrogate pairs that stop the string being indexed by code point.
651
+ if (this.#form) {
652
+ noSlash(s);
653
+ return this.#test(s.normalize(this.#form));
654
+ }
655
+ if (slashOrSurrogate.test(s)) {
656
+ noSlash(s);
657
+ return this.#test(s, [...s]);
658
+ }
659
+ return this.#test(s, s);
660
+ }
661
+ /**
662
+ * The same as {@link Matcher#test}, but the string is not checked
663
+ * for `/` chars, so the result for a string that has one is not
664
+ * defined. Only use it for a string that is known to be one path
665
+ * portion, such as a part of a path that was split on `/`. It can
666
+ * be faster, because some patterns do not need to look at each char
667
+ * of the string.
668
+ */
669
+ testUnchecked(s) {
670
+ return this.#test(this.#form ? s.normalize(this.#form) : s);
671
+ }
672
+ // Test a string that has no `/`. `chars` indexes it by code point.
673
+ // If it is not given, it is only found if a step needs it.
674
+ #test(s, chars) {
675
+ if (this.#literal !== undefined) {
676
+ return this.#literalFold ?
677
+ (this.#literalRe ??= newFoldRe(this.#literal)).test(s)
678
+ : s === this.#literal;
679
+ }
680
+ // the length check means that the prefix and suffix do not
681
+ // overlap. Without the chars, the length in code points is from
682
+ // half of the UTF-16 length (if each one is a surrogate pair) to
683
+ // all of it, which is often enough to know.
684
+ const min = this.#min;
685
+ const max = this.#max;
686
+ if (chars === undefined) {
687
+ const most = s.length;
688
+ const least = (most + 1) >> 1;
689
+ if (most < min || least > max)
690
+ return false;
691
+ if (least < min || most > max)
692
+ chars = codePoints(s);
693
+ }
694
+ if (chars !== undefined &&
695
+ (chars.length < min || chars.length > max)) {
696
+ return false;
697
+ }
698
+ const prefix = this.#prefix.length;
699
+ if (this.#affix) {
700
+ if (this.#prefixStr !== undefined && this.#suffixStr !== undefined) {
701
+ if (!s.startsWith(this.#prefixStr) ||
702
+ !s.endsWith(this.#suffixStr)) {
703
+ return false;
704
+ }
705
+ }
706
+ else {
707
+ chars ??= codePoints(s);
708
+ const end = chars.length - this.#suffix.length;
709
+ if (!hasAffix(this.#prefix, chars, 0) ||
710
+ !hasAffix(this.#suffix, chars, end)) {
711
+ return false;
712
+ }
713
+ }
714
+ }
715
+ const dotStart = !this.options.dot && s.startsWith('.');
716
+ if (this.#linear) {
717
+ // `.` and `..` only match literal dots, even with `dot:true`
718
+ if (s === '.' || s === '..')
719
+ return false;
720
+ // only a literal can match the leading dot. A `*` can not
721
+ // start a dotfile, even if it matches nothing.
722
+ if (dotStart && !prefix)
723
+ return false;
724
+ if (this.#wild)
725
+ return true;
726
+ chars ??= codePoints(s);
727
+ const end = chars.length - this.#suffix.length;
728
+ return testLinear(this.#linear, chars, prefix, end);
729
+ }
730
+ chars ??= codePoints(s);
731
+ if (s === '.' || s === '..') {
732
+ this.#marks ??= marks(this.#size);
733
+ const sim = (this.#dotsSim ??= new Sim(true, false, this.#marks));
734
+ const start = sim.state();
735
+ sim.add(start, this.#start, 0, true);
736
+ let state = sim.done(start);
737
+ for (let i = 0; i < chars.length; i++) {
738
+ state = sim.step(state, chars[i], i, true);
739
+ }
740
+ return state.match;
741
+ }
742
+ this.#marks ??= marks(this.#size);
743
+ const dfa = (this.#dfa ??= new Dfa(this.#start, this.#marks));
744
+ let d = dfa.start(dotStart);
745
+ // read char codes from the string, so that a one-char string is
746
+ // only made for a cache miss
747
+ const str = chars === s;
748
+ for (let i = 0; i < chars.length; i++) {
749
+ if (d.dead)
750
+ return false;
751
+ const code = str ? s.charCodeAt(i) : chars[i].charCodeAt(0);
752
+ d = d.ascii?.[code] ?? dfa.next(d, chars[i]);
753
+ }
754
+ return d.match;
755
+ }
756
+ /** a readable listing of the state machine */
757
+ toString() {
758
+ return show(this.#start);
759
+ }
760
+ }
761
+ exports.Matcher = Matcher;
762
+ //# sourceMappingURL=index.js.map