@marimo-team/islands 0.25.3-dev24 → 0.25.3-dev245

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 (757) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DfG3PRaJ.js → ConnectedDataExplorerComponent-BBihxHrr.js} +120 -116
  2. package/dist/{ErrorBoundary-LHjDFqXG.js → ErrorBoundary-DiPu-nOq.js} +16 -16
  3. package/dist/_baseSet-BfI5FjBM.js +328 -0
  4. package/dist/{abnfDiagram-VCTEODGH-B3w-XWX8.js → abnfDiagram-VCTEODGH-DBcJVxYP.js} +2 -2
  5. package/dist/any-language-editor-jGaR0EAo.js +75 -0
  6. package/dist/{architectureDiagram-5GKGNRK7-C18U9A6k.js → architectureDiagram-5GKGNRK7-BcHZXF4S.js} +1 -1
  7. package/dist/{arrays-CN1djC4k.js → arrays-DoQ-AILx.js} +15 -27
  8. package/dist/assets/__vite-browser-external-BKBpimif.js +1 -0
  9. package/dist/assets/worker-CgoMtD-_.js +113 -0
  10. package/dist/{blockDiagram-I7D4REHJ-Cg25UrxT.js → blockDiagram-I7D4REHJ-Dkhe6_PP.js} +1 -1
  11. package/dist/{button-CvjkwdSk.js → button-B6RjDKJx.js} +227 -217
  12. package/dist/{capabilities-CQ5IjhzL.js → capabilities-CkVzWJEX.js} +2 -2
  13. package/dist/{chat-ui-w8SVynkn.js → chat-ui-DgaVxFrc.js} +1309 -1307
  14. package/dist/{check-BMKBBrdc.js → check-Z_vtI3OL.js} +1 -1
  15. package/dist/{chunk-IMKFNOWR-CrS5bzqW.js → chunk-IMKFNOWR-CTZlwBAA.js} +1 -1
  16. package/dist/{chunk-SHT3W25Y-StpvPvUG.js → chunk-SHT3W25Y-53g_RZHm.js} +1 -1
  17. package/dist/{chunk-SVP7TREG-CBXjbYZC.js → chunk-SVP7TREG-P6abNGV_.js} +1 -1
  18. package/dist/{chunk-TICWLB2K-Dp6bIb-q.js → chunk-TICWLB2K-BTJJqkyF.js} +1 -1
  19. package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
  20. package/dist/{classDiagram-ZZMXUADV-BFYuxV5g.js → classDiagram-ZZMXUADV-BUGqOrTm.js} +2 -2
  21. package/dist/{classDiagram-v2-VYDZK3BY-D_tjXVMl.js → classDiagram-v2-VYDZK3BY-CXpQvO-s.js} +2 -2
  22. package/dist/code-visibility-B955Xe77.js +134 -0
  23. package/dist/{common-1pRFQo1N.js → common-CivG9Zso.js} +9980 -9749
  24. package/dist/config-DbjzjwxX.js +636 -0
  25. package/dist/{copy-icon-BgUO8jsi.js → copy-icon-CG57cxwb.js} +3 -3
  26. package/dist/createReducer-DePYJ0F3.js +63 -0
  27. package/dist/{cynefinDiagram-5FMLGOSQ-DSgYrHB2.js → cynefinDiagram-5FMLGOSQ-DOcnl8wW.js} +1 -1
  28. package/dist/{dagre-GXQ25YYZ-GYlruCBf.js → dagre-GXQ25YYZ-CuHR9QfG.js} +3 -3
  29. package/dist/{dagre-BGSfXNEb.js → dagre-mqiMAsFY.js} +531 -680
  30. package/dist/{data-grid-overlay-editor-UR0x91Ij.js → data-grid-overlay-editor-BUnD6AGE.js} +5 -5
  31. package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
  32. package/dist/{debounce-C3jyATpc.js → debounce-DrhhziJv.js} +2 -2
  33. package/dist/{diagram-S7CK7UJ4-DRu5LX5_.js → diagram-S7CK7UJ4-BPiG4kso.js} +1 -1
  34. package/dist/{diagram-UQ7AKVKN-DD7uiejP.js → diagram-UQ7AKVKN-_piBOvOC.js} +1 -1
  35. package/dist/{diagram-VX7I27RA-ByH9KAJJ.js → diagram-VX7I27RA-DCzVeJ8M.js} +1 -1
  36. package/dist/{diagram-Z3DM3KII-BsQHPRke.js → diagram-Z3DM3KII-D64CF1jQ.js} +1 -1
  37. package/dist/{dialog-Cc479ZEH.js → dialog-DsZ49mmU.js} +26 -26
  38. package/dist/{dist-Bvs24R_E.js → dist-11T5wq3_.js} +31 -30
  39. package/dist/{dist-F8Ep36rk.js → dist-17ugwGZc.js} +59 -58
  40. package/dist/{dist-BMQf5zIS.js → dist-7cRjf--y.js} +123 -122
  41. package/dist/{dist-diIx5qJW.js → dist-B8pkfkzc.js} +31 -30
  42. package/dist/{dist-CN_BeG2I.js → dist-B9UoM_wq.js} +58 -57
  43. package/dist/{dist-CLdpGQVr.js → dist-BGuMTs1i.js} +118 -117
  44. package/dist/{dist-BK4Oj99o.js → dist-BHW11fni.js} +18 -17
  45. package/dist/dist-BLY4m1Wi.js +850 -0
  46. package/dist/{dist-PXYI_yuP.js → dist-BNlcVoxs.js} +24 -23
  47. package/dist/{dist-D6d86eNJ.js → dist-BQYe5Bju.js} +47 -46
  48. package/dist/{dist-CkTTIdBe.js → dist-BX1mn8na.js} +337 -337
  49. package/dist/{dist-DiDibOYr.js → dist-Bh0PTKUW.js} +151 -150
  50. package/dist/{dist-CSJ0MDRw.js → dist-CKaXK92p.js} +56 -55
  51. package/dist/{dist-C8fAKSH1.js → dist-CLhwfhpJ.js} +53 -52
  52. package/dist/{dist-DoE4XJBC.js → dist-CYeqK4Xw.js} +9801 -10649
  53. package/dist/{dist-BLfKmR-l.js → dist-Cxlp3WH6.js} +16 -15
  54. package/dist/{dist-D-wwqlzJ.js → dist-DSJPGj42.js} +158 -157
  55. package/dist/{dist-BorMD-uX.js → dist-DU9ICsWZ.js} +75 -74
  56. package/dist/{dist-DBtSl3sf.js → dist-DWv0ALBi.js} +47 -46
  57. package/dist/{dist-OR1OnN-y.js → dist-DiBpWEsB.js} +31 -30
  58. package/dist/{dist-CrSP_H1M.js → dist-DiLFTlnl.js} +242 -242
  59. package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
  60. package/dist/{dist-CSbh1PNP.js → dist-cVDV5IuI.js} +23 -22
  61. package/dist/{dist-BuaRHxOc.js → dist-fRfaOoq8.js} +44 -43
  62. package/dist/{dist-Cg7gzw-a.js → dist-gTTI-9Px.js} +78 -77
  63. package/dist/dropdown-menu-BRiE7Vnp.js +6083 -0
  64. package/dist/{ebnfDiagram-PWID7BFC-CQRK5_eT.js → ebnfDiagram-PWID7BFC-BapQPML-.js} +2 -2
  65. package/dist/{erDiagram-RLTQ6QDP-BKtWrDVh.js → erDiagram-RLTQ6QDP-CNQvC2_Q.js} +1 -1
  66. package/dist/{error-banner-CFPHFw4h.js → error-banner-IsonnvA0.js} +84 -83
  67. package/dist/error-entries-CRPfxMqm.js +2505 -0
  68. package/dist/{esm-D2gTsXEV.js → esm-BgKjMvWw.js} +530 -529
  69. package/dist/{esm-AMFssoNp.js → esm-CHjVSexr.js} +328 -329
  70. package/dist/feedback-button-WpSRKq8m.js +374 -0
  71. package/dist/{flowDiagram-HODETNUW-1IN-ih2E.js → flowDiagram-HODETNUW-BBt6S6oe.js} +2 -2
  72. package/dist/{formats-X4mMQWzX.js → formats-BK4VefeF.js} +6 -6
  73. package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
  74. package/dist/{glide-data-editor-DPjObn47.js → glide-data-editor-CORsDYy3.js} +417 -415
  75. package/dist/{glide-utils-DM9zBO4W.js → glide-utils-CQddGpa-.js} +16 -16
  76. package/dist/{globals-DOHFyDcV.js → globals-B3f1L5ta.js} +3 -3
  77. package/dist/{graphlib-BmY_CCV9.js → graphlib-nlwT3Wvy.js} +177 -220
  78. package/dist/hasIn-C20JsQ2m.js +28 -0
  79. package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
  80. package/dist/{error-entries-Damuuclv.js → html-to-image-Gx4q3ZoD.js} +26911 -26769
  81. package/dist/{infoDiagram-27XIBGKW-CkB-zr4p.js → infoDiagram-27XIBGKW-Hd8Ifz82.js} +1 -1
  82. package/dist/isArrayLikeObject-B-HXCsex.js +626 -0
  83. package/dist/isEmpty-CdX7MTE1.js +14 -0
  84. package/dist/{ishikawaDiagram-5VMMS53U-wlyLjBmM.js → ishikawaDiagram-5VMMS53U-CP7hnHWx.js} +1 -1
  85. package/dist/{kanban-definition-UXKFOSKX-C2usY0i-.js → kanban-definition-UXKFOSKX-CX91sa9b.js} +1 -1
  86. package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
  87. package/dist/{loader-BQOfjTIJ.js → loader-BisjOLiW.js} +12 -12
  88. package/dist/main.js +10234 -8104
  89. package/dist/{mermaid-BA-Z6wGL.js → mermaid-Djb3Ni9t.js} +54 -54
  90. package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
  91. package/dist/{mindmap-definition-YA3MSWOX-nKOWS8RR.js → mindmap-definition-YA3MSWOX-DgCNo07O.js} +1 -1
  92. package/dist/{now-jM8-M7IR.js → now-BKZCLE5P.js} +12 -13
  93. package/dist/{number-overlay-editor-B3cSnrr6.js → number-overlay-editor-B5LIxGos.js} +3 -3
  94. package/dist/{dist-CN8zI-XC.js → objectWithoutPropertiesLoose-ai5NUqGa.js} +262 -240
  95. package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
  96. package/dist/{once-BtE-wKRL.js → once-NnpX_HnX.js} +1 -1
  97. package/dist/{pegDiagram-XKGWAZYB-Dac9EIKD.js → pegDiagram-XKGWAZYB-SGJhnIKo.js} +2 -2
  98. package/dist/pick-tCszMUbm.js +35 -0
  99. package/dist/{pieDiagram-E7YTZNPT-B7S-DsW_.js → pieDiagram-E7YTZNPT-1stXIWCQ.js} +1 -1
  100. package/dist/precisionRound-DhAzeRcm.js +49 -0
  101. package/dist/{process-output-CTPTtxXB.js → process-output-D2ISIyIs.js} +4 -4
  102. package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
  103. package/dist/{railroadDiagram-O6MQD6OU-Cfa5Q-hr.js → railroadDiagram-O6MQD6OU-DY1mojzB.js} +2 -2
  104. package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
  105. package/dist/{requirementDiagram-BXWQKSXE-d8zXCJIk.js → requirementDiagram-BXWQKSXE-gHzhUp0D.js} +1 -1
  106. package/dist/{reveal-component-CFFzSsPX.js → reveal-component-DvM7Lxss.js} +430 -407
  107. package/dist/schemas-CdscWNy_.js +4747 -0
  108. package/dist/select-BSxlITBo.js +1200 -0
  109. package/dist/{sequenceDiagram-WJ2MYXX4-b6pei3lJ.js → sequenceDiagram-WJ2MYXX4-rjPtD9fB.js} +1 -1
  110. package/dist/{spec-BJzgmvVa.js → spec-Dq8RNplp.js} +41 -11
  111. package/dist/{stateDiagram-D77RDMKH-Be-xSpaZ.js → stateDiagram-D77RDMKH-DMNxjUxV.js} +4 -4
  112. package/dist/{stateDiagram-v2-MP3YSRHH-5Y-FxesJ.js → stateDiagram-v2-MP3YSRHH-CumAaqGo.js} +2 -2
  113. package/dist/static-state-BldGd99T.js +72 -0
  114. package/dist/strings-BGW-fXVJ.js +507 -0
  115. package/dist/style.css +1 -1
  116. package/dist/{swimlanes-42K2YHIH-nRRl4NU0.js → swimlanes-42K2YHIH-BU14_Tej.js} +1 -1
  117. package/dist/{swimlanesDiagram-VR7AAH4N-BS79510V.js → swimlanesDiagram-VR7AAH4N-CieAnPqJ.js} +2 -2
  118. package/dist/{swiper-component-DKntyn8p.js → swiper-component-Dir1o8ml.js} +2 -2
  119. package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
  120. package/dist/{timeline-definition-24CTP7MA-Cfzf8WPf.js → timeline-definition-24CTP7MA-CrVj4E1K.js} +1 -1
  121. package/dist/toast-BWIPi3aF.js +491 -0
  122. package/dist/{tooltip-CtBZ5q8p.js → tooltip-C3UnvsRe.js} +329 -305
  123. package/dist/use-restore-focus-BWO0z1lo.js +1672 -0
  124. package/dist/{useAsyncData-BD534XmW.js → useAsyncData-DsZMvNXn.js} +15 -14
  125. package/dist/{useDateFormatter-DkajGwwd.js → useDateFormatter-ChB4eyim.js} +2 -2
  126. package/dist/{useDeepCompareMemoize-C72_RNsu.js → useDeepCompareMemoize-KMBBux8C.js} +1 -1
  127. package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-cMNQ80CK.js} +1 -1
  128. package/dist/useLifecycle-BquH9ET-.js +112 -0
  129. package/dist/useTheme-DgOLVISn.js +337 -0
  130. package/dist/utils-DXkj82sK.js +813 -0
  131. package/dist/{vega-component-DfcYgj-Y.js → vega-component-Bwg_Kuh-.js} +171 -170
  132. package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
  133. package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
  134. package/dist/{vennDiagram-4TSXK5OY-CeY6Z1xZ.js → vennDiagram-4TSXK5OY-ZLxQ8yhm.js} +1 -1
  135. package/dist/{wardleyDiagram-VM6X3IG4-Cxs9NtVi.js → wardleyDiagram-VM6X3IG4-D88pcLY1.js} +1 -1
  136. package/dist/{xychartDiagram-S5SC5T6Z-DNWbvPK7.js → xychartDiagram-S5SC5T6Z-_13d4g8g.js} +2 -2
  137. package/package.json +16 -20
  138. package/src/__mocks__/document.tsx +63 -0
  139. package/src/__mocks__/notebook.ts +3 -4
  140. package/src/__mocks__/partial.ts +26 -0
  141. package/src/__mocks__/requests.ts +1 -4
  142. package/src/__tests__/main.test.tsx +24 -1
  143. package/src/__tests__/module-entry.test.ts +44 -0
  144. package/src/__tests__/mount.test.ts +1 -21
  145. package/src/__tests__/{host-imports.test.ts → replica-imports.test.ts} +12 -11
  146. package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
  147. package/src/components/ai/ai-model-dropdown.tsx +11 -6
  148. package/src/components/app-config/ai-config.tsx +155 -149
  149. package/src/components/app-config/app-config-button.tsx +6 -5
  150. package/src/components/app-config/app-config-form.tsx +5 -9
  151. package/src/components/app-config/common.tsx +7 -9
  152. package/src/components/app-config/data-form.tsx +112 -113
  153. package/src/components/app-config/mcp-config.tsx +30 -53
  154. package/src/components/app-config/user-config-form.css +91 -0
  155. package/src/components/app-config/user-config-form.tsx +266 -349
  156. package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
  157. package/src/components/chat/__tests__/notebook-access-selector.test.tsx +64 -0
  158. package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
  159. package/src/components/chat/acp/__tests__/state.test.ts +2 -2
  160. package/src/components/chat/acp/blocks.tsx +3 -2
  161. package/src/components/chat/acp/session-tabs.tsx +8 -3
  162. package/src/components/chat/capabilities-popover.tsx +1 -5
  163. package/src/components/chat/chat-components.tsx +2 -0
  164. package/src/components/chat/chat-panel.tsx +23 -104
  165. package/src/components/chat/chat-utils.ts +4 -8
  166. package/src/components/chat/notebook-access-selector.stories.tsx +22 -0
  167. package/src/components/chat/notebook-access-selector.tsx +100 -0
  168. package/src/components/data-table/TableBottomBar.tsx +4 -1
  169. package/src/components/data-table/TableTopBar.tsx +2 -0
  170. package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
  171. package/src/components/data-table/__tests__/column-explorer.test.tsx +27 -1
  172. package/src/components/data-table/__tests__/columns.test.tsx +105 -0
  173. package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
  174. package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
  175. package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
  176. package/src/components/data-table/__tests__/export-actions.test.tsx +105 -0
  177. package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
  178. package/src/components/data-table/__tests__/pagination.test.tsx +28 -1
  179. package/src/components/data-table/__tests__/search-highlight.test.tsx +109 -0
  180. package/src/components/data-table/__tests__/url-detector.test.tsx +74 -0
  181. package/src/components/data-table/cell-selection/feature.ts +2 -2
  182. package/src/components/data-table/cell-selection/types.ts +2 -2
  183. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
  184. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
  185. package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
  186. package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
  187. package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
  188. package/src/components/data-table/charts/charts.tsx +40 -30
  189. package/src/components/data-table/charts/storage.ts +16 -5
  190. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
  191. package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
  192. package/src/components/data-table/column-summary/column-summary.tsx +2 -4
  193. package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
  194. package/src/components/data-table/columns.tsx +45 -46
  195. package/src/components/data-table/context-menu.tsx +36 -20
  196. package/src/components/data-table/data-table.tsx +17 -1
  197. package/src/components/data-table/date-popover.tsx +6 -4
  198. package/src/components/data-table/export-actions.tsx +76 -48
  199. package/src/components/data-table/pagination.tsx +44 -33
  200. package/src/components/data-table/range-focus/atoms.ts +4 -6
  201. package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
  202. package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
  203. package/src/components/data-table/renderers.tsx +16 -7
  204. package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
  205. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +4 -4
  206. package/src/components/data-table/search-highlight.tsx +79 -0
  207. package/src/components/data-table/types.ts +1 -0
  208. package/src/components/data-table/url-detector.tsx +49 -9
  209. package/src/components/datasources/__tests__/column-actions.test.tsx +97 -0
  210. package/src/components/datasources/__tests__/column-preview.test.tsx +96 -5
  211. package/src/components/datasources/__tests__/datasources-interactions.test.tsx +181 -0
  212. package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
  213. package/src/components/datasources/__tests__/utils.test.ts +57 -6
  214. package/src/components/datasources/column-preview.tsx +17 -12
  215. package/src/components/datasources/datasources.tsx +56 -43
  216. package/src/components/datasources/utils.ts +32 -23
  217. package/src/components/debugger/debugger-code.tsx +5 -0
  218. package/src/components/dependency-graph/custom-node.tsx +1 -1
  219. package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
  220. package/src/components/dependency-graph/elements.ts +24 -21
  221. package/src/components/dependency-graph/minimap-content.tsx +13 -19
  222. package/src/components/dependency-graph/panels.tsx +4 -2
  223. package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
  224. package/src/components/editor/SortableCell.tsx +1 -3
  225. package/src/components/editor/__tests__/Output.test.tsx +50 -32
  226. package/src/{core/attachments/__tests__/toast.test.tsx → components/editor/__tests__/agent-toast.test.tsx} +1 -1
  227. package/src/components/editor/__tests__/data-attributes.test.tsx +28 -14
  228. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
  229. package/src/components/editor/__tests__/output-persistence.test.tsx +6 -2
  230. package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
  231. package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +69 -0
  232. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +3 -3
  233. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +40 -10
  234. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +6 -10
  235. package/src/components/editor/actions/__tests__/useCellActionButton.test.tsx +113 -0
  236. package/src/components/editor/actions/name-cell-input.tsx +4 -3
  237. package/src/components/editor/actions/pair-with-agent-commands.ts +10 -6
  238. package/src/components/editor/actions/pair-with-agent-modal.tsx +24 -21
  239. package/src/components/editor/actions/pair-with-agent.tsx +15 -10
  240. package/src/components/editor/actions/useCellActionButton.tsx +36 -31
  241. package/src/components/editor/actions/useConfigActions.tsx +3 -4
  242. package/src/components/editor/actions/useNotebookActions.tsx +25 -29
  243. package/src/components/editor/actions/useRestartKernel.tsx +1 -1
  244. package/src/components/editor/actions/useSetCodeVisibility.ts +11 -12
  245. package/src/components/editor/actions/useSetOutputsExpanded.ts +14 -19
  246. package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
  247. package/src/components/editor/ai/ai-completion-editor.tsx +1 -0
  248. package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +1 -1
  249. package/src/components/editor/alerts/connection-notice.tsx +1 -1
  250. package/src/components/editor/alerts/startup-logs-alert.tsx +1 -0
  251. package/src/components/editor/alerts/stdin-blocking-alert.tsx +1 -1
  252. package/src/components/editor/app-container.tsx +1 -1
  253. package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +1 -1
  254. package/src/components/editor/cell/CreateCellButton.tsx +15 -21
  255. package/src/components/editor/cell/DeleteButton.tsx +3 -2
  256. package/src/components/editor/cell/RunButton.tsx +2 -2
  257. package/src/components/editor/cell/StagedAICell.tsx +10 -2
  258. package/src/components/editor/cell/StopButton.tsx +2 -2
  259. package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +4 -2
  260. package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
  261. package/src/components/editor/cell/cell-actions.tsx +12 -1
  262. package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
  263. package/src/components/editor/cell/code/cell-editor.tsx +46 -165
  264. package/src/components/editor/cell/code/language-toggle.tsx +8 -7
  265. package/src/components/editor/cell/collapse.tsx +11 -4
  266. package/src/components/editor/cell/useAddCell.ts +4 -8
  267. package/src/components/editor/cell/useDeleteCell.tsx +10 -36
  268. package/src/components/editor/cell/useRunCells.ts +2 -5
  269. package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
  270. package/src/components/editor/cell/useSplitCell.tsx +10 -6
  271. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +1 -1
  272. package/src/components/editor/chrome/components/feedback-button.tsx +2 -8
  273. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +31 -2
  274. package/src/components/editor/chrome/panels/__tests__/runtime-details.test.tsx +1 -1
  275. package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +1 -1
  276. package/src/components/editor/chrome/panels/cache-panel.tsx +1 -0
  277. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +1 -1
  278. package/src/components/editor/chrome/panels/logs-panel.tsx +2 -1
  279. package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
  280. package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
  281. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
  282. package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
  283. package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
  284. package/src/components/editor/chrome/panels/session-panel.tsx +1 -1
  285. package/src/components/editor/chrome/panels/snippets-panel.tsx +10 -12
  286. package/src/components/editor/chrome/panels/variable-panel.tsx +1 -5
  287. package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +6 -9
  288. package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +92 -0
  289. package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +62 -3
  290. package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +4 -4
  291. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +1 -1
  292. package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
  293. package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +1 -1
  294. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +1 -1
  295. package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +1 -7
  296. package/src/components/editor/chrome/wrapper/footer.tsx +2 -2
  297. package/src/components/editor/chrome/wrapper/minimap-state.ts +1 -1
  298. package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +12 -2
  299. package/src/components/editor/chrome/wrapper/storage.ts +1 -1
  300. package/src/components/editor/columns/__tests__/cell-column.test.tsx +1 -1
  301. package/src/components/editor/columns/cell-column.tsx +1 -1
  302. package/src/components/editor/columns/sortable-column.tsx +2 -2
  303. package/src/components/editor/connections/components.tsx +5 -10
  304. package/src/components/editor/controls/Controls.tsx +4 -4
  305. package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
  306. package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
  307. package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +10 -4
  308. package/src/components/editor/controls/command-palette.tsx +22 -10
  309. package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
  310. package/src/components/editor/documentation.css +34 -11
  311. package/src/components/editor/dynamic-favicon.tsx +21 -40
  312. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +25 -20
  313. package/src/components/editor/errors/auto-fix.tsx +4 -8
  314. package/src/components/editor/errors/send-error-report-button.tsx +3 -6
  315. package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
  316. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
  317. package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
  318. package/src/components/editor/file-tree/file-explorer.tsx +48 -15
  319. package/src/components/editor/file-tree/file-name-input.tsx +1 -0
  320. package/src/components/editor/file-tree/file-viewer.tsx +4 -2
  321. package/src/components/editor/file-tree/use-file-search.ts +35 -21
  322. package/src/components/editor/header/__tests__/filename-form.test.tsx +1 -4
  323. package/src/components/editor/header/__tests__/status.test.tsx +5 -3
  324. package/src/components/editor/header/app-header.tsx +1 -1
  325. package/src/components/editor/header/filename-form.tsx +1 -1
  326. package/src/components/editor/header/status.tsx +40 -20
  327. package/src/components/editor/links/__tests__/cell-link.test.tsx +148 -0
  328. package/src/components/editor/links/cell-link-list.tsx +1 -1
  329. package/src/components/editor/links/cell-link.tsx +17 -7
  330. package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
  331. package/src/components/editor/navigation/__tests__/navigation.test.ts +108 -85
  332. package/src/components/editor/navigation/__tests__/selection.test.ts +43 -21
  333. package/src/components/editor/navigation/clipboard.ts +17 -14
  334. package/src/components/editor/navigation/focus-utils.ts +23 -4
  335. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +17 -33
  336. package/src/components/editor/navigation/navigation.ts +71 -70
  337. package/src/components/editor/navigation/selection.ts +30 -29
  338. package/src/components/editor/notebook-banner.tsx +1 -0
  339. package/src/components/editor/notebook-cell.tsx +29 -32
  340. package/src/components/editor/output/MarimoErrorOutput.tsx +2 -1
  341. package/src/components/editor/output/MarimoTracebackOutput.tsx +19 -17
  342. package/src/components/editor/output/Outputs.css +8 -0
  343. package/src/components/editor/output/VideoOutput.tsx +6 -0
  344. package/src/components/editor/output/__tests__/VideoOutput.test.tsx +131 -0
  345. package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
  346. package/src/components/editor/output/ansi-reduce.ts +33 -20
  347. package/src/components/editor/output/console/ConsoleOutput.tsx +19 -25
  348. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
  349. package/src/components/editor/package-alert.tsx +14 -7
  350. package/src/components/editor/renderers/cell-array.tsx +22 -33
  351. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
  352. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +0 -1
  353. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +1 -1
  354. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +4 -4
  355. package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +7 -1
  356. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +1 -1
  357. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
  358. package/src/components/editor/stdin-blocking-alert.tsx +1 -1
  359. package/src/components/home/components.tsx +17 -31
  360. package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
  361. package/src/components/icons/large-spinner.tsx +3 -14
  362. package/src/components/icons/spinner.tsx +1 -1
  363. package/src/components/markdown/markdown-renderer.tsx +4 -8
  364. package/src/components/mcp/mcp-status-indicator.tsx +1 -1
  365. package/src/components/pages/__tests__/home-page.test.tsx +116 -0
  366. package/src/components/pages/edit-page.tsx +19 -17
  367. package/src/components/pages/home-page.tsx +164 -91
  368. package/src/components/scratchpad/scratchpad.test.tsx +89 -0
  369. package/src/components/scratchpad/scratchpad.tsx +43 -32
  370. package/src/components/scratchpad/state.ts +7 -0
  371. package/src/components/slides/__tests__/minimap-actions.test.tsx +22 -29
  372. package/src/components/slides/__tests__/minimap.test.ts +38 -19
  373. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +37 -0
  374. package/src/components/slides/minimap.tsx +17 -12
  375. package/src/components/slides/reveal-component.tsx +58 -26
  376. package/src/components/slides/reveal-slides.css +5 -4
  377. package/src/components/slides/slide-cell-view.tsx +4 -5
  378. package/src/components/slides/slide-form.tsx +1 -0
  379. package/src/components/slides/slide-scroll-hint.tsx +3 -1
  380. package/src/components/sort/SortableCellsProvider.tsx +8 -25
  381. package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
  382. package/src/components/tracing/tracing.tsx +46 -42
  383. package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
  384. package/src/components/ui/__tests__/fullscreen.test.tsx +44 -2
  385. package/src/components/ui/__tests__/range-slider.test.tsx +165 -0
  386. package/src/components/ui/alert-dialog.tsx +1 -1
  387. package/src/components/ui/draggable-popover.tsx +24 -2
  388. package/src/components/ui/fullscreen.tsx +25 -1
  389. package/src/components/ui/range-slider.tsx +22 -9
  390. package/src/core/MarimoApp.tsx +3 -1
  391. package/src/core/ai/__tests__/staged-cells.test.ts +32 -33
  392. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +8 -12
  393. package/src/core/ai/context/providers/cell-output.ts +2 -2
  394. package/src/core/ai/context/providers/datasource.ts +6 -2
  395. package/src/core/ai/staged-cells.ts +18 -19
  396. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +40 -88
  397. package/src/core/ai/tools/__tests__/registry.test.ts +17 -0
  398. package/src/core/ai/tools/base.ts +18 -15
  399. package/src/core/ai/tools/edit-notebook-tool.ts +86 -80
  400. package/src/core/ai/tools/registry.ts +13 -10
  401. package/src/core/ai/tools/sample-tool.ts +6 -7
  402. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +4 -37
  403. package/src/core/cells/__tests__/actions.test.ts +624 -35
  404. package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
  405. package/src/core/cells/__tests__/arrange.test.ts +432 -0
  406. package/src/core/cells/__tests__/cell.test.ts +39 -0
  407. package/src/core/cells/__tests__/cells.test.ts +251 -2540
  408. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
  409. package/src/core/cells/__tests__/document.test.ts +164 -0
  410. package/src/core/cells/__tests__/editor.test.ts +57 -0
  411. package/src/core/cells/__tests__/flush-document.test.ts +40 -0
  412. package/src/core/cells/__tests__/harness.ts +106 -0
  413. package/src/core/cells/__tests__/layout.test.ts +177 -0
  414. package/src/core/cells/__tests__/notebook-outline.test.ts +122 -0
  415. package/src/core/cells/__tests__/outputs.test.tsx +71 -53
  416. package/src/core/cells/__tests__/session.test.ts +445 -211
  417. package/src/core/cells/__tests__/utils.test.ts +9 -108
  418. package/src/core/cells/actions.ts +675 -6
  419. package/src/core/cells/add-missing-import.ts +47 -43
  420. package/src/core/cells/arrange.ts +529 -0
  421. package/src/core/cells/cell.ts +14 -3
  422. package/src/core/cells/cells.ts +126 -1363
  423. package/src/core/cells/columns.ts +38 -0
  424. package/src/core/cells/document.ts +178 -0
  425. package/src/core/cells/edit.ts +30 -0
  426. package/src/core/cells/editor.ts +82 -0
  427. package/src/core/cells/layout.ts +221 -0
  428. package/src/core/cells/outputs.ts +12 -28
  429. package/src/core/cells/pending-delete-service.ts +3 -7
  430. package/src/core/cells/session.ts +76 -53
  431. package/src/core/cells/types.ts +22 -6
  432. package/src/core/cells/utils.ts +10 -8
  433. package/src/core/codemirror/__tests__/format.test.ts +0 -34
  434. package/src/core/codemirror/__tests__/setup.test.ts +29 -29
  435. package/src/core/codemirror/ai/__tests__/resources.test.ts +117 -0
  436. package/src/core/codemirror/ai/resources.ts +1 -1
  437. package/src/core/codemirror/cells/__tests__/extensions.test.ts +2 -6
  438. package/src/core/codemirror/cells/extensions.ts +30 -28
  439. package/src/core/codemirror/cells/state.ts +1 -6
  440. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +6 -7
  441. package/src/core/codemirror/copilot/getCodes.ts +2 -2
  442. package/src/core/codemirror/format.ts +6 -23
  443. package/src/core/codemirror/keymaps/vim.ts +4 -8
  444. package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
  445. package/src/core/codemirror/language/__tests__/utils.test.ts +187 -15
  446. package/src/core/codemirror/language/cell-code.ts +114 -0
  447. package/src/core/codemirror/language/extension.ts +52 -35
  448. package/src/core/codemirror/language/languages/markdown.ts +8 -6
  449. package/src/core/codemirror/language/languages/python.ts +16 -10
  450. package/src/core/codemirror/language/languages/sql/sql.ts +16 -24
  451. package/src/core/codemirror/language/panel/panel.tsx +1 -0
  452. package/src/core/codemirror/language/types.ts +7 -7
  453. package/src/core/codemirror/language/utils.ts +9 -39
  454. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -2
  455. package/src/core/codemirror/lsp/notebook-lsp.ts +6 -5
  456. package/src/core/codemirror/lsp/utils.ts +1 -1
  457. package/src/core/codemirror/misc/__tests__/paste.test.ts +3 -1
  458. package/src/core/codemirror/misc/paste.ts +1 -1
  459. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  460. package/src/core/codemirror/readonly/extension.ts +2 -2
  461. package/src/core/codemirror/utils.ts +1 -0
  462. package/src/core/config/__tests__/app-config.test.ts +64 -0
  463. package/src/core/config/__tests__/config-schema.test.ts +56 -6
  464. package/src/core/config/config-schema.ts +17 -4
  465. package/src/core/config/config.ts +65 -20
  466. package/src/core/config/feature-flag.tsx +0 -2
  467. package/src/core/datasets/__tests__/data-source-discovery.test.ts +5 -5
  468. package/src/core/datasets/data-source-discovery.ts +4 -6
  469. package/src/core/documentation/doc-lookup.ts +1 -1
  470. package/src/core/edit-app.tsx +21 -28
  471. package/src/core/errors/error-entries.ts +4 -1
  472. package/src/core/export/hooks.ts +1 -1
  473. package/src/core/export/layout.ts +2 -2
  474. package/src/core/hotkeys/actions.ts +2 -4
  475. package/src/core/islands/__tests__/bootstrap.test.ts +69 -17
  476. package/src/core/islands/__tests__/bridge.test.ts +85 -27
  477. package/src/core/islands/bootstrap.ts +46 -53
  478. package/src/core/islands/bridge.ts +84 -25
  479. package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
  480. package/src/core/islands/components/web-components.tsx +1 -1
  481. package/src/core/islands/worker/__tests__/controller.test.ts +62 -4
  482. package/src/core/islands/worker/controller.ts +4 -10
  483. package/src/core/islands/worker/worker.tsx +33 -33
  484. package/src/core/kernel/__tests__/RuntimeState.test.ts +1 -1
  485. package/src/core/kernel/__tests__/handlers.test.ts +7 -153
  486. package/src/core/kernel/handlers.ts +19 -72
  487. package/src/core/meta/__tests__/code-visibility.test.tsx +78 -70
  488. package/src/core/meta/code-visibility.ts +18 -9
  489. package/src/core/network/__tests__/connection.test.ts +1 -1
  490. package/src/core/network/__tests__/requests-lazy.test.ts +1 -3
  491. package/src/core/network/connection-notice.ts +1 -1
  492. package/src/core/network/connection.ts +1 -1
  493. package/src/core/network/requests-lazy.ts +2 -5
  494. package/src/core/network/requests-network.ts +5 -31
  495. package/src/core/network/requests-static.ts +1 -4
  496. package/src/core/network/requests-toasting.tsx +1 -4
  497. package/src/core/network/types.ts +6 -14
  498. package/src/core/network/useConnectionNotice.ts +8 -2
  499. package/src/core/notebook/__tests__/operations.test.ts +51 -0
  500. package/src/core/notebook/attachments.ts +38 -0
  501. package/src/core/notebook/document/__tests__/codemirror.test.ts +758 -0
  502. package/src/core/notebook/document/__tests__/draft.test.ts +363 -0
  503. package/src/core/notebook/document/__tests__/fixtures.ts +92 -0
  504. package/src/core/notebook/document/__tests__/hooks.test.tsx +391 -0
  505. package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +61 -0
  506. package/src/core/notebook/document/__tests__/model.test.ts +247 -0
  507. package/src/core/notebook/document/__tests__/protocol-fixtures.ts +38 -0
  508. package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +230 -0
  509. package/src/core/notebook/document/__tests__/scenario-fixture.ts +43 -0
  510. package/src/core/notebook/document/__tests__/scenarios.test.ts +205 -0
  511. package/src/core/notebook/document/__tests__/state.test.ts +459 -0
  512. package/src/core/notebook/document/__tests__/submission.test.ts +203 -0
  513. package/src/core/notebook/document/__tests__/test-host.test.ts +92 -0
  514. package/src/core/notebook/document/__tests__/test-host.ts +247 -0
  515. package/src/core/notebook/document/__tests__/test-notebook.ts +149 -0
  516. package/src/core/notebook/document/__tests__/user.ts +61 -0
  517. package/src/core/notebook/document/codemirror.ts +216 -0
  518. package/src/core/notebook/document/draft.ts +502 -0
  519. package/src/core/notebook/document/hooks.tsx +118 -0
  520. package/src/core/notebook/document/index.ts +24 -0
  521. package/src/core/notebook/document/model.ts +102 -0
  522. package/src/core/notebook/document/select.ts +41 -0
  523. package/src/core/notebook/document/state.ts +378 -0
  524. package/src/core/notebook/document/sync.ts +369 -0
  525. package/src/core/notebook/index.ts +19 -0
  526. package/src/core/notebook/operations.ts +30 -0
  527. package/src/core/notebook/replica/AGENTS.md +11 -0
  528. package/src/core/{host → notebook/replica}/__tests__/attachments.test.ts +9 -10
  529. package/src/core/{host → notebook/replica}/__tests__/document.test.ts +18 -16
  530. package/src/core/notebook/replica/__tests__/executions.test.ts +201 -0
  531. package/src/core/notebook/replica/__tests__/fixtures.ts +79 -0
  532. package/src/core/notebook/replica/__tests__/replica.test.ts +559 -0
  533. package/src/core/notebook/replica/__tests__/results.test.ts +193 -0
  534. package/src/core/notebook/replica/__tests__/runtime.test.ts +78 -0
  535. package/src/core/notebook/replica/backend.ts +19 -0
  536. package/src/core/notebook/replica/connection.ts +42 -0
  537. package/src/core/notebook/replica/index.ts +20 -0
  538. package/src/core/notebook/replica/replica.ts +336 -0
  539. package/src/core/{host → notebook/replica}/resources/attachments.ts +6 -3
  540. package/src/core/{host → notebook/replica}/resources/document.ts +3 -3
  541. package/src/core/notebook/replica/resources/executions.ts +157 -0
  542. package/src/core/notebook/replica/resources/results.ts +48 -0
  543. package/src/core/notebook/replica/resources/runtime.ts +14 -0
  544. package/src/core/packages/__tests__/useSandboxController.test.tsx +1 -1
  545. package/src/core/packages/useSandboxController.ts +1 -1
  546. package/src/core/run-app.tsx +48 -51
  547. package/src/core/runtime/__tests__/adapter.test.ts +1 -1
  548. package/src/core/runtime/__tests__/createWsUrl.test.ts +77 -7
  549. package/src/core/runtime/__tests__/runtime.test.ts +32 -74
  550. package/src/core/runtime/adapter.ts +1 -1
  551. package/src/core/runtime/config.ts +2 -2
  552. package/src/core/runtime/runtime.ts +33 -46
  553. package/src/core/runtime/types.ts +0 -2
  554. package/src/core/saving/__tests__/document.test.tsx +123 -0
  555. package/src/core/saving/__tests__/state.test.ts +111 -0
  556. package/src/core/saving/__tests__/useAutoSave.test.tsx +67 -0
  557. package/src/core/saving/document.ts +33 -0
  558. package/src/core/saving/filename.ts +1 -1
  559. package/src/core/saving/save-component.tsx +39 -60
  560. package/src/core/saving/state.ts +38 -39
  561. package/src/core/saving/useAutoSave.ts +17 -53
  562. package/src/core/session/__tests__/backend.test.ts +236 -0
  563. package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +184 -0
  564. package/src/core/{websocket → session}/__tests__/useNotebookSession.hook.test.tsx +213 -262
  565. package/src/core/session/active-notebook.ts +28 -0
  566. package/src/core/session/backend.ts +123 -0
  567. package/src/core/session/embedded.ts +7 -0
  568. package/src/core/{websocket → session}/types.ts +2 -2
  569. package/src/core/session/useNotebookReplica.ts +74 -0
  570. package/src/core/{websocket → session}/useNotebookSession.tsx +77 -64
  571. package/src/core/state/__tests__/jotai.test.tsx +108 -0
  572. package/src/core/state/jotai.ts +1 -1
  573. package/src/core/static/__tests__/files.test.ts +38 -10
  574. package/src/core/static/files.ts +2 -0
  575. package/src/core/{websocket → transports}/__tests__/connection-state.test.ts +1 -13
  576. package/src/core/transports/__tests__/server.test.ts +408 -0
  577. package/src/core/transports/__tests__/static.test.ts +306 -0
  578. package/src/core/transports/__tests__/wasm.test.ts +166 -0
  579. package/src/core/{websocket → transports}/connection-state.ts +9 -16
  580. package/src/core/transports/server.ts +152 -0
  581. package/src/core/transports/static.ts +166 -0
  582. package/src/core/transports/wasm.ts +97 -0
  583. package/src/core/vscode/__tests__/vscode-bindings.test.ts +125 -0
  584. package/src/core/vscode/vscode-bindings.ts +14 -2
  585. package/src/core/wasm/__tests__/bridge.test.ts +105 -65
  586. package/src/core/wasm/__tests__/worker.test.ts +187 -0
  587. package/src/core/wasm/bridge.ts +69 -72
  588. package/src/core/wasm/rpc.ts +15 -3
  589. package/src/core/wasm/store.ts +3 -3
  590. package/src/core/wasm/worker/bootstrap.ts +55 -51
  591. package/src/core/wasm/worker/getMarimoWheel.ts +1 -1
  592. package/src/core/wasm/worker/save-worker.ts +9 -10
  593. package/src/core/wasm/worker/types.ts +29 -18
  594. package/src/core/wasm/worker/worker.ts +89 -45
  595. package/src/css/app/codemirror.css +1 -1
  596. package/src/css/common.css +1 -1
  597. package/src/css/globals.css +66 -22
  598. package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
  599. package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
  600. package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
  601. package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
  602. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
  603. package/src/hooks/__tests__/useScript.test.tsx +77 -0
  604. package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
  605. package/src/hooks/useAsyncData.ts +3 -3
  606. package/src/hooks/useDataSourceDiscovery.ts +6 -4
  607. package/src/hooks/useDebounce.ts +6 -10
  608. package/src/hooks/useDeepCompareMemoize.ts +1 -1
  609. package/src/hooks/useDelayElapsed.ts +14 -10
  610. package/src/hooks/useElapsedTime.ts +3 -3
  611. package/src/hooks/useEventListener.ts +1 -2
  612. package/src/hooks/useInputHistory.ts +4 -7
  613. package/src/hooks/useInternalStateWithSync.ts +6 -6
  614. package/src/hooks/useResizeObserver.ts +4 -7
  615. package/src/hooks/useScript.ts +67 -70
  616. package/src/hooks/useStateForKey.ts +93 -0
  617. package/src/mount.tsx +20 -15
  618. package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
  619. package/src/plugins/core/registerReactComponent.tsx +1 -1
  620. package/src/plugins/impl/CodeEditorPlugin.tsx +1 -1
  621. package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
  622. package/src/plugins/impl/DataTablePlugin.tsx +69 -37
  623. package/src/plugins/impl/DropdownPlugin.tsx +2 -6
  624. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
  625. package/src/plugins/impl/FormPlugin.tsx +1 -1
  626. package/src/plugins/impl/RangeSliderPlugin.tsx +16 -2
  627. package/src/plugins/impl/RefreshPlugin.tsx +1 -0
  628. package/src/plugins/impl/SliderPlugin.tsx +6 -8
  629. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +387 -1
  630. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
  631. package/src/plugins/impl/__tests__/RangeSliderPlugin.test.tsx +109 -0
  632. package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
  633. package/src/plugins/impl/anywidget/__tests__/registry.test.ts +153 -0
  634. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
  635. package/src/plugins/impl/anywidget/model.ts +3 -1
  636. package/src/plugins/impl/anywidget/registry.ts +18 -14
  637. package/src/plugins/impl/anywidget/runtime.ts +21 -9
  638. package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
  639. package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
  640. package/src/plugins/impl/chat/chat-ui.tsx +14 -11
  641. package/src/plugins/impl/code/any-language-editor.tsx +2 -2
  642. package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
  643. package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
  644. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +1 -1
  645. package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
  646. package/src/plugins/impl/data-explorer/state/reducer.ts +1 -1
  647. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
  648. package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
  649. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +66 -66
  650. package/src/plugins/impl/data-frames/panel.tsx +44 -16
  651. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
  652. package/src/plugins/impl/panel/PanelPlugin.tsx +16 -17
  653. package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
  654. package/src/plugins/impl/panel/utils.ts +17 -0
  655. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
  656. package/src/plugins/impl/plotly/selection.ts +25 -19
  657. package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
  658. package/src/plugins/impl/vega/make-selectable.ts +4 -7
  659. package/src/plugins/layout/DownloadPlugin.tsx +7 -11
  660. package/src/plugins/layout/RoutesPlugin.tsx +1 -1
  661. package/src/plugins/layout/__test__/DownloadPlugin.test.tsx +205 -0
  662. package/src/stories/__tests__/editor-story.test.tsx +33 -0
  663. package/src/stories/button.stories.tsx +1 -0
  664. package/src/stories/cell.stories.tsx +2 -5
  665. package/src/stories/data-table.stories.tsx +31 -0
  666. package/src/stories/editor.stories.tsx +24 -17
  667. package/src/stories/form-wrapper.stories.tsx +2 -2
  668. package/src/stories/layout/vertical/one-column.stories.tsx +28 -23
  669. package/src/stories/runtime-story.tsx +23 -17
  670. package/src/stories/select.stories.tsx +2 -2
  671. package/src/stories/switchable-multi-select.stories.tsx +1 -1
  672. package/src/utils/__tests__/arrays.test.ts +35 -0
  673. package/src/utils/__tests__/batch-requests.test.ts +3 -3
  674. package/src/utils/__tests__/{createReducer.test.ts → createReducer.test.tsx} +29 -0
  675. package/src/utils/__tests__/download.test.tsx +183 -23
  676. package/src/utils/__tests__/numbers.test.ts +105 -1
  677. package/src/utils/__tests__/objects.test.ts +21 -0
  678. package/src/utils/arrays.ts +11 -2
  679. package/src/utils/blob.ts +1 -1
  680. package/src/utils/createReducer.ts +53 -26
  681. package/src/utils/download.ts +67 -6
  682. package/src/utils/maps.ts +0 -3
  683. package/src/utils/numbers.ts +79 -18
  684. package/src/utils/objects.ts +4 -9
  685. package/src/utils/tracer.ts +9 -5
  686. package/src/utils/zod-utils.ts +1 -3
  687. package/dist/_baseMerge-BiGRwuqv.js +0 -165
  688. package/dist/any-language-editor-D4q-IFcM.js +0 -76
  689. package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
  690. package/dist/assets/worker-HPY9fbhz.js +0 -114
  691. package/dist/code-visibility-HTfE7PV1.js +0 -138
  692. package/dist/dropdown-menu-DHP9P4VE.js +0 -4678
  693. package/dist/feedback-button-BL7Ed1J3.js +0 -379
  694. package/dist/hasIn-o2Us0uVx.js +0 -132
  695. package/dist/html-to-image-BdA59IUD.js +0 -3251
  696. package/dist/isArrayLikeObject-BZl-15ir.js +0 -450
  697. package/dist/isEmpty-BSZ1LaUo.js +0 -35
  698. package/dist/isSymbol-kQcfYbNX.js +0 -8
  699. package/dist/label-DoysmLMW.js +0 -281
  700. package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
  701. package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +0 -23
  702. package/dist/pick-CJeoxYOS.js +0 -51
  703. package/dist/precisionRound-DMIVQrt2.js +0 -97
  704. package/dist/select-DemoKT4G.js +0 -1344
  705. package/dist/toDate-B5mIgxwZ.js +0 -1185
  706. package/dist/toast-PkdZraM8.js +0 -1830
  707. package/dist/use-restore-focus-CKjfFjLM.js +0 -6369
  708. package/dist/useLifecycle-BGWzTwHK.js +0 -169
  709. package/dist/useTheme-BhQvec43.js +0 -904
  710. package/src/components/editor/cell/code/__tests__/rtc-editor-config.test.ts +0 -50
  711. package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +0 -65
  712. package/src/components/editor/navigation/__tests__/state.test.ts +0 -81
  713. package/src/components/editor/navigation/state.ts +0 -65
  714. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +0 -656
  715. package/src/core/ai/tools/run-cells-tool.ts +0 -303
  716. package/src/core/attachments/state.ts +0 -18
  717. package/src/core/cells/__tests__/apply-transaction.test.ts +0 -991
  718. package/src/core/cells/__tests__/document-changes.test.ts +0 -1140
  719. package/src/core/cells/__tests__/document-roundtrip.test.ts +0 -392
  720. package/src/core/cells/document-changes.ts +0 -944
  721. package/src/core/codemirror/rtc/extension.ts +0 -453
  722. package/src/core/codemirror/rtc/loro/__tests__/sync.test.ts +0 -52
  723. package/src/core/codemirror/rtc/loro/awareness.ts +0 -531
  724. package/src/core/codemirror/rtc/loro/colors.ts +0 -38
  725. package/src/core/codemirror/rtc/loro/sync.ts +0 -168
  726. package/src/core/host/AGENTS.md +0 -11
  727. package/src/core/host/__tests__/events.test.ts +0 -46
  728. package/src/core/host/__tests__/fixtures.ts +0 -39
  729. package/src/core/host/__tests__/notebook-client.test.ts +0 -433
  730. package/src/core/host/__tests__/protocol.test.ts +0 -214
  731. package/src/core/host/__tests__/stream.test.ts +0 -209
  732. package/src/core/host/connection.ts +0 -81
  733. package/src/core/host/events.ts +0 -61
  734. package/src/core/host/notebook-client.ts +0 -290
  735. package/src/core/host/protocol.ts +0 -1943
  736. package/src/core/host/resources/resource.ts +0 -47
  737. package/src/core/host/stream.ts +0 -211
  738. package/src/core/rtc/state.ts +0 -34
  739. package/src/core/state/__tests__/jotai.test.ts +0 -25
  740. package/src/core/wasm/worker/message-buffer.ts +0 -33
  741. package/src/core/websocket/__tests__/createConnectionTransport.test.ts +0 -49
  742. package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -170
  743. package/src/core/websocket/state.ts +0 -7
  744. package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
  745. package/src/core/websocket/transports/__tests__/sse.test.ts +0 -335
  746. package/src/core/websocket/transports/__tests__/transport.test.ts +0 -308
  747. package/src/core/websocket/transports/__tests__/ws.test.ts +0 -125
  748. package/src/core/websocket/transports/basic.ts +0 -102
  749. package/src/core/websocket/transports/create.ts +0 -31
  750. package/src/core/websocket/transports/sse.ts +0 -308
  751. package/src/core/websocket/transports/transport.ts +0 -50
  752. package/src/core/websocket/transports/ws.ts +0 -98
  753. package/src/core/websocket/useNotebookClient.ts +0 -88
  754. package/src/utils/__tests__/id-tree.test.ts +0 -2145
  755. package/src/utils/id-tree.tsx +0 -1134
  756. /package/src/{core/attachments/toast.ts → components/editor/agent-toast.ts} +0 -0
  757. /package/src/core/{websocket → session}/connection-utils.ts +0 -0
@@ -0,0 +1,4747 @@
1
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
2
+ function e(e) {
3
+ let t = Object.values(e).filter((e) => typeof e == "number");
4
+ return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
5
+ }
6
+ function t(e, t = "|") {
7
+ return e.map((e) => se(e)).join(t);
8
+ }
9
+ function n(e, t) {
10
+ return typeof t == "bigint" ? t.toString() : t;
11
+ }
12
+ var r = class {
13
+ constructor(e) {
14
+ this._getter = e, this._value = void 0;
15
+ }
16
+ get value() {
17
+ let e = this._getter;
18
+ return e !== void 0 && (this._value = e(), this._getter = void 0), this._value;
19
+ }
20
+ };
21
+ function i(e) {
22
+ return new r(e);
23
+ }
24
+ function a(e) {
25
+ return e == null;
26
+ }
27
+ function o(e) {
28
+ let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
29
+ return e.slice(t, n);
30
+ }
31
+ function s(e, t) {
32
+ let n = e / t, r = Math.round(n), i = 4 * 2 ** -52 * Math.max(Math.abs(n), 1);
33
+ return Math.abs(n - r) < i ? 0 : n - r;
34
+ }
35
+ var c = /* @__PURE__*/ Symbol("evaluating");
36
+ function l(e, t, n) {
37
+ let r;
38
+ Object.defineProperty(e, t, {
39
+ get() {
40
+ if (r !== c) return r === void 0 && (r = c, r = n()), r;
41
+ },
42
+ set(n) {
43
+ Object.defineProperty(e, t, { value: n });
44
+ },
45
+ configurable: !0
46
+ });
47
+ }
48
+ function u(e, t, n) {
49
+ Object.defineProperty(e, t, {
50
+ value: n,
51
+ writable: !0,
52
+ enumerable: !0,
53
+ configurable: !0
54
+ });
55
+ }
56
+ function d(e) {
57
+ let t = Object.getOwnPropertyDescriptor(e, "shape");
58
+ return t?.get ? t.get.raw : t?.value;
59
+ }
60
+ function f(e) {
61
+ return d(e._zod.def) ?? e._zod.def.shape;
62
+ }
63
+ function p(e, t, n) {
64
+ Object.defineProperty(e, t, {
65
+ get() {
66
+ let e = n();
67
+ return u(this, t, e), e;
68
+ },
69
+ enumerable: !0,
70
+ configurable: !0
71
+ });
72
+ }
73
+ function m(e, t, n) {
74
+ t in e ? u(e, t, n) : e[t] = n;
75
+ }
76
+ function h(e, t, n, r) {
77
+ let i = f(t);
78
+ for (let a of n) {
79
+ let n = Object.getOwnPropertyDescriptor(i, a);
80
+ n.enumerable && (n.get ? p(e, a, () => {
81
+ let e = t._zod.def.shape[a];
82
+ return r ? r(e, a) : e;
83
+ }) : m(e, a, r ? r(n.value, a) : n.value));
84
+ }
85
+ }
86
+ function ee(e, t) {
87
+ for (let n of Reflect.ownKeys(t)) {
88
+ let r = Object.getOwnPropertyDescriptor(t, n);
89
+ r.enumerable && (r.get ? p(e, n, () => t[n]) : m(e, n, r.value));
90
+ }
91
+ }
92
+ function g(...e) {
93
+ let t = {};
94
+ for (let n of e) {
95
+ let e = Object.getOwnPropertyDescriptors(n);
96
+ Object.assign(t, e);
97
+ }
98
+ return Object.defineProperties({}, t);
99
+ }
100
+ function te(e) {
101
+ return JSON.stringify(e);
102
+ }
103
+ function ne(e) {
104
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
105
+ }
106
+ var re = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
107
+ function _(e) {
108
+ return typeof e == "object" && !!e && !Array.isArray(e);
109
+ }
110
+ var ie = /* @__PURE__*/ i(() => {
111
+ if (M.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
112
+ try {
113
+ return Function(""), !0;
114
+ } catch {
115
+ return !1;
116
+ }
117
+ });
118
+ function v(e) {
119
+ if (_(e) === !1) return !1;
120
+ let t = e.constructor;
121
+ if (t === void 0 || typeof t != "function") return !0;
122
+ let n = t.prototype;
123
+ return _(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
124
+ }
125
+ function ae(e) {
126
+ return v(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
127
+ }
128
+ var oe = /* @__PURE__*/ new Set([
129
+ "string",
130
+ "number",
131
+ "symbol"
132
+ ]);
133
+ function y(e) {
134
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
135
+ }
136
+ function b(e, t, n) {
137
+ let r = new e._zod.constr(t ?? e._zod.def);
138
+ return (!t || n?.parent) && (r._zod.parent = e), r;
139
+ }
140
+ function x(e) {
141
+ let t = e;
142
+ if (!t) return {};
143
+ if (typeof t == "string") return { error: () => t };
144
+ if (t?.message !== void 0) {
145
+ if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
146
+ t.error = t.message;
147
+ }
148
+ return delete t.message, typeof t.error == "string" ? {
149
+ ...t,
150
+ error: () => t.error
151
+ } : t;
152
+ }
153
+ function se(e) {
154
+ return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
155
+ }
156
+ function ce(e) {
157
+ return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
158
+ }
159
+ var le = {
160
+ safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
161
+ int32: [-2147483648, 2147483647],
162
+ uint32: [0, 4294967295],
163
+ float32: [-34028234663852886e22, 34028234663852886e22],
164
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
165
+ }, ue = {
166
+ int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
167
+ uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
168
+ };
169
+ function de(e, t) {
170
+ let n = e._zod.def, r = n.checks;
171
+ if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
172
+ let i = {};
173
+ return h(i, e, fe(e, t)), b(e, g(n, {
174
+ shape: i,
175
+ checks: []
176
+ }));
177
+ }
178
+ function fe(e, t) {
179
+ let n = f(e), r = [];
180
+ for (let e of Reflect.ownKeys(t)) {
181
+ if (!Object.getOwnPropertyDescriptor(n, e)?.enumerable) throw Error(`Unrecognized key: "${String(e)}"`);
182
+ t[e] && r.push(e);
183
+ }
184
+ return r;
185
+ }
186
+ function pe(e, t) {
187
+ let n = e._zod.def, r = n.checks;
188
+ if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
189
+ let i = new Set(fe(e, t)), a = {};
190
+ return h(a, e, Reflect.ownKeys(f(e)).filter((e) => !i.has(e))), b(e, g(n, {
191
+ shape: a,
192
+ checks: []
193
+ }));
194
+ }
195
+ function me(e, t) {
196
+ if (!v(t)) throw Error("Invalid input to extend: expected a plain object");
197
+ let n = e._zod.def.checks;
198
+ if (n && n.length > 0) {
199
+ let n = f(e);
200
+ for (let e of Reflect.ownKeys(t)) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
201
+ }
202
+ return b(e, g(e._zod.def, { shape: he(e, t) }));
203
+ }
204
+ function he(e, t) {
205
+ let n = {};
206
+ return h(n, e, Reflect.ownKeys(f(e))), ee(n, t), n;
207
+ }
208
+ function ge(e, t) {
209
+ if (!v(t)) throw Error("Invalid input to safeExtend: expected a plain object");
210
+ return b(e, g(e._zod.def, { shape: he(e, t) }));
211
+ }
212
+ function _e(e, t) {
213
+ if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
214
+ if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
215
+ let n = {};
216
+ return h(n, e, Reflect.ownKeys(f(e))), h(n, t, Reflect.ownKeys(f(t))), b(e, g(e._zod.def, {
217
+ shape: n,
218
+ get catchall() {
219
+ return t._zod.def.catchall;
220
+ },
221
+ checks: t._zod.def.checks ?? []
222
+ }));
223
+ }
224
+ function ve(e, t, n, r = "partial") {
225
+ let i = t._zod.def.checks;
226
+ if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
227
+ let a = n ? new Set(fe(t, n)) : void 0, o = {};
228
+ return h(o, t, Reflect.ownKeys(f(t)), e && ((t, n) => a && !a.has(n) ? t : new e({
229
+ type: "optional",
230
+ innerType: t
231
+ }))), b(t, g(t._zod.def, {
232
+ shape: o,
233
+ checks: []
234
+ }));
235
+ }
236
+ function ye(e, t, n) {
237
+ let r = n ? new Set(fe(t, n)) : void 0, i = {};
238
+ return h(i, t, Reflect.ownKeys(f(t)), (t, n) => r && !r.has(n) ? t : new e({
239
+ type: "nonoptional",
240
+ innerType: t
241
+ })), b(t, g(t._zod.def, { shape: i }));
242
+ }
243
+ function S(e, t = 0) {
244
+ if (e.aborted === !0) return !0;
245
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
246
+ return !1;
247
+ }
248
+ function be(e, t = 0) {
249
+ if (e.aborted === !0) return !0;
250
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
251
+ return !1;
252
+ }
253
+ function C(e, t) {
254
+ return t.map((t) => {
255
+ var n;
256
+ return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
257
+ });
258
+ }
259
+ function w(e) {
260
+ return typeof e == "string" ? e : e?.message;
261
+ }
262
+ function xe(e, t, n) {
263
+ var r;
264
+ for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
265
+ }
266
+ function T(e, t, n) {
267
+ var r;
268
+ let i = e.inst?._zod?.traits;
269
+ i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
270
+ let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : w(e.inst?._zod.def?.error?.(e)) ?? w(a?.(e)) ?? w(t?.error?.(e)) ?? w(n.customError?.(e)) ?? w(n.localeError?.(e)) ?? "Invalid input", s = {};
271
+ for (let t of Object.keys(e)) t !== "inst" && t !== "schema" && t !== "continue" && t !== "input" && t !== "__proto__" && (s[t] = e[t]);
272
+ return s.path ??= [], s.message = o, t?.reportInput && (s.input = e.input), s;
273
+ }
274
+ var Se = /[\uD800-\uDBFF]/;
275
+ function Ce(e) {
276
+ let t = e.length;
277
+ if (!Se.test(e)) return t;
278
+ let n = t;
279
+ for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
280
+ return n;
281
+ }
282
+ function we(e) {
283
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
284
+ }
285
+ function Te(e) {
286
+ let t = typeof e;
287
+ switch (t) {
288
+ case "number": return Number.isNaN(e) ? "nan" : "number";
289
+ case "object": {
290
+ if (e === null) return "null";
291
+ if (Array.isArray(e)) return "array";
292
+ let t = e;
293
+ if (t && Object.getPrototypeOf(t) !== Object.prototype && "constructor" in t && t.constructor) return t.constructor.name;
294
+ }
295
+ }
296
+ return t;
297
+ }
298
+ function E(...e) {
299
+ let [t, n, r] = e;
300
+ return typeof t == "string" ? {
301
+ message: t,
302
+ code: "custom",
303
+ input: n,
304
+ inst: r
305
+ } : { ...t };
306
+ }
307
+ function Ee(e, t) {
308
+ for (let n in t) {
309
+ let r = Object.getOwnPropertyDescriptor(t, n);
310
+ r.get ? Object.defineProperty(e, n, {
311
+ ...r,
312
+ enumerable: !1
313
+ }) : ke(e, n, r.value);
314
+ }
315
+ }
316
+ function D(e, t, n, r = !0) {
317
+ return Object.defineProperty(e, t, {
318
+ configurable: !0,
319
+ writable: !0,
320
+ enumerable: r,
321
+ value: n
322
+ }), n;
323
+ }
324
+ function De(e, t, n) {
325
+ return D(e, t, n, !1);
326
+ }
327
+ function Oe(e, t) {
328
+ for (let n in e) {
329
+ let r = e[n];
330
+ Object.defineProperty(t, n, {
331
+ configurable: !0,
332
+ enumerable: !0,
333
+ get() {
334
+ return D(this, n, r(this));
335
+ },
336
+ set(e) {
337
+ D(this, n, e);
338
+ }
339
+ });
340
+ }
341
+ return t;
342
+ }
343
+ function ke(e, t, n) {
344
+ Object.defineProperty(e, t, {
345
+ configurable: !0,
346
+ get() {
347
+ return this == null ? n : D(this, t, n.bind(this));
348
+ },
349
+ set(e) {
350
+ D(this, t, e);
351
+ }
352
+ });
353
+ }
354
+ function Ae(e, t) {
355
+ let n = Object.getPrototypeOf(e);
356
+ return t in n ? void 0 : n;
357
+ }
358
+ var je, O = !1, Me = {
359
+ configurable: !0,
360
+ get() {
361
+ O = !0;
362
+ }
363
+ };
364
+ function k(e, t, n) {
365
+ let r = Object.getPrototypeOf(e._zod);
366
+ if (t in r && je !== e._zod) {
367
+ je = void 0;
368
+ return;
369
+ }
370
+ je = e._zod, Object.defineProperty(r, t, {
371
+ configurable: !0,
372
+ get() {
373
+ Object.defineProperty(this, t, Me);
374
+ let e = O;
375
+ O = !1;
376
+ try {
377
+ let r = n(this);
378
+ return O ? delete this[t] : Object.defineProperty(this, t, {
379
+ configurable: !0,
380
+ writable: !0,
381
+ value: r
382
+ }), O ||= e, r;
383
+ } catch (n) {
384
+ throw delete this[t], O ||= e, n;
385
+ }
386
+ },
387
+ set(e) {
388
+ Object.defineProperty(this, t, {
389
+ configurable: !0,
390
+ writable: !0,
391
+ value: e
392
+ });
393
+ }
394
+ });
395
+ }
396
+ function Ne(e, t, n, r) {
397
+ let i = Ae(e, t);
398
+ i && Object.defineProperty(i, t, {
399
+ configurable: !0,
400
+ get() {
401
+ let e = {
402
+ configurable: !0,
403
+ writable: !0,
404
+ enumerable: r,
405
+ value: void 0
406
+ };
407
+ return Object.defineProperty(this, t, e), e.value = n(this), Object.defineProperty(this, t, e), e.value;
408
+ },
409
+ set(e) {
410
+ Object.defineProperty(this, t, {
411
+ configurable: !0,
412
+ writable: !0,
413
+ enumerable: r,
414
+ value: e
415
+ });
416
+ }
417
+ });
418
+ }
419
+ var Pe = "~constantCatch";
420
+ function Fe(e) {
421
+ let t = () => e;
422
+ return t[Pe] = !0, t;
423
+ }
424
+ //#endregion
425
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
426
+ var Ie, Le = {
427
+ value: void 0,
428
+ enumerable: !1
429
+ }, Re = "captureStackTrace" in Error ? Error : null;
430
+ function ze(e) {
431
+ let t = Re;
432
+ if (t) {
433
+ let n = t.stackTraceLimit;
434
+ if (typeof n == "number") {
435
+ try {
436
+ t.stackTraceLimit = 0;
437
+ } catch {
438
+ return Re = null, new e();
439
+ }
440
+ try {
441
+ return new e();
442
+ } finally {
443
+ t.stackTraceLimit = n;
444
+ }
445
+ }
446
+ }
447
+ return new e();
448
+ }
449
+ function A(e, t, n, r) {
450
+ let i = {};
451
+ function a(e) {
452
+ this.def = e, this.constr = d, this.traits = /* @__PURE__ */ new Set();
453
+ }
454
+ a.prototype = i;
455
+ let o = n, s = o && /* @__PURE__ */ new WeakSet();
456
+ function c(n, r) {
457
+ if (!n._zod) {
458
+ Le.value = new a(r);
459
+ try {
460
+ Object.defineProperty(n, "_zod", Le);
461
+ } finally {
462
+ Le.value = void 0;
463
+ }
464
+ } else if (n._zod.traits.has(e)) return;
465
+ if (n._zod.traits.add(e), t(n, r), s) {
466
+ let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
467
+ for (; r && r !== t;) r = Object.getPrototypeOf(r);
468
+ let i = r ?? e;
469
+ s.has(i) || (s.add(i), Ee(i, o));
470
+ }
471
+ let i = d.prototype;
472
+ for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
473
+ }
474
+ let l = r?.Parent ?? Object;
475
+ class u extends l {}
476
+ Object.defineProperty(u, "name", { value: e });
477
+ function d(e) {
478
+ let t = r?.Parent ? ze(u) : this;
479
+ c(t, e);
480
+ let n = t._zod.deferred;
481
+ if (n) {
482
+ for (let e of n) e();
483
+ t._zod.deferred = void 0;
484
+ }
485
+ let i = globalThis.__zod_globalConfig?.postProcessor;
486
+ return i && i(t), t;
487
+ }
488
+ return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
489
+ }
490
+ var j = class extends Error {
491
+ constructor() {
492
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
493
+ }
494
+ }, Be = class extends Error {
495
+ constructor(e) {
496
+ super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
497
+ }
498
+ };
499
+ (Ie = globalThis).__zod_globalConfig ?? (Ie.__zod_globalConfig = {});
500
+ var M = globalThis.__zod_globalConfig;
501
+ function N(e) {
502
+ return e && Object.assign(M, e), M;
503
+ }
504
+ //#endregion
505
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
506
+ function Ve() {
507
+ let e = this._zod;
508
+ return e.message ??= JSON.stringify(e.def, n, 2), e.message;
509
+ }
510
+ function He(e) {
511
+ this._zod.message = e;
512
+ }
513
+ var Ue = {
514
+ get: Ve,
515
+ set: He,
516
+ enumerable: !0,
517
+ configurable: !0
518
+ }, We = {
519
+ value: void 0,
520
+ enumerable: !1
521
+ }, Ge = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), Ke = (e, t) => {
522
+ e.name = "$ZodError", We.value = t, Object.defineProperty(e, "issues", We), We.value = void 0, Object.defineProperty(e, "message", Ue);
523
+ let n = Object.getPrototypeOf(e);
524
+ Ge.has(n) || (Ge.add(n), Object.defineProperty(n, "toString", {
525
+ configurable: !0,
526
+ enumerable: !1,
527
+ get() {
528
+ let e = () => this.message;
529
+ return Object.defineProperty(this, "toString", {
530
+ value: e,
531
+ configurable: !0,
532
+ writable: !0
533
+ }), e;
534
+ },
535
+ set(e) {
536
+ Object.defineProperty(this, "toString", {
537
+ value: e,
538
+ configurable: !0,
539
+ writable: !0
540
+ });
541
+ }
542
+ }));
543
+ }, qe = A("$ZodError", Ke);
544
+ A("$ZodError", Ke, void 0, { Parent: Error });
545
+ function Je(e, t, n) {
546
+ return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
547
+ value: n(),
548
+ writable: !0,
549
+ enumerable: !0,
550
+ configurable: !0
551
+ }) : e[t] = n()), e[t];
552
+ }
553
+ function Ye(e, t = (e) => e.message) {
554
+ let n = {}, r = [];
555
+ for (let i of e.issues) i.path.length > 0 ? Je(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
556
+ return {
557
+ formErrors: r,
558
+ fieldErrors: n
559
+ };
560
+ }
561
+ function Xe(e, t = (e) => e.message) {
562
+ let n = { _errors: [] }, r = (e, i = []) => {
563
+ for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
564
+ else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
565
+ else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
566
+ else {
567
+ let e = [...i, ...a.path];
568
+ if (e.length === 0) n._errors.push(t(a));
569
+ else {
570
+ let r = n, i = 0;
571
+ for (; i < e.length;) {
572
+ let n = e[i], o = i === e.length - 1;
573
+ if (n === "_errors") {
574
+ o && r._errors.push(t(a)), i++;
575
+ continue;
576
+ }
577
+ Object.prototype.hasOwnProperty.call(r, n) || Object.defineProperty(r, n, {
578
+ value: { _errors: [] },
579
+ enumerable: !0,
580
+ writable: !0,
581
+ configurable: !0
582
+ });
583
+ let s = r[n];
584
+ o && s._errors.push(t(a)), r = s, i++;
585
+ }
586
+ }
587
+ }
588
+ };
589
+ return r(e), n;
590
+ }
591
+ function Ze(e) {
592
+ let t = [], n = e.map((e) => typeof e == "object" ? e.key : e);
593
+ for (let e of n) typeof e == "number" ? t.push(`[${e}]`) : typeof e == "symbol" ? t.push(`[${JSON.stringify(String(e))}]`) : /[^\w$]/.test(e) ? t.push(`[${JSON.stringify(e)}]`) : (t.length && t.push("."), t.push(e));
594
+ return t.join("");
595
+ }
596
+ function Qe(e) {
597
+ let t = [], n = [...e.issues].sort((e, t) => (e.path ?? []).length - (t.path ?? []).length);
598
+ for (let e of n) t.push(`✖ ${e.message}`), e.path?.length && t.push(` → at ${Ze(e.path)}`);
599
+ return t.join("\n");
600
+ }
601
+ //#endregion
602
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
603
+ function $e(e, t) {
604
+ return {
605
+ callee: t?.callee ?? e,
606
+ Err: t?.Err
607
+ };
608
+ }
609
+ var et = (e) => {
610
+ let t = (n, r, i, a) => {
611
+ let o = i ? {
612
+ ...i,
613
+ async: !1
614
+ } : { async: !1 }, s = n._zod.run({
615
+ value: r,
616
+ issues: []
617
+ }, o);
618
+ if (s instanceof Promise) throw new j();
619
+ if (s.issues.length) {
620
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => T(e, o, N())));
621
+ throw re(n, a?.callee ?? t), n;
622
+ }
623
+ return s.value;
624
+ };
625
+ return t;
626
+ }, tt = (e) => {
627
+ let t = async (n, r, i, a) => {
628
+ let o = i ? {
629
+ ...i,
630
+ async: !0
631
+ } : { async: !0 }, s = n._zod.run({
632
+ value: r,
633
+ issues: []
634
+ }, o);
635
+ if (s instanceof Promise && (s = await s), s.issues.length) {
636
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => T(e, o, N())));
637
+ throw re(n, a?.callee ?? t), n;
638
+ }
639
+ return s.value;
640
+ };
641
+ return t;
642
+ }, nt = (e) => (t, n, r) => {
643
+ let i = r ? {
644
+ ...r,
645
+ async: !1
646
+ } : { async: !1 }, a = t._zod.run({
647
+ value: n,
648
+ issues: []
649
+ }, i);
650
+ if (a instanceof Promise) throw new j();
651
+ return a.issues.length ? rt(e, a.issues, i) : {
652
+ success: !0,
653
+ data: a.value
654
+ };
655
+ };
656
+ function rt(e, t, n) {
657
+ let r;
658
+ return {
659
+ success: !1,
660
+ get error() {
661
+ return r || (r = new e(t.map((e) => T(e, n, N()))), t = void 0, n = void 0), r;
662
+ },
663
+ set error(e) {
664
+ r = e, t = void 0, n = void 0;
665
+ }
666
+ };
667
+ }
668
+ var it = (e) => async (t, n, r) => {
669
+ let i = r ? {
670
+ ...r,
671
+ async: !0
672
+ } : { async: !0 }, a = t._zod.run({
673
+ value: n,
674
+ issues: []
675
+ }, i);
676
+ return a instanceof Promise && (a = await a), a.issues.length ? rt(e, a.issues, i) : {
677
+ success: !0,
678
+ data: a.value
679
+ };
680
+ }, at = /* @__PURE__ */ Symbol.for("zod.compile.invalid"), ot = /* @__PURE__ */ Symbol.for("zod.compile.fallback"), st = ((e, t, n) => {
681
+ let r = e._zod.bag.validator;
682
+ if (r !== void 0) {
683
+ if (r(t) !== at) return !0;
684
+ if (r.definite === !0 && n === void 0) return !1;
685
+ }
686
+ return ct(e, t, n);
687
+ });
688
+ function ct(e, t, n) {
689
+ let r = n ? {
690
+ ...n,
691
+ async: !1,
692
+ abortEarly: !0
693
+ } : {
694
+ async: !1,
695
+ abortEarly: !0
696
+ }, i = e._zod.bag.fallbackRun, a;
697
+ if (i ? (r[ot] = !0, a = i({
698
+ value: t,
699
+ issues: []
700
+ }, r)) : a = e._zod.run({
701
+ value: t,
702
+ issues: []
703
+ }, r), a instanceof Promise) throw new j();
704
+ return a.issues.length === 0;
705
+ }
706
+ var lt = async (e, t, n) => {
707
+ let r = n ? {
708
+ ...n,
709
+ async: !0,
710
+ abortEarly: !0
711
+ } : {
712
+ async: !0,
713
+ abortEarly: !0
714
+ }, i = e._zod.run({
715
+ value: t,
716
+ issues: []
717
+ }, r);
718
+ return i instanceof Promise && (i = await i), i.issues.length === 0;
719
+ }, ut = (e) => {
720
+ let t = et(e), n = (e, r, i, a) => {
721
+ let o = i ? {
722
+ ...i,
723
+ direction: "backward"
724
+ } : { direction: "backward" };
725
+ return t(e, r, o, $e(n, a));
726
+ };
727
+ return n;
728
+ }, dt = (e) => {
729
+ let t = et(e), n = (e, r, i, a) => t(e, r, i, $e(n, a));
730
+ return n;
731
+ }, ft = (e) => {
732
+ let t = tt(e), n = async (e, r, i, a) => {
733
+ let o = i ? {
734
+ ...i,
735
+ direction: "backward"
736
+ } : { direction: "backward" };
737
+ return await t(e, r, o, $e(n, a));
738
+ };
739
+ return n;
740
+ }, pt = (e) => {
741
+ let t = tt(e), n = async (e, r, i, a) => await t(e, r, i, $e(n, a));
742
+ return n;
743
+ }, mt = (e) => (t, n, r) => {
744
+ let i = r ? {
745
+ ...r,
746
+ direction: "backward"
747
+ } : { direction: "backward" };
748
+ return nt(e)(t, n, i);
749
+ }, ht = (e) => (t, n, r) => nt(e)(t, n, r), gt = (e) => async (t, n, r) => {
750
+ let i = r ? {
751
+ ...r,
752
+ direction: "backward"
753
+ } : { direction: "backward" };
754
+ return it(e)(t, n, i);
755
+ }, _t = (e) => async (t, n, r) => it(e)(t, n, r), vt = /^[cC][0-9a-z]{6,}$/, yt = /^[0-9a-z]+$/, bt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, xt = /^[0-9a-vA-V]{20}$/, St = /^[A-Za-z0-9]{27}$/, Ct = /^[a-zA-Z0-9_-]{21}$/;
756
+ function wt(e) {
757
+ return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
758
+ }
759
+ var Tt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Et = /^([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})$/, Dt = (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)$/, Ot = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, kt = "^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
760
+ function At() {
761
+ return new RegExp(kt, "u");
762
+ }
763
+ var jt = /^(?:(?: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])$/, Mt = /^(([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}|:))$/, Nt = /^((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])$/, Pt = /^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ft = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, It = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/, Lt = /^https?$/, Rt = /^\+[1-9]\d{6,14}$/, zt = "(?:(?:\\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])))";
764
+ function Bt(e) {
765
+ return RegExp(`^${e}$`);
766
+ }
767
+ var Vt = /*@__PURE__*/ Bt(zt);
768
+ function Ht(e) {
769
+ let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
770
+ return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
771
+ }
772
+ function Ut(e) {
773
+ return RegExp(`^${Ht(e)}$`);
774
+ }
775
+ function Wt(e) {
776
+ let t = ["Z"];
777
+ e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
778
+ let n = `${Ht({
779
+ precision: e.precision,
780
+ seconds: !0
781
+ })}(?:${t.join("|")})`, r = e.local ? `${n}|${Ht({ precision: e.precision })}` : n;
782
+ return RegExp(`^${zt}T(?:${r})$`);
783
+ }
784
+ var Gt = /^[\s\S]{0,}$/, Kt = /^-?\d+$/, qt = /^-?\d+(?:\.\d+)?$/, Jt = /^(?:true|false)$/i, Yt = /^null$/i, Xt = /^[^A-Z]*$/, Zt = /^[^a-z]*$/, P = /*@__PURE__*/ A("$ZodCheck", (e, t) => {
785
+ var n;
786
+ e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
787
+ }), Qt = (e) => {
788
+ let t = e.value;
789
+ return !a(t) && t.length !== void 0;
790
+ }, $t = {
791
+ number: "number",
792
+ bigint: "bigint",
793
+ object: "date"
794
+ }, en = /*@__PURE__*/ A("$ZodCheckLessThan", (e, t) => {
795
+ P.init(e, t);
796
+ let n = $t[typeof t.value];
797
+ e._zod.check = (r) => {
798
+ (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
799
+ origin: $t[typeof r.value] ?? n,
800
+ code: "too_big",
801
+ maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
802
+ input: r.value,
803
+ inclusive: t.inclusive,
804
+ inst: e,
805
+ continue: !t.abort
806
+ });
807
+ };
808
+ }), tn = /*@__PURE__*/ A("$ZodCheckGreaterThan", (e, t) => {
809
+ P.init(e, t);
810
+ let n = $t[typeof t.value];
811
+ e._zod.check = (r) => {
812
+ (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
813
+ origin: $t[typeof r.value] ?? n,
814
+ code: "too_small",
815
+ minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
816
+ input: r.value,
817
+ inclusive: t.inclusive,
818
+ inst: e,
819
+ continue: !t.abort
820
+ });
821
+ };
822
+ }), nn = /*@__PURE__*/ A("$ZodCheckMultipleOf", (e, t) => {
823
+ P.init(e, t), e._zod.check = (n) => {
824
+ if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
825
+ (typeof n.value == "bigint" ? t.value !== BigInt(0) && n.value % t.value === BigInt(0) : s(n.value, t.value) === 0) || n.issues.push({
826
+ origin: typeof n.value,
827
+ code: "not_multiple_of",
828
+ divisor: t.value,
829
+ input: n.value,
830
+ inst: e,
831
+ continue: !t.abort
832
+ });
833
+ };
834
+ }), rn = /*@__PURE__*/ A("$ZodCheckNumberFormat", (e, t) => {
835
+ P.init(e, t), t.format = t.format || "float64";
836
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = le[t.format];
837
+ e._zod.check = (o) => {
838
+ let s = o.value;
839
+ if (n) {
840
+ if (!Number.isInteger(s)) {
841
+ o.issues.push({
842
+ expected: r,
843
+ format: t.format,
844
+ code: "invalid_type",
845
+ continue: !1,
846
+ input: s,
847
+ inst: e
848
+ });
849
+ return;
850
+ }
851
+ if (!Number.isSafeInteger(s)) {
852
+ s > 0 ? o.issues.push({
853
+ input: s,
854
+ code: "too_big",
855
+ maximum: 2 ** 53 - 1,
856
+ note: "Integers must be within the safe integer range.",
857
+ inst: e,
858
+ origin: r,
859
+ inclusive: !0,
860
+ continue: !t.abort
861
+ }) : o.issues.push({
862
+ input: s,
863
+ code: "too_small",
864
+ minimum: -(2 ** 53 - 1),
865
+ note: "Integers must be within the safe integer range.",
866
+ inst: e,
867
+ origin: r,
868
+ inclusive: !0,
869
+ continue: !t.abort
870
+ });
871
+ return;
872
+ }
873
+ }
874
+ s < i && o.issues.push({
875
+ origin: "number",
876
+ input: s,
877
+ code: "too_small",
878
+ minimum: i,
879
+ inclusive: !0,
880
+ inst: e,
881
+ continue: !t.abort
882
+ }), s > a && o.issues.push({
883
+ origin: "number",
884
+ input: s,
885
+ code: "too_big",
886
+ maximum: a,
887
+ inclusive: !0,
888
+ inst: e,
889
+ continue: !t.abort
890
+ });
891
+ };
892
+ }), an = /*@__PURE__*/ A("$ZodCheckMaxLength", (e, t) => {
893
+ var n;
894
+ P.init(e, t), (n = e._zod.def).when ?? (n.when = Qt), e._zod.check = (n) => {
895
+ let r = n.value, i = r.length;
896
+ if ((typeof r == "string" && i > t.maximum ? Ce(r) : i) <= t.maximum) return;
897
+ let a = we(r);
898
+ n.issues.push({
899
+ origin: a,
900
+ code: "too_big",
901
+ maximum: t.maximum,
902
+ inclusive: !0,
903
+ input: r,
904
+ inst: e,
905
+ continue: !t.abort
906
+ });
907
+ };
908
+ }), on = /*@__PURE__*/ A("$ZodCheckMinLength", (e, t) => {
909
+ var n;
910
+ P.init(e, t), (n = e._zod.def).when ?? (n.when = Qt), e._zod.check = (n) => {
911
+ let r = n.value, i = r.length;
912
+ if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? Ce(r) : i) >= t.minimum) return;
913
+ let a = we(r);
914
+ n.issues.push({
915
+ origin: a,
916
+ code: "too_small",
917
+ minimum: t.minimum,
918
+ inclusive: !0,
919
+ input: r,
920
+ inst: e,
921
+ continue: !t.abort
922
+ });
923
+ };
924
+ }), sn = /*@__PURE__*/ A("$ZodCheckLengthEquals", (e, t) => {
925
+ var n;
926
+ P.init(e, t), (n = e._zod.def).when ?? (n.when = Qt), e._zod.check = (n) => {
927
+ let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? Ce(r) : i;
928
+ if (a === t.length) return;
929
+ let o = we(r), s = a > t.length;
930
+ n.issues.push({
931
+ origin: o,
932
+ ...s ? {
933
+ code: "too_big",
934
+ maximum: t.length
935
+ } : {
936
+ code: "too_small",
937
+ minimum: t.length
938
+ },
939
+ inclusive: !0,
940
+ exact: !0,
941
+ input: n.value,
942
+ inst: e,
943
+ continue: !t.abort
944
+ });
945
+ };
946
+ }), cn = /*@__PURE__*/ A("$ZodCheckStringFormat", (e, t) => {
947
+ var n, r;
948
+ P.init(e, t), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
949
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
950
+ origin: "string",
951
+ code: "invalid_format",
952
+ format: t.format,
953
+ input: n.value,
954
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
955
+ inst: e,
956
+ continue: !t.abort
957
+ });
958
+ }) : (r = e._zod).check ?? (r.check = () => {});
959
+ }), ln = /*@__PURE__*/ A("$ZodCheckRegex", (e, t) => {
960
+ cn.init(e, t), e._zod.check = (n) => {
961
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
962
+ origin: "string",
963
+ code: "invalid_format",
964
+ format: "regex",
965
+ input: n.value,
966
+ pattern: t.pattern.toString(),
967
+ inst: e,
968
+ continue: !t.abort
969
+ });
970
+ };
971
+ }), un = /*@__PURE__*/ A("$ZodCheckLowerCase", (e, t) => {
972
+ t.pattern ??= Xt, cn.init(e, t);
973
+ }), dn = /*@__PURE__*/ A("$ZodCheckUpperCase", (e, t) => {
974
+ t.pattern ??= Zt, cn.init(e, t);
975
+ }), fn = /*@__PURE__*/ A("$ZodCheckIncludes", (e, t) => {
976
+ P.init(e, t);
977
+ let n = y(t.includes);
978
+ t.pattern = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n), e._zod.check = (n) => {
979
+ n.value.includes(t.includes, t.position) || n.issues.push({
980
+ origin: "string",
981
+ code: "invalid_format",
982
+ format: "includes",
983
+ includes: t.includes,
984
+ input: n.value,
985
+ inst: e,
986
+ continue: !t.abort
987
+ });
988
+ };
989
+ }), pn = /*@__PURE__*/ A("$ZodCheckStartsWith", (e, t) => {
990
+ P.init(e, t);
991
+ let n = RegExp(`^${y(t.prefix)}.*`);
992
+ t.pattern ??= n, e._zod.check = (n) => {
993
+ n.value.startsWith(t.prefix) || n.issues.push({
994
+ origin: "string",
995
+ code: "invalid_format",
996
+ format: "starts_with",
997
+ prefix: t.prefix,
998
+ input: n.value,
999
+ inst: e,
1000
+ continue: !t.abort
1001
+ });
1002
+ };
1003
+ }), mn = /*@__PURE__*/ A("$ZodCheckEndsWith", (e, t) => {
1004
+ P.init(e, t);
1005
+ let n = RegExp(`.*${y(t.suffix)}$`);
1006
+ t.pattern ??= n, e._zod.check = (n) => {
1007
+ n.value.endsWith(t.suffix) || n.issues.push({
1008
+ origin: "string",
1009
+ code: "invalid_format",
1010
+ format: "ends_with",
1011
+ suffix: t.suffix,
1012
+ input: n.value,
1013
+ inst: e,
1014
+ continue: !t.abort
1015
+ });
1016
+ };
1017
+ });
1018
+ function hn(e, t, n) {
1019
+ e.issues.length && t.issues.push(...C(n, e.issues));
1020
+ }
1021
+ var gn = /*@__PURE__*/ A("$ZodCheckProperties", (e, t) => {
1022
+ P.init(e, t), De(e, Symbol.iterator, function* () {
1023
+ yield e;
1024
+ });
1025
+ let n;
1026
+ e._zod.check = (r) => {
1027
+ if (r.value == null) {
1028
+ r.issues.push({
1029
+ expected: "object",
1030
+ code: "invalid_type",
1031
+ input: r.value,
1032
+ inst: e
1033
+ });
1034
+ return;
1035
+ }
1036
+ n ??= Reflect.ownKeys(t.shape).map((e) => [e, t.shape[e]]);
1037
+ let i = r.value, a;
1038
+ for (let [e, t] of n) {
1039
+ let n = t._zod.run({
1040
+ value: i[e],
1041
+ issues: []
1042
+ }, {});
1043
+ n instanceof Promise ? (a ??= [], a.push(n.then((t) => hn(t, r, e)))) : hn(n, r, e);
1044
+ }
1045
+ if (a) return Promise.all(a).then(() => void 0);
1046
+ };
1047
+ }), _n = /*@__PURE__*/ A("$ZodCheckOverwrite", (e, t) => {
1048
+ P.init(e, t), e._zod.check = (e) => {
1049
+ e.value = t.tx(e.value);
1050
+ };
1051
+ }), vn = class {
1052
+ constructor(e = [], t = {}) {
1053
+ this.content = [], this.indent = 0, this.args = e, this.closed = t;
1054
+ }
1055
+ indented(e) {
1056
+ this.indent += 1;
1057
+ try {
1058
+ e(this);
1059
+ } finally {
1060
+ --this.indent;
1061
+ }
1062
+ }
1063
+ write(e) {
1064
+ if (typeof e == "function") {
1065
+ e(this, { execution: "sync" }), e(this, { execution: "async" });
1066
+ return;
1067
+ }
1068
+ let t = e.split("\n").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);
1069
+ for (let e of r) this.content.push(e);
1070
+ }
1071
+ compile() {
1072
+ let e = Function, t = this?.content ?? [""];
1073
+ return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
1074
+ }
1075
+ }, yn = {
1076
+ major: 4,
1077
+ minor: 6,
1078
+ patch: 5
1079
+ }, F = /*@__PURE__*/ A("$ZodType", (e, t) => {
1080
+ var n;
1081
+ e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = yn;
1082
+ let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
1083
+ for (let t of i) for (let n of t._zod.onattach) n(e);
1084
+ if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
1085
+ e._zod.run = e._zod.parse;
1086
+ });
1087
+ else {
1088
+ let t = (t, n, r) => {
1089
+ if (t.memo) return t;
1090
+ let i = S(t), a;
1091
+ for (let o of n) {
1092
+ if (o._zod.def.when) {
1093
+ if (be(t) || !o._zod.def.when(t)) continue;
1094
+ } else if (i) continue;
1095
+ let n = t.issues.length, s = o._zod.check(t);
1096
+ if (s instanceof Promise && r?.async === !1) throw new j();
1097
+ if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
1098
+ await s, t.issues.length !== n && (xe(t.issues, n, e), i ||= S(t, n));
1099
+ });
1100
+ else {
1101
+ if (t.issues.length === n) continue;
1102
+ xe(t.issues, n, e), i ||= S(t, n);
1103
+ }
1104
+ }
1105
+ return a ? a.then(() => t) : t;
1106
+ }, n = (n, r, a) => {
1107
+ if (S(n)) return n.aborted = !0, n;
1108
+ let o = t(r, i, a);
1109
+ if (o instanceof Promise) {
1110
+ if (a.async === !1) throw new j();
1111
+ return o.then((t) => e._zod.parse(t, a));
1112
+ }
1113
+ return e._zod.parse(o, a);
1114
+ };
1115
+ e._zod.run = (r, a) => {
1116
+ if (a.skipChecks) return e._zod.parse(r, a);
1117
+ if (a.direction === "backward") {
1118
+ let t = e._zod.parse({
1119
+ value: r.value,
1120
+ issues: []
1121
+ }, {
1122
+ ...a,
1123
+ skipChecks: !0
1124
+ });
1125
+ return t instanceof Promise ? t.then((e) => n(e, r, a)) : n(t, r, a);
1126
+ }
1127
+ let o = e._zod.parse(r, a);
1128
+ if (o instanceof Promise) {
1129
+ if (a.async === !1) throw new j();
1130
+ return o.then((e) => t(e, i, a));
1131
+ }
1132
+ return t(o, i, a);
1133
+ };
1134
+ }
1135
+ }, {
1136
+ get "~standard"() {
1137
+ return De(this, "~standard", Sn(this));
1138
+ },
1139
+ set "~standard"(e) {
1140
+ D(this, "~standard", e);
1141
+ }
1142
+ }), bn = (e, t) => e.issues.length ? { issues: e.issues.map((e) => T(e, t, N())) } : { value: e.value };
1143
+ async function xn(e, t) {
1144
+ let n = { async: !0 };
1145
+ return bn(await e._zod.run({
1146
+ value: t,
1147
+ issues: []
1148
+ }, n), n);
1149
+ }
1150
+ function Sn(e) {
1151
+ return {
1152
+ validate: (t) => {
1153
+ let n = { async: !1 };
1154
+ try {
1155
+ let r = e._zod.run({
1156
+ value: t,
1157
+ issues: []
1158
+ }, n);
1159
+ if (!(r instanceof Promise)) return bn(r, n);
1160
+ } catch {}
1161
+ return xn(e, t);
1162
+ },
1163
+ vendor: "zod",
1164
+ version: 1
1165
+ };
1166
+ }
1167
+ var Cn = /*@__PURE__*/ A("$ZodString", (e, t) => {
1168
+ F.init(e, t), e._zod.pattern = t.pattern ?? Gt, e._zod.parse = (n, r) => {
1169
+ if (t.coerce) try {
1170
+ n.value = String(n.value);
1171
+ } catch {}
1172
+ return typeof n.value == "string" || n.issues.push({
1173
+ expected: "string",
1174
+ code: "invalid_type",
1175
+ input: n.value,
1176
+ inst: e
1177
+ }), n;
1178
+ };
1179
+ }), I = /*@__PURE__*/ A("$ZodStringFormat", (e, t) => {
1180
+ cn.init(e, t), Cn.init(e, t);
1181
+ }), wn = /*@__PURE__*/ A("$ZodGUID", (e, t) => {
1182
+ t.pattern ??= Et, I.init(e, t);
1183
+ }), Tn = /*@__PURE__*/ A("$ZodUUID", (e, t) => {
1184
+ if (t.version) {
1185
+ let e = {
1186
+ v1: 1,
1187
+ v2: 2,
1188
+ v3: 3,
1189
+ v4: 4,
1190
+ v5: 5,
1191
+ v6: 6,
1192
+ v7: 7,
1193
+ v8: 8
1194
+ }[t.version];
1195
+ if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
1196
+ t.pattern ??= Dt(e);
1197
+ } else t.pattern ??= Dt();
1198
+ I.init(e, t);
1199
+ }), En = /*@__PURE__*/ A("$ZodEmail", (e, t) => {
1200
+ t.pattern ??= Ot, I.init(e, t);
1201
+ });
1202
+ function Dn(e) {
1203
+ try {
1204
+ return typeof URL < "u" && typeof URL.canParse == "function" ? URL.canParse(e) : (new URL(e), !0);
1205
+ } catch {
1206
+ return !1;
1207
+ }
1208
+ }
1209
+ function On(e, t) {
1210
+ return !("normalize" in t) && !("hostname" in t) && !("protocol" in t) ? Dn(e) || 2 : kn(e, t);
1211
+ }
1212
+ function kn(e, t) {
1213
+ if (!t.normalize && t.protocol?.source === Lt.source && !/^https?:\/\//i.test(e)) return 1;
1214
+ try {
1215
+ if (typeof URL < "u") {
1216
+ let t = URL;
1217
+ if (typeof t.parse == "function") return t.parse(e) ?? 2;
1218
+ }
1219
+ return new URL(e);
1220
+ } catch {
1221
+ return 2;
1222
+ }
1223
+ }
1224
+ var An = /[\t\n\r]/g;
1225
+ function jn(e) {
1226
+ return e.replace(An, "");
1227
+ }
1228
+ function Mn(e, t) {
1229
+ return t.lastIndex = 0, t.test(e.hostname);
1230
+ }
1231
+ function Nn(e, t) {
1232
+ return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
1233
+ }
1234
+ var Pn = /*@__PURE__*/ A("$ZodURL", (e, t) => {
1235
+ I.init(e, t), e._zod.check = (n) => {
1236
+ try {
1237
+ let r = n.value.trim(), i = On(r, t);
1238
+ if (i === 1) {
1239
+ n.issues.push({
1240
+ code: "invalid_format",
1241
+ format: "url",
1242
+ note: "Invalid URL format",
1243
+ input: n.value,
1244
+ inst: e,
1245
+ continue: !t.abort
1246
+ });
1247
+ return;
1248
+ }
1249
+ if (i === 2) {
1250
+ n.issues.push({
1251
+ code: "invalid_format",
1252
+ format: "url",
1253
+ input: n.value,
1254
+ inst: e,
1255
+ continue: !t.abort
1256
+ });
1257
+ return;
1258
+ }
1259
+ if (i === !0) {
1260
+ n.value = jn(r);
1261
+ return;
1262
+ }
1263
+ t.hostname && !Mn(i, t.hostname) && n.issues.push({
1264
+ code: "invalid_format",
1265
+ format: "url",
1266
+ note: "Invalid hostname",
1267
+ pattern: t.hostname.source,
1268
+ input: n.value,
1269
+ inst: e,
1270
+ continue: !t.abort
1271
+ }), t.protocol && !Nn(i, t.protocol) && n.issues.push({
1272
+ code: "invalid_format",
1273
+ format: "url",
1274
+ note: "Invalid protocol",
1275
+ pattern: t.protocol.source,
1276
+ input: n.value,
1277
+ inst: e,
1278
+ continue: !t.abort
1279
+ }), n.value = t.normalize ? i.href : jn(r);
1280
+ return;
1281
+ } catch {
1282
+ n.issues.push({
1283
+ code: "invalid_format",
1284
+ format: "url",
1285
+ input: n.value,
1286
+ inst: e,
1287
+ continue: !t.abort
1288
+ });
1289
+ }
1290
+ };
1291
+ }), Fn = /*@__PURE__*/ A("$ZodEmoji", (e, t) => {
1292
+ t.pattern ??= At(), I.init(e, t);
1293
+ }), In = /*@__PURE__*/ A("$ZodNanoID", (e, t) => {
1294
+ if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
1295
+ t.pattern ??= t.length === void 0 ? Ct : wt(t.length), I.init(e, t);
1296
+ }), Ln = /*@__PURE__*/ A("$ZodCUID", (e, t) => {
1297
+ t.pattern ??= vt, I.init(e, t);
1298
+ }), Rn = /*@__PURE__*/ A("$ZodCUID2", (e, t) => {
1299
+ t.pattern ??= yt, I.init(e, t);
1300
+ }), zn = /*@__PURE__*/ A("$ZodULID", (e, t) => {
1301
+ t.pattern ??= bt, I.init(e, t);
1302
+ }), Bn = /*@__PURE__*/ A("$ZodXID", (e, t) => {
1303
+ t.pattern ??= xt, I.init(e, t);
1304
+ }), Vn = /*@__PURE__*/ A("$ZodKSUID", (e, t) => {
1305
+ t.pattern ??= St, I.init(e, t);
1306
+ }), Hn = /*@__PURE__*/ A("$ZodISODateTime", (e, t) => {
1307
+ t.pattern ??= Wt(t), I.init(e, t);
1308
+ }), Un = /*@__PURE__*/ A("$ZodISODate", (e, t) => {
1309
+ t.pattern ??= Vt, I.init(e, t);
1310
+ }), Wn = /*@__PURE__*/ A("$ZodISOTime", (e, t) => {
1311
+ t.pattern ??= Ut(t), I.init(e, t);
1312
+ }), Gn = /*@__PURE__*/ A("$ZodISODuration", (e, t) => {
1313
+ t.pattern ??= Tt, I.init(e, t);
1314
+ }), Kn = /*@__PURE__*/ A("$ZodIPv4", (e, t) => {
1315
+ t.pattern ??= jt, I.init(e, t);
1316
+ }), qn = /^[0-9a-fA-F:.]+$/;
1317
+ function Jn(e) {
1318
+ return qn.test(e) ? Dn(`http://[${e}]`) : !1;
1319
+ }
1320
+ var Yn = /*@__PURE__*/ A("$ZodIPv6", (e, t) => {
1321
+ t.pattern ??= Mt, I.init(e, t), e._zod.check = (n) => {
1322
+ Jn(n.value) || n.issues.push({
1323
+ code: "invalid_format",
1324
+ format: "ipv6",
1325
+ input: n.value,
1326
+ inst: e,
1327
+ continue: !t.abort
1328
+ });
1329
+ };
1330
+ }), Xn = /*@__PURE__*/ A("$ZodCIDRv4", (e, t) => {
1331
+ t.pattern ??= Nt, I.init(e, t);
1332
+ });
1333
+ function Zn(e) {
1334
+ let t = e.split("/");
1335
+ if (t.length !== 2) return !1;
1336
+ let [n, r] = t;
1337
+ if (!r) return !1;
1338
+ let i = Number(r);
1339
+ return `${i}` !== r || i < 0 || i > 128 ? !1 : Jn(n);
1340
+ }
1341
+ var Qn = /*@__PURE__*/ A("$ZodCIDRv6", (e, t) => {
1342
+ t.pattern ??= Pt, I.init(e, t), e._zod.check = (n) => {
1343
+ Zn(n.value) || n.issues.push({
1344
+ code: "invalid_format",
1345
+ format: "cidrv6",
1346
+ input: n.value,
1347
+ inst: e,
1348
+ continue: !t.abort
1349
+ });
1350
+ };
1351
+ });
1352
+ function $n(e) {
1353
+ if (e === "") return !0;
1354
+ if (/\s/.test(e) || e.length % 4 != 0) return !1;
1355
+ try {
1356
+ return atob(e), !0;
1357
+ } catch {
1358
+ return !1;
1359
+ }
1360
+ }
1361
+ var er = /^[0-9a-zA-Z+/]*={0,2}$/, tr = /*@__PURE__*/ A("$ZodBase64", (e, t) => {
1362
+ t.pattern ??= er, I.init(e, t), e._zod.check = (n) => {
1363
+ $n(n.value) || n.issues.push({
1364
+ code: "invalid_format",
1365
+ format: "base64",
1366
+ input: n.value,
1367
+ inst: e,
1368
+ continue: !t.abort
1369
+ });
1370
+ };
1371
+ }), nr = /^[A-Za-z0-9_-]*$/;
1372
+ function rr(e) {
1373
+ if (!nr.test(e)) return !1;
1374
+ let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
1375
+ return $n(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
1376
+ }
1377
+ var ir = /*@__PURE__*/ A("$ZodBase64URL", (e, t) => {
1378
+ t.pattern ??= nr, I.init(e, t), e._zod.check = (n) => {
1379
+ rr(n.value) || n.issues.push({
1380
+ code: "invalid_format",
1381
+ format: "base64url",
1382
+ input: n.value,
1383
+ inst: e,
1384
+ continue: !t.abort
1385
+ });
1386
+ };
1387
+ }), ar = /*@__PURE__*/ A("$ZodE164", (e, t) => {
1388
+ t.pattern ??= Rt, I.init(e, t);
1389
+ });
1390
+ function or(e, t = null) {
1391
+ try {
1392
+ let n = e.split(".");
1393
+ if (n.length !== 3) return !1;
1394
+ let [r] = n;
1395
+ if (!r) return !1;
1396
+ let i = JSON.parse(atob(r));
1397
+ return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
1398
+ } catch {
1399
+ return !1;
1400
+ }
1401
+ }
1402
+ var sr = /*@__PURE__*/ A("$ZodJWT", (e, t) => {
1403
+ I.init(e, t), e._zod.check = (n) => {
1404
+ or(n.value, t.alg) || n.issues.push({
1405
+ code: "invalid_format",
1406
+ format: "jwt",
1407
+ input: n.value,
1408
+ inst: e,
1409
+ continue: !t.abort
1410
+ });
1411
+ };
1412
+ }), cr = /*@__PURE__*/ A("$ZodNumber", (e, t) => {
1413
+ F.init(e, t), e._zod.pattern = qt, e._zod.parse = (n, r) => {
1414
+ if (t.coerce) try {
1415
+ n.value = Number(n.value);
1416
+ } catch {}
1417
+ let i = n.value;
1418
+ if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
1419
+ let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : String(i) : void 0;
1420
+ return n.issues.push({
1421
+ expected: "number",
1422
+ code: "invalid_type",
1423
+ input: i,
1424
+ inst: e,
1425
+ ...a ? { received: a } : {}
1426
+ }), n;
1427
+ };
1428
+ }), lr = /*@__PURE__*/ A("$ZodNumberFormat", (e, t) => {
1429
+ rn.init(e, t), cr.init(e, t);
1430
+ }), ur = /*@__PURE__*/ A("$ZodBoolean", (e, t) => {
1431
+ F.init(e, t), e._zod.pattern = Jt, e._zod.parse = (n, r) => {
1432
+ if (t.coerce) try {
1433
+ n.value = !!n.value;
1434
+ } catch {}
1435
+ let i = n.value;
1436
+ return typeof i == "boolean" || n.issues.push({
1437
+ expected: "boolean",
1438
+ code: "invalid_type",
1439
+ input: i,
1440
+ inst: e
1441
+ }), n;
1442
+ };
1443
+ }), dr = /*@__PURE__*/ A("$ZodNull", (e, t) => {
1444
+ F.init(e, t), e._zod.pattern = Yt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
1445
+ let r = t.value;
1446
+ return r === null || t.issues.push({
1447
+ expected: "null",
1448
+ code: "invalid_type",
1449
+ input: r,
1450
+ inst: e
1451
+ }), t;
1452
+ };
1453
+ }), fr = /*@__PURE__*/ A("$ZodAny", (e, t) => {
1454
+ F.init(e, t), e._zod.parse = (e) => e;
1455
+ }), pr = /*@__PURE__*/ A("$ZodUnknown", (e, t) => {
1456
+ F.init(e, t), e._zod.parse = (e) => e;
1457
+ }), mr = /*@__PURE__*/ A("$ZodNever", (e, t) => {
1458
+ F.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1459
+ expected: "never",
1460
+ code: "invalid_type",
1461
+ input: t.value,
1462
+ inst: e
1463
+ }), t);
1464
+ }), hr = /*@__PURE__*/ A("$ZodDate", (e, t) => {
1465
+ F.init(e, t), e._zod.parse = (n, r) => {
1466
+ if (t.coerce) try {
1467
+ n.value = new Date(n.value);
1468
+ } catch {}
1469
+ let i = n.value, a = i instanceof Date;
1470
+ return a && !Number.isNaN(i.getTime()) || n.issues.push({
1471
+ expected: "date",
1472
+ code: "invalid_type",
1473
+ input: i,
1474
+ ...a ? { received: "Invalid Date" } : {},
1475
+ inst: e
1476
+ }), n;
1477
+ };
1478
+ });
1479
+ function gr(e, t, n) {
1480
+ e.issues.length && t.issues.push(...C(n, e.issues)), t.value[n] = e.value;
1481
+ }
1482
+ var _r = /*@__PURE__*/ A("$ZodArray", (e, t) => {
1483
+ F.init(e, t);
1484
+ let n = M.memoizer;
1485
+ n?.attach(e), e._zod.parse = (r, i) => {
1486
+ let a = r.value;
1487
+ if (!Array.isArray(a)) return r.issues.push({
1488
+ expected: "array",
1489
+ code: "invalid_type",
1490
+ input: a,
1491
+ inst: e
1492
+ }), r;
1493
+ r.value = n ? n.alloc(e, r, Array(a.length), i) : Array(a.length);
1494
+ let o = [], s = i?.abortEarly;
1495
+ for (let e = 0; e < a.length; e++) {
1496
+ let n = a[e], c = t.element._zod.run({
1497
+ value: n,
1498
+ issues: []
1499
+ }, i);
1500
+ if (c instanceof Promise) o.push(c.then((t) => gr(t, r, e)));
1501
+ else if (gr(c, r, e), s && c.issues.length !== 0 && S(c)) break;
1502
+ }
1503
+ return o.length ? Promise.all(o).then(() => r) : r;
1504
+ };
1505
+ });
1506
+ function vr(e, t, n, r, i, a) {
1507
+ let o = n in r, s = a === "optional";
1508
+ if (!(!o && s && i === "optional")) {
1509
+ if (e.issues.length) {
1510
+ if (i !== void 0 && s && !o) return;
1511
+ t.issues.push(...C(n, e.issues));
1512
+ }
1513
+ if (!o && i === void 0) {
1514
+ e.issues.length || t.issues.push({
1515
+ code: "invalid_type",
1516
+ expected: "nonoptional",
1517
+ input: void 0,
1518
+ path: [n]
1519
+ });
1520
+ return;
1521
+ }
1522
+ e.value === void 0 ? (o || i === "defaulted" && !s) && (t.value[n] = void 0) : t.value[n] = e.value;
1523
+ }
1524
+ }
1525
+ var yr = [];
1526
+ function br(e) {
1527
+ let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : yr, i = r.length ? [...t, ...r] : t;
1528
+ for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
1529
+ let a = ce(e.shape);
1530
+ return {
1531
+ ...e,
1532
+ allKeys: i,
1533
+ symbolKeys: r,
1534
+ keySet: new Set(t),
1535
+ numKeys: t.length,
1536
+ optionalKeys: new Set(a)
1537
+ };
1538
+ }
1539
+ function xr(e, t, n, r, i, a, o) {
1540
+ let s = [], c = i.keySet, l = i.catchall._zod, u = l.def.type, d = l.optin, f = l.optout, p = 0;
1541
+ for (let i in t) {
1542
+ if (o && n.issues.length !== p) {
1543
+ if (S(n, p)) break;
1544
+ p = n.issues.length;
1545
+ }
1546
+ if (c.has(i)) continue;
1547
+ if (i === "__proto__") {
1548
+ u === "never" && s.push(i);
1549
+ continue;
1550
+ }
1551
+ if (u === "never") {
1552
+ s.push(i);
1553
+ continue;
1554
+ }
1555
+ let a = l.run({
1556
+ value: t[i],
1557
+ issues: []
1558
+ }, r);
1559
+ a instanceof Promise ? e.push(a.then((e) => vr(e, n, i, t, d, f))) : vr(a, n, i, t, d, f);
1560
+ }
1561
+ return s.length && n.issues.push({
1562
+ code: "unrecognized_keys",
1563
+ keys: s,
1564
+ input: t,
1565
+ inst: a,
1566
+ continue: !0
1567
+ }), e.length ? Promise.all(e).then(() => n) : n;
1568
+ }
1569
+ var Sr = /*@__PURE__*/ A("$ZodObject", (e, t) => {
1570
+ F.init(e, t);
1571
+ let n = Object.getOwnPropertyDescriptor(t, "shape"), r = n?.get ? n.get.raw : t.shape ?? {};
1572
+ if (r) {
1573
+ let e = () => {
1574
+ let n = { ...r };
1575
+ return Object.defineProperty(t, "shape", { value: n }), e.raw = n, n;
1576
+ };
1577
+ e.raw = r, Object.defineProperty(t, "shape", { get: e });
1578
+ }
1579
+ let a = i(() => br(t));
1580
+ k(e, "propValues", (e) => {
1581
+ let t = e.def.shape, n = {};
1582
+ for (let e in t) {
1583
+ let r = t[e]._zod;
1584
+ if (r.values) {
1585
+ Object.prototype.hasOwnProperty.call(n, e) || u(n, e, /* @__PURE__ */ new Set());
1586
+ for (let t of r.values) n[e].add(t);
1587
+ r.optin !== void 0 && n[e].add(void 0);
1588
+ }
1589
+ }
1590
+ return n;
1591
+ });
1592
+ let o = _, s = t.catchall, c, l = M.memoizer;
1593
+ l?.attach(e), e._zod.parse = (t, n) => {
1594
+ c ??= a.value;
1595
+ let r = t.value;
1596
+ if (!o(r)) return t.issues.push({
1597
+ expected: "object",
1598
+ code: "invalid_type",
1599
+ input: r,
1600
+ inst: e
1601
+ }), t;
1602
+ t.value = l ? l.alloc(e, t, {}, n) : {};
1603
+ let i = [], u = c.shape, d = n?.abortEarly, f = t.issues.length;
1604
+ for (let e of c.allKeys) {
1605
+ if (d && t.issues.length !== f) {
1606
+ if (S(t, f)) break;
1607
+ f = t.issues.length;
1608
+ }
1609
+ if (e === "__proto__") continue;
1610
+ let a = u[e], o = a._zod.optin, s = a._zod.optout, c = a._zod.run({
1611
+ value: r[e],
1612
+ issues: []
1613
+ }, n);
1614
+ c instanceof Promise ? i.push(c.then((n) => vr(n, t, e, r, o, s))) : vr(c, t, e, r, o, s);
1615
+ }
1616
+ return s ? xr(i, r, t, n, a.value, e, d === !0) : i.length ? Promise.all(i).then(() => t) : t;
1617
+ };
1618
+ }), Cr = /*@__PURE__*/ A("$ZodObjectJIT", (e, t) => {
1619
+ Sr.init(e, t);
1620
+ let n = e._zod.parse, r = i(() => br(t)), a = M.memoizer, o = (t) => {
1621
+ let n = r.value, i = n.symbolKeys, o = new vn(["payload", "ctx"], {
1622
+ shape: t,
1623
+ inst: e,
1624
+ memo: a,
1625
+ syms: i
1626
+ }), s = (e) => `shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`, c = (e, t) => `
1627
+ let ${e}_ab = false;
1628
+ for (let i = 0; i < ${e}.issues.length; i++) {
1629
+ const iss = ${e}.issues[i];
1630
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
1631
+ payload.issues.push(iss);
1632
+ if (iss.continue !== true) ${e}_ab = true;
1633
+ }
1634
+ if (${e}_ab && ctx && ctx.abortEarly) {
1635
+ payload.value = newResult;
1636
+ return payload;
1637
+ }`;
1638
+ o.write("const input = payload.value;");
1639
+ let l = Object.create(null), u = 0;
1640
+ for (let e of n.allKeys) l[e] = `key_${u++}`;
1641
+ o.write(a ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
1642
+ for (let e of n.allKeys) {
1643
+ if (e === "__proto__") continue;
1644
+ let n = l[e], r = typeof e == "symbol" ? `syms[${i.indexOf(e)}]` : te(e), a = `${r} in input`, u = t[e], d = u?._zod?.optin, f = d !== void 0, p = u?._zod?.optout === "optional";
1645
+ if (o.write(`const ${n} = ${s(r)};`), f && p) {
1646
+ let e = d === "optional" ? `${n}_present` : `${n}.value !== undefined || ${n}_present`;
1647
+ o.write(`
1648
+ const ${n}_present = ${a};
1649
+ if (!${n}.issues.length || ${n}_present) {
1650
+ if (${n}.issues.length) {${c(n, r)}
1651
+ }
1652
+
1653
+ if (${e}) {
1654
+ newResult[${r}] = ${n}.value;
1655
+ }
1656
+ }
1657
+
1658
+ `);
1659
+ } else f ? (o.write(`
1660
+ if (${n}.issues.length) {${c(n, r)}
1661
+ }
1662
+ `), d === "defaulted" ? o.write(`newResult[${r}] = ${n}.value;`) : o.write(`
1663
+ if (${n}.value !== undefined || ${a}) {
1664
+ newResult[${r}] = ${n}.value;
1665
+ }
1666
+ `)) : o.write(`
1667
+ const ${n}_present = ${a};
1668
+ if (${n}.issues.length) {${c(n, r)}
1669
+ }
1670
+ if (!${n}_present && !${n}.issues.length) {
1671
+ payload.issues.push({
1672
+ code: "invalid_type",
1673
+ expected: "nonoptional",
1674
+ input: undefined,
1675
+ path: [${r}]
1676
+ });
1677
+ if (ctx && ctx.abortEarly) {
1678
+ payload.value = newResult;
1679
+ return payload;
1680
+ }
1681
+ }
1682
+
1683
+ if (${n}_present) {
1684
+ newResult[${r}] = ${n}.value;
1685
+ }
1686
+
1687
+ `);
1688
+ }
1689
+ return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
1690
+ }, s, c = _, l = !M.jitless, u = l && ie.value, d = t.catchall, f;
1691
+ e._zod.parse = (i, a) => {
1692
+ f ??= r.value;
1693
+ let p = i.value;
1694
+ return c(p) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), d ? xr([], p, i, a, f, e, a?.abortEarly === !0) : i) : n(i, a) : (i.issues.push({
1695
+ expected: "object",
1696
+ code: "invalid_type",
1697
+ input: p,
1698
+ inst: e
1699
+ }), i);
1700
+ };
1701
+ });
1702
+ function wr(e, t, n, r) {
1703
+ for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1704
+ let i = e.filter((e) => !S(e));
1705
+ return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1706
+ code: "invalid_union",
1707
+ input: t.value,
1708
+ inst: n,
1709
+ errors: e.map((e) => e.issues.map((e) => T(e, r, N())))
1710
+ }), t);
1711
+ }
1712
+ var Tr = /*@__PURE__*/ A("$ZodUnion", (e, t) => {
1713
+ F.init(e, t), k(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), k(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), k(e, "values", (e) => {
1714
+ if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
1715
+ }), k(e, "pattern", (e) => {
1716
+ if (e.def.options.every((e) => e._zod.pattern)) {
1717
+ let t = e.def.options.map((e) => e._zod.pattern);
1718
+ return RegExp(`^(${t.map((e) => o(e.source)).join("|")})$`);
1719
+ }
1720
+ });
1721
+ let n = t.options.length === 1 ? t.options[0]._zod.run : null;
1722
+ e._zod.parse = (r, i) => {
1723
+ if (n) return n(r, i);
1724
+ let a = !1, o = [];
1725
+ for (let e of t.options) {
1726
+ let t = e._zod.run({
1727
+ value: r.value,
1728
+ issues: []
1729
+ }, i);
1730
+ if (t instanceof Promise) o.push(t), a = !0;
1731
+ else {
1732
+ if (t.issues.length === 0) return t;
1733
+ o.push(t);
1734
+ }
1735
+ }
1736
+ return a ? Promise.all(o).then((t) => wr(t, r, e, i)) : wr(o, r, e, i);
1737
+ };
1738
+ });
1739
+ function Er(e) {
1740
+ let t = /* @__PURE__ */ new Map();
1741
+ for (let n of e.options) {
1742
+ let r = n._zod.propValues?.[e.discriminator];
1743
+ if (!r || r.size === 0) throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);
1744
+ for (let e of r) if (t.has(e)) {
1745
+ if (e !== void 0) throw Error(`Duplicate discriminator value "${String(e)}"`);
1746
+ t.set(e, null);
1747
+ } else t.set(e, n);
1748
+ }
1749
+ return t;
1750
+ }
1751
+ var Dr = /*@__PURE__*/ A("$ZodDiscriminatedUnion", (e, t) => {
1752
+ t.inclusive = !1, Tr.init(e, t);
1753
+ let n = e._zod.parse;
1754
+ k(e, "propValues", (e) => {
1755
+ let t = {}, n = 0;
1756
+ for (let r of e.def.options) {
1757
+ let i = r._zod.propValues;
1758
+ if (!i || Object.keys(i).length === 0) throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);
1759
+ i[e.def.discriminator]?.has(void 0) && n++;
1760
+ for (let [e, n] of Object.entries(i)) {
1761
+ Object.prototype.hasOwnProperty.call(t, e) || u(t, e, /* @__PURE__ */ new Set());
1762
+ for (let r of n) t[e].add(r);
1763
+ }
1764
+ }
1765
+ return !e.def.unionFallback && n > 1 && t[e.def.discriminator]?.delete(void 0), t;
1766
+ }), t.options.forEach((e, n) => {
1767
+ let r = d(e._zod.def);
1768
+ if (r && !Object.prototype.hasOwnProperty.call(r, t.discriminator)) throw Error(`Invalid discriminated union option at index "${n}"`);
1769
+ });
1770
+ let r = i(() => Er(t));
1771
+ e._zod.parse = (i, a) => {
1772
+ let o = i.value;
1773
+ if (!_(o)) return i.issues.push({
1774
+ code: "invalid_type",
1775
+ expected: "object",
1776
+ input: o,
1777
+ inst: e
1778
+ }), i;
1779
+ let s = o?.[t.discriminator], c = r.value.get(s);
1780
+ return c && (s !== void 0 || a.direction !== "backward") ? c._zod.run(i, a) : t.unionFallback || a.direction === "backward" ? n(i, a) : (i.issues.push({
1781
+ code: "invalid_union",
1782
+ errors: [],
1783
+ note: "No matching discriminator",
1784
+ discriminator: t.discriminator,
1785
+ options: Array.from(r.value.keys()).filter((e) => r.value.get(e) !== null),
1786
+ input: o,
1787
+ path: [t.discriminator],
1788
+ inst: e
1789
+ }), i);
1790
+ };
1791
+ }), Or = /*@__PURE__*/ A("$ZodIntersection", (e, t) => {
1792
+ F.init(e, t), e._zod.parse = (e, n) => {
1793
+ let r = e.value, i = t.left._zod.run({
1794
+ value: r,
1795
+ issues: []
1796
+ }, n), a = t.right._zod.run({
1797
+ value: r,
1798
+ issues: []
1799
+ }, n);
1800
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Ar(e, t, n)) : Ar(e, i, a);
1801
+ };
1802
+ });
1803
+ function kr(e, t) {
1804
+ if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
1805
+ valid: !0,
1806
+ data: e
1807
+ };
1808
+ if (v(e) && v(t)) {
1809
+ let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1810
+ ...e,
1811
+ ...t
1812
+ };
1813
+ Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
1814
+ for (let n of r) {
1815
+ if (n === "__proto__") continue;
1816
+ let r = kr(e[n], t[n]);
1817
+ if (!r.valid) return {
1818
+ valid: !1,
1819
+ mergeErrorPath: [n, ...r.mergeErrorPath]
1820
+ };
1821
+ i[n] = r.data;
1822
+ }
1823
+ return {
1824
+ valid: !0,
1825
+ data: i
1826
+ };
1827
+ }
1828
+ if (Array.isArray(e) && Array.isArray(t)) {
1829
+ if (e.length !== t.length) return {
1830
+ valid: !1,
1831
+ mergeErrorPath: []
1832
+ };
1833
+ let n = [];
1834
+ for (let r = 0; r < e.length; r++) {
1835
+ let i = e[r], a = t[r], o = kr(i, a);
1836
+ if (!o.valid) return {
1837
+ valid: !1,
1838
+ mergeErrorPath: [r, ...o.mergeErrorPath]
1839
+ };
1840
+ n.push(o.data);
1841
+ }
1842
+ return {
1843
+ valid: !0,
1844
+ data: n
1845
+ };
1846
+ }
1847
+ return {
1848
+ valid: !1,
1849
+ mergeErrorPath: []
1850
+ };
1851
+ }
1852
+ function Ar(e, t, n) {
1853
+ let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
1854
+ let n;
1855
+ if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
1856
+ else if (e.code === "invalid_key" && e.origin === "record" && e.path?.length === 1) {
1857
+ let t = String(e.path[0]);
1858
+ a.has(t) || a.set(t, e), n = [t];
1859
+ } else return !1;
1860
+ for (let e of n) r.has(e) || r.set(e, {}), r.get(e)[t] = !0;
1861
+ return !0;
1862
+ };
1863
+ for (let n of t.issues) o(n, "l") || e.issues.push(n);
1864
+ for (let t of n.issues) o(t, "r") || e.issues.push(t);
1865
+ let s = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
1866
+ if (s.length) {
1867
+ let t = i ? s.filter((e) => i.keys.includes(e)) : [];
1868
+ t.length && e.issues.push({
1869
+ ...i,
1870
+ keys: t
1871
+ });
1872
+ for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
1873
+ }
1874
+ let c = kr(t.value, n.value);
1875
+ if (!c.valid) {
1876
+ if (S(e)) return e;
1877
+ throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
1878
+ }
1879
+ return e.value = c.data, e;
1880
+ }
1881
+ var jr = /*@__PURE__*/ A("$ZodTuple", (e, t) => {
1882
+ F.init(e, t);
1883
+ let n = t.items, r = M.memoizer;
1884
+ r?.attach(e), e._zod.parse = (i, a) => {
1885
+ let o = i.value;
1886
+ if (!Array.isArray(o)) return i.issues.push({
1887
+ input: o,
1888
+ inst: e,
1889
+ expected: "tuple",
1890
+ code: "invalid_type"
1891
+ }), i;
1892
+ i.value = r ? r.alloc(e, i, [], a) : [];
1893
+ let s = [], c = Mr(n, "optin"), l = Mr(n, "optout");
1894
+ if (!t.rest) {
1895
+ if (o.length < c) return i.issues.push({
1896
+ code: "too_small",
1897
+ minimum: c,
1898
+ inclusive: !0,
1899
+ input: o,
1900
+ inst: e,
1901
+ origin: "array"
1902
+ }), i;
1903
+ o.length > n.length && i.issues.push({
1904
+ code: "too_big",
1905
+ maximum: n.length,
1906
+ inclusive: !0,
1907
+ input: o,
1908
+ inst: e,
1909
+ origin: "array"
1910
+ });
1911
+ }
1912
+ let u = Array(n.length), d = t.rest ? a?.abortEarly : void 0, f = !1;
1913
+ for (let e = 0; e < n.length; e++) {
1914
+ let t = n[e]._zod.run({
1915
+ value: o[e],
1916
+ issues: []
1917
+ }, a);
1918
+ t instanceof Promise ? s.push(t.then((t) => {
1919
+ u[e] = t;
1920
+ })) : (u[e] = t, d && !f && t.issues.length && (f = S(t)));
1921
+ }
1922
+ if (t.rest && !f) {
1923
+ let e = n.length - 1, r = o.slice(n.length), c = i.issues.length;
1924
+ for (let n of r) {
1925
+ if (d && i.issues.length !== c) {
1926
+ if (S(i, c)) break;
1927
+ c = i.issues.length;
1928
+ }
1929
+ e++;
1930
+ let r = t.rest._zod.run({
1931
+ value: n,
1932
+ issues: []
1933
+ }, a);
1934
+ r instanceof Promise ? s.push(r.then((t) => Nr(t, i, e))) : Nr(r, i, e);
1935
+ }
1936
+ }
1937
+ return s.length ? Promise.all(s).then(() => Pr(u, i, n, o, l)) : Pr(u, i, n, o, l);
1938
+ };
1939
+ });
1940
+ function Mr(e, t) {
1941
+ for (let n = e.length - 1; n >= 0; n--) if (!(t === "optin" ? e[n]._zod.optin !== void 0 : e[n]._zod.optout === "optional")) return n + 1;
1942
+ return 0;
1943
+ }
1944
+ function Nr(e, t, n) {
1945
+ e.issues.length && t.issues.push(...C(n, e.issues)), t.value[n] = e.value;
1946
+ }
1947
+ function Pr(e, t, n, r, i) {
1948
+ for (let a = 0; a < n.length; a++) {
1949
+ let o = e[a], s = a < r.length;
1950
+ if (!s && a >= i && n[a]._zod.optin === "optional") {
1951
+ t.value.length = a;
1952
+ break;
1953
+ }
1954
+ if (o.issues.length) {
1955
+ if (!s && a >= i) {
1956
+ t.value.length = a;
1957
+ break;
1958
+ }
1959
+ t.issues.push(...C(a, o.issues));
1960
+ }
1961
+ t.value[a] = o.value;
1962
+ }
1963
+ for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
1964
+ return t;
1965
+ }
1966
+ var Fr = /*@__PURE__*/ A("$ZodRecord", (e, t) => {
1967
+ F.init(e, t);
1968
+ let n = M.memoizer;
1969
+ n?.attach(e), e._zod.parse = (r, i) => {
1970
+ let a = r.value;
1971
+ if (!v(a)) return r.issues.push({
1972
+ expected: "record",
1973
+ code: "invalid_type",
1974
+ input: a,
1975
+ inst: e
1976
+ }), r;
1977
+ let o = [], s = t.keyType._zod.values;
1978
+ if (s && !t.partial) {
1979
+ r.value = n ? n.alloc(e, r, {}, i) : {};
1980
+ let c = /* @__PURE__ */ new Set();
1981
+ for (let n of s) if (typeof n == "string" || typeof n == "number" || typeof n == "symbol") {
1982
+ if (c.add(typeof n == "number" ? n.toString() : n), n === "__proto__") continue;
1983
+ let s = t.keyType._zod.run({
1984
+ value: n,
1985
+ issues: []
1986
+ }, i);
1987
+ if (s instanceof Promise) throw Error("Async schemas not supported in object keys currently");
1988
+ if (s.issues.length) {
1989
+ r.issues.push({
1990
+ code: "invalid_key",
1991
+ origin: "record",
1992
+ issues: s.issues.map((e) => T(e, i, N())),
1993
+ input: n,
1994
+ path: [n],
1995
+ inst: e
1996
+ });
1997
+ continue;
1998
+ }
1999
+ let l = s.value;
2000
+ if (l === "__proto__") continue;
2001
+ let u = t.valueType._zod.run({
2002
+ value: a[n],
2003
+ issues: []
2004
+ }, i);
2005
+ u instanceof Promise ? o.push(u.then((e) => {
2006
+ e.issues.length && r.issues.push(...C(n, e.issues)), r.value[l] = e.value;
2007
+ })) : (u.issues.length && r.issues.push(...C(n, u.issues)), r.value[l] = u.value);
2008
+ }
2009
+ let l;
2010
+ for (let e in a) if (!c.has(e)) {
2011
+ if (t.mode === "loose") {
2012
+ if (e === "__proto__") continue;
2013
+ r.value[e] = a[e];
2014
+ } else l ??= [], l.push(e);
2015
+ }
2016
+ l && l.length > 0 && r.issues.push({
2017
+ code: "unrecognized_keys",
2018
+ input: a,
2019
+ inst: e,
2020
+ keys: l,
2021
+ continue: !0
2022
+ });
2023
+ } else {
2024
+ r.value = n ? n.alloc(e, r, {}, i) : {};
2025
+ let c;
2026
+ for (let n of Reflect.ownKeys(a)) {
2027
+ if (n === "__proto__" || !Object.prototype.propertyIsEnumerable.call(a, n)) continue;
2028
+ let l = t.keyType._zod.run({
2029
+ value: n,
2030
+ issues: []
2031
+ }, i);
2032
+ if (l instanceof Promise) throw Error("Async schemas not supported in object keys currently");
2033
+ if (typeof n == "string" && qt.test(n) && l.issues.length) {
2034
+ let e = t.keyType._zod.run({
2035
+ value: Number(n),
2036
+ issues: []
2037
+ }, i);
2038
+ if (e instanceof Promise) throw Error("Async schemas not supported in object keys currently");
2039
+ e.issues.length === 0 && (l = e);
2040
+ }
2041
+ if (l.issues.length) {
2042
+ t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
2043
+ code: "invalid_key",
2044
+ origin: "record",
2045
+ issues: l.issues.map((e) => T(e, i, N())),
2046
+ input: n,
2047
+ path: [n],
2048
+ inst: e
2049
+ });
2050
+ continue;
2051
+ }
2052
+ let u = l.value;
2053
+ if (u === "__proto__") continue;
2054
+ let d = t.valueType._zod.run({
2055
+ value: a[n],
2056
+ issues: []
2057
+ }, i);
2058
+ d instanceof Promise ? o.push(d.then((e) => {
2059
+ e.issues.length && r.issues.push(...C(n, e.issues)), r.value[u] = e.value;
2060
+ })) : (d.issues.length && r.issues.push(...C(n, d.issues)), r.value[u] = d.value);
2061
+ }
2062
+ c && c.length > 0 && r.issues.push({
2063
+ code: "unrecognized_keys",
2064
+ input: a,
2065
+ inst: e,
2066
+ keys: c,
2067
+ continue: !0
2068
+ });
2069
+ }
2070
+ return o.length ? Promise.all(o).then(() => r) : r;
2071
+ };
2072
+ }), Ir = /*@__PURE__*/ A("$ZodEnum", (t, n) => {
2073
+ F.init(t, n);
2074
+ let r = e(n.entries), i = new Set(r);
2075
+ t._zod.values = i, k(t, "pattern", (t) => {
2076
+ let n = e(t.def.entries).filter((e) => oe.has(typeof e));
2077
+ return RegExp(n.length ? `^(${n.map((e) => y(e.toString())).join("|")})$` : "^[^\\s\\S]$");
2078
+ }), t._zod.parse = (e, n) => {
2079
+ let a = e.value;
2080
+ return i.has(a) || e.issues.push({
2081
+ code: "invalid_value",
2082
+ values: r,
2083
+ input: a,
2084
+ inst: t
2085
+ }), e;
2086
+ };
2087
+ }), Lr = /*@__PURE__*/ A("$ZodLiteral", (e, t) => {
2088
+ F.init(e, t);
2089
+ let n = new Set(t.values);
2090
+ e._zod.values = n, k(e, "pattern", (e) => {
2091
+ let t = e.def.values;
2092
+ return RegExp(t.length ? `^(${t.map((e) => typeof e == "string" ? y(e) : e ? y(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$");
2093
+ }), e._zod.parse = (r, i) => {
2094
+ let a = r.value;
2095
+ return n.has(a) || r.issues.push({
2096
+ code: "invalid_value",
2097
+ values: t.values,
2098
+ input: a,
2099
+ inst: e
2100
+ }), r;
2101
+ };
2102
+ }), Rr = /*@__PURE__*/ A("$ZodTransform", (e, t) => {
2103
+ F.init(e, t), e._zod.optin = "optional", M.memoizer?.guard(e), e._zod.parse = (n, r) => {
2104
+ if (r.direction === "backward") throw new Be(e.constructor.name);
2105
+ let i = t.transform(n.value, n);
2106
+ if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
2107
+ if (i instanceof Promise) throw new j();
2108
+ return n.value = i, n;
2109
+ };
2110
+ });
2111
+ function zr(e, t) {
2112
+ return e.value = t.issues.length ? void 0 : t.value, e;
2113
+ }
2114
+ var Br = /*@__PURE__*/ A("$ZodOptional", (e, t) => {
2115
+ F.init(e, t), k(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", k(e, "values", (e) => {
2116
+ let t = e.def.innerType._zod.values;
2117
+ return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
2118
+ }), k(e, "pattern", (e) => {
2119
+ let t = e.def.innerType._zod.pattern;
2120
+ return t ? RegExp(`^(${o(t.source)})?$`) : void 0;
2121
+ }), e._zod.parse = (e, n) => {
2122
+ if (e.value === void 0) {
2123
+ if (t.innerType._zod.optin !== "defaulted") return e;
2124
+ let r = t.innerType._zod.run({
2125
+ value: e.value,
2126
+ issues: []
2127
+ }, n);
2128
+ return r instanceof Promise ? r.then((t) => zr(e, t)) : zr(e, r);
2129
+ }
2130
+ return t.innerType._zod.run(e, n);
2131
+ };
2132
+ }), Vr = /*@__PURE__*/ A("$ZodExactOptional", (e, t) => {
2133
+ Br.init(e, t), k(e, "values", (e) => e.def.innerType._zod.values), k(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
2134
+ }), Hr = /*@__PURE__*/ A("$ZodNullable", (e, t) => {
2135
+ F.init(e, t), k(e, "optin", (e) => e.def.innerType._zod.optin), k(e, "optout", (e) => e.def.innerType._zod.optout), k(e, "pattern", (e) => {
2136
+ let t = e.def.innerType._zod.pattern;
2137
+ return t ? RegExp(`^(${o(t.source)}|null)$`) : void 0;
2138
+ }), k(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
2139
+ }), Ur = /*@__PURE__*/ A("$ZodDefault", (e, t) => {
2140
+ F.init(e, t), e._zod.optin = "defaulted", k(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2141
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
2142
+ if (e.value === void 0) return e.value = t.defaultValue, e;
2143
+ let r = t.innerType._zod.run(e, n);
2144
+ return r instanceof Promise ? r.then((e) => Wr(e, t)) : Wr(r, t);
2145
+ };
2146
+ });
2147
+ function Wr(e, t) {
2148
+ return e.value === void 0 && (e.value = t.defaultValue), e;
2149
+ }
2150
+ var Gr = /*@__PURE__*/ A("$ZodPrefault", (e, t) => {
2151
+ F.init(e, t), e._zod.optin = "defaulted", k(e, "values", (e) => e.def.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));
2152
+ }), Kr = /*@__PURE__*/ A("$ZodNonOptional", (e, t) => {
2153
+ F.init(e, t), k(e, "values", (e) => {
2154
+ let t = e.def.innerType._zod.values;
2155
+ return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
2156
+ }), e._zod.parse = (n, r) => {
2157
+ let i = t.innerType._zod.run(n, r);
2158
+ return i instanceof Promise ? i.then((t) => qr(t, e)) : qr(i, e);
2159
+ };
2160
+ });
2161
+ function qr(e, t) {
2162
+ return !e.issues.length && e.value === void 0 && e.issues.push({
2163
+ code: "invalid_type",
2164
+ expected: "nonoptional",
2165
+ input: e.value,
2166
+ inst: t
2167
+ }), e;
2168
+ }
2169
+ function Jr(e, t, n, r) {
2170
+ return t.issues.length ? (e.value = n.catchValue({
2171
+ ...t,
2172
+ value: e.value,
2173
+ error: { issues: t.issues.map((e) => T(e, r, N())) },
2174
+ input: e.value
2175
+ }), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
2176
+ }
2177
+ var Yr = /*@__PURE__*/ A("$ZodCatch", (e, t) => {
2178
+ F.init(e, t), k(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), k(e, "optout", (e) => e.def.innerType._zod.optout), k(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
2179
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
2180
+ let r = t.innerType._zod.run({
2181
+ value: e.value,
2182
+ issues: []
2183
+ }, n);
2184
+ return r instanceof Promise ? r.then((r) => Jr(e, r, t, n)) : Jr(e, r, t, n);
2185
+ };
2186
+ }), Xr = /*@__PURE__*/ A("$ZodNaN", (e, t) => {
2187
+ F.init(e, t), e._zod.parse = (t, n) => ((typeof t.value != "number" || !Number.isNaN(t.value)) && t.issues.push({
2188
+ input: t.value,
2189
+ inst: e,
2190
+ expected: "nan",
2191
+ code: "invalid_type"
2192
+ }), t);
2193
+ }), Zr = /*@__PURE__*/ A("$ZodPipe", (e, t) => {
2194
+ F.init(e, t), k(e, "values", (e) => e.def.in._zod.values), k(e, "optin", (e) => e.def.in._zod.optin), k(e, "optout", (e) => e.def.out._zod.optout), k(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
2195
+ if (n.direction === "backward") {
2196
+ let r = t.out._zod.run(e, n);
2197
+ return r instanceof Promise ? r.then((e) => Qr(e, t.in, n)) : Qr(r, t.in, n);
2198
+ }
2199
+ let r = t.in._zod.run(e, n);
2200
+ return r instanceof Promise ? r.then((e) => Qr(e, t.out, n)) : Qr(r, t.out, n);
2201
+ };
2202
+ });
2203
+ function Qr(e, t, n) {
2204
+ return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
2205
+ value: e.value,
2206
+ issues: e.issues
2207
+ }, n);
2208
+ }
2209
+ var $r = /*@__PURE__*/ A("$ZodReadonly", (e, t) => {
2210
+ F.init(e, t), k(e, "propValues", (e) => e.def.innerType._zod.propValues), k(e, "values", (e) => e.def.innerType._zod.values), k(e, "optin", (e) => e.def.innerType?._zod?.optin), k(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
2211
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
2212
+ let r = t.innerType._zod.run(e, n);
2213
+ return r instanceof Promise ? r.then(ei) : ei(r);
2214
+ };
2215
+ });
2216
+ function ei(e) {
2217
+ return e.memo || (e.value = Object.freeze(e.value)), e;
2218
+ }
2219
+ var ti = /*@__PURE__*/ A("$ZodLazy", (e, t) => {
2220
+ F.init(e, t), l(e._zod, "innerType", () => {
2221
+ let e = t;
2222
+ return e._cachedInner ||= t.getter(), e._cachedInner;
2223
+ }), k(e, "pattern", (e) => e.innerType?._zod?.pattern), k(e, "propValues", (e) => e.innerType?._zod?.propValues), k(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), k(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
2224
+ }), ni = /*@__PURE__*/ A("$ZodCustom", (e, t) => {
2225
+ P.init(e, t), F.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
2226
+ let r = n.value, i = t.fn(r);
2227
+ if (i instanceof Promise) return i.then((t) => ri(t, n, r, e));
2228
+ ri(i, n, r, e);
2229
+ };
2230
+ });
2231
+ function ri(e, t, n, r) {
2232
+ if (!e) {
2233
+ let e = {
2234
+ code: "custom",
2235
+ input: n,
2236
+ inst: r,
2237
+ path: [...r._zod.def.path ?? []],
2238
+ continue: !r._zod.def.abort
2239
+ };
2240
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(E(e));
2241
+ }
2242
+ }
2243
+ //#endregion
2244
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
2245
+ var ii = class extends Error {
2246
+ constructor() {
2247
+ super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
2248
+ }
2249
+ }, ai = "~memo", oi = [];
2250
+ function si(e) {
2251
+ return typeof e == "object" && !!e;
2252
+ }
2253
+ function ci(e) {
2254
+ return e.map((e) => e.path ? {
2255
+ ...e,
2256
+ path: e.path.slice()
2257
+ } : { ...e });
2258
+ }
2259
+ var li = /*@__PURE__*/ new WeakMap(), L = 0, ui = 1, R = 2;
2260
+ function di(e, t, n) {
2261
+ let r = li.get(e);
2262
+ if (r !== void 0) return r ? R : L;
2263
+ if (t.has(e)) return R;
2264
+ t.add(e);
2265
+ let i = L, a = (e) => {
2266
+ if (i !== R && e?._zod) {
2267
+ let r = di(e, t, n);
2268
+ r > i && (i = r);
2269
+ }
2270
+ }, o = (e, r) => {
2271
+ let i = L;
2272
+ for (let a of Reflect.ownKeys(e)) {
2273
+ let o = Object.getOwnPropertyDescriptor(e, a);
2274
+ if (r && !o.enumerable) continue;
2275
+ let s = o.get ? ui : o.value?._zod ? di(o.value, t, n) : L;
2276
+ s > i && (i = s);
2277
+ }
2278
+ return i;
2279
+ }, s = (e) => {
2280
+ e > i && (i = e);
2281
+ }, c = e._zod.def;
2282
+ switch (c.type) {
2283
+ case "object": {
2284
+ let e = d(c);
2285
+ s(e ? o(e, !0) : ui), a(c.catchall);
2286
+ break;
2287
+ }
2288
+ case "array":
2289
+ a(c.element);
2290
+ break;
2291
+ case "tuple":
2292
+ for (let e of c.items) a(e);
2293
+ a(c.rest);
2294
+ break;
2295
+ case "record":
2296
+ case "map":
2297
+ a(c.keyType), a(c.valueType);
2298
+ break;
2299
+ case "set":
2300
+ a(c.valueType);
2301
+ break;
2302
+ case "union":
2303
+ for (let e of c.options) a(e);
2304
+ break;
2305
+ case "intersection":
2306
+ a(c.left), a(c.right);
2307
+ break;
2308
+ case "optional":
2309
+ case "nullable":
2310
+ case "default":
2311
+ case "prefault":
2312
+ case "catch":
2313
+ case "readonly":
2314
+ case "nonoptional":
2315
+ case "promise":
2316
+ case "success":
2317
+ a(c.innerType);
2318
+ break;
2319
+ case "pipe":
2320
+ a(c.in), a(c.out);
2321
+ break;
2322
+ case "function":
2323
+ a(c.input), a(c.output);
2324
+ break;
2325
+ case "lazy": {
2326
+ let r = c._cachedInner ?? (n ? e._zod.innerType : void 0);
2327
+ s(r ? di(r, t, !1) : ui);
2328
+ break;
2329
+ }
2330
+ case "template_literal":
2331
+ case "string":
2332
+ case "number":
2333
+ case "int":
2334
+ case "boolean":
2335
+ case "bigint":
2336
+ case "symbol":
2337
+ case "undefined":
2338
+ case "null":
2339
+ case "void":
2340
+ case "never":
2341
+ case "any":
2342
+ case "unknown":
2343
+ case "date":
2344
+ case "nan":
2345
+ case "enum":
2346
+ case "literal":
2347
+ case "file":
2348
+ case "transform":
2349
+ case "custom": break;
2350
+ default: for (let e in c) {
2351
+ let t = Object.getOwnPropertyDescriptor(c, e);
2352
+ if (!t || t.get) continue;
2353
+ let n = t.value;
2354
+ if (!(!n || typeof n != "object")) {
2355
+ if (n._zod) a(n);
2356
+ else if (Array.isArray(n)) for (let e of n) a(e);
2357
+ }
2358
+ }
2359
+ }
2360
+ return t.delete(e), fi(e, i);
2361
+ }
2362
+ function fi(e, t) {
2363
+ return t !== ui && li.set(e, t === R), t;
2364
+ }
2365
+ function pi(e, t) {
2366
+ let n = e.buckets.get(t);
2367
+ return n || (n = /* @__PURE__ */ new WeakMap(), e.buckets.set(t, n)), n;
2368
+ }
2369
+ var mi, hi = [], gi = {
2370
+ alloc(e, t, n) {
2371
+ let r = mi;
2372
+ if (!r) return n;
2373
+ mi = void 0;
2374
+ let i = {
2375
+ value: n,
2376
+ issues: null
2377
+ };
2378
+ return r.set(t.value, i), hi.push(i), n;
2379
+ },
2380
+ guard(e) {
2381
+ var t;
2382
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
2383
+ let t = e._zod.parse, n = (e, n) => {
2384
+ if (n.direction !== "backward" && vi(n, e.value)) throw new ii();
2385
+ return t(e, n);
2386
+ };
2387
+ e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
2388
+ });
2389
+ },
2390
+ attach(e) {
2391
+ var t;
2392
+ let n, r = !1, i, a;
2393
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
2394
+ let t = e._zod.parse, o = (s, c) => {
2395
+ if (n === void 0) {
2396
+ let i = di(e, /* @__PURE__ */ new Set(), !1);
2397
+ if (i === L) return e._zod.parse = t, e._zod.run === o && (e._zod.run = t), t(s, c);
2398
+ i === R || r ? n = !0 : r = !0;
2399
+ }
2400
+ let l = s.value;
2401
+ if (!si(l)) return t(s, c);
2402
+ let u = c[ai];
2403
+ u || (u = {
2404
+ buckets: /* @__PURE__ */ new WeakMap(),
2405
+ backEdges: void 0
2406
+ }, c[ai] = u);
2407
+ let d;
2408
+ i === c ? d = a : (d = pi(u, e), i = c, a = d);
2409
+ let f = d.get(l);
2410
+ if (f) return s.value = f.value, f.issues ? f.issues.length && s.issues.push(...ci(f.issues)) : (s.memo = !0, u.backEdges ?? (u.backEdges = /* @__PURE__ */ new WeakSet()), u.backEdges.add(f.value)), s;
2411
+ mi = d;
2412
+ let p = hi.length, m = t(s, c);
2413
+ mi = void 0;
2414
+ let h = hi.length > p ? hi.pop() : void 0;
2415
+ return m instanceof Promise ? m.then((e) => (h && (h.issues = e.issues.length ? ci(e.issues) : oi), e)) : (h && (h.issues = m.issues.length ? ci(m.issues) : oi), m);
2416
+ };
2417
+ e._zod.parse = o, e._zod.run === t && (e._zod.run = o);
2418
+ });
2419
+ }
2420
+ };
2421
+ function _i() {
2422
+ return gi;
2423
+ }
2424
+ function vi(e, t) {
2425
+ let n = e[ai]?.backEdges;
2426
+ return n !== void 0 && si(t) && n.has(t);
2427
+ }
2428
+ //#endregion
2429
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
2430
+ var yi = () => {
2431
+ let e = {
2432
+ string: {
2433
+ unit: "characters",
2434
+ verb: "to have"
2435
+ },
2436
+ file: {
2437
+ unit: "bytes",
2438
+ verb: "to have"
2439
+ },
2440
+ array: {
2441
+ unit: "items",
2442
+ verb: "to have"
2443
+ },
2444
+ set: {
2445
+ unit: "items",
2446
+ verb: "to have"
2447
+ },
2448
+ map: {
2449
+ unit: "entries",
2450
+ verb: "to have"
2451
+ }
2452
+ };
2453
+ function n(t) {
2454
+ return e[t] ?? null;
2455
+ }
2456
+ let r = {
2457
+ regex: "input",
2458
+ email: "email address",
2459
+ url: "URL",
2460
+ emoji: "emoji",
2461
+ uuid: "UUID",
2462
+ uuidv4: "UUIDv4",
2463
+ uuidv6: "UUIDv6",
2464
+ nanoid: "nanoid",
2465
+ guid: "GUID",
2466
+ cuid: "cuid",
2467
+ cuid2: "cuid2",
2468
+ ulid: "ULID",
2469
+ xid: "XID",
2470
+ ksuid: "KSUID",
2471
+ datetime: "ISO datetime",
2472
+ date: "ISO date",
2473
+ time: "ISO time",
2474
+ duration: "ISO duration",
2475
+ ipv4: "IPv4 address",
2476
+ ipv6: "IPv6 address",
2477
+ mac: "MAC address",
2478
+ cidrv4: "IPv4 range",
2479
+ cidrv6: "IPv6 range",
2480
+ base64: "base64-encoded string",
2481
+ base64url: "base64url-encoded string",
2482
+ json_string: "JSON string",
2483
+ e164: "E.164 number",
2484
+ currency_code: "currency code",
2485
+ credit_card: "credit card number",
2486
+ iban: "IBAN",
2487
+ jwt: "JWT",
2488
+ template_literal: "input"
2489
+ }, i = { nan: "NaN" };
2490
+ function a(e, t) {
2491
+ return e === "number" && typeof t == "number" && !Number.isFinite(t) ? String(t) : i[e] ?? e;
2492
+ }
2493
+ return (e) => {
2494
+ switch (e.code) {
2495
+ case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(Te(e.input), e.input)}`;
2496
+ case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${se(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
2497
+ case "too_big": {
2498
+ let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
2499
+ return r ? `Too big: expected ${e.origin ?? "value"} to have ${t}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${t}${e.maximum.toString()}`;
2500
+ }
2501
+ case "too_small": {
2502
+ let t = e.exact ? "exactly " : e.inclusive ? ">=" : ">", r = n(e.origin);
2503
+ return r ? `Too small: expected ${e.origin} to have ${t}${e.minimum.toString()} ${r.unit}` : `Too small: expected ${e.origin} to be ${t}${e.minimum.toString()}`;
2504
+ }
2505
+ case "invalid_format": {
2506
+ let t = e;
2507
+ return t.format === "starts_with" ? `Invalid string: must start with "${t.prefix}"` : t.format === "ends_with" ? `Invalid string: must end with "${t.suffix}"` : t.format === "includes" ? `Invalid string: must include "${t.includes}"` : t.format === "regex" ? `Invalid string: must match pattern ${t.pattern}` : `Invalid ${r[t.format] ?? e.format}`;
2508
+ }
2509
+ case "not_multiple_of": return `Invalid number: must be a multiple of ${e.divisor}`;
2510
+ case "unrecognized_keys": return `Unrecognized key${e.keys.length > 1 ? "s" : ""}: ${t(e.keys, ", ")}`;
2511
+ case "invalid_key": return `Invalid key in ${e.origin}`;
2512
+ case "invalid_union": return e.options && Array.isArray(e.options) && e.options.length > 0 ? `Invalid discriminator value. Expected ${e.options.map((e) => `'${e}'`).join(" | ")}` : e.inclusive === !1 ? "Invalid input: more than one option matched" : "Invalid input";
2513
+ case "invalid_element": return `Invalid value in ${e.origin}`;
2514
+ default: return "Invalid input";
2515
+ }
2516
+ };
2517
+ };
2518
+ function bi() {
2519
+ return { localeError: yi() };
2520
+ }
2521
+ //#endregion
2522
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
2523
+ var xi, Si = class {
2524
+ constructor() {
2525
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2526
+ }
2527
+ add(e, ...t) {
2528
+ let n = t[0];
2529
+ return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
2530
+ }
2531
+ clear() {
2532
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
2533
+ }
2534
+ remove(e) {
2535
+ let t = this._map.get(e);
2536
+ return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
2537
+ }
2538
+ get(e) {
2539
+ let t = e._zod.parent;
2540
+ if (t) {
2541
+ let n = { ...this.get(t) ?? {} };
2542
+ delete n.id;
2543
+ let r = {
2544
+ ...n,
2545
+ ...this._map.get(e)
2546
+ };
2547
+ return Object.keys(r).length ? r : void 0;
2548
+ }
2549
+ return this._map.get(e);
2550
+ }
2551
+ has(e) {
2552
+ return this._map.has(e);
2553
+ }
2554
+ };
2555
+ function Ci() {
2556
+ return new Si();
2557
+ }
2558
+ (xi = globalThis).__zod_globalRegistry ?? (xi.__zod_globalRegistry = Ci());
2559
+ var z = globalThis.__zod_globalRegistry;
2560
+ //#endregion
2561
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
2562
+ function wi(e) {
2563
+ return e.checks &&= [...e.checks], e;
2564
+ }
2565
+ // @__NO_SIDE_EFFECTS__
2566
+ function Ti(e, t) {
2567
+ return new e(wi({
2568
+ type: "string",
2569
+ ...x(t)
2570
+ }));
2571
+ }
2572
+ // @__NO_SIDE_EFFECTS__
2573
+ function Ei(e, t) {
2574
+ return new e(wi({
2575
+ type: "string",
2576
+ coerce: !0,
2577
+ ...x(t)
2578
+ }));
2579
+ }
2580
+ // @__NO_SIDE_EFFECTS__
2581
+ function Di(e, t) {
2582
+ return new e({
2583
+ type: "string",
2584
+ format: "email",
2585
+ check: "string_format",
2586
+ abort: !1,
2587
+ ...x(t)
2588
+ });
2589
+ }
2590
+ // @__NO_SIDE_EFFECTS__
2591
+ function Oi(e, t) {
2592
+ return new e({
2593
+ type: "string",
2594
+ format: "guid",
2595
+ check: "string_format",
2596
+ abort: !1,
2597
+ ...x(t)
2598
+ });
2599
+ }
2600
+ // @__NO_SIDE_EFFECTS__
2601
+ function ki(e, t) {
2602
+ return new e({
2603
+ type: "string",
2604
+ format: "uuid",
2605
+ check: "string_format",
2606
+ abort: !1,
2607
+ ...x(t)
2608
+ });
2609
+ }
2610
+ // @__NO_SIDE_EFFECTS__
2611
+ function Ai(e, t) {
2612
+ return new e({
2613
+ type: "string",
2614
+ format: "uuid",
2615
+ check: "string_format",
2616
+ abort: !1,
2617
+ version: "v4",
2618
+ ...x(t)
2619
+ });
2620
+ }
2621
+ // @__NO_SIDE_EFFECTS__
2622
+ function ji(e, t) {
2623
+ return new e({
2624
+ type: "string",
2625
+ format: "uuid",
2626
+ check: "string_format",
2627
+ abort: !1,
2628
+ version: "v6",
2629
+ ...x(t)
2630
+ });
2631
+ }
2632
+ // @__NO_SIDE_EFFECTS__
2633
+ function Mi(e, t) {
2634
+ return new e({
2635
+ type: "string",
2636
+ format: "uuid",
2637
+ check: "string_format",
2638
+ abort: !1,
2639
+ version: "v7",
2640
+ ...x(t)
2641
+ });
2642
+ }
2643
+ // @__NO_SIDE_EFFECTS__
2644
+ function Ni(e, t) {
2645
+ return new e({
2646
+ type: "string",
2647
+ format: "url",
2648
+ check: "string_format",
2649
+ abort: !1,
2650
+ ...x(t)
2651
+ });
2652
+ }
2653
+ // @__NO_SIDE_EFFECTS__
2654
+ function Pi(e, t) {
2655
+ return new e({
2656
+ type: "string",
2657
+ format: "emoji",
2658
+ check: "string_format",
2659
+ abort: !1,
2660
+ ...x(t)
2661
+ });
2662
+ }
2663
+ // @__NO_SIDE_EFFECTS__
2664
+ function Fi(e, t) {
2665
+ return new e({
2666
+ type: "string",
2667
+ format: "nanoid",
2668
+ check: "string_format",
2669
+ abort: !1,
2670
+ ...x(t)
2671
+ });
2672
+ }
2673
+ // @__NO_SIDE_EFFECTS__
2674
+ function Ii(e, t) {
2675
+ return new e({
2676
+ type: "string",
2677
+ format: "cuid",
2678
+ check: "string_format",
2679
+ abort: !1,
2680
+ ...x(t)
2681
+ });
2682
+ }
2683
+ // @__NO_SIDE_EFFECTS__
2684
+ function Li(e, t) {
2685
+ return new e({
2686
+ type: "string",
2687
+ format: "cuid2",
2688
+ check: "string_format",
2689
+ abort: !1,
2690
+ ...x(t)
2691
+ });
2692
+ }
2693
+ // @__NO_SIDE_EFFECTS__
2694
+ function Ri(e, t) {
2695
+ return new e({
2696
+ type: "string",
2697
+ format: "ulid",
2698
+ check: "string_format",
2699
+ abort: !1,
2700
+ ...x(t)
2701
+ });
2702
+ }
2703
+ // @__NO_SIDE_EFFECTS__
2704
+ function zi(e, t) {
2705
+ return new e({
2706
+ type: "string",
2707
+ format: "xid",
2708
+ check: "string_format",
2709
+ abort: !1,
2710
+ ...x(t)
2711
+ });
2712
+ }
2713
+ // @__NO_SIDE_EFFECTS__
2714
+ function Bi(e, t) {
2715
+ return new e({
2716
+ type: "string",
2717
+ format: "ksuid",
2718
+ check: "string_format",
2719
+ abort: !1,
2720
+ ...x(t)
2721
+ });
2722
+ }
2723
+ // @__NO_SIDE_EFFECTS__
2724
+ function Vi(e, t) {
2725
+ return new e({
2726
+ type: "string",
2727
+ format: "ipv4",
2728
+ check: "string_format",
2729
+ abort: !1,
2730
+ ...x(t)
2731
+ });
2732
+ }
2733
+ // @__NO_SIDE_EFFECTS__
2734
+ function Hi(e, t) {
2735
+ return new e({
2736
+ type: "string",
2737
+ format: "ipv6",
2738
+ check: "string_format",
2739
+ abort: !1,
2740
+ ...x(t)
2741
+ });
2742
+ }
2743
+ // @__NO_SIDE_EFFECTS__
2744
+ function Ui(e, t) {
2745
+ return new e({
2746
+ type: "string",
2747
+ format: "cidrv4",
2748
+ check: "string_format",
2749
+ abort: !1,
2750
+ ...x(t)
2751
+ });
2752
+ }
2753
+ // @__NO_SIDE_EFFECTS__
2754
+ function Wi(e, t) {
2755
+ return new e({
2756
+ type: "string",
2757
+ format: "cidrv6",
2758
+ check: "string_format",
2759
+ abort: !1,
2760
+ ...x(t)
2761
+ });
2762
+ }
2763
+ // @__NO_SIDE_EFFECTS__
2764
+ function Gi(e, t) {
2765
+ return new e({
2766
+ type: "string",
2767
+ format: "base64",
2768
+ check: "string_format",
2769
+ abort: !1,
2770
+ ...x(t)
2771
+ });
2772
+ }
2773
+ // @__NO_SIDE_EFFECTS__
2774
+ function Ki(e, t) {
2775
+ return new e({
2776
+ type: "string",
2777
+ format: "base64url",
2778
+ check: "string_format",
2779
+ abort: !1,
2780
+ ...x(t)
2781
+ });
2782
+ }
2783
+ // @__NO_SIDE_EFFECTS__
2784
+ function qi(e, t) {
2785
+ return new e({
2786
+ type: "string",
2787
+ format: "e164",
2788
+ check: "string_format",
2789
+ abort: !1,
2790
+ ...x(t)
2791
+ });
2792
+ }
2793
+ // @__NO_SIDE_EFFECTS__
2794
+ function Ji(e, t) {
2795
+ return new e({
2796
+ type: "string",
2797
+ format: "jwt",
2798
+ check: "string_format",
2799
+ abort: !1,
2800
+ ...x(t)
2801
+ });
2802
+ }
2803
+ // @__NO_SIDE_EFFECTS__
2804
+ function Yi(e, t) {
2805
+ return new e({
2806
+ type: "string",
2807
+ format: "datetime",
2808
+ check: "string_format",
2809
+ offset: !1,
2810
+ local: !1,
2811
+ precision: null,
2812
+ ...x(t)
2813
+ });
2814
+ }
2815
+ // @__NO_SIDE_EFFECTS__
2816
+ function Xi(e, t) {
2817
+ return new e({
2818
+ type: "string",
2819
+ format: "date",
2820
+ check: "string_format",
2821
+ ...x(t)
2822
+ });
2823
+ }
2824
+ // @__NO_SIDE_EFFECTS__
2825
+ function Zi(e, t) {
2826
+ return new e({
2827
+ type: "string",
2828
+ format: "time",
2829
+ check: "string_format",
2830
+ precision: null,
2831
+ ...x(t)
2832
+ });
2833
+ }
2834
+ // @__NO_SIDE_EFFECTS__
2835
+ function Qi(e, t) {
2836
+ return new e({
2837
+ type: "string",
2838
+ format: "duration",
2839
+ check: "string_format",
2840
+ ...x(t)
2841
+ });
2842
+ }
2843
+ // @__NO_SIDE_EFFECTS__
2844
+ function $i(e, t) {
2845
+ return new e(wi({
2846
+ type: "number",
2847
+ checks: [],
2848
+ ...x(t)
2849
+ }));
2850
+ }
2851
+ // @__NO_SIDE_EFFECTS__
2852
+ function ea(e, t) {
2853
+ return new e(wi({
2854
+ type: "number",
2855
+ coerce: !0,
2856
+ checks: [],
2857
+ ...x(t)
2858
+ }));
2859
+ }
2860
+ // @__NO_SIDE_EFFECTS__
2861
+ function ta(e, t) {
2862
+ return new e({
2863
+ type: "number",
2864
+ check: "number_format",
2865
+ abort: !1,
2866
+ format: "safeint",
2867
+ ...x(t)
2868
+ });
2869
+ }
2870
+ // @__NO_SIDE_EFFECTS__
2871
+ function na(e, t) {
2872
+ return new e({
2873
+ type: "boolean",
2874
+ ...x(t)
2875
+ });
2876
+ }
2877
+ // @__NO_SIDE_EFFECTS__
2878
+ function ra(e, t) {
2879
+ return new e({
2880
+ type: "null",
2881
+ ...x(t)
2882
+ });
2883
+ }
2884
+ // @__NO_SIDE_EFFECTS__
2885
+ function ia(e) {
2886
+ return new e({ type: "any" });
2887
+ }
2888
+ // @__NO_SIDE_EFFECTS__
2889
+ function aa(e) {
2890
+ return new e({ type: "unknown" });
2891
+ }
2892
+ // @__NO_SIDE_EFFECTS__
2893
+ function oa(e, t) {
2894
+ return new e({
2895
+ type: "never",
2896
+ ...x(t)
2897
+ });
2898
+ }
2899
+ // @__NO_SIDE_EFFECTS__
2900
+ function sa(e, t) {
2901
+ return new e({
2902
+ type: "date",
2903
+ coerce: !0,
2904
+ ...x(t)
2905
+ });
2906
+ }
2907
+ // @__NO_SIDE_EFFECTS__
2908
+ function ca(e, t) {
2909
+ return new e({
2910
+ type: "nan",
2911
+ ...x(t)
2912
+ });
2913
+ }
2914
+ // @__NO_SIDE_EFFECTS__
2915
+ function la(e, t) {
2916
+ return new en({
2917
+ check: "less_than",
2918
+ ...x(t),
2919
+ value: e,
2920
+ inclusive: !1
2921
+ });
2922
+ }
2923
+ // @__NO_SIDE_EFFECTS__
2924
+ function ua(e, t) {
2925
+ return new en({
2926
+ check: "less_than",
2927
+ ...x(t),
2928
+ value: e,
2929
+ inclusive: !0
2930
+ });
2931
+ }
2932
+ // @__NO_SIDE_EFFECTS__
2933
+ function da(e, t) {
2934
+ return new tn({
2935
+ check: "greater_than",
2936
+ ...x(t),
2937
+ value: e,
2938
+ inclusive: !1
2939
+ });
2940
+ }
2941
+ // @__NO_SIDE_EFFECTS__
2942
+ function fa(e, t) {
2943
+ return new tn({
2944
+ check: "greater_than",
2945
+ ...x(t),
2946
+ value: e,
2947
+ inclusive: !0
2948
+ });
2949
+ }
2950
+ // @__NO_SIDE_EFFECTS__
2951
+ function pa(e, t) {
2952
+ return new nn({
2953
+ check: "multiple_of",
2954
+ ...x(t),
2955
+ value: e
2956
+ });
2957
+ }
2958
+ // @__NO_SIDE_EFFECTS__
2959
+ function ma(e, t) {
2960
+ return new an({
2961
+ check: "max_length",
2962
+ ...x(t),
2963
+ maximum: e
2964
+ });
2965
+ }
2966
+ // @__NO_SIDE_EFFECTS__
2967
+ function ha(e, t) {
2968
+ return new on({
2969
+ check: "min_length",
2970
+ ...x(t),
2971
+ minimum: e
2972
+ });
2973
+ }
2974
+ // @__NO_SIDE_EFFECTS__
2975
+ function ga(e, t) {
2976
+ return new sn({
2977
+ check: "length_equals",
2978
+ ...x(t),
2979
+ length: e
2980
+ });
2981
+ }
2982
+ // @__NO_SIDE_EFFECTS__
2983
+ function _a(e, t) {
2984
+ return new ln({
2985
+ check: "string_format",
2986
+ format: "regex",
2987
+ ...x(t),
2988
+ pattern: e
2989
+ });
2990
+ }
2991
+ // @__NO_SIDE_EFFECTS__
2992
+ function va(e) {
2993
+ return new un({
2994
+ check: "string_format",
2995
+ format: "lowercase",
2996
+ ...x(e)
2997
+ });
2998
+ }
2999
+ // @__NO_SIDE_EFFECTS__
3000
+ function ya(e) {
3001
+ return new dn({
3002
+ check: "string_format",
3003
+ format: "uppercase",
3004
+ ...x(e)
3005
+ });
3006
+ }
3007
+ // @__NO_SIDE_EFFECTS__
3008
+ function ba(e, t) {
3009
+ return new fn({
3010
+ check: "string_format",
3011
+ format: "includes",
3012
+ ...x(t),
3013
+ includes: e
3014
+ });
3015
+ }
3016
+ // @__NO_SIDE_EFFECTS__
3017
+ function xa(e, t) {
3018
+ return new pn({
3019
+ check: "string_format",
3020
+ format: "starts_with",
3021
+ ...x(t),
3022
+ prefix: e
3023
+ });
3024
+ }
3025
+ // @__NO_SIDE_EFFECTS__
3026
+ function Sa(e, t) {
3027
+ return new mn({
3028
+ check: "string_format",
3029
+ format: "ends_with",
3030
+ ...x(t),
3031
+ suffix: e
3032
+ });
3033
+ }
3034
+ // @__NO_SIDE_EFFECTS__
3035
+ function Ca(e, t) {
3036
+ return new gn({
3037
+ check: "properties",
3038
+ shape: e,
3039
+ ...x(t)
3040
+ });
3041
+ }
3042
+ // @__NO_SIDE_EFFECTS__
3043
+ function B(e) {
3044
+ return new _n({
3045
+ check: "overwrite",
3046
+ tx: e
3047
+ });
3048
+ }
3049
+ // @__NO_SIDE_EFFECTS__
3050
+ function wa(e) {
3051
+ return /* @__PURE__ */ B((t) => t.normalize(e));
3052
+ }
3053
+ // @__NO_SIDE_EFFECTS__
3054
+ function Ta() {
3055
+ return /* @__PURE__ */ B((e) => e.trim());
3056
+ }
3057
+ // @__NO_SIDE_EFFECTS__
3058
+ function Ea() {
3059
+ return /* @__PURE__ */ B((e) => e.toLowerCase());
3060
+ }
3061
+ // @__NO_SIDE_EFFECTS__
3062
+ function Da() {
3063
+ return /* @__PURE__ */ B((e) => e.toUpperCase());
3064
+ }
3065
+ // @__NO_SIDE_EFFECTS__
3066
+ function Oa() {
3067
+ return /* @__PURE__ */ B((e) => ne(e));
3068
+ }
3069
+ // @__NO_SIDE_EFFECTS__
3070
+ function ka(e, t, n) {
3071
+ return new e({
3072
+ type: "array",
3073
+ element: t,
3074
+ ...x(n)
3075
+ });
3076
+ }
3077
+ // @__NO_SIDE_EFFECTS__
3078
+ function Aa(e, t, n) {
3079
+ let r = x(n);
3080
+ return r.abort ??= !0, new e({
3081
+ type: "custom",
3082
+ check: "custom",
3083
+ fn: t,
3084
+ ...r
3085
+ });
3086
+ }
3087
+ // @__NO_SIDE_EFFECTS__
3088
+ function ja(e, t, n) {
3089
+ return new e({
3090
+ type: "custom",
3091
+ check: "custom",
3092
+ fn: t,
3093
+ ...x(n)
3094
+ });
3095
+ }
3096
+ // @__NO_SIDE_EFFECTS__
3097
+ function Ma(e, t) {
3098
+ let n = /* @__PURE__ */ Na((t) => (t.addIssue = (e) => {
3099
+ if (typeof e == "string") t.issues.push(E(e, t.value, n._zod.def));
3100
+ else {
3101
+ let r = e;
3102
+ r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(E(r));
3103
+ }
3104
+ }, e(t.value, t)), t);
3105
+ return n;
3106
+ }
3107
+ // @__NO_SIDE_EFFECTS__
3108
+ function Na(e, t) {
3109
+ let n = new P({
3110
+ check: "custom",
3111
+ ...x(t)
3112
+ });
3113
+ return n._zod.check = e, n;
3114
+ }
3115
+ //#endregion
3116
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
3117
+ function V(e, ...t) {
3118
+ for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && u(e, t, n[t]);
3119
+ return e;
3120
+ }
3121
+ function Pa(e) {
3122
+ let t = e?.target ?? "draft-2020-12";
3123
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
3124
+ processors: e.processors ?? {},
3125
+ metadataRegistry: e?.metadata ?? z,
3126
+ target: t,
3127
+ unrepresentable: e?.unrepresentable ?? "throw",
3128
+ override: e?.override ?? (() => {}),
3129
+ io: e?.io ?? "output",
3130
+ counter: 0,
3131
+ seen: /* @__PURE__ */ new Map(),
3132
+ sharedDefsExtractedFor: void 0,
3133
+ sharedEmitDoneFor: void 0,
3134
+ cycles: e?.cycles ?? "ref",
3135
+ reused: e?.reused ?? "inline",
3136
+ intersections: [],
3137
+ deferred: [],
3138
+ external: e?.external ?? void 0
3139
+ };
3140
+ }
3141
+ function H(e, t, n, r, i) {
3142
+ let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
3143
+ zodSchema: e,
3144
+ path: r.path,
3145
+ message: i
3146
+ }) : t.unrepresentable;
3147
+ if (a === "any") return !1;
3148
+ if (a === void 0 || a === "throw") throw Error(i);
3149
+ return Object.assign(n, a), !0;
3150
+ }
3151
+ function U(e, t, n = {
3152
+ path: [],
3153
+ schemaPath: []
3154
+ }) {
3155
+ var r;
3156
+ let i = e._zod.def, a = t.seen.get(e);
3157
+ if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
3158
+ let o = {
3159
+ schema: {},
3160
+ count: 1,
3161
+ cycle: void 0,
3162
+ path: n.path
3163
+ };
3164
+ t.seen.set(e, o), t.sharedDefsExtractedFor = void 0, t.sharedEmitDoneFor = void 0;
3165
+ let s = e._zod.toJSONSchema?.();
3166
+ if (s) o.schema = s;
3167
+ else {
3168
+ let r = {
3169
+ ...n,
3170
+ schemaPath: [...n.schemaPath, e],
3171
+ path: n.path
3172
+ };
3173
+ if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
3174
+ else {
3175
+ let n = o.schema, a = t.processors[i.type];
3176
+ if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
3177
+ a(e, t, n, r);
3178
+ }
3179
+ let a = e._zod.parent;
3180
+ a && (o.ref ||= a, U(a, t, r), t.seen.get(a).isParent = !0);
3181
+ }
3182
+ let c = t.metadataRegistry.get(e);
3183
+ return c && V(o.schema, c), t.io === "input" && W(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;
3184
+ }
3185
+ function Fa(e) {
3186
+ return e.replace(/~/g, "~0").replace(/\//g, "~1");
3187
+ }
3188
+ function Ia(e, t) {
3189
+ let n = e.seen.get(t);
3190
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
3191
+ if (e.external && e.sharedDefsExtractedFor === e.external) return;
3192
+ let r = /* @__PURE__ */ new Map();
3193
+ for (let t of e.seen.entries()) {
3194
+ let n = e.metadataRegistry.get(t[0])?.id;
3195
+ if (n) {
3196
+ let e = r.get(n);
3197
+ 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.`);
3198
+ r.set(n, t[0]);
3199
+ }
3200
+ }
3201
+ let i = (t) => {
3202
+ let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
3203
+ if (e.external) {
3204
+ let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
3205
+ if (n) return { ref: i(n) };
3206
+ let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
3207
+ return t[1].defId = a, {
3208
+ defId: a,
3209
+ ref: `${i("__shared")}#/${r}/${Fa(a)}`
3210
+ };
3211
+ }
3212
+ let i = `#/${r}/`;
3213
+ if (t[1] === n && !t[1].schema.id) return { ref: "#" };
3214
+ let a = t[1].schema.id ?? `__schema${e.counter++}`;
3215
+ return {
3216
+ defId: a,
3217
+ ref: i + Fa(a)
3218
+ };
3219
+ }, a = (e) => {
3220
+ if (e[1].schema.$ref) return;
3221
+ let t = e[1], { ref: n, defId: r } = i(e);
3222
+ t.def = { ...t.schema }, r && (t.defId = r);
3223
+ let a = t.schema;
3224
+ for (let e in a) delete a[e];
3225
+ a.$ref = n;
3226
+ };
3227
+ if (e.cycles === "throw") for (let t of e.seen.entries()) {
3228
+ let e = t[1];
3229
+ if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
3230
+
3231
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
3232
+ }
3233
+ for (let n of e.seen.entries()) {
3234
+ let r = n[1];
3235
+ if (t === n[0]) {
3236
+ a(n);
3237
+ continue;
3238
+ }
3239
+ if (e.external) {
3240
+ let r = e.external.registry.get(n[0])?.id;
3241
+ if (t !== n[0] && r) {
3242
+ a(n);
3243
+ continue;
3244
+ }
3245
+ }
3246
+ if (e.metadataRegistry.get(n[0])?.id) {
3247
+ a(n);
3248
+ continue;
3249
+ }
3250
+ if (r.cycle) {
3251
+ a(n);
3252
+ continue;
3253
+ }
3254
+ r.count > 1 && e.reused === "ref" && a(n);
3255
+ }
3256
+ e.external && (e.sharedDefsExtractedFor = e.external);
3257
+ }
3258
+ function La(e) {
3259
+ let t = e.anyOf;
3260
+ if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
3261
+ let n = [];
3262
+ for (let e of t) {
3263
+ if (!e || typeof e != "object") return;
3264
+ La(e);
3265
+ let t = Object.keys(e);
3266
+ if (t.length !== 1 || t[0] !== "type") return;
3267
+ let r = e.type;
3268
+ for (let e of Array.isArray(r) ? r : [r]) {
3269
+ if (typeof e != "string") return;
3270
+ n.includes(e) || n.push(e);
3271
+ }
3272
+ }
3273
+ delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
3274
+ }
3275
+ var Ra = /* @__PURE__ */ new Set([
3276
+ "type",
3277
+ "properties",
3278
+ "required",
3279
+ "additionalProperties"
3280
+ ]), za = ["oneOf", "anyOf"];
3281
+ function Ba(e) {
3282
+ let t = e.additionalProperties;
3283
+ return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
3284
+ }
3285
+ function Va(e) {
3286
+ let t = [];
3287
+ for (let n of e) {
3288
+ if (typeof n != "object" || n.type !== "object") return null;
3289
+ for (let e in n) if (!Ra.has(e)) return null;
3290
+ t.push(n);
3291
+ }
3292
+ let n = {}, r = /* @__PURE__ */ new Set();
3293
+ for (let e of t) {
3294
+ for (let r in e.properties) {
3295
+ if (Object.prototype.hasOwnProperty.call(n, r)) continue;
3296
+ let e = [];
3297
+ for (let n of t) {
3298
+ let t = n.properties?.[r] ?? Ba(n);
3299
+ t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
3300
+ }
3301
+ u(n, r, e.length === 1 ? e[0] : Va(e) ?? { allOf: e });
3302
+ }
3303
+ for (let t of e.required ?? []) r.add(t);
3304
+ }
3305
+ let i = {
3306
+ type: "object",
3307
+ properties: n
3308
+ };
3309
+ if (r.size && (i.required = [...r]), t.every((e) => e.additionalProperties === !1)) i.additionalProperties = !1;
3310
+ else {
3311
+ let e = [];
3312
+ for (let n of t) {
3313
+ let t = Ba(n);
3314
+ t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
3315
+ }
3316
+ e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
3317
+ }
3318
+ return i;
3319
+ }
3320
+ function Ha(e) {
3321
+ let t = e.allOf;
3322
+ if (!Array.isArray(t) || t.length < 2) return;
3323
+ for (let t of Ra) if (t in e) return;
3324
+ let n = t.filter((e) => za.some((t) => Array.isArray(e[t]))), r = null;
3325
+ if (!n.length) r = Va(t);
3326
+ else {
3327
+ let e = n[0], i = za.find((t) => Array.isArray(e[t]));
3328
+ if (Object.keys(e).length !== 1) return;
3329
+ let a = t.filter((t) => t !== e), o = e[i].map((e) => Va([...a, e]));
3330
+ if (o.some((e) => !e)) return;
3331
+ r = { [i]: o };
3332
+ }
3333
+ r && (delete e.allOf, V(e, r));
3334
+ }
3335
+ function Ua(e, t) {
3336
+ let n = e.seen.get(t);
3337
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
3338
+ let r = (t) => {
3339
+ let n = e.seen.get(t);
3340
+ if (n.ref === null) return;
3341
+ let i = n.def ?? n.schema, a = { ...i }, o = n.ref;
3342
+ if (n.ref = null, o) {
3343
+ r(o);
3344
+ let n = e.seen.get(o), s = n.schema;
3345
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : V(i, s), V(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3346
+ 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];
3347
+ }
3348
+ let s = t._zod.parent;
3349
+ if (s && s !== o) {
3350
+ r(s);
3351
+ let t = e.seen.get(s);
3352
+ 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];
3353
+ }
3354
+ e.override({
3355
+ zodSchema: t,
3356
+ jsonSchema: i,
3357
+ path: n.path ?? []
3358
+ });
3359
+ };
3360
+ if (!e.external || e.sharedEmitDoneFor !== e.external) {
3361
+ for (let t of [...e.seen.entries()].reverse()) r(t[0]);
3362
+ if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) La(t[1].def ?? t[1].schema);
3363
+ for (let t of e.deferred) t();
3364
+ if (e.intersections.length) {
3365
+ let t = /* @__PURE__ */ new Map();
3366
+ for (let n of e.seen.values()) for (let e of [n.schema, n.def]) {
3367
+ let n = e?.allOf;
3368
+ if (!Array.isArray(n)) continue;
3369
+ let r = t.get(n);
3370
+ r ? r.push(e) : t.set(n, [e]);
3371
+ }
3372
+ for (let n of e.intersections) for (let e of t.get(n) ?? []) Ha(e);
3373
+ }
3374
+ }
3375
+ let i = {};
3376
+ 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) {
3377
+ let n = e.external.registry.get(t)?.id;
3378
+ if (!n) throw Error("Schema is missing an `id` property");
3379
+ i.$id = e.external.uri(n);
3380
+ }
3381
+ V(i, n.defId ? n.schema : n.def ?? n.schema);
3382
+ let a = e.metadataRegistry.get(t)?.id;
3383
+ a !== void 0 && i.id === a && delete i.id;
3384
+ let o = e.external?.defs ?? {};
3385
+ if (!e.external || e.sharedEmitDoneFor !== e.external) for (let t of e.seen.entries()) {
3386
+ let e = t[1];
3387
+ e.def && e.defId && (e.def.id === e.defId && delete e.def.id, u(o, e.defId, e.def));
3388
+ }
3389
+ e.external && (e.sharedEmitDoneFor = e.external), e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
3390
+ try {
3391
+ let n = JSON.parse(JSON.stringify(i));
3392
+ return Object.defineProperty(n, "~standard", {
3393
+ value: {
3394
+ ...t["~standard"],
3395
+ jsonSchema: {
3396
+ input: Ga(t, "input", e.processors),
3397
+ output: Ga(t, "output", e.processors)
3398
+ }
3399
+ },
3400
+ enumerable: !1,
3401
+ writable: !1
3402
+ }), n;
3403
+ } catch {
3404
+ throw Error("Error converting schema to JSON.");
3405
+ }
3406
+ }
3407
+ function W(e, t) {
3408
+ let n = t ?? { seen: /* @__PURE__ */ new Set() };
3409
+ if (n.seen.has(e)) return !1;
3410
+ n.seen.add(e);
3411
+ let r = e._zod.def;
3412
+ if (r.type === "transform") return !0;
3413
+ if (r.type === "array") return W(r.element, n);
3414
+ if (r.type === "set") return W(r.valueType, n);
3415
+ if (r.type === "lazy") return W(r.getter(), n);
3416
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return W(r.innerType, n);
3417
+ if (r.type === "intersection") return W(r.left, n) || W(r.right, n);
3418
+ if (r.type === "record" || r.type === "map") return W(r.keyType, n) || W(r.valueType, n);
3419
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : W(r.in, n) || W(r.out, n);
3420
+ if (r.type === "object") {
3421
+ for (let e in r.shape) if (W(r.shape[e], n)) return !0;
3422
+ return !1;
3423
+ }
3424
+ if (r.type === "union") {
3425
+ for (let e of r.options) if (W(e, n)) return !0;
3426
+ return !1;
3427
+ }
3428
+ if (r.type === "tuple") {
3429
+ for (let e of r.items) if (W(e, n)) return !0;
3430
+ return !!(r.rest && W(r.rest, n));
3431
+ }
3432
+ return !1;
3433
+ }
3434
+ var Wa = (e, t = {}) => (n) => {
3435
+ let r = Pa({
3436
+ ...n,
3437
+ processors: t
3438
+ });
3439
+ return U(e, r), Ia(r, e), Ua(r, e);
3440
+ }, Ga = (e, t, n = {}) => (r) => {
3441
+ let { libraryOptions: i, target: a } = r ?? {}, o = Pa({
3442
+ ...i ?? {},
3443
+ target: a,
3444
+ io: t,
3445
+ processors: n
3446
+ });
3447
+ return U(e, o), Ia(o, e), Ua(o, e);
3448
+ }, G = (e, t, n) => {
3449
+ (e[t] === void 0 || n > e[t]) && (e[t] = n);
3450
+ }, K = (e, t, n) => {
3451
+ (e[t] === void 0 || n < e[t]) && (e[t] = n);
3452
+ }, Ka = (e, t) => {
3453
+ G(e, "minimum", t), K(e, "maximum", t);
3454
+ }, qa = (e, t) => {
3455
+ e.multipleOf ??= [], e.multipleOf.includes(t) || e.multipleOf.push(t);
3456
+ }, Ja = (e, t) => {
3457
+ e.patterns ??= /* @__PURE__ */ new Set(), e.patterns.add(t);
3458
+ }, Ya = (e, t) => {
3459
+ e.mime = e.mime ? e.mime.filter((e) => t.includes(e)) : [...t];
3460
+ }, Xa = (e, t) => {
3461
+ e.format = t, t.includes("int") && (e.isInt = !0);
3462
+ }, Za = (e, t) => G(e, "minimum", t.minimum), Qa = (e, t) => K(e, "maximum", t.maximum), $a = (e) => (t, n) => {
3463
+ Xa(t, n.format);
3464
+ let [r, i] = e[n.format];
3465
+ G(t, "minimum", r), K(t, "maximum", i);
3466
+ }, eo = {
3467
+ greater_than: (e, t) => G(e, t.inclusive ? "minimum" : "exclusiveMinimum", t.value),
3468
+ less_than: (e, t) => K(e, t.inclusive ? "maximum" : "exclusiveMaximum", t.value),
3469
+ multiple_of: (e, t) => qa(e, t.value),
3470
+ number_format: $a(le),
3471
+ bigint_format: $a(ue),
3472
+ min_length: Za,
3473
+ max_length: Qa,
3474
+ length_equals: (e, t) => Ka(e, t.length),
3475
+ min_size: Za,
3476
+ max_size: Qa,
3477
+ size_equals: (e, t) => Ka(e, t.size),
3478
+ string_format: (e, t) => {
3479
+ Xa(e, t.format), t.pattern && Ja(e, t.pattern), (t.format === "base64" || t.format === "base64url") && (e.contentEncoding = t.format), (t.local || t.precision === -1) && (e.laxFormat = !0);
3480
+ },
3481
+ mime_type: (e, t) => Ya(e, t.mime)
3482
+ };
3483
+ function q(e) {
3484
+ let t = {}, n = e._zod.def, r = e._zod.traits.has("$ZodCheck") ? [e, ...n.checks ?? []] : n.checks ?? [];
3485
+ for (let e of r) eo[e._zod.def.check]?.(t, e._zod.def);
3486
+ let i = e._zod.bag;
3487
+ i.minimum !== void 0 && G(t, "minimum", i.minimum), i.exclusiveMinimum !== void 0 && G(t, "exclusiveMinimum", i.exclusiveMinimum), i.maximum !== void 0 && K(t, "maximum", i.maximum), i.exclusiveMaximum !== void 0 && K(t, "exclusiveMaximum", i.exclusiveMaximum), i.multipleOf !== void 0 && qa(t, i.multipleOf), i.format !== void 0 && (t.format ??= i.format, i.format.includes("int") && (t.isInt = !0)), i.mime && Ya(t, i.mime);
3488
+ for (let e of i.patterns ?? []) Ja(t, e);
3489
+ return t;
3490
+ }
3491
+ var to = {
3492
+ guid: "uuid",
3493
+ url: "uri",
3494
+ datetime: "date-time",
3495
+ json_string: "json-string",
3496
+ regex: ""
3497
+ }, no = /* @__PURE__ */ new Map([[er, Ft], [nr, It]]), ro = (e) => no.get(e) ?? e, io = (e, t, n, r) => {
3498
+ let i = n;
3499
+ i.type = "string";
3500
+ let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = q(e);
3501
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = to[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3502
+ let e = [...c].map(ro);
3503
+ e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
3504
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3505
+ pattern: e.source
3506
+ }))]);
3507
+ }
3508
+ }, ao = (e, t, n, r) => {
3509
+ let i = n, { minimum: a, maximum: o, multipleOf: s, exclusiveMaximum: c, exclusiveMinimum: l, isInt: u } = q(e);
3510
+ i.type = u ? "integer" : "number";
3511
+ let d = typeof l == "number" && l >= (a ?? -Infinity), f = typeof c == "number" && c <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
3512
+ if (d ? p ? (i.minimum = l, i.exclusiveMinimum = !0) : i.exclusiveMinimum = l : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = c, i.exclusiveMaximum = !0) : i.exclusiveMaximum = c : typeof o == "number" && (i.maximum = o), s) {
3513
+ let n = /* @__PURE__ */ new Set();
3514
+ for (let a of s) Number.isFinite(a) && a !== 0 ? n.add(Math.abs(a)) : H(e, t, i, r, `A multipleOf divisor of ${a} cannot be represented in JSON Schema`);
3515
+ let [a, ...o] = n;
3516
+ a !== void 0 && (i.multipleOf = a), o.length && (i.allOf = [...i.allOf ?? [], ...o.map((e) => ({ multipleOf: e }))]);
3517
+ }
3518
+ }, oo = (e, t, n, r) => {
3519
+ n.type = "boolean";
3520
+ }, so = (e, t, n, r) => {
3521
+ H(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3522
+ }, co = (e, t, n, r) => {
3523
+ H(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3524
+ }, lo = (e, t, n, r) => {
3525
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3526
+ }, uo = (e, t, n, r) => {
3527
+ H(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3528
+ }, fo = (e, t, n, r) => {
3529
+ H(e, t, n, r, "Void cannot be represented in JSON Schema");
3530
+ }, po = (e, t, n, r) => {
3531
+ n.not = {};
3532
+ }, mo = (e, t, n, r) => {}, ho = (e, t, n, r) => {}, go = (e, t, n, r) => {
3533
+ H(e, t, n, r, "Date cannot be represented in JSON Schema");
3534
+ }, _o = (t, n, r, i) => {
3535
+ let a = t._zod.def, o = e(a.entries);
3536
+ if (o.length === 0) {
3537
+ r.not = {};
3538
+ return;
3539
+ }
3540
+ o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
3541
+ }, vo = (e, t, n, r) => {
3542
+ let i = e._zod.def;
3543
+ if (i.values.length === 0) {
3544
+ n.not = {};
3545
+ return;
3546
+ }
3547
+ let a = [];
3548
+ for (let o of i.values) if (o === void 0) {
3549
+ if (H(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3550
+ } else if (typeof o == "bigint") {
3551
+ if (H(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3552
+ a.push(Number(o));
3553
+ } else a.push(o);
3554
+ if (a.length !== 0) {
3555
+ if (a.length === 1) {
3556
+ let e = a[0];
3557
+ n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
3558
+ } 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;
3559
+ }
3560
+ }, yo = (e, t, n, r) => {
3561
+ H(e, t, n, r, "NaN cannot be represented in JSON Schema");
3562
+ }, bo = (e, t, n, r) => {
3563
+ let i = n, a = e._zod.pattern;
3564
+ if (!a) throw Error("Pattern not found in template literal");
3565
+ i.type = "string", i.pattern = a.source;
3566
+ }, xo = (e, t, n, r) => {
3567
+ let i = n;
3568
+ i.type = "string", i.format = "binary", i.contentEncoding = "binary";
3569
+ let { minimum: a, maximum: o, mime: s } = q(e);
3570
+ a !== void 0 && (i.minLength = a), o !== void 0 && (i.maxLength = o), s && (s.length === 0 ? i.not = {} : s.length === 1 ? i.contentMediaType = s[0] : i.anyOf = s.map((e) => ({ contentMediaType: e })));
3571
+ }, So = (e, t, n, r) => {
3572
+ n.type = "boolean";
3573
+ }, Co = (e, t, n, r) => {
3574
+ H(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3575
+ }, wo = (e, t, n, r) => {
3576
+ H(e, t, n, r, "Function types cannot be represented in JSON Schema");
3577
+ }, To = (e, t, n, r) => {
3578
+ H(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3579
+ }, Eo = (e, t, n, r) => {
3580
+ H(e, t, n, r, "Map cannot be represented in JSON Schema");
3581
+ }, Do = (e, t, n, r) => {
3582
+ H(e, t, n, r, "Set cannot be represented in JSON Schema");
3583
+ }, Oo = (e, t, n, r) => {
3584
+ let i = n, a = e._zod.def, { minimum: o, maximum: s } = q(e);
3585
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = U(a.element, t, {
3586
+ ...r,
3587
+ path: [...r.path, "items"]
3588
+ });
3589
+ };
3590
+ function J(e) {
3591
+ let t = e._zod.def;
3592
+ return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? J(t.out) : t.type === "catch" ? J(t.innerType) : e._zod.optin;
3593
+ }
3594
+ var ko = (e, t, n, r) => {
3595
+ let i = n, a = e._zod.def, o = a.shape;
3596
+ if (Object.getOwnPropertySymbols(o).length && H(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3597
+ i.type = "object", i.properties = {};
3598
+ for (let e in o) u(i.properties, e, U(o[e], t, {
3599
+ ...r,
3600
+ path: [
3601
+ ...r.path,
3602
+ "properties",
3603
+ e
3604
+ ]
3605
+ }));
3606
+ let s = [];
3607
+ for (let e of Object.keys(o)) {
3608
+ let n = a.shape[e];
3609
+ (t.io === "input" ? J(n) === void 0 : n._zod.optout === void 0) && s.push(e);
3610
+ }
3611
+ s.length > 0 && (i.required = s), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = U(a.catchall, t, {
3612
+ ...r,
3613
+ path: [...r.path, "additionalProperties"]
3614
+ })) : t.io === "output" && (i.additionalProperties = !1);
3615
+ }, Ao = (e, t, n, r) => {
3616
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => U(e, t, {
3617
+ ...r,
3618
+ path: [
3619
+ ...r.path,
3620
+ a ? "oneOf" : "anyOf",
3621
+ n
3622
+ ]
3623
+ }));
3624
+ a ? n.oneOf = o : n.anyOf = o;
3625
+ }, jo = (e, t, n, r) => {
3626
+ let i = e._zod.def, a = U(i.left, t, {
3627
+ ...r,
3628
+ path: [
3629
+ ...r.path,
3630
+ "allOf",
3631
+ 0
3632
+ ]
3633
+ }), o = U(i.right, t, {
3634
+ ...r,
3635
+ path: [
3636
+ ...r.path,
3637
+ "allOf",
3638
+ 1
3639
+ ]
3640
+ }), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
3641
+ n.allOf = c, t.intersections.push(c);
3642
+ }, Mo = (e, t, n, r) => {
3643
+ let i = n, a = e._zod.def;
3644
+ i.type = "array";
3645
+ let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => U(e, t, {
3646
+ ...r,
3647
+ path: [
3648
+ ...r.path,
3649
+ o,
3650
+ n
3651
+ ]
3652
+ })), l = a.rest ? U(a.rest, t, {
3653
+ ...r,
3654
+ path: [
3655
+ ...r.path,
3656
+ s,
3657
+ ...t.target === "openapi-3.0" ? [a.items.length] : []
3658
+ ]
3659
+ }) : null, u = a.items.length;
3660
+ for (; u > 0;) {
3661
+ let e = a.items[u - 1];
3662
+ if (!(t.io === "input" ? J(e) !== void 0 : e._zod.optout === "optional")) break;
3663
+ u--;
3664
+ }
3665
+ let d = a.items.length, f = !a.rest;
3666
+ t.target === "draft-2020-12" ? (i.prefixItems = c, f ? i.items = !1 : l && (i.items = l), u > 0 && (i.minItems = u), f && (i.maxItems = d)) : t.target === "openapi-3.0" ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), u > 0 && (i.minItems = u), f && (i.maxItems = d)) : (i.items = c, f ? i.additionalItems = !1 : l && (i.additionalItems = l), u > 0 && (i.minItems = u), f && (i.maxItems = d));
3667
+ let { minimum: p, maximum: m } = q(e);
3668
+ typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
3669
+ };
3670
+ function No(e, t, n) {
3671
+ if (t.$ref) {
3672
+ if (n.has(t)) return t;
3673
+ n.add(t);
3674
+ let r = e.get(t)?.def;
3675
+ if (!r) return t;
3676
+ let i = No(e, r, n);
3677
+ return i === r ? t : i;
3678
+ }
3679
+ for (let r of ["anyOf", "oneOf"]) {
3680
+ let i = t[r];
3681
+ if (!Array.isArray(i)) continue;
3682
+ let a = i.map((t) => No(e, t, n));
3683
+ a.some((e, t) => e !== i[t]) && (t = {
3684
+ ...t,
3685
+ [r]: a
3686
+ });
3687
+ }
3688
+ let r = Array.isArray(t.type) ? t.type : [t.type], i = !r.includes("string") && r.some((e) => e === "number" || e === "integer"), a = t.enum ?? (t.const === void 0 ? void 0 : [t.const]);
3689
+ if (!i && !a?.some((e) => typeof e == "number")) return t;
3690
+ let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
3691
+ return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? qt : Kt).source), p) : p;
3692
+ }
3693
+ var Po = /* @__PURE__ */ new WeakMap();
3694
+ function Fo(e) {
3695
+ let t = /* @__PURE__ */ new Map();
3696
+ for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
3697
+ let n = /* @__PURE__ */ new Map();
3698
+ for (let r of Po.get(e) ?? []) {
3699
+ let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
3700
+ if (!a || a === !0 || n.has(a)) continue;
3701
+ let o = No(t, a, /* @__PURE__ */ new Set());
3702
+ o !== a && n.set(a, o);
3703
+ }
3704
+ if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
3705
+ let t = e && n.get(e.propertyNames);
3706
+ t && (e.propertyNames = t);
3707
+ }
3708
+ }
3709
+ var Io = (e, t, n, r) => {
3710
+ let i = n, a = e._zod.def;
3711
+ i.type = "object";
3712
+ let o = a.keyType, s = q(o).patterns;
3713
+ if (a.mode === "loose" && s && s.size > 0) {
3714
+ let e = U(a.valueType, t, {
3715
+ ...r,
3716
+ path: [
3717
+ ...r.path,
3718
+ "patternProperties",
3719
+ "*"
3720
+ ]
3721
+ });
3722
+ i.patternProperties = {};
3723
+ for (let t of s) u(i.patternProperties, ro(t).source, e);
3724
+ } else {
3725
+ if (t.target === "draft-07" || t.target === "draft-2020-12") {
3726
+ i.propertyNames = U(a.keyType, t, {
3727
+ ...r,
3728
+ path: [...r.path, "propertyNames"]
3729
+ });
3730
+ let n = Po.get(t);
3731
+ n || (n = [], Po.set(t, n), t.deferred.push(() => Fo(t))), n.push(e);
3732
+ }
3733
+ i.additionalProperties = U(a.valueType, t, {
3734
+ ...r,
3735
+ path: [...r.path, "additionalProperties"]
3736
+ });
3737
+ }
3738
+ let c = o._zod.values, l = t.io === "input" && J(a.valueType) !== void 0;
3739
+ if (c && !a.partial && !l) {
3740
+ let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
3741
+ e.length > 0 && (i.required = e.map(String));
3742
+ }
3743
+ }, Lo = (e, t, n, r) => {
3744
+ let i = e._zod.def, a = U(i.innerType, t, r), o = t.seen.get(e);
3745
+ t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3746
+ }, Ro = (e, t, n, r) => {
3747
+ let i = e._zod.def;
3748
+ U(i.innerType, t, r);
3749
+ let a = t.seen.get(e);
3750
+ a.ref = i.innerType;
3751
+ }, zo = Symbol();
3752
+ function Bo(e, t, n, r, i) {
3753
+ let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
3754
+ return a ? (H(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), zo) : JSON.parse(o);
3755
+ }
3756
+ var Vo = (e, t, n, r) => {
3757
+ let i = e._zod.def;
3758
+ U(i.innerType, t, r);
3759
+ let a = t.seen.get(e);
3760
+ a.ref = i.innerType;
3761
+ let o = Bo(i.defaultValue, e, t, n, r);
3762
+ o !== zo && (n.default = o);
3763
+ }, Ho = (e, t, n, r) => {
3764
+ let i = e._zod.def;
3765
+ U(i.innerType, t, r);
3766
+ let a = t.seen.get(e);
3767
+ if (a.ref = i.innerType, t.io !== "input") return;
3768
+ let o = Bo(i.defaultValue, e, t, n, r);
3769
+ o !== zo && (n._prefault = o);
3770
+ }, Uo = (e, t, n, r) => {
3771
+ let i = e._zod.def;
3772
+ U(i.innerType, t, r);
3773
+ let a = t.seen.get(e);
3774
+ a.ref = i.innerType;
3775
+ let o;
3776
+ try {
3777
+ o = i.catchValue(void 0);
3778
+ } catch {
3779
+ H(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3780
+ return;
3781
+ }
3782
+ n.default = o;
3783
+ }, Wo = (e, t, n, r) => {
3784
+ let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
3785
+ U(o, t, r);
3786
+ let s = t.seen.get(e);
3787
+ s.ref = o;
3788
+ }, Go = (e, t, n, r) => {
3789
+ let i = e._zod.def;
3790
+ U(i.innerType, t, r);
3791
+ let a = t.seen.get(e);
3792
+ a.ref = i.innerType, n.readOnly = !0;
3793
+ }, Ko = (e, t, n, r) => {
3794
+ let i = e._zod.def;
3795
+ U(i.innerType, t, r);
3796
+ let a = t.seen.get(e);
3797
+ a.ref = i.innerType;
3798
+ }, qo = (e, t, n, r) => {
3799
+ let i = e._zod.def;
3800
+ U(i.innerType, t, r);
3801
+ let a = t.seen.get(e);
3802
+ a.ref = i.innerType;
3803
+ }, Jo = (e, t, n, r) => {
3804
+ let i = e._zod.innerType;
3805
+ U(i, t, r);
3806
+ let a = t.seen.get(e);
3807
+ a.ref = i;
3808
+ }, Yo = {
3809
+ string: io,
3810
+ number: ao,
3811
+ boolean: oo,
3812
+ bigint: so,
3813
+ symbol: co,
3814
+ null: lo,
3815
+ undefined: uo,
3816
+ void: fo,
3817
+ never: po,
3818
+ any: mo,
3819
+ unknown: ho,
3820
+ date: go,
3821
+ enum: _o,
3822
+ literal: vo,
3823
+ nan: yo,
3824
+ template_literal: bo,
3825
+ file: xo,
3826
+ success: So,
3827
+ custom: Co,
3828
+ function: wo,
3829
+ transform: To,
3830
+ map: Eo,
3831
+ set: Do,
3832
+ array: Oo,
3833
+ object: ko,
3834
+ union: Ao,
3835
+ intersection: jo,
3836
+ tuple: Mo,
3837
+ record: Io,
3838
+ nullable: Lo,
3839
+ nonoptional: Ro,
3840
+ default: Vo,
3841
+ prefault: Ho,
3842
+ catch: Uo,
3843
+ pipe: Wo,
3844
+ readonly: Go,
3845
+ promise: Ko,
3846
+ optional: qo,
3847
+ lazy: Jo
3848
+ };
3849
+ function Xo(e, t) {
3850
+ if ("_idmap" in e) {
3851
+ let n = e, r = Pa({
3852
+ ...t,
3853
+ processors: Yo
3854
+ }), i = {};
3855
+ for (let e of n._idmap.entries()) {
3856
+ let [t, n] = e;
3857
+ U(n, r);
3858
+ }
3859
+ let a = {};
3860
+ r.external = {
3861
+ registry: n,
3862
+ uri: t?.uri,
3863
+ defs: i
3864
+ };
3865
+ for (let e of n._idmap.entries()) {
3866
+ let [t, n] = e;
3867
+ Ia(r, n), u(a, t, Ua(r, n));
3868
+ }
3869
+ return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
3870
+ }
3871
+ let n = Pa({
3872
+ ...t,
3873
+ processors: Yo
3874
+ });
3875
+ return U(e, n), Ia(n, e), Ua(n, e);
3876
+ }
3877
+ //#endregion
3878
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
3879
+ var Zo = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3880
+ function Y(e, t, n) {
3881
+ Object.defineProperty(e, t, {
3882
+ configurable: !0,
3883
+ enumerable: !1,
3884
+ get() {
3885
+ let e = n(this);
3886
+ return Object.defineProperty(this, t, {
3887
+ value: e,
3888
+ configurable: !0,
3889
+ writable: !0
3890
+ }), e;
3891
+ },
3892
+ set(e) {
3893
+ Object.defineProperty(this, t, {
3894
+ value: e,
3895
+ configurable: !0,
3896
+ writable: !0
3897
+ });
3898
+ }
3899
+ });
3900
+ }
3901
+ var Qo = (e, t) => {
3902
+ qe.init(e, t), e.name = "ZodError";
3903
+ let r = Object.getPrototypeOf(e);
3904
+ Zo.has(r) || (Zo.add(r), Y(r, "format", (e) => (t) => Xe(e, t)), Y(r, "flatten", (e) => (t) => Ye(e, t)), Y(r, "addIssue", (e) => (t) => {
3905
+ e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
3906
+ }), Y(r, "addIssues", (e) => (t) => {
3907
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
3908
+ }), Object.defineProperty(r, "isEmpty", {
3909
+ configurable: !0,
3910
+ enumerable: !1,
3911
+ get() {
3912
+ return this.issues.length === 0;
3913
+ }
3914
+ }));
3915
+ }, $o = /*@__PURE__*/ A("ZodError", Qo), X = /*@__PURE__*/ A("ZodError", Qo, void 0, { Parent: Error }), es = /* @__PURE__ */ et(X), ts = /* @__PURE__ */ tt(X), ns = /* @__PURE__ */ nt(X), rs = /* @__PURE__ */ it(X), is = /* @__PURE__ */ ut(X), as = /* @__PURE__ */ dt(X), os = /* @__PURE__ */ ft(X), ss = /* @__PURE__ */ pt(X), cs = /* @__PURE__ */ mt(X), ls = /* @__PURE__ */ ht(X), us = /* @__PURE__ */ gt(X), ds = /* @__PURE__ */ _t(X);
3916
+ //#endregion
3917
+ //#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
3918
+ function fs() {
3919
+ M.localeError || N(bi());
3920
+ }
3921
+ function Z() {
3922
+ M.memoizer || N({ memoizer: _i() });
3923
+ }
3924
+ var Q = /*@__PURE__*/ A("ZodType", (e, t) => (fs(), F.init(e, t), e.def = t, e.type = t.type, e), {
3925
+ check(...e) {
3926
+ let t = this.def;
3927
+ return this.clone(g(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
3928
+ check: e,
3929
+ def: { check: "custom" },
3930
+ onattach: []
3931
+ } } : e)] }), { parent: !0 });
3932
+ },
3933
+ with(...e) {
3934
+ return this.check(...e);
3935
+ },
3936
+ clone(e, t) {
3937
+ return b(this, e, t);
3938
+ },
3939
+ brand() {
3940
+ return this;
3941
+ },
3942
+ register(e, t) {
3943
+ return e.add(this, t), this;
3944
+ },
3945
+ refine(e, t) {
3946
+ return this.check(Gc(e, t));
3947
+ },
3948
+ superRefine(e, t) {
3949
+ return this.check(Kc(e, t));
3950
+ },
3951
+ overwrite(e) {
3952
+ return this.check(/* @__PURE__ */ B(e));
3953
+ },
3954
+ optional() {
3955
+ return Sc(this);
3956
+ },
3957
+ exactOptional() {
3958
+ return wc(this);
3959
+ },
3960
+ nullable() {
3961
+ return Ec(this);
3962
+ },
3963
+ nullish() {
3964
+ return Sc(Ec(this));
3965
+ },
3966
+ nonoptional(e) {
3967
+ return Mc(this, e);
3968
+ },
3969
+ array() {
3970
+ return tc(this);
3971
+ },
3972
+ or(e) {
3973
+ return oc([this, e]);
3974
+ },
3975
+ and(e) {
3976
+ return uc(this, e);
3977
+ },
3978
+ transform(e) {
3979
+ return Rc(this, bc(e));
3980
+ },
3981
+ default(e) {
3982
+ return Oc(this, e);
3983
+ },
3984
+ prefault(e) {
3985
+ return Ac(this, e);
3986
+ },
3987
+ catch(e) {
3988
+ return Pc(this, e);
3989
+ },
3990
+ pipe(e) {
3991
+ return Rc(this, e);
3992
+ },
3993
+ readonly() {
3994
+ return Bc(this);
3995
+ },
3996
+ describe(e) {
3997
+ let t = this.clone();
3998
+ return z.add(t, { description: e }), t;
3999
+ },
4000
+ meta(...e) {
4001
+ if (e.length === 0) return z.get(this);
4002
+ let t = this.clone();
4003
+ return z.add(t, e[0]), t;
4004
+ },
4005
+ isOptional() {
4006
+ return this.safeParse(void 0).success;
4007
+ },
4008
+ isNullable() {
4009
+ return this.safeParse(null).success;
4010
+ },
4011
+ apply(e, ...t) {
4012
+ return t.length === 0 ? e(this) : e(this, ...t);
4013
+ },
4014
+ get "~standard"() {
4015
+ return De(this, "~standard", {
4016
+ ...Sn(this),
4017
+ jsonSchema: {
4018
+ input: Ga(this, "input"),
4019
+ output: Ga(this, "output")
4020
+ }
4021
+ });
4022
+ },
4023
+ set "~standard"(e) {
4024
+ D(this, "~standard", e);
4025
+ },
4026
+ parse: function e(t, n) {
4027
+ return es(this, t, n, { callee: e });
4028
+ },
4029
+ parseAsync: async function e(t, n) {
4030
+ return await ts(this, t, n, { callee: e });
4031
+ },
4032
+ safeParse(e, t) {
4033
+ return ns(this, e, t);
4034
+ },
4035
+ async safeParseAsync(e, t) {
4036
+ return rs(this, e, t);
4037
+ },
4038
+ get spa() {
4039
+ return this?.safeParseAsync;
4040
+ },
4041
+ set spa(e) {
4042
+ D(this, "spa", e);
4043
+ },
4044
+ validate(e, t) {
4045
+ return st(this, e, t);
4046
+ },
4047
+ validateAsync(e, t) {
4048
+ return lt(this, e, t);
4049
+ },
4050
+ encode: function e(t, n) {
4051
+ return is(this, t, n, { callee: e });
4052
+ },
4053
+ decode: function e(t, n) {
4054
+ return as(this, t, n, { callee: e });
4055
+ },
4056
+ encodeAsync: async function e(t, n) {
4057
+ return await os(this, t, n, { callee: e });
4058
+ },
4059
+ decodeAsync: async function e(t, n) {
4060
+ return await ss(this, t, n, { callee: e });
4061
+ },
4062
+ safeEncode(e, t) {
4063
+ return cs(this, e, t);
4064
+ },
4065
+ safeDecode(e, t) {
4066
+ return ls(this, e, t);
4067
+ },
4068
+ async safeEncodeAsync(e, t) {
4069
+ return us(this, e, t);
4070
+ },
4071
+ async safeDecodeAsync(e, t) {
4072
+ return ds(this, e, t);
4073
+ },
4074
+ toJSONSchema(e) {
4075
+ return Wa(this, {})(e);
4076
+ },
4077
+ get description() {
4078
+ return z.get(this)?.description;
4079
+ },
4080
+ get _def() {
4081
+ return this._zod.def;
4082
+ }
4083
+ }), ps = /*@__PURE__*/ A("_ZodString", (e, t) => {
4084
+ Cn.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r);
4085
+ }, /*@__PURE__*/ Oe({
4086
+ format: (e) => q(e).format ?? null,
4087
+ minLength: (e) => q(e).minimum ?? null,
4088
+ maxLength: (e) => q(e).maximum ?? null
4089
+ }, {
4090
+ regex(...e) {
4091
+ return this.check(/* @__PURE__ */ _a(...e));
4092
+ },
4093
+ includes(...e) {
4094
+ return this.check(/* @__PURE__ */ ba(...e));
4095
+ },
4096
+ startsWith(...e) {
4097
+ return this.check(/* @__PURE__ */ xa(...e));
4098
+ },
4099
+ endsWith(...e) {
4100
+ return this.check(/* @__PURE__ */ Sa(...e));
4101
+ },
4102
+ min(...e) {
4103
+ return this.check(/* @__PURE__ */ ha(...e));
4104
+ },
4105
+ max(...e) {
4106
+ return this.check(/* @__PURE__ */ ma(...e));
4107
+ },
4108
+ length(...e) {
4109
+ return this.check(/* @__PURE__ */ ga(...e));
4110
+ },
4111
+ nonempty(...e) {
4112
+ return this.check(/* @__PURE__ */ ha(1, ...e));
4113
+ },
4114
+ lowercase(e) {
4115
+ return this.check(/* @__PURE__ */ va(e));
4116
+ },
4117
+ uppercase(e) {
4118
+ return this.check(/* @__PURE__ */ ya(e));
4119
+ },
4120
+ trim() {
4121
+ return this.check(/* @__PURE__ */ Ta());
4122
+ },
4123
+ normalize(...e) {
4124
+ return this.check(/* @__PURE__ */ wa(...e));
4125
+ },
4126
+ toLowerCase() {
4127
+ return this.check(/* @__PURE__ */ Ea());
4128
+ },
4129
+ toUpperCase() {
4130
+ return this.check(/* @__PURE__ */ Da());
4131
+ },
4132
+ slugify() {
4133
+ return this.check(/* @__PURE__ */ Oa());
4134
+ }
4135
+ })), ms = /*@__PURE__*/ A("ZodString", (e, t) => {
4136
+ Cn.init(e, t), ps.init(e, t);
4137
+ }, {
4138
+ email(e) {
4139
+ return this.check(/* @__PURE__ */ Di(bs, e));
4140
+ },
4141
+ url(e) {
4142
+ return this.check(/* @__PURE__ */ Ni(Cs, e));
4143
+ },
4144
+ jwt(e) {
4145
+ return this.check(/* @__PURE__ */ Ji(Rs, e));
4146
+ },
4147
+ emoji(e) {
4148
+ return this.check(/* @__PURE__ */ Pi(ws, e));
4149
+ },
4150
+ guid(e) {
4151
+ return this.check(/* @__PURE__ */ Oi(xs, e));
4152
+ },
4153
+ uuid(e) {
4154
+ return this.check(/* @__PURE__ */ ki(Ss, e));
4155
+ },
4156
+ uuidv4(e) {
4157
+ return this.check(/* @__PURE__ */ Ai(Ss, e));
4158
+ },
4159
+ uuidv6(e) {
4160
+ return this.check(/* @__PURE__ */ ji(Ss, e));
4161
+ },
4162
+ uuidv7(e) {
4163
+ return this.check(/* @__PURE__ */ Mi(Ss, e));
4164
+ },
4165
+ nanoid(e) {
4166
+ return this.check(/* @__PURE__ */ Fi(Ts, e));
4167
+ },
4168
+ cuid(e) {
4169
+ return this.check(/* @__PURE__ */ Ii(Es, e));
4170
+ },
4171
+ cuid2(e) {
4172
+ return this.check(/* @__PURE__ */ Li(Ds, e));
4173
+ },
4174
+ ulid(e) {
4175
+ return this.check(/* @__PURE__ */ Ri(Os, e));
4176
+ },
4177
+ base64(e) {
4178
+ return this.check(/* @__PURE__ */ Gi(Fs, e));
4179
+ },
4180
+ base64url(e) {
4181
+ return this.check(/* @__PURE__ */ Ki(Is, e));
4182
+ },
4183
+ xid(e) {
4184
+ return this.check(/* @__PURE__ */ zi(ks, e));
4185
+ },
4186
+ ksuid(e) {
4187
+ return this.check(/* @__PURE__ */ Bi(As, e));
4188
+ },
4189
+ ipv4(e) {
4190
+ return this.check(/* @__PURE__ */ Vi(js, e));
4191
+ },
4192
+ ipv6(e) {
4193
+ return this.check(/* @__PURE__ */ Hi(Ms, e));
4194
+ },
4195
+ cidrv4(e) {
4196
+ return this.check(/* @__PURE__ */ Ui(Ns, e));
4197
+ },
4198
+ cidrv6(e) {
4199
+ return this.check(/* @__PURE__ */ Wi(Ps, e));
4200
+ },
4201
+ e164(e) {
4202
+ return this.check(/* @__PURE__ */ qi(Ls, e));
4203
+ },
4204
+ datetime(e) {
4205
+ return this.check(/* @__PURE__ */ Yi(gs, e));
4206
+ },
4207
+ date(e) {
4208
+ return this.check(/* @__PURE__ */ Xi(_s, e));
4209
+ },
4210
+ time(e) {
4211
+ return this.check(/* @__PURE__ */ Zi(vs, e));
4212
+ },
4213
+ duration(e) {
4214
+ return this.check(/* @__PURE__ */ Qi(ys, e));
4215
+ }
4216
+ });
4217
+ function hs(e) {
4218
+ return /* @__PURE__ */ Ti(ms, e);
4219
+ }
4220
+ var $ = /*@__PURE__*/ A("ZodStringFormat", (e, t) => {
4221
+ I.init(e, t), ps.init(e, t);
4222
+ }), gs = /*@__PURE__*/ A("ZodISODateTime", (e, t) => {
4223
+ Hn.init(e, t), $.init(e, t);
4224
+ }), _s = /*@__PURE__*/ A("ZodISODate", (e, t) => {
4225
+ Un.init(e, t), $.init(e, t);
4226
+ }), vs = /*@__PURE__*/ A("ZodISOTime", (e, t) => {
4227
+ Wn.init(e, t), $.init(e, t);
4228
+ }), ys = /*@__PURE__*/ A("ZodISODuration", (e, t) => {
4229
+ Gn.init(e, t), $.init(e, t);
4230
+ }), bs = /*@__PURE__*/ A("ZodEmail", (e, t) => {
4231
+ En.init(e, t), $.init(e, t);
4232
+ }), xs = /*@__PURE__*/ A("ZodGUID", (e, t) => {
4233
+ wn.init(e, t), $.init(e, t);
4234
+ }), Ss = /*@__PURE__*/ A("ZodUUID", (e, t) => {
4235
+ Tn.init(e, t), $.init(e, t);
4236
+ }), Cs = /*@__PURE__*/ A("ZodURL", (e, t) => {
4237
+ Pn.init(e, t), $.init(e, t);
4238
+ }), ws = /*@__PURE__*/ A("ZodEmoji", (e, t) => {
4239
+ Fn.init(e, t), $.init(e, t);
4240
+ }), Ts = /*@__PURE__*/ A("ZodNanoID", (e, t) => {
4241
+ In.init(e, t), $.init(e, t);
4242
+ }), Es = /*@__PURE__*/ A("ZodCUID", (e, t) => {
4243
+ Ln.init(e, t), $.init(e, t);
4244
+ }), Ds = /*@__PURE__*/ A("ZodCUID2", (e, t) => {
4245
+ Rn.init(e, t), $.init(e, t);
4246
+ }), Os = /*@__PURE__*/ A("ZodULID", (e, t) => {
4247
+ zn.init(e, t), $.init(e, t);
4248
+ }), ks = /*@__PURE__*/ A("ZodXID", (e, t) => {
4249
+ Bn.init(e, t), $.init(e, t);
4250
+ }), As = /*@__PURE__*/ A("ZodKSUID", (e, t) => {
4251
+ Vn.init(e, t), $.init(e, t);
4252
+ }), js = /*@__PURE__*/ A("ZodIPv4", (e, t) => {
4253
+ Kn.init(e, t), $.init(e, t);
4254
+ }), Ms = /*@__PURE__*/ A("ZodIPv6", (e, t) => {
4255
+ Yn.init(e, t), $.init(e, t);
4256
+ }), Ns = /*@__PURE__*/ A("ZodCIDRv4", (e, t) => {
4257
+ Xn.init(e, t), $.init(e, t);
4258
+ }), Ps = /*@__PURE__*/ A("ZodCIDRv6", (e, t) => {
4259
+ Qn.init(e, t), $.init(e, t);
4260
+ }), Fs = /*@__PURE__*/ A("ZodBase64", (e, t) => {
4261
+ tr.init(e, t), $.init(e, t);
4262
+ }), Is = /*@__PURE__*/ A("ZodBase64URL", (e, t) => {
4263
+ ir.init(e, t), $.init(e, t);
4264
+ }), Ls = /*@__PURE__*/ A("ZodE164", (e, t) => {
4265
+ ar.init(e, t), $.init(e, t);
4266
+ }), Rs = /*@__PURE__*/ A("ZodJWT", (e, t) => {
4267
+ sr.init(e, t), $.init(e, t);
4268
+ }), zs = /*@__PURE__*/ A("ZodNumber", (e, t) => {
4269
+ cr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.isFinite = !0;
4270
+ }, /*@__PURE__*/ Oe({
4271
+ minValue: (e) => {
4272
+ let { minimum: t, exclusiveMinimum: n } = q(e);
4273
+ return Math.max(t ?? -Infinity, n ?? -Infinity);
4274
+ },
4275
+ maxValue: (e) => {
4276
+ let { maximum: t, exclusiveMaximum: n } = q(e);
4277
+ return Math.min(t ?? Infinity, n ?? Infinity);
4278
+ },
4279
+ isInt: (e) => {
4280
+ let { isInt: t, multipleOf: n } = q(e);
4281
+ return !!t || !!n?.some(Number.isSafeInteger);
4282
+ },
4283
+ format: (e) => q(e).format ?? null
4284
+ }, {
4285
+ gt(e, t) {
4286
+ return this.check(/* @__PURE__ */ da(e, t));
4287
+ },
4288
+ gte(e, t) {
4289
+ return this.check(/* @__PURE__ */ fa(e, t));
4290
+ },
4291
+ min(e, t) {
4292
+ return this.check(/* @__PURE__ */ fa(e, t));
4293
+ },
4294
+ lt(e, t) {
4295
+ return this.check(/* @__PURE__ */ la(e, t));
4296
+ },
4297
+ lte(e, t) {
4298
+ return this.check(/* @__PURE__ */ ua(e, t));
4299
+ },
4300
+ max(e, t) {
4301
+ return this.check(/* @__PURE__ */ ua(e, t));
4302
+ },
4303
+ int(e) {
4304
+ return this.check(Hs(e));
4305
+ },
4306
+ safe(e) {
4307
+ return this.check(Hs(e));
4308
+ },
4309
+ positive(e) {
4310
+ return this.check(/* @__PURE__ */ da(0, e));
4311
+ },
4312
+ nonnegative(e) {
4313
+ return this.check(/* @__PURE__ */ fa(0, e));
4314
+ },
4315
+ negative(e) {
4316
+ return this.check(/* @__PURE__ */ la(0, e));
4317
+ },
4318
+ nonpositive(e) {
4319
+ return this.check(/* @__PURE__ */ ua(0, e));
4320
+ },
4321
+ multipleOf(e, t) {
4322
+ return this.check(/* @__PURE__ */ pa(e, t));
4323
+ },
4324
+ step(e, t) {
4325
+ return this.check(/* @__PURE__ */ pa(e, t));
4326
+ },
4327
+ finite() {
4328
+ return this;
4329
+ }
4330
+ }));
4331
+ function Bs(e) {
4332
+ return /* @__PURE__ */ $i(zs, e);
4333
+ }
4334
+ var Vs = /*@__PURE__*/ A("ZodNumberFormat", (e, t) => {
4335
+ lr.init(e, t), zs.init(e, t);
4336
+ });
4337
+ function Hs(e) {
4338
+ return /* @__PURE__ */ ta(Vs, e);
4339
+ }
4340
+ var Us = /*@__PURE__*/ A("ZodBoolean", (e, t) => {
4341
+ ur.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r);
4342
+ });
4343
+ function Ws(e) {
4344
+ return /* @__PURE__ */ na(Us, e);
4345
+ }
4346
+ var Gs = /*@__PURE__*/ A("ZodNull", (e, t) => {
4347
+ dr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => lo(e, t, n, r);
4348
+ });
4349
+ function Ks(e) {
4350
+ return /* @__PURE__ */ ra(Gs, e);
4351
+ }
4352
+ var qs = /*@__PURE__*/ A("ZodAny", (e, t) => {
4353
+ fr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
4354
+ });
4355
+ function Js() {
4356
+ return /* @__PURE__ */ ia(qs);
4357
+ }
4358
+ var Ys = /*@__PURE__*/ A("ZodUnknown", (e, t) => {
4359
+ pr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
4360
+ });
4361
+ function Xs() {
4362
+ return /* @__PURE__ */ aa(Ys);
4363
+ }
4364
+ var Zs = /*@__PURE__*/ A("ZodNever", (e, t) => {
4365
+ mr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => po(e, t, n, r);
4366
+ });
4367
+ function Qs(e) {
4368
+ return /* @__PURE__ */ oa(Zs, e);
4369
+ }
4370
+ var $s = /*@__PURE__*/ A("ZodDate", (e, t) => {
4371
+ hr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => go(e, t, n, r), e.min = (t, n) => e.check(/* @__PURE__ */ fa(t, n)), e.max = (t, n) => e.check(/* @__PURE__ */ ua(t, n));
4372
+ }, /*@__PURE__*/ Oe({
4373
+ minDate: (e) => {
4374
+ let { minimum: t } = q(e);
4375
+ return t ? new Date(t) : null;
4376
+ },
4377
+ maxDate: (e) => {
4378
+ let { maximum: t } = q(e);
4379
+ return t ? new Date(t) : null;
4380
+ }
4381
+ }, {})), ec = /*@__PURE__*/ A("ZodArray", (e, t) => {
4382
+ Z(), _r.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oo(e, t, n, r), e.element = t.element;
4383
+ }, {
4384
+ min(e, t) {
4385
+ return this.check(/* @__PURE__ */ ha(e, t));
4386
+ },
4387
+ nonempty(e) {
4388
+ return this.check(/* @__PURE__ */ ha(1, e));
4389
+ },
4390
+ max(e, t) {
4391
+ return this.check(/* @__PURE__ */ ma(e, t));
4392
+ },
4393
+ length(e, t) {
4394
+ return this.check(/* @__PURE__ */ ga(e, t));
4395
+ },
4396
+ unwrap() {
4397
+ return this.element;
4398
+ }
4399
+ });
4400
+ function tc(e, t) {
4401
+ return /* @__PURE__ */ ka(ec, e, t);
4402
+ }
4403
+ var nc = /*@__PURE__*/ A("ZodObject", (e, t) => {
4404
+ Z(), Cr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => ko(e, t, n, r), Ne(e, "shape", (e) => e._zod.def.shape, !1);
4405
+ }, {
4406
+ keyof() {
4407
+ return gc(Object.keys(this._zod.def.shape));
4408
+ },
4409
+ catchall(e) {
4410
+ return this.clone(g(this._zod.def, { catchall: e }));
4411
+ },
4412
+ passthrough() {
4413
+ return this.clone(g(this._zod.def, { catchall: Xs() }));
4414
+ },
4415
+ loose() {
4416
+ return this.clone(g(this._zod.def, { catchall: Xs() }));
4417
+ },
4418
+ strict() {
4419
+ return this.clone(g(this._zod.def, { catchall: Qs() }));
4420
+ },
4421
+ strip() {
4422
+ return this.clone(g(this._zod.def, { catchall: void 0 }));
4423
+ },
4424
+ extend(e) {
4425
+ return me(this, e);
4426
+ },
4427
+ safeExtend(e) {
4428
+ return ge(this, e);
4429
+ },
4430
+ merge(e) {
4431
+ return _e(this, e);
4432
+ },
4433
+ pick(e) {
4434
+ return de(this, e);
4435
+ },
4436
+ omit(e) {
4437
+ return pe(this, e);
4438
+ },
4439
+ partial(...e) {
4440
+ return ve(xc, this, e[0]);
4441
+ },
4442
+ exactPartial(...e) {
4443
+ return ve(Cc, this, e[0], "exactPartial");
4444
+ },
4445
+ required(...e) {
4446
+ return ye(jc, this, e[0]);
4447
+ }
4448
+ });
4449
+ function rc(e, t) {
4450
+ return new nc({
4451
+ type: "object",
4452
+ shape: e ?? {},
4453
+ ...x(t)
4454
+ });
4455
+ }
4456
+ function ic(e, t) {
4457
+ return new nc({
4458
+ type: "object",
4459
+ shape: e,
4460
+ catchall: Xs(),
4461
+ ...x(t)
4462
+ });
4463
+ }
4464
+ var ac = /*@__PURE__*/ A("ZodUnion", (e, t) => {
4465
+ Tr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ao(e, t, n, r), e.options = t.options;
4466
+ });
4467
+ function oc(e, t) {
4468
+ return new ac({
4469
+ type: "union",
4470
+ options: e,
4471
+ ...x(t)
4472
+ });
4473
+ }
4474
+ var sc = /*@__PURE__*/ A("ZodDiscriminatedUnion", (e, t) => {
4475
+ ac.init(e, t), Dr.init(e, t);
4476
+ });
4477
+ function cc(e, t, n) {
4478
+ return new sc({
4479
+ type: "union",
4480
+ options: t,
4481
+ discriminator: e,
4482
+ ...x(n)
4483
+ });
4484
+ }
4485
+ var lc = /*@__PURE__*/ A("ZodIntersection", (e, t) => {
4486
+ Or.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => jo(e, t, n, r);
4487
+ });
4488
+ function uc(e, t) {
4489
+ return new lc({
4490
+ type: "intersection",
4491
+ left: e,
4492
+ right: t
4493
+ });
4494
+ }
4495
+ var dc = /*@__PURE__*/ A("ZodTuple", (e, t) => {
4496
+ Z(), jr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Mo(e, t, n, r);
4497
+ }, {
4498
+ rest(e) {
4499
+ return this.clone({
4500
+ ...this._zod.def,
4501
+ rest: e
4502
+ });
4503
+ },
4504
+ partial() {
4505
+ let e = this._zod.def;
4506
+ if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
4507
+ return this.clone({
4508
+ ...e,
4509
+ items: e.items.map((e) => new xc({
4510
+ type: "optional",
4511
+ innerType: e
4512
+ }))
4513
+ });
4514
+ }
4515
+ });
4516
+ function fc(e, t, n) {
4517
+ let r = t instanceof F;
4518
+ return new dc({
4519
+ type: "tuple",
4520
+ items: e,
4521
+ rest: r ? t : null,
4522
+ ...x(r ? n : t)
4523
+ });
4524
+ }
4525
+ var pc = /*@__PURE__*/ A("ZodRecord", (e, t) => {
4526
+ Z(), Fr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Io(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4527
+ });
4528
+ function mc(e, t, n) {
4529
+ return !t || !t._zod ? new pc({
4530
+ type: "record",
4531
+ keyType: hs(),
4532
+ valueType: e,
4533
+ ...x(t)
4534
+ }) : new pc({
4535
+ type: "record",
4536
+ keyType: e,
4537
+ valueType: t,
4538
+ ...x(n)
4539
+ });
4540
+ }
4541
+ var hc = /*@__PURE__*/ A("ZodEnum", (e, t) => {
4542
+ Ir.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => _o(e, t, n, r), e.enum = t.entries, e.options = [...e._zod.values];
4543
+ let n = new Set(Object.keys(t.entries));
4544
+ e.extract = (e, r) => {
4545
+ let i = {};
4546
+ for (let r of e) if (n.has(r)) i[r] = t.entries[r];
4547
+ else throw Error(`Key ${r} not found in enum`);
4548
+ return new hc({
4549
+ ...t,
4550
+ checks: [],
4551
+ ...x(r),
4552
+ entries: i
4553
+ });
4554
+ }, e.exclude = (e, r) => {
4555
+ let i = { ...t.entries };
4556
+ for (let t of e) if (n.has(t)) delete i[t];
4557
+ else throw Error(`Key ${t} not found in enum`);
4558
+ return new hc({
4559
+ ...t,
4560
+ checks: [],
4561
+ ...x(r),
4562
+ entries: i
4563
+ });
4564
+ };
4565
+ });
4566
+ function gc(e, t) {
4567
+ return new hc({
4568
+ type: "enum",
4569
+ entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
4570
+ ...x(t)
4571
+ });
4572
+ }
4573
+ var _c = /*@__PURE__*/ A("ZodLiteral", (e, t) => {
4574
+ Lr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => vo(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4575
+ if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
4576
+ return t.values[0];
4577
+ } });
4578
+ });
4579
+ function vc(e, t) {
4580
+ return new _c({
4581
+ type: "literal",
4582
+ values: Array.isArray(e) ? e : [e],
4583
+ ...x(t)
4584
+ });
4585
+ }
4586
+ var yc = /*@__PURE__*/ A("ZodTransform", (e, t) => {
4587
+ Z(), Rr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => To(e, t, n, r), e._zod.parse = (n, r) => {
4588
+ if (r.direction === "backward") throw new Be(e.constructor.name);
4589
+ n.addIssue = (r) => {
4590
+ if (typeof r == "string") n.issues.push(E(r, n.value, t));
4591
+ else {
4592
+ let t = r;
4593
+ t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(E(t));
4594
+ }
4595
+ };
4596
+ let i = t.transform(n.value, n);
4597
+ return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
4598
+ };
4599
+ });
4600
+ function bc(e) {
4601
+ return new yc({
4602
+ type: "transform",
4603
+ transform: e
4604
+ });
4605
+ }
4606
+ var xc = /*@__PURE__*/ A("ZodOptional", (e, t) => {
4607
+ Br.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => qo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4608
+ });
4609
+ function Sc(e) {
4610
+ return new xc({
4611
+ type: "optional",
4612
+ innerType: e
4613
+ });
4614
+ }
4615
+ var Cc = /*@__PURE__*/ A("ZodExactOptional", (e, t) => {
4616
+ Vr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => qo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4617
+ });
4618
+ function wc(e) {
4619
+ return new Cc({
4620
+ type: "optional",
4621
+ innerType: e
4622
+ });
4623
+ }
4624
+ var Tc = /*@__PURE__*/ A("ZodNullable", (e, t) => {
4625
+ Hr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Lo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4626
+ });
4627
+ function Ec(e) {
4628
+ return new Tc({
4629
+ type: "nullable",
4630
+ innerType: e
4631
+ });
4632
+ }
4633
+ var Dc = /*@__PURE__*/ A("ZodDefault", (e, t) => {
4634
+ Ur.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4635
+ });
4636
+ function Oc(e, t) {
4637
+ return new Dc({
4638
+ type: "default",
4639
+ innerType: e,
4640
+ get defaultValue() {
4641
+ return typeof t == "function" ? t() : ae(t);
4642
+ }
4643
+ });
4644
+ }
4645
+ var kc = /*@__PURE__*/ A("ZodPrefault", (e, t) => {
4646
+ Gr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ho(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4647
+ });
4648
+ function Ac(e, t) {
4649
+ return new kc({
4650
+ type: "prefault",
4651
+ innerType: e,
4652
+ get defaultValue() {
4653
+ return typeof t == "function" ? t() : ae(t);
4654
+ }
4655
+ });
4656
+ }
4657
+ var jc = /*@__PURE__*/ A("ZodNonOptional", (e, t) => {
4658
+ Kr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ro(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4659
+ });
4660
+ function Mc(e, t) {
4661
+ return new jc({
4662
+ type: "nonoptional",
4663
+ innerType: e,
4664
+ ...x(t)
4665
+ });
4666
+ }
4667
+ var Nc = /*@__PURE__*/ A("ZodCatch", (e, t) => {
4668
+ Yr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4669
+ });
4670
+ function Pc(e, t) {
4671
+ return new Nc({
4672
+ type: "catch",
4673
+ innerType: e,
4674
+ catchValue: typeof t == "function" ? t : Fe(t)
4675
+ });
4676
+ }
4677
+ var Fc = /*@__PURE__*/ A("ZodNaN", (e, t) => {
4678
+ Xr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => yo(e, t, n, r);
4679
+ });
4680
+ function Ic(e) {
4681
+ return /* @__PURE__ */ ca(Fc, e);
4682
+ }
4683
+ var Lc = /*@__PURE__*/ A("ZodPipe", (e, t) => {
4684
+ Zr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wo(e, t, n, r), e.in = t.in, e.out = t.out;
4685
+ });
4686
+ function Rc(e, t) {
4687
+ return new Lc({
4688
+ type: "pipe",
4689
+ in: e,
4690
+ out: t
4691
+ });
4692
+ }
4693
+ var zc = /*@__PURE__*/ A("ZodReadonly", (e, t) => {
4694
+ $r.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Go(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4695
+ });
4696
+ function Bc(e) {
4697
+ return new zc({
4698
+ type: "readonly",
4699
+ innerType: e
4700
+ });
4701
+ }
4702
+ var Vc = /*@__PURE__*/ A("ZodLazy", (e, t) => {
4703
+ ti.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Jo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4704
+ });
4705
+ function Hc(e) {
4706
+ return new Vc({
4707
+ type: "lazy",
4708
+ getter: e
4709
+ });
4710
+ }
4711
+ var Uc = /*@__PURE__*/ A("ZodCustom", (e, t) => {
4712
+ ni.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Co(e, t, n, r);
4713
+ });
4714
+ function Wc(e, t) {
4715
+ return /* @__PURE__ */ Aa(Uc, e ?? (() => !0), t);
4716
+ }
4717
+ function Gc(e, t = {}) {
4718
+ return /* @__PURE__ */ ja(Uc, e, t);
4719
+ }
4720
+ function Kc(e, t) {
4721
+ return /* @__PURE__ */ Ma(e, t);
4722
+ }
4723
+ var qc = /*@__PURE__*/ A("ZodInstanceOf", (e, t) => {
4724
+ Uc.init(e, t);
4725
+ }, { properties(e, t) {
4726
+ return this.check(/* @__PURE__ */ Ca(e, t));
4727
+ } });
4728
+ function Jc(e, t = {}) {
4729
+ let n = new qc({
4730
+ type: "custom",
4731
+ check: "custom",
4732
+ fn: (t) => t instanceof e,
4733
+ abort: !0,
4734
+ ...x(t)
4735
+ });
4736
+ return n._zod.bag.Class = e, n._zod.check = (t) => {
4737
+ t.value instanceof e || t.issues.push({
4738
+ code: "invalid_type",
4739
+ expected: e.name,
4740
+ input: t.value,
4741
+ inst: n,
4742
+ path: [...n._zod.def.path ?? []]
4743
+ });
4744
+ }, n;
4745
+ }
4746
+ //#endregion
4747
+ export { Ic as A, rs as B, Ws as C, Hc as D, Hs as E, mc as F, Ei as G, Xo as H, hs as I, Yi as K, fc as L, Bs as M, rc as N, vc as O, Sc as P, oc as R, tc as S, cc as T, sa as U, $o as V, ea as W, ac as _, Dc as a, Ks as b, gs as c, nc as d, xc as f, Q as g, dc as h, $s as i, Qs as j, ic as k, _c as l, ms as m, ec as n, sc as o, Lc as p, Qe as q, Us as r, hc as s, qs as t, zs as u, gc as v, Wc as w, Js as x, Jc as y, Xs as z };