orcaq 1.0.20

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 (1018) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/8qASMGdV.js +1 -0
  3. package/.output/public/_nuxt/9lJACZIQ.js +19 -0
  4. package/.output/public/_nuxt/B2DnNiWd.js +1 -0
  5. package/.output/public/_nuxt/B6E6ObS_.js +8 -0
  6. package/.output/public/_nuxt/BH83_dXo.js +39 -0
  7. package/.output/public/_nuxt/BIKqrFbQ.js +1 -0
  8. package/.output/public/_nuxt/BNjPC06x.js +1 -0
  9. package/.output/public/_nuxt/BPQ-Pz1w.js +39 -0
  10. package/.output/public/_nuxt/BRpgKkVT.js +51 -0
  11. package/.output/public/_nuxt/BTCLPbPY.js +4 -0
  12. package/.output/public/_nuxt/BUV-RarV.js +1 -0
  13. package/.output/public/_nuxt/Bh6RgYlO.js +1 -0
  14. package/.output/public/_nuxt/Bq3cyzOD.js +1 -0
  15. package/.output/public/_nuxt/Bt9sU68B.js +9 -0
  16. package/.output/public/_nuxt/BwpH2ZxJ.js +1 -0
  17. package/.output/public/_nuxt/C25Tmn1m.js +1 -0
  18. package/.output/public/_nuxt/C2HlI1ss.js +1 -0
  19. package/.output/public/_nuxt/CU3ZV9iV.js +1 -0
  20. package/.output/public/_nuxt/CbcyysXi.js +1 -0
  21. package/.output/public/_nuxt/CepyvMhE.js +1 -0
  22. package/.output/public/_nuxt/CrgoNCm2.js +2 -0
  23. package/.output/public/_nuxt/CuBKbBH_.js +1 -0
  24. package/.output/public/_nuxt/CulD8qYQ.js +193 -0
  25. package/.output/public/_nuxt/CustomEdge.BNBpjEHb.css +1 -0
  26. package/.output/public/_nuxt/CylkLpwm.js +1 -0
  27. package/.output/public/_nuxt/D-bWLYHw.js +1 -0
  28. package/.output/public/_nuxt/D-zecHND.js +1 -0
  29. package/.output/public/_nuxt/D8vj6kFe.js +160 -0
  30. package/.output/public/_nuxt/DIETYtCL.js +1 -0
  31. package/.output/public/_nuxt/DJ4vUzxS.js +1 -0
  32. package/.output/public/_nuxt/DK-itzXx.js +8 -0
  33. package/.output/public/_nuxt/DL3T5jYo.js +3867 -0
  34. package/.output/public/_nuxt/DUsuhY9i.js +1 -0
  35. package/.output/public/_nuxt/DXV2HFBA.js +224 -0
  36. package/.output/public/_nuxt/Dh2zppOR.js +1 -0
  37. package/.output/public/_nuxt/DlAUqK2U.js +1 -0
  38. package/.output/public/_nuxt/DlmSeCnw.js +5 -0
  39. package/.output/public/_nuxt/DswTpYG4.js +1 -0
  40. package/.output/public/_nuxt/DynamicTable.DJeANwbG.css +1 -0
  41. package/.output/public/_nuxt/G830WtVn.js +1 -0
  42. package/.output/public/_nuxt/ICwM1E4-.js +15 -0
  43. package/.output/public/_nuxt/QZbJy9YW.js +31 -0
  44. package/.output/public/_nuxt/QuickQueryTable.DS_ON57S.css +1 -0
  45. package/.output/public/_nuxt/UXhX8z2W.js +1 -0
  46. package/.output/public/_nuxt/WrapperErdDiagram.DwhUd9Wr.css +1 -0
  47. package/.output/public/_nuxt/_fileId_.DmPfwyyD.css +1 -0
  48. package/.output/public/_nuxt/_tabViewId_.9Axt3zoi.css +1 -0
  49. package/.output/public/_nuxt/builds/latest.json +1 -0
  50. package/.output/public/_nuxt/builds/meta/6364d5cf-4642-479f-ba12-6440c56702af.json +1 -0
  51. package/.output/public/_nuxt/default.DixIpIal.css +1 -0
  52. package/.output/public/_nuxt/entry.GqPNPe1e.css +1 -0
  53. package/.output/public/_nuxt/index.CrXmf4gr.css +1 -0
  54. package/.output/public/_nuxt/ivUnXl9B.js +1 -0
  55. package/.output/public/_nuxt/pAheHeBV.js +36 -0
  56. package/.output/public/_nuxt/s5fCn4j5.js +1 -0
  57. package/.output/public/favicon.ico +0 -0
  58. package/.output/public/logo.png +0 -0
  59. package/.output/public/manifest.json +25 -0
  60. package/.output/public/robots.txt +1 -0
  61. package/.output/public/vite.svg +1 -0
  62. package/.output/server/chunks/_/error-500.mjs +8 -0
  63. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  64. package/.output/server/chunks/build/client.manifest.mjs +773 -0
  65. package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
  66. package/.output/server/chunks/nitro/nitro.mjs +6432 -0
  67. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  68. package/.output/server/chunks/routes/api/ai/chat.mjs +77 -0
  69. package/.output/server/chunks/routes/api/ai/chat.mjs.map +1 -0
  70. package/.output/server/chunks/routes/api/execute-bulk-delete.mjs +100 -0
  71. package/.output/server/chunks/routes/api/execute-bulk-delete.mjs.map +1 -0
  72. package/.output/server/chunks/routes/api/execute-bulk-update.mjs +105 -0
  73. package/.output/server/chunks/routes/api/execute-bulk-update.mjs.map +1 -0
  74. package/.output/server/chunks/routes/api/execute.mjs +47 -0
  75. package/.output/server/chunks/routes/api/execute.mjs.map +1 -0
  76. package/.output/server/chunks/routes/api/get-one-function.mjs +28 -0
  77. package/.output/server/chunks/routes/api/get-one-function.mjs.map +1 -0
  78. package/.output/server/chunks/routes/api/get-one-table.mjs +180 -0
  79. package/.output/server/chunks/routes/api/get-one-table.mjs.map +1 -0
  80. package/.output/server/chunks/routes/api/get-over-view-function.mjs +41 -0
  81. package/.output/server/chunks/routes/api/get-over-view-function.mjs.map +1 -0
  82. package/.output/server/chunks/routes/api/get-over-view-tables.mjs +53 -0
  83. package/.output/server/chunks/routes/api/get-over-view-tables.mjs.map +1 -0
  84. package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs +112 -0
  85. package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs.map +1 -0
  86. package/.output/server/chunks/routes/api/get-schema-meta-data.mjs +152 -0
  87. package/.output/server/chunks/routes/api/get-schema-meta-data.mjs.map +1 -0
  88. package/.output/server/chunks/routes/api/get-table-size.mjs +49 -0
  89. package/.output/server/chunks/routes/api/get-table-size.mjs.map +1 -0
  90. package/.output/server/chunks/routes/api/get-table-structure.mjs +111 -0
  91. package/.output/server/chunks/routes/api/get-table-structure.mjs.map +1 -0
  92. package/.output/server/chunks/routes/api/get-tables.mjs +287 -0
  93. package/.output/server/chunks/routes/api/get-tables.mjs.map +1 -0
  94. package/.output/server/chunks/routes/api/getMetricMonitor.mjs +46 -0
  95. package/.output/server/chunks/routes/api/getMetricMonitor.mjs.map +1 -0
  96. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +28 -0
  97. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -0
  98. package/.output/server/chunks/routes/api/raw-execute.mjs +48 -0
  99. package/.output/server/chunks/routes/api/raw-execute.mjs.map +1 -0
  100. package/.output/server/chunks/routes/renderer.mjs +316 -0
  101. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  102. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  103. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  104. package/.output/server/index.mjs +14 -0
  105. package/.output/server/index.mjs.map +1 -0
  106. package/.output/server/node_modules/@ai-sdk/anthropic/dist/index.mjs +4374 -0
  107. package/.output/server/node_modules/@ai-sdk/anthropic/package.json +74 -0
  108. package/.output/server/node_modules/@ai-sdk/gateway/dist/index.mjs +1082 -0
  109. package/.output/server/node_modules/@ai-sdk/gateway/package.json +69 -0
  110. package/.output/server/node_modules/@ai-sdk/google/dist/index.mjs +2007 -0
  111. package/.output/server/node_modules/@ai-sdk/google/package.json +74 -0
  112. package/.output/server/node_modules/@ai-sdk/openai/dist/index.mjs +5956 -0
  113. package/.output/server/node_modules/@ai-sdk/openai/package.json +74 -0
  114. package/.output/server/node_modules/@ai-sdk/openai-compatible/dist/index.mjs +1551 -0
  115. package/.output/server/node_modules/@ai-sdk/openai-compatible/package.json +74 -0
  116. package/.output/server/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  117. package/.output/server/node_modules/@ai-sdk/provider/package.json +57 -0
  118. package/.output/server/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
  119. package/.output/server/node_modules/@ai-sdk/provider-utils/package.json +75 -0
  120. package/.output/server/node_modules/@ai-sdk/xai/dist/index.mjs +2214 -0
  121. package/.output/server/node_modules/@ai-sdk/xai/package.json +68 -0
  122. package/.output/server/node_modules/@babel/parser/lib/index.js +14246 -0
  123. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  124. package/.output/server/node_modules/@iconify/utils/lib/colors/index.mjs +350 -0
  125. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.mjs +188 -0
  126. package/.output/server/node_modules/@iconify/utils/lib/css/common.mjs +90 -0
  127. package/.output/server/node_modules/@iconify/utils/lib/css/format.mjs +38 -0
  128. package/.output/server/node_modules/@iconify/utils/lib/css/icon.mjs +76 -0
  129. package/.output/server/node_modules/@iconify/utils/lib/css/icons.mjs +168 -0
  130. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.mjs +22 -0
  131. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.mjs +14 -0
  132. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.mjs +16 -0
  133. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.mjs +22 -0
  134. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.mjs +33 -0
  135. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.mjs +51 -0
  136. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.mjs +84 -0
  137. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.mjs +16 -0
  138. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.mjs +44 -0
  139. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.mjs +58 -0
  140. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.mjs +231 -0
  141. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.mjs +31 -0
  142. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.mjs +164 -0
  143. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.mjs +216 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.mjs +113 -0
  145. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.mjs +104 -0
  146. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.mjs +34 -0
  147. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.mjs +75 -0
  148. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.mjs +97 -0
  149. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.mjs +54 -0
  150. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.mjs +97 -0
  151. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.mjs +45 -0
  152. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.mjs +105 -0
  153. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.mjs +54 -0
  154. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.mjs +24 -0
  155. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.mjs +20 -0
  156. package/.output/server/node_modules/@iconify/utils/lib/icon/name.mjs +53 -0
  157. package/.output/server/node_modules/@iconify/utils/lib/icon/square.mjs +23 -0
  158. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.mjs +16 -0
  159. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.mjs +182 -0
  160. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.mjs +22 -0
  161. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +28 -0
  162. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.mjs +46 -0
  163. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.mjs +66 -0
  164. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.mjs +51 -0
  165. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.mjs +23 -0
  166. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.mjs +62 -0
  167. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.mjs +161 -0
  168. package/.output/server/node_modules/@iconify/utils/lib/index.mjs +64 -0
  169. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.mjs +50 -0
  170. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.mjs +59 -0
  171. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.mjs +80 -0
  172. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.mjs +92 -0
  173. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.mjs +30 -0
  174. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.mjs +17 -0
  175. package/.output/server/node_modules/@iconify/utils/lib/misc/title.mjs +5 -0
  176. package/.output/server/node_modules/@iconify/utils/lib/svg/build.mjs +119 -0
  177. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.mjs +30 -0
  178. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.mjs +20 -0
  179. package/.output/server/node_modules/@iconify/utils/lib/svg/html.mjs +9 -0
  180. package/.output/server/node_modules/@iconify/utils/lib/svg/id.mjs +28 -0
  181. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.mjs +19 -0
  182. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.mjs +83 -0
  183. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.mjs +70 -0
  184. package/.output/server/node_modules/@iconify/utils/lib/svg/size.mjs +40 -0
  185. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.mjs +5 -0
  186. package/.output/server/node_modules/@iconify/utils/lib/svg/url.mjs +11 -0
  187. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.mjs +8 -0
  188. package/.output/server/node_modules/@iconify/utils/package.json +447 -0
  189. package/.output/server/node_modules/@ioredis/commands/built/commands.json +2447 -0
  190. package/.output/server/node_modules/@ioredis/commands/built/index.js +208 -0
  191. package/.output/server/node_modules/@ioredis/commands/package.json +52 -0
  192. package/.output/server/node_modules/@opentelemetry/api/build/src/api/context.js +81 -0
  193. package/.output/server/node_modules/@opentelemetry/api/build/src/api/diag.js +93 -0
  194. package/.output/server/node_modules/@opentelemetry/api/build/src/api/metrics.js +61 -0
  195. package/.output/server/node_modules/@opentelemetry/api/build/src/api/propagation.js +89 -0
  196. package/.output/server/node_modules/@opentelemetry/api/build/src/api/trace.js +79 -0
  197. package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js +63 -0
  198. package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js +55 -0
  199. package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js +23 -0
  200. package/.output/server/node_modules/@opentelemetry/api/build/src/baggage/utils.js +51 -0
  201. package/.output/server/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js +38 -0
  202. package/.output/server/node_modules/@opentelemetry/api/build/src/context/context.js +55 -0
  203. package/.output/server/node_modules/@opentelemetry/api/build/src/context-api.js +24 -0
  204. package/.output/server/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js +59 -0
  205. package/.output/server/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js +57 -0
  206. package/.output/server/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js +45 -0
  207. package/.output/server/node_modules/@opentelemetry/api/build/src/diag/types.js +44 -0
  208. package/.output/server/node_modules/@opentelemetry/api/build/src/diag-api.js +29 -0
  209. package/.output/server/node_modules/@opentelemetry/api/build/src/index.js +81 -0
  210. package/.output/server/node_modules/@opentelemetry/api/build/src/internal/global-utils.js +64 -0
  211. package/.output/server/node_modules/@opentelemetry/api/build/src/internal/semver.js +122 -0
  212. package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/Metric.js +25 -0
  213. package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js +127 -0
  214. package/.output/server/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js +31 -0
  215. package/.output/server/node_modules/@opentelemetry/api/build/src/metrics-api.js +24 -0
  216. package/.output/server/node_modules/@opentelemetry/api/build/src/platform/index.js +29 -0
  217. package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js +22 -0
  218. package/.output/server/node_modules/@opentelemetry/api/build/src/platform/node/index.js +29 -0
  219. package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js +34 -0
  220. package/.output/server/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js +41 -0
  221. package/.output/server/node_modules/@opentelemetry/api/build/src/propagation-api.js +24 -0
  222. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js +69 -0
  223. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js +75 -0
  224. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js +32 -0
  225. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js +55 -0
  226. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js +54 -0
  227. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js +42 -0
  228. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/context-utils.js +82 -0
  229. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js +103 -0
  230. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js +46 -0
  231. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js +24 -0
  232. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js +27 -0
  233. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/span_kind.js +46 -0
  234. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js +49 -0
  235. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/status.js +23 -0
  236. package/.output/server/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js +26 -0
  237. package/.output/server/node_modules/@opentelemetry/api/build/src/trace-api.js +24 -0
  238. package/.output/server/node_modules/@opentelemetry/api/build/src/version.js +21 -0
  239. package/.output/server/node_modules/@opentelemetry/api/package.json +113 -0
  240. package/.output/server/node_modules/@sqltools/formatter/lib/core/Formatter.js +234 -0
  241. package/.output/server/node_modules/@sqltools/formatter/lib/core/Indentation.js +42 -0
  242. package/.output/server/node_modules/@sqltools/formatter/lib/core/InlineBlock.js +60 -0
  243. package/.output/server/node_modules/@sqltools/formatter/lib/core/Params.js +21 -0
  244. package/.output/server/node_modules/@sqltools/formatter/lib/core/Tokenizer.js +272 -0
  245. package/.output/server/node_modules/@sqltools/formatter/lib/core/escapeRegExp.js +10 -0
  246. package/.output/server/node_modules/@sqltools/formatter/lib/core/last.js +7 -0
  247. package/.output/server/node_modules/@sqltools/formatter/lib/core/types.js +22 -0
  248. package/.output/server/node_modules/@sqltools/formatter/lib/languages/Db2Formatter.js +585 -0
  249. package/.output/server/node_modules/@sqltools/formatter/lib/languages/N1qlFormatter.js +257 -0
  250. package/.output/server/node_modules/@sqltools/formatter/lib/languages/PlSqlFormatter.js +459 -0
  251. package/.output/server/node_modules/@sqltools/formatter/lib/languages/StandardSqlFormatter.js +369 -0
  252. package/.output/server/node_modules/@sqltools/formatter/lib/languages/utils/abstract.js +23 -0
  253. package/.output/server/node_modules/@sqltools/formatter/lib/sqlFormatter.js +34 -0
  254. package/.output/server/node_modules/@sqltools/formatter/package.json +59 -0
  255. package/.output/server/node_modules/@standard-schema/spec/dist/index.js +0 -0
  256. package/.output/server/node_modules/@standard-schema/spec/package.json +52 -0
  257. package/.output/server/node_modules/@vercel/oidc/dist/auth-config.js +84 -0
  258. package/.output/server/node_modules/@vercel/oidc/dist/get-context.js +34 -0
  259. package/.output/server/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js +80 -0
  260. package/.output/server/node_modules/@vercel/oidc/dist/index.js +33 -0
  261. package/.output/server/node_modules/@vercel/oidc/dist/oauth.js +88 -0
  262. package/.output/server/node_modules/@vercel/oidc/dist/token-error.js +40 -0
  263. package/.output/server/node_modules/@vercel/oidc/dist/token-io.js +78 -0
  264. package/.output/server/node_modules/@vercel/oidc/dist/token-util.js +198 -0
  265. package/.output/server/node_modules/@vercel/oidc/dist/token.js +53 -0
  266. package/.output/server/node_modules/@vercel/oidc/package.json +52 -0
  267. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
  268. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  269. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
  270. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  271. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
  272. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  273. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
  274. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  275. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
  276. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  277. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
  278. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  279. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
  280. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  281. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
  282. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  283. package/.output/server/node_modules/ai/dist/index.mjs +12363 -0
  284. package/.output/server/node_modules/ai/package.json +106 -0
  285. package/.output/server/node_modules/ansis/index.js +1 -0
  286. package/.output/server/node_modules/ansis/package.json +28 -0
  287. package/.output/server/node_modules/app-root-path/index.js +4 -0
  288. package/.output/server/node_modules/app-root-path/lib/app-root-path.js +30 -0
  289. package/.output/server/node_modules/app-root-path/lib/resolve.js +128 -0
  290. package/.output/server/node_modules/app-root-path/package.json +66 -0
  291. package/.output/server/node_modules/balanced-match/index.js +62 -0
  292. package/.output/server/node_modules/balanced-match/package.json +48 -0
  293. package/.output/server/node_modules/bindings/bindings.js +221 -0
  294. package/.output/server/node_modules/bindings/package.json +28 -0
  295. package/.output/server/node_modules/brace-expansion/index.js +203 -0
  296. package/.output/server/node_modules/brace-expansion/package.json +46 -0
  297. package/.output/server/node_modules/cluster-key-slot/lib/index.js +166 -0
  298. package/.output/server/node_modules/cluster-key-slot/package.json +56 -0
  299. package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  300. package/.output/server/node_modules/consola/dist/core.mjs +512 -0
  301. package/.output/server/node_modules/consola/dist/index.mjs +651 -0
  302. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  303. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  304. package/.output/server/node_modules/consola/package.json +136 -0
  305. package/.output/server/node_modules/dayjs/dayjs.min.js +1 -0
  306. package/.output/server/node_modules/dayjs/package.json +84 -0
  307. package/.output/server/node_modules/debug/package.json +65 -0
  308. package/.output/server/node_modules/debug/src/browser.js +272 -0
  309. package/.output/server/node_modules/debug/src/common.js +292 -0
  310. package/.output/server/node_modules/debug/src/index.js +10 -0
  311. package/.output/server/node_modules/debug/src/node.js +263 -0
  312. package/.output/server/node_modules/dedent/dist/dedent.js +73 -0
  313. package/.output/server/node_modules/dedent/package.json +119 -0
  314. package/.output/server/node_modules/denque/index.js +481 -0
  315. package/.output/server/node_modules/denque/package.json +58 -0
  316. package/.output/server/node_modules/devalue/index.js +3 -0
  317. package/.output/server/node_modules/devalue/package.json +34 -0
  318. package/.output/server/node_modules/devalue/src/base64.js +110 -0
  319. package/.output/server/node_modules/devalue/src/constants.js +6 -0
  320. package/.output/server/node_modules/devalue/src/parse.js +160 -0
  321. package/.output/server/node_modules/devalue/src/stringify.js +232 -0
  322. package/.output/server/node_modules/devalue/src/uneval.js +351 -0
  323. package/.output/server/node_modules/devalue/src/utils.js +113 -0
  324. package/.output/server/node_modules/dotenv/lib/main.js +361 -0
  325. package/.output/server/node_modules/dotenv/package.json +61 -0
  326. package/.output/server/node_modules/entities/lib/decode.js +536 -0
  327. package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
  328. package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  329. package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  330. package/.output/server/node_modules/entities/package.json +90 -0
  331. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  332. package/.output/server/node_modules/estree-walker/package.json +37 -0
  333. package/.output/server/node_modules/eventsource-parser/dist/index.js +106 -0
  334. package/.output/server/node_modules/eventsource-parser/dist/stream.js +29 -0
  335. package/.output/server/node_modules/eventsource-parser/package.json +115 -0
  336. package/.output/server/node_modules/file-uri-to-path/index.js +66 -0
  337. package/.output/server/node_modules/file-uri-to-path/package.json +32 -0
  338. package/.output/server/node_modules/glob/dist/commonjs/glob.js +247 -0
  339. package/.output/server/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  340. package/.output/server/node_modules/glob/dist/commonjs/ignore.js +119 -0
  341. package/.output/server/node_modules/glob/dist/commonjs/index.js +68 -0
  342. package/.output/server/node_modules/glob/dist/commonjs/package.json +3 -0
  343. package/.output/server/node_modules/glob/dist/commonjs/pattern.js +219 -0
  344. package/.output/server/node_modules/glob/dist/commonjs/processor.js +301 -0
  345. package/.output/server/node_modules/glob/dist/commonjs/walker.js +387 -0
  346. package/.output/server/node_modules/glob/package.json +99 -0
  347. package/.output/server/node_modules/has-flag/index.js +8 -0
  348. package/.output/server/node_modules/has-flag/package.json +46 -0
  349. package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
  350. package/.output/server/node_modules/hookable/package.json +49 -0
  351. package/.output/server/node_modules/inherits/inherits.js +9 -0
  352. package/.output/server/node_modules/inherits/inherits_browser.js +27 -0
  353. package/.output/server/node_modules/inherits/package.json +29 -0
  354. package/.output/server/node_modules/ioredis/built/Command.js +349 -0
  355. package/.output/server/node_modules/ioredis/built/DataHandler.js +220 -0
  356. package/.output/server/node_modules/ioredis/built/Pipeline.js +334 -0
  357. package/.output/server/node_modules/ioredis/built/Redis.js +697 -0
  358. package/.output/server/node_modules/ioredis/built/ScanStream.js +51 -0
  359. package/.output/server/node_modules/ioredis/built/Script.js +62 -0
  360. package/.output/server/node_modules/ioredis/built/SubscriptionSet.js +41 -0
  361. package/.output/server/node_modules/ioredis/built/autoPipelining.js +159 -0
  362. package/.output/server/node_modules/ioredis/built/cluster/ClusterOptions.js +22 -0
  363. package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriber.js +202 -0
  364. package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +224 -0
  365. package/.output/server/node_modules/ioredis/built/cluster/ConnectionPool.js +154 -0
  366. package/.output/server/node_modules/ioredis/built/cluster/DelayQueue.js +53 -0
  367. package/.output/server/node_modules/ioredis/built/cluster/index.js +862 -0
  368. package/.output/server/node_modules/ioredis/built/cluster/util.js +100 -0
  369. package/.output/server/node_modules/ioredis/built/connectors/AbstractConnector.js +26 -0
  370. package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +45 -0
  371. package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +37 -0
  372. package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/index.js +305 -0
  373. package/.output/server/node_modules/ioredis/built/connectors/StandaloneConnector.js +69 -0
  374. package/.output/server/node_modules/ioredis/built/connectors/index.js +7 -0
  375. package/.output/server/node_modules/ioredis/built/constants/TLSProfiles.js +149 -0
  376. package/.output/server/node_modules/ioredis/built/errors/ClusterAllFailedError.js +15 -0
  377. package/.output/server/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +14 -0
  378. package/.output/server/node_modules/ioredis/built/errors/index.js +5 -0
  379. package/.output/server/node_modules/ioredis/built/index.js +62 -0
  380. package/.output/server/node_modules/ioredis/built/redis/RedisOptions.js +55 -0
  381. package/.output/server/node_modules/ioredis/built/redis/event_handler.js +292 -0
  382. package/.output/server/node_modules/ioredis/built/transaction.js +93 -0
  383. package/.output/server/node_modules/ioredis/built/utils/Commander.js +117 -0
  384. package/.output/server/node_modules/ioredis/built/utils/applyMixin.js +8 -0
  385. package/.output/server/node_modules/ioredis/built/utils/debug.js +95 -0
  386. package/.output/server/node_modules/ioredis/built/utils/index.js +297 -0
  387. package/.output/server/node_modules/ioredis/built/utils/lodash.js +9 -0
  388. package/.output/server/node_modules/ioredis/package.json +100 -0
  389. package/.output/server/node_modules/lodash.defaults/index.js +668 -0
  390. package/.output/server/node_modules/lodash.defaults/package.json +19 -0
  391. package/.output/server/node_modules/lodash.isarguments/index.js +229 -0
  392. package/.output/server/node_modules/lodash.isarguments/package.json +19 -0
  393. package/.output/server/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
  394. package/.output/server/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  395. package/.output/server/node_modules/lru-cache/package.json +116 -0
  396. package/.output/server/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  397. package/.output/server/node_modules/minimatch/dist/commonjs/ast.js +592 -0
  398. package/.output/server/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  399. package/.output/server/node_modules/minimatch/dist/commonjs/escape.js +22 -0
  400. package/.output/server/node_modules/minimatch/dist/commonjs/index.js +1017 -0
  401. package/.output/server/node_modules/minimatch/dist/commonjs/package.json +3 -0
  402. package/.output/server/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
  403. package/.output/server/node_modules/minimatch/package.json +82 -0
  404. package/.output/server/node_modules/minipass/dist/commonjs/index.js +1028 -0
  405. package/.output/server/node_modules/minipass/dist/commonjs/package.json +3 -0
  406. package/.output/server/node_modules/minipass/package.json +82 -0
  407. package/.output/server/node_modules/ms/index.js +162 -0
  408. package/.output/server/node_modules/ms/package.json +38 -0
  409. package/.output/server/node_modules/path-scurry/dist/commonjs/index.js +2014 -0
  410. package/.output/server/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  411. package/.output/server/node_modules/path-scurry/package.json +89 -0
  412. package/.output/server/node_modules/pg/lib/client.js +650 -0
  413. package/.output/server/node_modules/pg/lib/connection-parameters.js +167 -0
  414. package/.output/server/node_modules/pg/lib/connection.js +222 -0
  415. package/.output/server/node_modules/pg/lib/crypto/cert-signatures.js +121 -0
  416. package/.output/server/node_modules/pg/lib/crypto/sasl.js +212 -0
  417. package/.output/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
  418. package/.output/server/node_modules/pg/lib/crypto/utils-webcrypto.js +88 -0
  419. package/.output/server/node_modules/pg/lib/crypto/utils.js +9 -0
  420. package/.output/server/node_modules/pg/lib/defaults.js +84 -0
  421. package/.output/server/node_modules/pg/lib/index.js +58 -0
  422. package/.output/server/node_modules/pg/lib/native/client.js +307 -0
  423. package/.output/server/node_modules/pg/lib/native/index.js +2 -0
  424. package/.output/server/node_modules/pg/lib/native/query.js +168 -0
  425. package/.output/server/node_modules/pg/lib/query.js +253 -0
  426. package/.output/server/node_modules/pg/lib/result.js +108 -0
  427. package/.output/server/node_modules/pg/lib/stream.js +81 -0
  428. package/.output/server/node_modules/pg/lib/type-overrides.js +35 -0
  429. package/.output/server/node_modules/pg/lib/utils.js +206 -0
  430. package/.output/server/node_modules/pg/package.json +62 -0
  431. package/.output/server/node_modules/pg-cloudflare/dist/empty.js +4 -0
  432. package/.output/server/node_modules/pg-cloudflare/package.json +32 -0
  433. package/.output/server/node_modules/pg-connection-string/index.js +112 -0
  434. package/.output/server/node_modules/pg-connection-string/package.json +40 -0
  435. package/.output/server/node_modules/pg-cursor/index.js +265 -0
  436. package/.output/server/node_modules/pg-cursor/package.json +38 -0
  437. package/.output/server/node_modules/pg-int8/index.js +100 -0
  438. package/.output/server/node_modules/pg-int8/package.json +24 -0
  439. package/.output/server/node_modules/pg-pool/index.js +471 -0
  440. package/.output/server/node_modules/pg-pool/package.json +41 -0
  441. package/.output/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
  442. package/.output/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
  443. package/.output/server/node_modules/pg-protocol/dist/index.js +15 -0
  444. package/.output/server/node_modules/pg-protocol/dist/messages.js +160 -0
  445. package/.output/server/node_modules/pg-protocol/dist/parser.js +304 -0
  446. package/.output/server/node_modules/pg-protocol/dist/serializer.js +189 -0
  447. package/.output/server/node_modules/pg-protocol/package.json +35 -0
  448. package/.output/server/node_modules/pg-query-stream/dist/index.js +48 -0
  449. package/.output/server/node_modules/pg-query-stream/package.json +60 -0
  450. package/.output/server/node_modules/pg-types/index.js +47 -0
  451. package/.output/server/node_modules/pg-types/lib/arrayParser.js +11 -0
  452. package/.output/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
  453. package/.output/server/node_modules/pg-types/lib/builtins.js +73 -0
  454. package/.output/server/node_modules/pg-types/lib/textParsers.js +215 -0
  455. package/.output/server/node_modules/pg-types/package.json +42 -0
  456. package/.output/server/node_modules/pgpass/lib/helper.js +233 -0
  457. package/.output/server/node_modules/pgpass/lib/index.js +23 -0
  458. package/.output/server/node_modules/pgpass/package.json +41 -0
  459. package/.output/server/node_modules/postgres-array/index.js +97 -0
  460. package/.output/server/node_modules/postgres-array/package.json +35 -0
  461. package/.output/server/node_modules/postgres-bytea/index.js +31 -0
  462. package/.output/server/node_modules/postgres-bytea/package.json +34 -0
  463. package/.output/server/node_modules/postgres-date/index.js +116 -0
  464. package/.output/server/node_modules/postgres-date/package.json +33 -0
  465. package/.output/server/node_modules/postgres-interval/index.js +125 -0
  466. package/.output/server/node_modules/postgres-interval/package.json +36 -0
  467. package/.output/server/node_modules/redis-errors/index.js +7 -0
  468. package/.output/server/node_modules/redis-errors/lib/modern.js +59 -0
  469. package/.output/server/node_modules/redis-errors/lib/old.js +119 -0
  470. package/.output/server/node_modules/redis-errors/package.json +41 -0
  471. package/.output/server/node_modules/redis-parser/index.js +3 -0
  472. package/.output/server/node_modules/redis-parser/lib/parser.js +552 -0
  473. package/.output/server/node_modules/redis-parser/package.json +53 -0
  474. package/.output/server/node_modules/reflect-metadata/Reflect.js +1415 -0
  475. package/.output/server/node_modules/reflect-metadata/package.json +68 -0
  476. package/.output/server/node_modules/safe-buffer/index.js +65 -0
  477. package/.output/server/node_modules/safe-buffer/package.json +51 -0
  478. package/.output/server/node_modules/sha.js/hash.js +81 -0
  479. package/.output/server/node_modules/sha.js/index.js +15 -0
  480. package/.output/server/node_modules/sha.js/package.json +30 -0
  481. package/.output/server/node_modules/sha.js/sha.js +94 -0
  482. package/.output/server/node_modules/sha.js/sha1.js +99 -0
  483. package/.output/server/node_modules/sha.js/sha224.js +53 -0
  484. package/.output/server/node_modules/sha.js/sha256.js +135 -0
  485. package/.output/server/node_modules/sha.js/sha384.js +57 -0
  486. package/.output/server/node_modules/sha.js/sha512.js +260 -0
  487. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  488. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  489. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  490. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  491. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  492. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  493. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  494. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  495. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  496. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  497. package/.output/server/node_modules/source-map-js/package.json +71 -0
  498. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  499. package/.output/server/node_modules/split2/index.js +141 -0
  500. package/.output/server/node_modules/split2/package.json +39 -0
  501. package/.output/server/node_modules/sql-highlight/lib/escapeHtml.js +59 -0
  502. package/.output/server/node_modules/sql-highlight/lib/index.js +85 -0
  503. package/.output/server/node_modules/sql-highlight/lib/keywords.js +145 -0
  504. package/.output/server/node_modules/sql-highlight/package.json +49 -0
  505. package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
  506. package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node.bak +0 -0
  507. package/.output/server/node_modules/sqlite3/lib/sqlite3-binding.js +1 -0
  508. package/.output/server/node_modules/sqlite3/lib/sqlite3.js +207 -0
  509. package/.output/server/node_modules/sqlite3/lib/trace.js +38 -0
  510. package/.output/server/node_modules/sqlite3/package.json +89 -0
  511. package/.output/server/node_modules/standard-as-callback/built/index.js +41 -0
  512. package/.output/server/node_modules/standard-as-callback/built/utils.js +23 -0
  513. package/.output/server/node_modules/standard-as-callback/package.json +40 -0
  514. package/.output/server/node_modules/supports-color/index.js +152 -0
  515. package/.output/server/node_modules/supports-color/package.json +58 -0
  516. package/.output/server/node_modules/tslib/package.json +47 -0
  517. package/.output/server/node_modules/tslib/tslib.js +484 -0
  518. package/.output/server/node_modules/typeorm/cache/DbQueryResultCache.js +264 -0
  519. package/.output/server/node_modules/typeorm/cache/QueryResultCacheFactory.js +42 -0
  520. package/.output/server/node_modules/typeorm/cache/RedisQueryResultCache.js +197 -0
  521. package/.output/server/node_modules/typeorm/common/DeepPartial.js +4 -0
  522. package/.output/server/node_modules/typeorm/common/EntityTarget.js +4 -0
  523. package/.output/server/node_modules/typeorm/common/MixedList.js +4 -0
  524. package/.output/server/node_modules/typeorm/common/ObjectLiteral.js +4 -0
  525. package/.output/server/node_modules/typeorm/common/ObjectType.js +4 -0
  526. package/.output/server/node_modules/typeorm/common/RelationType.js +4 -0
  527. package/.output/server/node_modules/typeorm/connection/Connection.js +16 -0
  528. package/.output/server/node_modules/typeorm/connection/ConnectionManager.js +66 -0
  529. package/.output/server/node_modules/typeorm/connection/ConnectionMetadataBuilder.js +74 -0
  530. package/.output/server/node_modules/typeorm/connection/ConnectionOptionsReader.js +198 -0
  531. package/.output/server/node_modules/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +111 -0
  532. package/.output/server/node_modules/typeorm/container.js +60 -0
  533. package/.output/server/node_modules/typeorm/data-source/DataSource.js +517 -0
  534. package/.output/server/node_modules/typeorm/decorator/Check.js +27 -0
  535. package/.output/server/node_modules/typeorm/decorator/EntityRepository.js +21 -0
  536. package/.output/server/node_modules/typeorm/decorator/Exclusion.js +27 -0
  537. package/.output/server/node_modules/typeorm/decorator/ForeignKey.js +44 -0
  538. package/.output/server/node_modules/typeorm/decorator/Generated.js +24 -0
  539. package/.output/server/node_modules/typeorm/decorator/Index.js +56 -0
  540. package/.output/server/node_modules/typeorm/decorator/Unique.js +50 -0
  541. package/.output/server/node_modules/typeorm/decorator/columns/Column.js +78 -0
  542. package/.output/server/node_modules/typeorm/decorator/columns/CreateDateColumn.js +21 -0
  543. package/.output/server/node_modules/typeorm/decorator/columns/DeleteDateColumn.js +20 -0
  544. package/.output/server/node_modules/typeorm/decorator/columns/ObjectIdColumn.js +27 -0
  545. package/.output/server/node_modules/typeorm/decorator/columns/PrimaryColumn.js +63 -0
  546. package/.output/server/node_modules/typeorm/decorator/columns/PrimaryGeneratedColumn.js +59 -0
  547. package/.output/server/node_modules/typeorm/decorator/columns/UpdateDateColumn.js +20 -0
  548. package/.output/server/node_modules/typeorm/decorator/columns/VersionColumn.js +21 -0
  549. package/.output/server/node_modules/typeorm/decorator/columns/ViewColumn.js +19 -0
  550. package/.output/server/node_modules/typeorm/decorator/columns/VirtualColumn.js +49 -0
  551. package/.output/server/node_modules/typeorm/decorator/entity/ChildEntity.js +25 -0
  552. package/.output/server/node_modules/typeorm/decorator/entity/Entity.js +31 -0
  553. package/.output/server/node_modules/typeorm/decorator/entity/TableInheritance.js +22 -0
  554. package/.output/server/node_modules/typeorm/decorator/entity-view/ViewEntity.js +32 -0
  555. package/.output/server/node_modules/typeorm/decorator/listeners/AfterInsert.js +19 -0
  556. package/.output/server/node_modules/typeorm/decorator/listeners/AfterLoad.js +19 -0
  557. package/.output/server/node_modules/typeorm/decorator/listeners/AfterRecover.js +19 -0
  558. package/.output/server/node_modules/typeorm/decorator/listeners/AfterRemove.js +19 -0
  559. package/.output/server/node_modules/typeorm/decorator/listeners/AfterSoftRemove.js +19 -0
  560. package/.output/server/node_modules/typeorm/decorator/listeners/AfterUpdate.js +19 -0
  561. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeInsert.js +19 -0
  562. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRecover.js +19 -0
  563. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRemove.js +19 -0
  564. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeSoftRemove.js +19 -0
  565. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeUpdate.js +19 -0
  566. package/.output/server/node_modules/typeorm/decorator/listeners/EventSubscriber.js +17 -0
  567. package/.output/server/node_modules/typeorm/decorator/options/ColumnOptions.js +4 -0
  568. package/.output/server/node_modules/typeorm/decorator/options/EntityOptions.js +4 -0
  569. package/.output/server/node_modules/typeorm/decorator/options/IndexOptions.js +4 -0
  570. package/.output/server/node_modules/typeorm/decorator/options/JoinColumnOptions.js +4 -0
  571. package/.output/server/node_modules/typeorm/decorator/options/JoinTableOptions.js +4 -0
  572. package/.output/server/node_modules/typeorm/decorator/options/RelationOptions.js +4 -0
  573. package/.output/server/node_modules/typeorm/decorator/options/ValueTransformer.js +4 -0
  574. package/.output/server/node_modules/typeorm/decorator/relations/JoinColumn.js +27 -0
  575. package/.output/server/node_modules/typeorm/decorator/relations/JoinTable.js +34 -0
  576. package/.output/server/node_modules/typeorm/decorator/relations/ManyToMany.js +46 -0
  577. package/.output/server/node_modules/typeorm/decorator/relations/ManyToOne.js +46 -0
  578. package/.output/server/node_modules/typeorm/decorator/relations/OneToMany.js +37 -0
  579. package/.output/server/node_modules/typeorm/decorator/relations/OneToOne.js +45 -0
  580. package/.output/server/node_modules/typeorm/decorator/relations/RelationCount.js +23 -0
  581. package/.output/server/node_modules/typeorm/decorator/relations/RelationId.js +22 -0
  582. package/.output/server/node_modules/typeorm/decorator/tree/Tree.js +21 -0
  583. package/.output/server/node_modules/typeorm/decorator/tree/TreeChildren.js +34 -0
  584. package/.output/server/node_modules/typeorm/decorator/tree/TreeLevelColumn.js +19 -0
  585. package/.output/server/node_modules/typeorm/decorator/tree/TreeParent.js +33 -0
  586. package/.output/server/node_modules/typeorm/driver/DriverFactory.js +98 -0
  587. package/.output/server/node_modules/typeorm/driver/DriverUtils.js +228 -0
  588. package/.output/server/node_modules/typeorm/driver/Query.js +16 -0
  589. package/.output/server/node_modules/typeorm/driver/SqlInMemory.js +15 -0
  590. package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +847 -0
  591. package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +1709 -0
  592. package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +103 -0
  593. package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +146 -0
  594. package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +153 -0
  595. package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +126 -0
  596. package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorDriver.js +78 -0
  597. package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorQueryRunner.js +98 -0
  598. package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachDriver.js +885 -0
  599. package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachQueryRunner.js +2453 -0
  600. package/.output/server/node_modules/typeorm/driver/cordova/CordovaDriver.js +76 -0
  601. package/.output/server/node_modules/typeorm/driver/cordova/CordovaQueryRunner.js +170 -0
  602. package/.output/server/node_modules/typeorm/driver/expo/ExpoDriver.js +29 -0
  603. package/.output/server/node_modules/typeorm/driver/expo/ExpoDriverFactory.js +22 -0
  604. package/.output/server/node_modules/typeorm/driver/expo/ExpoQueryRunner.js +65 -0
  605. package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyDriver.js +75 -0
  606. package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyQueryRunner.js +169 -0
  607. package/.output/server/node_modules/typeorm/driver/mongodb/MongoDriver.js +404 -0
  608. package/.output/server/node_modules/typeorm/driver/mongodb/MongoQueryRunner.js +701 -0
  609. package/.output/server/node_modules/typeorm/driver/mongodb/bson.typings.js +5 -0
  610. package/.output/server/node_modules/typeorm/driver/mongodb/typings.js +23 -0
  611. package/.output/server/node_modules/typeorm/driver/mysql/MysqlDriver.js +1105 -0
  612. package/.output/server/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js +2139 -0
  613. package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptDriver.js +94 -0
  614. package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptQueryRunner.js +92 -0
  615. package/.output/server/node_modules/typeorm/driver/oracle/OracleDriver.js +869 -0
  616. package/.output/server/node_modules/typeorm/driver/oracle/OracleQueryRunner.js +1884 -0
  617. package/.output/server/node_modules/typeorm/driver/postgres/PostgresDriver.js +1259 -0
  618. package/.output/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js +2729 -0
  619. package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeDriver.js +728 -0
  620. package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeQueryRunner.js +107 -0
  621. package/.output/server/node_modules/typeorm/driver/sap/SapDriver.js +681 -0
  622. package/.output/server/node_modules/typeorm/driver/sap/SapQueryRunner.js +2054 -0
  623. package/.output/server/node_modules/typeorm/driver/spanner/SpannerDriver.js +613 -0
  624. package/.output/server/node_modules/typeorm/driver/spanner/SpannerQueryRunner.js +1464 -0
  625. package/.output/server/node_modules/typeorm/driver/sqlite/SqliteDriver.js +174 -0
  626. package/.output/server/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js +124 -0
  627. package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +695 -0
  628. package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +1511 -0
  629. package/.output/server/node_modules/typeorm/driver/sqljs/SqljsDriver.js +250 -0
  630. package/.output/server/node_modules/typeorm/driver/sqljs/SqljsQueryRunner.js +123 -0
  631. package/.output/server/node_modules/typeorm/driver/sqlserver/MssqlParameter.js +23 -0
  632. package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js +922 -0
  633. package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerQueryRunner.js +2484 -0
  634. package/.output/server/node_modules/typeorm/driver/types/DatabaseType.js +4 -0
  635. package/.output/server/node_modules/typeorm/driver/types/GeoJsonTypes.js +4 -0
  636. package/.output/server/node_modules/typeorm/driver/types/MetadataTableType.js +11 -0
  637. package/.output/server/node_modules/typeorm/driver/types/ReplicationMode.js +4 -0
  638. package/.output/server/node_modules/typeorm/entity-manager/EntityManager.js +853 -0
  639. package/.output/server/node_modules/typeorm/entity-manager/EntityManagerFactory.js +24 -0
  640. package/.output/server/node_modules/typeorm/entity-manager/MongoEntityManager.js +668 -0
  641. package/.output/server/node_modules/typeorm/entity-manager/SqljsEntityManager.js +44 -0
  642. package/.output/server/node_modules/typeorm/entity-schema/EntitySchema.js +15 -0
  643. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +8 -0
  644. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedError.js +18 -0
  645. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaOptions.js +11 -0
  646. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaTransformer.js +333 -0
  647. package/.output/server/node_modules/typeorm/error/AlreadyHasActiveConnectionError.js +16 -0
  648. package/.output/server/node_modules/typeorm/error/CannotAttachTreeChildrenEntityError.js +16 -0
  649. package/.output/server/node_modules/typeorm/error/CannotConnectAlreadyConnectedError.js +15 -0
  650. package/.output/server/node_modules/typeorm/error/CannotCreateEntityIdMapError.js +21 -0
  651. package/.output/server/node_modules/typeorm/error/CannotDetermineEntityError.js +16 -0
  652. package/.output/server/node_modules/typeorm/error/CannotExecuteNotConnectedError.js +15 -0
  653. package/.output/server/node_modules/typeorm/error/CannotGetEntityManagerNotConnectedError.js +15 -0
  654. package/.output/server/node_modules/typeorm/error/CannotReflectMethodParameterTypeError.js +18 -0
  655. package/.output/server/node_modules/typeorm/error/CircularRelationsError.js +16 -0
  656. package/.output/server/node_modules/typeorm/error/ColumnTypeUndefinedError.js +19 -0
  657. package/.output/server/node_modules/typeorm/error/ConnectionIsNotSetError.js +15 -0
  658. package/.output/server/node_modules/typeorm/error/ConnectionNotFoundError.js +15 -0
  659. package/.output/server/node_modules/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +18 -0
  660. package/.output/server/node_modules/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +18 -0
  661. package/.output/server/node_modules/typeorm/error/CustomRepositoryNotFoundError.js +18 -0
  662. package/.output/server/node_modules/typeorm/error/DataTypeNotSupportedError.js +14 -0
  663. package/.output/server/node_modules/typeorm/error/DriverOptionNotSetError.js +16 -0
  664. package/.output/server/node_modules/typeorm/error/DriverPackageNotInstalledError.js +16 -0
  665. package/.output/server/node_modules/typeorm/error/EntityMetadataNotFoundError.js +29 -0
  666. package/.output/server/node_modules/typeorm/error/EntityNotFoundError.js +42 -0
  667. package/.output/server/node_modules/typeorm/error/EntityPropertyNotFoundError.js +17 -0
  668. package/.output/server/node_modules/typeorm/error/FindRelationsNotFoundError.js +23 -0
  669. package/.output/server/node_modules/typeorm/error/ForbiddenTransactionModeOverrideError.js +16 -0
  670. package/.output/server/node_modules/typeorm/error/InitializedRelationError.js +20 -0
  671. package/.output/server/node_modules/typeorm/error/InsertValuesMissingError.js +16 -0
  672. package/.output/server/node_modules/typeorm/error/LimitOnUpdateNotSupportedError.js +15 -0
  673. package/.output/server/node_modules/typeorm/error/LockNotSupportedOnGivenDriverError.js +15 -0
  674. package/.output/server/node_modules/typeorm/error/MetadataAlreadyExistsError.js +18 -0
  675. package/.output/server/node_modules/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +16 -0
  676. package/.output/server/node_modules/typeorm/error/MissingDeleteDateColumnError.js +12 -0
  677. package/.output/server/node_modules/typeorm/error/MissingDriverError.js +16 -0
  678. package/.output/server/node_modules/typeorm/error/MissingJoinColumnError.js +23 -0
  679. package/.output/server/node_modules/typeorm/error/MissingJoinTableError.js +23 -0
  680. package/.output/server/node_modules/typeorm/error/MissingPrimaryColumnError.js +13 -0
  681. package/.output/server/node_modules/typeorm/error/MustBeEntityError.js +15 -0
  682. package/.output/server/node_modules/typeorm/error/NestedSetMultipleRootError.js +12 -0
  683. package/.output/server/node_modules/typeorm/error/NoConnectionForRepositoryError.js +16 -0
  684. package/.output/server/node_modules/typeorm/error/NoConnectionOptionError.js +16 -0
  685. package/.output/server/node_modules/typeorm/error/NoNeedToReleaseEntityManagerError.js +17 -0
  686. package/.output/server/node_modules/typeorm/error/NoVersionOrUpdateDateColumnError.js +15 -0
  687. package/.output/server/node_modules/typeorm/error/OffsetWithoutLimitNotSupportedError.js +17 -0
  688. package/.output/server/node_modules/typeorm/error/OptimisticLockCanNotBeUsedError.js +15 -0
  689. package/.output/server/node_modules/typeorm/error/OptimisticLockVersionMismatchError.js +15 -0
  690. package/.output/server/node_modules/typeorm/error/PersistedEntityNotFoundError.js +15 -0
  691. package/.output/server/node_modules/typeorm/error/PessimisticLockTransactionRequiredError.js +15 -0
  692. package/.output/server/node_modules/typeorm/error/PrimaryColumnCannotBeNullableError.js +13 -0
  693. package/.output/server/node_modules/typeorm/error/QueryFailedError.js +30 -0
  694. package/.output/server/node_modules/typeorm/error/QueryRunnerAlreadyReleasedError.js +12 -0
  695. package/.output/server/node_modules/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +16 -0
  696. package/.output/server/node_modules/typeorm/error/RepositoryNotTreeError.js +32 -0
  697. package/.output/server/node_modules/typeorm/error/ReturningStatementNotSupportedError.js +16 -0
  698. package/.output/server/node_modules/typeorm/error/SubjectRemovedAndUpdatedError.js +16 -0
  699. package/.output/server/node_modules/typeorm/error/SubjectWithoutIdentifierError.js +17 -0
  700. package/.output/server/node_modules/typeorm/error/TransactionAlreadyStartedError.js +15 -0
  701. package/.output/server/node_modules/typeorm/error/TransactionNotStartedError.js +15 -0
  702. package/.output/server/node_modules/typeorm/error/TreeRepositoryNotSupportedError.js +12 -0
  703. package/.output/server/node_modules/typeorm/error/TypeORMError.js +23 -0
  704. package/.output/server/node_modules/typeorm/error/UpdateValuesMissingError.js +12 -0
  705. package/.output/server/node_modules/typeorm/error/UsingJoinColumnIsNotAllowedError.js +13 -0
  706. package/.output/server/node_modules/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +14 -0
  707. package/.output/server/node_modules/typeorm/error/UsingJoinTableIsNotAllowedError.js +14 -0
  708. package/.output/server/node_modules/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +14 -0
  709. package/.output/server/node_modules/typeorm/error/index.js +66 -0
  710. package/.output/server/node_modules/typeorm/find-options/EqualOperator.js +13 -0
  711. package/.output/server/node_modules/typeorm/find-options/FindManyOptions.js +4 -0
  712. package/.output/server/node_modules/typeorm/find-options/FindOneOptions.js +4 -0
  713. package/.output/server/node_modules/typeorm/find-options/FindOperator.js +96 -0
  714. package/.output/server/node_modules/typeorm/find-options/FindOperatorType.js +4 -0
  715. package/.output/server/node_modules/typeorm/find-options/FindOptionsOrder.js +4 -0
  716. package/.output/server/node_modules/typeorm/find-options/FindOptionsRelations.js +4 -0
  717. package/.output/server/node_modules/typeorm/find-options/FindOptionsSelect.js +4 -0
  718. package/.output/server/node_modules/typeorm/find-options/FindOptionsUtils.js +350 -0
  719. package/.output/server/node_modules/typeorm/find-options/FindOptionsWhere.js +4 -0
  720. package/.output/server/node_modules/typeorm/find-options/FindTreeOptions.js +4 -0
  721. package/.output/server/node_modules/typeorm/find-options/JoinOptions.js +4 -0
  722. package/.output/server/node_modules/typeorm/find-options/OrderByCondition.js +4 -0
  723. package/.output/server/node_modules/typeorm/find-options/operator/And.js +9 -0
  724. package/.output/server/node_modules/typeorm/find-options/operator/Any.js +13 -0
  725. package/.output/server/node_modules/typeorm/find-options/operator/ArrayContainedBy.js +13 -0
  726. package/.output/server/node_modules/typeorm/find-options/operator/ArrayContains.js +13 -0
  727. package/.output/server/node_modules/typeorm/find-options/operator/ArrayOverlap.js +13 -0
  728. package/.output/server/node_modules/typeorm/find-options/operator/Between.js +13 -0
  729. package/.output/server/node_modules/typeorm/find-options/operator/Equal.js +17 -0
  730. package/.output/server/node_modules/typeorm/find-options/operator/ILike.js +13 -0
  731. package/.output/server/node_modules/typeorm/find-options/operator/In.js +13 -0
  732. package/.output/server/node_modules/typeorm/find-options/operator/IsNull.js +13 -0
  733. package/.output/server/node_modules/typeorm/find-options/operator/JsonContains.js +13 -0
  734. package/.output/server/node_modules/typeorm/find-options/operator/LessThan.js +13 -0
  735. package/.output/server/node_modules/typeorm/find-options/operator/LessThanOrEqual.js +13 -0
  736. package/.output/server/node_modules/typeorm/find-options/operator/Like.js +13 -0
  737. package/.output/server/node_modules/typeorm/find-options/operator/MoreThan.js +13 -0
  738. package/.output/server/node_modules/typeorm/find-options/operator/MoreThanOrEqual.js +13 -0
  739. package/.output/server/node_modules/typeorm/find-options/operator/Not.js +14 -0
  740. package/.output/server/node_modules/typeorm/find-options/operator/Or.js +9 -0
  741. package/.output/server/node_modules/typeorm/find-options/operator/Raw.js +12 -0
  742. package/.output/server/node_modules/typeorm/globals.js +182 -0
  743. package/.output/server/node_modules/typeorm/index.js +196 -0
  744. package/.output/server/node_modules/typeorm/index.mjs +422 -0
  745. package/.output/server/node_modules/typeorm/logger/AbstractLogger.js +238 -0
  746. package/.output/server/node_modules/typeorm/logger/AdvancedConsoleLogger.js +56 -0
  747. package/.output/server/node_modules/typeorm/logger/DebugLogger.js +78 -0
  748. package/.output/server/node_modules/typeorm/logger/FileLogger.js +88 -0
  749. package/.output/server/node_modules/typeorm/logger/FormattedConsoleLogger.js +59 -0
  750. package/.output/server/node_modules/typeorm/logger/Logger.js +4 -0
  751. package/.output/server/node_modules/typeorm/logger/LoggerFactory.js +39 -0
  752. package/.output/server/node_modules/typeorm/logger/LoggerOptions.js +4 -0
  753. package/.output/server/node_modules/typeorm/logger/SimpleConsoleLogger.js +57 -0
  754. package/.output/server/node_modules/typeorm/metadata/CheckMetadata.js +35 -0
  755. package/.output/server/node_modules/typeorm/metadata/ColumnMetadata.js +618 -0
  756. package/.output/server/node_modules/typeorm/metadata/EmbeddedMetadata.js +224 -0
  757. package/.output/server/node_modules/typeorm/metadata/EntityListenerMetadata.js +77 -0
  758. package/.output/server/node_modules/typeorm/metadata/EntityMetadata.js +692 -0
  759. package/.output/server/node_modules/typeorm/metadata/ExclusionMetadata.js +35 -0
  760. package/.output/server/node_modules/typeorm/metadata/ForeignKeyMetadata.js +57 -0
  761. package/.output/server/node_modules/typeorm/metadata/IndexMetadata.js +144 -0
  762. package/.output/server/node_modules/typeorm/metadata/RelationCountMetadata.js +39 -0
  763. package/.output/server/node_modules/typeorm/metadata/RelationIdMetadata.js +62 -0
  764. package/.output/server/node_modules/typeorm/metadata/RelationMetadata.js +440 -0
  765. package/.output/server/node_modules/typeorm/metadata/UniqueMetadata.js +101 -0
  766. package/.output/server/node_modules/typeorm/metadata/types/EventListenerTypes.js +22 -0
  767. package/.output/server/node_modules/typeorm/metadata-args/MetadataArgsStorage.js +236 -0
  768. package/.output/server/node_modules/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +145 -0
  769. package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js +838 -0
  770. package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataValidator.js +258 -0
  771. package/.output/server/node_modules/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +287 -0
  772. package/.output/server/node_modules/typeorm/metadata-builder/MetadataUtils.js +44 -0
  773. package/.output/server/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js +185 -0
  774. package/.output/server/node_modules/typeorm/migration/Migration.js +21 -0
  775. package/.output/server/node_modules/typeorm/migration/MigrationExecutor.js +534 -0
  776. package/.output/server/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.js +145 -0
  777. package/.output/server/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.js +50 -0
  778. package/.output/server/node_modules/typeorm/package.json +268 -0
  779. package/.output/server/node_modules/typeorm/persistence/EntityPersistExecutor.js +170 -0
  780. package/.output/server/node_modules/typeorm/persistence/Subject.js +239 -0
  781. package/.output/server/node_modules/typeorm/persistence/SubjectChangedColumnsComputer.js +216 -0
  782. package/.output/server/node_modules/typeorm/persistence/SubjectDatabaseEntityLoader.js +135 -0
  783. package/.output/server/node_modules/typeorm/persistence/SubjectExecutor.js +760 -0
  784. package/.output/server/node_modules/typeorm/persistence/SubjectTopologicalSorter.js +174 -0
  785. package/.output/server/node_modules/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +107 -0
  786. package/.output/server/node_modules/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +218 -0
  787. package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +181 -0
  788. package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +155 -0
  789. package/.output/server/node_modules/typeorm/persistence/tree/ClosureSubjectExecutor.js +241 -0
  790. package/.output/server/node_modules/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +125 -0
  791. package/.output/server/node_modules/typeorm/persistence/tree/NestedSetSubjectExecutor.js +271 -0
  792. package/.output/server/node_modules/typeorm/platform/PlatformTools.js +243 -0
  793. package/.output/server/node_modules/typeorm/query-builder/Alias.js +29 -0
  794. package/.output/server/node_modules/typeorm/query-builder/Brackets.js +19 -0
  795. package/.output/server/node_modules/typeorm/query-builder/DeleteQueryBuilder.js +200 -0
  796. package/.output/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js +745 -0
  797. package/.output/server/node_modules/typeorm/query-builder/JoinAttribute.js +175 -0
  798. package/.output/server/node_modules/typeorm/query-builder/NotBrackets.js +17 -0
  799. package/.output/server/node_modules/typeorm/query-builder/QueryBuilder.js +1139 -0
  800. package/.output/server/node_modules/typeorm/query-builder/QueryBuilderUtils.js +32 -0
  801. package/.output/server/node_modules/typeorm/query-builder/QueryExpressionMap.js +328 -0
  802. package/.output/server/node_modules/typeorm/query-builder/RelationIdLoader.js +503 -0
  803. package/.output/server/node_modules/typeorm/query-builder/RelationLoader.js +283 -0
  804. package/.output/server/node_modules/typeorm/query-builder/RelationQueryBuilder.js +155 -0
  805. package/.output/server/node_modules/typeorm/query-builder/RelationRemover.js +143 -0
  806. package/.output/server/node_modules/typeorm/query-builder/RelationUpdater.js +152 -0
  807. package/.output/server/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js +176 -0
  808. package/.output/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js +2656 -0
  809. package/.output/server/node_modules/typeorm/query-builder/SoftDeleteQueryBuilder.js +368 -0
  810. package/.output/server/node_modules/typeorm/query-builder/UpdateQueryBuilder.js +498 -0
  811. package/.output/server/node_modules/typeorm/query-builder/index.js +20 -0
  812. package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountAttribute.js +80 -0
  813. package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountLoader.js +168 -0
  814. package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +55 -0
  815. package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdAttribute.js +88 -0
  816. package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdLoader.js +275 -0
  817. package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +55 -0
  818. package/.output/server/node_modules/typeorm/query-builder/result/DeleteResult.js +17 -0
  819. package/.output/server/node_modules/typeorm/query-builder/result/InsertResult.js +28 -0
  820. package/.output/server/node_modules/typeorm/query-builder/result/UpdateResult.js +29 -0
  821. package/.output/server/node_modules/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +196 -0
  822. package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +112 -0
  823. package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +92 -0
  824. package/.output/server/node_modules/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +447 -0
  825. package/.output/server/node_modules/typeorm/query-runner/BaseQueryRunner.js +454 -0
  826. package/.output/server/node_modules/typeorm/query-runner/QueryLock.js +28 -0
  827. package/.output/server/node_modules/typeorm/query-runner/QueryResult.js +17 -0
  828. package/.output/server/node_modules/typeorm/repository/AbstractRepository.js +92 -0
  829. package/.output/server/node_modules/typeorm/repository/BaseEntity.js +328 -0
  830. package/.output/server/node_modules/typeorm/repository/MongoRepository.js +305 -0
  831. package/.output/server/node_modules/typeorm/repository/RemoveOptions.js +4 -0
  832. package/.output/server/node_modules/typeorm/repository/Repository.js +379 -0
  833. package/.output/server/node_modules/typeorm/repository/SaveOptions.js +4 -0
  834. package/.output/server/node_modules/typeorm/repository/TreeRepository.js +255 -0
  835. package/.output/server/node_modules/typeorm/schema-builder/MongoSchemaBuilder.js +66 -0
  836. package/.output/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js +929 -0
  837. package/.output/server/node_modules/typeorm/schema-builder/options/TableCheckOptions.js +4 -0
  838. package/.output/server/node_modules/typeorm/schema-builder/options/TableColumnOptions.js +4 -0
  839. package/.output/server/node_modules/typeorm/schema-builder/options/TableExclusionOptions.js +4 -0
  840. package/.output/server/node_modules/typeorm/schema-builder/options/TableForeignKeyOptions.js +4 -0
  841. package/.output/server/node_modules/typeorm/schema-builder/options/TableIndexOptions.js +4 -0
  842. package/.output/server/node_modules/typeorm/schema-builder/options/TableOptions.js +4 -0
  843. package/.output/server/node_modules/typeorm/schema-builder/options/TableUniqueOptions.js +4 -0
  844. package/.output/server/node_modules/typeorm/schema-builder/options/ViewOptions.js +4 -0
  845. package/.output/server/node_modules/typeorm/schema-builder/table/Table.js +296 -0
  846. package/.output/server/node_modules/typeorm/schema-builder/table/TableCheck.js +49 -0
  847. package/.output/server/node_modules/typeorm/schema-builder/table/TableColumn.js +117 -0
  848. package/.output/server/node_modules/typeorm/schema-builder/table/TableExclusion.js +43 -0
  849. package/.output/server/node_modules/typeorm/schema-builder/table/TableForeignKey.js +72 -0
  850. package/.output/server/node_modules/typeorm/schema-builder/table/TableIndex.js +68 -0
  851. package/.output/server/node_modules/typeorm/schema-builder/table/TableUnique.js +50 -0
  852. package/.output/server/node_modules/typeorm/schema-builder/util/TableUtils.js +41 -0
  853. package/.output/server/node_modules/typeorm/schema-builder/util/ViewUtils.js +27 -0
  854. package/.output/server/node_modules/typeorm/schema-builder/view/View.js +71 -0
  855. package/.output/server/node_modules/typeorm/subscriber/Broadcaster.js +660 -0
  856. package/.output/server/node_modules/typeorm/subscriber/BroadcasterResult.js +30 -0
  857. package/.output/server/node_modules/typeorm/subscriber/event/QueryEvent.js +4 -0
  858. package/.output/server/node_modules/typeorm/util/ApplyValueTransformers.js +25 -0
  859. package/.output/server/node_modules/typeorm/util/DateUtils.js +229 -0
  860. package/.output/server/node_modules/typeorm/util/DepGraph.js +230 -0
  861. package/.output/server/node_modules/typeorm/util/DirectoryExportedClassesLoader.js +65 -0
  862. package/.output/server/node_modules/typeorm/util/ImportUtils.js +66 -0
  863. package/.output/server/node_modules/typeorm/util/InstanceChecker.js +104 -0
  864. package/.output/server/node_modules/typeorm/util/ObjectUtils.js +49 -0
  865. package/.output/server/node_modules/typeorm/util/OrmUtils.js +443 -0
  866. package/.output/server/node_modules/typeorm/util/PathUtils.js +33 -0
  867. package/.output/server/node_modules/typeorm/util/RandomGenerator.js +154 -0
  868. package/.output/server/node_modules/typeorm/util/SqlTagUtils.js +43 -0
  869. package/.output/server/node_modules/typeorm/util/StringUtils.js +113 -0
  870. package/.output/server/node_modules/typeorm/util/TreeRepositoryUtils.js +67 -0
  871. package/.output/server/node_modules/typeorm/util/VersionUtils.js +27 -0
  872. package/.output/server/node_modules/typeorm/util/escapeRegExp.js +10 -0
  873. package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
  874. package/.output/server/node_modules/ufo/package.json +47 -0
  875. package/.output/server/node_modules/unhead/dist/plugins.mjs +94 -0
  876. package/.output/server/node_modules/unhead/dist/server.mjs +220 -0
  877. package/.output/server/node_modules/unhead/dist/shared/unhead.C13swrCa.mjs +48 -0
  878. package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
  879. package/.output/server/node_modules/unhead/dist/shared/unhead.Cp0iF6eN.mjs +177 -0
  880. package/.output/server/node_modules/unhead/dist/shared/unhead.DGkFBTYv.mjs +172 -0
  881. package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  882. package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
  883. package/.output/server/node_modules/unhead/dist/shared/unhead.DeCxexjU.mjs +166 -0
  884. package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  885. package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  886. package/.output/server/node_modules/unhead/package.json +101 -0
  887. package/.output/server/node_modules/uuid/dist/cjs/index.js +31 -0
  888. package/.output/server/node_modules/uuid/dist/cjs/max.js +3 -0
  889. package/.output/server/node_modules/uuid/dist/cjs/md5.js +13 -0
  890. package/.output/server/node_modules/uuid/dist/cjs/native.js +4 -0
  891. package/.output/server/node_modules/uuid/dist/cjs/nil.js +3 -0
  892. package/.output/server/node_modules/uuid/dist/cjs/package.json +1 -0
  893. package/.output/server/node_modules/uuid/dist/cjs/parse.js +11 -0
  894. package/.output/server/node_modules/uuid/dist/cjs/regex.js +3 -0
  895. package/.output/server/node_modules/uuid/dist/cjs/rng.js +13 -0
  896. package/.output/server/node_modules/uuid/dist/cjs/sha1.js +13 -0
  897. package/.output/server/node_modules/uuid/dist/cjs/stringify.js +39 -0
  898. package/.output/server/node_modules/uuid/dist/cjs/v1.js +87 -0
  899. package/.output/server/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  900. package/.output/server/node_modules/uuid/dist/cjs/v3.js +14 -0
  901. package/.output/server/node_modules/uuid/dist/cjs/v35.js +41 -0
  902. package/.output/server/node_modules/uuid/dist/cjs/v4.js +29 -0
  903. package/.output/server/node_modules/uuid/dist/cjs/v5.js +14 -0
  904. package/.output/server/node_modules/uuid/dist/cjs/v6.js +19 -0
  905. package/.output/server/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  906. package/.output/server/node_modules/uuid/dist/cjs/v7.js +69 -0
  907. package/.output/server/node_modules/uuid/dist/cjs/validate.js +7 -0
  908. package/.output/server/node_modules/uuid/dist/cjs/version.js +10 -0
  909. package/.output/server/node_modules/uuid/package.json +132 -0
  910. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  911. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  912. package/.output/server/node_modules/vue/index.js +7 -0
  913. package/.output/server/node_modules/vue/index.mjs +1 -0
  914. package/.output/server/node_modules/vue/package.json +112 -0
  915. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  916. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
  917. package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
  918. package/.output/server/node_modules/xtend/mutable.js +17 -0
  919. package/.output/server/node_modules/xtend/package.json +55 -0
  920. package/.output/server/node_modules/zod/index.js +4 -0
  921. package/.output/server/node_modules/zod/package.json +135 -0
  922. package/.output/server/node_modules/zod/v3/ZodError.js +133 -0
  923. package/.output/server/node_modules/zod/v3/errors.js +9 -0
  924. package/.output/server/node_modules/zod/v3/external.js +6 -0
  925. package/.output/server/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  926. package/.output/server/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  927. package/.output/server/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  928. package/.output/server/node_modules/zod/v3/helpers/util.js +133 -0
  929. package/.output/server/node_modules/zod/v3/index.js +4 -0
  930. package/.output/server/node_modules/zod/v3/locales/en.js +109 -0
  931. package/.output/server/node_modules/zod/v3/package.json +6 -0
  932. package/.output/server/node_modules/zod/v3/types.js +3695 -0
  933. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
  934. package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
  935. package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
  936. package/.output/server/node_modules/zod/v4/classic/errors.js +48 -0
  937. package/.output/server/node_modules/zod/v4/classic/external.js +20 -0
  938. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
  939. package/.output/server/node_modules/zod/v4/classic/index.js +4 -0
  940. package/.output/server/node_modules/zod/v4/classic/iso.js +30 -0
  941. package/.output/server/node_modules/zod/v4/classic/package.json +6 -0
  942. package/.output/server/node_modules/zod/v4/classic/parse.js +15 -0
  943. package/.output/server/node_modules/zod/v4/classic/schemas.js +1157 -0
  944. package/.output/server/node_modules/zod/v4/core/api.js +1082 -0
  945. package/.output/server/node_modules/zod/v4/core/checks.js +575 -0
  946. package/.output/server/node_modules/zod/v4/core/core.js +76 -0
  947. package/.output/server/node_modules/zod/v4/core/doc.js +35 -0
  948. package/.output/server/node_modules/zod/v4/core/errors.js +182 -0
  949. package/.output/server/node_modules/zod/v4/core/index.js +16 -0
  950. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  951. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
  952. package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
  953. package/.output/server/node_modules/zod/v4/core/package.json +6 -0
  954. package/.output/server/node_modules/zod/v4/core/parse.js +93 -0
  955. package/.output/server/node_modules/zod/v4/core/regexes.js +133 -0
  956. package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
  957. package/.output/server/node_modules/zod/v4/core/schemas.js +2095 -0
  958. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +437 -0
  959. package/.output/server/node_modules/zod/v4/core/util.js +651 -0
  960. package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
  961. package/.output/server/node_modules/zod/v4/index.js +3 -0
  962. package/.output/server/node_modules/zod/v4/locales/ar.js +106 -0
  963. package/.output/server/node_modules/zod/v4/locales/az.js +105 -0
  964. package/.output/server/node_modules/zod/v4/locales/be.js +156 -0
  965. package/.output/server/node_modules/zod/v4/locales/bg.js +120 -0
  966. package/.output/server/node_modules/zod/v4/locales/ca.js +107 -0
  967. package/.output/server/node_modules/zod/v4/locales/cs.js +111 -0
  968. package/.output/server/node_modules/zod/v4/locales/da.js +115 -0
  969. package/.output/server/node_modules/zod/v4/locales/de.js +108 -0
  970. package/.output/server/node_modules/zod/v4/locales/en.js +109 -0
  971. package/.output/server/node_modules/zod/v4/locales/eo.js +109 -0
  972. package/.output/server/node_modules/zod/v4/locales/es.js +132 -0
  973. package/.output/server/node_modules/zod/v4/locales/fa.js +114 -0
  974. package/.output/server/node_modules/zod/v4/locales/fi.js +112 -0
  975. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +107 -0
  976. package/.output/server/node_modules/zod/v4/locales/fr.js +108 -0
  977. package/.output/server/node_modules/zod/v4/locales/he.js +214 -0
  978. package/.output/server/node_modules/zod/v4/locales/hu.js +108 -0
  979. package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
  980. package/.output/server/node_modules/zod/v4/locales/id.js +106 -0
  981. package/.output/server/node_modules/zod/v4/locales/index.js +49 -0
  982. package/.output/server/node_modules/zod/v4/locales/is.js +109 -0
  983. package/.output/server/node_modules/zod/v4/locales/it.js +108 -0
  984. package/.output/server/node_modules/zod/v4/locales/ja.js +107 -0
  985. package/.output/server/node_modules/zod/v4/locales/ka.js +112 -0
  986. package/.output/server/node_modules/zod/v4/locales/kh.js +5 -0
  987. package/.output/server/node_modules/zod/v4/locales/km.js +110 -0
  988. package/.output/server/node_modules/zod/v4/locales/ko.js +111 -0
  989. package/.output/server/node_modules/zod/v4/locales/lt.js +203 -0
  990. package/.output/server/node_modules/zod/v4/locales/mk.js +109 -0
  991. package/.output/server/node_modules/zod/v4/locales/ms.js +107 -0
  992. package/.output/server/node_modules/zod/v4/locales/nl.js +110 -0
  993. package/.output/server/node_modules/zod/v4/locales/no.js +108 -0
  994. package/.output/server/node_modules/zod/v4/locales/ota.js +109 -0
  995. package/.output/server/node_modules/zod/v4/locales/package.json +6 -0
  996. package/.output/server/node_modules/zod/v4/locales/pl.js +109 -0
  997. package/.output/server/node_modules/zod/v4/locales/ps.js +114 -0
  998. package/.output/server/node_modules/zod/v4/locales/pt.js +108 -0
  999. package/.output/server/node_modules/zod/v4/locales/ru.js +156 -0
  1000. package/.output/server/node_modules/zod/v4/locales/sl.js +109 -0
  1001. package/.output/server/node_modules/zod/v4/locales/sv.js +110 -0
  1002. package/.output/server/node_modules/zod/v4/locales/ta.js +110 -0
  1003. package/.output/server/node_modules/zod/v4/locales/th.js +110 -0
  1004. package/.output/server/node_modules/zod/v4/locales/tr.js +105 -0
  1005. package/.output/server/node_modules/zod/v4/locales/ua.js +5 -0
  1006. package/.output/server/node_modules/zod/v4/locales/uk.js +108 -0
  1007. package/.output/server/node_modules/zod/v4/locales/ur.js +110 -0
  1008. package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
  1009. package/.output/server/node_modules/zod/v4/locales/vi.js +108 -0
  1010. package/.output/server/node_modules/zod/v4/locales/yo.js +107 -0
  1011. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +109 -0
  1012. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +107 -0
  1013. package/.output/server/node_modules/zod/v4/package.json +6 -0
  1014. package/.output/server/package.json +95 -0
  1015. package/README.md +46 -0
  1016. package/bin/cli.mjs +113 -0
  1017. package/bin/entry.cjs +84 -0
  1018. package/package.json +48 -0
@@ -0,0 +1,2095 @@
1
+ import * as checks from "./checks.js";
2
+ import * as core from "./core.js";
3
+ import { Doc } from "./doc.js";
4
+ import { parse, parseAsync, safeParse, safeParseAsync } from "./parse.js";
5
+ import * as regexes from "./regexes.js";
6
+ import * as util from "./util.js";
7
+ import { version } from "./versions.js";
8
+ export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
9
+ var _a;
10
+ inst ?? (inst = {});
11
+ inst._zod.def = def; // set _def property
12
+ inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
13
+ inst._zod.version = version;
14
+ const checks = [...(inst._zod.def.checks ?? [])];
15
+ // if inst is itself a checks.$ZodCheck, run it as a check
16
+ if (inst._zod.traits.has("$ZodCheck")) {
17
+ checks.unshift(inst);
18
+ }
19
+ for (const ch of checks) {
20
+ for (const fn of ch._zod.onattach) {
21
+ fn(inst);
22
+ }
23
+ }
24
+ if (checks.length === 0) {
25
+ // deferred initializer
26
+ // inst._zod.parse is not yet defined
27
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
28
+ inst._zod.deferred?.push(() => {
29
+ inst._zod.run = inst._zod.parse;
30
+ });
31
+ }
32
+ else {
33
+ const runChecks = (payload, checks, ctx) => {
34
+ let isAborted = util.aborted(payload);
35
+ let asyncResult;
36
+ for (const ch of checks) {
37
+ if (ch._zod.def.when) {
38
+ const shouldRun = ch._zod.def.when(payload);
39
+ if (!shouldRun)
40
+ continue;
41
+ }
42
+ else if (isAborted) {
43
+ continue;
44
+ }
45
+ const currLen = payload.issues.length;
46
+ const _ = ch._zod.check(payload);
47
+ if (_ instanceof Promise && ctx?.async === false) {
48
+ throw new core.$ZodAsyncError();
49
+ }
50
+ if (asyncResult || _ instanceof Promise) {
51
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
52
+ await _;
53
+ const nextLen = payload.issues.length;
54
+ if (nextLen === currLen)
55
+ return;
56
+ if (!isAborted)
57
+ isAborted = util.aborted(payload, currLen);
58
+ });
59
+ }
60
+ else {
61
+ const nextLen = payload.issues.length;
62
+ if (nextLen === currLen)
63
+ continue;
64
+ if (!isAborted)
65
+ isAborted = util.aborted(payload, currLen);
66
+ }
67
+ }
68
+ if (asyncResult) {
69
+ return asyncResult.then(() => {
70
+ return payload;
71
+ });
72
+ }
73
+ return payload;
74
+ };
75
+ const handleCanaryResult = (canary, payload, ctx) => {
76
+ // abort if the canary is aborted
77
+ if (util.aborted(canary)) {
78
+ canary.aborted = true;
79
+ return canary;
80
+ }
81
+ // run checks first, then
82
+ const checkResult = runChecks(payload, checks, ctx);
83
+ if (checkResult instanceof Promise) {
84
+ if (ctx.async === false)
85
+ throw new core.$ZodAsyncError();
86
+ return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
87
+ }
88
+ return inst._zod.parse(checkResult, ctx);
89
+ };
90
+ inst._zod.run = (payload, ctx) => {
91
+ if (ctx.skipChecks) {
92
+ return inst._zod.parse(payload, ctx);
93
+ }
94
+ if (ctx.direction === "backward") {
95
+ // run canary
96
+ // initial pass (no checks)
97
+ const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
98
+ if (canary instanceof Promise) {
99
+ return canary.then((canary) => {
100
+ return handleCanaryResult(canary, payload, ctx);
101
+ });
102
+ }
103
+ return handleCanaryResult(canary, payload, ctx);
104
+ }
105
+ // forward
106
+ const result = inst._zod.parse(payload, ctx);
107
+ if (result instanceof Promise) {
108
+ if (ctx.async === false)
109
+ throw new core.$ZodAsyncError();
110
+ return result.then((result) => runChecks(result, checks, ctx));
111
+ }
112
+ return runChecks(result, checks, ctx);
113
+ };
114
+ }
115
+ // Lazy initialize ~standard to avoid creating objects for every schema
116
+ util.defineLazy(inst, "~standard", () => ({
117
+ validate: (value) => {
118
+ try {
119
+ const r = safeParse(inst, value);
120
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
121
+ }
122
+ catch (_) {
123
+ return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));
124
+ }
125
+ },
126
+ vendor: "zod",
127
+ version: 1,
128
+ }));
129
+ });
130
+ export { clone } from "./util.js";
131
+ export const $ZodString = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
132
+ $ZodType.init(inst, def);
133
+ inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);
134
+ inst._zod.parse = (payload, _) => {
135
+ if (def.coerce)
136
+ try {
137
+ payload.value = String(payload.value);
138
+ }
139
+ catch (_) { }
140
+ if (typeof payload.value === "string")
141
+ return payload;
142
+ payload.issues.push({
143
+ expected: "string",
144
+ code: "invalid_type",
145
+ input: payload.value,
146
+ inst,
147
+ });
148
+ return payload;
149
+ };
150
+ });
151
+ export const $ZodStringFormat = /*@__PURE__*/ core.$constructor("$ZodStringFormat", (inst, def) => {
152
+ // check initialization must come first
153
+ checks.$ZodCheckStringFormat.init(inst, def);
154
+ $ZodString.init(inst, def);
155
+ });
156
+ export const $ZodGUID = /*@__PURE__*/ core.$constructor("$ZodGUID", (inst, def) => {
157
+ def.pattern ?? (def.pattern = regexes.guid);
158
+ $ZodStringFormat.init(inst, def);
159
+ });
160
+ export const $ZodUUID = /*@__PURE__*/ core.$constructor("$ZodUUID", (inst, def) => {
161
+ if (def.version) {
162
+ const versionMap = {
163
+ v1: 1,
164
+ v2: 2,
165
+ v3: 3,
166
+ v4: 4,
167
+ v5: 5,
168
+ v6: 6,
169
+ v7: 7,
170
+ v8: 8,
171
+ };
172
+ const v = versionMap[def.version];
173
+ if (v === undefined)
174
+ throw new Error(`Invalid UUID version: "${def.version}"`);
175
+ def.pattern ?? (def.pattern = regexes.uuid(v));
176
+ }
177
+ else
178
+ def.pattern ?? (def.pattern = regexes.uuid());
179
+ $ZodStringFormat.init(inst, def);
180
+ });
181
+ export const $ZodEmail = /*@__PURE__*/ core.$constructor("$ZodEmail", (inst, def) => {
182
+ def.pattern ?? (def.pattern = regexes.email);
183
+ $ZodStringFormat.init(inst, def);
184
+ });
185
+ export const $ZodURL = /*@__PURE__*/ core.$constructor("$ZodURL", (inst, def) => {
186
+ $ZodStringFormat.init(inst, def);
187
+ inst._zod.check = (payload) => {
188
+ try {
189
+ // Trim whitespace from input
190
+ const trimmed = payload.value.trim();
191
+ // @ts-ignore
192
+ const url = new URL(trimmed);
193
+ if (def.hostname) {
194
+ def.hostname.lastIndex = 0;
195
+ if (!def.hostname.test(url.hostname)) {
196
+ payload.issues.push({
197
+ code: "invalid_format",
198
+ format: "url",
199
+ note: "Invalid hostname",
200
+ pattern: def.hostname.source,
201
+ input: payload.value,
202
+ inst,
203
+ continue: !def.abort,
204
+ });
205
+ }
206
+ }
207
+ if (def.protocol) {
208
+ def.protocol.lastIndex = 0;
209
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
210
+ payload.issues.push({
211
+ code: "invalid_format",
212
+ format: "url",
213
+ note: "Invalid protocol",
214
+ pattern: def.protocol.source,
215
+ input: payload.value,
216
+ inst,
217
+ continue: !def.abort,
218
+ });
219
+ }
220
+ }
221
+ // Set the output value based on normalize flag
222
+ if (def.normalize) {
223
+ // Use normalized URL
224
+ payload.value = url.href;
225
+ }
226
+ else {
227
+ // Preserve the original input (trimmed)
228
+ payload.value = trimmed;
229
+ }
230
+ return;
231
+ }
232
+ catch (_) {
233
+ payload.issues.push({
234
+ code: "invalid_format",
235
+ format: "url",
236
+ input: payload.value,
237
+ inst,
238
+ continue: !def.abort,
239
+ });
240
+ }
241
+ };
242
+ });
243
+ export const $ZodEmoji = /*@__PURE__*/ core.$constructor("$ZodEmoji", (inst, def) => {
244
+ def.pattern ?? (def.pattern = regexes.emoji());
245
+ $ZodStringFormat.init(inst, def);
246
+ });
247
+ export const $ZodNanoID = /*@__PURE__*/ core.$constructor("$ZodNanoID", (inst, def) => {
248
+ def.pattern ?? (def.pattern = regexes.nanoid);
249
+ $ZodStringFormat.init(inst, def);
250
+ });
251
+ export const $ZodCUID = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def) => {
252
+ def.pattern ?? (def.pattern = regexes.cuid);
253
+ $ZodStringFormat.init(inst, def);
254
+ });
255
+ export const $ZodCUID2 = /*@__PURE__*/ core.$constructor("$ZodCUID2", (inst, def) => {
256
+ def.pattern ?? (def.pattern = regexes.cuid2);
257
+ $ZodStringFormat.init(inst, def);
258
+ });
259
+ export const $ZodULID = /*@__PURE__*/ core.$constructor("$ZodULID", (inst, def) => {
260
+ def.pattern ?? (def.pattern = regexes.ulid);
261
+ $ZodStringFormat.init(inst, def);
262
+ });
263
+ export const $ZodXID = /*@__PURE__*/ core.$constructor("$ZodXID", (inst, def) => {
264
+ def.pattern ?? (def.pattern = regexes.xid);
265
+ $ZodStringFormat.init(inst, def);
266
+ });
267
+ export const $ZodKSUID = /*@__PURE__*/ core.$constructor("$ZodKSUID", (inst, def) => {
268
+ def.pattern ?? (def.pattern = regexes.ksuid);
269
+ $ZodStringFormat.init(inst, def);
270
+ });
271
+ export const $ZodISODateTime = /*@__PURE__*/ core.$constructor("$ZodISODateTime", (inst, def) => {
272
+ def.pattern ?? (def.pattern = regexes.datetime(def));
273
+ $ZodStringFormat.init(inst, def);
274
+ });
275
+ export const $ZodISODate = /*@__PURE__*/ core.$constructor("$ZodISODate", (inst, def) => {
276
+ def.pattern ?? (def.pattern = regexes.date);
277
+ $ZodStringFormat.init(inst, def);
278
+ });
279
+ export const $ZodISOTime = /*@__PURE__*/ core.$constructor("$ZodISOTime", (inst, def) => {
280
+ def.pattern ?? (def.pattern = regexes.time(def));
281
+ $ZodStringFormat.init(inst, def);
282
+ });
283
+ export const $ZodISODuration = /*@__PURE__*/ core.$constructor("$ZodISODuration", (inst, def) => {
284
+ def.pattern ?? (def.pattern = regexes.duration);
285
+ $ZodStringFormat.init(inst, def);
286
+ });
287
+ export const $ZodIPv4 = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def) => {
288
+ def.pattern ?? (def.pattern = regexes.ipv4);
289
+ $ZodStringFormat.init(inst, def);
290
+ inst._zod.bag.format = `ipv4`;
291
+ });
292
+ export const $ZodIPv6 = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def) => {
293
+ def.pattern ?? (def.pattern = regexes.ipv6);
294
+ $ZodStringFormat.init(inst, def);
295
+ inst._zod.bag.format = `ipv6`;
296
+ inst._zod.check = (payload) => {
297
+ try {
298
+ // @ts-ignore
299
+ new URL(`http://[${payload.value}]`);
300
+ // return;
301
+ }
302
+ catch {
303
+ payload.issues.push({
304
+ code: "invalid_format",
305
+ format: "ipv6",
306
+ input: payload.value,
307
+ inst,
308
+ continue: !def.abort,
309
+ });
310
+ }
311
+ };
312
+ });
313
+ export const $ZodMAC = /*@__PURE__*/ core.$constructor("$ZodMAC", (inst, def) => {
314
+ def.pattern ?? (def.pattern = regexes.mac(def.delimiter));
315
+ $ZodStringFormat.init(inst, def);
316
+ inst._zod.bag.format = `mac`;
317
+ });
318
+ export const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor("$ZodCIDRv4", (inst, def) => {
319
+ def.pattern ?? (def.pattern = regexes.cidrv4);
320
+ $ZodStringFormat.init(inst, def);
321
+ });
322
+ export const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor("$ZodCIDRv6", (inst, def) => {
323
+ def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation
324
+ $ZodStringFormat.init(inst, def);
325
+ inst._zod.check = (payload) => {
326
+ const parts = payload.value.split("/");
327
+ try {
328
+ if (parts.length !== 2)
329
+ throw new Error();
330
+ const [address, prefix] = parts;
331
+ if (!prefix)
332
+ throw new Error();
333
+ const prefixNum = Number(prefix);
334
+ if (`${prefixNum}` !== prefix)
335
+ throw new Error();
336
+ if (prefixNum < 0 || prefixNum > 128)
337
+ throw new Error();
338
+ // @ts-ignore
339
+ new URL(`http://[${address}]`);
340
+ }
341
+ catch {
342
+ payload.issues.push({
343
+ code: "invalid_format",
344
+ format: "cidrv6",
345
+ input: payload.value,
346
+ inst,
347
+ continue: !def.abort,
348
+ });
349
+ }
350
+ };
351
+ });
352
+ ////////////////////////////// ZodBase64 //////////////////////////////
353
+ export function isValidBase64(data) {
354
+ if (data === "")
355
+ return true;
356
+ if (data.length % 4 !== 0)
357
+ return false;
358
+ try {
359
+ // @ts-ignore
360
+ atob(data);
361
+ return true;
362
+ }
363
+ catch {
364
+ return false;
365
+ }
366
+ }
367
+ export const $ZodBase64 = /*@__PURE__*/ core.$constructor("$ZodBase64", (inst, def) => {
368
+ def.pattern ?? (def.pattern = regexes.base64);
369
+ $ZodStringFormat.init(inst, def);
370
+ inst._zod.bag.contentEncoding = "base64";
371
+ inst._zod.check = (payload) => {
372
+ if (isValidBase64(payload.value))
373
+ return;
374
+ payload.issues.push({
375
+ code: "invalid_format",
376
+ format: "base64",
377
+ input: payload.value,
378
+ inst,
379
+ continue: !def.abort,
380
+ });
381
+ };
382
+ });
383
+ ////////////////////////////// ZodBase64 //////////////////////////////
384
+ export function isValidBase64URL(data) {
385
+ if (!regexes.base64url.test(data))
386
+ return false;
387
+ const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
388
+ const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
389
+ return isValidBase64(padded);
390
+ }
391
+ export const $ZodBase64URL = /*@__PURE__*/ core.$constructor("$ZodBase64URL", (inst, def) => {
392
+ def.pattern ?? (def.pattern = regexes.base64url);
393
+ $ZodStringFormat.init(inst, def);
394
+ inst._zod.bag.contentEncoding = "base64url";
395
+ inst._zod.check = (payload) => {
396
+ if (isValidBase64URL(payload.value))
397
+ return;
398
+ payload.issues.push({
399
+ code: "invalid_format",
400
+ format: "base64url",
401
+ input: payload.value,
402
+ inst,
403
+ continue: !def.abort,
404
+ });
405
+ };
406
+ });
407
+ export const $ZodE164 = /*@__PURE__*/ core.$constructor("$ZodE164", (inst, def) => {
408
+ def.pattern ?? (def.pattern = regexes.e164);
409
+ $ZodStringFormat.init(inst, def);
410
+ });
411
+ ////////////////////////////// ZodJWT //////////////////////////////
412
+ export function isValidJWT(token, algorithm = null) {
413
+ try {
414
+ const tokensParts = token.split(".");
415
+ if (tokensParts.length !== 3)
416
+ return false;
417
+ const [header] = tokensParts;
418
+ if (!header)
419
+ return false;
420
+ // @ts-ignore
421
+ const parsedHeader = JSON.parse(atob(header));
422
+ if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
423
+ return false;
424
+ if (!parsedHeader.alg)
425
+ return false;
426
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
427
+ return false;
428
+ return true;
429
+ }
430
+ catch {
431
+ return false;
432
+ }
433
+ }
434
+ export const $ZodJWT = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def) => {
435
+ $ZodStringFormat.init(inst, def);
436
+ inst._zod.check = (payload) => {
437
+ if (isValidJWT(payload.value, def.alg))
438
+ return;
439
+ payload.issues.push({
440
+ code: "invalid_format",
441
+ format: "jwt",
442
+ input: payload.value,
443
+ inst,
444
+ continue: !def.abort,
445
+ });
446
+ };
447
+ });
448
+ export const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("$ZodCustomStringFormat", (inst, def) => {
449
+ $ZodStringFormat.init(inst, def);
450
+ inst._zod.check = (payload) => {
451
+ if (def.fn(payload.value))
452
+ return;
453
+ payload.issues.push({
454
+ code: "invalid_format",
455
+ format: def.format,
456
+ input: payload.value,
457
+ inst,
458
+ continue: !def.abort,
459
+ });
460
+ };
461
+ });
462
+ export const $ZodNumber = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
463
+ $ZodType.init(inst, def);
464
+ inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
465
+ inst._zod.parse = (payload, _ctx) => {
466
+ if (def.coerce)
467
+ try {
468
+ payload.value = Number(payload.value);
469
+ }
470
+ catch (_) { }
471
+ const input = payload.value;
472
+ if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
473
+ return payload;
474
+ }
475
+ const received = typeof input === "number"
476
+ ? Number.isNaN(input)
477
+ ? "NaN"
478
+ : !Number.isFinite(input)
479
+ ? "Infinity"
480
+ : undefined
481
+ : undefined;
482
+ payload.issues.push({
483
+ expected: "number",
484
+ code: "invalid_type",
485
+ input,
486
+ inst,
487
+ ...(received ? { received } : {}),
488
+ });
489
+ return payload;
490
+ };
491
+ });
492
+ export const $ZodNumberFormat = /*@__PURE__*/ core.$constructor("$ZodNumberFormat", (inst, def) => {
493
+ checks.$ZodCheckNumberFormat.init(inst, def);
494
+ $ZodNumber.init(inst, def); // no format checks
495
+ });
496
+ export const $ZodBoolean = /*@__PURE__*/ core.$constructor("$ZodBoolean", (inst, def) => {
497
+ $ZodType.init(inst, def);
498
+ inst._zod.pattern = regexes.boolean;
499
+ inst._zod.parse = (payload, _ctx) => {
500
+ if (def.coerce)
501
+ try {
502
+ payload.value = Boolean(payload.value);
503
+ }
504
+ catch (_) { }
505
+ const input = payload.value;
506
+ if (typeof input === "boolean")
507
+ return payload;
508
+ payload.issues.push({
509
+ expected: "boolean",
510
+ code: "invalid_type",
511
+ input,
512
+ inst,
513
+ });
514
+ return payload;
515
+ };
516
+ });
517
+ export const $ZodBigInt = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
518
+ $ZodType.init(inst, def);
519
+ inst._zod.pattern = regexes.bigint;
520
+ inst._zod.parse = (payload, _ctx) => {
521
+ if (def.coerce)
522
+ try {
523
+ payload.value = BigInt(payload.value);
524
+ }
525
+ catch (_) { }
526
+ if (typeof payload.value === "bigint")
527
+ return payload;
528
+ payload.issues.push({
529
+ expected: "bigint",
530
+ code: "invalid_type",
531
+ input: payload.value,
532
+ inst,
533
+ });
534
+ return payload;
535
+ };
536
+ });
537
+ export const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodBigIntFormat", (inst, def) => {
538
+ checks.$ZodCheckBigIntFormat.init(inst, def);
539
+ $ZodBigInt.init(inst, def); // no format checks
540
+ });
541
+ export const $ZodSymbol = /*@__PURE__*/ core.$constructor("$ZodSymbol", (inst, def) => {
542
+ $ZodType.init(inst, def);
543
+ inst._zod.parse = (payload, _ctx) => {
544
+ const input = payload.value;
545
+ if (typeof input === "symbol")
546
+ return payload;
547
+ payload.issues.push({
548
+ expected: "symbol",
549
+ code: "invalid_type",
550
+ input,
551
+ inst,
552
+ });
553
+ return payload;
554
+ };
555
+ });
556
+ export const $ZodUndefined = /*@__PURE__*/ core.$constructor("$ZodUndefined", (inst, def) => {
557
+ $ZodType.init(inst, def);
558
+ inst._zod.pattern = regexes.undefined;
559
+ inst._zod.values = new Set([undefined]);
560
+ inst._zod.optin = "optional";
561
+ inst._zod.optout = "optional";
562
+ inst._zod.parse = (payload, _ctx) => {
563
+ const input = payload.value;
564
+ if (typeof input === "undefined")
565
+ return payload;
566
+ payload.issues.push({
567
+ expected: "undefined",
568
+ code: "invalid_type",
569
+ input,
570
+ inst,
571
+ });
572
+ return payload;
573
+ };
574
+ });
575
+ export const $ZodNull = /*@__PURE__*/ core.$constructor("$ZodNull", (inst, def) => {
576
+ $ZodType.init(inst, def);
577
+ inst._zod.pattern = regexes.null;
578
+ inst._zod.values = new Set([null]);
579
+ inst._zod.parse = (payload, _ctx) => {
580
+ const input = payload.value;
581
+ if (input === null)
582
+ return payload;
583
+ payload.issues.push({
584
+ expected: "null",
585
+ code: "invalid_type",
586
+ input,
587
+ inst,
588
+ });
589
+ return payload;
590
+ };
591
+ });
592
+ export const $ZodAny = /*@__PURE__*/ core.$constructor("$ZodAny", (inst, def) => {
593
+ $ZodType.init(inst, def);
594
+ inst._zod.parse = (payload) => payload;
595
+ });
596
+ export const $ZodUnknown = /*@__PURE__*/ core.$constructor("$ZodUnknown", (inst, def) => {
597
+ $ZodType.init(inst, def);
598
+ inst._zod.parse = (payload) => payload;
599
+ });
600
+ export const $ZodNever = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
601
+ $ZodType.init(inst, def);
602
+ inst._zod.parse = (payload, _ctx) => {
603
+ payload.issues.push({
604
+ expected: "never",
605
+ code: "invalid_type",
606
+ input: payload.value,
607
+ inst,
608
+ });
609
+ return payload;
610
+ };
611
+ });
612
+ export const $ZodVoid = /*@__PURE__*/ core.$constructor("$ZodVoid", (inst, def) => {
613
+ $ZodType.init(inst, def);
614
+ inst._zod.parse = (payload, _ctx) => {
615
+ const input = payload.value;
616
+ if (typeof input === "undefined")
617
+ return payload;
618
+ payload.issues.push({
619
+ expected: "void",
620
+ code: "invalid_type",
621
+ input,
622
+ inst,
623
+ });
624
+ return payload;
625
+ };
626
+ });
627
+ export const $ZodDate = /*@__PURE__*/ core.$constructor("$ZodDate", (inst, def) => {
628
+ $ZodType.init(inst, def);
629
+ inst._zod.parse = (payload, _ctx) => {
630
+ if (def.coerce) {
631
+ try {
632
+ payload.value = new Date(payload.value);
633
+ }
634
+ catch (_err) { }
635
+ }
636
+ const input = payload.value;
637
+ const isDate = input instanceof Date;
638
+ const isValidDate = isDate && !Number.isNaN(input.getTime());
639
+ if (isValidDate)
640
+ return payload;
641
+ payload.issues.push({
642
+ expected: "date",
643
+ code: "invalid_type",
644
+ input,
645
+ ...(isDate ? { received: "Invalid Date" } : {}),
646
+ inst,
647
+ });
648
+ return payload;
649
+ };
650
+ });
651
+ function handleArrayResult(result, final, index) {
652
+ if (result.issues.length) {
653
+ final.issues.push(...util.prefixIssues(index, result.issues));
654
+ }
655
+ final.value[index] = result.value;
656
+ }
657
+ export const $ZodArray = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
658
+ $ZodType.init(inst, def);
659
+ inst._zod.parse = (payload, ctx) => {
660
+ const input = payload.value;
661
+ if (!Array.isArray(input)) {
662
+ payload.issues.push({
663
+ expected: "array",
664
+ code: "invalid_type",
665
+ input,
666
+ inst,
667
+ });
668
+ return payload;
669
+ }
670
+ payload.value = Array(input.length);
671
+ const proms = [];
672
+ for (let i = 0; i < input.length; i++) {
673
+ const item = input[i];
674
+ const result = def.element._zod.run({
675
+ value: item,
676
+ issues: [],
677
+ }, ctx);
678
+ if (result instanceof Promise) {
679
+ proms.push(result.then((result) => handleArrayResult(result, payload, i)));
680
+ }
681
+ else {
682
+ handleArrayResult(result, payload, i);
683
+ }
684
+ }
685
+ if (proms.length) {
686
+ return Promise.all(proms).then(() => payload);
687
+ }
688
+ return payload; //handleArrayResultsAsync(parseResults, final);
689
+ };
690
+ });
691
+ function handlePropertyResult(result, final, key, input, isOptionalOut) {
692
+ if (result.issues.length) {
693
+ // For optional-out schemas, ignore errors on absent keys
694
+ if (isOptionalOut && !(key in input)) {
695
+ return;
696
+ }
697
+ final.issues.push(...util.prefixIssues(key, result.issues));
698
+ }
699
+ if (result.value === undefined) {
700
+ if (key in input) {
701
+ final.value[key] = undefined;
702
+ }
703
+ }
704
+ else {
705
+ final.value[key] = result.value;
706
+ }
707
+ }
708
+ function normalizeDef(def) {
709
+ const keys = Object.keys(def.shape);
710
+ for (const k of keys) {
711
+ if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
712
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
713
+ }
714
+ }
715
+ const okeys = util.optionalKeys(def.shape);
716
+ return {
717
+ ...def,
718
+ keys,
719
+ keySet: new Set(keys),
720
+ numKeys: keys.length,
721
+ optionalKeys: new Set(okeys),
722
+ };
723
+ }
724
+ function handleCatchall(proms, input, payload, ctx, def, inst) {
725
+ const unrecognized = [];
726
+ // iterate over input keys
727
+ const keySet = def.keySet;
728
+ const _catchall = def.catchall._zod;
729
+ const t = _catchall.def.type;
730
+ const isOptionalOut = _catchall.optout === "optional";
731
+ for (const key in input) {
732
+ if (keySet.has(key))
733
+ continue;
734
+ if (t === "never") {
735
+ unrecognized.push(key);
736
+ continue;
737
+ }
738
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
739
+ if (r instanceof Promise) {
740
+ proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
741
+ }
742
+ else {
743
+ handlePropertyResult(r, payload, key, input, isOptionalOut);
744
+ }
745
+ }
746
+ if (unrecognized.length) {
747
+ payload.issues.push({
748
+ code: "unrecognized_keys",
749
+ keys: unrecognized,
750
+ input,
751
+ inst,
752
+ });
753
+ }
754
+ if (!proms.length)
755
+ return payload;
756
+ return Promise.all(proms).then(() => {
757
+ return payload;
758
+ });
759
+ }
760
+ export const $ZodObject = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
761
+ // requires cast because technically $ZodObject doesn't extend
762
+ $ZodType.init(inst, def);
763
+ // const sh = def.shape;
764
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
765
+ if (!desc?.get) {
766
+ const sh = def.shape;
767
+ Object.defineProperty(def, "shape", {
768
+ get: () => {
769
+ const newSh = { ...sh };
770
+ Object.defineProperty(def, "shape", {
771
+ value: newSh,
772
+ });
773
+ return newSh;
774
+ },
775
+ });
776
+ }
777
+ const _normalized = util.cached(() => normalizeDef(def));
778
+ util.defineLazy(inst._zod, "propValues", () => {
779
+ const shape = def.shape;
780
+ const propValues = {};
781
+ for (const key in shape) {
782
+ const field = shape[key]._zod;
783
+ if (field.values) {
784
+ propValues[key] ?? (propValues[key] = new Set());
785
+ for (const v of field.values)
786
+ propValues[key].add(v);
787
+ }
788
+ }
789
+ return propValues;
790
+ });
791
+ const isObject = util.isObject;
792
+ const catchall = def.catchall;
793
+ let value;
794
+ inst._zod.parse = (payload, ctx) => {
795
+ value ?? (value = _normalized.value);
796
+ const input = payload.value;
797
+ if (!isObject(input)) {
798
+ payload.issues.push({
799
+ expected: "object",
800
+ code: "invalid_type",
801
+ input,
802
+ inst,
803
+ });
804
+ return payload;
805
+ }
806
+ payload.value = {};
807
+ const proms = [];
808
+ const shape = value.shape;
809
+ for (const key of value.keys) {
810
+ const el = shape[key];
811
+ const isOptionalOut = el._zod.optout === "optional";
812
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
813
+ if (r instanceof Promise) {
814
+ proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
815
+ }
816
+ else {
817
+ handlePropertyResult(r, payload, key, input, isOptionalOut);
818
+ }
819
+ }
820
+ if (!catchall) {
821
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
822
+ }
823
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
824
+ };
825
+ });
826
+ export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (inst, def) => {
827
+ // requires cast because technically $ZodObject doesn't extend
828
+ $ZodObject.init(inst, def);
829
+ const superParse = inst._zod.parse;
830
+ const _normalized = util.cached(() => normalizeDef(def));
831
+ const generateFastpass = (shape) => {
832
+ const doc = new Doc(["shape", "payload", "ctx"]);
833
+ const normalized = _normalized.value;
834
+ const parseStr = (key) => {
835
+ const k = util.esc(key);
836
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
837
+ };
838
+ doc.write(`const input = payload.value;`);
839
+ const ids = Object.create(null);
840
+ let counter = 0;
841
+ for (const key of normalized.keys) {
842
+ ids[key] = `key_${counter++}`;
843
+ }
844
+ // A: preserve key order {
845
+ doc.write(`const newResult = {};`);
846
+ for (const key of normalized.keys) {
847
+ const id = ids[key];
848
+ const k = util.esc(key);
849
+ const schema = shape[key];
850
+ const isOptionalOut = schema?._zod?.optout === "optional";
851
+ doc.write(`const ${id} = ${parseStr(key)};`);
852
+ if (isOptionalOut) {
853
+ // For optional-out schemas, ignore errors on absent keys
854
+ doc.write(`
855
+ if (${id}.issues.length) {
856
+ if (${k} in input) {
857
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
858
+ ...iss,
859
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
860
+ })));
861
+ }
862
+ }
863
+
864
+ if (${id}.value === undefined) {
865
+ if (${k} in input) {
866
+ newResult[${k}] = undefined;
867
+ }
868
+ } else {
869
+ newResult[${k}] = ${id}.value;
870
+ }
871
+
872
+ `);
873
+ }
874
+ else {
875
+ doc.write(`
876
+ if (${id}.issues.length) {
877
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
878
+ ...iss,
879
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
880
+ })));
881
+ }
882
+
883
+ if (${id}.value === undefined) {
884
+ if (${k} in input) {
885
+ newResult[${k}] = undefined;
886
+ }
887
+ } else {
888
+ newResult[${k}] = ${id}.value;
889
+ }
890
+
891
+ `);
892
+ }
893
+ }
894
+ doc.write(`payload.value = newResult;`);
895
+ doc.write(`return payload;`);
896
+ const fn = doc.compile();
897
+ return (payload, ctx) => fn(shape, payload, ctx);
898
+ };
899
+ let fastpass;
900
+ const isObject = util.isObject;
901
+ const jit = !core.globalConfig.jitless;
902
+ const allowsEval = util.allowsEval;
903
+ const fastEnabled = jit && allowsEval.value; // && !def.catchall;
904
+ const catchall = def.catchall;
905
+ let value;
906
+ inst._zod.parse = (payload, ctx) => {
907
+ value ?? (value = _normalized.value);
908
+ const input = payload.value;
909
+ if (!isObject(input)) {
910
+ payload.issues.push({
911
+ expected: "object",
912
+ code: "invalid_type",
913
+ input,
914
+ inst,
915
+ });
916
+ return payload;
917
+ }
918
+ if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
919
+ // always synchronous
920
+ if (!fastpass)
921
+ fastpass = generateFastpass(def.shape);
922
+ payload = fastpass(payload, ctx);
923
+ if (!catchall)
924
+ return payload;
925
+ return handleCatchall([], input, payload, ctx, value, inst);
926
+ }
927
+ return superParse(payload, ctx);
928
+ };
929
+ });
930
+ function handleUnionResults(results, final, inst, ctx) {
931
+ for (const result of results) {
932
+ if (result.issues.length === 0) {
933
+ final.value = result.value;
934
+ return final;
935
+ }
936
+ }
937
+ const nonaborted = results.filter((r) => !util.aborted(r));
938
+ if (nonaborted.length === 1) {
939
+ final.value = nonaborted[0].value;
940
+ return nonaborted[0];
941
+ }
942
+ final.issues.push({
943
+ code: "invalid_union",
944
+ input: final.value,
945
+ inst,
946
+ errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
947
+ });
948
+ return final;
949
+ }
950
+ export const $ZodUnion = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
951
+ $ZodType.init(inst, def);
952
+ util.defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
953
+ util.defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
954
+ util.defineLazy(inst._zod, "values", () => {
955
+ if (def.options.every((o) => o._zod.values)) {
956
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
957
+ }
958
+ return undefined;
959
+ });
960
+ util.defineLazy(inst._zod, "pattern", () => {
961
+ if (def.options.every((o) => o._zod.pattern)) {
962
+ const patterns = def.options.map((o) => o._zod.pattern);
963
+ return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
964
+ }
965
+ return undefined;
966
+ });
967
+ const single = def.options.length === 1;
968
+ const first = def.options[0]._zod.run;
969
+ inst._zod.parse = (payload, ctx) => {
970
+ if (single) {
971
+ return first(payload, ctx);
972
+ }
973
+ let async = false;
974
+ const results = [];
975
+ for (const option of def.options) {
976
+ const result = option._zod.run({
977
+ value: payload.value,
978
+ issues: [],
979
+ }, ctx);
980
+ if (result instanceof Promise) {
981
+ results.push(result);
982
+ async = true;
983
+ }
984
+ else {
985
+ if (result.issues.length === 0)
986
+ return result;
987
+ results.push(result);
988
+ }
989
+ }
990
+ if (!async)
991
+ return handleUnionResults(results, payload, inst, ctx);
992
+ return Promise.all(results).then((results) => {
993
+ return handleUnionResults(results, payload, inst, ctx);
994
+ });
995
+ };
996
+ });
997
+ function handleExclusiveUnionResults(results, final, inst, ctx) {
998
+ const successes = results.filter((r) => r.issues.length === 0);
999
+ if (successes.length === 1) {
1000
+ final.value = successes[0].value;
1001
+ return final;
1002
+ }
1003
+ if (successes.length === 0) {
1004
+ // No matches - same as regular union
1005
+ final.issues.push({
1006
+ code: "invalid_union",
1007
+ input: final.value,
1008
+ inst,
1009
+ errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1010
+ });
1011
+ }
1012
+ else {
1013
+ // Multiple matches - exclusive union failure
1014
+ final.issues.push({
1015
+ code: "invalid_union",
1016
+ input: final.value,
1017
+ inst,
1018
+ errors: [],
1019
+ inclusive: false,
1020
+ });
1021
+ }
1022
+ return final;
1023
+ }
1024
+ export const $ZodXor = /*@__PURE__*/ core.$constructor("$ZodXor", (inst, def) => {
1025
+ $ZodUnion.init(inst, def);
1026
+ def.inclusive = false;
1027
+ const single = def.options.length === 1;
1028
+ const first = def.options[0]._zod.run;
1029
+ inst._zod.parse = (payload, ctx) => {
1030
+ if (single) {
1031
+ return first(payload, ctx);
1032
+ }
1033
+ let async = false;
1034
+ const results = [];
1035
+ for (const option of def.options) {
1036
+ const result = option._zod.run({
1037
+ value: payload.value,
1038
+ issues: [],
1039
+ }, ctx);
1040
+ if (result instanceof Promise) {
1041
+ results.push(result);
1042
+ async = true;
1043
+ }
1044
+ else {
1045
+ results.push(result);
1046
+ }
1047
+ }
1048
+ if (!async)
1049
+ return handleExclusiveUnionResults(results, payload, inst, ctx);
1050
+ return Promise.all(results).then((results) => {
1051
+ return handleExclusiveUnionResults(results, payload, inst, ctx);
1052
+ });
1053
+ };
1054
+ });
1055
+ export const $ZodDiscriminatedUnion =
1056
+ /*@__PURE__*/
1057
+ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
1058
+ def.inclusive = false;
1059
+ $ZodUnion.init(inst, def);
1060
+ const _super = inst._zod.parse;
1061
+ util.defineLazy(inst._zod, "propValues", () => {
1062
+ const propValues = {};
1063
+ for (const option of def.options) {
1064
+ const pv = option._zod.propValues;
1065
+ if (!pv || Object.keys(pv).length === 0)
1066
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
1067
+ for (const [k, v] of Object.entries(pv)) {
1068
+ if (!propValues[k])
1069
+ propValues[k] = new Set();
1070
+ for (const val of v) {
1071
+ propValues[k].add(val);
1072
+ }
1073
+ }
1074
+ }
1075
+ return propValues;
1076
+ });
1077
+ const disc = util.cached(() => {
1078
+ const opts = def.options;
1079
+ const map = new Map();
1080
+ for (const o of opts) {
1081
+ const values = o._zod.propValues?.[def.discriminator];
1082
+ if (!values || values.size === 0)
1083
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
1084
+ for (const v of values) {
1085
+ if (map.has(v)) {
1086
+ throw new Error(`Duplicate discriminator value "${String(v)}"`);
1087
+ }
1088
+ map.set(v, o);
1089
+ }
1090
+ }
1091
+ return map;
1092
+ });
1093
+ inst._zod.parse = (payload, ctx) => {
1094
+ const input = payload.value;
1095
+ if (!util.isObject(input)) {
1096
+ payload.issues.push({
1097
+ code: "invalid_type",
1098
+ expected: "object",
1099
+ input,
1100
+ inst,
1101
+ });
1102
+ return payload;
1103
+ }
1104
+ const opt = disc.value.get(input?.[def.discriminator]);
1105
+ if (opt) {
1106
+ return opt._zod.run(payload, ctx);
1107
+ }
1108
+ if (def.unionFallback) {
1109
+ return _super(payload, ctx);
1110
+ }
1111
+ // no matching discriminator
1112
+ payload.issues.push({
1113
+ code: "invalid_union",
1114
+ errors: [],
1115
+ note: "No matching discriminator",
1116
+ discriminator: def.discriminator,
1117
+ input,
1118
+ path: [def.discriminator],
1119
+ inst,
1120
+ });
1121
+ return payload;
1122
+ };
1123
+ });
1124
+ export const $ZodIntersection = /*@__PURE__*/ core.$constructor("$ZodIntersection", (inst, def) => {
1125
+ $ZodType.init(inst, def);
1126
+ inst._zod.parse = (payload, ctx) => {
1127
+ const input = payload.value;
1128
+ const left = def.left._zod.run({ value: input, issues: [] }, ctx);
1129
+ const right = def.right._zod.run({ value: input, issues: [] }, ctx);
1130
+ const async = left instanceof Promise || right instanceof Promise;
1131
+ if (async) {
1132
+ return Promise.all([left, right]).then(([left, right]) => {
1133
+ return handleIntersectionResults(payload, left, right);
1134
+ });
1135
+ }
1136
+ return handleIntersectionResults(payload, left, right);
1137
+ };
1138
+ });
1139
+ function mergeValues(a, b) {
1140
+ // const aType = parse.t(a);
1141
+ // const bType = parse.t(b);
1142
+ if (a === b) {
1143
+ return { valid: true, data: a };
1144
+ }
1145
+ if (a instanceof Date && b instanceof Date && +a === +b) {
1146
+ return { valid: true, data: a };
1147
+ }
1148
+ if (util.isPlainObject(a) && util.isPlainObject(b)) {
1149
+ const bKeys = Object.keys(b);
1150
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1151
+ const newObj = { ...a, ...b };
1152
+ for (const key of sharedKeys) {
1153
+ const sharedValue = mergeValues(a[key], b[key]);
1154
+ if (!sharedValue.valid) {
1155
+ return {
1156
+ valid: false,
1157
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
1158
+ };
1159
+ }
1160
+ newObj[key] = sharedValue.data;
1161
+ }
1162
+ return { valid: true, data: newObj };
1163
+ }
1164
+ if (Array.isArray(a) && Array.isArray(b)) {
1165
+ if (a.length !== b.length) {
1166
+ return { valid: false, mergeErrorPath: [] };
1167
+ }
1168
+ const newArray = [];
1169
+ for (let index = 0; index < a.length; index++) {
1170
+ const itemA = a[index];
1171
+ const itemB = b[index];
1172
+ const sharedValue = mergeValues(itemA, itemB);
1173
+ if (!sharedValue.valid) {
1174
+ return {
1175
+ valid: false,
1176
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
1177
+ };
1178
+ }
1179
+ newArray.push(sharedValue.data);
1180
+ }
1181
+ return { valid: true, data: newArray };
1182
+ }
1183
+ return { valid: false, mergeErrorPath: [] };
1184
+ }
1185
+ function handleIntersectionResults(result, left, right) {
1186
+ // Track which side(s) report each key as unrecognized
1187
+ const unrecKeys = new Map();
1188
+ let unrecIssue;
1189
+ for (const iss of left.issues) {
1190
+ if (iss.code === "unrecognized_keys") {
1191
+ unrecIssue ?? (unrecIssue = iss);
1192
+ for (const k of iss.keys) {
1193
+ if (!unrecKeys.has(k))
1194
+ unrecKeys.set(k, {});
1195
+ unrecKeys.get(k).l = true;
1196
+ }
1197
+ }
1198
+ else {
1199
+ result.issues.push(iss);
1200
+ }
1201
+ }
1202
+ for (const iss of right.issues) {
1203
+ if (iss.code === "unrecognized_keys") {
1204
+ for (const k of iss.keys) {
1205
+ if (!unrecKeys.has(k))
1206
+ unrecKeys.set(k, {});
1207
+ unrecKeys.get(k).r = true;
1208
+ }
1209
+ }
1210
+ else {
1211
+ result.issues.push(iss);
1212
+ }
1213
+ }
1214
+ // Report only keys unrecognized by BOTH sides
1215
+ const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1216
+ if (bothKeys.length && unrecIssue) {
1217
+ result.issues.push({ ...unrecIssue, keys: bothKeys });
1218
+ }
1219
+ if (util.aborted(result))
1220
+ return result;
1221
+ const merged = mergeValues(left.value, right.value);
1222
+ if (!merged.valid) {
1223
+ throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
1224
+ }
1225
+ result.value = merged.data;
1226
+ return result;
1227
+ }
1228
+ export const $ZodTuple = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
1229
+ $ZodType.init(inst, def);
1230
+ const items = def.items;
1231
+ inst._zod.parse = (payload, ctx) => {
1232
+ const input = payload.value;
1233
+ if (!Array.isArray(input)) {
1234
+ payload.issues.push({
1235
+ input,
1236
+ inst,
1237
+ expected: "tuple",
1238
+ code: "invalid_type",
1239
+ });
1240
+ return payload;
1241
+ }
1242
+ payload.value = [];
1243
+ const proms = [];
1244
+ const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
1245
+ const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
1246
+ if (!def.rest) {
1247
+ const tooBig = input.length > items.length;
1248
+ const tooSmall = input.length < optStart - 1;
1249
+ if (tooBig || tooSmall) {
1250
+ payload.issues.push({
1251
+ ...(tooBig
1252
+ ? { code: "too_big", maximum: items.length, inclusive: true }
1253
+ : { code: "too_small", minimum: items.length }),
1254
+ input,
1255
+ inst,
1256
+ origin: "array",
1257
+ });
1258
+ return payload;
1259
+ }
1260
+ }
1261
+ let i = -1;
1262
+ for (const item of items) {
1263
+ i++;
1264
+ if (i >= input.length)
1265
+ if (i >= optStart)
1266
+ continue;
1267
+ const result = item._zod.run({
1268
+ value: input[i],
1269
+ issues: [],
1270
+ }, ctx);
1271
+ if (result instanceof Promise) {
1272
+ proms.push(result.then((result) => handleTupleResult(result, payload, i)));
1273
+ }
1274
+ else {
1275
+ handleTupleResult(result, payload, i);
1276
+ }
1277
+ }
1278
+ if (def.rest) {
1279
+ const rest = input.slice(items.length);
1280
+ for (const el of rest) {
1281
+ i++;
1282
+ const result = def.rest._zod.run({
1283
+ value: el,
1284
+ issues: [],
1285
+ }, ctx);
1286
+ if (result instanceof Promise) {
1287
+ proms.push(result.then((result) => handleTupleResult(result, payload, i)));
1288
+ }
1289
+ else {
1290
+ handleTupleResult(result, payload, i);
1291
+ }
1292
+ }
1293
+ }
1294
+ if (proms.length)
1295
+ return Promise.all(proms).then(() => payload);
1296
+ return payload;
1297
+ };
1298
+ });
1299
+ function handleTupleResult(result, final, index) {
1300
+ if (result.issues.length) {
1301
+ final.issues.push(...util.prefixIssues(index, result.issues));
1302
+ }
1303
+ final.value[index] = result.value;
1304
+ }
1305
+ export const $ZodRecord = /*@__PURE__*/ core.$constructor("$ZodRecord", (inst, def) => {
1306
+ $ZodType.init(inst, def);
1307
+ inst._zod.parse = (payload, ctx) => {
1308
+ const input = payload.value;
1309
+ if (!util.isPlainObject(input)) {
1310
+ payload.issues.push({
1311
+ expected: "record",
1312
+ code: "invalid_type",
1313
+ input,
1314
+ inst,
1315
+ });
1316
+ return payload;
1317
+ }
1318
+ const proms = [];
1319
+ const values = def.keyType._zod.values;
1320
+ if (values) {
1321
+ payload.value = {};
1322
+ const recordKeys = new Set();
1323
+ for (const key of values) {
1324
+ if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1325
+ recordKeys.add(typeof key === "number" ? key.toString() : key);
1326
+ const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1327
+ if (result instanceof Promise) {
1328
+ proms.push(result.then((result) => {
1329
+ if (result.issues.length) {
1330
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1331
+ }
1332
+ payload.value[key] = result.value;
1333
+ }));
1334
+ }
1335
+ else {
1336
+ if (result.issues.length) {
1337
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1338
+ }
1339
+ payload.value[key] = result.value;
1340
+ }
1341
+ }
1342
+ }
1343
+ let unrecognized;
1344
+ for (const key in input) {
1345
+ if (!recordKeys.has(key)) {
1346
+ unrecognized = unrecognized ?? [];
1347
+ unrecognized.push(key);
1348
+ }
1349
+ }
1350
+ if (unrecognized && unrecognized.length > 0) {
1351
+ payload.issues.push({
1352
+ code: "unrecognized_keys",
1353
+ input,
1354
+ inst,
1355
+ keys: unrecognized,
1356
+ });
1357
+ }
1358
+ }
1359
+ else {
1360
+ payload.value = {};
1361
+ for (const key of Reflect.ownKeys(input)) {
1362
+ if (key === "__proto__")
1363
+ continue;
1364
+ let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1365
+ if (keyResult instanceof Promise) {
1366
+ throw new Error("Async schemas not supported in object keys currently");
1367
+ }
1368
+ // Numeric string fallback: if key failed with "expected number", retry with Number(key)
1369
+ const checkNumericKey = typeof key === "string" &&
1370
+ regexes.number.test(key) &&
1371
+ keyResult.issues.length &&
1372
+ keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number");
1373
+ if (checkNumericKey) {
1374
+ const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
1375
+ if (retryResult instanceof Promise) {
1376
+ throw new Error("Async schemas not supported in object keys currently");
1377
+ }
1378
+ if (retryResult.issues.length === 0) {
1379
+ keyResult = retryResult;
1380
+ }
1381
+ }
1382
+ if (keyResult.issues.length) {
1383
+ if (def.mode === "loose") {
1384
+ // Pass through unchanged
1385
+ payload.value[key] = input[key];
1386
+ }
1387
+ else {
1388
+ // Default "strict" behavior: error on invalid key
1389
+ payload.issues.push({
1390
+ code: "invalid_key",
1391
+ origin: "record",
1392
+ issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1393
+ input: key,
1394
+ path: [key],
1395
+ inst,
1396
+ });
1397
+ }
1398
+ continue;
1399
+ }
1400
+ const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1401
+ if (result instanceof Promise) {
1402
+ proms.push(result.then((result) => {
1403
+ if (result.issues.length) {
1404
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1405
+ }
1406
+ payload.value[keyResult.value] = result.value;
1407
+ }));
1408
+ }
1409
+ else {
1410
+ if (result.issues.length) {
1411
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1412
+ }
1413
+ payload.value[keyResult.value] = result.value;
1414
+ }
1415
+ }
1416
+ }
1417
+ if (proms.length) {
1418
+ return Promise.all(proms).then(() => payload);
1419
+ }
1420
+ return payload;
1421
+ };
1422
+ });
1423
+ export const $ZodMap = /*@__PURE__*/ core.$constructor("$ZodMap", (inst, def) => {
1424
+ $ZodType.init(inst, def);
1425
+ inst._zod.parse = (payload, ctx) => {
1426
+ const input = payload.value;
1427
+ if (!(input instanceof Map)) {
1428
+ payload.issues.push({
1429
+ expected: "map",
1430
+ code: "invalid_type",
1431
+ input,
1432
+ inst,
1433
+ });
1434
+ return payload;
1435
+ }
1436
+ const proms = [];
1437
+ payload.value = new Map();
1438
+ for (const [key, value] of input) {
1439
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1440
+ const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
1441
+ if (keyResult instanceof Promise || valueResult instanceof Promise) {
1442
+ proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
1443
+ handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1444
+ }));
1445
+ }
1446
+ else {
1447
+ handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1448
+ }
1449
+ }
1450
+ if (proms.length)
1451
+ return Promise.all(proms).then(() => payload);
1452
+ return payload;
1453
+ };
1454
+ });
1455
+ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
1456
+ if (keyResult.issues.length) {
1457
+ if (util.propertyKeyTypes.has(typeof key)) {
1458
+ final.issues.push(...util.prefixIssues(key, keyResult.issues));
1459
+ }
1460
+ else {
1461
+ final.issues.push({
1462
+ code: "invalid_key",
1463
+ origin: "map",
1464
+ input,
1465
+ inst,
1466
+ issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1467
+ });
1468
+ }
1469
+ }
1470
+ if (valueResult.issues.length) {
1471
+ if (util.propertyKeyTypes.has(typeof key)) {
1472
+ final.issues.push(...util.prefixIssues(key, valueResult.issues));
1473
+ }
1474
+ else {
1475
+ final.issues.push({
1476
+ origin: "map",
1477
+ code: "invalid_element",
1478
+ input,
1479
+ inst,
1480
+ key: key,
1481
+ issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1482
+ });
1483
+ }
1484
+ }
1485
+ final.value.set(keyResult.value, valueResult.value);
1486
+ }
1487
+ export const $ZodSet = /*@__PURE__*/ core.$constructor("$ZodSet", (inst, def) => {
1488
+ $ZodType.init(inst, def);
1489
+ inst._zod.parse = (payload, ctx) => {
1490
+ const input = payload.value;
1491
+ if (!(input instanceof Set)) {
1492
+ payload.issues.push({
1493
+ input,
1494
+ inst,
1495
+ expected: "set",
1496
+ code: "invalid_type",
1497
+ });
1498
+ return payload;
1499
+ }
1500
+ const proms = [];
1501
+ payload.value = new Set();
1502
+ for (const item of input) {
1503
+ const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
1504
+ if (result instanceof Promise) {
1505
+ proms.push(result.then((result) => handleSetResult(result, payload)));
1506
+ }
1507
+ else
1508
+ handleSetResult(result, payload);
1509
+ }
1510
+ if (proms.length)
1511
+ return Promise.all(proms).then(() => payload);
1512
+ return payload;
1513
+ };
1514
+ });
1515
+ function handleSetResult(result, final) {
1516
+ if (result.issues.length) {
1517
+ final.issues.push(...result.issues);
1518
+ }
1519
+ final.value.add(result.value);
1520
+ }
1521
+ export const $ZodEnum = /*@__PURE__*/ core.$constructor("$ZodEnum", (inst, def) => {
1522
+ $ZodType.init(inst, def);
1523
+ const values = util.getEnumValues(def.entries);
1524
+ const valuesSet = new Set(values);
1525
+ inst._zod.values = valuesSet;
1526
+ inst._zod.pattern = new RegExp(`^(${values
1527
+ .filter((k) => util.propertyKeyTypes.has(typeof k))
1528
+ .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o.toString()))
1529
+ .join("|")})$`);
1530
+ inst._zod.parse = (payload, _ctx) => {
1531
+ const input = payload.value;
1532
+ if (valuesSet.has(input)) {
1533
+ return payload;
1534
+ }
1535
+ payload.issues.push({
1536
+ code: "invalid_value",
1537
+ values,
1538
+ input,
1539
+ inst,
1540
+ });
1541
+ return payload;
1542
+ };
1543
+ });
1544
+ export const $ZodLiteral = /*@__PURE__*/ core.$constructor("$ZodLiteral", (inst, def) => {
1545
+ $ZodType.init(inst, def);
1546
+ if (def.values.length === 0) {
1547
+ throw new Error("Cannot create literal schema with no valid values");
1548
+ }
1549
+ const values = new Set(def.values);
1550
+ inst._zod.values = values;
1551
+ inst._zod.pattern = new RegExp(`^(${def.values
1552
+ .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))
1553
+ .join("|")})$`);
1554
+ inst._zod.parse = (payload, _ctx) => {
1555
+ const input = payload.value;
1556
+ if (values.has(input)) {
1557
+ return payload;
1558
+ }
1559
+ payload.issues.push({
1560
+ code: "invalid_value",
1561
+ values: def.values,
1562
+ input,
1563
+ inst,
1564
+ });
1565
+ return payload;
1566
+ };
1567
+ });
1568
+ export const $ZodFile = /*@__PURE__*/ core.$constructor("$ZodFile", (inst, def) => {
1569
+ $ZodType.init(inst, def);
1570
+ inst._zod.parse = (payload, _ctx) => {
1571
+ const input = payload.value;
1572
+ // @ts-ignore
1573
+ if (input instanceof File)
1574
+ return payload;
1575
+ payload.issues.push({
1576
+ expected: "file",
1577
+ code: "invalid_type",
1578
+ input,
1579
+ inst,
1580
+ });
1581
+ return payload;
1582
+ };
1583
+ });
1584
+ export const $ZodTransform = /*@__PURE__*/ core.$constructor("$ZodTransform", (inst, def) => {
1585
+ $ZodType.init(inst, def);
1586
+ inst._zod.parse = (payload, ctx) => {
1587
+ if (ctx.direction === "backward") {
1588
+ throw new core.$ZodEncodeError(inst.constructor.name);
1589
+ }
1590
+ const _out = def.transform(payload.value, payload);
1591
+ if (ctx.async) {
1592
+ const output = _out instanceof Promise ? _out : Promise.resolve(_out);
1593
+ return output.then((output) => {
1594
+ payload.value = output;
1595
+ return payload;
1596
+ });
1597
+ }
1598
+ if (_out instanceof Promise) {
1599
+ throw new core.$ZodAsyncError();
1600
+ }
1601
+ payload.value = _out;
1602
+ return payload;
1603
+ };
1604
+ });
1605
+ function handleOptionalResult(result, input) {
1606
+ if (result.issues.length && input === undefined) {
1607
+ return { issues: [], value: undefined };
1608
+ }
1609
+ return result;
1610
+ }
1611
+ export const $ZodOptional = /*@__PURE__*/ core.$constructor("$ZodOptional", (inst, def) => {
1612
+ $ZodType.init(inst, def);
1613
+ inst._zod.optin = "optional";
1614
+ inst._zod.optout = "optional";
1615
+ util.defineLazy(inst._zod, "values", () => {
1616
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;
1617
+ });
1618
+ util.defineLazy(inst._zod, "pattern", () => {
1619
+ const pattern = def.innerType._zod.pattern;
1620
+ return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
1621
+ });
1622
+ inst._zod.parse = (payload, ctx) => {
1623
+ if (def.innerType._zod.optin === "optional") {
1624
+ const result = def.innerType._zod.run(payload, ctx);
1625
+ if (result instanceof Promise)
1626
+ return result.then((r) => handleOptionalResult(r, payload.value));
1627
+ return handleOptionalResult(result, payload.value);
1628
+ }
1629
+ if (payload.value === undefined) {
1630
+ return payload;
1631
+ }
1632
+ return def.innerType._zod.run(payload, ctx);
1633
+ };
1634
+ });
1635
+ export const $ZodExactOptional = /*@__PURE__*/ core.$constructor("$ZodExactOptional", (inst, def) => {
1636
+ // Call parent init - inherits optin/optout = "optional"
1637
+ $ZodOptional.init(inst, def);
1638
+ // Override values/pattern to NOT add undefined
1639
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1640
+ util.defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
1641
+ // Override parse to just delegate (no undefined handling)
1642
+ inst._zod.parse = (payload, ctx) => {
1643
+ return def.innerType._zod.run(payload, ctx);
1644
+ };
1645
+ });
1646
+ export const $ZodNullable = /*@__PURE__*/ core.$constructor("$ZodNullable", (inst, def) => {
1647
+ $ZodType.init(inst, def);
1648
+ util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1649
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1650
+ util.defineLazy(inst._zod, "pattern", () => {
1651
+ const pattern = def.innerType._zod.pattern;
1652
+ return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
1653
+ });
1654
+ util.defineLazy(inst._zod, "values", () => {
1655
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;
1656
+ });
1657
+ inst._zod.parse = (payload, ctx) => {
1658
+ // Forward direction (decode): allow null to pass through
1659
+ if (payload.value === null)
1660
+ return payload;
1661
+ return def.innerType._zod.run(payload, ctx);
1662
+ };
1663
+ });
1664
+ export const $ZodDefault = /*@__PURE__*/ core.$constructor("$ZodDefault", (inst, def) => {
1665
+ $ZodType.init(inst, def);
1666
+ // inst._zod.qin = "true";
1667
+ inst._zod.optin = "optional";
1668
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1669
+ inst._zod.parse = (payload, ctx) => {
1670
+ if (ctx.direction === "backward") {
1671
+ return def.innerType._zod.run(payload, ctx);
1672
+ }
1673
+ // Forward direction (decode): apply defaults for undefined input
1674
+ if (payload.value === undefined) {
1675
+ payload.value = def.defaultValue;
1676
+ /**
1677
+ * $ZodDefault returns the default value immediately in forward direction.
1678
+ * It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
1679
+ return payload;
1680
+ }
1681
+ // Forward direction: continue with default handling
1682
+ const result = def.innerType._zod.run(payload, ctx);
1683
+ if (result instanceof Promise) {
1684
+ return result.then((result) => handleDefaultResult(result, def));
1685
+ }
1686
+ return handleDefaultResult(result, def);
1687
+ };
1688
+ });
1689
+ function handleDefaultResult(payload, def) {
1690
+ if (payload.value === undefined) {
1691
+ payload.value = def.defaultValue;
1692
+ }
1693
+ return payload;
1694
+ }
1695
+ export const $ZodPrefault = /*@__PURE__*/ core.$constructor("$ZodPrefault", (inst, def) => {
1696
+ $ZodType.init(inst, def);
1697
+ inst._zod.optin = "optional";
1698
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1699
+ inst._zod.parse = (payload, ctx) => {
1700
+ if (ctx.direction === "backward") {
1701
+ return def.innerType._zod.run(payload, ctx);
1702
+ }
1703
+ // Forward direction (decode): apply prefault for undefined input
1704
+ if (payload.value === undefined) {
1705
+ payload.value = def.defaultValue;
1706
+ }
1707
+ return def.innerType._zod.run(payload, ctx);
1708
+ };
1709
+ });
1710
+ export const $ZodNonOptional = /*@__PURE__*/ core.$constructor("$ZodNonOptional", (inst, def) => {
1711
+ $ZodType.init(inst, def);
1712
+ util.defineLazy(inst._zod, "values", () => {
1713
+ const v = def.innerType._zod.values;
1714
+ return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
1715
+ });
1716
+ inst._zod.parse = (payload, ctx) => {
1717
+ const result = def.innerType._zod.run(payload, ctx);
1718
+ if (result instanceof Promise) {
1719
+ return result.then((result) => handleNonOptionalResult(result, inst));
1720
+ }
1721
+ return handleNonOptionalResult(result, inst);
1722
+ };
1723
+ });
1724
+ function handleNonOptionalResult(payload, inst) {
1725
+ if (!payload.issues.length && payload.value === undefined) {
1726
+ payload.issues.push({
1727
+ code: "invalid_type",
1728
+ expected: "nonoptional",
1729
+ input: payload.value,
1730
+ inst,
1731
+ });
1732
+ }
1733
+ return payload;
1734
+ }
1735
+ export const $ZodSuccess = /*@__PURE__*/ core.$constructor("$ZodSuccess", (inst, def) => {
1736
+ $ZodType.init(inst, def);
1737
+ inst._zod.parse = (payload, ctx) => {
1738
+ if (ctx.direction === "backward") {
1739
+ throw new core.$ZodEncodeError("ZodSuccess");
1740
+ }
1741
+ const result = def.innerType._zod.run(payload, ctx);
1742
+ if (result instanceof Promise) {
1743
+ return result.then((result) => {
1744
+ payload.value = result.issues.length === 0;
1745
+ return payload;
1746
+ });
1747
+ }
1748
+ payload.value = result.issues.length === 0;
1749
+ return payload;
1750
+ };
1751
+ });
1752
+ export const $ZodCatch = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
1753
+ $ZodType.init(inst, def);
1754
+ util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1755
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1756
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1757
+ inst._zod.parse = (payload, ctx) => {
1758
+ if (ctx.direction === "backward") {
1759
+ return def.innerType._zod.run(payload, ctx);
1760
+ }
1761
+ // Forward direction (decode): apply catch logic
1762
+ const result = def.innerType._zod.run(payload, ctx);
1763
+ if (result instanceof Promise) {
1764
+ return result.then((result) => {
1765
+ payload.value = result.value;
1766
+ if (result.issues.length) {
1767
+ payload.value = def.catchValue({
1768
+ ...payload,
1769
+ error: {
1770
+ issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1771
+ },
1772
+ input: payload.value,
1773
+ });
1774
+ payload.issues = [];
1775
+ }
1776
+ return payload;
1777
+ });
1778
+ }
1779
+ payload.value = result.value;
1780
+ if (result.issues.length) {
1781
+ payload.value = def.catchValue({
1782
+ ...payload,
1783
+ error: {
1784
+ issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1785
+ },
1786
+ input: payload.value,
1787
+ });
1788
+ payload.issues = [];
1789
+ }
1790
+ return payload;
1791
+ };
1792
+ });
1793
+ export const $ZodNaN = /*@__PURE__*/ core.$constructor("$ZodNaN", (inst, def) => {
1794
+ $ZodType.init(inst, def);
1795
+ inst._zod.parse = (payload, _ctx) => {
1796
+ if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
1797
+ payload.issues.push({
1798
+ input: payload.value,
1799
+ inst,
1800
+ expected: "nan",
1801
+ code: "invalid_type",
1802
+ });
1803
+ return payload;
1804
+ }
1805
+ return payload;
1806
+ };
1807
+ });
1808
+ export const $ZodPipe = /*@__PURE__*/ core.$constructor("$ZodPipe", (inst, def) => {
1809
+ $ZodType.init(inst, def);
1810
+ util.defineLazy(inst._zod, "values", () => def.in._zod.values);
1811
+ util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1812
+ util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1813
+ util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1814
+ inst._zod.parse = (payload, ctx) => {
1815
+ if (ctx.direction === "backward") {
1816
+ const right = def.out._zod.run(payload, ctx);
1817
+ if (right instanceof Promise) {
1818
+ return right.then((right) => handlePipeResult(right, def.in, ctx));
1819
+ }
1820
+ return handlePipeResult(right, def.in, ctx);
1821
+ }
1822
+ const left = def.in._zod.run(payload, ctx);
1823
+ if (left instanceof Promise) {
1824
+ return left.then((left) => handlePipeResult(left, def.out, ctx));
1825
+ }
1826
+ return handlePipeResult(left, def.out, ctx);
1827
+ };
1828
+ });
1829
+ function handlePipeResult(left, next, ctx) {
1830
+ if (left.issues.length) {
1831
+ // prevent further checks
1832
+ left.aborted = true;
1833
+ return left;
1834
+ }
1835
+ return next._zod.run({ value: left.value, issues: left.issues }, ctx);
1836
+ }
1837
+ export const $ZodCodec = /*@__PURE__*/ core.$constructor("$ZodCodec", (inst, def) => {
1838
+ $ZodType.init(inst, def);
1839
+ util.defineLazy(inst._zod, "values", () => def.in._zod.values);
1840
+ util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1841
+ util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1842
+ util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1843
+ inst._zod.parse = (payload, ctx) => {
1844
+ const direction = ctx.direction || "forward";
1845
+ if (direction === "forward") {
1846
+ const left = def.in._zod.run(payload, ctx);
1847
+ if (left instanceof Promise) {
1848
+ return left.then((left) => handleCodecAResult(left, def, ctx));
1849
+ }
1850
+ return handleCodecAResult(left, def, ctx);
1851
+ }
1852
+ else {
1853
+ const right = def.out._zod.run(payload, ctx);
1854
+ if (right instanceof Promise) {
1855
+ return right.then((right) => handleCodecAResult(right, def, ctx));
1856
+ }
1857
+ return handleCodecAResult(right, def, ctx);
1858
+ }
1859
+ };
1860
+ });
1861
+ function handleCodecAResult(result, def, ctx) {
1862
+ if (result.issues.length) {
1863
+ // prevent further checks
1864
+ result.aborted = true;
1865
+ return result;
1866
+ }
1867
+ const direction = ctx.direction || "forward";
1868
+ if (direction === "forward") {
1869
+ const transformed = def.transform(result.value, result);
1870
+ if (transformed instanceof Promise) {
1871
+ return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
1872
+ }
1873
+ return handleCodecTxResult(result, transformed, def.out, ctx);
1874
+ }
1875
+ else {
1876
+ const transformed = def.reverseTransform(result.value, result);
1877
+ if (transformed instanceof Promise) {
1878
+ return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
1879
+ }
1880
+ return handleCodecTxResult(result, transformed, def.in, ctx);
1881
+ }
1882
+ }
1883
+ function handleCodecTxResult(left, value, nextSchema, ctx) {
1884
+ // Check if transform added any issues
1885
+ if (left.issues.length) {
1886
+ left.aborted = true;
1887
+ return left;
1888
+ }
1889
+ return nextSchema._zod.run({ value, issues: left.issues }, ctx);
1890
+ }
1891
+ export const $ZodReadonly = /*@__PURE__*/ core.$constructor("$ZodReadonly", (inst, def) => {
1892
+ $ZodType.init(inst, def);
1893
+ util.defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
1894
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1895
+ util.defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
1896
+ util.defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
1897
+ inst._zod.parse = (payload, ctx) => {
1898
+ if (ctx.direction === "backward") {
1899
+ return def.innerType._zod.run(payload, ctx);
1900
+ }
1901
+ const result = def.innerType._zod.run(payload, ctx);
1902
+ if (result instanceof Promise) {
1903
+ return result.then(handleReadonlyResult);
1904
+ }
1905
+ return handleReadonlyResult(result);
1906
+ };
1907
+ });
1908
+ function handleReadonlyResult(payload) {
1909
+ payload.value = Object.freeze(payload.value);
1910
+ return payload;
1911
+ }
1912
+ export const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor("$ZodTemplateLiteral", (inst, def) => {
1913
+ $ZodType.init(inst, def);
1914
+ const regexParts = [];
1915
+ for (const part of def.parts) {
1916
+ if (typeof part === "object" && part !== null) {
1917
+ // is Zod schema
1918
+ if (!part._zod.pattern) {
1919
+ // if (!source)
1920
+ throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
1921
+ }
1922
+ const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
1923
+ if (!source)
1924
+ throw new Error(`Invalid template literal part: ${part._zod.traits}`);
1925
+ const start = source.startsWith("^") ? 1 : 0;
1926
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
1927
+ regexParts.push(source.slice(start, end));
1928
+ }
1929
+ else if (part === null || util.primitiveTypes.has(typeof part)) {
1930
+ regexParts.push(util.escapeRegex(`${part}`));
1931
+ }
1932
+ else {
1933
+ throw new Error(`Invalid template literal part: ${part}`);
1934
+ }
1935
+ }
1936
+ inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
1937
+ inst._zod.parse = (payload, _ctx) => {
1938
+ if (typeof payload.value !== "string") {
1939
+ payload.issues.push({
1940
+ input: payload.value,
1941
+ inst,
1942
+ expected: "string",
1943
+ code: "invalid_type",
1944
+ });
1945
+ return payload;
1946
+ }
1947
+ inst._zod.pattern.lastIndex = 0;
1948
+ if (!inst._zod.pattern.test(payload.value)) {
1949
+ payload.issues.push({
1950
+ input: payload.value,
1951
+ inst,
1952
+ code: "invalid_format",
1953
+ format: def.format ?? "template_literal",
1954
+ pattern: inst._zod.pattern.source,
1955
+ });
1956
+ return payload;
1957
+ }
1958
+ return payload;
1959
+ };
1960
+ });
1961
+ export const $ZodFunction = /*@__PURE__*/ core.$constructor("$ZodFunction", (inst, def) => {
1962
+ $ZodType.init(inst, def);
1963
+ inst._def = def;
1964
+ inst._zod.def = def;
1965
+ inst.implement = (func) => {
1966
+ if (typeof func !== "function") {
1967
+ throw new Error("implement() must be called with a function");
1968
+ }
1969
+ return function (...args) {
1970
+ const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
1971
+ const result = Reflect.apply(func, this, parsedArgs);
1972
+ if (inst._def.output) {
1973
+ return parse(inst._def.output, result);
1974
+ }
1975
+ return result;
1976
+ };
1977
+ };
1978
+ inst.implementAsync = (func) => {
1979
+ if (typeof func !== "function") {
1980
+ throw new Error("implementAsync() must be called with a function");
1981
+ }
1982
+ return async function (...args) {
1983
+ const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
1984
+ const result = await Reflect.apply(func, this, parsedArgs);
1985
+ if (inst._def.output) {
1986
+ return await parseAsync(inst._def.output, result);
1987
+ }
1988
+ return result;
1989
+ };
1990
+ };
1991
+ inst._zod.parse = (payload, _ctx) => {
1992
+ if (typeof payload.value !== "function") {
1993
+ payload.issues.push({
1994
+ code: "invalid_type",
1995
+ expected: "function",
1996
+ input: payload.value,
1997
+ inst,
1998
+ });
1999
+ return payload;
2000
+ }
2001
+ // Check if output is a promise type to determine if we should use async implementation
2002
+ const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
2003
+ if (hasPromiseOutput) {
2004
+ payload.value = inst.implementAsync(payload.value);
2005
+ }
2006
+ else {
2007
+ payload.value = inst.implement(payload.value);
2008
+ }
2009
+ return payload;
2010
+ };
2011
+ inst.input = (...args) => {
2012
+ const F = inst.constructor;
2013
+ if (Array.isArray(args[0])) {
2014
+ return new F({
2015
+ type: "function",
2016
+ input: new $ZodTuple({
2017
+ type: "tuple",
2018
+ items: args[0],
2019
+ rest: args[1],
2020
+ }),
2021
+ output: inst._def.output,
2022
+ });
2023
+ }
2024
+ return new F({
2025
+ type: "function",
2026
+ input: args[0],
2027
+ output: inst._def.output,
2028
+ });
2029
+ };
2030
+ inst.output = (output) => {
2031
+ const F = inst.constructor;
2032
+ return new F({
2033
+ type: "function",
2034
+ input: inst._def.input,
2035
+ output,
2036
+ });
2037
+ };
2038
+ return inst;
2039
+ });
2040
+ export const $ZodPromise = /*@__PURE__*/ core.$constructor("$ZodPromise", (inst, def) => {
2041
+ $ZodType.init(inst, def);
2042
+ inst._zod.parse = (payload, ctx) => {
2043
+ return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
2044
+ };
2045
+ });
2046
+ export const $ZodLazy = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
2047
+ $ZodType.init(inst, def);
2048
+ // let _innerType!: any;
2049
+ // util.defineLazy(def, "getter", () => {
2050
+ // if (!_innerType) {
2051
+ // _innerType = def.getter();
2052
+ // }
2053
+ // return () => _innerType;
2054
+ // });
2055
+ util.defineLazy(inst._zod, "innerType", () => def.getter());
2056
+ util.defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
2057
+ util.defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
2058
+ util.defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
2059
+ util.defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? undefined);
2060
+ inst._zod.parse = (payload, ctx) => {
2061
+ const inner = inst._zod.innerType;
2062
+ return inner._zod.run(payload, ctx);
2063
+ };
2064
+ });
2065
+ export const $ZodCustom = /*@__PURE__*/ core.$constructor("$ZodCustom", (inst, def) => {
2066
+ checks.$ZodCheck.init(inst, def);
2067
+ $ZodType.init(inst, def);
2068
+ inst._zod.parse = (payload, _) => {
2069
+ return payload;
2070
+ };
2071
+ inst._zod.check = (payload) => {
2072
+ const input = payload.value;
2073
+ const r = def.fn(input);
2074
+ if (r instanceof Promise) {
2075
+ return r.then((r) => handleRefineResult(r, payload, input, inst));
2076
+ }
2077
+ handleRefineResult(r, payload, input, inst);
2078
+ return;
2079
+ };
2080
+ });
2081
+ function handleRefineResult(result, payload, input, inst) {
2082
+ if (!result) {
2083
+ const _iss = {
2084
+ code: "custom",
2085
+ input,
2086
+ inst, // incorporates params.error into issue reporting
2087
+ path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
2088
+ continue: !inst._zod.def.abort,
2089
+ // params: inst._zod.def.params,
2090
+ };
2091
+ if (inst._zod.def.params)
2092
+ _iss.params = inst._zod.def.params;
2093
+ payload.issues.push(util.issue(_iss));
2094
+ }
2095
+ }