cf 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +15 -5
  2. package/dist/_meta/agent-context.json +12 -4
  3. package/dist/_meta/commands.json +2249 -262
  4. package/dist/_meta/hand-written-commands.json +784 -0
  5. package/dist/_meta/schemas.json +1882 -155
  6. package/dist/{abuse-reports-CGF4zcKf.mjs → abuse-reports-sDBTV0qZ.mjs} +2 -2
  7. package/dist/{access-lhLJo1v2.mjs → access-DcNzuCue.mjs} +1 -1
  8. package/dist/account-BX90zXn5.mjs +2 -0
  9. package/dist/{account-tags-B88TotoH.mjs → account-tags-Bz3JG5hI.mjs} +4 -4
  10. package/dist/{accounts-BSIAT_iP.mjs → accounts-DCuW3xyZ.mjs} +12 -12
  11. package/dist/{acm-VULm1djv.mjs → acm-zjfShZLS.mjs} +1 -1
  12. package/dist/{addressing-BHPBIkRY.mjs → addressing-DORQ64Ux.mjs} +11 -11
  13. package/dist/{agent-context-KBy48G1b.mjs → agent-context-BgPR_aQr.mjs} +1 -1
  14. package/dist/agent-memory-C0hAUMeC.mjs +6 -0
  15. package/dist/ai-BpEBGMT2.mjs +5 -0
  16. package/dist/ai-audit-DnU3vn3E.mjs +2 -0
  17. package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
  18. package/dist/ai-search-DKbN9Tyd.mjs +7 -0
  19. package/dist/ai-security-C_I5lo58.mjs +4 -0
  20. package/dist/{alerting-Bl8OqViR.mjs → alerting-4T8gmZs-.mjs} +1 -1
  21. package/dist/analytics-Bxh4TCP7.mjs +3 -0
  22. package/dist/analytics_engine-fV56bjVN.mjs +2 -0
  23. package/dist/{api-security-4FVrD4n8.mjs → api-security-COk_i184.mjs} +20 -20
  24. package/dist/argo-DIRfvxvv.mjs +2 -0
  25. package/dist/{artifacts-CVDGnr2V.mjs → artifacts-BBfXNfUg.mjs} +1 -1
  26. package/dist/audit-logs-BlOrlAWe.mjs +2 -0
  27. package/dist/{auth-MQEamPN9.mjs → auth-D3X9HYhD.mjs} +3 -3
  28. package/dist/auth-DPhNN3Ly.mjs +5 -0
  29. package/dist/billing-B9e4PnvN.mjs +3 -0
  30. package/dist/body-parser-BshbixEq.mjs +2 -0
  31. package/dist/bot-management-D2JVeS-V.mjs +5 -0
  32. package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
  33. package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
  34. package/dist/{browser-extension-BtpCbh-2.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
  35. package/dist/browser-run-CHGOCTdG.mjs +4 -0
  36. package/dist/build-D0FhOj40.mjs +8 -0
  37. package/dist/{cache-VyWK1SjY.mjs → cache-C6V7PbQM.mjs} +1 -1
  38. package/dist/{calls-BxoRYxs4.mjs → calls-Bye8Tyy-.mjs} +1 -1
  39. package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
  40. package/dist/cf-Ds4JFovl.mjs +18 -0
  41. package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
  42. package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
  43. package/dist/{client-certificates-DDUv8K0a.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
  44. package/dist/{client-side-security-D4ysjwWT.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
  45. package/dist/cloud-connector-CL1jPQud.mjs +2 -0
  46. package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
  47. package/dist/command-C9VP3xaA.mjs +2 -0
  48. package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
  49. package/dist/config.d.mts +1460 -1348
  50. package/dist/config.mjs +1 -1
  51. package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
  52. package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
  53. package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
  54. package/dist/{connectors-BqxYMMtQ.mjs → connectors-BQwyBJ4_.mjs} +1 -1
  55. package/dist/{containers-CKW081JA.mjs → containers-BrQtGiNp.mjs} +12 -8
  56. package/dist/{content-scan-Dgd7A8KF.mjs → content-scan-DNzhXYkY.mjs} +1 -1
  57. package/dist/{csamScanner-DYL37wLc.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
  58. package/dist/{ct-alerting-CkhSbfAs.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
  59. package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
  60. package/dist/custom-csrs-bhClr2SU.mjs +3 -0
  61. package/dist/{custom-hostnames-q_nsnlye.mjs → custom-hostnames-C0eiGvG9.mjs} +1 -1
  62. package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
  63. package/dist/custom-pages-DTINMR30.mjs +3 -0
  64. package/dist/d1-sKdExJYF.mjs +20 -0
  65. package/dist/data-security-mV3a6UfW.mjs +7 -0
  66. package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
  67. package/dist/delegate.mjs +1 -1
  68. package/dist/{deploy-CZ7bgNDu.mjs → deploy-BL59O1O1.mjs} +1 -1
  69. package/dist/deploy-input-Dz6q-__n.mjs +2 -0
  70. package/dist/{dev-V10MG-Bg.mjs → dev-BDaavgH1.mjs} +2 -2
  71. package/dist/{diagnostics-BTH-8nJH.mjs → diagnostics-CJV6qWUA.mjs} +1 -1
  72. package/dist/{directory-BlH6N6Qy.mjs → directory-B5zCMusW.mjs} +1 -1
  73. package/dist/{dispatch-namespaces-BCjH1JzB.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
  74. package/dist/dist-BHi7UhXO.mjs +72 -0
  75. package/dist/dist-BWpErtDM.mjs +384 -0
  76. package/dist/{dls-BF5iN78p.mjs → dls-t0hnIe_P.mjs} +1 -1
  77. package/dist/{dns-CeCTNqRk.mjs → dns-C8FC2hbh.mjs} +13 -13
  78. package/dist/{dns-firewall-B54MaLGm.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
  79. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
  80. package/dist/dry-run-DL2V6yFm.mjs +2 -0
  81. package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
  82. package/dist/email-auth-BmYrl0pO.mjs +2 -0
  83. package/dist/email-routing-CF3_Z957.mjs +6 -0
  84. package/dist/email-security-F7OYcMkZ.mjs +18 -0
  85. package/dist/email-sending-EyU3WvGQ.mjs +7 -0
  86. package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
  87. package/dist/{firewall-CBPGJ43p.mjs → firewall-8YWWy4iB.mjs} +9 -9
  88. package/dist/flagship-C4x0l-8J.mjs +4 -0
  89. package/dist/{fraud-BIhS8pLf.mjs → fraud-HR_SdUx3.mjs} +1 -1
  90. package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
  91. package/dist/{healthchecks-FiXIk-KP.mjs → healthchecks-4qOvjrTN.mjs} +1 -1
  92. package/dist/{hostnames-Bx0mykMR.mjs → hostnames-DehdYOMz.mjs} +1 -1
  93. package/dist/{hyperdrive-C8qCabBF.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
  94. package/dist/iam-DR72hmii.mjs +6 -0
  95. package/dist/images-CeKc5JPh.mjs +8 -0
  96. package/dist/index.mjs +1 -1
  97. package/dist/{intel-B-9Z_sJs.mjs → intel-DtFix9WL.mjs} +1 -1
  98. package/dist/{interactive-DtsCYfrK.mjs → interactive-C7M55Wxx.mjs} +1 -1
  99. package/dist/ips-CtWCjXAN.mjs +2 -0
  100. package/dist/{keyless-certificates-THHvoXX3.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
  101. package/dist/keys-BmhG6Kn1.mjs +2 -0
  102. package/dist/{kv-BFDUCnft.mjs → kv-BuVPAuZP.mjs} +1 -1
  103. package/dist/{leaked-credential-checks-DUlUCOoJ.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
  104. package/dist/load-balancers-CylN-l7n.mjs +6 -0
  105. package/dist/{local-D-aVNu6A.mjs → local-Be3lg_9E.mjs} +1 -1
  106. package/dist/{local-runtime-Dh3keC5v.mjs → local-runtime-Ce7k598H.mjs} +1 -1
  107. package/dist/logexplorer-CvRPoKbj.mjs +17 -0
  108. package/dist/logo-matches-Heuft3yF.mjs +2 -0
  109. package/dist/logos-DRYjGBDq.mjs +3 -0
  110. package/dist/{logpush-BK34mMQs.mjs → logpush-Dve9jOMp.mjs} +1 -1
  111. package/dist/{logs-CLAqX9h2.mjs → logs-SC86FE89.mjs} +1 -1
  112. package/dist/{magic-cloud-networking-h_ozrC5S.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
  113. package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
  114. package/dist/magic-transit-BK_3asH2.mjs +111 -0
  115. package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
  116. package/dist/matches-Iss9Fo4R.mjs +2 -0
  117. package/dist/mcp-8wxXT6JU.mjs +4 -0
  118. package/dist/mesh-Bf9UAS4J.mjs +4 -0
  119. package/dist/{moq-qmuVPAO0.mjs → moq-ZKMFOeVz.mjs} +1 -1
  120. package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
  121. package/dist/{network-D74cSy3t.mjs → network-B1lBARU9.mjs} +1 -1
  122. package/dist/{network-interconnects-BJ0Nc48J.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
  123. package/dist/oauth-DuEONNgC.mjs +14 -0
  124. package/dist/{oauth-clients-Br-smLxQ.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
  125. package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
  126. package/dist/observability-Jya7-zkl.mjs +4 -0
  127. package/dist/{open-PBXRGS4R-R-qesf18.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
  128. package/dist/{organization-NX7yCZrq.mjs → organization-CYxYV4e0.mjs} +6 -6
  129. package/dist/organizations-SacGUW44.mjs +2 -0
  130. package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
  131. package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
  132. package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
  133. package/dist/{output-DrpYYfnB.mjs → output-Ccqw2WOb.mjs} +1 -1
  134. package/dist/page-rules-BqEyFR2c.mjs +27 -0
  135. package/dist/pages-CQ7ZVWk1.mjs +14 -0
  136. package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
  137. package/dist/pipelines-6De2Pe2C.mjs +6 -0
  138. package/dist/precursor-iwK-1P_d.mjs +4 -0
  139. package/dist/progress-BqQcF5QH.mjs +2 -0
  140. package/dist/project-settings-C_1-JI6Y.mjs +3 -0
  141. package/dist/prompt-B0sWIs9c.mjs +3 -0
  142. package/dist/{public-BwQqexwo-CNW_dPly.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
  143. package/dist/queries-c7zvnfEQ.mjs +3 -0
  144. package/dist/queues-BU6y16qS.mjs +6 -0
  145. package/dist/r2-Jo3QMahK.mjs +24 -0
  146. package/dist/{r2-data-catalog-Du7hN9jA.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
  147. package/dist/radar-DIYAMEof.mjs +2 -0
  148. package/dist/{rate-limits-yBF3qoYD.mjs → rate-limits-DewOcznT.mjs} +1 -1
  149. package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
  150. package/dist/{realtimekit-CIP7lP-a.mjs → realtimekit-cnZEVNDn.mjs} +1 -1
  151. package/dist/registrar-BsWr_aPM.mjs +23 -0
  152. package/dist/{registrar-sandbox-DiXg8p_1.mjs → registrar-sandbox-BlcpUyIH.mjs} +4 -4
  153. package/dist/{registry-Bck_zFkz.mjs → registry-jifR3_Y6.mjs} +1 -1
  154. package/dist/reporting--1AyTV7k.mjs +2 -0
  155. package/dist/request-tracers-C_VX7X6-.mjs +2 -0
  156. package/dist/{resource-sharing-D1pSDvtf.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
  157. package/dist/resource-tagging-C33U6T74.mjs +2 -0
  158. package/dist/rules-BfjzALMi.mjs +4 -0
  159. package/dist/rulesets-3i_1Vwt-.mjs +5 -0
  160. package/dist/rum-CjmIckiR.mjs +4 -0
  161. package/dist/{schema-B34Q9tLF.mjs → schema-1mwmslUV.mjs} +1 -1
  162. package/dist/schema-flags-llLJuFFw.mjs +5 -0
  163. package/dist/{scim-CcSyfKCH.mjs → scim-pApmzA5B.mjs} +1 -1
  164. package/dist/{secrets-store-DFmvtphu.mjs → secrets-store-DBC9WJau.mjs} +1 -1
  165. package/dist/security-center-Djm06dq-.mjs +2 -0
  166. package/dist/{security-txt-DqnFpjMI.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
  167. package/dist/{share-BuwYUzOL.mjs → share-Dj-MNXrw.mjs} +4 -4
  168. package/dist/shared-BJvq4DkR.mjs +290 -0
  169. package/dist/smart-shield--8EpJjrF.mjs +4 -0
  170. package/dist/snippets-Dyz0PH60.mjs +4 -0
  171. package/dist/{spawn-O1RS01vr.mjs → spawn-C5Z7oWdp.mjs} +108 -112
  172. package/dist/{spectrum-b7N1ZRAm.mjs → spectrum-rAHWz8rH.mjs} +1 -1
  173. package/dist/{speed-cw31yFva.mjs → speed-BKepWBXj.mjs} +1 -1
  174. package/dist/src-gJma71Ec.mjs +108 -0
  175. package/dist/{ssl-CsEhRVTO.mjs → ssl-KdFiY3ev.mjs} +1 -1
  176. package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
  177. package/dist/{state-Bb5Cbc_L.mjs → state-Cu3cItUg.mjs} +1 -1
  178. package/dist/{stream-DFOao6Gu.mjs → stream-CKJ6Tb0M.mjs} +13 -13
  179. package/dist/submit-BxbKKhBn.mjs +2 -0
  180. package/dist/tags-DA8dq9fx.mjs +2 -0
  181. package/dist/tenant-DLXw48hS.mjs +2 -0
  182. package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
  183. package/dist/{tools-BHfBOZOU.mjs → tools-x8bj9E6b.mjs} +1 -1
  184. package/dist/{tunnel-DkMiNtVY.mjs → tunnel-CNQA5Flp.mjs} +1 -1
  185. package/dist/tunnels-CC10EOsU.mjs +2 -0
  186. package/dist/turnstile-CH58hnf4.mjs +23 -0
  187. package/dist/{ui-DE8CNn6c.mjs → ui-CmnnBm_O.mjs} +1 -1
  188. package/dist/url-info-BpCgdUtL.mjs +2 -0
  189. package/dist/{url-normalization-ClfFiruK.mjs → url-normalization-BzuynEy1.mjs} +1 -1
  190. package/dist/url-scanner-APIZbhB7.mjs +2 -0
  191. package/dist/user-2-NGebfI.mjs +12 -0
  192. package/dist/values-S_bNv819.mjs +2 -0
  193. package/dist/{vectorize-CVKu7lEt.mjs → vectorize-Bv7feLBC.mjs} +1 -1
  194. package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
  195. package/dist/{web-assets-C2s9kzWf.mjs → web-assets-C1UmOyzD.mjs} +1 -1
  196. package/dist/web3-GnUocVYH.mjs +4 -0
  197. package/dist/workers-J1-PLwdl.mjs +28 -0
  198. package/dist/{workers-builds-B55-oXOa.mjs → workers-builds-DCHmWOMS.mjs} +1 -1
  199. package/dist/{workflows-B-kGHxFu.mjs → workflows-CArfEI2c.mjs} +1 -1
  200. package/dist/zaraz-mg2YlR3_.mjs +2 -0
  201. package/dist/{zero-trust-DV3sIOvu.mjs → zero-trust-DVdUPtj1.mjs} +67 -66
  202. package/dist/zone-DMAfrDJX.mjs +2 -0
  203. package/dist/zones-CNwxUi7I.mjs +21 -0
  204. package/package.json +10 -7
  205. package/dist/account-CYRm3yoN.mjs +0 -2
  206. package/dist/agent-memory-DDv_Gxr7.mjs +0 -6
  207. package/dist/ai-audit-BWZGvbca.mjs +0 -2
  208. package/dist/ai-gateway-jeB-sAgP.mjs +0 -13
  209. package/dist/ai-search-BmdskMjR.mjs +0 -7
  210. package/dist/ai-security-CsmfcaUx.mjs +0 -4
  211. package/dist/ai-viHB1tgI.mjs +0 -5
  212. package/dist/analytics-vOxw8Hy0.mjs +0 -3
  213. package/dist/analytics_engine-DO4-C0wD.mjs +0 -2
  214. package/dist/argo-CQfCgazW.mjs +0 -2
  215. package/dist/audit-logs-CzpwvQ6A.mjs +0 -2
  216. package/dist/auth-D0xZxAEa.mjs +0 -5
  217. package/dist/billing-aJgapeRm.mjs +0 -3
  218. package/dist/body-parser-C-c9gfH1.mjs +0 -2
  219. package/dist/bot-management-Y2q5d-pi.mjs +0 -5
  220. package/dist/botnet-feed-DANJqfmE.mjs +0 -3
  221. package/dist/brand-protection-CjpZWBjp.mjs +0 -3
  222. package/dist/browser-run-BFn9h2Tz.mjs +0 -4
  223. package/dist/build-DcflwvqN.mjs +0 -2
  224. package/dist/certificate-authorities-D7OAFxF_.mjs +0 -2
  225. package/dist/cf-C7DU4819.mjs +0 -18
  226. package/dist/chunk-LQW53VED-DLrXV-hE.mjs +0 -499
  227. package/dist/cloud-connector-Bhec6z2P.mjs +0 -2
  228. package/dist/cloudforce-one-J_hn9ss9.mjs +0 -36
  229. package/dist/connector-interrupts-Dycx8zFx.mjs +0 -2
  230. package/dist/connector-telemetry-events-BmxOSNtN.mjs +0 -2
  231. package/dist/connector-telemetry-snapshots-CdcqfKnH.mjs +0 -2
  232. package/dist/custom-certificates-BzAOnEoT.mjs +0 -5
  233. package/dist/custom-csrs-CgzG3pd3.mjs +0 -3
  234. package/dist/custom-nameservers-BUBmfhUe.mjs +0 -3
  235. package/dist/custom-pages-M7jA2Hit.mjs +0 -3
  236. package/dist/d1-BFvMd6-S.mjs +0 -20
  237. package/dist/data-security-Bji4Or_j.mjs +0 -7
  238. package/dist/dcv-delegation-BuoRQ1Yh.mjs +0 -2
  239. package/dist/deploy-input-CrvuoDGJ.mjs +0 -242
  240. package/dist/dist-CgrMkXFx.mjs +0 -72
  241. package/dist/durable-objects-D8FQORrL.mjs +0 -2
  242. package/dist/email-auth-DJK0Eb30.mjs +0 -2
  243. package/dist/email-routing-NpmiKIrl.mjs +0 -6
  244. package/dist/email-security-BLZ7WZ9Z.mjs +0 -18
  245. package/dist/email-sending-dn-353Nx.mjs +0 -7
  246. package/dist/fieldExtractors-ahysj57J.mjs +0 -3
  247. package/dist/flagship-BusjRNIb.mjs +0 -4
  248. package/dist/google-tag-gateway-TZZ3F1tV.mjs +0 -2
  249. package/dist/iam-Cj63Kjc6.mjs +0 -6
  250. package/dist/images-CBWXCDhy.mjs +0 -8
  251. package/dist/ips-qs9eGJnI.mjs +0 -2
  252. package/dist/keys-D7N0j4-x.mjs +0 -2
  253. package/dist/load-balancers-D2zbQ8fT.mjs +0 -6
  254. package/dist/logexplorer-CUsfZ_bS.mjs +0 -13
  255. package/dist/logo-matches-CJcthPHf.mjs +0 -2
  256. package/dist/logos-BS65zN8q.mjs +0 -3
  257. package/dist/magic-network-monitoring-C7tAPNKP.mjs +0 -4
  258. package/dist/magic-transit-BtsFePMx.mjs +0 -111
  259. package/dist/managed-transforms-Cm_KVCMB.mjs +0 -3
  260. package/dist/matches-InA1hwII.mjs +0 -2
  261. package/dist/mcp-mJ7bekNJ.mjs +0 -4
  262. package/dist/mesh-BK4S1Ezy.mjs +0 -4
  263. package/dist/mtls-certificates-CU4OAAXY.mjs +0 -3
  264. package/dist/oauth-B0ETkNcX.mjs +0 -15
  265. package/dist/oauth-scopes-D5bF11ju.mjs +0 -2
  266. package/dist/observability-BWE0Gg3V.mjs +0 -4
  267. package/dist/organizations-DLhiRt8g.mjs +0 -2
  268. package/dist/origin-ca-certificates-Ff4McZRQ.mjs +0 -3
  269. package/dist/origin-post-quantum-encryption-UuTr4_SW.mjs +0 -2
  270. package/dist/origin-tls-client-auth-DOJ1zlH3.mjs +0 -4
  271. package/dist/page-rules-BSz1gO-_.mjs +0 -18
  272. package/dist/pages-DVDogxPs.mjs +0 -14
  273. package/dist/pay-per-crawl-BrLXK7gT.mjs +0 -4
  274. package/dist/pipelines-BszRk4sM.mjs +0 -6
  275. package/dist/precursor-BPNjQr76.mjs +0 -4
  276. package/dist/progress-CsHIt3Tp.mjs +0 -2
  277. package/dist/prompt-DdegNPpg.mjs +0 -3
  278. package/dist/queries-JL1H1Biz.mjs +0 -3
  279. package/dist/queues-DpkYdRUE.mjs +0 -6
  280. package/dist/r2-CKozthw_.mjs +0 -24
  281. package/dist/radar-C-92vggG.mjs +0 -2
  282. package/dist/raw-fetch-CteyTOM2.mjs +0 -2
  283. package/dist/registrar-DKKN0M29.mjs +0 -21
  284. package/dist/reporting-fg_GKXe1.mjs +0 -2
  285. package/dist/request-tracers-CkMya96z.mjs +0 -2
  286. package/dist/resource-tagging-z48JGHCq.mjs +0 -2
  287. package/dist/rules-BTmNjDN-.mjs +0 -4
  288. package/dist/rulesets-CsoSM-17.mjs +0 -5
  289. package/dist/rum-DB4iO2q5.mjs +0 -4
  290. package/dist/schema-flags-iGoOriJt.mjs +0 -5
  291. package/dist/security-center-DFKeHq5c.mjs +0 -2
  292. package/dist/session-D6KHthHf.mjs +0 -2
  293. package/dist/shared-VppSAQf4.mjs +0 -2
  294. package/dist/smart-shield-D6X8L7p8.mjs +0 -4
  295. package/dist/snippets-DIpc9pb_.mjs +0 -4
  296. package/dist/src-D_HETJNy.mjs +0 -108
  297. package/dist/submit--xTzyNPy.mjs +0 -2
  298. package/dist/tags-efICDkah.mjs +0 -2
  299. package/dist/tenant-CerHuToJ.mjs +0 -2
  300. package/dist/tenant-custom-nameservers-C4otMBm2.mjs +0 -3
  301. package/dist/triggers-BEsiiKAf.mjs +0 -2
  302. package/dist/tunnels-D0J8lJoI.mjs +0 -2
  303. package/dist/turnstile-CFmtY5bn.mjs +0 -23
  304. package/dist/url-info-DBCeRWwb.mjs +0 -2
  305. package/dist/url-scanner-CNyvg65L.mjs +0 -2
  306. package/dist/user-bifVEQq5.mjs +0 -12
  307. package/dist/values-OxkdP1tV.mjs +0 -2
  308. package/dist/versions-BVL-Ludh.mjs +0 -2
  309. package/dist/waiting-rooms-CmRAl51T.mjs +0 -11
  310. package/dist/web3-y_cY91V_.mjs +0 -4
  311. package/dist/workers-jDcq14GH.mjs +0 -24
  312. package/dist/zaraz-27zwjLvv.mjs +0 -2
  313. package/dist/zone-BJix2KQ9.mjs +0 -2
  314. package/dist/zones-Bkj5i92c.mjs +0 -21
  315. /package/dist/{alerts-CRmjqOZi.mjs → alerts-15-IW4jE.mjs} +0 -0
  316. /package/dist/{autorag-BD7cu5NU.mjs → autorag-CFwRkEKw.mjs} +0 -0
  317. /package/dist/{brands-BhALBkX2.mjs → brands-BgT1vu9B.mjs} +0 -0
  318. /package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
  319. /package/dist/{clear-BgF8No7D.mjs → clear-BlCK85Me.mjs} +0 -0
  320. /package/dist/{cli-types-BsTty22w.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
  321. /package/dist/{connector-telemetry-events-latest-BY2556uL.mjs → connector-telemetry-events-latest-BbpcII3_.mjs} +0 -0
  322. /package/dist/{connector-telemetry-snapshots-latest-BHYdxUEF.mjs → connector-telemetry-snapshots-latest-DuCiimXl.mjs} +0 -0
  323. /package/dist/{domain-info-C50W5GhA.mjs → domain-info-C7LBxPBt.mjs} +0 -0
  324. /package/dist/{health-BFNZqiAm.mjs → health-DZFfafkX.mjs} +0 -0
  325. /package/dist/{input-validation-Bav2M9F-.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
  326. /package/dist/{internal-BTeSewwB.mjs → internal-BKHC2D1Y.mjs} +0 -0
  327. /package/dist/{live-Dkiyu30_.mjs → live-DwCvDmaH.mjs} +0 -0
  328. /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
  329. /package/dist/{rate-limit-analytics-Dz-Wv1T0.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
  330. /package/dist/{ready-TKOkKeRg.mjs → ready-D9H2zHHI.mjs} +0 -0
  331. /package/dist/{recent-submissions-3Asm6eIi.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
  332. /package/dist/{refute-BVz9nMyd.mjs → refute-2W8NLCN4.mjs} +0 -0
  333. /package/dist/{resolve-CeBbH6Pq.mjs → resolve-B8CyM1mi.mjs} +0 -0
  334. /package/dist/{scan-logo-ZteA-PUV.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
  335. /package/dist/{scan-page-DWDSyzQ7.mjs → scan-page-CWhta3x7.mjs} +0 -0
  336. /package/dist/{search-DGNc37HK.mjs → search-DZmBQJL9.mjs} +0 -0
  337. /package/dist/{signed-url-B5Qpn2mn.mjs → signed-url-CQrmWgz5.mjs} +0 -0
  338. /package/dist/{submission-info-FjUolE6A.mjs → submission-info-C98A0bqq.mjs} +0 -0
  339. /package/dist/{theme-CeVf-5qG.mjs → theme-CrIBazAF.mjs} +0 -0
  340. /package/dist/{total-queries-NHJj1HGq.mjs → total-queries-BZoaFoDE.mjs} +0 -0
  341. /package/dist/{tracked-domains-CniKVHIp.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
  342. /package/dist/{verify-DS1PWAJe.mjs → verify-4e4L9IRk.mjs} +0 -0
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ import{n as e}from"./chunk-vbHwaUoU.mjs";import*as t from"node:module";import{fileURLToPath as n,pathToFileURL as r}from"node:url";import{AsyncLocalStorage as i}from"node:async_hooks";var a;const o=Object.freeze({status:`aborted`});function s(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var c=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},l=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(a=globalThis).__zod_globalConfig??(a.__zod_globalConfig={});const u=globalThis.__zod_globalConfig;function d(e){return e&&Object.assign(u,e),u}function f(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function p(e,t){return typeof t==`bigint`?t.toString():t}function m(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function h(e){return e==null}function g(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const _=Symbol(`evaluating`);function v(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_)return r===void 0&&(r=_,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function y(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function b(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const S=m(()=>{if(u.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function C(e){if(x(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(x(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ie(e){return C(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const ae=new Set([`string`,`number`,`symbol`]),oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function w(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function T(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function E(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return T(e,b(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return y(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return T(e,b(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return y(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!C(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return T(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return y(this,`shape`,n),n}}))}function fe(e,t){if(!C(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return T(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return y(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return T(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return y(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return T(t,b(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return y(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return T(t,b(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return y(this,`shape`,i),i}}))}function D(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function O(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _e(e){return typeof e==`string`?e:e?.message}function k(e,t,n){let r=e.message?e.message:_e(e.inst?._zod.def?.error?.(e))??_e(t?.error?.(e))??_e(n.customError?.(e))??_e(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ve(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ye(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const be=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,p,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},xe=s(`$ZodError`,be),Se=s(`$ZodError`,be,{Parent:Error});function Ce(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function we(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}const Te=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new c;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>k(e,a,d())));throw re(t,i?.callee),t}return o.value},Ee=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>k(e,a,d())));throw re(t,i?.callee),t}return o.value},De=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new c;return a.issues.length?{success:!1,error:new(e??xe)(a.issues.map(e=>k(e,i,d())))}:{success:!0,data:a.value}},Oe=De(Se),ke=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>k(e,i,d())))}:{success:!0,data:a.value}},Ae=ke(Se),je=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Te(e)(t,n,i)},Me=e=>(t,n,r)=>Te(e)(t,n,r),Ne=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ee(e)(t,n,i)},Pe=e=>async(t,n,r)=>Ee(e)(t,n,r),Fe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return De(e)(t,n,i)},Ie=e=>(t,n,r)=>De(e)(t,n,r),Le=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ke(e)(t,n,i)},Re=e=>async(t,n,r)=>ke(e)(t,n,r),ze=/^[cC][0-9a-z]{6,}$/,Be=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,He=/^[0-9a-vA-V]{20}$/,Ue=/^[A-Za-z0-9]{27}$/,We=/^[a-zA-Z0-9_-]{21}$/,Ge=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ke=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qe=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Je=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Ye(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Xe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ze=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$e=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,et=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tt=/^[A-Za-z0-9_-]*$/,nt=/^https?$/,rt=/^\+[1-9]\d{6,14}$/,it=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,at=RegExp(`^${it}$`);function ot(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function st(e){return RegExp(`^${ot(e)}$`)}function ct(e){let t=ot({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${it}T(?:${r})$`)}const lt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ut=/^-?\d+$/,dt=/^-?\d+(?:\.\d+)?$/,ft=/^(?:true|false)$/i,pt=/^null$/i,mt=/^[^A-Z]*$/,ht=/^[^a-z]*$/,A=s(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gt={number:`number`,bigint:`bigint`,object:`date`},_t=s(`$ZodCheckLessThan`,(e,t)=>{A.init(e,t);let n=gt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vt=s(`$ZodCheckGreaterThan`,(e,t)=>{A.init(e,t);let n=gt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yt=s(`$ZodCheckMultipleOf`,(e,t)=>{A.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),bt=s(`$ZodCheckNumberFormat`,(e,t)=>{A.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=ut)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),xt=s(`$ZodCheckMaxLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ve(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),St=s(`$ZodCheckMinLength`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ve(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ct=s(`$ZodCheckLengthEquals`,(e,t)=>{var n;A.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!h(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ve(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wt=s(`$ZodCheckStringFormat`,(e,t)=>{var n,r;A.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tt=s(`$ZodCheckRegex`,(e,t)=>{wt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Et=s(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=mt,wt.init(e,t)}),Dt=s(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ht,wt.init(e,t)}),Ot=s(`$ZodCheckIncludes`,(e,t)=>{A.init(e,t);let n=w(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kt=s(`$ZodCheckStartsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`^${w(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),At=s(`$ZodCheckEndsWith`,(e,t)=>{A.init(e,t);let n=RegExp(`.*${w(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),jt=s(`$ZodCheckOverwrite`,(e,t)=>{A.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var Mt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
3
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
4
+ `))}};const Nt={major:4,minor:4,patch:3},j=s(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=D(e),i;for(let a of t){if(a._zod.def.when){if(ge(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new c;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=D(e,t))});else{if(e.issues.length===t)continue;r||=D(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(D(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new c;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new c;return o.then(e=>t(e,r,a))}return t(o,r,a)}}v(e,`~standard`,()=>({validate:t=>{try{let n=Oe(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ae(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Pt=s(`$ZodString`,(e,t)=>{j.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??lt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),M=s(`$ZodStringFormat`,(e,t)=>{wt.init(e,t),Pt.init(e,t)}),Ft=s(`$ZodGUID`,(e,t)=>{t.pattern??=Ke,M.init(e,t)}),It=s(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=qe(e)}else t.pattern??=qe();M.init(e,t)}),Lt=s(`$ZodEmail`,(e,t)=>{t.pattern??=Je,M.init(e,t)}),Rt=s(`$ZodURL`,(e,t)=>{M.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===nt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),zt=s(`$ZodEmoji`,(e,t)=>{t.pattern??=Ye(),M.init(e,t)}),Bt=s(`$ZodNanoID`,(e,t)=>{t.pattern??=We,M.init(e,t)}),Vt=s(`$ZodCUID`,(e,t)=>{t.pattern??=ze,M.init(e,t)}),Ht=s(`$ZodCUID2`,(e,t)=>{t.pattern??=Be,M.init(e,t)}),Ut=s(`$ZodULID`,(e,t)=>{t.pattern??=Ve,M.init(e,t)}),Wt=s(`$ZodXID`,(e,t)=>{t.pattern??=He,M.init(e,t)}),Gt=s(`$ZodKSUID`,(e,t)=>{t.pattern??=Ue,M.init(e,t)}),Kt=s(`$ZodISODateTime`,(e,t)=>{t.pattern??=ct(t),M.init(e,t)}),qt=s(`$ZodISODate`,(e,t)=>{t.pattern??=at,M.init(e,t)}),Jt=s(`$ZodISOTime`,(e,t)=>{t.pattern??=st(t),M.init(e,t)}),Yt=s(`$ZodISODuration`,(e,t)=>{t.pattern??=Ge,M.init(e,t)}),Xt=s(`$ZodIPv4`,(e,t)=>{t.pattern??=Xe,M.init(e,t),e._zod.bag.format=`ipv4`}),Zt=s(`$ZodIPv6`,(e,t)=>{t.pattern??=Ze,M.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Qt=s(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Qe,M.init(e,t)}),$t=s(`$ZodCIDRv6`,(e,t)=>{t.pattern??=$e,M.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function en(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const tn=s(`$ZodBase64`,(e,t)=>{t.pattern??=et,M.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{en(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function nn(e){if(!tt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return en(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const rn=s(`$ZodBase64URL`,(e,t)=>{t.pattern??=tt,M.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{nn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),an=s(`$ZodE164`,(e,t)=>{t.pattern??=rt,M.init(e,t)});function on(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const sn=s(`$ZodJWT`,(e,t)=>{M.init(e,t),e._zod.check=n=>{on(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),cn=s(`$ZodNumber`,(e,t)=>{j.init(e,t),e._zod.pattern=e._zod.bag.pattern??dt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ln=s(`$ZodNumberFormat`,(e,t)=>{bt.init(e,t),cn.init(e,t)}),un=s(`$ZodBoolean`,(e,t)=>{j.init(e,t),e._zod.pattern=ft,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),dn=s(`$ZodNull`,(e,t)=>{j.init(e,t),e._zod.pattern=pt,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),fn=s(`$ZodUnknown`,(e,t)=>{j.init(e,t),e._zod.parse=e=>e}),pn=s(`$ZodNever`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function mn(e,t,n){e.issues.length&&t.issues.push(...O(n,e.issues)),t.value[n]=e.value}const hn=s(`$ZodArray`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>mn(t,n,e))):mn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function gn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...O(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function _n(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=se(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function vn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>gn(e,n,i,t,u,d))):gn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const yn=s(`$ZodObject`,(e,t)=>{if(j.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=m(()=>_n(t));v(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=x,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>gn(n,t,e,s,r,i))):gn(a,t,e,s,r,i)}return i?vn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),bn=s(`$ZodObjectJIT`,(e,t)=>{yn.init(e,t);let n=e._zod.parse,r=m(()=>_n(t)),i=e=>{let t=new Mt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=te(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
5
+ if (${n}.issues.length) {
6
+ if (${o} in input) {
7
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
8
+ ...iss,
9
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
10
+ })));
11
+ }
12
+ }
13
+
14
+ if (${n}.value === undefined) {
15
+ if (${o} in input) {
16
+ newResult[${o}] = undefined;
17
+ }
18
+ } else {
19
+ newResult[${o}] = ${n}.value;
20
+ }
21
+
22
+ `):c?t.write(`
23
+ if (${n}.issues.length) {
24
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
25
+ ...iss,
26
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
27
+ })));
28
+ }
29
+
30
+ if (${n}.value === undefined) {
31
+ if (${o} in input) {
32
+ newResult[${o}] = undefined;
33
+ }
34
+ } else {
35
+ newResult[${o}] = ${n}.value;
36
+ }
37
+
38
+ `):t.write(`
39
+ const ${n}_present = ${o} in input;
40
+ if (${n}.issues.length) {
41
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
42
+ ...iss,
43
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
44
+ })));
45
+ }
46
+ if (!${n}_present && !${n}.issues.length) {
47
+ payload.issues.push({
48
+ code: "invalid_type",
49
+ expected: "nonoptional",
50
+ input: undefined,
51
+ path: [${o}]
52
+ });
53
+ }
54
+
55
+ if (${n}_present) {
56
+ if (${n}.value === undefined) {
57
+ newResult[${o}] = undefined;
58
+ } else {
59
+ newResult[${o}] = ${n}.value;
60
+ }
61
+ }
62
+
63
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=x,s=!u.jitless,c=s&&S.value,l=t.catchall,d;e._zod.parse=(u,f)=>{d??=r.value;let p=u.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),u=a(u,f),l?vn([],p,u,f,d,e):u):n(u,f):(u.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),u)}});function xn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!D(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>k(e,r,d())))}),t)}const Sn=s(`$ZodUnion`,(e,t)=>{j.init(e,t),v(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),v(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),v(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>g(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>xn(t,r,e,i)):xn(o,r,e,i)}}),Cn=s(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Sn.init(e,t);let n=e._zod.parse;v(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=m(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!x(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),wn=s(`$ZodIntersection`,(e,t)=>{j.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>En(e,t,n)):En(e,i,a)}});function Tn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(C(e)&&C(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Tn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Tn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function En(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),D(e))return e;let o=Tn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Dn=s(`$ZodRecord`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!C(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>k(e,r,d())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...O(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...O(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&dt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>k(e,r,d())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...O(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...O(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),On=s(`$ZodEnum`,(e,t)=>{j.init(e,t);let n=f(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ae.has(typeof e)).map(e=>typeof e==`string`?w(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),kn=s(`$ZodLiteral`,(e,t)=>{if(j.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?w(e):e?w(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),An=s(`$ZodTransform`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new l(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new c;return n.value=i,n.fallback=!0,n}});function jn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Mn=s(`$ZodOptional`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${g(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>jn(e,r)):jn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Nn=s(`$ZodExactOptional`,(e,t)=>{Mn.init(e,t),v(e._zod,`values`,()=>t.innerType._zod.values),v(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Pn=s(`$ZodNullable`,(e,t)=>{j.init(e,t),v(e._zod,`optin`,()=>t.innerType._zod.optin),v(e._zod,`optout`,()=>t.innerType._zod.optout),v(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${g(e.source)}|null)$`):void 0}),v(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Fn=s(`$ZodDefault`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>In(e,t)):In(r,t)}});function In(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Ln=s(`$ZodPrefault`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Rn=s(`$ZodNonOptional`,(e,t)=>{j.init(e,t),v(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>zn(t,e)):zn(i,e)}});function zn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const Bn=s(`$ZodCatch`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,v(e._zod,`optout`,()=>t.innerType._zod.optout),v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>k(e,n,d()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>k(e,n,d()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Vn=s(`$ZodPipe`,(e,t)=>{j.init(e,t),v(e._zod,`values`,()=>t.in._zod.values),v(e._zod,`optin`,()=>t.in._zod.optin),v(e._zod,`optout`,()=>t.out._zod.optout),v(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Hn(e,t.in,n)):Hn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Hn(e,t.out,n)):Hn(r,t.out,n)}});function Hn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Un=s(`$ZodReadonly`,(e,t)=>{j.init(e,t),v(e._zod,`propValues`,()=>t.innerType._zod.propValues),v(e._zod,`values`,()=>t.innerType._zod.values),v(e._zod,`optin`,()=>t.innerType?._zod?.optin),v(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Wn):Wn(r)}});function Wn(e){return e.value=Object.freeze(e.value),e}const Gn=s(`$ZodTemplateLiteral`,(e,t)=>{j.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||oe.has(typeof e))n.push(w(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),Kn=s(`$ZodLazy`,(e,t)=>{j.init(e,t),v(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),v(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),v(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),v(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),qn=s(`$ZodCustom`,(e,t)=>{A.init(e,t),j.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Jn(t,n,r,e));Jn(i,n,r,e)}});function Jn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ye(e))}}var Yn,Xn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Zn(){return new Xn}(Yn=globalThis).__zod_globalRegistry??(Yn.__zod_globalRegistry=Zn());const Qn=globalThis.__zod_globalRegistry;function $n(e,t){return new e({type:`string`,...E(t)})}function er(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...E(t)})}function tr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...E(t)})}function nr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...E(t)})}function rr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...E(t)})}function ir(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...E(t)})}function ar(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...E(t)})}function or(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...E(t)})}function sr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...E(t)})}function cr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...E(t)})}function lr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...E(t)})}function ur(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...E(t)})}function dr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...E(t)})}function fr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...E(t)})}function pr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...E(t)})}function mr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...E(t)})}function hr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...E(t)})}function gr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...E(t)})}function _r(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...E(t)})}function vr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...E(t)})}function yr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...E(t)})}function br(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...E(t)})}function xr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...E(t)})}function Sr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...E(t)})}function Cr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...E(t)})}function wr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...E(t)})}function Tr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...E(t)})}function Er(e,t){return new e({type:`number`,checks:[],...E(t)})}function Dr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...E(t)})}function Or(e,t){return new e({type:`boolean`,...E(t)})}function kr(e,t){return new e({type:`null`,...E(t)})}function Ar(e){return new e({type:`unknown`})}function jr(e,t){return new e({type:`never`,...E(t)})}function Mr(e,t){return new _t({check:`less_than`,...E(t),value:e,inclusive:!1})}function Nr(e,t){return new _t({check:`less_than`,...E(t),value:e,inclusive:!0})}function Pr(e,t){return new vt({check:`greater_than`,...E(t),value:e,inclusive:!1})}function Fr(e,t){return new vt({check:`greater_than`,...E(t),value:e,inclusive:!0})}function Ir(e,t){return new yt({check:`multiple_of`,...E(t),value:e})}function Lr(e,t){return new xt({check:`max_length`,...E(t),maximum:e})}function Rr(e,t){return new St({check:`min_length`,...E(t),minimum:e})}function zr(e,t){return new Ct({check:`length_equals`,...E(t),length:e})}function Br(e,t){return new Tt({check:`string_format`,format:`regex`,...E(t),pattern:e})}function Vr(e){return new Et({check:`string_format`,format:`lowercase`,...E(e)})}function Hr(e){return new Dt({check:`string_format`,format:`uppercase`,...E(e)})}function Ur(e,t){return new Ot({check:`string_format`,format:`includes`,...E(t),includes:e})}function Wr(e,t){return new kt({check:`string_format`,format:`starts_with`,...E(t),prefix:e})}function Gr(e,t){return new At({check:`string_format`,format:`ends_with`,...E(t),suffix:e})}function N(e){return new jt({check:`overwrite`,tx:e})}function Kr(e){return N(t=>t.normalize(e))}function qr(){return N(e=>e.trim())}function Jr(){return N(e=>e.toLowerCase())}function Yr(){return N(e=>e.toUpperCase())}function Xr(){return N(e=>ne(e))}function Zr(e,t,n){return new e({type:`array`,element:t,...E(n)})}function Qr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...E(n)})}function $r(e,t){let n=ei(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ye(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(ye(r))}},e(t.value,t)),t);return n}function ei(e,t){let n=new A({check:`custom`,...E(t)});return n._zod.check=e,n}function ti(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Qn,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function P(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,P(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&F(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ni(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
64
+
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ri(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:ai(t,`input`,e.processors),output:ai(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function F(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return F(r.element,n);if(r.type===`set`)return F(r.valueType,n);if(r.type===`lazy`)return F(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return F(r.innerType,n);if(r.type===`intersection`)return F(r.left,n)||F(r.right,n);if(r.type===`record`||r.type===`map`)return F(r.keyType,n)||F(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:F(r.in,n)||F(r.out,n);if(r.type===`object`){for(let e in r.shape)if(F(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(F(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(F(e,n))return!0;return!!(r.rest&&F(r.rest,n))}return!1}const ii=(e,t={})=>n=>{let r=ti({...n,processors:t});return P(e,r),ni(r,e),ri(r,e)},ai=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ti({...i??{},target:a,io:t,processors:n});return P(e,o),ni(o,e),ri(o,e)},oi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},si=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=oi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ci=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},li=(e,t,n,r)=>{n.type=`boolean`},ui=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},di=(e,t,n,r)=>{n.not={}},fi=(e,t,n,r)=>{let i=e._zod.def,a=f(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},pi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},mi=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},hi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},gi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},_i=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=P(a.element,t,{...r,path:[...r.path,`items`]})},vi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=P(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=P(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},yi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>P(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},bi=(e,t,n,r)=>{let i=e._zod.def,a=P(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=P(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},xi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=P(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=P(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=P(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Si=(e,t,n,r)=>{let i=e._zod.def,a=P(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ci=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},wi=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ti=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ei=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Di=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;P(o,t,r);let s=t.seen.get(e);s.ref=o},Oi=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ki=(e,t,n,r)=>{let i=e._zod.def;P(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ai=(e,t,n,r)=>{let i=e._zod.innerType;P(i,t,r);let a=t.seen.get(e);a.ref=i},ji=s(`ZodISODateTime`,(e,t)=>{Kt.init(e,t),z.init(e,t)});function Mi(e){return Sr(ji,e)}const Ni=s(`ZodISODate`,(e,t)=>{qt.init(e,t),z.init(e,t)});function Pi(e){return Cr(Ni,e)}const Fi=s(`ZodISOTime`,(e,t)=>{Jt.init(e,t),z.init(e,t)});function Ii(e){return wr(Fi,e)}const Li=s(`ZodISODuration`,(e,t)=>{Yt.init(e,t),z.init(e,t)});function Ri(e){return Tr(Li,e)}const zi=(e,t)=>{xe.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>we(e,t)},flatten:{value:t=>Ce(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,p,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,p,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bi=s(`ZodError`,zi),I=s(`ZodError`,zi,{Parent:Error}),Vi=Te(I),Hi=Ee(I),Ui=De(I),Wi=ke(I),Gi=je(I),Ki=Me(I),qi=Ne(I),Ji=Pe(I),Yi=Fe(I),Xi=Ie(I),Zi=Le(I),Qi=Re(I),$i=new WeakMap;function ea(e,t,n){let r=Object.getPrototypeOf(e),i=$i.get(r);if(i||(i=new Set,$i.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const L=s(`ZodType`,(e,t)=>(j.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ai(e,`input`),output:ai(e,`output`)}}),e.toJSONSchema=ii(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Vi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Ui(e,t,n),e.parseAsync=async(t,n)=>Hi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Wi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Gi(e,t,n),e.decode=(t,n)=>Ki(e,t,n),e.encodeAsync=async(t,n)=>qi(e,t,n),e.decodeAsync=async(t,n)=>Ji(e,t,n),e.safeEncode=(t,n)=>Yi(e,t,n),e.safeDecode=(t,n)=>Xi(e,t,n),e.safeEncodeAsync=async(t,n)=>Zi(e,t,n),e.safeDecodeAsync=async(t,n)=>Qi(e,t,n),ea(e,`ZodType`,{check(...e){let t=this.def;return this.clone(b(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return T(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(mo(e,t))},superRefine(e,t){return this.check(ho(e,t))},overwrite(e){return this.check(N(e))},optional(){return Ga(this)},exactOptional(){return qa(this)},nullable(){return Ya(this)},nullish(){return Ga(Ya(this))},nonoptional(e){return to(this,e)},array(){return W(this)},or(e){return K([this,e])},and(e){return Ra(this,e)},transform(e){return ao(this,Ua(e))},default(e){return Za(this,e)},prefault(e){return $a(this,e)},catch(e){return ro(this,e)},pipe(e){return ao(this,e)},readonly(){return so(this)},describe(e){let t=this.clone();return Qn.add(t,{description:e}),t},meta(...e){if(e.length===0)return Qn.get(this);let t=this.clone();return Qn.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return Qn.get(e)?.description},configurable:!0}),e)),ta=s(`_ZodString`,(e,t)=>{Pt.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>si(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ea(e,`_ZodString`,{regex(...e){return this.check(Br(...e))},includes(...e){return this.check(Ur(...e))},startsWith(...e){return this.check(Wr(...e))},endsWith(...e){return this.check(Gr(...e))},min(...e){return this.check(Rr(...e))},max(...e){return this.check(Lr(...e))},length(...e){return this.check(zr(...e))},nonempty(...e){return this.check(Rr(1,...e))},lowercase(e){return this.check(Vr(e))},uppercase(e){return this.check(Hr(e))},trim(){return this.check(qr())},normalize(...e){return this.check(Kr(...e))},toLowerCase(){return this.check(Jr())},toUpperCase(){return this.check(Yr())},slugify(){return this.check(Xr())}})}),na=s(`ZodString`,(e,t)=>{Pt.init(e,t),ta.init(e,t),e.email=t=>e.check(er(ra,t)),e.url=t=>e.check(or(oa,t)),e.jwt=t=>e.check(xr(xa,t)),e.emoji=t=>e.check(sr(sa,t)),e.guid=t=>e.check(tr(ia,t)),e.uuid=t=>e.check(nr(aa,t)),e.uuidv4=t=>e.check(rr(aa,t)),e.uuidv6=t=>e.check(ir(aa,t)),e.uuidv7=t=>e.check(ar(aa,t)),e.nanoid=t=>e.check(cr(ca,t)),e.guid=t=>e.check(tr(ia,t)),e.cuid=t=>e.check(lr(la,t)),e.cuid2=t=>e.check(ur(ua,t)),e.ulid=t=>e.check(dr(da,t)),e.base64=t=>e.check(vr(va,t)),e.base64url=t=>e.check(yr(ya,t)),e.xid=t=>e.check(fr(fa,t)),e.ksuid=t=>e.check(pr(pa,t)),e.ipv4=t=>e.check(mr(ma,t)),e.ipv6=t=>e.check(hr(ha,t)),e.cidrv4=t=>e.check(gr(ga,t)),e.cidrv6=t=>e.check(_r(_a,t)),e.e164=t=>e.check(br(ba,t)),e.datetime=t=>e.check(Mi(t)),e.date=t=>e.check(Pi(t)),e.time=t=>e.check(Ii(t)),e.duration=t=>e.check(Ri(t))});function R(e){return $n(na,e)}const z=s(`ZodStringFormat`,(e,t)=>{M.init(e,t),ta.init(e,t)}),ra=s(`ZodEmail`,(e,t)=>{Lt.init(e,t),z.init(e,t)}),ia=s(`ZodGUID`,(e,t)=>{Ft.init(e,t),z.init(e,t)}),aa=s(`ZodUUID`,(e,t)=>{It.init(e,t),z.init(e,t)}),oa=s(`ZodURL`,(e,t)=>{Rt.init(e,t),z.init(e,t)}),sa=s(`ZodEmoji`,(e,t)=>{zt.init(e,t),z.init(e,t)}),ca=s(`ZodNanoID`,(e,t)=>{Bt.init(e,t),z.init(e,t)}),la=s(`ZodCUID`,(e,t)=>{Vt.init(e,t),z.init(e,t)}),ua=s(`ZodCUID2`,(e,t)=>{Ht.init(e,t),z.init(e,t)}),da=s(`ZodULID`,(e,t)=>{Ut.init(e,t),z.init(e,t)}),fa=s(`ZodXID`,(e,t)=>{Wt.init(e,t),z.init(e,t)}),pa=s(`ZodKSUID`,(e,t)=>{Gt.init(e,t),z.init(e,t)}),ma=s(`ZodIPv4`,(e,t)=>{Xt.init(e,t),z.init(e,t)}),ha=s(`ZodIPv6`,(e,t)=>{Zt.init(e,t),z.init(e,t)}),ga=s(`ZodCIDRv4`,(e,t)=>{Qt.init(e,t),z.init(e,t)}),_a=s(`ZodCIDRv6`,(e,t)=>{$t.init(e,t),z.init(e,t)}),va=s(`ZodBase64`,(e,t)=>{tn.init(e,t),z.init(e,t)}),ya=s(`ZodBase64URL`,(e,t)=>{rn.init(e,t),z.init(e,t)}),ba=s(`ZodE164`,(e,t)=>{an.init(e,t),z.init(e,t)}),xa=s(`ZodJWT`,(e,t)=>{sn.init(e,t),z.init(e,t)}),Sa=s(`ZodNumber`,(e,t)=>{cn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ci(e,t,n,r),ea(e,`ZodNumber`,{gt(e,t){return this.check(Pr(e,t))},gte(e,t){return this.check(Fr(e,t))},min(e,t){return this.check(Fr(e,t))},lt(e,t){return this.check(Mr(e,t))},lte(e,t){return this.check(Nr(e,t))},max(e,t){return this.check(Nr(e,t))},int(e){return this.check(wa(e))},safe(e){return this.check(wa(e))},positive(e){return this.check(Pr(0,e))},nonnegative(e){return this.check(Fr(0,e))},negative(e){return this.check(Mr(0,e))},nonpositive(e){return this.check(Nr(0,e))},multipleOf(e,t){return this.check(Ir(e,t))},step(e,t){return this.check(Ir(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function B(e){return Er(Sa,e)}const Ca=s(`ZodNumberFormat`,(e,t)=>{ln.init(e,t),Sa.init(e,t)});function wa(e){return Dr(Ca,e)}const Ta=s(`ZodBoolean`,(e,t)=>{un.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>li(e,t,n,r)});function V(e){return Or(Ta,e)}const Ea=s(`ZodNull`,(e,t)=>{dn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r)});function Da(e){return kr(Ea,e)}const Oa=s(`ZodUnknown`,(e,t)=>{fn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function H(){return Ar(Oa)}const ka=s(`ZodNever`,(e,t)=>{pn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r)});function U(e){return jr(ka,e)}const Aa=s(`ZodArray`,(e,t)=>{hn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.element=t.element,ea(e,`ZodArray`,{min(e,t){return this.check(Rr(e,t))},nonempty(e){return this.check(Rr(1,e))},max(e,t){return this.check(Lr(e,t))},length(e,t){return this.check(zr(e,t))},unwrap(){return this.element}})});function W(e,t){return Zr(Aa,e,t)}const ja=s(`ZodObject`,(e,t)=>{bn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),v(e,`shape`,()=>t.shape),ea(e,`ZodObject`,{keyof(){return J(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:H()})},loose(){return this.clone({...this._zod.def,catchall:H()})},strict(){return this.clone({...this._zod.def,catchall:U()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return de(this,e)},safeExtend(e){return fe(this,e)},merge(e){return pe(this,e)},pick(e){return le(this,e)},omit(e){return ue(this,e)},partial(...e){return me(Wa,this,e[0])},required(...e){return he(eo,this,e[0])}})});function Ma(e,t){return new ja({type:`object`,shape:e??{},...E(t)})}function G(e,t){return new ja({type:`object`,shape:e,catchall:U(),...E(t)})}function Na(e,t){return new ja({type:`object`,shape:e,catchall:H(),...E(t)})}const Pa=s(`ZodUnion`,(e,t)=>{Sn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),e.options=t.options});function K(e,t){return new Pa({type:`union`,options:e,...E(t)})}const Fa=s(`ZodDiscriminatedUnion`,(e,t)=>{Pa.init(e,t),Cn.init(e,t)});function Ia(e,t,n){return new Fa({type:`union`,options:t,discriminator:e,...E(n)})}const La=s(`ZodIntersection`,(e,t)=>{wn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r)});function Ra(e,t){return new La({type:`intersection`,left:e,right:t})}const za=s(`ZodRecord`,(e,t)=>{Dn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function q(e,t,n){return!t||!t._zod?new za({type:`record`,keyType:R(),valueType:e,...E(t)}):new za({type:`record`,keyType:e,valueType:t,...E(n)})}const Ba=s(`ZodEnum`,(e,t)=>{On.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ba({...t,checks:[],...E(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ba({...t,checks:[],...E(r),entries:i})}});function J(e,t){return new Ba({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...E(t)})}const Va=s(`ZodLiteral`,(e,t)=>{kn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Y(e,t){return new Va({type:`literal`,values:Array.isArray(e)?e:[e],...E(t)})}const Ha=s(`ZodTransform`,(e,t)=>{An.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new l(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ye(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(ye(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Ua(e){return new Ha({type:`transform`,transform:e})}const Wa=s(`ZodOptional`,(e,t)=>{Mn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Wa({type:`optional`,innerType:e})}const Ka=s(`ZodExactOptional`,(e,t)=>{Nn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new Ka({type:`optional`,innerType:e})}const Ja=s(`ZodNullable`,(e,t)=>{Pn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ya(e){return new Ja({type:`nullable`,innerType:e})}const Xa=s(`ZodDefault`,(e,t)=>{Fn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Za(e,t){return new Xa({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}const Qa=s(`ZodPrefault`,(e,t)=>{Ln.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $a(e,t){return new Qa({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}const eo=s(`ZodNonOptional`,(e,t)=>{Rn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function to(e,t){return new eo({type:`nonoptional`,innerType:e,...E(t)})}const no=s(`ZodCatch`,(e,t)=>{Bn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ro(e,t){return new no({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const io=s(`ZodPipe`,(e,t)=>{Vn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.in=t.in,e.out=t.out});function ao(e,t){return new io({type:`pipe`,in:e,out:t})}const oo=s(`ZodReadonly`,(e,t)=>{Un.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function so(e){return new oo({type:`readonly`,innerType:e})}const co=s(`ZodTemplateLiteral`,(e,t)=>{Gn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r)});function lo(e,t){return new co({type:`template_literal`,parts:e,...E(t)})}const uo=s(`ZodLazy`,(e,t)=>{Kn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function fo(e){return new uo({type:`lazy`,getter:e})}const po=s(`ZodCustom`,(e,t)=>{qn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r)});function mo(e,t={}){return Qr(po,e,t)}function ho(e,t){return $r(e,t)}function go(e){let t=fo(()=>K([R(e),B(),V(),Da(),W(t),q(R(),t)]));return t}var _o=e({AnalyticsEngineDatasetBindingSchema:()=>Do,AssetsSchema:()=>bo,BindingSchema:()=>Mo,BrowserBindingSchema:()=>xo,D1BindingSchema:()=>Co,DurableObjectCreatedExportSchema:()=>$o,DurableObjectDeletedExportSchema:()=>es,DurableObjectExpectingTransferExportSchema:()=>rs,DurableObjectRenamedExportSchema:()=>ts,DurableObjectTransferredExportSchema:()=>ns,ExportSchema:()=>as,FlagshipBindingSchema:()=>Oo,HyperdriveBindingSchema:()=>ko,InputContainerSchema:()=>Qo,InputSettingsSchema:()=>ms,InputWorkerSchema:()=>ps,KVBindingSchema:()=>wo,KnownBindingSchema:()=>Ao,ModuleTypeSchema:()=>bs,QueueBindingSchema:()=>To,R2BindingSchema:()=>Eo,TailConsumerSchema:()=>ls,UnsafeBindingSchema:()=>jo,WorkerBindingSchema:()=>So,WorkerEntrypointExportSchema:()=>is,convertToWranglerConfig:()=>ks,loadAndValidateConfig:()=>lc,loadConfig:()=>Ks,registerConfigHooks:()=>Js,resolveAndValidateConfigExports:()=>cc,validateSingletonBindings:()=>Lo}),vo=Object.getOwnPropertyNames,yo=(e,t)=>function(){return t||(0,e[vo(e)[0]])((t={exports:{}}).exports,t),t.exports};const X=G({remote:V().optional()}),bo=G({htmlHandling:J([`auto-trailing-slash`,`drop-trailing-slash`,`force-trailing-slash`,`none`]).optional(),notFoundHandling:J([`single-page-application`,`404-page`,`none`]).optional(),runWorkerFirst:K([W(R()),V()]).optional()}),xo=G({type:Y(`browser`),dev:X.optional()}),So=G({type:Y(`worker`),worker:R(),exportName:R().optional(),props:q(R(),H()).optional(),dev:X.optional()}),Co=G({type:Y(`d1`),name:R().optional(),id:R().optional(),dev:X.optional()}),wo=G({type:Y(`kv`),id:R().optional(),dev:X.optional()}),To=G({type:Y(`queue`),name:R().optional(),deliveryDelay:B().optional(),dev:X.optional()}),Eo=G({type:Y(`r2`),name:R().optional(),jurisdiction:R().optional(),dev:X.extend({experimentalS3Credentials:Ma({accessKeyId:R(),secretAccessKey:R()}).optional()}).optional()}),Do=G({type:Y(`analytics-engine-dataset`),name:R().optional()}),Oo=G({type:Y(`flagship`),id:R().optional(),dev:X.optional()}),ko=G({type:Y(`hyperdrive`),id:R(),dev:G({connectionString:R().optional()}).optional()}),Ao=Ia(`type`,[G({type:Y(`agent-memory`),namespace:R(),dev:X.optional()}),G({type:Y(`ai`),dev:X.optional()}),G({type:Y(`ai-search`),name:R(),dev:X.optional()}),G({type:Y(`ai-search-namespace`),namespace:R(),dev:X.optional()}),Do,G({type:Y(`artifacts`),namespace:R(),dev:X.optional()}),G({type:Y(`assets`)}),xo,Co,G({type:Y(`dispatch-namespace`),namespace:R().optional(),outbound:G({worker:R(),parameters:W(R()).optional()}).optional(),dev:X.optional()}),G({type:Y(`durable-object`),worker:R(),exportName:R()}),Oo,ko,G({type:Y(`images`),dev:X.optional()}),G({type:Y(`json`),value:go()}),wo,G({type:Y(`logfwdr`),destination:R()}),G({type:Y(`media`),dev:X.optional()}),G({type:Y(`mtls-certificate`),id:R(),dev:X.optional()}),G({type:Y(`pipeline`),name:R(),dev:X.optional()}),To,G({type:Y(`rate-limit`),namespace:R(),simple:G({limit:B(),period:K([Y(10),Y(60)])})}),Eo,G({type:Y(`secret`)}),G({type:Y(`secrets-store-secret`),storeId:R(),secretName:R()}),G({type:Y(`send-email`),destinationAddress:R().optional(),allowedDestinationAddresses:W(R()).optional(),allowedSenderAddresses:W(R()).optional(),dev:X.optional()}).refine(e=>e.destinationAddress===void 0||e.allowedDestinationAddresses===void 0,{message:`"send-email" bindings cannot specify both "destinationAddress" and "allowedDestinationAddresses"`}),G({type:Y(`stream`),dev:X.optional()}),G({type:Y(`text`),value:R()}),G({type:Y(`vectorize`),name:R(),dev:X.optional()}),G({type:Y(`version-metadata`)}),G({type:Y(`vpc-service`),id:R(),dev:X.optional()}),G({type:Y(`vpc-network`),tunnelId:R().optional(),networkId:R().optional(),dev:X.optional()}).refine(e=>e.tunnelId!==void 0!=(e.networkId!==void 0),{error:({input:e})=>{let t=e;return t.tunnelId!==void 0&&t.networkId!==void 0?`"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both`:`"vpc-network" bindings must specify either "tunnelId" or "networkId"`}}),G({type:Y(`web-search`),dev:X.optional()}),So,G({type:Y(`worker-loader`)})]),jo=Na({type:lo([`unsafe:`,R().min(1)]),dev:G({plugin:G({package:R(),name:R()}),options:q(R(),H()).optional()}).optional()}),Mo=H().transform((e,t)=>{let n=(typeof e==`object`&&e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`unsafe:`)?jo:Ao).safeParse(e);return n.success?n.data:(t.issues.push(...n.error.issues),o)});function No(e){return e.type.startsWith(`unsafe:`)}const Po=G({enabled:V(),crossVersionCache:V().optional()}),Fo=new Set([`ai`,`assets`,`browser`,`images`,`media`,`stream`,`version-metadata`,`web-search`]),Io=new Intl.ListFormat(`en-US`);function Lo(e,t){let n=new Set,r=new Set;for(let t of Object.values(e)){let e=t.type;Fo.has(e)&&(n.has(e)&&r.add(e),n.add(e))}r.size>0&&t.addIssue({code:`custom`,message:`${Io.format([...r].sort())} bindings can only be defined once`})}const Ro=q(R(),Mo).superRefine(Lo).optional(),zo=G({dockerfile:R().min(1),buildContext:R().optional(),buildVars:q(R(),R()).optional()}),Bo=G({reference:R().min(1)}),Vo=G({localReference:R().min(1)}),Ho=K([zo,Bo]),Uo=K([Bo,Vo]),Wo=new Set([5,10,20,25,50,100]),Go=K([B(),W(B())]).superRefine((e,t)=>{if(typeof e==`number`){Wo.has(e)||t.addIssue({code:`custom`,message:`A rollout step percentage must be one of 5, 10, 20, 25, 50, or 100`});return}if(e.length===0){t.addIssue({code:`custom`,message:`A rollout must contain at least one step percentage`});return}for(let[n,r]of e.entries()){(r<10||r>100)&&t.addIssue({code:`custom`,path:[n],message:`Rollout step percentages must be between 10 and 100`});let i=e[n-1];i!==void 0&&r<i&&t.addIssue({code:`custom`,path:[n],message:`Rollout step percentages must be in ascending order`})}let n=e.length-1;e[n]!==100&&t.addIssue({code:`custom`,path:[n],message:`The final rollout step percentage must be 100`})});function Ko(e,t){let n=e.rollout?.stepPercentage;Array.isArray(n)&&e.maxInstances!==void 0&&n.length>e.maxInstances&&t.addIssue({code:`custom`,path:[`rollout`,`stepPercentage`],message:`A rollout cannot contain more steps than the maximum number of instances`})}const qo=G({enabled:V().optional(),logs:G({enabled:V().optional()}).optional()}),Jo=K([qo.extend({targetInstancePercentage:B().min(0).max(100).optional()}),qo.extend({targetInstanceCount:B().int().nonnegative().optional()})]),Yo=G({type:Y(`container`),name:R().min(1),observability:Jo.optional(),unsafe:q(R(),H()).optional()}),Xo=Yo.extend({maxInstances:B().int().nonnegative().default(20),instanceType:K([J([`basic`,`lite`,`standard-1`,`standard-2`,`standard-3`,`standard-4`]),G({vcpu:B().min(.0625).optional(),memoryMib:B().nonnegative().optional(),diskMb:B().nonnegative().optional()})]).optional(),schedulingPolicy:J([`default`,`regional`]).optional(),ssh:G({enabled:V(),port:B().int().min(1).max(65535).optional()}).optional(),authorizedKeys:W(G({name:R(),publicKey:R()})).optional(),constraints:G({regions:W(J([`ENAM`,`WNAM`,`EEUR`,`WEUR`,`APAC`,`SAM`,`ME`,`OC`,`AFR`])).optional(),jurisdiction:J([`eu`,`fedramp`]).optional()}).optional(),rollout:G({kind:J([`full-auto`,`none`,`full-manual`]).optional(),stepPercentage:Go.optional(),activeGracePeriod:B().nonnegative().optional()}).optional()}),Zo=Yo.extend({schedulingPolicy:Y(`durable-object`)}),Qo=K([Xo.extend({image:Ho}).superRefine(Ko),Zo.extend({images:q(R(),Ho).optional()})]);K([Xo.extend({image:Uo}).superRefine(Ko),Zo.extend({images:q(R(),Uo).optional()})]);const $o=G({type:Y(`durable-object`),state:Y(`created`).optional(),storage:J([`sqlite`,`legacy-kv`]),container:R().optional()}),es=G({type:Y(`durable-object`),state:Y(`deleted`)}),ts=G({type:Y(`durable-object`),state:Y(`renamed`),renamedTo:R()}),ns=G({type:Y(`durable-object`),state:Y(`transferred`),transferredTo:R()}),rs=G({type:Y(`durable-object`),state:Y(`expecting-transfer`),storage:J([`sqlite`,`legacy-kv`]),transferFrom:R(),container:R().optional()}),is=G({type:Y(`worker`),cache:G({enabled:V()}).optional()}),as=K([$o.extend({storage:Y(`sqlite`)}),$o.omit({container:!0}).extend({storage:Y(`legacy-kv`)}),es,ts,ns,rs.extend({storage:Y(`sqlite`)}),rs.omit({container:!0}).extend({storage:Y(`legacy-kv`)}),is]),os=G({cpuMs:B().optional(),subrequests:B().optional()}),ss=G({enabled:V().optional(),headSamplingRate:B().optional(),redactQueryString:V().optional(),logs:G({enabled:V().optional(),headSamplingRate:B().optional(),invocationLogs:V().optional(),persist:V().optional(),destinations:W(R()).optional()}).optional(),traces:G({enabled:V().optional(),headSamplingRate:B().optional(),persist:V().optional(),destinations:W(R()).optional()}).optional()}),cs=K([G({mode:J([`off`,`smart`]),hint:R().optional()}),G({mode:Y(`targeted`).optional(),region:R()}),G({mode:Y(`targeted`).optional(),host:R()}),G({mode:Y(`targeted`).optional(),hostname:R()})]),ls=G({worker:R(),streaming:V().optional()}),us=Ia(`type`,[G({type:Y(`email`),addresses:W(R())}),G({type:Y(`fetch`),pattern:R(),zone:R().optional()}),G({type:Y(`queue`),name:R(),deadLetterQueue:R().optional(),maxBatchSize:B().optional(),maxBatchTimeout:B().optional(),maxConcurrency:B().nullable().optional(),maxRetries:B().optional(),retryDelay:B().optional(),visibilityTimeoutMs:B().optional()}),G({type:Y(`scheduled`),schedule:R()}),G({type:Y(`connect`),protocol:J([`tcp`]),port:B(),address:R().optional()})]),ds=G({metadata:q(R(),H()).optional(),capnp:K([G({basePath:R(),sourceSchemas:W(R()),compiledSchema:U().optional()}),G({basePath:U().optional(),sourceSchemas:U().optional(),compiledSchema:R()})]).optional()}),fs=G({type:Y(`worker`),name:R(),compatibilityDate:R(),compatibilityFlags:W(R()).optional(),assets:bo.optional(),domains:W(R()).optional(),triggers:W(us).optional(),tailConsumers:W(ls).optional(),cache:Po.optional(),placement:cs.optional(),limits:os.optional(),logpush:V().optional(),observability:ss.optional(),workersDev:V().optional(),previewUrls:V().optional(),firstPartyWorker:V().optional(),unsafe:ds.optional(),env:Ro,exports:q(R(),as).optional()}),ps=fs.extend({entrypoint:K([R(),G({default:R()})]).transform(e=>typeof e==`string`?e:e.default).optional()}),ms=G({type:Y(`settings`),accountId:R().optional(),complianceRegion:J([`public`,`fedramp-high`]).optional()});ms.extend({mode:R().optional()});const hs=`default`,gs=`settings`,_s=new Set([`container`,`worker`,`settings`]);function vs(e){return`The \`${e}\` export is not a supported export type. Move constants, helper functions, and other unsupported exports to a separate module.`}const ys=q(R(),H()).check(e=>{for(let[t,n]of Object.entries(e.value)){let r=typeof n==`object`&&!!n,i=r&&`type`in n?n.type:void 0;if(typeof i!=`string`||!_s.has(i)){e.issues.push({code:`custom`,input:n,path:r?[t,`type`]:[t],message:vs(t)});continue}if(t===hs&&i!==`worker`){e.issues.push({code:`custom`,input:n,path:[t],message:`The \`${hs}\` export is reserved for a \`worker\` config; found a \`${i}\` config.`});continue}let a=t===gs,o=i===`settings`;o&&!a?e.issues.push({code:`custom`,input:n,path:[t],message:`A \`settings\` config is only allowed on the \`${gs}\` export; found one on the \`${t}\` export.`}):a&&!o&&e.issues.push({code:`custom`,input:n,path:[t],message:`The \`${gs}\` export is reserved for a \`settings\` config; found a \`${i}\` config.`})}}),bs=J([`esm`,`cjs`,`python`,`python-requirement`,`wasm`,`text`,`data`,`json`,`sourcemap`]),xs=q(R(),G({type:bs})),Ss=G({type:J([`partial`,`complete`]),mainModule:R(),modules:xs}).superRefine((e,t)=>{let n=e.modules[e.mainModule];e.type===`complete`&&n===void 0&&t.addIssue({code:`custom`,path:[`modules`,e.mainModule],message:`A complete manifest must include its main module.`}),e.type===`partial`&&n!==void 0&&t.addIssue({code:`custom`,path:[`modules`,e.mainModule],message:`A partial manifest must not include its main module.`})});fs.extend({manifest:Ss.optional()}),yo({"../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/dist/index.js":(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dedent=void 0;function t(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
66
+ [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
67
+ `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
68
+ `)&&(o=String(e).split(`
69
+ `).map(function(e,t){return t===0?e:``+i+e}).join(`
70
+ `)),a+=o+n[t+1]}),a}e.dedent=t})})();var Cs=Object.defineProperty,Z=(e,t)=>Cs(e,`name`,{value:t,configurable:!0}),ws=class extends Error{static{Z(this,`UserError`)}telemetryMessage;constructor(e,t){super(e,t),Object.setPrototypeOf(this,new.target.prototype),this.telemetryMessage=typeof t?.telemetryMessage==`string`?t.telemetryMessage:t?.telemetryMessage?e:void 0}};(class extends ws{static{Z(this,`DeprecationError`)}constructor(e,t){super(`Deprecation:
71
+ ${e}`,t)}});var Ts=class extends ws{static{Z(this,`FatalError`)}code;constructor(e,t){super(e,t),this.code=t.code}};(class extends ws{static{Z(this,`CommandLineArgsError`)}});var Es=class extends Ts{static{Z(this,`JsonFriendlyFatalError`)}};(class extends Error{static{Z(this,`MissingConfigError`)}telemetryMessage;constructor(e){super(`Missing config value for ${e}`),this.telemetryMessage=`Missing config value for ${e}`}});function Ds(e,t,n){return t?new Es(JSON.stringify(e),n):new Ts(`${e}`,n)}Z(Ds,`createFatalError`);const Os={"full-auto":`full_auto`,"full-manual":`full_manual`,none:`none`};function ks(e,t,n=[]){let r={};return Ns(e,r),Is(e,r),Ls(e,r),zs(e,r),Rs(e,r),Bs(e,r),t!==void 0&&Ms(t,r),n.length>0&&(r.containers=n.map(e=>As(e))),r}function As(e){if(e.schedulingPolicy===`durable-object`)throw new ws("Durable Object-managed Containers are not currently supported by `convertToWranglerConfig()`.",{telemetryMessage:!1});let t={name:e.name};if(e.observability!==void 0&&(t.observability=js(e.observability)),e.unsafe!==void 0&&(t.unsafe=e.unsafe),t.image=`dockerfile`in e.image?e.image.dockerfile:e.image.reference,t.max_instances=e.maxInstances,`dockerfile`in e.image&&(e.image.buildContext!==void 0&&(t.image_build_context=e.image.buildContext),e.image.buildVars!==void 0&&(t.image_vars=e.image.buildVars)),e.instanceType!==void 0)if(typeof e.instanceType==`string`)t.instance_type=e.instanceType;else{let n={};e.instanceType.vcpu!==void 0&&(n.vcpu=e.instanceType.vcpu),e.instanceType.memoryMib!==void 0&&(n.memory_mib=e.instanceType.memoryMib),e.instanceType.diskMb!==void 0&&(n.disk_mb=e.instanceType.diskMb),t.instance_type=n}return e.schedulingPolicy!==void 0&&(t.scheduling_policy=e.schedulingPolicy),e.ssh!==void 0&&(t.ssh=e.ssh),e.authorizedKeys!==void 0&&(t.authorized_keys=e.authorizedKeys.map(({name:e,publicKey:t})=>({name:e,public_key:t}))),e.constraints!==void 0&&(t.constraints=e.constraints),e.rollout!==void 0&&(e.rollout.kind!==void 0&&(t.rollout_kind=Os[e.rollout.kind]),e.rollout.stepPercentage!==void 0&&(t.rollout_step_percentage=e.rollout.stepPercentage),e.rollout.activeGracePeriod!==void 0&&(t.rollout_active_grace_period=e.rollout.activeGracePeriod)),t}function js(e){let t={};return e.enabled!==void 0&&(t.enabled=e.enabled),e.logs!==void 0&&(t.logs=e.logs),`targetInstancePercentage`in e&&e.targetInstancePercentage!==void 0&&(t.target_instance_percentage=e.targetInstancePercentage),`targetInstanceCount`in e&&e.targetInstanceCount!==void 0&&(t.target_instance_count=e.targetInstanceCount),t}function Ms(e,t){e.accountId!==void 0&&(t.account_id=e.accountId),e.complianceRegion!==void 0&&(t.compliance_region=e.complianceRegion===`fedramp-high`?`fedramp_high`:`public`)}function Ns(e,t){if(e.name!==void 0&&(t.name=e.name),typeof e.entrypoint==`string`&&(t.main=e.entrypoint),e.compatibilityDate!==void 0&&(t.compatibility_date=e.compatibilityDate),e.compatibilityFlags!==void 0&&(t.compatibility_flags=e.compatibilityFlags),e.workersDev!==void 0&&(t.workers_dev=e.workersDev),e.previewUrls!==void 0&&(t.preview_urls=e.previewUrls),e.logpush!==void 0&&(t.logpush=e.logpush),e.firstPartyWorker!==void 0&&(t.first_party_worker=e.firstPartyWorker),e.placement!==void 0&&(t.placement=e.placement),e.limits!==void 0){let n={};e.limits.cpuMs!==void 0&&(n.cpu_ms=e.limits.cpuMs),e.limits.subrequests!==void 0&&(n.subrequests=e.limits.subrequests),t.limits=n}if(e.observability!==void 0&&(t.observability=Ps(e.observability)),e.cache!==void 0){let n={enabled:e.cache.enabled};e.cache.crossVersionCache!==void 0&&(n.cross_version_cache=e.cache.crossVersionCache),t.cache=n}e.unsafe!==void 0&&(t.unsafe=Fs(e.unsafe))}function Ps(e){let t={};if(e.enabled!==void 0&&(t.enabled=e.enabled),e.headSamplingRate!==void 0&&(t.head_sampling_rate=e.headSamplingRate),e.redactQueryString!==void 0&&(t.redact_query_string=e.redactQueryString),e.logs!==void 0){let n={},{logs:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.invocationLogs!==void 0&&(n.invocation_logs=r.invocationLogs),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.logs=n}if(e.traces!==void 0){let n={},{traces:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.traces=n}return t}function Fs(e){let t={};return e.metadata!==void 0&&(t.metadata=e.metadata),e.capnp!==void 0&&(`compiledSchema`in e.capnp&&e.capnp.compiledSchema?t.capnp={compiled_schema:e.capnp.compiledSchema}:`basePath`in e.capnp&&e.capnp.basePath&&(t.capnp={base_path:e.capnp.basePath,source_schemas:e.capnp.sourceSchemas??[]})),t}function Is(e,t){let n,r=e.env??{},i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[],ee=[],_=[],v=[],y=[],b=[],te=[],ne=[],re=[],x=[],S=[],C=[],ie=[],ae=[],oe={},w=[];for(let[e,S]of Object.entries(r)){if(No(S)){ae.push({...S,name:e,type:S.type.slice(7)});continue}switch(S.type){case`agent-memory`:m.push(Q({binding:e,namespace:S.namespace,remote:S.dev?.remote}));break;case`ai`:t.ai=Q({binding:e,remote:S.dev?.remote});break;case`ai-search`:f.push(Q({binding:e,instance_name:S.name,remote:S.dev?.remote}));break;case`ai-search-namespace`:p.push(Q({binding:e,namespace:S.namespace,remote:S.dev?.remote}));break;case`analytics-engine-dataset`:h.push(Q({binding:e,dataset:S.name}));break;case`artifacts`:g.push(Q({binding:e,namespace:S.namespace,remote:S.dev?.remote}));break;case`assets`:n=e;break;case`browser`:t.browser=Q({binding:e,remote:S.dev?.remote});break;case`d1`:a.push(Q({binding:e,database_id:S.id,database_name:S.name,remote:S.dev?.remote}));break;case`dispatch-namespace`:{let t={binding:e,namespace:S.namespace};S.outbound&&(t.outbound=Q({service:S.outbound.worker,parameters:S.outbound.parameters})),S.dev?.remote!==void 0&&(t.remote=S.dev.remote),ee.push(t);break}case`durable-object`:x.push({name:e,class_name:S.exportName,script_name:S.worker});break;case`flagship`:d.push(Q({binding:e,app_id:S.id,remote:S.dev?.remote}));break;case`hyperdrive`:l.push(Q({binding:e,id:S.id,localConnectionString:S.dev?.connectionString}));break;case`images`:t.images=Q({binding:e,remote:S.dev?.remote});break;case`json`:oe[e]=S.value;break;case`kv`:i.push(Q({binding:e,id:S.id,remote:S.dev?.remote}));break;case`logfwdr`:ie.push({name:e,destination:S.destination});break;case`media`:t.media=Q({binding:e,remote:S.dev?.remote});break;case`mtls-certificate`:c.push(Q({binding:e,certificate_id:S.id,remote:S.dev?.remote}));break;case`pipeline`:u.push(Q({binding:e,stream:S.name,remote:S.dev?.remote}));break;case`queue`:C.push(Q({binding:e,queue:S.name,delivery_delay:S.deliveryDelay,remote:S.dev?.remote}));break;case`rate-limit`:ne.push({name:e,namespace_id:S.namespace,simple:S.simple});break;case`r2`:{let t=S.dev?.experimentalS3Credentials;o.push(Q({binding:e,bucket_name:S.name,jurisdiction:S.jurisdiction,remote:S.dev?.remote,local_dev:t===void 0?void 0:{experimental_s3_credentials:t}}));break}case`secret`:w.push(e);break;case`secrets-store-secret`:_.push({binding:e,store_id:S.storeId,secret_name:S.secretName});break;case`send-email`:v.push(Q({name:e,destination_address:S.destinationAddress,allowed_destination_addresses:S.allowedDestinationAddresses,allowed_sender_addresses:S.allowedSenderAddresses,remote:S.dev?.remote}));break;case`stream`:t.stream=Q({binding:e,remote:S.dev?.remote});break;case`text`:oe[e]=S.value;break;case`vectorize`:s.push(Q({binding:e,index_name:S.name,remote:S.dev?.remote}));break;case`version-metadata`:t.version_metadata={binding:e};break;case`vpc-service`:y.push(Q({binding:e,service_id:S.id,remote:S.dev?.remote}));break;case`vpc-network`:S.tunnelId===void 0?S.networkId!==void 0&&b.push(Q({binding:e,network_id:S.networkId,remote:S.dev?.remote})):b.push(Q({binding:e,tunnel_id:S.tunnelId,remote:S.dev?.remote}));break;case`web-search`:t.websearch=Q({binding:e,remote:S.dev?.remote});break;case`worker`:re.push(Q({binding:e,service:S.worker,entrypoint:S.exportName,props:S.props,remote:S.dev?.remote}));break;case`worker-loader`:te.push({binding:e});break}}if(i.length&&(t.kv_namespaces=i),a.length&&(t.d1_databases=a),o.length&&(t.r2_buckets=o),s.length&&(t.vectorize=s),c.length&&(t.mtls_certificates=c),l.length&&(t.hyperdrive=l),u.length&&(t.pipelines=u),d.length&&(t.flagship=d),f.length&&(t.ai_search=f),p.length&&(t.ai_search_namespaces=p),m.length&&(t.agent_memory=m),h.length&&(t.analytics_engine_datasets=h),g.length&&(t.artifacts=g),ee.length&&(t.dispatch_namespaces=ee),_.length&&(t.secrets_store_secrets=_),v.length&&(t.send_email=v),y.length&&(t.vpc_services=y),b.length&&(t.vpc_networks=b),te.length&&(t.worker_loaders=te),ne.length&&(t.ratelimits=ne),re.length&&(t.services=re),x.length&&(t.durable_objects={bindings:x}),S.length&&(t.workflows=S),C.length&&(t.queues={...t.queues??{},producers:C}),ie.length&&(t.logfwdr={bindings:ie}),ae.length&&(t.unsafe={...t.unsafe??{},bindings:ae}),Object.keys(oe).length&&(t.vars=oe),w.length&&(t.secrets={required:w}),e.assets!==void 0||n!==void 0){let r={};n!==void 0&&(r.binding=n),e.assets?.htmlHandling!==void 0&&(r.html_handling=e.assets.htmlHandling),e.assets?.notFoundHandling!==void 0&&(r.not_found_handling=e.assets.notFoundHandling),e.assets?.runWorkerFirst!==void 0&&(r.run_worker_first=e.assets.runWorkerFirst),t.assets=r}}function Ls(e,t){let n=e.exports;if(!n)return;let r={},i={};for(let[e,t]of Object.entries(n)){if(t.type===`worker`){r[e]=t;continue}if(t.type!==`durable-object`){i[e]=t;continue}switch(t.state){case void 0:case`created`:r[e]={type:`durable-object`,storage:t.storage,...t.storage===`sqlite`&&t.container!==void 0&&{container:t.container}};break;case`deleted`:r[e]={type:`durable-object`,state:`deleted`};break;case`renamed`:r[e]={type:`durable-object`,state:`renamed`,renamed_to:t.renamedTo};break;case`transferred`:r[e]={type:`durable-object`,state:`transferred`,transferred_to:t.transferredTo};break;case`expecting-transfer`:r[e]={type:`durable-object`,state:`expecting-transfer`,storage:t.storage,transfer_from:t.transferFrom,...t.storage===`sqlite`&&t.container!==void 0&&{container:t.container}};break}}if(Object.keys(i).length>0)throw new ws(`Unknown export types found: `+Object.entries(i).map(([e,{type:t}])=>`- ${e} : ${t}`).join(`
72
+ `),{telemetryMessage:`Unknown export types found`});Object.keys(r).length>0&&(t.exports=r)}function Rs(e,t){let n=e.triggers;if(!n||n.length===0)return;let r=[],i=t.routes?[...t.routes]:[],a=t.queues?.consumers?[...t.queues.consumers]:[],o=t.connect?[...t.connect]:[],s;for(let e of n)switch(e.type){case`email`:s??=[],s.push(...e.addresses);break;case`scheduled`:r.push(e.schedule);break;case`fetch`:e.zone===void 0?i.push(e.pattern):e.zone.includes(`.`)?i.push({pattern:e.pattern,zone_name:e.zone}):i.push({pattern:e.pattern,zone_id:e.zone});break;case`queue`:a.push(Q({queue:e.name,dead_letter_queue:e.deadLetterQueue,max_batch_size:e.maxBatchSize,max_batch_timeout:e.maxBatchTimeout,max_concurrency:e.maxConcurrency,max_retries:e.maxRetries,retry_delay:e.retryDelay,visibility_timeout_ms:e.visibilityTimeoutMs}));break;case`connect`:o.push(Q({protocol:e.protocol,port:e.port,address:e.address}));break}r.length&&(t.triggers={crons:r}),i.length&&(t.routes=i),a.length&&(t.queues={...t.queues??{},consumers:a}),o.length&&(t.connect=o),s!==void 0&&(t.addresses=s)}function zs(e,t){if(!e.domains||e.domains.length===0)return;let n=t.routes?[...t.routes]:[];for(let t of e.domains)n.push({pattern:t,custom_domain:!0});t.routes=n}function Bs(e,t){let n=e.tailConsumers;if(!n||n.length===0)return;let r=[],i=[];for(let e of n)e.streaming?i.push({service:e.worker}):r.push({service:e.worker});r.length&&(t.tail_consumers=r),i.length&&(t.streaming_tail_consumers=i)}function Q(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}const Vs=`cf-worker:`,Hs=`no-cache`,Us=`cf-no-cache`,Ws=/[/\\]node_modules[/\\]/,Gs=new i;async function Ks(e,t){Js();let n=r(e).href,i=new Set,a=await Gs.run(i,()=>import(n,{with:{cf:Hs}})),o={};for(let[e,n]of Object.entries(a))t?.include&&!t.include.includes(e)||(o[e]=n);return{exports:o,dependencies:i}}let qs;function Js(){if(qs)return qs;if(typeof process<`u`&&process.versions.bun)throw Error(`cloudflare.config.ts loading is not supported on Bun. Please use Node.js v22.18.0 or higher.`);let e=t.registerHooks;if(typeof e!=`function`)throw Error(`cloudflare.config.ts loading requires Node.js v22.18.0 or higher.`);let r=e({resolve(e,t,r){let i=t.importAttributes??{};if(i.type===`cf-worker`){let r=(e.startsWith(`./`)||e.startsWith(`../`))&&t.parentURL?n(new URL(e,t.parentURL)):e;return{url:`${Vs}${encodeURIComponent(r)}`,format:`module`,shortCircuit:!0}}let a=i.cf===Hs,o=r(e,t);if(Ws.test(o.url)||!o.url.startsWith(`file://`))return o;let s=Ys(t.parentURL);return!s&&!a?o:(Gs.getStore()?.add(n(o.url)),o.url=Xs(o.url,s||crypto.randomUUID()),o)},load(e,t,n){if(e.startsWith(Vs)){let t=decodeURIComponent(e.slice(10));return{format:`module`,source:`export default ${JSON.stringify(t)};`,shortCircuit:!0}}return Zs(t),n(e,t)}});return qs=()=>{r.deregister(),qs=void 0},qs}function Ys(e){if(e)return new URL(e).searchParams.get(Us)??void 0}function Xs(e,t){let n=new URL(e);return n.searchParams.set(Us,t),n.toString()}function Zs(e){if(!e.importAttributes?.cf)return;let t=Object.assign(Object.create(null),e.importAttributes);delete t.cf,e.importAttributes=t,Object.freeze(e.importAttributes)}const Qs=new Set([`durable-object`,`worker`,`workflow`]);function $(e){return typeof e==`object`&&!!e}function $s(e){return typeof e==`function`||$(e)}function ec(e,t,n){return $(t)&&t.type===n&&typeof t.name==`string`?t.name:e}function tc(e){let t=new Map;return n=>{let r=t.get(n);if(r)return r;let i=(async()=>await(typeof n==`function`?n(e):n))();return t.set(n,i),i}}async function nc(e,t){if(!$(e)||!$(e.env))return e;let n={...e.env};for(let[e,r]of Object.entries(n)){if(!$(r)||typeof r.type!=`string`||!Qs.has(r.type)||!$s(r.worker))continue;let i=await t(r.worker);n[e]={...r,worker:ec(r.worker,i,`worker`)}}return{...e,env:n}}async function rc(e,t,n){let r=[];if(!$(e)||!$(e.exports))return{value:e,issues:r};let i={...e.exports};for(let[e,a]of Object.entries(i)){if(!$(a)||a.type!==`durable-object`||a.container===void 0)continue;let o=a.container;if(typeof o==`string`){r.push({code:`custom`,input:o,path:[`exports`,e,`container`],message:`Container provided as a string. Reference an exported Container definition instead.`}),i[e]={...a,container:void 0};continue}let s=await t(o);if($(s)&&s.type===`container`&&typeof s.name==`string`&&!Object.values(n).includes(s)){r.push({code:`custom`,input:o,path:[`exports`,e,`container`],message:`The referenced Container "${s.name}" is not exported.`}),i[e]={...a,container:void 0};continue}i[e]={...a,container:ec(o,s,`container`)}}return{value:{...e,exports:i},issues:r}}async function ic(e,t,n){return rc(await nc(e,t),t,n)}function ac(e,t){return e.map(e=>({...e,path:[t,...e.path]}))}function oc(e){let t=[],n={container:new Map,worker:new Map};for(let[r,i]of Object.entries(e)){if(i.type!==`container`&&i.type!==`worker`)continue;let e=i.type===`container`?`Container`:`Worker`,a=n[i.type],o=a.get(i.name);if(o!==void 0){t.push({code:`custom`,input:i.name,path:[r,`name`],message:`The ${e} name "${i.name}" is also used by the "${o}" export. ${e} names must be unique.`});continue}a.set(i.name,r)}return t}function sc(e){let t=[],n=new Set;for(let t of Object.values(e))t.type===`container`&&n.add(t.name);let r=new Map;for(let[i,a]of Object.entries(e))if(a.type===`worker`)for(let[e,o]of Object.entries(a.exports??{})){if(o.type!==`durable-object`||!(`container`in o)||o.container===void 0)continue;let a=o.container,s=[i,`exports`,e,`container`];if(!n.has(a)){t.push({code:`custom`,input:a,path:s,message:`The Container "${a}" is not exported from this configuration.`});continue}let c=r.get(a);if(c!==void 0){t.push({code:`custom`,input:a,path:s,message:`The Container "${a}" is already referenced by "${c.workerExportName}.exports.${c.durableObjectExportName}". A Container can only be linked to one Durable Object.`});continue}r.set(a,{workerExportName:i,durableObjectExportName:e})}return t}async function cc(e,t){let n=tc(t),r=new Map,i={};for(let[t,r]of Object.entries(e))i[t]=await n(r);let a=ys.safeParse(i);if(!a.success)return a;let o=[],s={},c=i.settings,l=c?ms.safeParse(c):void 0;l&&(l.success?s.settings=l.data:o.push(...ac(l.error.issues,`settings`)));for(let[t,a]of Object.entries(e)){let e=i[t];if(!$(e)||e.type!==`worker`&&e.type!==`container`)continue;let c=r.get(a);if(!c){if(e.type===`worker`){let r=await ic(e,n,i);o.push(...ac(r.issues,t)),c=ps.safeParse(r.value)}else c=Qo.safeParse(e);r.set(a,c),c.success||o.push(...ac(c.error.issues,t))}c.success&&(s[t]=c.data)}return o.push(...oc(s),...sc(s)),o.length>0?{success:!1,error:new Bi(o)}:{success:!0,data:s}}async function lc(e,t,n){let{exports:r,dependencies:i}=await Ks(e,n);return{result:await cc(r,t),dependencies:i}}export{lo as _,W as a,o as b,go as c,U as d,B as f,R as g,G as h,J as i,Y as l,q as m,ks as n,V as o,Ma as p,_o as r,Ia as s,ps as t,Na as u,K as v,H as y};