@openclaw/discord 2026.9.4 → 2026.9.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 (818) hide show
  1. package/assets/activity.svg +40 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/{account-inspect-BY-ve3yH.js → .setup/account-inspect-BwQj24ht.mjs} +1 -1
  4. package/dist/{activities-api-w8j7Elou.js → .setup/activities-api-COU4-0nR.mjs} +93 -31
  5. package/dist/{api-LIV--eMq.js → .setup/api-CBK9zcq5.mjs} +7 -4
  6. package/dist/{approval-handler.runtime-BnPUU5NK.js → .setup/approval-handler.runtime-CbBktBb4.mjs} +8 -7
  7. package/dist/.setup/approval-message-updates-jf9zMaIC.mjs +17 -0
  8. package/dist/{audit-BgAgIzwo.js → .setup/audit-vKbh-LFR.mjs} +5 -5
  9. package/dist/{channel-C_OFFR5Y.js → .setup/channel-Dv4e3Jpc.mjs} +34 -29
  10. package/dist/{channel-actions.runtime-tShzmemq.js → .setup/channel-actions.runtime-leZuw01r.mjs} +25 -12
  11. package/dist/{allow-list-DWEio925.js → .setup/channel-type-DKnjV1XW.mjs} +161 -1
  12. package/dist/{channel.setup-CpAwAiS0.js → .setup/channel.setup-0NX6FFwi.mjs} +4 -4
  13. package/dist/{components-DBFTIN6P.js → .setup/components-yBEb75bB.mjs} +4 -5
  14. package/dist/{config-schema-r38UkM_J.js → .setup/config-schema-CiZz-mtA.mjs} +1 -1
  15. package/dist/{conversation-binding-route-CB9PRqgi.js → .setup/conversation-binding-route-B7qImK_b.mjs} +6 -3
  16. package/dist/{directory-config-D1uDGbWh.js → .setup/directory-config-BytTftz-.mjs} +2 -2
  17. package/dist/{directory-live-C5o1uKlw.js → .setup/directory-live--EGTH0DC.mjs} +4 -4
  18. package/dist/{discord-CmL3ati-.js → .setup/discord-BXpHW-cu.mjs} +89 -39
  19. package/dist/{doctor-DgKMH6N7.js → .setup/doctor-D1R-uFIu.mjs} +6 -6
  20. package/dist/{handle-action.guild-admin-CpEwox_X.js → .setup/handle-action.guild-admin-DcFa8NwA.mjs} +10 -5
  21. package/dist/{live-policy-config-BblutQAq.js → .setup/live-policy-config-eKQ-PLdy.mjs} +1 -1
  22. package/dist/{message-handler-C7FZGKa8.js → .setup/message-handler-X6ejmbtY.mjs} +25 -14
  23. package/dist/{message-handler.preflight-DFpwDW2W.js → .setup/message-handler.preflight-DE_POxFc.mjs} +35 -125
  24. package/dist/.setup/message-handler.preflight-pluralkit-8Xji34AF.mjs +143 -0
  25. package/dist/{message-handler.process-ZKrmmA9D.js → .setup/message-handler.process-CCmIVnxy.mjs} +438 -378
  26. package/dist/{outbound-adapter-C8PTt7_p.js → .setup/outbound-adapter-ClIgmu4F.mjs} +13 -9
  27. package/dist/{outbound-session-route-B0N6os97.js → .setup/outbound-session-route-VulUE0yV.mjs} +138 -11
  28. package/dist/{pluralkit-BiUW53Yn.js → .setup/pluralkit-CdAt1G0P.mjs} +2 -2
  29. package/dist/{preflight-audio-DrnqFA8U.js → .setup/preflight-audio-DHGIHEpv.mjs} +2 -1
  30. package/dist/{probe-BcoN44eK.js → .setup/probe-CupW4we4.mjs} +14 -10
  31. package/dist/{probe.runtime-BnuED0fI.js → .setup/probe.runtime-DBQ_AGPe.mjs} +1 -1
  32. package/dist/{provider-DmRHCZ_K.js → .setup/provider-iOf73HW-.mjs} +885 -557
  33. package/dist/{provider-session.runtime-U1M8_EYY.js → .setup/provider-session.runtime-DrGAYnZv.mjs} +4 -4
  34. package/dist/.setup/provider.runtime-BmjW_pIw.mjs +2 -0
  35. package/dist/{realtime-session.runtime-Bjsk9Q5t.js → .setup/realtime-session.runtime-Dz8uVutq.mjs} +977 -514
  36. package/dist/.setup/receive-recovery-DHst8WRx.mjs +517 -0
  37. package/dist/{resolve-allowlist-common-ChPf0Qy7.js → .setup/resolve-allowlist-common-CwMBzbx9.mjs} +3 -3
  38. package/dist/{resolve-channels-VbpLmUS8.js → .setup/resolve-channels-BbvsLQOZ.mjs} +4 -5
  39. package/dist/{resolve-users-D-wRFsd5.js → .setup/resolve-users-ByFlR7LQ.mjs} +3 -3
  40. package/dist/{retry-DKeoT7UO.js → .setup/retry-BEYkDy0P.mjs} +106 -19
  41. package/dist/{runtime-Dxl-ZOvg.js → .setup/runtime-B8lJfyrA.mjs} +113 -141
  42. package/dist/{runtime-CbknwoBH.js → .setup/runtime-DisDbixd.mjs} +2 -2
  43. package/dist/{security-audit-DKfK-iPY.js → .setup/security-audit-s5w50-Ly.mjs} +1 -1
  44. package/dist/{security-audit.runtime-sKZyKgpx.js → .setup/security-audit.runtime-DHtYenx9.mjs} +1 -1
  45. package/dist/{send-CLpzfzJe.js → .setup/send-CIBzvXjS.mjs} +80 -37
  46. package/dist/{send.components-BWnkX4QN.js → .setup/send.components-ChY21qr-.mjs} +87 -65
  47. package/dist/{send.outbound-BVTWrl_4.js → .setup/send.outbound-QTyuFupn.mjs} +30 -21
  48. package/dist/{send.shared-BHPM3CSl.js → .setup/send.shared-VNvWfX2T.mjs} +15 -12
  49. package/dist/{sender-identity-f3l5OYgV.js → .setup/sender-identity-0Ymgvmaj.mjs} +1 -1
  50. package/dist/.setup/setup-plugin-api-Dvr41dyx.mjs +3 -0
  51. package/dist/{shared-CPPR0Xo4.js → .setup/shared-DHPDaMSx.mjs} +11 -11
  52. package/dist/{subagent-hooks-DfsiwCec.js → .setup/subagent-hooks-CjW7r8Pe.mjs} +16 -4
  53. package/dist/{system-events-B6HkUhF_.js → .setup/system-events-B2YEEMbS.mjs} +2 -2
  54. package/dist/{target-resolver-CoFQ7iSX.js → .setup/target-resolver-BXpy6VT8.mjs} +4 -4
  55. package/dist/.setup/targets-CvemhN3i.mjs +3 -0
  56. package/dist/{thread-bindings-uudC_0TY.js → .setup/thread-bindings-CEh2dhqP.mjs} +6 -6
  57. package/dist/{thread-bindings.manager-BeUxc8nr.js → .setup/thread-bindings.manager-ve-i6oqt.mjs} +100 -46
  58. package/dist/{thread-bindings.session-updates-BwkXpcy0.js → .setup/thread-bindings.session-updates-DCQq1WZ5.mjs} +1 -1
  59. package/dist/{thread-bindings.state-dDn-dwBw.js → .setup/thread-bindings.state-BThFQEga.mjs} +46 -14
  60. package/dist/{transcripts-source-VkgenQv-.js → .setup/transcripts-source-DVegW0WI.mjs} +121 -30
  61. package/dist/{typing-DuBg1U8Q.js → .setup/typing-BKZL5fGj.mjs} +2 -2
  62. package/dist/{voice-runtime-DMYDMkJx.js → .setup/voice-runtime-elTtjEIG.mjs} +773 -773
  63. package/dist/account-inspect-api.js +1 -1
  64. package/dist/action-runtime-api.js +1 -1
  65. package/dist/activities-api.js +1 -1
  66. package/dist/api.js +19 -19
  67. package/dist/channel-config-api.js +1 -1
  68. package/dist/channel-plugin-api.js +1 -1
  69. package/dist/contract-api.js +1 -1
  70. package/dist/directory-contract-api.js +1 -1
  71. package/dist/doctor-contract-api.js +4 -4
  72. package/dist/index.js +1 -1
  73. package/dist/runtime-api.js +22 -22
  74. package/dist/runtime-setter-api.js +1 -1
  75. package/dist/secret-contract-api.js +1 -1
  76. package/dist/security-audit-contract-api.js +1 -1
  77. package/dist/security-contract-api.js +1 -1
  78. package/dist/session-key-api.js +1 -1
  79. package/dist/setup-entry.js +2 -1
  80. package/dist/setup-plugin-api.js +1 -1
  81. package/dist/src/voice/audio-worker.runtime.js +1065 -0
  82. package/dist/subagent-hooks-api.js +5 -4
  83. package/dist/thread-binding-api.js +1 -1
  84. package/dist/transcripts-source-api.js +1 -1
  85. package/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.cjs +8 -4
  86. package/node_modules/@napi-rs/wasm-runtime/dist/emnapi-plugins.js +8 -4
  87. package/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +1 -1
  88. package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +770 -695
  89. package/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +3 -2
  90. package/node_modules/@napi-rs/wasm-runtime/package.json +1 -1
  91. package/node_modules/@tybys/wasm-util/LICENSE +21 -0
  92. package/node_modules/@tybys/wasm-util/package.json +1 -1
  93. package/node_modules/@types/node/README.md +1 -1
  94. package/node_modules/@types/node/buffer.d.ts +1 -0
  95. package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  96. package/node_modules/@types/node/ffi.d.ts +1 -1
  97. package/node_modules/@types/node/http.d.ts +1 -1
  98. package/node_modules/@types/node/package.json +3 -3
  99. package/node_modules/@types/node/perf_hooks.d.ts +31 -19
  100. package/node_modules/@types/node/quic.d.ts +6 -4
  101. package/node_modules/@types/node/stream/web.d.ts +20 -0
  102. package/node_modules/@types/node/tls.d.ts +26 -15
  103. package/node_modules/@types/node/vfs.d.ts +7 -6
  104. package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
  105. package/node_modules/@types/node/zlib.d.ts +17 -0
  106. package/node_modules/discord-api-types/README.md +3 -2
  107. package/node_modules/discord-api-types/package.json +46 -46
  108. package/node_modules/discord-api-types/rest/v10/interactions.d.ts +1 -0
  109. package/node_modules/discord-api-types/rest/v10/interactions.d.ts.map +1 -1
  110. package/node_modules/discord-api-types/rest/v9/interactions.d.ts +1 -0
  111. package/node_modules/discord-api-types/rest/v9/interactions.d.ts.map +1 -1
  112. package/node_modules/libopus-wasm/CHANGELOG.md +15 -0
  113. package/node_modules/libopus-wasm/README.md +1 -1
  114. package/node_modules/libopus-wasm/dist/discordjs.d.ts.map +1 -1
  115. package/node_modules/libopus-wasm/dist/generated/libopus.generated.mjs +0 -0
  116. package/node_modules/libopus-wasm/dist/index.d.ts.map +1 -1
  117. package/node_modules/libopus-wasm/dist/index.js +37 -18
  118. package/node_modules/libopus-wasm/package.json +13 -13
  119. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  120. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  121. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
  122. package/node_modules/typebox/build/format/iri.mjs +5 -1
  123. package/node_modules/typebox/build/guard/emit.mjs +2 -4
  124. package/node_modules/typebox/build/guard/guard.mjs +6 -18
  125. package/node_modules/typebox/build/guard/string.mjs +16 -24
  126. package/node_modules/typebox/build/schema/build.mjs +2 -2
  127. package/node_modules/typebox/build/schema/check.mjs +1 -1
  128. package/node_modules/typebox/build/schema/compile.d.mts +3 -2
  129. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  130. package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
  131. package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
  132. package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
  133. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  134. package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
  135. package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
  136. package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
  137. package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
  138. package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
  139. package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
  140. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
  141. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
  142. package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
  143. package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
  144. package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
  145. package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
  146. package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
  147. package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
  148. package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
  149. package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
  150. package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
  151. package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
  152. package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
  153. package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
  154. package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
  155. package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
  156. package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
  157. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
  158. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
  159. package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
  160. package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
  161. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
  162. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
  163. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
  164. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
  165. package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
  166. package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
  167. package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
  168. package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
  169. package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
  170. package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
  171. package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
  172. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
  173. package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
  174. package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
  175. package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
  176. package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
  177. package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
  178. package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
  179. package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
  180. package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
  181. package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
  182. package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
  183. package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
  184. package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
  185. package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
  186. package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
  187. package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
  188. package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
  189. package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
  190. package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
  191. package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
  192. package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
  193. package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
  194. package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
  195. package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
  196. package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
  197. package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
  198. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
  199. package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
  200. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
  201. package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
  202. package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
  203. package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
  204. package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
  205. package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
  206. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
  207. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
  208. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
  209. package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
  210. package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
  211. package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
  212. package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
  213. package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
  214. package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
  215. package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
  216. package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
  217. package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
  218. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
  219. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
  220. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
  221. package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
  222. package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
  223. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  224. package/node_modules/typebox/build/schema/errors.mjs +8 -14
  225. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  226. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  227. package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
  228. package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
  229. package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
  230. package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
  231. package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
  232. package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
  233. package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
  234. package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
  235. package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
  236. package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
  237. package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
  238. package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
  239. package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
  240. package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
  241. package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
  242. package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
  243. package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
  244. package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
  245. package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
  246. package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
  247. package/node_modules/typebox/build/schema/parse.d.mts +1 -0
  248. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  249. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
  250. package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
  251. package/node_modules/typebox/build/schema/schema.d.mts +2 -0
  252. package/node_modules/typebox/build/schema/schema.mjs +2 -0
  253. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
  254. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  255. package/node_modules/typebox/package.json +1 -1
  256. package/node_modules/typebox/readme.md +59 -89
  257. package/node_modules/undici-types/client.d.ts +8 -3
  258. package/node_modules/undici-types/connector.d.ts +1 -0
  259. package/node_modules/undici-types/cookies.d.ts +1 -1
  260. package/node_modules/undici-types/dispatcher.d.ts +3 -3
  261. package/node_modules/undici-types/errors.d.ts +10 -0
  262. package/node_modules/undici-types/fetch.d.ts +5 -1
  263. package/node_modules/undici-types/handlers.d.ts +2 -0
  264. package/node_modules/undici-types/interceptors.d.ts +1 -1
  265. package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
  266. package/node_modules/undici-types/package.json +1 -1
  267. package/node_modules/undici-types/proxy-agent.d.ts +7 -0
  268. package/node_modules/zod/README.md +29 -2
  269. package/node_modules/zod/compile.cjs +96 -0
  270. package/node_modules/zod/compile.d.cts +1 -0
  271. package/node_modules/zod/compile.d.ts +1 -0
  272. package/node_modules/zod/compile.js +52 -0
  273. package/node_modules/zod/index.cjs +21 -2
  274. package/node_modules/zod/index.d.cts +1 -2
  275. package/node_modules/zod/index.d.ts +1 -2
  276. package/node_modules/zod/index.js +5 -2
  277. package/node_modules/zod/locales/index.cjs +19 -0
  278. package/node_modules/zod/mini/index.cjs +19 -0
  279. package/node_modules/zod/package.json +20 -8
  280. package/node_modules/zod/src/compile.ts +56 -0
  281. package/node_modules/zod/src/index.ts +5 -2
  282. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  283. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  284. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  285. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  286. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  287. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  288. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  289. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  290. package/node_modules/zod/src/v3/types.ts +5 -5
  291. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  292. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  293. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  294. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  295. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  296. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  297. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  298. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  299. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  300. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  301. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  302. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  303. package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
  304. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  305. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  306. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  307. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  308. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  309. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  310. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  311. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  312. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  313. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  314. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  315. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  316. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  317. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  318. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  319. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  320. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  321. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  322. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  323. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  324. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  325. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  326. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  327. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  328. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  329. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  330. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  331. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  332. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  333. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  334. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  335. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  336. package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
  337. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  338. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  339. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  340. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  341. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  342. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  343. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  344. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  345. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  346. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  347. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  348. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  349. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  350. package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
  351. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  352. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  353. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  354. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  355. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  356. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  357. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  358. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  359. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  360. package/node_modules/zod/src/v4/core/api.ts +87 -35
  361. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  362. package/node_modules/zod/src/v4/core/compile.ts +2313 -0
  363. package/node_modules/zod/src/v4/core/core.ts +99 -22
  364. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  365. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  366. package/node_modules/zod/src/v4/core/index.ts +3 -0
  367. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  368. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  369. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  370. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  371. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  372. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  373. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  374. package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
  375. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  376. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  377. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  378. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  379. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  380. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  381. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  382. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  383. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  384. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  385. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  386. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  387. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  388. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  389. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  390. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  391. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  392. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  393. package/node_modules/zod/src/v4/core/util.ts +454 -157
  394. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  395. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  396. package/node_modules/zod/src/v4/index.ts +3 -3
  397. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  398. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  399. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  400. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  401. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  402. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  403. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  404. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  405. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  406. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  407. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  408. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  409. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  410. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  411. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  412. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  413. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  414. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  415. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  416. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  417. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  418. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  419. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  420. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  421. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  422. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  423. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  424. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  425. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  426. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  427. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  428. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  429. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  430. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  431. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  432. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  433. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  434. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  435. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  436. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  437. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  438. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  439. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  440. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  441. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  442. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  443. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  444. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  445. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  446. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  447. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  448. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  449. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  450. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  451. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  452. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  453. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  454. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  455. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  456. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  457. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  458. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  459. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  460. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  461. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  462. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  463. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  464. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  465. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  466. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  467. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  468. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  469. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  470. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  471. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  472. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  473. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  474. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  475. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  476. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  477. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  478. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  479. package/node_modules/zod/v3/ZodError.cjs +41 -12
  480. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  481. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  482. package/node_modules/zod/v3/ZodError.js +22 -12
  483. package/node_modules/zod/v3/errors.cjs +19 -0
  484. package/node_modules/zod/v3/external.cjs +19 -0
  485. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  486. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  487. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  488. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  489. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  490. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  491. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  492. package/node_modules/zod/v3/index.cjs +19 -0
  493. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  494. package/node_modules/zod/v3/types.cjs +26 -5
  495. package/node_modules/zod/v3/types.js +7 -5
  496. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  497. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  498. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  499. package/node_modules/zod/v4/classic/checks.js +1 -1
  500. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  501. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  502. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  503. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  504. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  505. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  506. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  507. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  508. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  509. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  510. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  511. package/node_modules/zod/v4/classic/errors.js +43 -34
  512. package/node_modules/zod/v4/classic/external.cjs +51 -27
  513. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  514. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  515. package/node_modules/zod/v4/classic/external.js +5 -8
  516. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  517. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  518. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  519. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  520. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  521. package/node_modules/zod/v4/classic/in-out.js +36 -0
  522. package/node_modules/zod/v4/classic/index.cjs +21 -2
  523. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  524. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  525. package/node_modules/zod/v4/classic/index.js +2 -2
  526. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  527. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  528. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  529. package/node_modules/zod/v4/classic/iso.js +2 -17
  530. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  531. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  532. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  533. package/node_modules/zod/v4/classic/parse.js +1 -0
  534. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  535. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  536. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  537. package/node_modules/zod/v4/classic/schemas.js +564 -424
  538. package/node_modules/zod/v4/core/api.cjs +66 -24
  539. package/node_modules/zod/v4/core/api.d.cts +22 -12
  540. package/node_modules/zod/v4/core/api.d.ts +22 -12
  541. package/node_modules/zod/v4/core/api.js +44 -24
  542. package/node_modules/zod/v4/core/checks.cjs +88 -128
  543. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  544. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  545. package/node_modules/zod/v4/core/checks.js +68 -127
  546. package/node_modules/zod/v4/core/compile.cjs +1908 -0
  547. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  548. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  549. package/node_modules/zod/v4/core/compile.js +1858 -0
  550. package/node_modules/zod/v4/core/core.cjs +101 -19
  551. package/node_modules/zod/v4/core/core.d.cts +16 -4
  552. package/node_modules/zod/v4/core/core.d.ts +16 -4
  553. package/node_modules/zod/v4/core/core.js +83 -20
  554. package/node_modules/zod/v4/core/doc.cjs +31 -9
  555. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  556. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  557. package/node_modules/zod/v4/core/doc.js +12 -9
  558. package/node_modules/zod/v4/core/errors.cjs +126 -25
  559. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  560. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  561. package/node_modules/zod/v4/core/errors.js +107 -25
  562. package/node_modules/zod/v4/core/index.cjs +24 -1
  563. package/node_modules/zod/v4/core/index.d.cts +3 -0
  564. package/node_modules/zod/v4/core/index.d.ts +3 -0
  565. package/node_modules/zod/v4/core/index.js +3 -0
  566. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  567. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  568. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  569. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  570. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  571. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  572. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  573. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  574. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  575. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  576. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  577. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  578. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  579. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  580. package/node_modules/zod/v4/core/memoizer.js +311 -0
  581. package/node_modules/zod/v4/core/parse.cjs +148 -46
  582. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  583. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  584. package/node_modules/zod/v4/core/parse.js +127 -45
  585. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  586. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  587. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  588. package/node_modules/zod/v4/core/regexes.js +32 -15
  589. package/node_modules/zod/v4/core/registries.cjs +19 -0
  590. package/node_modules/zod/v4/core/registries.js +2 -2
  591. package/node_modules/zod/v4/core/schemas.cjs +785 -386
  592. package/node_modules/zod/v4/core/schemas.d.cts +123 -34
  593. package/node_modules/zod/v4/core/schemas.d.ts +123 -34
  594. package/node_modules/zod/v4/core/schemas.js +753 -386
  595. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  596. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  597. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  598. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  599. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  600. package/node_modules/zod/v4/core/util.cjs +372 -157
  601. package/node_modules/zod/v4/core/util.d.cts +79 -1
  602. package/node_modules/zod/v4/core/util.d.ts +79 -1
  603. package/node_modules/zod/v4/core/util.js +341 -156
  604. package/node_modules/zod/v4/core/versions.cjs +21 -2
  605. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  606. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  607. package/node_modules/zod/v4/core/versions.js +2 -2
  608. package/node_modules/zod/v4/core/visit.cjs +214 -0
  609. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  610. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  611. package/node_modules/zod/v4/core/visit.js +169 -0
  612. package/node_modules/zod/v4/index.cjs +34 -5
  613. package/node_modules/zod/v4/index.d.cts +2 -2
  614. package/node_modules/zod/v4/index.d.ts +2 -2
  615. package/node_modules/zod/v4/index.js +3 -2
  616. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  617. package/node_modules/zod/v4/locales/ar.js +5 -0
  618. package/node_modules/zod/v4/locales/az.cjs +5 -0
  619. package/node_modules/zod/v4/locales/az.js +5 -0
  620. package/node_modules/zod/v4/locales/be.cjs +12 -0
  621. package/node_modules/zod/v4/locales/be.js +12 -0
  622. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  623. package/node_modules/zod/v4/locales/bg.js +5 -0
  624. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  625. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  626. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  627. package/node_modules/zod/v4/locales/bn.js +113 -0
  628. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  629. package/node_modules/zod/v4/locales/ca.js +5 -0
  630. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  631. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  632. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  633. package/node_modules/zod/v4/locales/ckb.js +133 -0
  634. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  635. package/node_modules/zod/v4/locales/cs.js +5 -0
  636. package/node_modules/zod/v4/locales/da.cjs +7 -2
  637. package/node_modules/zod/v4/locales/da.js +7 -2
  638. package/node_modules/zod/v4/locales/de.cjs +5 -0
  639. package/node_modules/zod/v4/locales/de.js +5 -0
  640. package/node_modules/zod/v4/locales/el.cjs +3 -0
  641. package/node_modules/zod/v4/locales/el.js +3 -0
  642. package/node_modules/zod/v4/locales/en.cjs +16 -4
  643. package/node_modules/zod/v4/locales/en.js +16 -4
  644. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  645. package/node_modules/zod/v4/locales/eo.js +5 -0
  646. package/node_modules/zod/v4/locales/es.cjs +4 -0
  647. package/node_modules/zod/v4/locales/es.js +4 -0
  648. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  649. package/node_modules/zod/v4/locales/fa.js +5 -0
  650. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  651. package/node_modules/zod/v4/locales/fi.js +5 -0
  652. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  653. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  654. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  655. package/node_modules/zod/v4/locales/fr.js +18 -14
  656. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  657. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  658. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  659. package/node_modules/zod/v4/locales/gu.js +113 -0
  660. package/node_modules/zod/v4/locales/he.cjs +7 -0
  661. package/node_modules/zod/v4/locales/he.js +7 -0
  662. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  663. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  664. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  665. package/node_modules/zod/v4/locales/hi.js +111 -0
  666. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  667. package/node_modules/zod/v4/locales/hr.js +4 -0
  668. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  669. package/node_modules/zod/v4/locales/hu.js +5 -0
  670. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  671. package/node_modules/zod/v4/locales/hy.js +11 -0
  672. package/node_modules/zod/v4/locales/id.cjs +5 -0
  673. package/node_modules/zod/v4/locales/id.js +5 -0
  674. package/node_modules/zod/v4/locales/index.cjs +43 -2
  675. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  676. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  677. package/node_modules/zod/v4/locales/index.js +11 -0
  678. package/node_modules/zod/v4/locales/is.cjs +5 -0
  679. package/node_modules/zod/v4/locales/is.js +5 -0
  680. package/node_modules/zod/v4/locales/it.cjs +5 -0
  681. package/node_modules/zod/v4/locales/it.js +5 -0
  682. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  683. package/node_modules/zod/v4/locales/ja.js +5 -0
  684. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  685. package/node_modules/zod/v4/locales/ka.js +5 -0
  686. package/node_modules/zod/v4/locales/km.cjs +5 -0
  687. package/node_modules/zod/v4/locales/km.js +5 -0
  688. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  689. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  690. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  691. package/node_modules/zod/v4/locales/kn.js +116 -0
  692. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  693. package/node_modules/zod/v4/locales/ko.js +5 -0
  694. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  695. package/node_modules/zod/v4/locales/lt.js +4 -0
  696. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  697. package/node_modules/zod/v4/locales/mk.js +5 -0
  698. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  699. package/node_modules/zod/v4/locales/ms.js +5 -0
  700. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  701. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  702. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  703. package/node_modules/zod/v4/locales/ne.js +111 -0
  704. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  705. package/node_modules/zod/v4/locales/nl.js +5 -0
  706. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  707. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  708. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  709. package/node_modules/zod/v4/locales/nn.js +113 -0
  710. package/node_modules/zod/v4/locales/no.cjs +7 -2
  711. package/node_modules/zod/v4/locales/no.js +7 -2
  712. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  713. package/node_modules/zod/v4/locales/ota.js +5 -0
  714. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  715. package/node_modules/zod/v4/locales/pl.js +5 -0
  716. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  717. package/node_modules/zod/v4/locales/ps.js +5 -0
  718. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  719. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  720. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  721. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  722. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  723. package/node_modules/zod/v4/locales/pt.js +89 -55
  724. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  725. package/node_modules/zod/v4/locales/ro.js +3 -0
  726. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  727. package/node_modules/zod/v4/locales/ru.js +12 -0
  728. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  729. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  730. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  731. package/node_modules/zod/v4/locales/sk.js +116 -0
  732. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  733. package/node_modules/zod/v4/locales/sl.js +5 -0
  734. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  735. package/node_modules/zod/v4/locales/sv.js +7 -2
  736. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  737. package/node_modules/zod/v4/locales/ta.js +5 -0
  738. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  739. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  740. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  741. package/node_modules/zod/v4/locales/tg.js +117 -0
  742. package/node_modules/zod/v4/locales/th.cjs +5 -0
  743. package/node_modules/zod/v4/locales/th.js +5 -0
  744. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  745. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  746. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  747. package/node_modules/zod/v4/locales/tk.js +107 -0
  748. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  749. package/node_modules/zod/v4/locales/tr.js +5 -0
  750. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  751. package/node_modules/zod/v4/locales/uk.js +5 -0
  752. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  753. package/node_modules/zod/v4/locales/ur.js +5 -0
  754. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  755. package/node_modules/zod/v4/locales/uz.js +3 -0
  756. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  757. package/node_modules/zod/v4/locales/vi.js +5 -0
  758. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  759. package/node_modules/zod/v4/locales/yo.js +5 -0
  760. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  761. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  762. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  763. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  764. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  765. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  766. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  767. package/node_modules/zod/v4/mini/checks.js +1 -1
  768. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  769. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  770. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  771. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  772. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  773. package/node_modules/zod/v4/mini/external.cjs +33 -1
  774. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  775. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  776. package/node_modules/zod/v4/mini/external.js +3 -1
  777. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  778. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  779. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  780. package/node_modules/zod/v4/mini/in-out.js +36 -0
  781. package/node_modules/zod/v4/mini/index.cjs +19 -0
  782. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  783. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  784. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  785. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  786. package/node_modules/zod/v4/mini/parse.js +1 -1
  787. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  788. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  789. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  790. package/node_modules/zod/v4/mini/schemas.js +92 -51
  791. package/node_modules/zod/v4-mini/index.cjs +19 -0
  792. package/openclaw.plugin.json +3 -4
  793. package/package.json +13 -8
  794. package/dist/channel-type-CVLZyGYS.js +0 -7
  795. package/dist/message-handler.history-CJOsN9w5.js +0 -28
  796. package/dist/outbound-components-DrlHcWfM.js +0 -100
  797. package/dist/provider.runtime-CqfE-RvC.js +0 -2
  798. package/dist/targets-Cm6aV9nJ.js +0 -3
  799. package/node_modules/discord-api-types/CHANGELOG.md +0 -2514
  800. package/node_modules/discord-api-types/scripts/versions.mjs +0 -46
  801. package/node_modules/zod/src/v4/core/config.ts +0 -15
  802. /package/dist/{accounts-CwJQoLjM.js → .setup/accounts-CwJQoLjM.mjs} +0 -0
  803. /package/dist/{active-turn-thread-route-fmHl1HNd.js → .setup/active-turn-thread-route-fmHl1HNd.mjs} +0 -0
  804. /package/dist/{agent-components.runtime-CEPrf2SY.js → .setup/agent-components.runtime-CEPrf2SY.mjs} +0 -0
  805. /package/dist/{channel-access-C12aDZ0p.js → .setup/channel-access-C12aDZ0p.mjs} +0 -0
  806. /package/dist/{command-deploy-store-DFkBTViB.js → .setup/command-deploy-store-DFkBTViB.mjs} +0 -0
  807. /package/dist/{command-owners-D78sAoOz.js → .setup/command-owners-D78sAoOz.mjs} +0 -0
  808. /package/dist/{doctor-contract-Co5vRCZ6.js → .setup/doctor-contract-Co5vRCZ6.mjs} +0 -0
  809. /package/dist/{model-picker-preference-primitives-BHT1LkR_.js → .setup/model-picker-preference-primitives-BHT1LkR_.mjs} +0 -0
  810. /package/dist/{presence-cache-dYSHPWMx.js → .setup/presence-cache-dYSHPWMx.mjs} +0 -0
  811. /package/dist/{runtime-DgnVQ7zW.js → .setup/runtime-DgnVQ7zW.mjs} +0 -0
  812. /package/dist/{secret-config-contract-DFu9hfU8.js → .setup/secret-config-contract-DFu9hfU8.mjs} +0 -0
  813. /package/dist/{security-contract-DSHk7I2w.js → .setup/security-contract-DSHk7I2w.mjs} +0 -0
  814. /package/dist/{security-doctor-nGgPm65L.js → .setup/security-doctor-nGgPm65L.mjs} +0 -0
  815. /package/dist/{session-contract-BO5tlIdl.js → .setup/session-contract-BO5tlIdl.mjs} +0 -0
  816. /package/dist/{session-key-normalization-wJgsKPNF.js → .setup/session-key-normalization-wJgsKPNF.mjs} +0 -0
  817. /package/dist/{thread-binding-api-BDZJD4na.js → .setup/thread-binding-api-BDZJD4na.mjs} +0 -0
  818. /package/dist/{timeouts-D86uWLt_.js → .setup/timeouts-D86uWLt_.mjs} +0 -0
@@ -364,8 +364,8 @@ function __asyncGenerator(thisArg, _arguments, generator) {
364
364
  }
365
365
  }
366
366
  function __asyncDelegator(o) {
367
- var i, p;
368
- return i = {}, verb("next"), verb("throw", function(e) {
367
+ var i = {}, p;
368
+ return verb("next"), verb("throw", function(e) {
369
369
  throw e;
370
370
  }), verb("return"), i[Symbol.iterator] = function() {
371
371
  return this;
@@ -714,7 +714,7 @@ var require_browser$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
714
714
  //#endregion
715
715
  //#region ../node_modules/path-browserify/index.js
716
716
  var require_path_browserify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
717
- var import_browser$5 = /* @__PURE__ */ __toESM(require_browser$2());
717
+ var import_browser$4 = /* @__PURE__ */ __toESM(require_browser$2());
718
718
  function assertPath(path) {
719
719
  if (typeof path !== "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
720
720
  }
@@ -786,7 +786,7 @@ var require_path_browserify = /* @__PURE__ */ __commonJSMin(((exports, module) =
786
786
  var path;
787
787
  if (i >= 0) path = arguments[i];
788
788
  else {
789
- if (cwd === void 0) cwd = import_browser$5.default.cwd();
789
+ if (cwd === void 0) cwd = import_browser$4.default.cwd();
790
790
  path = cwd;
791
791
  }
792
792
  assertPath(path);
@@ -1147,8 +1147,8 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((exports) => {
1147
1147
  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
1148
1148
  var curByte = 0;
1149
1149
  var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
1150
- var i;
1151
- for (i = 0; i < len; i += 4) {
1150
+ var i = 0;
1151
+ for (; i < len; i += 4) {
1152
1152
  tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
1153
1153
  arr[curByte++] = tmp >> 16 & 255;
1154
1154
  arr[curByte++] = tmp >> 8 & 255;
@@ -1539,8 +1539,8 @@ function hexWrite(buf, string, offset, length) {
1539
1539
  }
1540
1540
  const strLen = string.length;
1541
1541
  if (length > strLen / 2) length = strLen / 2;
1542
- let i;
1543
- for (i = 0; i < length; ++i) {
1542
+ let i = 0;
1543
+ for (; i < length; ++i) {
1544
1544
  const parsed = parseInt(string.substr(i * 2, 2), 16);
1545
1545
  if (numberIsNaN(parsed)) return i;
1546
1546
  buf[offset + i] = parsed;
@@ -1854,8 +1854,8 @@ function base64ToBytes(str) {
1854
1854
  return import_base64_js.toByteArray(base64clean(str));
1855
1855
  }
1856
1856
  function blitBuffer(src, dst, offset, length) {
1857
- let i;
1858
- for (i = 0; i < length; ++i) {
1857
+ let i = 0;
1858
+ for (; i < length; ++i) {
1859
1859
  if (i + offset >= dst.length || i >= src.length) break;
1860
1860
  dst[i + offset] = src[i];
1861
1861
  }
@@ -2597,116 +2597,13 @@ var require_buffer = /* @__PURE__ */ __commonJSMin(((exports) => {
2597
2597
  exports.bufferFrom = buffer_1.Buffer.from || bufferV0P12Ponyfill;
2598
2598
  }));
2599
2599
  //#endregion
2600
- //#region ../node_modules/@jsonjoy.com/fs-core/lib/json.js
2601
- var require_json$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2602
- Object.defineProperty(exports, "__esModule", { value: true });
2603
- exports.flattenJSON = void 0;
2604
- const buffer_1 = require_buffer();
2605
- const path_1 = require_path$1();
2606
- const pathJoin = path_1.posix ? path_1.posix.join : path_1.join;
2607
- const flattenJSON = (nestedJSON) => {
2608
- const flatJSON = {};
2609
- function flatten(pathPrefix, node) {
2610
- for (const path in node) {
2611
- const contentOrNode = node[path];
2612
- const joinedPath = pathJoin(pathPrefix, path);
2613
- if (typeof contentOrNode === "string" || contentOrNode instanceof buffer_1.Buffer) flatJSON[joinedPath] = contentOrNode;
2614
- else if (typeof contentOrNode === "object" && contentOrNode !== null && !(contentOrNode instanceof buffer_1.Buffer) && Object.keys(contentOrNode).length > 0) flatten(joinedPath, contentOrNode);
2615
- else flatJSON[joinedPath] = null;
2616
- }
2617
- }
2618
- flatten("", nestedJSON);
2619
- return flatJSON;
2620
- };
2621
- exports.flattenJSON = flattenJSON;
2622
- }));
2623
- //#endregion
2624
- //#region ../node_modules/@jsonjoy.com/fs-core/lib/constants.js
2625
- var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
2626
- Object.defineProperty(exports, "__esModule", { value: true });
2627
- }));
2628
- //#endregion
2629
- //#region ../node_modules/@jsonjoy.com/fs-core/lib/result.js
2630
- var require_result = /* @__PURE__ */ __commonJSMin(((exports) => {
2631
- Object.defineProperty(exports, "__esModule", { value: true });
2632
- exports.Ok = Ok;
2633
- exports.Err = Err;
2634
- function Ok(value) {
2635
- return {
2636
- ok: true,
2637
- value
2638
- };
2639
- }
2640
- function Err(err) {
2641
- return {
2642
- ok: false,
2643
- err
2644
- };
2645
- }
2646
- }));
2647
- //#endregion
2648
- //#region ../node_modules/thingies/lib/fanout.js
2649
- var require_fanout = /* @__PURE__ */ __commonJSMin(((exports) => {
2650
- Object.defineProperty(exports, "__esModule", { value: true });
2651
- exports.FanOut = void 0;
2652
- var FanOut = class {
2653
- constructor() {
2654
- this.listeners = /* @__PURE__ */ new Set();
2655
- }
2656
- emit(data) {
2657
- this.listeners.forEach((listener) => listener(data));
2658
- }
2659
- listen(listener) {
2660
- const listeners = this.listeners;
2661
- listeners.add(listener);
2662
- return () => listeners.delete(listener);
2663
- }
2664
- };
2665
- exports.FanOut = FanOut;
2666
- }));
2667
- //#endregion
2668
- //#region ../node_modules/@jsonjoy.com/fs-core/lib/process.js
2669
- var require_process = /* @__PURE__ */ __commonJSMin(((exports) => {
2670
- var import_browser$4 = /* @__PURE__ */ __toESM(require_browser$2());
2671
- Object.defineProperty(exports, "__esModule", { value: true });
2672
- exports.createProcess = createProcess;
2673
- /**
2674
- * Looks to return a `process` object, if one is available.
2675
- *
2676
- * The undefined `process` is returned if defined;
2677
- * otherwise `require('process')` is attempted.
2678
- *
2679
- * If that fails, `undefined` is returned.
2680
- *
2681
- * @return {IProcess | undefined}
2682
- */
2683
- const maybeReturnProcess = () => {
2684
- if (typeof import_browser$4.default !== "undefined") return import_browser$4.default;
2685
- try {
2686
- return require_browser$2();
2687
- } catch {
2688
- return;
2689
- }
2690
- };
2691
- function createProcess() {
2692
- const p = maybeReturnProcess() || {};
2693
- if (!p.cwd) p.cwd = () => "/";
2694
- if (!p.emitWarning) p.emitWarning = (message, type) => {
2695
- console.warn(`${type}${type ? ": " : ""}${message}`);
2696
- };
2697
- if (!p.env) p.env = {};
2698
- return p;
2699
- }
2700
- exports.default = createProcess();
2701
- }));
2702
- //#endregion
2703
2600
  //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/types/index.js
2704
2601
  var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
2705
2602
  Object.defineProperty(exports, "__esModule", { value: true });
2706
2603
  }));
2707
2604
  //#endregion
2708
2605
  //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/constants.js
2709
- var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
2606
+ var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
2710
2607
  Object.defineProperty(exports, "__esModule", { value: true });
2711
2608
  exports.FLAGS = exports.ERRSTR = exports.constants = exports.SEP = void 0;
2712
2609
  exports.SEP = "/";
@@ -2845,7 +2742,13 @@ var require_FLAG = /* @__PURE__ */ __commonJSMin(((exports) => {
2845
2742
  //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/path.js
2846
2743
  var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
2847
2744
  Object.defineProperty(exports, "__esModule", { value: true });
2848
- exports.basename = void 0;
2745
+ exports.basename = exports.pathNormalize = exports.pathDirname = exports.pathRelative = exports.pathJoin = exports.pathSep = void 0;
2746
+ const path_1 = require_path$1();
2747
+ exports.pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;
2748
+ exports.pathJoin = path_1.posix ? path_1.posix.join : path_1.join;
2749
+ exports.pathRelative = path_1.posix ? path_1.posix.relative : path_1.relative;
2750
+ exports.pathDirname = path_1.posix ? path_1.posix.dirname : path_1.dirname;
2751
+ exports.pathNormalize = path_1.posix ? path_1.posix.normalize : path_1.normalize;
2849
2752
  const basename = (path, separator) => {
2850
2753
  if (path[path.length - 1] === separator) path = path.slice(0, -1);
2851
2754
  const lastSlashIndex = path.lastIndexOf(separator);
@@ -2933,7 +2836,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
2933
2836
  }));
2934
2837
  //#endregion
2935
2838
  //#region ../node_modules/@jsonjoy.com/fs-node-builtins/lib/internal/errors.js
2936
- var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2839
+ var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
2937
2840
  Object.defineProperty(exports, "__esModule", { value: true });
2938
2841
  exports.AssertionError = exports.RangeError = exports.TypeError = exports.Error = void 0;
2939
2842
  exports.message = message;
@@ -2947,7 +2850,12 @@ var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2947
2850
  super(message(key, args));
2948
2851
  this.code = key;
2949
2852
  this[kCode] = key;
2950
- this.name = `${super.name} [${this[kCode]}]`;
2853
+ Object.defineProperty(this, "name", {
2854
+ value: `${super.name} [${key}]`,
2855
+ enumerable: false,
2856
+ writable: true,
2857
+ configurable: true
2858
+ });
2951
2859
  }
2952
2860
  };
2953
2861
  }
@@ -2995,16 +2903,19 @@ var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2995
2903
  });
2996
2904
  E("ERR_INVALID_OPT_VALUE_ENCODING", (value) => `The value "${String(value)}" is invalid for option "encoding"`);
2997
2905
  E("ERR_INVALID_ARG_VALUE", "Unable to open file as blob");
2906
+ E("ERR_OUT_OF_RANGE", (name, range, received) => {
2907
+ return `The value of "${name}" is out of range. It must be ${range}. Received ${received}`;
2908
+ });
2998
2909
  }));
2999
2910
  //#endregion
3000
2911
  //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/encoding.js
3001
- var require_encoding$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2912
+ var require_encoding = /* @__PURE__ */ __commonJSMin(((exports) => {
3002
2913
  Object.defineProperty(exports, "__esModule", { value: true });
3003
2914
  exports.ENCODING_UTF8 = void 0;
3004
2915
  exports.assertEncoding = assertEncoding;
3005
2916
  exports.strToEncoding = strToEncoding;
3006
2917
  const buffer_1 = require_buffer();
3007
- const errors = require_errors$1();
2918
+ const errors = require_errors$2();
3008
2919
  exports.ENCODING_UTF8 = "utf8";
3009
2920
  function assertEncoding(encoding) {
3010
2921
  if (encoding && !buffer_1.Buffer.isEncoding(encoding)) throw new errors.TypeError("ERR_INVALID_OPT_VALUE_ENCODING", encoding);
@@ -3242,17 +3153,270 @@ var require_watchIgnore = /* @__PURE__ */ __commonJSMin(((exports) => {
3242
3153
  exports.watchIgnoreToMatcher = watchIgnoreToMatcher;
3243
3154
  }));
3244
3155
  //#endregion
3156
+ //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/lists/fsCallbackApiList.js
3157
+ var require_fsCallbackApiList = /* @__PURE__ */ __commonJSMin(((exports) => {
3158
+ Object.defineProperty(exports, "__esModule", { value: true });
3159
+ exports.fsCallbackApiList = void 0;
3160
+ exports.fsCallbackApiList = [
3161
+ "access",
3162
+ "appendFile",
3163
+ "chmod",
3164
+ "chown",
3165
+ "close",
3166
+ "copyFile",
3167
+ "cp",
3168
+ "createReadStream",
3169
+ "createWriteStream",
3170
+ "exists",
3171
+ "fchmod",
3172
+ "fchown",
3173
+ "fdatasync",
3174
+ "fstat",
3175
+ "fsync",
3176
+ "ftruncate",
3177
+ "futimes",
3178
+ "glob",
3179
+ "lchmod",
3180
+ "lchown",
3181
+ "link",
3182
+ "lstat",
3183
+ "mkdir",
3184
+ "mkdtemp",
3185
+ "open",
3186
+ "openAsBlob",
3187
+ "opendir",
3188
+ "read",
3189
+ "readv",
3190
+ "readdir",
3191
+ "readFile",
3192
+ "readlink",
3193
+ "realpath",
3194
+ "rename",
3195
+ "rm",
3196
+ "rmdir",
3197
+ "stat",
3198
+ "statfs",
3199
+ "symlink",
3200
+ "truncate",
3201
+ "unlink",
3202
+ "unwatchFile",
3203
+ "utimes",
3204
+ "lutimes",
3205
+ "watch",
3206
+ "watchFile",
3207
+ "write",
3208
+ "writev",
3209
+ "writeFile"
3210
+ ];
3211
+ }));
3212
+ //#endregion
3213
+ //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/lists/fsSynchronousApiList.js
3214
+ var require_fsSynchronousApiList = /* @__PURE__ */ __commonJSMin(((exports) => {
3215
+ Object.defineProperty(exports, "__esModule", { value: true });
3216
+ exports.fsSynchronousApiList = void 0;
3217
+ exports.fsSynchronousApiList = [
3218
+ "accessSync",
3219
+ "appendFileSync",
3220
+ "chmodSync",
3221
+ "chownSync",
3222
+ "closeSync",
3223
+ "copyFileSync",
3224
+ "cpSync",
3225
+ "existsSync",
3226
+ "fchmodSync",
3227
+ "fchownSync",
3228
+ "fdatasyncSync",
3229
+ "fstatSync",
3230
+ "fsyncSync",
3231
+ "ftruncateSync",
3232
+ "futimesSync",
3233
+ "globSync",
3234
+ "lchmodSync",
3235
+ "lchownSync",
3236
+ "linkSync",
3237
+ "lstatSync",
3238
+ "mkdirSync",
3239
+ "mkdtempSync",
3240
+ "openSync",
3241
+ "opendirSync",
3242
+ "readdirSync",
3243
+ "readFileSync",
3244
+ "readlinkSync",
3245
+ "readSync",
3246
+ "readvSync",
3247
+ "realpathSync",
3248
+ "renameSync",
3249
+ "rmdirSync",
3250
+ "rmSync",
3251
+ "statfsSync",
3252
+ "statSync",
3253
+ "symlinkSync",
3254
+ "truncateSync",
3255
+ "unlinkSync",
3256
+ "utimesSync",
3257
+ "lutimesSync",
3258
+ "writeFileSync",
3259
+ "writeSync",
3260
+ "writevSync"
3261
+ ];
3262
+ }));
3263
+ //#endregion
3264
+ //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/lists/fsCommonObjectsList.js
3265
+ var require_fsCommonObjectsList = /* @__PURE__ */ __commonJSMin(((exports) => {
3266
+ Object.defineProperty(exports, "__esModule", { value: true });
3267
+ exports.fsCommonObjectsList = void 0;
3268
+ exports.fsCommonObjectsList = [
3269
+ "F_OK",
3270
+ "R_OK",
3271
+ "W_OK",
3272
+ "X_OK",
3273
+ "constants",
3274
+ "Stats",
3275
+ "StatFs",
3276
+ "Dir",
3277
+ "Dirent",
3278
+ "StatWatcher",
3279
+ "FSWatcher",
3280
+ "ReadStream",
3281
+ "WriteStream"
3282
+ ];
3283
+ }));
3284
+ //#endregion
3245
3285
  //#region ../node_modules/@jsonjoy.com/fs-node-utils/lib/index.js
3246
3286
  var require_lib$7 = /* @__PURE__ */ __commonJSMin(((exports) => {
3247
3287
  Object.defineProperty(exports, "__esModule", { value: true });
3288
+ exports.fsCommonObjectsList = exports.fsSynchronousApiList = exports.fsCallbackApiList = void 0;
3248
3289
  const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
3249
3290
  tslib_1.__exportStar(require_types(), exports);
3250
- tslib_1.__exportStar(require_constants$2(), exports);
3291
+ tslib_1.__exportStar(require_constants$3(), exports);
3251
3292
  tslib_1.__exportStar(require_AMODE(), exports);
3252
3293
  tslib_1.__exportStar(require_FLAG(), exports);
3253
3294
  tslib_1.__exportStar(require_path(), exports);
3254
- tslib_1.__exportStar(require_encoding$1(), exports);
3295
+ tslib_1.__exportStar(require_encoding(), exports);
3255
3296
  tslib_1.__exportStar(require_watchIgnore(), exports);
3297
+ var fsCallbackApiList_1 = require_fsCallbackApiList();
3298
+ Object.defineProperty(exports, "fsCallbackApiList", {
3299
+ enumerable: true,
3300
+ get: function() {
3301
+ return fsCallbackApiList_1.fsCallbackApiList;
3302
+ }
3303
+ });
3304
+ var fsSynchronousApiList_1 = require_fsSynchronousApiList();
3305
+ Object.defineProperty(exports, "fsSynchronousApiList", {
3306
+ enumerable: true,
3307
+ get: function() {
3308
+ return fsSynchronousApiList_1.fsSynchronousApiList;
3309
+ }
3310
+ });
3311
+ var fsCommonObjectsList_1 = require_fsCommonObjectsList();
3312
+ Object.defineProperty(exports, "fsCommonObjectsList", {
3313
+ enumerable: true,
3314
+ get: function() {
3315
+ return fsCommonObjectsList_1.fsCommonObjectsList;
3316
+ }
3317
+ });
3318
+ }));
3319
+ //#endregion
3320
+ //#region ../node_modules/@jsonjoy.com/fs-core/lib/json.js
3321
+ var require_json$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3322
+ Object.defineProperty(exports, "__esModule", { value: true });
3323
+ exports.flattenJSON = void 0;
3324
+ const buffer_1 = require_buffer();
3325
+ const fs_node_utils_1 = require_lib$7();
3326
+ const flattenJSON = (nestedJSON) => {
3327
+ const flatJSON = {};
3328
+ function flatten(pathPrefix, node) {
3329
+ for (const path in node) {
3330
+ const contentOrNode = node[path];
3331
+ const joinedPath = (0, fs_node_utils_1.pathJoin)(pathPrefix, path);
3332
+ if (typeof contentOrNode === "string" || contentOrNode instanceof buffer_1.Buffer) flatJSON[joinedPath] = contentOrNode;
3333
+ else if (typeof contentOrNode === "object" && contentOrNode !== null && !(contentOrNode instanceof buffer_1.Buffer) && Object.keys(contentOrNode).length > 0) flatten(joinedPath, contentOrNode);
3334
+ else flatJSON[joinedPath] = null;
3335
+ }
3336
+ }
3337
+ flatten("", nestedJSON);
3338
+ return flatJSON;
3339
+ };
3340
+ exports.flattenJSON = flattenJSON;
3341
+ }));
3342
+ //#endregion
3343
+ //#region ../node_modules/@jsonjoy.com/fs-core/lib/constants.js
3344
+ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
3345
+ Object.defineProperty(exports, "__esModule", { value: true });
3346
+ }));
3347
+ //#endregion
3348
+ //#region ../node_modules/@jsonjoy.com/fs-core/lib/result.js
3349
+ var require_result = /* @__PURE__ */ __commonJSMin(((exports) => {
3350
+ Object.defineProperty(exports, "__esModule", { value: true });
3351
+ exports.Ok = Ok;
3352
+ exports.Err = Err;
3353
+ function Ok(value) {
3354
+ return {
3355
+ ok: true,
3356
+ value
3357
+ };
3358
+ }
3359
+ function Err(err) {
3360
+ return {
3361
+ ok: false,
3362
+ err
3363
+ };
3364
+ }
3365
+ }));
3366
+ //#endregion
3367
+ //#region ../node_modules/thingies/lib/fanout.js
3368
+ var require_fanout = /* @__PURE__ */ __commonJSMin(((exports) => {
3369
+ Object.defineProperty(exports, "__esModule", { value: true });
3370
+ exports.FanOut = void 0;
3371
+ var FanOut = class {
3372
+ constructor() {
3373
+ this.listeners = /* @__PURE__ */ new Set();
3374
+ }
3375
+ emit(data) {
3376
+ this.listeners.forEach((listener) => listener(data));
3377
+ }
3378
+ listen(listener) {
3379
+ const listeners = this.listeners;
3380
+ listeners.add(listener);
3381
+ return () => listeners.delete(listener);
3382
+ }
3383
+ };
3384
+ exports.FanOut = FanOut;
3385
+ }));
3386
+ //#endregion
3387
+ //#region ../node_modules/@jsonjoy.com/fs-core/lib/process.js
3388
+ var require_process = /* @__PURE__ */ __commonJSMin(((exports) => {
3389
+ var import_browser$3 = /* @__PURE__ */ __toESM(require_browser$2());
3390
+ Object.defineProperty(exports, "__esModule", { value: true });
3391
+ exports.createProcess = createProcess;
3392
+ /**
3393
+ * Looks to return a `process` object, if one is available.
3394
+ *
3395
+ * The undefined `process` is returned if defined;
3396
+ * otherwise `require('process')` is attempted.
3397
+ *
3398
+ * If that fails, `undefined` is returned.
3399
+ *
3400
+ * @return {IProcess | undefined}
3401
+ */
3402
+ const maybeReturnProcess = () => {
3403
+ if (typeof import_browser$3.default !== "undefined") return import_browser$3.default;
3404
+ try {
3405
+ return require_browser$2();
3406
+ } catch {
3407
+ return;
3408
+ }
3409
+ };
3410
+ function createProcess() {
3411
+ const p = maybeReturnProcess() || {};
3412
+ if (!p.cwd) p.cwd = () => "/";
3413
+ if (!p.emitWarning) p.emitWarning = (message, type) => {
3414
+ console.warn(`${type}${type ? ": " : ""}${message}`);
3415
+ };
3416
+ if (!p.env) p.env = {};
3417
+ return p;
3418
+ }
3419
+ exports.default = createProcess();
3256
3420
  }));
3257
3421
  //#endregion
3258
3422
  //#region ../node_modules/@jsonjoy.com/fs-core/lib/Node.js
@@ -3657,7 +3821,6 @@ var require_File = /* @__PURE__ */ __commonJSMin(((exports) => {
3657
3821
  this.flags = flags;
3658
3822
  this.fd = fd;
3659
3823
  this.position = 0;
3660
- if (this.flags & O_APPEND) this.position = this.getSize();
3661
3824
  }
3662
3825
  getString(encoding = "utf8") {
3663
3826
  return this.node.getString();
@@ -3681,7 +3844,8 @@ var require_File = /* @__PURE__ */ __commonJSMin(((exports) => {
3681
3844
  this.position = position;
3682
3845
  }
3683
3846
  write(buf, offset = 0, length = buf.length, position) {
3684
- if (typeof position !== "number") position = this.position;
3847
+ if (this.flags & O_APPEND) position = this.node.getSize();
3848
+ else if (typeof position !== "number") position = this.position;
3685
3849
  const bytes = this.node.write(buf, offset, length, position);
3686
3850
  this.position = position + bytes;
3687
3851
  return bytes;
@@ -3702,25 +3866,6 @@ var require_File = /* @__PURE__ */ __commonJSMin(((exports) => {
3702
3866
  exports.File = File;
3703
3867
  }));
3704
3868
  //#endregion
3705
- //#region ../node_modules/@jsonjoy.com/fs-core/lib/encoding.js
3706
- var require_encoding = /* @__PURE__ */ __commonJSMin(((exports) => {
3707
- Object.defineProperty(exports, "__esModule", { value: true });
3708
- exports.ENCODING_UTF8 = void 0;
3709
- exports.assertEncoding = assertEncoding;
3710
- exports.strToEncoding = strToEncoding;
3711
- const buffer_1 = require_buffer();
3712
- const errors = require_errors$1();
3713
- exports.ENCODING_UTF8 = "utf8";
3714
- function assertEncoding(encoding) {
3715
- if (encoding && !buffer_1.Buffer.isEncoding(encoding)) throw new errors.TypeError("ERR_INVALID_OPT_VALUE_ENCODING", encoding);
3716
- }
3717
- function strToEncoding(str, encoding) {
3718
- if (!encoding || encoding === exports.ENCODING_UTF8) return str;
3719
- if (encoding === "buffer") return new buffer_1.Buffer(str);
3720
- return new buffer_1.Buffer(str).toString(encoding);
3721
- }
3722
- }));
3723
- //#endregion
3724
3869
  //#region ../node_modules/punycode/punycode.js
3725
3870
  var require_punycode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3726
3871
  /*! https://mths.be/punycode v1.4.1 by @mathias */
@@ -5485,8 +5630,12 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5485
5630
  combine: function combine(a, b, arrayLimit, plainObjects, throwOnLimitExceeded) {
5486
5631
  if (isOverflow(a)) {
5487
5632
  if (throwOnLimitExceeded) throw new RangeError("Array limit exceeded. Only " + arrayLimit + " element" + (arrayLimit === 1 ? "" : "s") + " allowed in an array.");
5488
- var newIndex = getMaxIndex(a) + 1;
5489
- a[newIndex] = b;
5633
+ var bValues = isArray(b) ? b : [b];
5634
+ var newIndex = getMaxIndex(a);
5635
+ for (var i = 0; i < bValues.length; ++i) {
5636
+ newIndex += 1;
5637
+ a[newIndex] = bValues[i];
5638
+ }
5490
5639
  setMaxIndex(a, newIndex);
5491
5640
  return a;
5492
5641
  }
@@ -5570,7 +5719,7 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5570
5719
  },
5571
5720
  isBuffer: function isBuffer(obj) {
5572
5721
  if (!obj || typeof obj !== "object") return false;
5573
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
5722
+ return !!(obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj));
5574
5723
  },
5575
5724
  isOverflow,
5576
5725
  isRegExp: function isRegExp(obj) {
@@ -5623,6 +5772,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5623
5772
  charsetSentinel: false,
5624
5773
  commaRoundTrip: false,
5625
5774
  delimiter: "&",
5775
+ depth: Infinity,
5626
5776
  encode: true,
5627
5777
  encodeDotInKeys: false,
5628
5778
  encoder: utils.encode,
@@ -5641,8 +5791,9 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5641
5791
  return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
5642
5792
  };
5643
5793
  var sentinel = {};
5644
- var stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
5794
+ var stringify = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel, depth, currentDepth) {
5645
5795
  var obj = object;
5796
+ if (currentDepth > depth) throw new RangeError("Input depth exceeded depth option of " + depth);
5646
5797
  var tmpSc = sideChannel;
5647
5798
  var step = 0;
5648
5799
  var findFlag = false;
@@ -5655,8 +5806,8 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5655
5806
  }
5656
5807
  if (typeof tmpSc.get(sentinel) === "undefined") step = 0;
5657
5808
  }
5658
- if (typeof filter === "function") obj = filter(prefix, obj);
5659
- else if (obj instanceof Date) obj = serializeDate(obj);
5809
+ obj = typeof filter === "function" ? filter(prefix, obj) : obj;
5810
+ if (obj instanceof Date) obj = serializeDate(obj);
5660
5811
  else if (generateArrayPrefix === "comma" && isArray(obj)) obj = utils.maybeMap(obj, function(value) {
5661
5812
  if (value instanceof Date) return serializeDate(value);
5662
5813
  return value;
@@ -5684,7 +5835,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5684
5835
  }
5685
5836
  var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
5686
5837
  var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
5687
- if (allowEmptyArrays && isArray(obj) && obj.length === 0) return adjustedPrefix + "[]";
5838
+ if (allowEmptyArrays && isArray(obj) && obj.length === 0 && Object.keys(obj).length === 0) return adjustedPrefix + "[]";
5688
5839
  for (var j = 0; j < objKeys.length; ++j) {
5689
5840
  var key = objKeys[j];
5690
5841
  var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
@@ -5694,7 +5845,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5694
5845
  sideChannel.set(object, step);
5695
5846
  var valueSideChannel = getSideChannel();
5696
5847
  valueSideChannel.set(sentinel, sideChannel);
5697
- pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
5848
+ pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel, depth, currentDepth + 1));
5698
5849
  }
5699
5850
  return values;
5700
5851
  };
@@ -5728,6 +5879,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5728
5879
  charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
5729
5880
  commaRoundTrip: !!opts.commaRoundTrip,
5730
5881
  delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
5882
+ depth: typeof opts.depth === "number" ? opts.depth : defaults.depth,
5731
5883
  encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
5732
5884
  encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
5733
5885
  encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
@@ -5765,7 +5917,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5765
5917
  if (typeof key === "undefined" || key === null) continue;
5766
5918
  var value = obj[key];
5767
5919
  if (options.skipNulls && value === null) continue;
5768
- pushToArray(keys, stringify(value, key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));
5920
+ pushToArray(keys, stringify(value, options.encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key), generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel, options.depth, 0));
5769
5921
  }
5770
5922
  var joined = keys.join(options.delimiter);
5771
5923
  var prefix = options.addQueryPrefix === true ? "?" : "";
@@ -5811,9 +5963,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5811
5963
  return String.fromCharCode(parseInt(numberStr, 10));
5812
5964
  });
5813
5965
  };
5814
- var parseArrayValue = function(val, options, currentArrayLength, isFlatArrayValue) {
5966
+ var parseArrayValue = function(val, options, currentArrayLength) {
5815
5967
  if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
5816
- if (isFlatArrayValue && options.throwOnLimitExceeded) {
5968
+ if (options.throwOnLimitExceeded) {
5817
5969
  var commaCount = 0;
5818
5970
  var commaIndex = val.indexOf(",");
5819
5971
  while (commaIndex > -1) {
@@ -5859,7 +6011,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5859
6011
  val = options.strictNullHandling ? null : "";
5860
6012
  } else {
5861
6013
  key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
5862
- if (key !== null) val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0, part.indexOf("[]=") === -1), function(encodedVal) {
6014
+ if (key !== null) val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0), function(encodedVal) {
5863
6015
  return options.decoder(encodedVal, defaults.decoder, charset, "value");
5864
6016
  });
5865
6017
  }
@@ -6466,17 +6618,13 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
6466
6618
  exports.dataToBuffer = dataToBuffer;
6467
6619
  exports.nullCheck = nullCheck;
6468
6620
  exports.pathToFilename = pathToFilename;
6469
- exports.createError = createError;
6470
- exports.createStatError = createStatError;
6471
6621
  const path_1 = require_path$1();
6472
6622
  const buffer_1 = require_buffer();
6473
- const errors = require_errors$1();
6623
+ const errors = require_errors$2();
6474
6624
  const process_1 = require_process();
6475
- const encoding_1 = require_encoding();
6476
6625
  const fs_node_utils_1 = require_lib$7();
6477
6626
  exports.isWin = process_1.default.platform === "win32";
6478
6627
  const resolveCrossPlatform = path_1.resolve;
6479
- const pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;
6480
6628
  const isSeparator = (str, i) => {
6481
6629
  let char = str[i];
6482
6630
  return i > 0 && (char === "/" || exports.isWin && char === "\\");
@@ -6510,7 +6658,7 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
6510
6658
  const filenameToSteps = (filename, base) => {
6511
6659
  const fullPathSansSlash = resolve(filename, base).substring(1);
6512
6660
  if (!fullPathSansSlash) return [];
6513
- return fullPathSansSlash.split(pathSep);
6661
+ return fullPathSansSlash.split(fs_node_utils_1.pathSep);
6514
6662
  };
6515
6663
  exports.filenameToSteps = filenameToSteps;
6516
6664
  function isFd(path) {
@@ -6519,7 +6667,7 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
6519
6667
  function validateFd(fd) {
6520
6668
  if (!isFd(fd)) throw TypeError(fs_node_utils_1.ERRSTR.FD);
6521
6669
  }
6522
- function dataToBuffer(data, encoding = encoding_1.ENCODING_UTF8) {
6670
+ function dataToBuffer(data, encoding = fs_node_utils_1.ENCODING_UTF8) {
6523
6671
  if (buffer_1.Buffer.isBuffer(data)) return data;
6524
6672
  else if (data instanceof Uint8Array) return (0, buffer_1.bufferFrom)(data);
6525
6673
  else if (encoding === "buffer") return (0, buffer_1.bufferFrom)(String(data), "utf8");
@@ -6530,7 +6678,7 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
6530
6678
  const er = /* @__PURE__ */ new Error("Path must be a string without null bytes");
6531
6679
  er.code = "ENOENT";
6532
6680
  if (typeof callback !== "function") throw er;
6533
- Promise.resolve().then(() => callback(er));
6681
+ queueMicrotask(() => callback(er));
6534
6682
  return false;
6535
6683
  }
6536
6684
  return true;
@@ -6559,61 +6707,120 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
6559
6707
  nullCheck(pathString);
6560
6708
  return pathString;
6561
6709
  }
6562
- const ENOENT = "ENOENT";
6563
- const EBADF = "EBADF";
6564
- const EINVAL = "EINVAL";
6565
- const EPERM = "EPERM";
6566
- const EPROTO = "EPROTO";
6567
- const EEXIST = "EEXIST";
6568
- const ENOTDIR = "ENOTDIR";
6569
- const EMFILE = "EMFILE";
6570
- const EACCES = "EACCES";
6571
- const EISDIR = "EISDIR";
6572
- const ENOTEMPTY = "ENOTEMPTY";
6573
- const ENOSYS = "ENOSYS";
6574
- const ERR_FS_EISDIR = "ERR_FS_EISDIR";
6575
- const ERR_OUT_OF_RANGE = "ERR_OUT_OF_RANGE";
6576
- function formatError(errorCode, func = "", path = "", path2 = "") {
6577
- let pathFormatted = "";
6578
- if (path) pathFormatted = ` '${path}'`;
6579
- if (path2) pathFormatted += ` -> '${path2}'`;
6580
- switch (errorCode) {
6581
- case ENOENT: return `ENOENT: no such file or directory, ${func}${pathFormatted}`;
6582
- case EBADF: return `EBADF: bad file descriptor, ${func}${pathFormatted}`;
6583
- case EINVAL: return `EINVAL: invalid argument, ${func}${pathFormatted}`;
6584
- case EPERM: return `EPERM: operation not permitted, ${func}${pathFormatted}`;
6585
- case EPROTO: return `EPROTO: protocol error, ${func}${pathFormatted}`;
6586
- case EEXIST: return `EEXIST: file already exists, ${func}${pathFormatted}`;
6587
- case ENOTDIR: return `ENOTDIR: not a directory, ${func}${pathFormatted}`;
6588
- case EISDIR: return `EISDIR: illegal operation on a directory, ${func}${pathFormatted}`;
6589
- case EACCES: return `EACCES: permission denied, ${func}${pathFormatted}`;
6590
- case ENOTEMPTY: return `ENOTEMPTY: directory not empty, ${func}${pathFormatted}`;
6591
- case EMFILE: return `EMFILE: too many open files, ${func}${pathFormatted}`;
6592
- case ENOSYS: return `ENOSYS: function not implemented, ${func}${pathFormatted}`;
6593
- case ERR_FS_EISDIR: return `[ERR_FS_EISDIR]: Path is a directory: ${func} returned EISDIR (is a directory) ${path}`;
6594
- case ERR_OUT_OF_RANGE: return `[ERR_OUT_OF_RANGE]: value out of range, ${func}${pathFormatted}`;
6595
- default: return `${errorCode}: error occurred, ${func}${pathFormatted}`;
6596
- }
6597
- }
6598
- function createError(errorCode, func = "", path = "", path2 = "", Constructor = Error) {
6599
- const error = new Constructor(formatError(errorCode, func, path, path2));
6600
- error.code = errorCode;
6710
+ }));
6711
+ //#endregion
6712
+ //#region ../node_modules/@jsonjoy.com/fs-core/lib/SystemError.js
6713
+ var require_SystemError = /* @__PURE__ */ __commonJSMin(((exports) => {
6714
+ Object.defineProperty(exports, "__esModule", { value: true });
6715
+ exports.SystemError = void 0;
6716
+ /** Node's `internal/errors` `SystemError`: an `ERR_*` code wrapping a libuv result. */
6717
+ var SystemError = class extends Error {
6718
+ constructor(code, prefix, info) {
6719
+ const path = info.path;
6720
+ const dest = info.dest;
6721
+ let message = prefix + ": " + info.syscall + " returned " + info.code + " (" + info.message + ")";
6722
+ if (path !== void 0) message += " " + path;
6723
+ if (dest !== void 0) message += " => " + dest;
6724
+ super(message);
6725
+ this.code = code;
6726
+ this.info = info;
6727
+ this.errno = info.errno;
6728
+ this.syscall = info.syscall;
6729
+ if (path !== void 0) this.path = path;
6730
+ if (dest !== void 0) this.dest = dest;
6731
+ }
6732
+ toString() {
6733
+ return this.name + " [" + this.code + "]: " + this.message;
6734
+ }
6735
+ };
6736
+ exports.SystemError = SystemError;
6737
+ SystemError.prototype.name = "SystemError";
6738
+ }));
6739
+ //#endregion
6740
+ //#region ../node_modules/@jsonjoy.com/fs-core/lib/errors.js
6741
+ var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
6742
+ Object.defineProperty(exports, "__esModule", { value: true });
6743
+ exports.createEisdirError = exports.createWatchError = exports.createStatError = exports.createError = void 0;
6744
+ const SystemError_1 = require_SystemError();
6745
+ const UV = {
6746
+ EPERM: [-1, "operation not permitted"],
6747
+ ENOENT: [-2, "no such file or directory"],
6748
+ EIO: [-5, "i/o error"],
6749
+ EBADF: [-9, "bad file descriptor"],
6750
+ EAGAIN: [-11, "resource temporarily unavailable"],
6751
+ EACCES: [-13, "permission denied"],
6752
+ EBUSY: [-16, "resource busy or locked"],
6753
+ EEXIST: [-17, "file already exists"],
6754
+ EXDEV: [-18, "cross-device link not permitted"],
6755
+ ENOTDIR: [-20, "not a directory"],
6756
+ EISDIR: [-21, "illegal operation on a directory"],
6757
+ EINVAL: [-22, "invalid argument"],
6758
+ ENFILE: [-23, "file table overflow"],
6759
+ EMFILE: [-24, "too many open files"],
6760
+ ETXTBSY: [-26, "text file is busy"],
6761
+ EFBIG: [-27, "file too large"],
6762
+ ENOSPC: [-28, "no space left on device"],
6763
+ ESPIPE: [-29, "invalid seek"],
6764
+ EROFS: [-30, "read-only file system"],
6765
+ EMLINK: [-31, "too many links"],
6766
+ ERANGE: [-34, "result too large"],
6767
+ ENAMETOOLONG: [-36, "name too long"],
6768
+ ENOSYS: [-38, "function not implemented"],
6769
+ ENOTEMPTY: [-39, "directory not empty"],
6770
+ ELOOP: [-40, "too many symbolic links encountered"],
6771
+ EPROTO: [-71, "protocol error"],
6772
+ EOVERFLOW: [-75, "value too large for defined data type"],
6773
+ ENOTSUP: [-95, "operation not supported on socket"]
6774
+ };
6775
+ const formatMessage = (code, uv, syscall, path, dest) => {
6776
+ let message = code + ": " + (uv ? uv[1] : "unknown error") + ", " + syscall;
6777
+ if (path) message += " '" + path + "'";
6778
+ if (dest) message += " -> '" + dest + "'";
6779
+ return message;
6780
+ };
6781
+ const createError = (code, syscall = "", path = "", dest = "", Constructor = Error) => {
6782
+ const uv = UV[code];
6783
+ const error = new Constructor(formatMessage(code, uv, syscall, path, dest));
6784
+ if (uv) error.errno = uv[0];
6785
+ error.code = code;
6786
+ error.syscall = syscall;
6601
6787
  if (path) error.path = path;
6788
+ if (dest) error.dest = dest;
6602
6789
  return error;
6603
- }
6604
- function createStatError(errorCode, func = "", path = "", path2 = "") {
6790
+ };
6791
+ exports.createError = createError;
6792
+ const createStatError = (code, syscall = "", path = "", dest = "") => {
6793
+ const uv = UV[code];
6605
6794
  return {
6606
- code: errorCode,
6607
- message: formatError(errorCode, func, path, path2),
6795
+ errno: uv ? uv[0] : void 0,
6796
+ code,
6797
+ syscall,
6608
6798
  path,
6609
- toError() {
6610
- const error = new Error(this.message);
6611
- error.code = this.code;
6612
- if (this.path) error.path = this.path;
6613
- return error;
6614
- }
6799
+ dest,
6800
+ message: formatMessage(code, uv, syscall, path, dest),
6801
+ toError: () => (0, exports.createError)(code, syscall, path, dest)
6615
6802
  };
6616
- }
6803
+ };
6804
+ exports.createStatError = createStatError;
6805
+ const createWatchError = (code, filename) => {
6806
+ const uv = UV[code];
6807
+ const error = new Error(formatMessage(code, uv, "watch", filename, ""));
6808
+ if (uv) error.errno = uv[0];
6809
+ error.syscall = "watch";
6810
+ error.code = code;
6811
+ error.path = filename;
6812
+ error.filename = filename;
6813
+ return error;
6814
+ };
6815
+ exports.createWatchError = createWatchError;
6816
+ const createEisdirError = (syscall, path) => new SystemError_1.SystemError("ERR_FS_EISDIR", "Path is a directory", {
6817
+ code: "EISDIR",
6818
+ message: "is a directory",
6819
+ path,
6820
+ syscall,
6821
+ errno: -UV.EISDIR[0]
6822
+ });
6823
+ exports.createEisdirError = createEisdirError;
6617
6824
  }));
6618
6825
  //#endregion
6619
6826
  //#region ../node_modules/@jsonjoy.com/fs-core/lib/watch/FsEvent.js
@@ -6645,14 +6852,21 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6645
6852
  const fs_node_utils_1 = require_lib$7();
6646
6853
  const fs_node_utils_2 = require_lib$7();
6647
6854
  const util_1 = require_util$3();
6855
+ const errors_1 = require_errors$1();
6856
+ const errors = require_errors$2();
6648
6857
  const json_1 = require_json$1();
6649
6858
  const result_1 = require_result();
6650
6859
  const fanout_1 = require_fanout();
6651
6860
  const FsEvent_1 = require_FsEvent();
6652
- const pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;
6653
- const pathRelative = path_1.posix ? path_1.posix.relative : path_1.relative;
6654
- const pathJoin = path_1.posix ? path_1.posix.join : path_1.join;
6655
- const { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_DIRECTORY } = fs_node_utils_1.constants;
6861
+ const { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_DIRECTORY, O_NOFOLLOW } = fs_node_utils_1.constants;
6862
+ const MAX_SYMLINK_HOPS = 40;
6863
+ const endsWithSep = (path, win32) => {
6864
+ let i = path.length - 1;
6865
+ if (i < 1) return false;
6866
+ let code = path.charCodeAt(i);
6867
+ if (code === 46) code = path.charCodeAt(--i);
6868
+ return code === 47 || win32 && code === 92;
6869
+ };
6656
6870
  /**
6657
6871
  * Represents a filesystem superblock, which is the root of a virtual
6658
6872
  * filesystem in Linux.
@@ -6681,7 +6895,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6681
6895
  this.changes = new fanout_1.FanOut();
6682
6896
  this.open = (filename, flagsNum, modeNum, resolveSymlinks = true) => {
6683
6897
  const file = this.openFile(filename, flagsNum, modeNum, resolveSymlinks);
6684
- if (!file) throw (0, util_1.createError)("ENOENT", "open", filename);
6898
+ if (!file) throw (0, errors_1.createError)("ENOENT", "open", filename);
6685
6899
  return file.fd;
6686
6900
  };
6687
6901
  this.writeFile = (id, buf, flagsNum, modeNum) => {
@@ -6691,26 +6905,27 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6691
6905
  else fd = this.open((0, util_1.pathToFilename)(id), flagsNum, modeNum);
6692
6906
  let offset = 0;
6693
6907
  let length = buf.length;
6694
- let position = flagsNum & O_APPEND ? void 0 : 0;
6695
6908
  try {
6696
6909
  while (length > 0) {
6697
- const written = this.write(fd, buf, offset, length, position);
6910
+ const written = this.write(fd, buf, offset, length, null);
6698
6911
  offset += written;
6699
6912
  length -= written;
6700
- if (position !== void 0) position += written;
6701
6913
  }
6702
6914
  } finally {
6703
6915
  if (!isUserFd) this.close(fd);
6704
6916
  }
6705
6917
  };
6706
6918
  this.read = (fd, buffer, offset, length, position) => {
6707
- if (buffer.byteLength < length) throw (0, util_1.createError)("ERR_OUT_OF_RANGE", "read", void 0, void 0, RangeError);
6708
- const file = this.getFileByFdOrThrow(fd);
6709
- if (file.node.isSymlink()) throw (0, util_1.createError)("EPERM", "read", file.link.getPath());
6919
+ if (offset < 0) throw new errors.RangeError("ERR_OUT_OF_RANGE", "offset", ">= 0 && <= 9007199254740991", offset);
6920
+ if (length === 0) return 0;
6921
+ if (length < 0) throw new errors.RangeError("ERR_OUT_OF_RANGE", "length", ">= 0", length);
6922
+ if (offset + length > buffer.byteLength) throw new errors.RangeError("ERR_OUT_OF_RANGE", "length", "<= " + (buffer.byteLength - offset), length);
6923
+ const file = this.getFileByFdOrThrow(fd, "read");
6924
+ if (file.node.isSymlink()) throw (0, errors_1.createError)("EPERM", "read", file.link.getPath());
6710
6925
  return file.read(buffer, Number(offset), Number(length), position === -1 || typeof position !== "number" ? void 0 : position);
6711
6926
  };
6712
6927
  this.readv = (fd, buffers, position) => {
6713
- const file = this.getFileByFdOrThrow(fd);
6928
+ const file = this.getFileByFdOrThrow(fd, "read");
6714
6929
  let p = position ?? void 0;
6715
6930
  if (p === -1) p = void 0;
6716
6931
  let bytesRead = 0;
@@ -6727,7 +6942,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6727
6942
  try {
6728
6943
  link1 = this.getLinkOrThrow(filename1, "link");
6729
6944
  } catch (err) {
6730
- if (err.code) err = (0, util_1.createError)(err.code, "link", filename1, filename2);
6945
+ if (err.code) err = (0, errors_1.createError)(err.code, "link", filename1, filename2);
6731
6946
  throw err;
6732
6947
  }
6733
6948
  const dirname2 = (0, path_1.dirname)(filename2);
@@ -6735,11 +6950,11 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6735
6950
  try {
6736
6951
  dir2 = this.getLinkOrThrow(dirname2, "link");
6737
6952
  } catch (err) {
6738
- if (err.code) err = (0, util_1.createError)(err.code, "link", filename1, filename2);
6953
+ if (err.code) err = (0, errors_1.createError)(err.code, "link", filename1, filename2);
6739
6954
  throw err;
6740
6955
  }
6741
6956
  const name = (0, path_1.basename)(filename2);
6742
- if (dir2.getChild(name)) throw (0, util_1.createError)("EEXIST", "link", filename1, filename2);
6957
+ if (dir2.getChild(name)) throw (0, errors_1.createError)("EEXIST", "link", filename1, filename2);
6743
6958
  const node = link1.getNode();
6744
6959
  node.nlink++;
6745
6960
  const newLink = dir2.createChild(name, node);
@@ -6747,7 +6962,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6747
6962
  };
6748
6963
  this.unlink = (filename) => {
6749
6964
  const link = this.getLinkOrThrow(filename, "unlink");
6750
- if (link.length) throw Error("Dir not empty...");
6965
+ if (link.getNode().isDirectory()) throw (0, errors_1.createError)("EPERM", "unlink", filename);
6751
6966
  this._emitDeleteRecursive(link);
6752
6967
  this.deleteLink(link);
6753
6968
  const node = link.getNode();
@@ -6755,18 +6970,19 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6755
6970
  if (node.nlink <= 0) this.deleteNode(node);
6756
6971
  };
6757
6972
  this.symlink = (targetFilename, pathFilename) => {
6973
+ if (!targetFilename) throw (0, errors_1.createError)("ENOENT", "symlink", targetFilename, pathFilename);
6758
6974
  const pathSteps = (0, util_1.filenameToSteps)(pathFilename);
6759
6975
  let dirLink;
6760
6976
  try {
6761
6977
  dirLink = this.getLinkParentAsDirOrThrow(pathSteps);
6762
6978
  } catch (err) {
6763
- if (err.code) err = (0, util_1.createError)(err.code, "symlink", targetFilename, pathFilename);
6979
+ if (err.code) err = (0, errors_1.createError)(err.code, "symlink", targetFilename, pathFilename);
6764
6980
  throw err;
6765
6981
  }
6766
6982
  const name = pathSteps[pathSteps.length - 1];
6767
- if (dirLink.getChild(name)) throw (0, util_1.createError)("EEXIST", "symlink", targetFilename, pathFilename);
6983
+ if (dirLink.getChild(name)) throw (0, errors_1.createError)("EEXIST", "symlink", targetFilename, pathFilename);
6768
6984
  const node = dirLink.getNode();
6769
- if (!node.canExecute() || !node.canWrite()) throw (0, util_1.createError)("EACCES", "symlink", targetFilename, pathFilename);
6985
+ if (!node.canExecute() || !node.canWrite()) throw (0, errors_1.createError)("EACCES", "symlink", targetFilename, pathFilename);
6770
6986
  const symlink = dirLink.createChild(name);
6771
6987
  symlink.getNode().makeSymlink(targetFilename);
6772
6988
  this.emit(new FsEvent_1.FsEvent(0, symlink.steps, symlink.getNode(), symlink));
@@ -6777,21 +6993,21 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6777
6993
  try {
6778
6994
  link = this.getResolvedLinkOrThrow(oldPathFilename);
6779
6995
  } catch (err) {
6780
- if (err.code) err = (0, util_1.createError)(err.code, "rename", oldPathFilename, newPathFilename);
6996
+ if (err.code) err = (0, errors_1.createError)(err.code, "rename", oldPathFilename, newPathFilename);
6781
6997
  throw err;
6782
6998
  }
6783
6999
  let newPathDirLink;
6784
7000
  try {
6785
7001
  newPathDirLink = this.getLinkParentAsDirOrThrow(newPathFilename);
6786
7002
  } catch (err) {
6787
- if (err.code) err = (0, util_1.createError)(err.code, "rename", oldPathFilename, newPathFilename);
7003
+ if (err.code) err = (0, errors_1.createError)(err.code, "rename", oldPathFilename, newPathFilename);
6788
7004
  throw err;
6789
7005
  }
6790
7006
  const oldLinkParent = link.parent;
6791
- if (!oldLinkParent) throw (0, util_1.createError)("EINVAL", "rename", oldPathFilename, newPathFilename);
7007
+ if (!oldLinkParent) throw (0, errors_1.createError)("EINVAL", "rename", oldPathFilename, newPathFilename);
6792
7008
  const oldParentNode = oldLinkParent.getNode();
6793
7009
  const newPathDirNode = newPathDirLink.getNode();
6794
- if (!oldParentNode.canExecute() || !oldParentNode.canWrite() || !newPathDirNode.canExecute() || !newPathDirNode.canWrite()) throw (0, util_1.createError)("EACCES", "rename", oldPathFilename, newPathFilename);
7010
+ if (!oldParentNode.canExecute() || !oldParentNode.canWrite() || !newPathDirNode.canExecute() || !newPathDirNode.canWrite()) throw (0, errors_1.createError)("EACCES", "rename", oldPathFilename, newPathFilename);
6795
7011
  oldLinkParent.deleteChild(link);
6796
7012
  const name = (0, path_1.basename)(newPathFilename);
6797
7013
  const oldSteps = link.steps;
@@ -6802,12 +7018,12 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6802
7018
  };
6803
7019
  this.mkdir = (filename, modeNum) => {
6804
7020
  const steps = (0, util_1.filenameToSteps)(filename);
6805
- if (!steps.length) throw (0, util_1.createError)("EEXIST", "mkdir", filename);
7021
+ if (!steps.length) throw (0, errors_1.createError)("EEXIST", "mkdir", filename);
6806
7022
  const dir = this.getLinkParentAsDirOrThrow(filename, "mkdir");
6807
7023
  const name = steps[steps.length - 1];
6808
- if (dir.getChild(name)) throw (0, util_1.createError)("EEXIST", "mkdir", filename);
7024
+ if (dir.getChild(name)) throw (0, errors_1.createError)("EEXIST", "mkdir", filename);
6809
7025
  const node = dir.getNode();
6810
- if (!node.canWrite() || !node.canExecute()) throw (0, util_1.createError)("EACCES", "mkdir", filename);
7026
+ if (!node.canWrite() || !node.canExecute()) throw (0, errors_1.createError)("EACCES", "mkdir", filename);
6811
7027
  const child = dir.createChild(name, this.createNode(fs_node_utils_1.constants.S_IFDIR | modeNum));
6812
7028
  this.emit(new FsEvent_1.FsEvent(0, child.steps, child.getNode(), child));
6813
7029
  };
@@ -6827,12 +7043,12 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6827
7043
  curr = this.root;
6828
7044
  i = 0;
6829
7045
  }
6830
- curr = this.getResolvedLinkOrThrow(path_1.sep + steps.slice(0, i).join(path_1.sep), "mkdir");
7046
+ curr = this.getResolvedLinkOrThrow(fs_node_utils_2.pathSep + steps.slice(0, i).join(fs_node_utils_2.pathSep), "mkdir");
6831
7047
  for (; i < steps.length; i++) {
6832
7048
  const node = curr.getNode();
6833
7049
  if (node.isDirectory()) {
6834
- if (!node.canExecute() || !node.canWrite()) throw (0, util_1.createError)("EACCES", "mkdir", filename);
6835
- } else throw (0, util_1.createError)("ENOTDIR", "mkdir", filename);
7050
+ if (!node.canExecute() || !node.canWrite()) throw (0, errors_1.createError)("EACCES", "mkdir", filename);
7051
+ } else throw (0, errors_1.createError)("ENOTDIR", "mkdir", filename);
6836
7052
  created = true;
6837
7053
  curr = curr.createChild(steps[i], this.createNode(fs_node_utils_1.constants.S_IFDIR | modeNum));
6838
7054
  this.emit(new FsEvent_1.FsEvent(0, curr.steps, curr.getNode(), curr));
@@ -6841,20 +7057,20 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6841
7057
  };
6842
7058
  this.rmdir = (filename, recursive = false) => {
6843
7059
  const link = this.getLinkAsDirOrThrow(filename, "rmdir");
6844
- if (link.length && !recursive) throw (0, util_1.createError)("ENOTEMPTY", "rmdir", filename);
7060
+ if (link.length && !recursive) throw (0, errors_1.createError)("ENOTEMPTY", "rmdir", filename);
6845
7061
  this._emitDeleteRecursive(link);
6846
7062
  this.deleteLink(link);
6847
7063
  };
6848
7064
  this.rm = (filename, force = false, recursive = false) => {
6849
7065
  let link;
6850
7066
  try {
6851
- link = this.getResolvedLinkOrThrow(filename, "stat");
7067
+ link = this.getResolvedLinkOrThrow(filename, "lstat");
6852
7068
  } catch (err) {
6853
7069
  if (err.code === "ENOENT" && force) return;
6854
7070
  else throw err;
6855
7071
  }
6856
- if (link.getNode().isDirectory() && !recursive) throw (0, util_1.createError)("ERR_FS_EISDIR", "rm", filename);
6857
- if (!link.parent?.getNode().canWrite()) throw (0, util_1.createError)("EACCES", "rm", filename);
7072
+ if (link.getNode().isDirectory() && !recursive) throw (0, errors_1.createEisdirError)("rm", filename);
7073
+ if (!link.parent?.getNode().canWrite()) throw (0, errors_1.createError)("EACCES", "rm", filename);
6858
7074
  this._emitDeleteRecursive(link);
6859
7075
  this.deleteLink(link);
6860
7076
  };
@@ -6899,14 +7115,14 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6899
7115
  this.emit(new FsEvent_1.FsEvent(3, link.steps, link.getNode(), link));
6900
7116
  };
6901
7117
  this.futimes = (fd, atime, mtime) => {
6902
- const file = this.getFileByFdOrThrow(fd, "futimes");
7118
+ const file = this.getFileByFdOrThrow(fd, "futime");
6903
7119
  const node = file.node;
6904
7120
  node.atime = /* @__PURE__ */ new Date(atime * 1e3);
6905
7121
  node.mtime = /* @__PURE__ */ new Date(mtime * 1e3);
6906
7122
  this.emit(new FsEvent_1.FsEvent(3, file.link.steps, file.node, file.link));
6907
7123
  };
6908
7124
  this.utimes = (filename, atime, mtime, followSymlinks = true) => {
6909
- const link = followSymlinks ? this.getResolvedLinkOrThrow(filename, "utimes") : this.getLinkOrThrow(filename, "lutimes");
7125
+ const link = followSymlinks ? this.getResolvedLinkOrThrow(filename, "utime") : this.getLinkOrThrow(filename, "lutime");
6910
7126
  const node = link.getNode();
6911
7127
  node.atime = /* @__PURE__ */ new Date(atime * 1e3);
6912
7128
  node.mtime = /* @__PURE__ */ new Date(mtime * 1e3);
@@ -6970,34 +7186,37 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
6970
7186
  delete this.inodes[node.ino];
6971
7187
  this.releasedInos.push(node.ino);
6972
7188
  }
6973
- walk(stepsOrFilenameOrLink, resolveSymlinks = false, checkExistence = false, checkAccess = false, funcName) {
7189
+ walk(stepsOrFilenameOrLink, resolveSymlinks = false, checkExistence = false, checkAccess = false, funcName, budget) {
6974
7190
  let steps;
6975
7191
  let filename;
6976
7192
  if (stepsOrFilenameOrLink instanceof Link_1.Link) {
6977
7193
  steps = stepsOrFilenameOrLink.steps;
6978
- filename = pathSep + steps.join(pathSep);
7194
+ filename = fs_node_utils_2.pathSep + steps.join(fs_node_utils_2.pathSep);
6979
7195
  } else if (typeof stepsOrFilenameOrLink === "string") {
6980
7196
  steps = (0, util_1.filenameToSteps)(stepsOrFilenameOrLink);
6981
7197
  filename = stepsOrFilenameOrLink;
6982
7198
  } else {
6983
7199
  steps = stepsOrFilenameOrLink;
6984
- filename = pathSep + steps.join(pathSep);
7200
+ filename = fs_node_utils_2.pathSep + steps.join(fs_node_utils_2.pathSep);
6985
7201
  }
6986
7202
  let curr = this.root;
6987
7203
  let i = 0;
7204
+ let hops = budget ? budget.hops : 0;
6988
7205
  const uid = this.process.getuid?.() ?? 0;
6989
7206
  const gid = this.process.getgid?.() ?? 0;
6990
7207
  while (i < steps.length) {
6991
7208
  let node = curr.getNode();
6992
7209
  if (node.isDirectory()) {
6993
- if (checkAccess && !node.canExecute(uid, gid)) return (0, result_1.Err)((0, util_1.createStatError)("EACCES", funcName, filename));
6994
- } else if (i < steps.length - 1) return (0, result_1.Err)((0, util_1.createStatError)("ENOTDIR", funcName, filename));
7210
+ if (checkAccess && !node.canExecute(uid, gid)) return (0, result_1.Err)((0, errors_1.createStatError)("EACCES", funcName, filename));
7211
+ } else if (i < steps.length - 1) return (0, result_1.Err)((0, errors_1.createStatError)("ENOTDIR", funcName, filename));
6995
7212
  curr = curr.getChild(steps[i]) ?? null;
6996
- if (!curr) if (checkExistence) return (0, result_1.Err)((0, util_1.createStatError)("ENOENT", funcName, filename));
7213
+ if (!curr) if (checkExistence) return (0, result_1.Err)((0, errors_1.createStatError)("ENOENT", funcName, filename));
6997
7214
  else return (0, result_1.Ok)(null);
6998
7215
  node = curr?.getNode();
6999
7216
  if (node.isSymlink() && (resolveSymlinks || i < steps.length - 1)) {
7000
- const resolvedPath = (0, path_1.isAbsolute)(node.symlink) ? node.symlink : pathJoin((0, path_1.dirname)(curr.getPath()), node.symlink);
7217
+ if (++hops > MAX_SYMLINK_HOPS) return (0, result_1.Err)((0, errors_1.createStatError)("ELOOP", funcName, filename));
7218
+ if (budget) budget.hops = hops;
7219
+ const resolvedPath = (0, path_1.isAbsolute)(node.symlink) ? node.symlink : (0, fs_node_utils_2.pathJoin)((0, path_1.dirname)(curr.getPath()), node.symlink);
7001
7220
  steps = (0, util_1.filenameToSteps)(resolvedPath).concat(steps.slice(i + 1));
7002
7221
  curr = this.root;
7003
7222
  i = 0;
@@ -7005,7 +7224,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7005
7224
  }
7006
7225
  if (checkExistence && !node.isDirectory() && i < steps.length - 1) {
7007
7226
  const errorCode = this.process.platform === "win32" ? "ENOENT" : "ENOTDIR";
7008
- return (0, result_1.Err)((0, util_1.createStatError)(errorCode, funcName, filename));
7227
+ return (0, result_1.Err)((0, errors_1.createStatError)(errorCode, funcName, filename));
7009
7228
  }
7010
7229
  i++;
7011
7230
  }
@@ -7047,7 +7266,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7047
7266
  */
7048
7267
  getLinkAsDirOrThrow(filename, funcName) {
7049
7268
  const link = this.getLinkOrThrow(filename, funcName);
7050
- if (!link.getNode().isDirectory()) throw (0, util_1.createError)("ENOTDIR", funcName, filename);
7269
+ if (!link.getNode().isDirectory()) throw (0, errors_1.createError)("ENOTDIR", funcName, filename);
7051
7270
  return link;
7052
7271
  }
7053
7272
  getLinkParent(steps) {
@@ -7055,9 +7274,9 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7055
7274
  }
7056
7275
  getLinkParentAsDirOrThrow(filenameOrSteps, funcName) {
7057
7276
  const steps = (filenameOrSteps instanceof Array ? filenameOrSteps : (0, util_1.filenameToSteps)(filenameOrSteps)).slice(0, -1);
7058
- const filename = pathSep + steps.join(pathSep);
7277
+ const filename = fs_node_utils_2.pathSep + steps.join(fs_node_utils_2.pathSep);
7059
7278
  const link = this.getLinkOrThrow(filename, funcName);
7060
- if (!link.getNode().isDirectory()) throw (0, util_1.createError)("ENOTDIR", funcName, filename);
7279
+ if (!link.getNode().isDirectory()) throw (0, errors_1.createError)("ENOTDIR", funcName, filename);
7061
7280
  return link;
7062
7281
  }
7063
7282
  getFileByFd(fd) {
@@ -7066,7 +7285,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7066
7285
  getFileByFdOrThrow(fd, funcName) {
7067
7286
  if (!(0, util_1.isFd)(fd)) throw TypeError(fs_node_utils_2.ERRSTR.FD);
7068
7287
  const file = this.getFileByFd(fd);
7069
- if (!file) throw (0, util_1.createError)("EBADF", funcName);
7288
+ if (!file) throw (0, errors_1.createError)("EBADF", funcName);
7070
7289
  return file;
7071
7290
  }
7072
7291
  _toJSON(link = this.root, json = {}, path, asBuffer) {
@@ -7084,12 +7303,12 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7084
7303
  const node = child.getNode();
7085
7304
  if (node.isFile()) {
7086
7305
  let filename = child.getPath();
7087
- if (path) filename = pathRelative(path, filename);
7306
+ if (path) filename = (0, fs_node_utils_2.pathRelative)(path, filename);
7088
7307
  json[filename] = asBuffer ? node.getBuffer() : node.getString();
7089
7308
  } else if (node.isDirectory()) this._toJSON(child, json, path, asBuffer);
7090
7309
  }
7091
7310
  let dirPath = link.getPath();
7092
- if (path) dirPath = pathRelative(path, dirPath);
7311
+ if (path) dirPath = (0, fs_node_utils_2.pathRelative)(path, dirPath);
7093
7312
  if (dirPath && isEmpty) json[dirPath] = null;
7094
7313
  return json;
7095
7314
  }
@@ -7136,19 +7355,20 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7136
7355
  mountSync(mountpoint, json) {
7137
7356
  this.fromJSON(json, mountpoint);
7138
7357
  }
7139
- openLink(link, flagsNum, resolveSymlinks = true) {
7140
- if (this.openFiles >= this.maxFiles) throw (0, util_1.createError)("EMFILE", "open", link.getPath());
7358
+ openLink(link, flagsNum, resolveSymlinks = true, filename = link.getPath()) {
7359
+ if (this.openFiles >= this.maxFiles) throw (0, errors_1.createError)("EMFILE", "open", filename);
7141
7360
  let realLink = link;
7142
7361
  if (resolveSymlinks) realLink = this.getResolvedLinkOrThrow(link.getPath(), "open");
7143
7362
  const node = realLink.getNode();
7144
7363
  if (node.isDirectory()) {
7145
- if ((flagsNum & (O_RDONLY | O_RDWR | O_WRONLY)) !== O_RDONLY) throw (0, util_1.createError)("EISDIR", "open", link.getPath());
7146
- } else if (flagsNum & O_DIRECTORY) throw (0, util_1.createError)("ENOTDIR", "open", link.getPath());
7364
+ if ((flagsNum & (O_RDONLY | O_RDWR | O_WRONLY)) !== O_RDONLY) throw (0, errors_1.createError)("EISDIR", "open", filename);
7365
+ } else if (flagsNum & O_DIRECTORY) throw (0, errors_1.createError)("ENOTDIR", "open", filename);
7366
+ if (node.isSymlink() && flagsNum & O_NOFOLLOW) throw (0, errors_1.createError)("ELOOP", "open", filename);
7147
7367
  if ((flagsNum & (O_RDONLY | O_RDWR | O_WRONLY)) !== O_WRONLY) {
7148
- if (!node.canRead()) throw (0, util_1.createError)("EACCES", "open", link.getPath());
7368
+ if (!node.canRead()) throw (0, errors_1.createError)("EACCES", "open", filename);
7149
7369
  }
7150
7370
  if (flagsNum & (O_WRONLY | O_RDWR)) {
7151
- if (!node.canWrite()) throw (0, util_1.createError)("EACCES", "open", link.getPath());
7371
+ if (!node.canWrite()) throw (0, errors_1.createError)("EACCES", "open", filename);
7152
7372
  }
7153
7373
  const file = new File_1.File(link, node, flagsNum, this.newFdNumber());
7154
7374
  this.fds[file.fd] = file;
@@ -7160,26 +7380,63 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7160
7380
  }
7161
7381
  return file;
7162
7382
  }
7383
+ throwCreatDir(path, filename, budget) {
7384
+ const dir = this.walk((0, path_1.dirname)(path), true, true, true, "open", budget);
7385
+ if (!dir.ok) throw (0, errors_1.createError)(dir.err.code, "open", filename);
7386
+ const node = dir.value.getNode();
7387
+ if (!node.isDirectory()) throw (0, errors_1.createError)("ENOTDIR", "open", filename);
7388
+ if (!node.canExecute()) throw (0, errors_1.createError)("EACCES", "open", filename);
7389
+ throw (0, errors_1.createError)("EISDIR", "open", filename);
7390
+ }
7163
7391
  openFile(filename, flagsNum, modeNum, resolveSymlinks = true) {
7164
- const steps = (0, util_1.filenameToSteps)(filename);
7165
- let link;
7166
- try {
7167
- link = resolveSymlinks ? this.getResolvedLinkOrThrow(filename, "open") : this.getLinkOrThrow(filename, "open");
7168
- if (link && flagsNum & O_CREAT && flagsNum & O_EXCL) throw (0, util_1.createError)("EEXIST", "open", filename);
7169
- } catch (err) {
7170
- if (err.code === "ENOENT" && flagsNum & O_CREAT) {
7171
- const dirName = (0, path_1.dirname)(filename);
7172
- const dirLink = this.getResolvedLinkOrThrow(dirName);
7173
- const dirNode = dirLink.getNode();
7174
- if (!dirNode.isDirectory()) throw (0, util_1.createError)("ENOTDIR", "open", filename);
7175
- if (!dirNode.canExecute() || !dirNode.canWrite()) throw (0, util_1.createError)("EACCES", "open", filename);
7176
- modeNum ?? (modeNum = 438);
7177
- link = this.createLink(dirLink, steps[steps.length - 1], false, modeNum);
7178
- this.emit(new FsEvent_1.FsEvent(0, link.steps, link.getNode(), link));
7179
- } else throw err;
7180
- }
7181
- if (link) return this.openLink(link, flagsNum, resolveSymlinks);
7182
- throw (0, util_1.createError)("ENOENT", "open", filename);
7392
+ if (this.openFiles >= this.maxFiles) throw (0, errors_1.createError)("EMFILE", "open", filename);
7393
+ if ((flagsNum & (O_CREAT | O_DIRECTORY)) === (O_CREAT | O_DIRECTORY)) throw (0, errors_1.createError)("EINVAL", "open", filename);
7394
+ const win32 = this.process.platform === "win32";
7395
+ const budget = { hops: 0 };
7396
+ let trailingSlash = endsWithSep(filename, win32);
7397
+ if (trailingSlash && flagsNum & O_CREAT) this.throwCreatDir(filename, filename, budget);
7398
+ const excl = (flagsNum & (O_CREAT | O_EXCL)) === (O_CREAT | O_EXCL);
7399
+ const follow = trailingSlash || resolveSymlinks && !(flagsNum & O_NOFOLLOW) && !excl;
7400
+ let path = filename;
7401
+ let link = null;
7402
+ for (;;) {
7403
+ const hops = budget.hops;
7404
+ const result = this.walk(path, false, true, true, "open", budget);
7405
+ if (!result.ok) {
7406
+ const code = result.err.code;
7407
+ if (code !== "ENOENT" || !(flagsNum & O_CREAT)) throw (0, errors_1.createError)(code, "open", filename);
7408
+ budget.hops = hops;
7409
+ link = null;
7410
+ break;
7411
+ }
7412
+ link = result.value;
7413
+ const node = link.getNode();
7414
+ if (!follow || !node.isSymlink()) break;
7415
+ if (++budget.hops > MAX_SYMLINK_HOPS) throw (0, errors_1.createError)("ELOOP", "open", filename);
7416
+ path = (0, path_1.isAbsolute)(node.symlink) ? node.symlink : (0, fs_node_utils_2.pathJoin)((0, path_1.dirname)(link.getPath()), node.symlink);
7417
+ if (endsWithSep(path, win32)) {
7418
+ if (flagsNum & O_CREAT) this.throwCreatDir(path, filename, budget);
7419
+ trailingSlash = true;
7420
+ }
7421
+ }
7422
+ if (link) {
7423
+ const node = link.getNode();
7424
+ if (excl) throw (0, errors_1.createError)("EEXIST", "open", filename);
7425
+ if (trailingSlash && !node.isDirectory()) throw (0, errors_1.createError)("ENOTDIR", "open", filename);
7426
+ if (flagsNum & O_CREAT && node.isDirectory()) throw (0, errors_1.createError)("EISDIR", "open", filename);
7427
+ return this.openLink(link, flagsNum, false, filename);
7428
+ }
7429
+ const dir = this.walk((0, path_1.dirname)(path), true, true, true, "open", budget);
7430
+ if (!dir.ok) throw (0, errors_1.createError)(dir.err.code, "open", filename);
7431
+ const dirLink = dir.value;
7432
+ const dirNode = dirLink.getNode();
7433
+ if (!dirNode.isDirectory()) throw (0, errors_1.createError)("ENOTDIR", "open", filename);
7434
+ if (!dirNode.canExecute() || !dirNode.canWrite()) throw (0, errors_1.createError)("EACCES", "open", filename);
7435
+ modeNum ?? (modeNum = 438);
7436
+ const steps = (0, util_1.filenameToSteps)(path);
7437
+ link = this.createLink(dirLink, steps[steps.length - 1], false, modeNum);
7438
+ this.emit(new FsEvent_1.FsEvent(0, link.steps, link.getNode(), link));
7439
+ return this.openLink(link, flagsNum, false, filename);
7183
7440
  }
7184
7441
  closeFile(file) {
7185
7442
  if (!this.fds[file.fd]) return;
@@ -7189,7 +7446,7 @@ var require_Superblock = /* @__PURE__ */ __commonJSMin(((exports) => {
7189
7446
  }
7190
7447
  write(fd, buf, offset, length, position) {
7191
7448
  const file = this.getFileByFdOrThrow(fd, "write");
7192
- if (file.node.isSymlink()) throw (0, util_1.createError)("EBADF", "write", file.link.getPath());
7449
+ if (file.node.isSymlink()) throw (0, errors_1.createError)("EBADF", "write", file.link.getPath());
7193
7450
  const bytes = file.write(buf, offset, length, position === -1 || typeof position !== "number" ? void 0 : position);
7194
7451
  if (bytes > 0) this.emit(new FsEvent_1.FsEvent(2, file.link.steps, file.node, file.link));
7195
7452
  return bytes;
@@ -7288,11 +7545,11 @@ var require_CoreWatcher = /* @__PURE__ */ __commonJSMin(((exports) => {
7288
7545
  //#region ../node_modules/@jsonjoy.com/fs-core/lib/index.js
7289
7546
  var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
7290
7547
  Object.defineProperty(exports, "__esModule", { value: true });
7291
- exports.resolve = exports.pathToFilename = exports.createStatError = exports.createError = exports.validateFd = exports.isFd = exports.filenameToSteps = exports.dataToBuffer = exports.Superblock = exports.File = exports.Link = exports.Node = void 0;
7548
+ exports.SystemError = exports.createWatchError = exports.createEisdirError = exports.createStatError = exports.createError = exports.resolve = exports.pathToFilename = exports.nullCheck = exports.validateFd = exports.isWin = exports.isFd = exports.filenameToSteps = exports.dataToBuffer = exports.Superblock = exports.File = exports.Link = exports.Node = void 0;
7292
7549
  const tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
7293
7550
  tslib_1.__exportStar(require_types$1(), exports);
7294
7551
  tslib_1.__exportStar(require_json$1(), exports);
7295
- tslib_1.__exportStar(require_constants$3(), exports);
7552
+ tslib_1.__exportStar(require_constants$2(), exports);
7296
7553
  tslib_1.__exportStar(require_result(), exports);
7297
7554
  var Node_1 = require_Node();
7298
7555
  Object.defineProperty(exports, "Node", {
@@ -7343,22 +7600,22 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
7343
7600
  return util_1.isFd;
7344
7601
  }
7345
7602
  });
7346
- Object.defineProperty(exports, "validateFd", {
7603
+ Object.defineProperty(exports, "isWin", {
7347
7604
  enumerable: true,
7348
7605
  get: function() {
7349
- return util_1.validateFd;
7606
+ return util_1.isWin;
7350
7607
  }
7351
7608
  });
7352
- Object.defineProperty(exports, "createError", {
7609
+ Object.defineProperty(exports, "validateFd", {
7353
7610
  enumerable: true,
7354
7611
  get: function() {
7355
- return util_1.createError;
7612
+ return util_1.validateFd;
7356
7613
  }
7357
7614
  });
7358
- Object.defineProperty(exports, "createStatError", {
7615
+ Object.defineProperty(exports, "nullCheck", {
7359
7616
  enumerable: true,
7360
7617
  get: function() {
7361
- return util_1.createStatError;
7618
+ return util_1.nullCheck;
7362
7619
  }
7363
7620
  });
7364
7621
  Object.defineProperty(exports, "pathToFilename", {
@@ -7373,6 +7630,38 @@ var require_lib$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
7373
7630
  return util_1.resolve;
7374
7631
  }
7375
7632
  });
7633
+ var errors_1 = require_errors$1();
7634
+ Object.defineProperty(exports, "createError", {
7635
+ enumerable: true,
7636
+ get: function() {
7637
+ return errors_1.createError;
7638
+ }
7639
+ });
7640
+ Object.defineProperty(exports, "createStatError", {
7641
+ enumerable: true,
7642
+ get: function() {
7643
+ return errors_1.createStatError;
7644
+ }
7645
+ });
7646
+ Object.defineProperty(exports, "createEisdirError", {
7647
+ enumerable: true,
7648
+ get: function() {
7649
+ return errors_1.createEisdirError;
7650
+ }
7651
+ });
7652
+ Object.defineProperty(exports, "createWatchError", {
7653
+ enumerable: true,
7654
+ get: function() {
7655
+ return errors_1.createWatchError;
7656
+ }
7657
+ });
7658
+ var SystemError_1 = require_SystemError();
7659
+ Object.defineProperty(exports, "SystemError", {
7660
+ enumerable: true,
7661
+ get: function() {
7662
+ return SystemError_1.SystemError;
7663
+ }
7664
+ });
7376
7665
  }));
7377
7666
  //#endregion
7378
7667
  //#region ../node_modules/@jsonjoy.com/fs-node/lib/Stats.js
@@ -12592,26 +12881,51 @@ var require_events = /* @__PURE__ */ __commonJSMin(((exports) => {
12592
12881
  //#endregion
12593
12882
  //#region ../node_modules/@jsonjoy.com/fs-node/lib/util.js
12594
12883
  var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
12595
- var import_browser$3 = /* @__PURE__ */ __toESM(require_browser$2());
12596
12884
  Object.defineProperty(exports, "__esModule", { value: true });
12597
- exports.getWriteSyncArgs = exports.getWriteArgs = exports.bufToUint8 = void 0;
12885
+ exports.getWriteSyncArgs = exports.getWriteArgs = exports.bufToUint8 = exports.createWatchError = exports.createStatError = exports.createError = exports.pathToFilename = exports.nullCheck = void 0;
12598
12886
  exports.promisify = promisify;
12599
12887
  exports.validateCallback = validateCallback;
12600
12888
  exports.modeToNumber = modeToNumber;
12601
- exports.nullCheck = nullCheck;
12602
- exports.pathToFilename = pathToFilename;
12603
- exports.createError = createError;
12604
- exports.createStatError = createStatError;
12605
12889
  exports.genRndStr6 = genRndStr6;
12606
12890
  exports.flagsToNumber = flagsToNumber;
12607
12891
  exports.streamToBuffer = streamToBuffer;
12608
12892
  exports.bufferToEncoding = bufferToEncoding;
12609
12893
  exports.isReadableStream = isReadableStream;
12610
12894
  const fs_node_utils_1 = require_lib$7();
12611
- const errors = require_errors$1();
12895
+ const errors = require_errors$2();
12612
12896
  const buffer_1 = require_buffer();
12613
12897
  const fs_core_1 = require_lib$5();
12614
- const util_1 = require_util$3();
12898
+ var fs_core_2 = require_lib$5();
12899
+ Object.defineProperty(exports, "nullCheck", {
12900
+ enumerable: true,
12901
+ get: function() {
12902
+ return fs_core_2.nullCheck;
12903
+ }
12904
+ });
12905
+ Object.defineProperty(exports, "pathToFilename", {
12906
+ enumerable: true,
12907
+ get: function() {
12908
+ return fs_core_2.pathToFilename;
12909
+ }
12910
+ });
12911
+ Object.defineProperty(exports, "createError", {
12912
+ enumerable: true,
12913
+ get: function() {
12914
+ return fs_core_2.createError;
12915
+ }
12916
+ });
12917
+ Object.defineProperty(exports, "createStatError", {
12918
+ enumerable: true,
12919
+ get: function() {
12920
+ return fs_core_2.createStatError;
12921
+ }
12922
+ });
12923
+ Object.defineProperty(exports, "createWatchError", {
12924
+ enumerable: true,
12925
+ get: function() {
12926
+ return fs_core_2.createWatchError;
12927
+ }
12928
+ });
12615
12929
  function promisify(fs, fn, getResult = (input) => input) {
12616
12930
  return (...args) => new Promise((resolve, reject) => {
12617
12931
  fs[fn].bind(fs)(...args, (error, result) => {
@@ -12634,97 +12948,6 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
12634
12948
  if (typeof result !== "number" || isNaN(result)) throw new TypeError(fs_node_utils_1.ERRSTR.MODE_INT);
12635
12949
  return result;
12636
12950
  }
12637
- function nullCheck(path, callback) {
12638
- if (("" + path).indexOf("\0") !== -1) {
12639
- const er = /* @__PURE__ */ new Error("Path must be a string without null bytes");
12640
- er.code = "ENOENT";
12641
- if (typeof callback !== "function") throw er;
12642
- queueMicrotask(() => {
12643
- callback(er);
12644
- });
12645
- return false;
12646
- }
12647
- return true;
12648
- }
12649
- function getPathFromURLPosix(url) {
12650
- if (url.hostname !== "") throw new errors.TypeError("ERR_INVALID_FILE_URL_HOST", import_browser$3.default.platform);
12651
- const pathname = url.pathname;
12652
- for (let n = 0; n < pathname.length; n++) if (pathname[n] === "%") {
12653
- const third = pathname.codePointAt(n + 2) | 32;
12654
- if (pathname[n + 1] === "2" && third === 102) throw new errors.TypeError("ERR_INVALID_FILE_URL_PATH", "must not include encoded / characters");
12655
- }
12656
- const filepath = decodeURIComponent(pathname);
12657
- return util_1.isWin ? filepath.replace(/^\/([a-zA-Z]:)/, "$1") : filepath;
12658
- }
12659
- function pathToFilename(path) {
12660
- if (path instanceof Uint8Array) path = (0, buffer_1.bufferFrom)(path);
12661
- if (typeof path !== "string" && !buffer_1.Buffer.isBuffer(path)) {
12662
- try {
12663
- if (!(path instanceof require_url().URL)) throw new TypeError(fs_node_utils_1.ERRSTR.PATH_STR);
12664
- } catch (err) {
12665
- throw new TypeError(fs_node_utils_1.ERRSTR.PATH_STR);
12666
- }
12667
- path = getPathFromURLPosix(path);
12668
- }
12669
- const pathString = String(path);
12670
- nullCheck(pathString);
12671
- return pathString;
12672
- }
12673
- const ENOENT = "ENOENT";
12674
- const EBADF = "EBADF";
12675
- const EINVAL = "EINVAL";
12676
- const EPERM = "EPERM";
12677
- const EPROTO = "EPROTO";
12678
- const EEXIST = "EEXIST";
12679
- const ENOTDIR = "ENOTDIR";
12680
- const EMFILE = "EMFILE";
12681
- const EACCES = "EACCES";
12682
- const EISDIR = "EISDIR";
12683
- const ENOTEMPTY = "ENOTEMPTY";
12684
- const ENOSYS = "ENOSYS";
12685
- const ERR_FS_EISDIR = "ERR_FS_EISDIR";
12686
- const ERR_OUT_OF_RANGE = "ERR_OUT_OF_RANGE";
12687
- function formatError(errorCode, func = "", path = "", path2 = "") {
12688
- let pathFormatted = "";
12689
- if (path) pathFormatted = ` '${path}'`;
12690
- if (path2) pathFormatted += ` -> '${path2}'`;
12691
- switch (errorCode) {
12692
- case ENOENT: return `ENOENT: no such file or directory, ${func}${pathFormatted}`;
12693
- case EBADF: return `EBADF: bad file descriptor, ${func}${pathFormatted}`;
12694
- case EINVAL: return `EINVAL: invalid argument, ${func}${pathFormatted}`;
12695
- case EPERM: return `EPERM: operation not permitted, ${func}${pathFormatted}`;
12696
- case EPROTO: return `EPROTO: protocol error, ${func}${pathFormatted}`;
12697
- case EEXIST: return `EEXIST: file already exists, ${func}${pathFormatted}`;
12698
- case ENOTDIR: return `ENOTDIR: not a directory, ${func}${pathFormatted}`;
12699
- case EISDIR: return `EISDIR: illegal operation on a directory, ${func}${pathFormatted}`;
12700
- case EACCES: return `EACCES: permission denied, ${func}${pathFormatted}`;
12701
- case ENOTEMPTY: return `ENOTEMPTY: directory not empty, ${func}${pathFormatted}`;
12702
- case EMFILE: return `EMFILE: too many open files, ${func}${pathFormatted}`;
12703
- case ENOSYS: return `ENOSYS: function not implemented, ${func}${pathFormatted}`;
12704
- case ERR_FS_EISDIR: return `[ERR_FS_EISDIR]: Path is a directory: ${func} returned EISDIR (is a directory) ${path}`;
12705
- case ERR_OUT_OF_RANGE: return `[ERR_OUT_OF_RANGE]: value out of range, ${func}${pathFormatted}`;
12706
- default: return `${errorCode}: error occurred, ${func}${pathFormatted}`;
12707
- }
12708
- }
12709
- function createError(errorCode, func = "", path = "", path2 = "", Constructor = Error) {
12710
- const error = new Constructor(formatError(errorCode, func, path, path2));
12711
- error.code = errorCode;
12712
- if (path) error.path = path;
12713
- return error;
12714
- }
12715
- function createStatError(errorCode, func = "", path = "", path2 = "") {
12716
- return {
12717
- code: errorCode,
12718
- message: formatError(errorCode, func, path, path2),
12719
- path,
12720
- toError() {
12721
- const error = new Error(this.message);
12722
- error.code = this.code;
12723
- if (this.path) error.path = this.path;
12724
- return error;
12725
- }
12726
- };
12727
- }
12728
12951
  function genRndStr6() {
12729
12952
  return Math.random().toString(36).slice(2, 8).padEnd(6, "0");
12730
12953
  }
@@ -16183,7 +16406,7 @@ var require_Dir = /* @__PURE__ */ __commonJSMin(((exports) => {
16183
16406
  exports.Dir = void 0;
16184
16407
  const util_1 = require_util$1();
16185
16408
  const Dirent_1 = require_Dirent();
16186
- const errors = require_errors$1();
16409
+ const errors = require_errors$2();
16187
16410
  /**
16188
16411
  * A directory stream, like `fs.Dir`.
16189
16412
  */
@@ -16335,9 +16558,8 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports) => {
16335
16558
  exports.globSync = globSync;
16336
16559
  const path_1 = require_path$1();
16337
16560
  const glob_to_regex_js_1 = require_lib$8();
16561
+ const fs_node_utils_1 = require_lib$7();
16338
16562
  const util_1 = require_util$1();
16339
- const pathJoin = path_1.posix.join;
16340
- const pathRelative = path_1.posix.relative;
16341
16563
  const pathResolve = path_1.posix.resolve;
16342
16564
  /**
16343
16565
  * Check if a path matches a glob pattern
@@ -16364,8 +16586,8 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports) => {
16364
16586
  try {
16365
16587
  const entries = fs.readdirSync(dir, { withFileTypes: true });
16366
16588
  for (const entry of entries) {
16367
- const fullPath = pathJoin(dir, entry.name.toString());
16368
- const relativePath = pathRelative(baseCwd, fullPath);
16589
+ const fullPath = (0, fs_node_utils_1.pathJoin)(dir, entry.name.toString());
16590
+ const relativePath = (0, fs_node_utils_1.pathRelative)(baseCwd, fullPath);
16369
16591
  if (isExcluded(relativePath, options.exclude)) continue;
16370
16592
  if (patterns.some((pattern) => matchesPattern(relativePath, pattern))) results.push(relativePath);
16371
16593
  if (entry.isDirectory() && currentDepth < maxDepth) {
@@ -16414,7 +16636,6 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16414
16636
  exports.toUnixTimestamp = toUnixTimestamp;
16415
16637
  const path_1 = require_path$1();
16416
16638
  const fs_core_1 = require_lib$5();
16417
- const util_1 = require_util$3();
16418
16639
  const Stats_1 = require_Stats();
16419
16640
  const Dirent_1 = require_Dirent();
16420
16641
  const StatFs_1 = require_StatFs();
@@ -16424,25 +16645,20 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16424
16645
  const fs_node_utils_1 = require_lib$7();
16425
16646
  const events_1 = require_events();
16426
16647
  const FileHandle_1 = require_FileHandle();
16427
- const util_2 = require_util$4();
16648
+ const util_1 = require_util$4();
16428
16649
  const FsPromises_1 = require_FsPromises();
16429
16650
  const fs_print_1 = require_lib$3();
16430
16651
  const fsSnapshot = require_lib$2();
16431
16652
  const fs_node_utils_2 = require_lib$7();
16432
- const errors = require_errors$1();
16653
+ const errors = require_errors$2();
16433
16654
  const options_1 = require_options();
16434
- const util_3 = require_util$1();
16655
+ const util_2 = require_util$1();
16435
16656
  const Dir_1 = require_Dir();
16436
16657
  const resolveCrossPlatform = path_1.resolve;
16437
16658
  const { O_SYMLINK, F_OK, R_OK, W_OK, X_OK, COPYFILE_EXCL, COPYFILE_FICLONE_FORCE } = fs_node_utils_1.constants;
16438
- const pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;
16439
- const pathRelative = path_1.posix ? path_1.posix.relative : path_1.relative;
16440
- const pathJoin = path_1.posix ? path_1.posix.join : path_1.join;
16441
- const pathDirname = path_1.posix ? path_1.posix.dirname : path_1.dirname;
16442
- const pathNormalize = path_1.posix ? path_1.posix.normalize : path_1.normalize;
16443
16659
  const kMinPoolSpace = 128;
16444
16660
  function pathToSteps(path) {
16445
- return (0, fs_core_1.filenameToSteps)((0, util_3.pathToFilename)(path));
16661
+ return (0, fs_core_1.filenameToSteps)((0, util_2.pathToFilename)(path));
16446
16662
  }
16447
16663
  function dataToStr(data, encoding = fs_node_utils_1.ENCODING_UTF8) {
16448
16664
  if (buffer_1.Buffer.isBuffer(data)) return data.toString(encoding);
@@ -16476,9 +16692,9 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16476
16692
  this._core = _core;
16477
16693
  this.promisesApi = new FsPromises_1.FsPromises(this, FileHandle_1.FileHandle);
16478
16694
  this.openSync = (path, flags, mode = 438) => {
16479
- const modeNum = (0, util_3.modeToNumber)(mode);
16480
- const fileName = (0, util_3.pathToFilename)(path);
16481
- const flagsNum = (0, util_3.flagsToNumber)(flags);
16695
+ const modeNum = (0, util_2.modeToNumber)(mode);
16696
+ const fileName = (0, util_2.pathToFilename)(path);
16697
+ const flagsNum = (0, util_2.flagsToNumber)(flags);
16482
16698
  return this._core.open(fileName, flagsNum, modeNum, !(flagsNum & O_SYMLINK));
16483
16699
  };
16484
16700
  this.open = (path, flags, a, b) => {
@@ -16489,9 +16705,9 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16489
16705
  callback = a;
16490
16706
  }
16491
16707
  mode = mode || 438;
16492
- const modeNum = (0, util_3.modeToNumber)(mode);
16493
- const fileName = (0, util_3.pathToFilename)(path);
16494
- const flagsNum = (0, util_3.flagsToNumber)(flags);
16708
+ const modeNum = (0, util_2.modeToNumber)(mode);
16709
+ const fileName = (0, util_2.pathToFilename)(path);
16710
+ const flagsNum = (0, util_2.flagsToNumber)(flags);
16495
16711
  this.wrapAsync(this._core.open, [
16496
16712
  fileName,
16497
16713
  flagsNum,
@@ -16512,7 +16728,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16512
16728
  return this._core.read(fd, buffer, offset, length, position);
16513
16729
  };
16514
16730
  this.read = (fd, buffer, offset, length, position, callback) => {
16515
- (0, util_3.validateCallback)(callback);
16731
+ (0, util_2.validateCallback)(callback);
16516
16732
  if (length === 0) return queueMicrotask(() => {
16517
16733
  if (callback) callback(null, 0, buffer);
16518
16734
  });
@@ -16528,7 +16744,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16528
16744
  let position = a;
16529
16745
  let callback = b;
16530
16746
  if (typeof a === "function") [position, callback] = [null, a];
16531
- (0, util_3.validateCallback)(callback);
16747
+ (0, util_2.validateCallback)(callback);
16532
16748
  Promise.resolve().then(() => {
16533
16749
  try {
16534
16750
  const bytes = this._core.readv(fd, buffers, position);
@@ -16547,18 +16763,11 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16547
16763
  const userOwnsFd = typeof id === "number" && (0, fs_core_1.isFd)(id);
16548
16764
  let fd;
16549
16765
  if (userOwnsFd) fd = id;
16550
- else {
16551
- const filename = (0, util_3.pathToFilename)(id);
16552
- const originalPath = String(id);
16553
- const hasTrailingSlash = originalPath.length > 1 && originalPath.endsWith("/");
16554
- const link = this._core.getResolvedLinkOrThrow(filename, "open");
16555
- const node = link.getNode();
16556
- if (node.isDirectory()) throw (0, util_3.createError)("EISDIR", "open", link.getPath());
16557
- if (hasTrailingSlash && node.isFile()) throw (0, util_3.createError)("ENOTDIR", "open", originalPath);
16558
- fd = this.openSync(id, flagsNum);
16559
- }
16766
+ else fd = this.openSync(id, flagsNum);
16560
16767
  try {
16561
- result = (0, util_3.bufferToEncoding)(this._core.getFileByFdOrThrow(fd).getBuffer(), encoding);
16768
+ const file = this._core.getFileByFdOrThrow(fd, "fstat");
16769
+ if (file.node.isDirectory()) throw userOwnsFd ? (0, util_2.createError)("EISDIR", "read") : (0, util_2.createError)("EISDIR", "open", (0, util_2.pathToFilename)(id));
16770
+ result = (0, util_2.bufferToEncoding)(file.getBuffer(), encoding);
16562
16771
  } finally {
16563
16772
  if (!userOwnsFd) this.closeSync(fd);
16564
16773
  }
@@ -16566,12 +16775,12 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16566
16775
  };
16567
16776
  this.readFileSync = (file, options) => {
16568
16777
  const opts = (0, options_1.getReadFileOptions)(options);
16569
- const flagsNum = (0, util_3.flagsToNumber)(opts.flag);
16778
+ const flagsNum = (0, util_2.flagsToNumber)(opts.flag);
16570
16779
  return this._readfile(file, flagsNum, opts.encoding);
16571
16780
  };
16572
16781
  this.readFile = (id, a, b) => {
16573
16782
  const [opts, callback] = (0, options_1.optsAndCbGenerator)(options_1.getReadFileOptions)(a, b);
16574
- const flagsNum = (0, util_3.flagsToNumber)(opts.flag);
16783
+ const flagsNum = (0, util_2.flagsToNumber)(opts.flag);
16575
16784
  this.wrapAsync(this._readfile, [
16576
16785
  id,
16577
16786
  flagsNum,
@@ -16579,11 +16788,11 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16579
16788
  ], callback);
16580
16789
  };
16581
16790
  this.writeSync = (fd, a, b, c, d) => {
16582
- const [, buf, offset, length, position] = (0, util_3.getWriteSyncArgs)(fd, a, b, c, d);
16791
+ const [, buf, offset, length, position] = (0, util_2.getWriteSyncArgs)(fd, a, b, c, d);
16583
16792
  return this._write(fd, buf, offset, length, position);
16584
16793
  };
16585
16794
  this.write = (fd, a, b, c, d, e) => {
16586
- const [, asStr, buf, offset, length, position, cb] = (0, util_3.getWriteArgs)(fd, a, b, c, d, e);
16795
+ const [, asStr, buf, offset, length, position, cb] = (0, util_2.getWriteArgs)(fd, a, b, c, d, e);
16587
16796
  Promise.resolve().then(() => {
16588
16797
  try {
16589
16798
  const bytes = this._write(fd, buf, offset, length, position);
@@ -16598,7 +16807,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16598
16807
  let position = a;
16599
16808
  let callback = b;
16600
16809
  if (typeof a === "function") [position, callback] = [null, a];
16601
- (0, util_3.validateCallback)(callback);
16810
+ (0, util_2.validateCallback)(callback);
16602
16811
  Promise.resolve().then(() => {
16603
16812
  try {
16604
16813
  const bytes = this.writevBase(fd, buffers, position);
@@ -16614,8 +16823,8 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16614
16823
  };
16615
16824
  this.writeFileSync = (id, data, options) => {
16616
16825
  const opts = (0, options_1.getWriteFileOptions)(options);
16617
- const flagsNum = (0, util_3.flagsToNumber)(opts.flag);
16618
- const modeNum = (0, util_3.modeToNumber)(opts.mode);
16826
+ const flagsNum = (0, util_2.flagsToNumber)(opts.flag);
16827
+ const modeNum = (0, util_2.modeToNumber)(opts.mode);
16619
16828
  const buf = (0, fs_core_1.dataToBuffer)(data, opts.encoding);
16620
16829
  this._core.writeFile(id, buf, flagsNum, modeNum);
16621
16830
  };
@@ -16623,10 +16832,10 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16623
16832
  let options = a;
16624
16833
  let callback = b;
16625
16834
  if (typeof a === "function") [options, callback] = [options_1.writeFileDefaults, a];
16626
- const cb = (0, util_3.validateCallback)(callback);
16835
+ const cb = (0, util_2.validateCallback)(callback);
16627
16836
  const opts = (0, options_1.getWriteFileOptions)(options);
16628
- const flagsNum = (0, util_3.flagsToNumber)(opts.flag);
16629
- const modeNum = (0, util_3.modeToNumber)(opts.mode);
16837
+ const flagsNum = (0, util_2.flagsToNumber)(opts.flag);
16838
+ const modeNum = (0, util_2.modeToNumber)(opts.mode);
16630
16839
  const buf = (0, fs_core_1.dataToBuffer)(data, opts.encoding);
16631
16840
  this.wrapAsync(this._core.writeFile, [
16632
16841
  id,
@@ -16636,18 +16845,18 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16636
16845
  ], cb);
16637
16846
  };
16638
16847
  this.copyFileSync = (src, dest, flags) => {
16639
- const srcFilename = (0, util_3.pathToFilename)(src);
16640
- const destFilename = (0, util_3.pathToFilename)(dest);
16848
+ const srcFilename = (0, util_2.pathToFilename)(src);
16849
+ const destFilename = (0, util_2.pathToFilename)(dest);
16641
16850
  return this._copyFile(srcFilename, destFilename, (flags || 0) | 0);
16642
16851
  };
16643
16852
  this.copyFile = (src, dest, a, b) => {
16644
- const srcFilename = (0, util_3.pathToFilename)(src);
16645
- const destFilename = (0, util_3.pathToFilename)(dest);
16853
+ const srcFilename = (0, util_2.pathToFilename)(src);
16854
+ const destFilename = (0, util_2.pathToFilename)(dest);
16646
16855
  let flags;
16647
16856
  let callback;
16648
16857
  if (typeof a === "function") [flags, callback] = [0, a];
16649
16858
  else [flags, callback] = [a, b];
16650
- (0, util_3.validateCallback)(callback);
16859
+ (0, util_2.validateCallback)(callback);
16651
16860
  this.wrapAsync(this._copyFile, [
16652
16861
  srcFilename,
16653
16862
  destFilename,
@@ -16663,39 +16872,39 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16663
16872
  } catch (err) {
16664
16873
  if (err.code !== "ENOENT") throw err;
16665
16874
  }
16666
- if (destStat && srcStat.ino === destStat.ino && srcStat.dev === destStat.dev) throw (0, util_3.createError)("EINVAL", "cp", src, dest);
16875
+ if (destStat && srcStat.ino === destStat.ino && srcStat.dev === destStat.dev) throw (0, util_2.createError)("EINVAL", "cp", src, dest);
16667
16876
  if (destStat) {
16668
- if (srcStat.isDirectory() && !destStat.isDirectory()) throw (0, util_3.createError)("EISDIR", "cp", src, dest);
16669
- if (!srcStat.isDirectory() && destStat.isDirectory()) throw (0, util_3.createError)("ENOTDIR", "cp", src, dest);
16877
+ if (srcStat.isDirectory() && !destStat.isDirectory()) throw (0, util_2.createError)("EISDIR", "cp", src, dest);
16878
+ if (!srcStat.isDirectory() && destStat.isDirectory()) throw (0, util_2.createError)("ENOTDIR", "cp", src, dest);
16670
16879
  }
16671
- if (srcStat.isDirectory() && this.isSrcSubdir(src, dest)) throw (0, util_3.createError)("EINVAL", "cp", src, dest);
16880
+ if (srcStat.isDirectory() && this.isSrcSubdir(src, dest)) throw (0, util_2.createError)("EINVAL", "cp", src, dest);
16672
16881
  ENDURE_PARENT_DIR_EXISTS: {
16673
- const parent = pathDirname(dest);
16882
+ const parent = (0, fs_node_utils_2.pathDirname)(dest);
16674
16883
  if (!this.existsSync(parent)) this.mkdirSync(parent, { recursive: true });
16675
16884
  }
16676
16885
  if (srcStat.isDirectory()) {
16677
- if (!options.recursive) throw (0, util_3.createError)("EISDIR", "cp", src);
16886
+ if (!options.recursive) throw (0, util_2.createError)("EISDIR", "cp", src);
16678
16887
  this.cpDirSync(srcStat, destStat, src, dest, options);
16679
16888
  } else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) this.cpFileSync(srcStat, destStat, src, dest, options);
16680
16889
  else if (srcStat.isSymbolicLink() && !options.dereference) this.cpSymlinkSync(destStat, src, dest, options);
16681
- else throw (0, util_3.createError)("EINVAL", "cp", src);
16890
+ else throw (0, util_2.createError)("EINVAL", "cp", src);
16682
16891
  };
16683
16892
  this.linkSync = (existingPath, newPath) => {
16684
- const existingPathFilename = (0, util_3.pathToFilename)(existingPath);
16685
- const newPathFilename = (0, util_3.pathToFilename)(newPath);
16893
+ const existingPathFilename = (0, util_2.pathToFilename)(existingPath);
16894
+ const newPathFilename = (0, util_2.pathToFilename)(newPath);
16686
16895
  this._core.link(existingPathFilename, newPathFilename);
16687
16896
  };
16688
16897
  this.link = (existingPath, newPath, callback) => {
16689
- const existingPathFilename = (0, util_3.pathToFilename)(existingPath);
16690
- const newPathFilename = (0, util_3.pathToFilename)(newPath);
16898
+ const existingPathFilename = (0, util_2.pathToFilename)(existingPath);
16899
+ const newPathFilename = (0, util_2.pathToFilename)(newPath);
16691
16900
  this.wrapAsync(this._core.link, [existingPathFilename, newPathFilename], callback);
16692
16901
  };
16693
16902
  this.unlinkSync = (path) => {
16694
- const filename = (0, util_3.pathToFilename)(path);
16903
+ const filename = (0, util_2.pathToFilename)(path);
16695
16904
  this._core.unlink(filename);
16696
16905
  };
16697
16906
  this.unlink = (path, callback) => {
16698
- const filename = (0, util_3.pathToFilename)(path);
16907
+ const filename = (0, util_2.pathToFilename)(path);
16699
16908
  this.wrapAsync(this._core.unlink, [filename], callback);
16700
16909
  };
16701
16910
  /**
@@ -16705,14 +16914,14 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16705
16914
  * @param type
16706
16915
  */
16707
16916
  this.symlinkSync = (target, path, type) => {
16708
- const targetFilename = (0, util_3.pathToFilename)(target);
16709
- const pathFilename = (0, util_3.pathToFilename)(path);
16917
+ const targetFilename = (0, util_2.pathToFilename)(target);
16918
+ const pathFilename = (0, util_2.pathToFilename)(path);
16710
16919
  this._core.symlink(targetFilename, pathFilename);
16711
16920
  };
16712
16921
  this.symlink = (target, path, a, b) => {
16713
- const callback = (0, util_3.validateCallback)(typeof a === "function" ? a : b);
16714
- const targetFilename = (0, util_3.pathToFilename)(target);
16715
- const pathFilename = (0, util_3.pathToFilename)(path);
16922
+ const callback = (0, util_2.validateCallback)(typeof a === "function" ? a : b);
16923
+ const targetFilename = (0, util_2.pathToFilename)(target);
16924
+ const pathFilename = (0, util_2.pathToFilename)(path);
16716
16925
  this.wrapAsync(this._core.symlink, [targetFilename, pathFilename], callback);
16717
16926
  };
16718
16927
  this._lstat = (filename, bigint = false, throwIfNoEntry = false) => {
@@ -16727,27 +16936,27 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16727
16936
  };
16728
16937
  this.lstatSync = (path, options) => {
16729
16938
  const { throwIfNoEntry = true, bigint = false } = (0, options_1.getStatOptions)(options);
16730
- return this._lstat((0, util_3.pathToFilename)(path), bigint, throwIfNoEntry);
16939
+ return this._lstat((0, util_2.pathToFilename)(path), bigint, throwIfNoEntry);
16731
16940
  };
16732
16941
  this.renameSync = (oldPath, newPath) => {
16733
- const oldPathFilename = (0, util_3.pathToFilename)(oldPath);
16734
- const newPathFilename = (0, util_3.pathToFilename)(newPath);
16942
+ const oldPathFilename = (0, util_2.pathToFilename)(oldPath);
16943
+ const newPathFilename = (0, util_2.pathToFilename)(newPath);
16735
16944
  this._core.rename(oldPathFilename, newPathFilename);
16736
16945
  };
16737
16946
  this.rename = (oldPath, newPath, callback) => {
16738
- const oldPathFilename = (0, util_3.pathToFilename)(oldPath);
16739
- const newPathFilename = (0, util_3.pathToFilename)(newPath);
16947
+ const oldPathFilename = (0, util_2.pathToFilename)(oldPath);
16948
+ const newPathFilename = (0, util_2.pathToFilename)(newPath);
16740
16949
  this.wrapAsync(this._core.rename, [oldPathFilename, newPathFilename], callback);
16741
16950
  };
16742
16951
  this.existsSync = (path) => {
16743
16952
  try {
16744
- return this._exists((0, util_3.pathToFilename)(path)).ok;
16953
+ return this._exists((0, util_2.pathToFilename)(path)).ok;
16745
16954
  } catch (err) {
16746
16955
  return false;
16747
16956
  }
16748
16957
  };
16749
16958
  this.exists = (path, callback) => {
16750
- const filename = (0, util_3.pathToFilename)(path);
16959
+ const filename = (0, util_2.pathToFilename)(path);
16751
16960
  if (typeof callback !== "function") throw Error(fs_node_utils_2.ERRSTR.CB);
16752
16961
  Promise.resolve().then(() => {
16753
16962
  try {
@@ -16758,16 +16967,16 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16758
16967
  });
16759
16968
  };
16760
16969
  this.accessSync = (path, mode = F_OK) => {
16761
- const filename = (0, util_3.pathToFilename)(path);
16970
+ const filename = (0, util_2.pathToFilename)(path);
16762
16971
  mode = mode | 0;
16763
16972
  this._access(filename, mode);
16764
16973
  };
16765
16974
  this.access = (path, a, b) => {
16766
16975
  let mode = F_OK;
16767
16976
  let callback;
16768
- if (typeof a !== "function") [mode, callback] = [a | 0, (0, util_3.validateCallback)(b)];
16977
+ if (typeof a !== "function") [mode, callback] = [a | 0, (0, util_2.validateCallback)(b)];
16769
16978
  else callback = a;
16770
- const filename = (0, util_3.pathToFilename)(path);
16979
+ const filename = (0, util_2.pathToFilename)(path);
16771
16980
  this.wrapAsync(this._access, [filename, mode], callback);
16772
16981
  };
16773
16982
  this.appendFileSync = (id, data, options) => {
@@ -16784,8 +16993,8 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16784
16993
  (0, fs_core_1.filenameToSteps)(filename);
16785
16994
  const link = this._core.getResolvedLinkOrThrow(filename, "scandir");
16786
16995
  const node = link.getNode();
16787
- if (!node.isDirectory()) throw (0, util_3.createError)("ENOTDIR", "scandir", filename);
16788
- if (!node.canRead()) throw (0, util_3.createError)("EACCES", "scandir", filename);
16996
+ if (!node.isDirectory()) throw (0, util_2.createError)("ENOTDIR", "scandir", filename);
16997
+ if (!node.canRead()) throw (0, util_2.createError)("EACCES", "scandir", filename);
16789
16998
  const list = [];
16790
16999
  for (const name of link.children.keys()) {
16791
17000
  const child = link.getChild(name);
@@ -16801,18 +17010,18 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16801
17010
  list.push(...childList);
16802
17011
  }
16803
17012
  }
16804
- if (!util_1.isWin && options.encoding !== "buffer") list.sort((a, b) => {
17013
+ if (!fs_core_1.isWin && options.encoding !== "buffer") list.sort((a, b) => {
16805
17014
  if (a.name < b.name) return -1;
16806
17015
  if (a.name > b.name) return 1;
16807
17016
  return 0;
16808
17017
  });
16809
17018
  if (options.withFileTypes) return list;
16810
17019
  let filename2 = filename;
16811
- if (util_1.isWin) filename2 = filename2.replace(/\\/g, "/");
17020
+ if (fs_core_1.isWin) filename2 = filename2.replace(/\\/g, "/");
16812
17021
  return list.map((dirent) => {
16813
17022
  if (options.recursive) {
16814
- let fullPath = pathJoin(dirent.parentPath, dirent.name.toString());
16815
- if (util_1.isWin) fullPath = fullPath.replace(/\\/g, "/");
17023
+ let fullPath = (0, fs_node_utils_2.pathJoin)(dirent.parentPath, dirent.name.toString());
17024
+ if (fs_core_1.isWin) fullPath = fullPath.replace(/\\/g, "/");
16816
17025
  return fullPath.replace(filename2 + path_1.posix.sep, "");
16817
17026
  }
16818
17027
  return dirent.name;
@@ -16820,27 +17029,27 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16820
17029
  };
16821
17030
  this.readdirSync = (path, options) => {
16822
17031
  const opts = (0, options_1.getReaddirOptions)(options);
16823
- const filename = (0, util_3.pathToFilename)(path);
17032
+ const filename = (0, util_2.pathToFilename)(path);
16824
17033
  return this._readdir(filename, opts);
16825
17034
  };
16826
17035
  this.readdir = (path, a, b) => {
16827
17036
  const [options, callback] = (0, options_1.getReaddirOptsAndCb)(a, b);
16828
- const filename = (0, util_3.pathToFilename)(path);
17037
+ const filename = (0, util_2.pathToFilename)(path);
16829
17038
  this.wrapAsync(this._readdir, [filename, options], callback);
16830
17039
  };
16831
17040
  this._readlink = (filename, encoding) => {
16832
17041
  const node = this._core.getLinkOrThrow(filename, "readlink").getNode();
16833
- if (!node.isSymlink()) throw (0, util_3.createError)("EINVAL", "readlink", filename);
17042
+ if (!node.isSymlink()) throw (0, util_2.createError)("EINVAL", "readlink", filename);
16834
17043
  return (0, fs_node_utils_1.strToEncoding)(node.symlink, encoding);
16835
17044
  };
16836
17045
  this.readlinkSync = (path, options) => {
16837
17046
  const opts = (0, options_1.getDefaultOpts)(options);
16838
- const filename = (0, util_3.pathToFilename)(path);
17047
+ const filename = (0, util_2.pathToFilename)(path);
16839
17048
  return this._readlink(filename, opts.encoding);
16840
17049
  };
16841
17050
  this.readlink = (path, a, b) => {
16842
17051
  const [opts, callback] = (0, options_1.getDefaultOptsAndCb)(a, b);
16843
- const filename = (0, util_3.pathToFilename)(path);
17052
+ const filename = (0, util_2.pathToFilename)(path);
16844
17053
  this.wrapAsync(this._readlink, [filename, opts.encoding], callback);
16845
17054
  };
16846
17055
  this._fsync = (fd) => {
@@ -16869,7 +17078,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16869
17078
  };
16870
17079
  this.ftruncate = (fd, a, b) => {
16871
17080
  const len = typeof a === "number" ? a : 0;
16872
- const callback = (0, util_3.validateCallback)(typeof a === "number" ? b : a);
17081
+ const callback = (0, util_2.validateCallback)(typeof a === "number" ? b : a);
16873
17082
  this.wrapAsync(this._ftruncate, [fd, len], callback);
16874
17083
  };
16875
17084
  this._truncate = (path, len) => {
@@ -16890,7 +17099,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16890
17099
  };
16891
17100
  this.truncate = (id, a, b) => {
16892
17101
  const len = typeof a === "number" ? a : 0;
16893
- const callback = (0, util_3.validateCallback)(typeof a === "number" ? b : a);
17102
+ const callback = (0, util_2.validateCallback)(typeof a === "number" ? b : a);
16894
17103
  if ((0, fs_core_1.isFd)(id)) return this.ftruncate(id, len, callback);
16895
17104
  this.wrapAsync(this._truncate, [id, len], callback);
16896
17105
  };
@@ -16911,22 +17120,22 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16911
17120
  this._core.utimes(filename, atime, mtime, followSymlinks);
16912
17121
  };
16913
17122
  this.utimesSync = (path, atime, mtime) => {
16914
- this._utimes((0, util_3.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), true);
17123
+ this._utimes((0, util_2.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), true);
16915
17124
  };
16916
17125
  this.utimes = (path, atime, mtime, callback) => {
16917
17126
  this.wrapAsync(this._utimes, [
16918
- (0, util_3.pathToFilename)(path),
17127
+ (0, util_2.pathToFilename)(path),
16919
17128
  toUnixTimestamp(atime),
16920
17129
  toUnixTimestamp(mtime),
16921
17130
  true
16922
17131
  ], callback);
16923
17132
  };
16924
17133
  this.lutimesSync = (path, atime, mtime) => {
16925
- this._utimes((0, util_3.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), false);
17134
+ this._utimes((0, util_2.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), false);
16926
17135
  };
16927
17136
  this.lutimes = (path, atime, mtime, callback) => {
16928
17137
  this.wrapAsync(this._utimes, [
16929
- (0, util_3.pathToFilename)(path),
17138
+ (0, util_2.pathToFilename)(path),
16930
17139
  toUnixTimestamp(atime),
16931
17140
  toUnixTimestamp(mtime),
16932
17141
  false
@@ -16934,21 +17143,21 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16934
17143
  };
16935
17144
  this.mkdirSync = (path, options) => {
16936
17145
  const opts = (0, options_1.getMkdirOptions)(options);
16937
- const modeNum = (0, util_3.modeToNumber)(opts.mode, 511);
16938
- const filename = (0, util_3.pathToFilename)(path);
17146
+ const modeNum = (0, util_2.modeToNumber)(opts.mode, 511);
17147
+ const filename = (0, util_2.pathToFilename)(path);
16939
17148
  if (opts.recursive) return this._core.mkdirp(filename, modeNum);
16940
17149
  this._core.mkdir(filename, modeNum);
16941
17150
  };
16942
17151
  this.mkdir = (path, a, b) => {
16943
17152
  const opts = (0, options_1.getMkdirOptions)(a);
16944
- const callback = (0, util_3.validateCallback)(typeof a === "function" ? a : b);
16945
- const modeNum = (0, util_3.modeToNumber)(opts.mode, 511);
16946
- const filename = (0, util_3.pathToFilename)(path);
17153
+ const callback = (0, util_2.validateCallback)(typeof a === "function" ? a : b);
17154
+ const modeNum = (0, util_2.modeToNumber)(opts.mode, 511);
17155
+ const filename = (0, util_2.pathToFilename)(path);
16947
17156
  if (opts.recursive) this.wrapAsync(this._core.mkdirp, [filename, modeNum], callback);
16948
17157
  else this.wrapAsync(this._core.mkdir, [filename, modeNum], callback);
16949
17158
  };
16950
17159
  this._mkdtemp = (prefix, encoding, retry = 5) => {
16951
- const filename = prefix + (0, util_3.genRndStr6)();
17160
+ const filename = prefix + (0, util_2.genRndStr6)();
16952
17161
  try {
16953
17162
  this._core.mkdir(filename, 511);
16954
17163
  return (0, fs_node_utils_1.strToEncoding)(filename, encoding);
@@ -16962,31 +17171,31 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16962
17171
  this.mkdtempSync = (prefix, options) => {
16963
17172
  const { encoding } = (0, options_1.getDefaultOpts)(options);
16964
17173
  if (!prefix || typeof prefix !== "string") throw new TypeError("filename prefix is required");
16965
- (0, util_3.nullCheck)(prefix);
17174
+ (0, util_2.nullCheck)(prefix);
16966
17175
  return this._mkdtemp(prefix, encoding);
16967
17176
  };
16968
17177
  this.mkdtemp = (prefix, a, b) => {
16969
17178
  const [{ encoding }, callback] = (0, options_1.getDefaultOptsAndCb)(a, b);
16970
17179
  if (!prefix || typeof prefix !== "string") throw new TypeError("filename prefix is required");
16971
- if (!(0, util_3.nullCheck)(prefix)) return;
17180
+ if (!(0, util_2.nullCheck)(prefix)) return;
16972
17181
  this.wrapAsync(this._mkdtemp, [prefix, encoding], callback);
16973
17182
  };
16974
17183
  this.rmdirSync = (path, options) => {
16975
17184
  const opts = (0, options_1.getRmdirOptions)(options);
16976
- this._core.rmdir((0, util_3.pathToFilename)(path), opts.recursive);
17185
+ this._core.rmdir((0, util_2.pathToFilename)(path), opts.recursive);
16977
17186
  };
16978
17187
  this.rmdir = (path, a, b) => {
16979
17188
  const opts = (0, options_1.getRmdirOptions)(a);
16980
- const callback = (0, util_3.validateCallback)(typeof a === "function" ? a : b);
16981
- this.wrapAsync(this._core.rmdir, [(0, util_3.pathToFilename)(path), opts.recursive], callback);
17189
+ const callback = (0, util_2.validateCallback)(typeof a === "function" ? a : b);
17190
+ this.wrapAsync(this._core.rmdir, [(0, util_2.pathToFilename)(path), opts.recursive], callback);
16982
17191
  };
16983
17192
  this.rmSync = (path, options) => {
16984
- this._core.rm((0, util_3.pathToFilename)(path), options?.force, options?.recursive);
17193
+ this._core.rm((0, util_2.pathToFilename)(path), options?.force, options?.recursive);
16985
17194
  };
16986
17195
  this.rm = (path, a, b) => {
16987
17196
  const [opts, callback] = (0, options_1.getRmOptsAndCb)(a, b);
16988
17197
  this.wrapAsync(this._core.rm, [
16989
- (0, util_3.pathToFilename)(path),
17198
+ (0, util_2.pathToFilename)(path),
16990
17199
  opts?.force,
16991
17200
  opts?.recursive
16992
17201
  ], callback);
@@ -16995,36 +17204,36 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
16995
17204
  this._core.fchmod(fd, modeNum);
16996
17205
  };
16997
17206
  this.fchmodSync = (fd, mode) => {
16998
- this._fchmod(fd, (0, util_3.modeToNumber)(mode));
17207
+ this._fchmod(fd, (0, util_2.modeToNumber)(mode));
16999
17208
  };
17000
17209
  this.fchmod = (fd, mode, callback) => {
17001
- this.wrapAsync(this._fchmod, [fd, (0, util_3.modeToNumber)(mode)], callback);
17210
+ this.wrapAsync(this._fchmod, [fd, (0, util_2.modeToNumber)(mode)], callback);
17002
17211
  };
17003
17212
  this._chmod = (filename, modeNum, followSymlinks = true) => {
17004
17213
  if (followSymlinks) this._core.chmod(filename, modeNum);
17005
17214
  else this._core.lchmod(filename, modeNum);
17006
17215
  };
17007
17216
  this.chmodSync = (path, mode) => {
17008
- const modeNum = (0, util_3.modeToNumber)(mode);
17009
- const filename = (0, util_3.pathToFilename)(path);
17217
+ const modeNum = (0, util_2.modeToNumber)(mode);
17218
+ const filename = (0, util_2.pathToFilename)(path);
17010
17219
  this._chmod(filename, modeNum, true);
17011
17220
  };
17012
17221
  this.chmod = (path, mode, callback) => {
17013
- const modeNum = (0, util_3.modeToNumber)(mode);
17014
- const filename = (0, util_3.pathToFilename)(path);
17222
+ const modeNum = (0, util_2.modeToNumber)(mode);
17223
+ const filename = (0, util_2.pathToFilename)(path);
17015
17224
  this.wrapAsync(this._chmod, [filename, modeNum], callback);
17016
17225
  };
17017
17226
  this._lchmod = (filename, modeNum) => {
17018
17227
  this._core.lchmod(filename, modeNum);
17019
17228
  };
17020
17229
  this.lchmodSync = (path, mode) => {
17021
- const modeNum = (0, util_3.modeToNumber)(mode);
17022
- const filename = (0, util_3.pathToFilename)(path);
17230
+ const modeNum = (0, util_2.modeToNumber)(mode);
17231
+ const filename = (0, util_2.pathToFilename)(path);
17023
17232
  this._lchmod(filename, modeNum);
17024
17233
  };
17025
17234
  this.lchmod = (path, mode, callback) => {
17026
- const modeNum = (0, util_3.modeToNumber)(mode);
17027
- const filename = (0, util_3.pathToFilename)(path);
17235
+ const modeNum = (0, util_2.modeToNumber)(mode);
17236
+ const filename = (0, util_2.pathToFilename)(path);
17028
17237
  this.wrapAsync(this._lchmod, [filename, modeNum], callback);
17029
17238
  };
17030
17239
  this._fchown = (fd, uid, gid) => {
@@ -17050,13 +17259,13 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17050
17259
  this.chownSync = (path, uid, gid) => {
17051
17260
  validateUid(uid);
17052
17261
  validateGid(gid);
17053
- this._chown((0, util_3.pathToFilename)(path), uid, gid);
17262
+ this._chown((0, util_2.pathToFilename)(path), uid, gid);
17054
17263
  };
17055
17264
  this.chown = (path, uid, gid, callback) => {
17056
17265
  validateUid(uid);
17057
17266
  validateGid(gid);
17058
17267
  this.wrapAsync(this._chown, [
17059
- (0, util_3.pathToFilename)(path),
17268
+ (0, util_2.pathToFilename)(path),
17060
17269
  uid,
17061
17270
  gid
17062
17271
  ], callback);
@@ -17067,21 +17276,21 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17067
17276
  this.lchownSync = (path, uid, gid) => {
17068
17277
  validateUid(uid);
17069
17278
  validateGid(gid);
17070
- this._lchown((0, util_3.pathToFilename)(path), uid, gid);
17279
+ this._lchown((0, util_2.pathToFilename)(path), uid, gid);
17071
17280
  };
17072
17281
  this.lchown = (path, uid, gid, callback) => {
17073
17282
  validateUid(uid);
17074
17283
  validateGid(gid);
17075
17284
  this.wrapAsync(this._lchown, [
17076
- (0, util_3.pathToFilename)(path),
17285
+ (0, util_2.pathToFilename)(path),
17077
17286
  uid,
17078
17287
  gid
17079
17288
  ], callback);
17080
17289
  };
17081
17290
  this.statWatchers = {};
17082
17291
  this.cpSync = (src, dest, options) => {
17083
- const srcFilename = (0, util_3.pathToFilename)(src);
17084
- const destFilename = (0, util_3.pathToFilename)(dest);
17292
+ const srcFilename = (0, util_2.pathToFilename)(src);
17293
+ const destFilename = (0, util_2.pathToFilename)(dest);
17085
17294
  const opts_ = {
17086
17295
  dereference: options?.dereference ?? false,
17087
17296
  errorOnExist: options?.errorOnExist ?? false,
@@ -17095,13 +17304,13 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17095
17304
  return this._cp(srcFilename, destFilename, opts_);
17096
17305
  };
17097
17306
  this.cp = (src, dest, a, b) => {
17098
- const srcFilename = (0, util_3.pathToFilename)(src);
17099
- const destFilename = (0, util_3.pathToFilename)(dest);
17307
+ const srcFilename = (0, util_2.pathToFilename)(src);
17308
+ const destFilename = (0, util_2.pathToFilename)(dest);
17100
17309
  let options;
17101
17310
  let callback;
17102
17311
  if (typeof a === "function") [options, callback] = [{}, a];
17103
17312
  else [options, callback] = [a || {}, b];
17104
- (0, util_3.validateCallback)(callback);
17313
+ (0, util_2.validateCallback)(callback);
17105
17314
  const opts_ = {
17106
17315
  dereference: options?.dereference ?? false,
17107
17316
  errorOnExist: options?.errorOnExist ?? false,
@@ -17119,7 +17328,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17119
17328
  ], callback);
17120
17329
  };
17121
17330
  this.openAsBlob = async (path, options) => {
17122
- const filename = (0, util_3.pathToFilename)(path);
17331
+ const filename = (0, util_2.pathToFilename)(path);
17123
17332
  let link;
17124
17333
  try {
17125
17334
  link = this._core.getResolvedLinkOrThrow(filename, "open");
@@ -17144,17 +17353,17 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17144
17353
  };
17145
17354
  this._opendir = (filename, options) => {
17146
17355
  const link = this._core.getResolvedLinkOrThrow(filename, "scandir");
17147
- if (!link.getNode().isDirectory()) throw (0, util_3.createError)("ENOTDIR", "scandir", filename);
17356
+ if (!link.getNode().isDirectory()) throw (0, util_2.createError)("ENOTDIR", "scandir", filename);
17148
17357
  return new Dir_1.Dir(link, options);
17149
17358
  };
17150
17359
  this.opendirSync = (path, options) => {
17151
17360
  const opts = (0, options_1.getOpendirOptions)(options);
17152
- const filename = (0, util_3.pathToFilename)(path);
17361
+ const filename = (0, util_2.pathToFilename)(path);
17153
17362
  return this._opendir(filename, opts);
17154
17363
  };
17155
17364
  this.opendir = (path, a, b) => {
17156
17365
  const [options, callback] = (0, options_1.getOpendirOptsAndCb)(a, b);
17157
- const filename = (0, util_3.pathToFilename)(path);
17366
+ const filename = (0, util_2.pathToFilename)(path);
17158
17367
  this.wrapAsync(this._opendir, [filename, options], callback);
17159
17368
  };
17160
17369
  const self = this;
@@ -17186,17 +17395,17 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17186
17395
  };
17187
17396
  const realpathImpl = (path, a, b) => {
17188
17397
  const [opts, callback] = (0, options_1.getRealpathOptsAndCb)(a, b);
17189
- const pathFilename = (0, util_3.pathToFilename)(path);
17398
+ const pathFilename = (0, util_2.pathToFilename)(path);
17190
17399
  self.wrapAsync(_realpath, [pathFilename, opts.encoding], callback);
17191
17400
  };
17192
- const realpathSyncImpl = (path, options) => _realpath((0, util_3.pathToFilename)(path), (0, options_1.getRealpathOptions)(options).encoding);
17401
+ const realpathSyncImpl = (path, options) => _realpath((0, util_2.pathToFilename)(path), (0, options_1.getRealpathOptions)(options).encoding);
17193
17402
  this.realpath = realpathImpl;
17194
17403
  this.realpath.native = realpathImpl;
17195
17404
  this.realpathSync = realpathSyncImpl;
17196
17405
  this.realpathSync.native = realpathSyncImpl;
17197
17406
  }
17198
17407
  wrapAsync(method, args, callback) {
17199
- (0, util_3.validateCallback)(callback);
17408
+ (0, util_2.validateCallback)(callback);
17200
17409
  Promise.resolve().then(() => {
17201
17410
  let result;
17202
17411
  try {
@@ -17227,7 +17436,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17227
17436
  return this._core.write(fd, buf, offset, length, position);
17228
17437
  }
17229
17438
  writevBase(fd, buffers, position) {
17230
- this._core.getFileByFdOrThrow(fd);
17439
+ this._core.getFileByFdOrThrow(fd, "write");
17231
17440
  let p = position ?? void 0;
17232
17441
  if (p === -1) p = void 0;
17233
17442
  let bytesWritten = 0;
@@ -17242,16 +17451,16 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17242
17451
  }
17243
17452
  _copyFile(src, dest, flags) {
17244
17453
  const buf = this.readFileSync(src);
17245
- if (flags & COPYFILE_EXCL && this.existsSync(dest)) throw (0, util_3.createError)("EEXIST", "copyFile", src, dest);
17246
- if (flags & COPYFILE_FICLONE_FORCE) throw (0, util_3.createError)("ENOSYS", "copyFile", src, dest);
17454
+ if (flags & COPYFILE_EXCL && this.existsSync(dest)) throw (0, util_2.createError)("EEXIST", "copyfile", src, dest);
17455
+ if (flags & COPYFILE_FICLONE_FORCE) throw (0, util_2.createError)("ENOSYS", "copyfile", src, dest);
17247
17456
  this._core.writeFile(dest, buf, fs_node_utils_2.FLAGS.w, 438);
17248
17457
  }
17249
17458
  isSrcSubdir(src, dest) {
17250
17459
  try {
17251
- const normalizedSrc = pathNormalize(src.startsWith("/") ? src : "/" + src);
17252
- const normalizedDest = pathNormalize(dest.startsWith("/") ? dest : "/" + dest);
17460
+ const normalizedSrc = (0, fs_node_utils_2.pathNormalize)(src.startsWith("/") ? src : "/" + src);
17461
+ const normalizedDest = (0, fs_node_utils_2.pathNormalize)(dest.startsWith("/") ? dest : "/" + dest);
17253
17462
  if (normalizedSrc === normalizedDest) return true;
17254
- const relativePath = pathRelative(normalizedSrc, normalizedDest);
17463
+ const relativePath = (0, fs_node_utils_2.pathRelative)(normalizedSrc, normalizedDest);
17255
17464
  return relativePath === "" || !relativePath.startsWith("..") && !(0, path_1.isAbsolute)(relativePath);
17256
17465
  } catch (error) {
17257
17466
  return false;
@@ -17259,7 +17468,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17259
17468
  }
17260
17469
  cpFileSync(srcStat, destStat, src, dest, options) {
17261
17470
  if (destStat) {
17262
- if (options.errorOnExist) throw (0, util_3.createError)("EEXIST", "cp", dest);
17471
+ if (options.errorOnExist) throw (0, util_2.createError)("EEXIST", "cp", dest);
17263
17472
  if (!options.force) return;
17264
17473
  this.unlinkSync(dest);
17265
17474
  }
@@ -17271,8 +17480,8 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17271
17480
  if (!destStat) this.mkdirSync(dest);
17272
17481
  const entries = this.readdirSync(src);
17273
17482
  for (const entry of entries) {
17274
- const srcItem = pathJoin(src, String(entry));
17275
- const destItem = pathJoin(dest, String(entry));
17483
+ const srcItem = (0, fs_node_utils_2.pathJoin)(src, String(entry));
17484
+ const destItem = (0, fs_node_utils_2.pathJoin)(dest, String(entry));
17276
17485
  if (options.filter && !options.filter(srcItem, destItem)) continue;
17277
17486
  this._cp(srcItem, destItem, options);
17278
17487
  }
@@ -17280,14 +17489,14 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17280
17489
  }
17281
17490
  cpSymlinkSync(destStat, src, dest, options) {
17282
17491
  let linkTarget = String(this.readlinkSync(src));
17283
- if (!options.verbatimSymlinks && !(0, path_1.isAbsolute)(linkTarget)) linkTarget = resolveCrossPlatform(pathDirname(src), linkTarget);
17492
+ if (!options.verbatimSymlinks && !(0, path_1.isAbsolute)(linkTarget)) linkTarget = resolveCrossPlatform((0, fs_node_utils_2.pathDirname)(src), linkTarget);
17284
17493
  if (destStat) this.unlinkSync(dest);
17285
17494
  this.symlinkSync(linkTarget, dest);
17286
17495
  }
17287
17496
  lstat(path, a, b) {
17288
17497
  const [{ throwIfNoEntry = true, bigint = false }, callback] = (0, options_1.getStatOptsAndCb)(a, b);
17289
17498
  this.wrapAsync(this._lstat, [
17290
- (0, util_3.pathToFilename)(path),
17499
+ (0, util_2.pathToFilename)(path),
17291
17500
  bigint,
17292
17501
  throwIfNoEntry
17293
17502
  ], callback);
@@ -17305,21 +17514,21 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17305
17514
  }
17306
17515
  statSync(path, options) {
17307
17516
  const { bigint = true, throwIfNoEntry = true } = (0, options_1.getStatOptions)(options);
17308
- const result = this._stat((0, util_3.pathToFilename)(path), bigint, throwIfNoEntry);
17517
+ const result = this._stat((0, util_2.pathToFilename)(path), bigint, throwIfNoEntry);
17309
17518
  if (result.ok) return result.value;
17310
17519
  else throw result.err.toError();
17311
17520
  }
17312
17521
  stat(path, a, b) {
17313
17522
  const [{ bigint = false, throwIfNoEntry = true }, callback] = (0, options_1.getStatOptsAndCb)(a, b);
17314
17523
  this.wrapAsync(this._statOrThrow, [
17315
- (0, util_3.pathToFilename)(path),
17524
+ (0, util_2.pathToFilename)(path),
17316
17525
  bigint,
17317
17526
  throwIfNoEntry
17318
17527
  ], callback);
17319
17528
  }
17320
17529
  fstatBase(fd, bigint = false) {
17321
17530
  const file = this._core.getFileByFd(fd);
17322
- if (!file) throw (0, util_3.createError)("EBADF", "fstat");
17531
+ if (!file) throw (0, util_2.createError)("EBADF", "fstat");
17323
17532
  return Stats_1.default.build(file.node, bigint);
17324
17533
  }
17325
17534
  fstatSync(fd, options) {
@@ -17336,12 +17545,12 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17336
17545
  _access(filename, mode) {
17337
17546
  const node = this._core.getResolvedLinkOrThrow(filename, "access").getNode();
17338
17547
  if (mode === F_OK) return;
17339
- if (mode & R_OK && !node.canRead()) throw (0, util_3.createError)("EACCES", "access", filename);
17340
- if (mode & W_OK && !node.canWrite()) throw (0, util_3.createError)("EACCES", "access", filename);
17341
- if (mode & X_OK && !node.canExecute()) throw (0, util_3.createError)("EACCES", "access", filename);
17548
+ if (mode & R_OK && !node.canRead()) throw (0, util_2.createError)("EACCES", "access", filename);
17549
+ if (mode & W_OK && !node.canWrite()) throw (0, util_2.createError)("EACCES", "access", filename);
17550
+ if (mode & X_OK && !node.canExecute()) throw (0, util_2.createError)("EACCES", "access", filename);
17342
17551
  }
17343
17552
  watchFile(path, a, b) {
17344
- const filename = (0, util_3.pathToFilename)(path);
17553
+ const filename = (0, util_2.pathToFilename)(path);
17345
17554
  let options = a;
17346
17555
  let listener = b;
17347
17556
  if (typeof options === "function") {
@@ -17371,7 +17580,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17371
17580
  return watcher;
17372
17581
  }
17373
17582
  unwatchFile(path, listener) {
17374
- const filename = (0, util_3.pathToFilename)(path);
17583
+ const filename = (0, util_2.pathToFilename)(path);
17375
17584
  const watcher = this.statWatchers[filename];
17376
17585
  if (!watcher) return;
17377
17586
  if (typeof listener === "function") watcher.removeListener("change", listener);
@@ -17388,7 +17597,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17388
17597
  return new this.WriteStream(path, options);
17389
17598
  }
17390
17599
  watch(path, options, listener) {
17391
- const filename = (0, util_3.pathToFilename)(path);
17600
+ const filename = (0, util_2.pathToFilename)(path);
17392
17601
  let givenOptions = options;
17393
17602
  if (typeof options === "function") {
17394
17603
  listener = options;
@@ -17421,11 +17630,11 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17421
17630
  }
17422
17631
  statfsSync(path, options) {
17423
17632
  const { bigint = false } = (0, options_1.getStatfsOptions)(options);
17424
- return this._statfs((0, util_3.pathToFilename)(path), bigint);
17633
+ return this._statfs((0, util_2.pathToFilename)(path), bigint);
17425
17634
  }
17426
17635
  statfs(path, a, b) {
17427
17636
  const [{ bigint = false }, callback] = (0, options_1.getStatfsOptsAndCb)(a, b);
17428
- this.wrapAsync(this._statfs, [(0, util_3.pathToFilename)(path), bigint], callback);
17637
+ this.wrapAsync(this._statfs, [(0, util_2.pathToFilename)(path), bigint], callback);
17429
17638
  }
17430
17639
  toTree(opts = { separator: path_1.sep }) {
17431
17640
  return (0, fs_print_1.toTreeSync)(this, opts);
@@ -17550,7 +17759,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17550
17759
  }
17551
17760
  }
17552
17761
  start(path, persistent = true, interval = 5007, bigint = false) {
17553
- this.filename = (0, util_3.pathToFilename)(path);
17762
+ this.filename = (0, util_2.pathToFilename)(path);
17554
17763
  this.setTimeout = persistent ? setTimeout.bind(typeof globalThis !== "undefined" ? globalThis : void 0) : setTimeoutUnref_1.default;
17555
17764
  this.interval = interval;
17556
17765
  this.bigint = bigint;
@@ -17598,7 +17807,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17598
17807
  pool = (0, buffer_1.bufferAllocUnsafe)(poolSize);
17599
17808
  pool.used = 0;
17600
17809
  }
17601
- (0, util_2.inherits)(FsReadStream, stream_1.Readable);
17810
+ (0, util_1.inherits)(FsReadStream, stream_1.Readable);
17602
17811
  exports.ReadStream = FsReadStream;
17603
17812
  function FsReadStream(vol, path, options) {
17604
17813
  if (!(this instanceof FsReadStream)) return new FsReadStream(vol, path, options);
@@ -17606,7 +17815,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17606
17815
  options = Object.assign({}, (0, options_1.getOptions)(options, {}));
17607
17816
  if (options.highWaterMark === void 0) options.highWaterMark = 65536;
17608
17817
  stream_1.Readable.call(this, options);
17609
- this.path = (0, util_3.pathToFilename)(path);
17818
+ this.path = (0, util_2.pathToFilename)(path);
17610
17819
  this._fileHandle = options.fd && typeof options.fd !== "number" ? options.fd : null;
17611
17820
  this.fd = options.fd === void 0 ? null : typeof options.fd !== "number" ? options.fd.fd : options.fd;
17612
17821
  this.flags = options.flags === void 0 ? "r" : options.flags;
@@ -17700,14 +17909,14 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17700
17909
  function closeOnOpen(fd) {
17701
17910
  this.close();
17702
17911
  }
17703
- (0, util_2.inherits)(FsWriteStream, stream_1.Writable);
17912
+ (0, util_1.inherits)(FsWriteStream, stream_1.Writable);
17704
17913
  exports.WriteStream = FsWriteStream;
17705
17914
  function FsWriteStream(vol, path, options) {
17706
17915
  if (!(this instanceof FsWriteStream)) return new FsWriteStream(vol, path, options);
17707
17916
  this._vol = vol;
17708
17917
  options = Object.assign({}, (0, options_1.getOptions)(options, {}));
17709
17918
  stream_1.Writable.call(this, options);
17710
- this.path = (0, util_3.pathToFilename)(path);
17919
+ this.path = (0, util_2.pathToFilename)(path);
17711
17920
  this._fileHandle = options.fd && typeof options.fd !== "number" ? options.fd : null;
17712
17921
  this.fd = options.fd === void 0 ? null : typeof options.fd !== "number" ? options.fd.fd : options.fd;
17713
17922
  this.flags = options.flags === void 0 ? "w" : options.flags;
@@ -17828,7 +18037,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17828
18037
  this._vol = vol;
17829
18038
  }
17830
18039
  _emit(type, relativeSteps) {
17831
- const filename = relativeSteps.length ? relativeSteps.join(pathSep) : this._watcher.link.getName();
18040
+ const filename = relativeSteps.length ? relativeSteps.join(fs_node_utils_2.pathSep) : this._watcher.link.getName();
17832
18041
  if (this._ignore && this._ignore(filename)) return;
17833
18042
  this.emit("change", type, (0, fs_node_utils_1.strToEncoding)(filename, this._encoding));
17834
18043
  }
@@ -17851,7 +18060,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17851
18060
  return this;
17852
18061
  }
17853
18062
  start(path, persistent = true, recursive = false, encoding = fs_node_utils_1.ENCODING_UTF8, ignore) {
17854
- this._filename = (0, util_3.pathToFilename)(path);
18063
+ this._filename = (0, util_2.pathToFilename)(path);
17855
18064
  this._steps = (0, fs_core_1.filenameToSteps)(this._filename);
17856
18065
  this._filenameEncoded = (0, fs_node_utils_1.strToEncoding)(this._filename);
17857
18066
  this._recursive = recursive;
@@ -17860,10 +18069,7 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17860
18069
  try {
17861
18070
  this._watcher = new fs_core_1.CoreWatcher(this._vol._core, this._filename, { recursive });
17862
18071
  } catch (err) {
17863
- const error = /* @__PURE__ */ new Error(`watch ${this._filename} ${err.code}`);
17864
- error.code = err.code;
17865
- error.errno = err.code;
17866
- throw error;
18072
+ throw (0, util_2.createWatchError)(err.code, this._filename);
17867
18073
  }
17868
18074
  this._link = this._watcher.link;
17869
18075
  this._watcher.changes.listen(this._onEvent);
@@ -17881,135 +18087,6 @@ var require_volume = /* @__PURE__ */ __commonJSMin(((exports) => {
17881
18087
  exports.FSWatcher = FSWatcher;
17882
18088
  }));
17883
18089
  //#endregion
17884
- //#region ../node_modules/@jsonjoy.com/fs-node/lib/lists/fsCallbackApiList.js
17885
- var require_fsCallbackApiList = /* @__PURE__ */ __commonJSMin(((exports) => {
17886
- Object.defineProperty(exports, "__esModule", { value: true });
17887
- exports.fsCallbackApiList = void 0;
17888
- exports.fsCallbackApiList = [
17889
- "access",
17890
- "appendFile",
17891
- "chmod",
17892
- "chown",
17893
- "close",
17894
- "copyFile",
17895
- "cp",
17896
- "createReadStream",
17897
- "createWriteStream",
17898
- "exists",
17899
- "fchmod",
17900
- "fchown",
17901
- "fdatasync",
17902
- "fstat",
17903
- "fsync",
17904
- "ftruncate",
17905
- "futimes",
17906
- "glob",
17907
- "lchmod",
17908
- "lchown",
17909
- "link",
17910
- "lstat",
17911
- "mkdir",
17912
- "mkdtemp",
17913
- "open",
17914
- "openAsBlob",
17915
- "opendir",
17916
- "read",
17917
- "readv",
17918
- "readdir",
17919
- "readFile",
17920
- "readlink",
17921
- "realpath",
17922
- "rename",
17923
- "rm",
17924
- "rmdir",
17925
- "stat",
17926
- "statfs",
17927
- "symlink",
17928
- "truncate",
17929
- "unlink",
17930
- "unwatchFile",
17931
- "utimes",
17932
- "lutimes",
17933
- "watch",
17934
- "watchFile",
17935
- "write",
17936
- "writev",
17937
- "writeFile"
17938
- ];
17939
- }));
17940
- //#endregion
17941
- //#region ../node_modules/@jsonjoy.com/fs-node/lib/lists/fsSynchronousApiList.js
17942
- var require_fsSynchronousApiList = /* @__PURE__ */ __commonJSMin(((exports) => {
17943
- Object.defineProperty(exports, "__esModule", { value: true });
17944
- exports.fsSynchronousApiList = void 0;
17945
- exports.fsSynchronousApiList = [
17946
- "accessSync",
17947
- "appendFileSync",
17948
- "chmodSync",
17949
- "chownSync",
17950
- "closeSync",
17951
- "copyFileSync",
17952
- "cpSync",
17953
- "existsSync",
17954
- "fchmodSync",
17955
- "fchownSync",
17956
- "fdatasyncSync",
17957
- "fstatSync",
17958
- "fsyncSync",
17959
- "ftruncateSync",
17960
- "futimesSync",
17961
- "globSync",
17962
- "lchmodSync",
17963
- "lchownSync",
17964
- "linkSync",
17965
- "lstatSync",
17966
- "mkdirSync",
17967
- "mkdtempSync",
17968
- "openSync",
17969
- "opendirSync",
17970
- "readdirSync",
17971
- "readFileSync",
17972
- "readlinkSync",
17973
- "readSync",
17974
- "readvSync",
17975
- "realpathSync",
17976
- "renameSync",
17977
- "rmdirSync",
17978
- "rmSync",
17979
- "statfsSync",
17980
- "statSync",
17981
- "symlinkSync",
17982
- "truncateSync",
17983
- "unlinkSync",
17984
- "utimesSync",
17985
- "lutimesSync",
17986
- "writeFileSync",
17987
- "writeSync",
17988
- "writevSync"
17989
- ];
17990
- }));
17991
- //#endregion
17992
- //#region ../node_modules/@jsonjoy.com/fs-node/lib/lists/fsCommonObjectsList.js
17993
- var require_fsCommonObjectsList = /* @__PURE__ */ __commonJSMin(((exports) => {
17994
- Object.defineProperty(exports, "__esModule", { value: true });
17995
- exports.fsCommonObjectsList = void 0;
17996
- exports.fsCommonObjectsList = [
17997
- "F_OK",
17998
- "R_OK",
17999
- "W_OK",
18000
- "X_OK",
18001
- "constants",
18002
- "Stats",
18003
- "StatFs",
18004
- "Dir",
18005
- "Dirent",
18006
- "StatWatcher",
18007
- "FSWatcher",
18008
- "ReadStream",
18009
- "WriteStream"
18010
- ];
18011
- }));
18012
- //#endregion
18013
18090
  //#region ../node_modules/@jsonjoy.com/fs-node/lib/index.js
18014
18091
  var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
18015
18092
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -18085,25 +18162,23 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
18085
18162
  tslib_1.__exportStar(require_options(), exports);
18086
18163
  tslib_1.__exportStar(require_util$1(), exports);
18087
18164
  tslib_1.__exportStar(require_glob(), exports);
18088
- var fsCallbackApiList_1 = require_fsCallbackApiList();
18165
+ var fs_node_utils_1 = require_lib$7();
18089
18166
  Object.defineProperty(exports, "fsCallbackApiList", {
18090
18167
  enumerable: true,
18091
18168
  get: function() {
18092
- return fsCallbackApiList_1.fsCallbackApiList;
18169
+ return fs_node_utils_1.fsCallbackApiList;
18093
18170
  }
18094
18171
  });
18095
- var fsSynchronousApiList_1 = require_fsSynchronousApiList();
18096
18172
  Object.defineProperty(exports, "fsSynchronousApiList", {
18097
18173
  enumerable: true,
18098
18174
  get: function() {
18099
- return fsSynchronousApiList_1.fsSynchronousApiList;
18175
+ return fs_node_utils_1.fsSynchronousApiList;
18100
18176
  }
18101
18177
  });
18102
- var fsCommonObjectsList_1 = require_fsCommonObjectsList();
18103
18178
  Object.defineProperty(exports, "fsCommonObjectsList", {
18104
18179
  enumerable: true,
18105
18180
  get: function() {
18106
- return fsCommonObjectsList_1.fsCommonObjectsList;
18181
+ return fs_node_utils_1.fsCommonObjectsList;
18107
18182
  }
18108
18183
  });
18109
18184
  }));