fullstacked 0.12.0-1173 → 0.12.0-1184

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 (500) hide show
  1. package/fullstacked_modules/@fullstacked/ai-agent/README.md +1 -0
  2. package/fullstacked_modules/@fullstacked/ai-agent/chat.json +1 -0
  3. package/fullstacked_modules/@fullstacked/ai-agent/index.scss +15 -0
  4. package/fullstacked_modules/@fullstacked/ai-agent/index.ts +92 -0
  5. package/fullstacked_modules/@fullstacked/ai-agent/lock.json +726 -0
  6. package/fullstacked_modules/@fullstacked/ai-agent/package.json +15 -0
  7. package/fullstacked_modules/@fullstacked/ai-agent/src/conversation.ts +169 -0
  8. package/fullstacked_modules/@fullstacked/ai-agent/src/default.scss +23 -0
  9. package/fullstacked_modules/@fullstacked/ai-agent/src/index.ts +3 -0
  10. package/fullstacked_modules/@fullstacked/ai-agent/src/input.ts +36 -0
  11. package/fullstacked_modules/@fullstacked/ai-agent/src/markdown.ts +46 -0
  12. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/interface.ts +6 -0
  13. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/ollama.ts +42 -0
  14. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/openai.ts +33 -0
  15. package/fullstacked_modules/@fullstacked/ai-agent/story.txt +7 -0
  16. package/fullstacked_modules/ai/index.d.ts +2 -0
  17. package/fullstacked_modules/ai/index.js +88268 -0
  18. package/fullstacked_modules/ai/index.ts +14 -0
  19. package/fullstacked_modules/ai/package.json +5 -0
  20. package/fullstacked_modules/ai/tools/fs.ts +60 -0
  21. package/{lib → fullstacked_modules}/archive/archive.ts +140 -140
  22. package/fullstacked_modules/archive/index.d.ts +2 -0
  23. package/{lib → fullstacked_modules}/archive/index.ts +4 -4
  24. package/{lib → fullstacked_modules}/base64.ts +144 -144
  25. package/fullstacked_modules/bridge/index.ts +120 -0
  26. package/{lib → fullstacked_modules}/bridge/platform/android.ts +18 -18
  27. package/{lib → fullstacked_modules}/bridge/platform/apple.ts +46 -46
  28. package/{lib → fullstacked_modules}/bridge/platform/electron.ts +14 -14
  29. package/{lib → fullstacked_modules}/bridge/platform/linux-gtk.ts +48 -48
  30. package/{lib → fullstacked_modules}/bridge/platform/linux-qt.ts +68 -68
  31. package/{lib → fullstacked_modules}/bridge/platform/node.ts +32 -32
  32. package/{lib → fullstacked_modules}/bridge/platform/wasm.ts +17 -17
  33. package/{lib → fullstacked_modules}/bridge/platform/windows.ts +49 -49
  34. package/{lib → fullstacked_modules}/bridge/serialization.ts +153 -153
  35. package/{lib → fullstacked_modules}/components/snackbar.ts +60 -60
  36. package/fullstacked_modules/config/config.ts +33 -0
  37. package/fullstacked_modules/config/index.ts +3 -0
  38. package/fullstacked_modules/connect/index.d.ts +2 -0
  39. package/{lib → fullstacked_modules}/connect/index.ts +125 -125
  40. package/{lib → fullstacked_modules}/core_message/core_message.ts +57 -76
  41. package/{lib → fullstacked_modules}/core_message/index.ts +3 -3
  42. package/fullstacked_modules/core_open.ts +9 -0
  43. package/fullstacked_modules/esbuild/esbuild.ts +101 -0
  44. package/fullstacked_modules/esbuild/index.ts +3 -0
  45. package/fullstacked_modules/esbuild/sass.ts +103 -0
  46. package/fullstacked_modules/fetch/index.d.ts +2 -0
  47. package/{lib → fullstacked_modules}/fetch/index.ts +332 -318
  48. package/{lib → fullstacked_modules}/fs/fs.ts +157 -157
  49. package/fullstacked_modules/fs/index.d.ts +2 -0
  50. package/{lib → fullstacked_modules}/fs/index.ts +3 -3
  51. package/fullstacked_modules/git/git.ts +238 -0
  52. package/fullstacked_modules/git/index.ts +3 -0
  53. package/fullstacked_modules/packages/index.ts +3 -0
  54. package/fullstacked_modules/packages/packages.ts +143 -0
  55. package/fullstacked_modules/platform/index.d.ts +2 -0
  56. package/{lib → fullstacked_modules}/platform/index.ts +14 -14
  57. package/fullstacked_modules/zod/LICENSE +21 -0
  58. package/fullstacked_modules/zod/README.md +208 -0
  59. package/fullstacked_modules/zod/index.d.cts +4 -0
  60. package/fullstacked_modules/zod/index.d.ts +4 -0
  61. package/fullstacked_modules/zod/locales/index.d.cts +1 -0
  62. package/fullstacked_modules/zod/locales/index.d.ts +1 -0
  63. package/fullstacked_modules/zod/mini/index.d.cts +1 -0
  64. package/fullstacked_modules/zod/mini/index.d.ts +1 -0
  65. package/fullstacked_modules/zod/package.json +134 -0
  66. package/fullstacked_modules/zod/src/index.ts +4 -0
  67. package/fullstacked_modules/zod/src/locales/index.ts +1 -0
  68. package/fullstacked_modules/zod/src/mini/index.ts +1 -0
  69. package/fullstacked_modules/zod/src/v3/ZodError.ts +330 -0
  70. package/fullstacked_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  71. package/fullstacked_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  72. package/fullstacked_modules/zod/src/v3/benchmarks/index.ts +59 -0
  73. package/fullstacked_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  74. package/fullstacked_modules/zod/src/v3/benchmarks/object.ts +69 -0
  75. package/fullstacked_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  76. package/fullstacked_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  77. package/fullstacked_modules/zod/src/v3/benchmarks/string.ts +55 -0
  78. package/fullstacked_modules/zod/src/v3/benchmarks/union.ts +80 -0
  79. package/fullstacked_modules/zod/src/v3/errors.ts +13 -0
  80. package/fullstacked_modules/zod/src/v3/external.ts +6 -0
  81. package/fullstacked_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  82. package/fullstacked_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  83. package/fullstacked_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  84. package/fullstacked_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  85. package/fullstacked_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  86. package/fullstacked_modules/zod/src/v3/helpers/util.ts +224 -0
  87. package/fullstacked_modules/zod/src/v3/index.ts +4 -0
  88. package/fullstacked_modules/zod/src/v3/locales/en.ts +124 -0
  89. package/fullstacked_modules/zod/src/v3/standard-schema.ts +113 -0
  90. package/fullstacked_modules/zod/src/v3/tests/Mocker.ts +54 -0
  91. package/fullstacked_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  92. package/fullstacked_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  93. package/fullstacked_modules/zod/src/v3/tests/array.test.ts +71 -0
  94. package/fullstacked_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  95. package/fullstacked_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  96. package/fullstacked_modules/zod/src/v3/tests/base.test.ts +29 -0
  97. package/fullstacked_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  98. package/fullstacked_modules/zod/src/v3/tests/branded.test.ts +53 -0
  99. package/fullstacked_modules/zod/src/v3/tests/catch.test.ts +220 -0
  100. package/fullstacked_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  101. package/fullstacked_modules/zod/src/v3/tests/complex.test.ts +56 -0
  102. package/fullstacked_modules/zod/src/v3/tests/custom.test.ts +31 -0
  103. package/fullstacked_modules/zod/src/v3/tests/date.test.ts +32 -0
  104. package/fullstacked_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  105. package/fullstacked_modules/zod/src/v3/tests/default.test.ts +112 -0
  106. package/fullstacked_modules/zod/src/v3/tests/description.test.ts +33 -0
  107. package/fullstacked_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  108. package/fullstacked_modules/zod/src/v3/tests/enum.test.ts +80 -0
  109. package/fullstacked_modules/zod/src/v3/tests/error.test.ts +551 -0
  110. package/fullstacked_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  111. package/fullstacked_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  112. package/fullstacked_modules/zod/src/v3/tests/function.test.ts +257 -0
  113. package/fullstacked_modules/zod/src/v3/tests/generics.test.ts +48 -0
  114. package/fullstacked_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  115. package/fullstacked_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  116. package/fullstacked_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  117. package/fullstacked_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  118. package/fullstacked_modules/zod/src/v3/tests/literal.test.ts +36 -0
  119. package/fullstacked_modules/zod/src/v3/tests/map.test.ts +110 -0
  120. package/fullstacked_modules/zod/src/v3/tests/masking.test.ts +4 -0
  121. package/fullstacked_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  122. package/fullstacked_modules/zod/src/v3/tests/nan.test.ts +21 -0
  123. package/fullstacked_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  124. package/fullstacked_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  125. package/fullstacked_modules/zod/src/v3/tests/number.test.ts +176 -0
  126. package/fullstacked_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  127. package/fullstacked_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  128. package/fullstacked_modules/zod/src/v3/tests/object.test.ts +434 -0
  129. package/fullstacked_modules/zod/src/v3/tests/optional.test.ts +42 -0
  130. package/fullstacked_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  131. package/fullstacked_modules/zod/src/v3/tests/parser.test.ts +41 -0
  132. package/fullstacked_modules/zod/src/v3/tests/partials.test.ts +243 -0
  133. package/fullstacked_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  134. package/fullstacked_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  135. package/fullstacked_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  136. package/fullstacked_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  137. package/fullstacked_modules/zod/src/v3/tests/promise.test.ts +90 -0
  138. package/fullstacked_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  139. package/fullstacked_modules/zod/src/v3/tests/record.test.ts +171 -0
  140. package/fullstacked_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  141. package/fullstacked_modules/zod/src/v3/tests/refine.test.ts +313 -0
  142. package/fullstacked_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  143. package/fullstacked_modules/zod/src/v3/tests/set.test.ts +142 -0
  144. package/fullstacked_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  145. package/fullstacked_modules/zod/src/v3/tests/string.test.ts +916 -0
  146. package/fullstacked_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  147. package/fullstacked_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  148. package/fullstacked_modules/zod/src/v3/tests/unions.test.ts +57 -0
  149. package/fullstacked_modules/zod/src/v3/tests/validations.test.ts +133 -0
  150. package/fullstacked_modules/zod/src/v3/tests/void.test.ts +15 -0
  151. package/fullstacked_modules/zod/src/v3/types.ts +5138 -0
  152. package/fullstacked_modules/zod/src/v4/classic/checks.ts +31 -0
  153. package/fullstacked_modules/zod/src/v4/classic/coerce.ts +27 -0
  154. package/fullstacked_modules/zod/src/v4/classic/compat.ts +70 -0
  155. package/fullstacked_modules/zod/src/v4/classic/errors.ts +82 -0
  156. package/fullstacked_modules/zod/src/v4/classic/external.ts +50 -0
  157. package/fullstacked_modules/zod/src/v4/classic/index.ts +5 -0
  158. package/fullstacked_modules/zod/src/v4/classic/iso.ts +90 -0
  159. package/fullstacked_modules/zod/src/v4/classic/parse.ts +33 -0
  160. package/fullstacked_modules/zod/src/v4/classic/schemas.ts +2031 -0
  161. package/fullstacked_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  162. package/fullstacked_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  163. package/fullstacked_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  164. package/fullstacked_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  165. package/fullstacked_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  166. package/fullstacked_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  167. package/fullstacked_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  168. package/fullstacked_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  169. package/fullstacked_modules/zod/src/v4/classic/tests/catch.test.ts +251 -0
  170. package/fullstacked_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  171. package/fullstacked_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  172. package/fullstacked_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  173. package/fullstacked_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  174. package/fullstacked_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  175. package/fullstacked_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  176. package/fullstacked_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  177. package/fullstacked_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  178. package/fullstacked_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
  179. package/fullstacked_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  180. package/fullstacked_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
  181. package/fullstacked_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  182. package/fullstacked_modules/zod/src/v4/classic/tests/file.test.ts +94 -0
  183. package/fullstacked_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  184. package/fullstacked_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  185. package/fullstacked_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  186. package/fullstacked_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  187. package/fullstacked_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  188. package/fullstacked_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  189. package/fullstacked_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  190. package/fullstacked_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  191. package/fullstacked_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  192. package/fullstacked_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  193. package/fullstacked_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  194. package/fullstacked_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  195. package/fullstacked_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  196. package/fullstacked_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  197. package/fullstacked_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
  198. package/fullstacked_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  199. package/fullstacked_modules/zod/src/v4/classic/tests/optional.test.ts +136 -0
  200. package/fullstacked_modules/zod/src/v4/classic/tests/partial.test.ts +340 -0
  201. package/fullstacked_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  202. package/fullstacked_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  203. package/fullstacked_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  204. package/fullstacked_modules/zod/src/v4/classic/tests/preprocess.test.ts +287 -0
  205. package/fullstacked_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  206. package/fullstacked_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  207. package/fullstacked_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  208. package/fullstacked_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  209. package/fullstacked_modules/zod/src/v4/classic/tests/record.test.ts +356 -0
  210. package/fullstacked_modules/zod/src/v4/classic/tests/recursive-types.test.ts +477 -0
  211. package/fullstacked_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  212. package/fullstacked_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  213. package/fullstacked_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  214. package/fullstacked_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  215. package/fullstacked_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  216. package/fullstacked_modules/zod/src/v4/classic/tests/string.test.ts +996 -0
  217. package/fullstacked_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  218. package/fullstacked_modules/zod/src/v4/classic/tests/template-literal.test.ts +761 -0
  219. package/fullstacked_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2341 -0
  220. package/fullstacked_modules/zod/src/v4/classic/tests/transform.test.ts +354 -0
  221. package/fullstacked_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  222. package/fullstacked_modules/zod/src/v4/classic/tests/union.test.ts +181 -0
  223. package/fullstacked_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  224. package/fullstacked_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  225. package/fullstacked_modules/zod/src/v4/core/api.ts +1628 -0
  226. package/fullstacked_modules/zod/src/v4/core/checks.ts +1285 -0
  227. package/fullstacked_modules/zod/src/v4/core/config.ts +15 -0
  228. package/fullstacked_modules/zod/src/v4/core/core.ts +134 -0
  229. package/fullstacked_modules/zod/src/v4/core/doc.ts +44 -0
  230. package/fullstacked_modules/zod/src/v4/core/errors.ts +423 -0
  231. package/fullstacked_modules/zod/src/v4/core/function.ts +176 -0
  232. package/fullstacked_modules/zod/src/v4/core/index.ts +15 -0
  233. package/fullstacked_modules/zod/src/v4/core/json-schema.ts +146 -0
  234. package/fullstacked_modules/zod/src/v4/core/parse.ts +94 -0
  235. package/fullstacked_modules/zod/src/v4/core/regexes.ts +138 -0
  236. package/fullstacked_modules/zod/src/v4/core/registries.ts +97 -0
  237. package/fullstacked_modules/zod/src/v4/core/schemas.ts +3900 -0
  238. package/fullstacked_modules/zod/src/v4/core/standard-schema.ts +64 -0
  239. package/fullstacked_modules/zod/src/v4/core/tests/extend.test.ts +18 -0
  240. package/fullstacked_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  241. package/fullstacked_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  242. package/fullstacked_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  243. package/fullstacked_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  244. package/fullstacked_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  245. package/fullstacked_modules/zod/src/v4/core/to-json-schema.ts +1004 -0
  246. package/fullstacked_modules/zod/src/v4/core/util.ts +827 -0
  247. package/fullstacked_modules/zod/src/v4/core/versions.ts +5 -0
  248. package/fullstacked_modules/zod/src/v4/core/zsf.ts +323 -0
  249. package/fullstacked_modules/zod/src/v4/index.ts +4 -0
  250. package/fullstacked_modules/zod/src/v4/locales/ar.ts +125 -0
  251. package/fullstacked_modules/zod/src/v4/locales/az.ts +121 -0
  252. package/fullstacked_modules/zod/src/v4/locales/be.ts +184 -0
  253. package/fullstacked_modules/zod/src/v4/locales/bg.ts +136 -0
  254. package/fullstacked_modules/zod/src/v4/locales/ca.ts +127 -0
  255. package/fullstacked_modules/zod/src/v4/locales/cs.ts +142 -0
  256. package/fullstacked_modules/zod/src/v4/locales/da.ts +141 -0
  257. package/fullstacked_modules/zod/src/v4/locales/de.ts +124 -0
  258. package/fullstacked_modules/zod/src/v4/locales/en.ts +127 -0
  259. package/fullstacked_modules/zod/src/v4/locales/eo.ts +125 -0
  260. package/fullstacked_modules/zod/src/v4/locales/es.ts +125 -0
  261. package/fullstacked_modules/zod/src/v4/locales/fa.ts +134 -0
  262. package/fullstacked_modules/zod/src/v4/locales/fi.ts +131 -0
  263. package/fullstacked_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  264. package/fullstacked_modules/zod/src/v4/locales/fr.ts +124 -0
  265. package/fullstacked_modules/zod/src/v4/locales/he.ts +125 -0
  266. package/fullstacked_modules/zod/src/v4/locales/hu.ts +126 -0
  267. package/fullstacked_modules/zod/src/v4/locales/id.ts +125 -0
  268. package/fullstacked_modules/zod/src/v4/locales/index.ts +42 -0
  269. package/fullstacked_modules/zod/src/v4/locales/is.ts +127 -0
  270. package/fullstacked_modules/zod/src/v4/locales/it.ts +125 -0
  271. package/fullstacked_modules/zod/src/v4/locales/ja.ts +122 -0
  272. package/fullstacked_modules/zod/src/v4/locales/kh.ts +126 -0
  273. package/fullstacked_modules/zod/src/v4/locales/ko.ts +131 -0
  274. package/fullstacked_modules/zod/src/v4/locales/mk.ts +127 -0
  275. package/fullstacked_modules/zod/src/v4/locales/ms.ts +124 -0
  276. package/fullstacked_modules/zod/src/v4/locales/nl.ts +126 -0
  277. package/fullstacked_modules/zod/src/v4/locales/no.ts +124 -0
  278. package/fullstacked_modules/zod/src/v4/locales/ota.ts +125 -0
  279. package/fullstacked_modules/zod/src/v4/locales/pl.ts +126 -0
  280. package/fullstacked_modules/zod/src/v4/locales/ps.ts +133 -0
  281. package/fullstacked_modules/zod/src/v4/locales/pt.ts +123 -0
  282. package/fullstacked_modules/zod/src/v4/locales/ru.ts +184 -0
  283. package/fullstacked_modules/zod/src/v4/locales/sl.ts +126 -0
  284. package/fullstacked_modules/zod/src/v4/locales/sv.ts +127 -0
  285. package/fullstacked_modules/zod/src/v4/locales/ta.ts +125 -0
  286. package/fullstacked_modules/zod/src/v4/locales/th.ts +126 -0
  287. package/fullstacked_modules/zod/src/v4/locales/tr.ts +121 -0
  288. package/fullstacked_modules/zod/src/v4/locales/ua.ts +126 -0
  289. package/fullstacked_modules/zod/src/v4/locales/ur.ts +126 -0
  290. package/fullstacked_modules/zod/src/v4/locales/vi.ts +125 -0
  291. package/fullstacked_modules/zod/src/v4/locales/yo.ts +131 -0
  292. package/fullstacked_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  293. package/fullstacked_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  294. package/fullstacked_modules/zod/src/v4/mini/checks.ts +32 -0
  295. package/fullstacked_modules/zod/src/v4/mini/coerce.ts +22 -0
  296. package/fullstacked_modules/zod/src/v4/mini/external.ts +40 -0
  297. package/fullstacked_modules/zod/src/v4/mini/index.ts +3 -0
  298. package/fullstacked_modules/zod/src/v4/mini/iso.ts +62 -0
  299. package/fullstacked_modules/zod/src/v4/mini/parse.ts +1 -0
  300. package/fullstacked_modules/zod/src/v4/mini/schemas.ts +1592 -0
  301. package/fullstacked_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  302. package/fullstacked_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  303. package/fullstacked_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  304. package/fullstacked_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  305. package/fullstacked_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  306. package/fullstacked_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  307. package/fullstacked_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  308. package/fullstacked_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  309. package/fullstacked_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  310. package/fullstacked_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  311. package/fullstacked_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  312. package/fullstacked_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  313. package/fullstacked_modules/zod/src/v4-mini/index.ts +1 -0
  314. package/fullstacked_modules/zod/v3/ZodError.d.cts +164 -0
  315. package/fullstacked_modules/zod/v3/ZodError.d.ts +164 -0
  316. package/fullstacked_modules/zod/v3/errors.d.cts +5 -0
  317. package/fullstacked_modules/zod/v3/errors.d.ts +5 -0
  318. package/fullstacked_modules/zod/v3/external.d.cts +6 -0
  319. package/fullstacked_modules/zod/v3/external.d.ts +6 -0
  320. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  321. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  322. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  323. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  324. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  325. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  326. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  327. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  328. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  329. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  330. package/fullstacked_modules/zod/v3/helpers/util.d.cts +85 -0
  331. package/fullstacked_modules/zod/v3/helpers/util.d.ts +85 -0
  332. package/fullstacked_modules/zod/v3/index.d.cts +4 -0
  333. package/fullstacked_modules/zod/v3/index.d.ts +4 -0
  334. package/fullstacked_modules/zod/v3/locales/en.d.cts +3 -0
  335. package/fullstacked_modules/zod/v3/locales/en.d.ts +3 -0
  336. package/fullstacked_modules/zod/v3/standard-schema.d.cts +102 -0
  337. package/fullstacked_modules/zod/v3/standard-schema.d.ts +102 -0
  338. package/fullstacked_modules/zod/v3/types.d.cts +1034 -0
  339. package/fullstacked_modules/zod/v3/types.d.ts +1034 -0
  340. package/fullstacked_modules/zod/v4/classic/checks.d.cts +1 -0
  341. package/fullstacked_modules/zod/v4/classic/checks.d.ts +1 -0
  342. package/fullstacked_modules/zod/v4/classic/coerce.d.cts +17 -0
  343. package/fullstacked_modules/zod/v4/classic/coerce.d.ts +17 -0
  344. package/fullstacked_modules/zod/v4/classic/compat.d.cts +50 -0
  345. package/fullstacked_modules/zod/v4/classic/compat.d.ts +50 -0
  346. package/fullstacked_modules/zod/v4/classic/errors.d.cts +30 -0
  347. package/fullstacked_modules/zod/v4/classic/errors.d.ts +30 -0
  348. package/fullstacked_modules/zod/v4/classic/external.d.cts +13 -0
  349. package/fullstacked_modules/zod/v4/classic/external.d.ts +13 -0
  350. package/fullstacked_modules/zod/v4/classic/index.d.cts +4 -0
  351. package/fullstacked_modules/zod/v4/classic/index.d.ts +4 -0
  352. package/fullstacked_modules/zod/v4/classic/iso.d.cts +22 -0
  353. package/fullstacked_modules/zod/v4/classic/iso.d.ts +22 -0
  354. package/fullstacked_modules/zod/v4/classic/parse.d.cts +23 -0
  355. package/fullstacked_modules/zod/v4/classic/parse.d.ts +23 -0
  356. package/fullstacked_modules/zod/v4/classic/schemas.d.cts +619 -0
  357. package/fullstacked_modules/zod/v4/classic/schemas.d.ts +619 -0
  358. package/fullstacked_modules/zod/v4/core/api.d.cts +296 -0
  359. package/fullstacked_modules/zod/v4/core/api.d.ts +296 -0
  360. package/fullstacked_modules/zod/v4/core/checks.d.cts +278 -0
  361. package/fullstacked_modules/zod/v4/core/checks.d.ts +278 -0
  362. package/fullstacked_modules/zod/v4/core/core.d.cts +49 -0
  363. package/fullstacked_modules/zod/v4/core/core.d.ts +49 -0
  364. package/fullstacked_modules/zod/v4/core/doc.d.cts +14 -0
  365. package/fullstacked_modules/zod/v4/core/doc.d.ts +14 -0
  366. package/fullstacked_modules/zod/v4/core/errors.d.cts +210 -0
  367. package/fullstacked_modules/zod/v4/core/errors.d.ts +210 -0
  368. package/fullstacked_modules/zod/v4/core/function.d.cts +52 -0
  369. package/fullstacked_modules/zod/v4/core/function.d.ts +52 -0
  370. package/fullstacked_modules/zod/v4/core/index.d.cts +15 -0
  371. package/fullstacked_modules/zod/v4/core/index.d.ts +15 -0
  372. package/fullstacked_modules/zod/v4/core/json-schema.d.cts +87 -0
  373. package/fullstacked_modules/zod/v4/core/json-schema.d.ts +87 -0
  374. package/fullstacked_modules/zod/v4/core/parse.d.cts +25 -0
  375. package/fullstacked_modules/zod/v4/core/parse.d.ts +25 -0
  376. package/fullstacked_modules/zod/v4/core/regexes.d.cts +62 -0
  377. package/fullstacked_modules/zod/v4/core/regexes.d.ts +62 -0
  378. package/fullstacked_modules/zod/v4/core/registries.d.cts +35 -0
  379. package/fullstacked_modules/zod/v4/core/registries.d.ts +35 -0
  380. package/fullstacked_modules/zod/v4/core/schemas.d.cts +1055 -0
  381. package/fullstacked_modules/zod/v4/core/schemas.d.ts +1055 -0
  382. package/fullstacked_modules/zod/v4/core/standard-schema.d.cts +55 -0
  383. package/fullstacked_modules/zod/v4/core/standard-schema.d.ts +55 -0
  384. package/fullstacked_modules/zod/v4/core/to-json-schema.d.cts +89 -0
  385. package/fullstacked_modules/zod/v4/core/to-json-schema.d.ts +89 -0
  386. package/fullstacked_modules/zod/v4/core/util.d.cts +185 -0
  387. package/fullstacked_modules/zod/v4/core/util.d.ts +185 -0
  388. package/fullstacked_modules/zod/v4/core/versions.d.cts +5 -0
  389. package/fullstacked_modules/zod/v4/core/versions.d.ts +5 -0
  390. package/fullstacked_modules/zod/v4/index.d.cts +3 -0
  391. package/fullstacked_modules/zod/v4/index.d.ts +3 -0
  392. package/fullstacked_modules/zod/v4/locales/ar.d.cts +5 -0
  393. package/fullstacked_modules/zod/v4/locales/ar.d.ts +4 -0
  394. package/fullstacked_modules/zod/v4/locales/az.d.cts +5 -0
  395. package/fullstacked_modules/zod/v4/locales/az.d.ts +4 -0
  396. package/fullstacked_modules/zod/v4/locales/be.d.cts +5 -0
  397. package/fullstacked_modules/zod/v4/locales/be.d.ts +4 -0
  398. package/fullstacked_modules/zod/v4/locales/bg.d.cts +5 -0
  399. package/fullstacked_modules/zod/v4/locales/bg.d.ts +5 -0
  400. package/fullstacked_modules/zod/v4/locales/ca.d.cts +5 -0
  401. package/fullstacked_modules/zod/v4/locales/ca.d.ts +4 -0
  402. package/fullstacked_modules/zod/v4/locales/cs.d.cts +5 -0
  403. package/fullstacked_modules/zod/v4/locales/cs.d.ts +4 -0
  404. package/fullstacked_modules/zod/v4/locales/da.d.cts +5 -0
  405. package/fullstacked_modules/zod/v4/locales/da.d.ts +4 -0
  406. package/fullstacked_modules/zod/v4/locales/de.d.cts +5 -0
  407. package/fullstacked_modules/zod/v4/locales/de.d.ts +4 -0
  408. package/fullstacked_modules/zod/v4/locales/en.d.cts +5 -0
  409. package/fullstacked_modules/zod/v4/locales/en.d.ts +5 -0
  410. package/fullstacked_modules/zod/v4/locales/eo.d.cts +5 -0
  411. package/fullstacked_modules/zod/v4/locales/eo.d.ts +5 -0
  412. package/fullstacked_modules/zod/v4/locales/es.d.cts +5 -0
  413. package/fullstacked_modules/zod/v4/locales/es.d.ts +4 -0
  414. package/fullstacked_modules/zod/v4/locales/fa.d.cts +5 -0
  415. package/fullstacked_modules/zod/v4/locales/fa.d.ts +4 -0
  416. package/fullstacked_modules/zod/v4/locales/fi.d.cts +5 -0
  417. package/fullstacked_modules/zod/v4/locales/fi.d.ts +4 -0
  418. package/fullstacked_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  419. package/fullstacked_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  420. package/fullstacked_modules/zod/v4/locales/fr.d.cts +5 -0
  421. package/fullstacked_modules/zod/v4/locales/fr.d.ts +4 -0
  422. package/fullstacked_modules/zod/v4/locales/he.d.cts +5 -0
  423. package/fullstacked_modules/zod/v4/locales/he.d.ts +4 -0
  424. package/fullstacked_modules/zod/v4/locales/hu.d.cts +5 -0
  425. package/fullstacked_modules/zod/v4/locales/hu.d.ts +4 -0
  426. package/fullstacked_modules/zod/v4/locales/id.d.cts +5 -0
  427. package/fullstacked_modules/zod/v4/locales/id.d.ts +4 -0
  428. package/fullstacked_modules/zod/v4/locales/index.d.cts +42 -0
  429. package/fullstacked_modules/zod/v4/locales/index.d.ts +42 -0
  430. package/fullstacked_modules/zod/v4/locales/is.d.cts +5 -0
  431. package/fullstacked_modules/zod/v4/locales/is.d.ts +5 -0
  432. package/fullstacked_modules/zod/v4/locales/it.d.cts +5 -0
  433. package/fullstacked_modules/zod/v4/locales/it.d.ts +4 -0
  434. package/fullstacked_modules/zod/v4/locales/ja.d.cts +5 -0
  435. package/fullstacked_modules/zod/v4/locales/ja.d.ts +4 -0
  436. package/fullstacked_modules/zod/v4/locales/kh.d.cts +5 -0
  437. package/fullstacked_modules/zod/v4/locales/kh.d.ts +4 -0
  438. package/fullstacked_modules/zod/v4/locales/ko.d.cts +5 -0
  439. package/fullstacked_modules/zod/v4/locales/ko.d.ts +4 -0
  440. package/fullstacked_modules/zod/v4/locales/mk.d.cts +5 -0
  441. package/fullstacked_modules/zod/v4/locales/mk.d.ts +4 -0
  442. package/fullstacked_modules/zod/v4/locales/ms.d.cts +5 -0
  443. package/fullstacked_modules/zod/v4/locales/ms.d.ts +4 -0
  444. package/fullstacked_modules/zod/v4/locales/nl.d.cts +5 -0
  445. package/fullstacked_modules/zod/v4/locales/nl.d.ts +4 -0
  446. package/fullstacked_modules/zod/v4/locales/no.d.cts +5 -0
  447. package/fullstacked_modules/zod/v4/locales/no.d.ts +4 -0
  448. package/fullstacked_modules/zod/v4/locales/ota.d.cts +5 -0
  449. package/fullstacked_modules/zod/v4/locales/ota.d.ts +4 -0
  450. package/fullstacked_modules/zod/v4/locales/pl.d.cts +5 -0
  451. package/fullstacked_modules/zod/v4/locales/pl.d.ts +4 -0
  452. package/fullstacked_modules/zod/v4/locales/ps.d.cts +5 -0
  453. package/fullstacked_modules/zod/v4/locales/ps.d.ts +4 -0
  454. package/fullstacked_modules/zod/v4/locales/pt.d.cts +5 -0
  455. package/fullstacked_modules/zod/v4/locales/pt.d.ts +4 -0
  456. package/fullstacked_modules/zod/v4/locales/ru.d.cts +5 -0
  457. package/fullstacked_modules/zod/v4/locales/ru.d.ts +4 -0
  458. package/fullstacked_modules/zod/v4/locales/sl.d.cts +5 -0
  459. package/fullstacked_modules/zod/v4/locales/sl.d.ts +4 -0
  460. package/fullstacked_modules/zod/v4/locales/sv.d.cts +5 -0
  461. package/fullstacked_modules/zod/v4/locales/sv.d.ts +4 -0
  462. package/fullstacked_modules/zod/v4/locales/ta.d.cts +5 -0
  463. package/fullstacked_modules/zod/v4/locales/ta.d.ts +4 -0
  464. package/fullstacked_modules/zod/v4/locales/th.d.cts +5 -0
  465. package/fullstacked_modules/zod/v4/locales/th.d.ts +4 -0
  466. package/fullstacked_modules/zod/v4/locales/tr.d.cts +5 -0
  467. package/fullstacked_modules/zod/v4/locales/tr.d.ts +5 -0
  468. package/fullstacked_modules/zod/v4/locales/ua.d.cts +5 -0
  469. package/fullstacked_modules/zod/v4/locales/ua.d.ts +4 -0
  470. package/fullstacked_modules/zod/v4/locales/ur.d.cts +5 -0
  471. package/fullstacked_modules/zod/v4/locales/ur.d.ts +4 -0
  472. package/fullstacked_modules/zod/v4/locales/vi.d.cts +5 -0
  473. package/fullstacked_modules/zod/v4/locales/vi.d.ts +4 -0
  474. package/fullstacked_modules/zod/v4/locales/yo.d.cts +5 -0
  475. package/fullstacked_modules/zod/v4/locales/yo.d.ts +4 -0
  476. package/fullstacked_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  477. package/fullstacked_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  478. package/fullstacked_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  479. package/fullstacked_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  480. package/fullstacked_modules/zod/v4/mini/checks.d.cts +1 -0
  481. package/fullstacked_modules/zod/v4/mini/checks.d.ts +1 -0
  482. package/fullstacked_modules/zod/v4/mini/coerce.d.cts +7 -0
  483. package/fullstacked_modules/zod/v4/mini/coerce.d.ts +7 -0
  484. package/fullstacked_modules/zod/v4/mini/external.d.cts +11 -0
  485. package/fullstacked_modules/zod/v4/mini/external.d.ts +11 -0
  486. package/fullstacked_modules/zod/v4/mini/index.d.cts +3 -0
  487. package/fullstacked_modules/zod/v4/mini/index.d.ts +3 -0
  488. package/fullstacked_modules/zod/v4/mini/iso.d.cts +22 -0
  489. package/fullstacked_modules/zod/v4/mini/iso.d.ts +22 -0
  490. package/fullstacked_modules/zod/v4/mini/parse.d.cts +1 -0
  491. package/fullstacked_modules/zod/v4/mini/parse.d.ts +1 -0
  492. package/fullstacked_modules/zod/v4/mini/schemas.d.cts +358 -0
  493. package/fullstacked_modules/zod/v4/mini/schemas.d.ts +358 -0
  494. package/fullstacked_modules/zod/v4-mini/index.d.cts +1 -0
  495. package/fullstacked_modules/zod/v4-mini/index.d.ts +1 -0
  496. package/index.js +17 -12
  497. package/package.json +1 -1
  498. package/lib/bridge/index.ts +0 -53
  499. package/lib/fullstacked.d.ts +0 -208
  500. /package/{lib → fullstacked_modules}/components/snackbar.css +0 -0
@@ -0,0 +1,827 @@
1
+ import type * as checks from "./checks.js";
2
+ import type { $ZodConfig } from "./core.js";
3
+ import type * as errors from "./errors.js";
4
+ import type * as schemas from "./schemas.js";
5
+
6
+ // json
7
+ export type JSONType = string | number | boolean | null | JSONType[] | { [key: string]: JSONType };
8
+ export type JWTAlgorithm =
9
+ | "HS256"
10
+ | "HS384"
11
+ | "HS512"
12
+ | "RS256"
13
+ | "RS384"
14
+ | "RS512"
15
+ | "ES256"
16
+ | "ES384"
17
+ | "ES512"
18
+ | "PS256"
19
+ | "PS384"
20
+ | "PS512"
21
+ | "EdDSA"
22
+ | (string & {});
23
+ export type IPVersion = "v4" | "v6";
24
+ export type MimeTypes =
25
+ | "application/json"
26
+ | "application/xml"
27
+ | "application/x-www-form-urlencoded"
28
+ | "application/javascript"
29
+ | "application/pdf"
30
+ | "application/zip"
31
+ | "application/vnd.ms-excel"
32
+ | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
33
+ | "application/msword"
34
+ | "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
35
+ | "application/vnd.ms-powerpoint"
36
+ | "application/vnd.openxmlformats-officedocument.presentationml.presentation"
37
+ | "application/octet-stream"
38
+ | "application/graphql"
39
+ | "text/html"
40
+ | "text/plain"
41
+ | "text/css"
42
+ | "text/javascript"
43
+ | "text/csv"
44
+ | "image/png"
45
+ | "image/jpeg"
46
+ | "image/gif"
47
+ | "image/svg+xml"
48
+ | "image/webp"
49
+ | "audio/mpeg"
50
+ | "audio/ogg"
51
+ | "audio/wav"
52
+ | "audio/webm"
53
+ | "video/mp4"
54
+ | "video/webm"
55
+ | "video/ogg"
56
+ | "font/woff"
57
+ | "font/woff2"
58
+ | "font/ttf"
59
+ | "font/otf"
60
+ | "multipart/form-data"
61
+ | (string & {});
62
+ export type ParsedTypes =
63
+ | "string"
64
+ | "number"
65
+ | "bigint"
66
+ | "boolean"
67
+ | "symbol"
68
+ | "undefined"
69
+ | "object"
70
+ | "function"
71
+ | "file"
72
+ | "date"
73
+ | "array"
74
+ | "map"
75
+ | "set"
76
+ | "nan"
77
+ | "null"
78
+ | "promise";
79
+
80
+ // utils
81
+ export type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
82
+ export type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;
83
+ export type AssertExtends<T, U> = T extends U ? T : never;
84
+ export type IsAny<T> = 0 extends 1 & T ? true : false;
85
+ export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
86
+ export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
87
+ export type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;
88
+ export type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
89
+
90
+ export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
91
+ export type NoUndefined<T> = T extends undefined ? never : T;
92
+ export type Whatever = {} | undefined | null;
93
+ export type LoosePartial<T extends object> = InexactPartial<T> & {
94
+ [k: string]: unknown;
95
+ };
96
+ export type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
97
+ export type Writeable<T> = { -readonly [P in keyof T]: T[P] } & {};
98
+ export type InexactPartial<T> = {
99
+ [P in keyof T]?: T[P] | undefined;
100
+ };
101
+ export type EmptyObject = Record<string, never>;
102
+ export type BuiltIn =
103
+ | (((...args: any[]) => any) | (new (...args: any[]) => any))
104
+ | { readonly [Symbol.toStringTag]: string }
105
+ | Date
106
+ | Error
107
+ | Generator
108
+ | Promise<unknown>
109
+ | RegExp;
110
+ export type MakeReadonly<T> = T extends Map<infer K, infer V>
111
+ ? ReadonlyMap<K, V>
112
+ : T extends Set<infer V>
113
+ ? ReadonlySet<V>
114
+ : T extends [infer Head, ...infer Tail]
115
+ ? readonly [Head, ...Tail]
116
+ : T extends Array<infer V>
117
+ ? ReadonlyArray<V>
118
+ : T extends BuiltIn
119
+ ? T
120
+ : Readonly<T>;
121
+ export type SomeObject = Record<PropertyKey, any>;
122
+ export type Identity<T> = T;
123
+ export type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
124
+ export type Mapped<T> = { [k in keyof T]: T[k] };
125
+ export type Prettify<T> = {
126
+ // @ts-ignore
127
+ [K in keyof T]: T[K];
128
+ } & {};
129
+
130
+ export type NoNeverKeys<T> = {
131
+ [k in keyof T]: [T[k]] extends [never] ? never : k;
132
+ }[keyof T];
133
+ export type NoNever<T> = Identity<{
134
+ [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;
135
+ }>;
136
+ export type Extend<A extends SomeObject, B extends SomeObject> = Flatten<
137
+ // fast path when there is no keys overlap
138
+ keyof A & keyof B extends never
139
+ ? A & B
140
+ : {
141
+ [K in keyof A as K extends keyof B ? never : K]: A[K];
142
+ } & {
143
+ [K in keyof B]: B[K];
144
+ }
145
+ >;
146
+
147
+ export type TupleItems = ReadonlyArray<schemas.SomeType>;
148
+ export type AnyFunc = (...args: any[]) => any;
149
+ export type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
150
+ export type MaybeAsync<T> = T | Promise<T>;
151
+ export type KeyOf<T> = keyof OmitIndexSignature<T>;
152
+ export type OmitIndexSignature<T> = {
153
+ [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];
154
+ };
155
+ export type ExtractIndexSignature<T> = {
156
+ [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];
157
+ };
158
+ export type Keys<T extends object> = keyof OmitIndexSignature<T>;
159
+
160
+ export type SchemaClass<T extends schemas.SomeType> = {
161
+ new (def: T["_zod"]["def"]): T;
162
+ };
163
+ export type EnumValue = string | number; // | bigint | boolean | symbol;
164
+ export type EnumLike = Readonly<Record<string, EnumValue>>;
165
+ export type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
166
+ export type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
167
+ export type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
168
+ export type Literal = string | number | bigint | boolean | null | undefined;
169
+ export type LiteralArray = Array<Literal>;
170
+ export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
171
+ export type PrimitiveArray = Array<Primitive>;
172
+ export type HasSize = { size: number };
173
+ export type HasLength = { length: number }; // string | Array<unknown> | Set<unknown> | File;
174
+ export type Numeric = number | bigint | Date;
175
+ export type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
176
+ export type SafeParseSuccess<T> = { success: true; data: T; error?: never };
177
+ export type SafeParseError<T> = {
178
+ success: false;
179
+ data?: never;
180
+ error: errors.$ZodError<T>;
181
+ };
182
+
183
+ export type PropValues = Record<string, Set<Primitive>>;
184
+ export type PrimitiveSet = Set<Primitive>;
185
+
186
+ // functions
187
+ export function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B> {
188
+ return val;
189
+ }
190
+
191
+ export function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B> {
192
+ return val;
193
+ }
194
+
195
+ export function assertIs<T>(_arg: T): void {}
196
+
197
+ export function assertNever(_x: never): never {
198
+ throw new Error();
199
+ }
200
+ export function assert<T>(_: any): asserts _ is T {}
201
+
202
+ export function getEnumValues(entries: EnumLike): EnumValue[] {
203
+ const numericValues = Object.values(entries).filter((v) => typeof v === "number");
204
+ const values = Object.entries(entries)
205
+ .filter(([k, _]) => numericValues.indexOf(+k) === -1)
206
+ .map(([_, v]) => v);
207
+ return values;
208
+ }
209
+
210
+ export function joinValues<T extends Primitive[]>(array: T, separator = "|"): string {
211
+ return array.map((val) => stringifyPrimitive(val)).join(separator);
212
+ }
213
+
214
+ export function jsonStringifyReplacer(_: string, value: any): any {
215
+ if (typeof value === "bigint") return value.toString();
216
+ return value;
217
+ }
218
+
219
+ export function cached<T>(getter: () => T): { value: T } {
220
+ const set = false;
221
+ return {
222
+ get value() {
223
+ if (!set) {
224
+ const value = getter();
225
+ Object.defineProperty(this, "value", { value });
226
+ return value;
227
+ }
228
+ throw new Error("cached value already set");
229
+ },
230
+ };
231
+ }
232
+
233
+ export function nullish(input: any): boolean {
234
+ return input === null || input === undefined;
235
+ }
236
+
237
+ export function cleanRegex(source: string): string {
238
+ const start = source.startsWith("^") ? 1 : 0;
239
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
240
+ return source.slice(start, end);
241
+ }
242
+
243
+ export function floatSafeRemainder(val: number, step: number): number {
244
+ const valDecCount = (val.toString().split(".")[1] || "").length;
245
+ const stepString = step.toString();
246
+ let stepDecCount = (stepString.split(".")[1] || "").length;
247
+ if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
248
+ const match = stepString.match(/\d?e-(\d?)/);
249
+ if (match?.[1]) {
250
+ stepDecCount = Number.parseInt(match[1]);
251
+ }
252
+ }
253
+
254
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
255
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
256
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
257
+ return (valInt % stepInt) / 10 ** decCount;
258
+ }
259
+
260
+ const EVALUATING = Symbol("evaluating");
261
+
262
+ export function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void {
263
+ let value: T[K] | typeof EVALUATING | undefined = undefined;
264
+ Object.defineProperty(object, key, {
265
+ get() {
266
+ if (value === EVALUATING) {
267
+ // Circular reference detected, return undefined to break the cycle
268
+ return undefined as T[K];
269
+ }
270
+ if (value === undefined) {
271
+ value = EVALUATING;
272
+ value = getter();
273
+ }
274
+ return value;
275
+ },
276
+ set(v) {
277
+ Object.defineProperty(object, key, {
278
+ value: v,
279
+ // configurable: true,
280
+ });
281
+ // object[key] = v;
282
+ },
283
+ configurable: true,
284
+ });
285
+ }
286
+
287
+ export function assignProp<T extends object, K extends PropertyKey>(
288
+ target: T,
289
+ prop: K,
290
+ value: K extends keyof T ? T[K] : any
291
+ ): void {
292
+ Object.defineProperty(target, prop, {
293
+ value,
294
+ writable: true,
295
+ enumerable: true,
296
+ configurable: true,
297
+ });
298
+ }
299
+
300
+ export function mergeDefs(...defs: Record<string, any>[]): any {
301
+ const mergedDescriptors: Record<string, PropertyDescriptor> = {};
302
+
303
+ for (const def of defs) {
304
+ const descriptors = Object.getOwnPropertyDescriptors(def);
305
+ Object.assign(mergedDescriptors, descriptors);
306
+ }
307
+
308
+ return Object.defineProperties({}, mergedDescriptors);
309
+ }
310
+
311
+ export function cloneDef(schema: schemas.$ZodType): any {
312
+ return mergeDefs(schema._zod.def);
313
+ }
314
+
315
+ export function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any {
316
+ if (!path) return obj;
317
+ return path.reduce((acc, key) => acc?.[key], obj);
318
+ }
319
+
320
+ export function promiseAllObject<T extends object>(promisesObj: T): Promise<{ [k in keyof T]: Awaited<T[k]> }> {
321
+ const keys = Object.keys(promisesObj);
322
+ const promises = keys.map((key) => (promisesObj as any)[key]);
323
+
324
+ return Promise.all(promises).then((results) => {
325
+ const resolvedObj: any = {};
326
+ for (let i = 0; i < keys.length; i++) {
327
+ resolvedObj[keys[i]!] = results[i];
328
+ }
329
+ return resolvedObj;
330
+ });
331
+ }
332
+
333
+ export function randomString(length = 10): string {
334
+ const chars = "abcdefghijklmnopqrstuvwxyz";
335
+ let str = "";
336
+ for (let i = 0; i < length; i++) {
337
+ str += chars[Math.floor(Math.random() * chars.length)];
338
+ }
339
+ return str;
340
+ }
341
+
342
+ export function esc(str: string): string {
343
+ return JSON.stringify(str);
344
+ }
345
+
346
+ export const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void = (
347
+ "captureStackTrace" in Error ? Error.captureStackTrace : (..._args: any[]) => {}
348
+ ) as any;
349
+
350
+ export function isObject(data: any): data is Record<PropertyKey, unknown> {
351
+ return typeof data === "object" && data !== null && !Array.isArray(data);
352
+ }
353
+
354
+ export const allowsEval: { value: boolean } = cached(() => {
355
+ // @ts-ignore
356
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
357
+ return false;
358
+ }
359
+
360
+ try {
361
+ const F = Function;
362
+ new F("");
363
+ return true;
364
+ } catch (_) {
365
+ return false;
366
+ }
367
+ });
368
+
369
+ export function isPlainObject(o: any): o is Record<PropertyKey, unknown> {
370
+ if (isObject(o) === false) return false;
371
+
372
+ // modified constructor
373
+ const ctor = o.constructor;
374
+ if (ctor === undefined) return true;
375
+
376
+ // modified prototype
377
+ const prot = ctor.prototype;
378
+ if (isObject(prot) === false) return false;
379
+
380
+ // ctor doesn't have static `isPrototypeOf`
381
+ if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
382
+ return false;
383
+ }
384
+
385
+ return true;
386
+ }
387
+
388
+ export function numKeys(data: any): number {
389
+ let keyCount = 0;
390
+ for (const key in data) {
391
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
392
+ keyCount++;
393
+ }
394
+ }
395
+ return keyCount;
396
+ }
397
+
398
+ export const getParsedType = (data: any): ParsedTypes => {
399
+ const t = typeof data;
400
+
401
+ switch (t) {
402
+ case "undefined":
403
+ return "undefined";
404
+
405
+ case "string":
406
+ return "string";
407
+
408
+ case "number":
409
+ return Number.isNaN(data) ? "nan" : "number";
410
+
411
+ case "boolean":
412
+ return "boolean";
413
+
414
+ case "function":
415
+ return "function";
416
+
417
+ case "bigint":
418
+ return "bigint";
419
+
420
+ case "symbol":
421
+ return "symbol";
422
+
423
+ case "object":
424
+ if (Array.isArray(data)) {
425
+ return "array";
426
+ }
427
+ if (data === null) {
428
+ return "null";
429
+ }
430
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
431
+ return "promise";
432
+ }
433
+ if (typeof Map !== "undefined" && data instanceof Map) {
434
+ return "map";
435
+ }
436
+ if (typeof Set !== "undefined" && data instanceof Set) {
437
+ return "set";
438
+ }
439
+ if (typeof Date !== "undefined" && data instanceof Date) {
440
+ return "date";
441
+ }
442
+ // @ts-ignore
443
+ if (typeof File !== "undefined" && data instanceof File) {
444
+ return "file";
445
+ }
446
+ return "object";
447
+
448
+ default:
449
+ throw new Error(`Unknown data type: ${t}`);
450
+ }
451
+ };
452
+
453
+ export const propertyKeyTypes: Set<string> = new Set(["string", "number", "symbol"]);
454
+ export const primitiveTypes: Set<string> = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
455
+ export function escapeRegex(str: string): string {
456
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
457
+ }
458
+
459
+ // zod-specific utils
460
+ export function clone<T extends schemas.$ZodType>(inst: T, def?: T["_zod"]["def"], params?: { parent: boolean }): T {
461
+ const cl = new inst._zod.constr(def ?? inst._zod.def);
462
+ if (!def || params?.parent) cl._zod.parent = inst;
463
+ return cl as any;
464
+ }
465
+
466
+ export type EmptyToNever<T> = keyof T extends never ? never : T;
467
+
468
+ export type Normalize<T> = T extends undefined
469
+ ? never
470
+ : T extends Record<any, any>
471
+ ? Flatten<
472
+ {
473
+ [k in keyof Omit<T, "error" | "message">]: T[k];
474
+ } & ("error" extends keyof T
475
+ ? {
476
+ error?: Exclude<T["error"], string>;
477
+ // path?: PropertyKey[] | undefined;
478
+ // message?: string | undefined;
479
+ }
480
+ : unknown)
481
+ >
482
+ : never;
483
+
484
+ export function normalizeParams<T>(_params: T): Normalize<T> {
485
+ const params: any = _params;
486
+
487
+ if (!params) return {} as any;
488
+ if (typeof params === "string") return { error: () => params } as any;
489
+ if (params?.message !== undefined) {
490
+ if (params?.error !== undefined) throw new Error("Cannot specify both `message` and `error` params");
491
+ params.error = params.message;
492
+ }
493
+ delete params.message;
494
+ if (typeof params.error === "string") return { ...params, error: () => params.error } as any;
495
+ return params;
496
+ }
497
+
498
+ export function createTransparentProxy<T extends object>(getter: () => T): T {
499
+ let target: T;
500
+ return new Proxy(
501
+ {},
502
+ {
503
+ get(_, prop, receiver) {
504
+ target ??= getter();
505
+ return Reflect.get(target, prop, receiver);
506
+ },
507
+ set(_, prop, value, receiver) {
508
+ target ??= getter();
509
+ return Reflect.set(target, prop, value, receiver);
510
+ },
511
+ has(_, prop) {
512
+ target ??= getter();
513
+ return Reflect.has(target, prop);
514
+ },
515
+ deleteProperty(_, prop) {
516
+ target ??= getter();
517
+ return Reflect.deleteProperty(target, prop);
518
+ },
519
+ ownKeys(_) {
520
+ target ??= getter();
521
+ return Reflect.ownKeys(target);
522
+ },
523
+ getOwnPropertyDescriptor(_, prop) {
524
+ target ??= getter();
525
+ return Reflect.getOwnPropertyDescriptor(target, prop);
526
+ },
527
+ defineProperty(_, prop, descriptor) {
528
+ target ??= getter();
529
+ return Reflect.defineProperty(target, prop, descriptor);
530
+ },
531
+ }
532
+ ) as T;
533
+ }
534
+
535
+ export function stringifyPrimitive(value: any): string {
536
+ if (typeof value === "bigint") return value.toString() + "n";
537
+ if (typeof value === "string") return `"${value}"`;
538
+ return `${value}`;
539
+ }
540
+
541
+ export function optionalKeys(shape: schemas.$ZodShape): string[] {
542
+ return Object.keys(shape).filter((k) => {
543
+ return shape[k]!._zod.optin === "optional" && shape[k]!._zod.optout === "optional";
544
+ });
545
+ }
546
+
547
+ export type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
548
+ export type ToCleanMap<T extends schemas.$ZodLooseShape> = {
549
+ [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;
550
+ };
551
+ export type FromCleanMap<T extends schemas.$ZodLooseShape> = {
552
+ [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;
553
+ };
554
+
555
+ export const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]> = {
556
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
557
+ int32: [-2147483648, 2147483647],
558
+ uint32: [0, 4294967295],
559
+ float32: [-3.4028234663852886e38, 3.4028234663852886e38],
560
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE],
561
+ };
562
+
563
+ export const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]> = {
564
+ int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
565
+ uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")],
566
+ };
567
+
568
+ export function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any {
569
+ const currDef = schema._zod.def;
570
+
571
+ const def = mergeDefs(schema._zod.def, {
572
+ get shape() {
573
+ const newShape: Writeable<schemas.$ZodShape> = {};
574
+ for (const key in mask) {
575
+ if (!(key in currDef.shape)) {
576
+ throw new Error(`Unrecognized key: "${key}"`);
577
+ }
578
+ if (!mask[key]) continue;
579
+ newShape[key] = currDef.shape[key]!;
580
+ }
581
+
582
+ assignProp(this, "shape", newShape); // self-caching
583
+ return newShape;
584
+ },
585
+ checks: [],
586
+ });
587
+
588
+ return clone(schema, def) as any;
589
+ }
590
+
591
+ export function omit(schema: schemas.$ZodObject, mask: object): any {
592
+ const currDef = schema._zod.def;
593
+
594
+ const def = mergeDefs(schema._zod.def, {
595
+ get shape() {
596
+ const newShape: Writeable<schemas.$ZodShape> = { ...schema._zod.def.shape };
597
+ for (const key in mask) {
598
+ if (!(key in currDef.shape)) {
599
+ throw new Error(`Unrecognized key: "${key}"`);
600
+ }
601
+ if (!(mask as any)[key]) continue;
602
+
603
+ delete newShape[key];
604
+ }
605
+ assignProp(this, "shape", newShape); // self-caching
606
+ return newShape;
607
+ },
608
+ checks: [],
609
+ });
610
+
611
+ return clone(schema, def);
612
+ }
613
+
614
+ export function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any {
615
+ if (!isPlainObject(shape)) {
616
+ throw new Error("Invalid input to extend: expected a plain object");
617
+ }
618
+
619
+ const def = mergeDefs(schema._zod.def, {
620
+ get shape() {
621
+ const _shape = { ...schema._zod.def.shape, ...shape };
622
+ assignProp(this, "shape", _shape); // self-caching
623
+ return _shape;
624
+ },
625
+ checks: [],
626
+ });
627
+ return clone(schema, def) as any;
628
+ }
629
+
630
+ export function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any {
631
+ const def = mergeDefs(a._zod.def, {
632
+ get shape() {
633
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
634
+ assignProp(this, "shape", _shape); // self-caching
635
+ return _shape;
636
+ },
637
+ get catchall() {
638
+ return b._zod.def.catchall;
639
+ },
640
+ checks: [], // delete existing checks
641
+ });
642
+
643
+ return clone(a, def) as any;
644
+ }
645
+
646
+ export function partial(
647
+ Class: SchemaClass<schemas.$ZodOptional> | null,
648
+ schema: schemas.$ZodObject,
649
+ mask: object | undefined
650
+ ): any {
651
+ const def = mergeDefs(schema._zod.def, {
652
+ get shape() {
653
+ const oldShape = schema._zod.def.shape;
654
+ const shape: Writeable<schemas.$ZodShape> = { ...oldShape };
655
+
656
+ if (mask) {
657
+ for (const key in mask) {
658
+ if (!(key in oldShape)) {
659
+ throw new Error(`Unrecognized key: "${key}"`);
660
+ }
661
+ if (!(mask as any)[key]) continue;
662
+ // if (oldShape[key]!._zod.optin === "optional") continue;
663
+ shape[key] = Class
664
+ ? new Class({
665
+ type: "optional",
666
+ innerType: oldShape[key]!,
667
+ })
668
+ : oldShape[key]!;
669
+ }
670
+ } else {
671
+ for (const key in oldShape) {
672
+ // if (oldShape[key]!._zod.optin === "optional") continue;
673
+ shape[key] = Class
674
+ ? new Class({
675
+ type: "optional",
676
+ innerType: oldShape[key]!,
677
+ })
678
+ : oldShape[key]!;
679
+ }
680
+ }
681
+
682
+ assignProp(this, "shape", shape); // self-caching
683
+ return shape;
684
+ },
685
+ checks: [],
686
+ });
687
+
688
+ return clone(schema, def) as any;
689
+ }
690
+
691
+ export function required(
692
+ Class: SchemaClass<schemas.$ZodNonOptional>,
693
+ schema: schemas.$ZodObject,
694
+ mask: object | undefined
695
+ ): any {
696
+ const def = mergeDefs(schema._zod.def, {
697
+ get shape() {
698
+ const oldShape = schema._zod.def.shape;
699
+ const shape: Writeable<schemas.$ZodShape> = { ...oldShape };
700
+
701
+ if (mask) {
702
+ for (const key in mask) {
703
+ if (!(key in shape)) {
704
+ throw new Error(`Unrecognized key: "${key}"`);
705
+ }
706
+ if (!(mask as any)[key]) continue;
707
+ // overwrite with non-optional
708
+ shape[key] = new Class({
709
+ type: "nonoptional",
710
+ innerType: oldShape[key]!,
711
+ });
712
+ }
713
+ } else {
714
+ for (const key in oldShape) {
715
+ // overwrite with non-optional
716
+ shape[key] = new Class({
717
+ type: "nonoptional",
718
+ innerType: oldShape[key]!,
719
+ });
720
+ }
721
+ }
722
+
723
+ assignProp(this, "shape", shape); // self-caching
724
+ return shape;
725
+ },
726
+ checks: [],
727
+ });
728
+
729
+ return clone(schema, def) as any;
730
+ }
731
+
732
+ export type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;
733
+
734
+ // invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom
735
+ export function aborted(x: schemas.ParsePayload, startIndex = 0): boolean {
736
+ for (let i = startIndex; i < x.issues.length; i++) {
737
+ if (x.issues[i]?.continue !== true) {
738
+ return true;
739
+ }
740
+ }
741
+ return false;
742
+ }
743
+
744
+ export function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[] {
745
+ return issues.map((iss) => {
746
+ (iss as any).path ??= [];
747
+ (iss as any).path.unshift(path);
748
+ return iss;
749
+ });
750
+ }
751
+
752
+ export function unwrapMessage(message: string | { message: string } | undefined | null): string | undefined {
753
+ return typeof message === "string" ? message : message?.message;
754
+ }
755
+
756
+ export function finalizeIssue(
757
+ iss: errors.$ZodRawIssue,
758
+ ctx: schemas.ParseContextInternal | undefined,
759
+ config: $ZodConfig
760
+ ): errors.$ZodIssue {
761
+ const full = { ...iss, path: iss.path ?? [] } as errors.$ZodIssue;
762
+
763
+ // for backwards compatibility
764
+ if (!iss.message) {
765
+ const message =
766
+ unwrapMessage(iss.inst?._zod.def?.error?.(iss as never)) ??
767
+ unwrapMessage(ctx?.error?.(iss as never)) ??
768
+ unwrapMessage(config.customError?.(iss)) ??
769
+ unwrapMessage(config.localeError?.(iss)) ??
770
+ "Invalid input";
771
+ (full as any).message = message;
772
+ }
773
+
774
+ // delete (full as any).def;
775
+ delete (full as any).inst;
776
+ delete (full as any).continue;
777
+ if (!ctx?.reportInput) {
778
+ delete (full as any).input;
779
+ }
780
+
781
+ return full;
782
+ }
783
+
784
+ export function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown" {
785
+ if (input instanceof Set) return "set";
786
+ if (input instanceof Map) return "map";
787
+ // @ts-ignore
788
+ if (input instanceof File) return "file";
789
+ return "unknown";
790
+ }
791
+
792
+ export function getLengthableOrigin(input: any): "array" | "string" | "unknown" {
793
+ if (Array.isArray(input)) return "array";
794
+ if (typeof input === "string") return "string";
795
+ return "unknown";
796
+ }
797
+
798
+ ////////// REFINES //////////
799
+ export function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;
800
+ export function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;
801
+ export function issue(...args: [string | errors.$ZodRawIssue, any?, any?]): errors.$ZodRawIssue {
802
+ const [iss, input, inst] = args;
803
+ if (typeof iss === "string") {
804
+ return {
805
+ message: iss,
806
+ code: "custom",
807
+ input,
808
+ inst,
809
+ };
810
+ }
811
+
812
+ return { ...iss };
813
+ }
814
+
815
+ export function cleanEnum(obj: Record<string, EnumValue>): EnumValue[] {
816
+ return Object.entries(obj)
817
+ .filter(([k, _]) => {
818
+ // return true if NaN, meaning it's not a number, thus a string key
819
+ return Number.isNaN(Number.parseInt(k, 10));
820
+ })
821
+ .map((el) => el[1]);
822
+ }
823
+
824
+ // instanceof
825
+ export abstract class Class {
826
+ constructor(..._args: any[]) {}
827
+ }