moi-computer 0.13.1-next.4 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/moi.mjs +10 -6
- package/dist/{chunk-k32585ne.js → chunk-828s864r.js} +61 -61
- package/dist/chunk-9ffaaaw3.css +1 -0
- package/dist/chunk-gh11h6dc.js +2 -0
- package/dist/chunk-hhgsmxsq.js +1 -0
- package/dist/chunk-ht9zmff2.js +5 -0
- package/dist/{chunk-0t8m1ehd.js → chunk-jqa4c92z.js} +2 -2
- package/dist/{chunk-qtkv7hp8.js → chunk-kkhswjz8.js} +2 -2
- package/dist/{chunk-wjbejzek.js → chunk-nqh3kx2x.js} +1 -1
- package/dist/chunk-rb2vsqvb.js +1 -0
- package/dist/{chunk-c8g5x288.js → chunk-t22yw8s6.js} +1 -1
- package/dist/chunk-yv6n9e3z.js +72 -0
- package/dist/dot-2bdkpg3k.png +0 -0
- package/dist/duet-3ab8xyzd.png +0 -0
- package/dist/grok-bot-yv07qj9f.png +0 -0
- package/dist/index.html +1 -1
- package/dist/instinct-ypmq6t0w.png +0 -0
- package/dist/muse-qr7zwsvf.png +0 -0
- package/package.json +39 -40
- package/runtime/applets/chunk-bzxakh65.js +2 -0
- package/runtime/applets/chunk-qhjskz2m.js +2 -0
- package/runtime/applets/collab.js +1 -0
- package/runtime/applets/moi.js +1 -0
- package/runtime/applets/rpc.js +2 -0
- package/runtime/assets/shadcn.css +629 -0
- package/runtime/assets/tw-animate.css +1 -0
- package/runtime/build-worker-entry.js +2 -0
- package/runtime/chunk-00rk365r.js +83 -0
- package/runtime/chunk-4wj1jzhr.js +3 -0
- package/runtime/chunk-5egvk1rz.js +3 -0
- package/runtime/chunk-7c0zbz74.js +3 -0
- package/runtime/chunk-8fvgvm56.js +2 -0
- package/runtime/chunk-c3qyet60.js +128 -0
- package/runtime/chunk-ewc55jga.js +32623 -0
- package/runtime/chunk-gbkjshyt.js +26 -0
- package/runtime/chunk-ggphq7nk.js +66 -0
- package/runtime/chunk-h2bwhk81.js +3 -0
- package/runtime/chunk-hjzfk1cr.js +3 -0
- package/runtime/chunk-j0nd7kw0.js +52 -0
- package/runtime/chunk-jb63ns1z.js +2 -0
- package/runtime/chunk-k049dtaq.js +3 -0
- package/runtime/chunk-kjp60rqs.js +3 -0
- package/runtime/chunk-q06m17nb.js +3 -0
- package/runtime/chunk-r5s8rm8n.js +3 -0
- package/runtime/chunk-sdyqhxe1.js +10 -0
- package/runtime/chunk-w1fx9tsc.js +3 -0
- package/runtime/chunk-w6ksnv8y.js +2 -0
- package/runtime/chunk-wvarpvem.js +78 -0
- package/runtime/chunk-zm7k0v1c.js +3 -0
- package/runtime/chunk-zwvtkb81.js +139 -0
- package/runtime/cli.js +246 -0
- package/runtime/functions-worker.js +2 -0
- package/runtime/gateway-client.js +2 -0
- package/runtime/third-party-notices.txt +6830 -0
- package/runtime/worker.js +2 -0
- package/runtime/xdg-open +1267 -0
- package/bunfig.toml +0 -7
- package/client/AGENTS.md +0 -40
- package/client/api/app-config.ts +0 -58
- package/client/api/http.ts +0 -44
- package/client/api/query-client.ts +0 -5
- package/client/api/query-options.ts +0 -6
- package/client/api/workspace-keys.ts +0 -18
- package/client/app/app-provider.tsx +0 -39
- package/client/app/app-router.tsx +0 -57
- package/client/app/routes/home-route.tsx +0 -27
- package/client/app/routes/onboarding-route.tsx +0 -11
- package/client/app/routes/settings-route.tsx +0 -10
- package/client/app/routes/workspace-registration.tsx +0 -68
- package/client/app/routes/workspace-route.tsx +0 -127
- package/client/app/shell/sidebar-layout.tsx +0 -247
- package/client/assets/claude.svg +0 -3
- package/client/assets/favicon.png +0 -0
- package/client/assets/floppy-disk.webp +0 -0
- package/client/assets/hermes.png +0 -0
- package/client/assets/mcp/.gitkeep +0 -0
- package/client/assets/mcp/airtable.png +0 -0
- package/client/assets/mcp/apollo.png +0 -0
- package/client/assets/mcp/asana.png +0 -0
- package/client/assets/mcp/atlassian.png +0 -0
- package/client/assets/mcp/box.png +0 -0
- package/client/assets/mcp/chrome.svg +0 -33
- package/client/assets/mcp/clickup.png +0 -0
- package/client/assets/mcp/cloudflare.png +0 -0
- package/client/assets/mcp/context7.png +0 -0
- package/client/assets/mcp/datadog.png +0 -0
- package/client/assets/mcp/discord.png +0 -0
- package/client/assets/mcp/dropbox.png +0 -0
- package/client/assets/mcp/elevenlabs.png +0 -0
- package/client/assets/mcp/exa.png +0 -0
- package/client/assets/mcp/figma.png +0 -0
- package/client/assets/mcp/firecrawl.png +0 -0
- package/client/assets/mcp/github.png +0 -0
- package/client/assets/mcp/gitlab.png +0 -0
- package/client/assets/mcp/gmail.png +0 -0
- package/client/assets/mcp/googlecalendar.png +0 -0
- package/client/assets/mcp/googledrive.png +0 -0
- package/client/assets/mcp/grafana.png +0 -0
- package/client/assets/mcp/granola.png +0 -0
- package/client/assets/mcp/hubspot.png +0 -0
- package/client/assets/mcp/huggingface.png +0 -0
- package/client/assets/mcp/intercom.png +0 -0
- package/client/assets/mcp/linear.png +0 -0
- package/client/assets/mcp/monday.png +0 -0
- package/client/assets/mcp/mongodb.png +0 -0
- package/client/assets/mcp/neon.png +0 -0
- package/client/assets/mcp/notion.png +0 -0
- package/client/assets/mcp/paper.png +0 -0
- package/client/assets/mcp/paypal.png +0 -0
- package/client/assets/mcp/perplexity.png +0 -0
- package/client/assets/mcp/postgresql.png +0 -0
- package/client/assets/mcp/posthog.png +0 -0
- package/client/assets/mcp/puppeteer.png +0 -0
- package/client/assets/mcp/railway.png +0 -0
- package/client/assets/mcp/redis.png +0 -0
- package/client/assets/mcp/salesforce.png +0 -0
- package/client/assets/mcp/sentry.png +0 -0
- package/client/assets/mcp/shopify.png +0 -0
- package/client/assets/mcp/slack.png +0 -0
- package/client/assets/mcp/snowflake.png +0 -0
- package/client/assets/mcp/stripe.png +0 -0
- package/client/assets/mcp/supabase.png +0 -0
- package/client/assets/mcp/telegram.png +0 -0
- package/client/assets/mcp/twilio.png +0 -0
- package/client/assets/mcp/vercel.png +0 -0
- package/client/assets/mcp/zapier.png +0 -0
- package/client/assets/moi-logo.svg +0 -11
- package/client/assets/openai.svg +0 -1
- package/client/assets/openclaw.svg +0 -22
- package/client/assets.d.ts +0 -14
- package/client/components/shared/agent-blobatar.tsx +0 -93
- package/client/components/shared/bottom-panel.tsx +0 -65
- package/client/components/shared/composer.tsx +0 -125
- package/client/components/shared/led-logo.tsx +0 -181
- package/client/components/shared/panel-header.tsx +0 -16
- package/client/components/shared/reorderable-list.tsx +0 -204
- package/client/components/shared/screen-shell.tsx +0 -23
- package/client/components/shared/ultrafast-icon.tsx +0 -61
- package/client/components/shared/workspace-icon.tsx +0 -83
- package/client/components/ui/alert-dialog.tsx +0 -1
- package/client/components/ui/button.tsx +0 -1
- package/client/components/ui/checkbox.tsx +0 -1
- package/client/components/ui/collapsible.tsx +0 -1
- package/client/components/ui/dialog.tsx +0 -1
- package/client/components/ui/dropdown-menu.tsx +0 -1
- package/client/components/ui/hover-card.tsx +0 -1
- package/client/components/ui/inline-input.tsx +0 -84
- package/client/components/ui/input.tsx +0 -1
- package/client/components/ui/popover.tsx +0 -1
- package/client/components/ui/resizable.tsx +0 -1
- package/client/components/ui/skeleton.tsx +0 -1
- package/client/components/ui/slider.tsx +0 -1
- package/client/components/ui/spinner.tsx +0 -1
- package/client/components/ui/switch.tsx +0 -1
- package/client/components/ui/tabs.tsx +0 -1
- package/client/components/ui/textarea.tsx +0 -1
- package/client/components/ui/toast.tsx +0 -220
- package/client/components/ui/tooltip.tsx +0 -1
- package/client/dev/index.html +0 -43
- package/client/dev/index.ts +0 -15
- package/client/externalize-react.ts +0 -41
- package/client/features/account/account-menu.tsx +0 -96
- package/client/features/account/account-provider.tsx +0 -93
- package/client/features/account/account-test-utils.tsx +0 -310
- package/client/features/account/api.ts +0 -67
- package/client/features/account/profile-actions.ts +0 -29
- package/client/features/app-settings/api.ts +0 -33
- package/client/features/app-settings/avatar-upload.tsx +0 -62
- package/client/features/app-settings/general-settings.tsx +0 -39
- package/client/features/app-settings/profile-settings.tsx +0 -105
- package/client/features/app-settings/settings-page.tsx +0 -45
- package/client/features/app-settings/settings-section.tsx +0 -26
- package/client/features/applets/api.ts +0 -38
- package/client/features/applets/applet-cache.ts +0 -95
- package/client/features/applets/applet-container.tsx +0 -33
- package/client/features/applets/applet-log.ts +0 -81
- package/client/features/applets/applet-runtime.ts +0 -325
- package/client/features/applets/applet-styles.ts +0 -81
- package/client/features/applets/applet-thumbnail.ts +0 -294
- package/client/features/applets/use-applet.ts +0 -210
- package/client/features/applets/widget-error-boundary.tsx +0 -62
- package/client/features/applets/widget-shell.tsx +0 -56
- package/client/features/chat/applet-chat-intents.ts +0 -173
- package/client/features/chat/chat-panel.tsx +0 -326
- package/client/features/chat/chat-popup.tsx +0 -175
- package/client/features/chat/chat-send.ts +0 -259
- package/client/features/chat/chat-store.ts +0 -328
- package/client/features/chat/composer/attachments/attachment-chip.tsx +0 -99
- package/client/features/chat/composer/attachments/draft-attachments.ts +0 -185
- package/client/features/chat/composer/attachments/drawing-attachment-chip.tsx +0 -37
- package/client/features/chat/composer/attachments/file-attachment-chip.tsx +0 -22
- package/client/features/chat/composer/attachments/text-attachment-chip.tsx +0 -11
- package/client/features/chat/composer/attachments/types.ts +0 -25
- package/client/features/chat/composer/attachments/uploads.ts +0 -26
- package/client/features/chat/composer/banners/composer-banner.tsx +0 -16
- package/client/features/chat/composer/banners/error-banner.tsx +0 -36
- package/client/features/chat/composer/banners/skill-update-banner.tsx +0 -93
- package/client/features/chat/composer/chat-composer.tsx +0 -290
- package/client/features/chat/composer/model-order.ts +0 -110
- package/client/features/chat/composer/model-picker.tsx +0 -408
- package/client/features/chat/composer/use-workspace-composer-state.tsx +0 -69
- package/client/features/chat/composer/use-workspace-skill-updates.ts +0 -160
- package/client/features/chat/connection/chat-connection.ts +0 -64
- package/client/features/chat/connection/chat-frames.ts +0 -153
- package/client/features/chat/messages/chat-empty-state.tsx +0 -294
- package/client/features/chat/messages/chat-prompt-bubbles.tsx +0 -72
- package/client/features/chat/messages/fork-history.ts +0 -14
- package/client/features/chat/messages/group-turns.ts +0 -74
- package/client/features/chat/messages/interleave-notices.ts +0 -80
- package/client/features/chat/messages/markdown-content.tsx +0 -89
- package/client/features/chat/messages/preview-turn.ts +0 -37
- package/client/features/chat/messages/shimmer-text.tsx +0 -20
- package/client/features/chat/messages/tool-group/code-block.tsx +0 -41
- package/client/features/chat/messages/tool-group/collapse.tsx +0 -28
- package/client/features/chat/messages/tool-group/detect.ts +0 -93
- package/client/features/chat/messages/tool-group/fixtures.ts +0 -309
- package/client/features/chat/messages/tool-group/format/claude.ts +0 -49
- package/client/features/chat/messages/tool-group/format/codex.ts +0 -130
- package/client/features/chat/messages/tool-group/format/hermes.ts +0 -69
- package/client/features/chat/messages/tool-group/format/index.ts +0 -34
- package/client/features/chat/messages/tool-group/format/mcp.ts +0 -68
- package/client/features/chat/messages/tool-group/format/openclaw.ts +0 -120
- package/client/features/chat/messages/tool-group/format/shared.ts +0 -49
- package/client/features/chat/messages/tool-group/format/shell.ts +0 -162
- package/client/features/chat/messages/tool-group/index.ts +0 -9
- package/client/features/chat/messages/tool-group/read-image-preview.tsx +0 -46
- package/client/features/chat/messages/tool-group/subagent-card.tsx +0 -138
- package/client/features/chat/messages/tool-group/timeline-row.tsx +0 -159
- package/client/features/chat/messages/tool-group/tool-call-group.tsx +0 -279
- package/client/features/chat/messages/tool-group/tool-output.tsx +0 -125
- package/client/features/chat/messages/turn-view.tsx +0 -270
- package/client/features/chat/messages/use-stick-to-bottom.ts +0 -96
- package/client/features/chat/messages/user-message-bubble.tsx +0 -63
- package/client/features/chat/sessions/api.ts +0 -193
- package/client/features/chat/sessions/chat-selector.tsx +0 -399
- package/client/features/chat/sessions/session-view.ts +0 -53
- package/client/features/chat/sessions/use-selected-session.ts +0 -171
- package/client/features/chat/use-chat.ts +0 -229
- package/client/features/collab/applet-api.ts +0 -35
- package/client/features/collab/components/cursors.tsx +0 -241
- package/client/features/collab/components/presence-avatars.tsx +0 -74
- package/client/features/collab/components/presence-frame.tsx +0 -122
- package/client/features/collab/components/presence-group.tsx +0 -31
- package/client/features/collab/components/presence-helpers.ts +0 -50
- package/client/features/collab/components/user-avatar-group.tsx +0 -35
- package/client/features/collab/components/user-avatar.tsx +0 -65
- package/client/features/collab/components/user.tsx +0 -69
- package/client/features/collab/host-state.ts +0 -160
- package/client/features/collab/index.ts +0 -5
- package/client/features/collab/local-user.ts +0 -46
- package/client/features/collab/members/api.ts +0 -17
- package/client/features/collab/members/hooks.ts +0 -97
- package/client/features/collab/members/store.ts +0 -148
- package/client/features/collab/members/types.ts +0 -55
- package/client/features/collab/presence/client.ts +0 -242
- package/client/features/collab/presence/hooks.tsx +0 -160
- package/client/features/collab/presence/presence-publisher.ts +0 -30
- package/client/features/collab/presence/presence-target.ts +0 -8
- package/client/features/collab/presence/provider.tsx +0 -74
- package/client/features/collab/presence/store.ts +0 -156
- package/client/features/collab/presence/users.ts +0 -87
- package/client/features/collab/proxy-user.ts +0 -28
- package/client/features/collab/sharing/agent-invite.tsx +0 -30
- package/client/features/collab/sharing/workspace-members.tsx +0 -269
- package/client/features/collab/sharing/workspace-sharing-menu.tsx +0 -179
- package/client/features/collab/testing/component-fixtures.tsx +0 -54
- package/client/features/collab/testing/fake-engine.ts +0 -120
- package/client/features/connectors/api.ts +0 -25
- package/client/features/connectors/icon-mcp.tsx +0 -21
- package/client/features/connectors/mcp-icons.ts +0 -183
- package/client/features/connectors/mcp-server-cards.tsx +0 -105
- package/client/features/connectors/read-connectors.ts +0 -35
- package/client/features/demo/demo-dialog.tsx +0 -194
- package/client/features/dev/blobatar-shapes-page.tsx +0 -344
- package/client/features/dev/chat-states-fixtures.ts +0 -755
- package/client/features/dev/chat-states-page.tsx +0 -476
- package/client/features/dev/collab/collab-page.tsx +0 -24
- package/client/features/dev/collab/collab-playground.tsx +0 -614
- package/client/features/dev/collab/local-user-settings.tsx +0 -120
- package/client/features/dev/collab/playground-room.ts +0 -33
- package/client/features/dev/dev-index-page.tsx +0 -83
- package/client/features/dev/dev-routes.tsx +0 -43
- package/client/features/dev/harness-debug-page.tsx +0 -607
- package/client/features/dev/onboarding-preview-page.tsx +0 -76
- package/client/features/dev/texture-lab-page.tsx +0 -149
- package/client/features/dev/tool-calls-page.tsx +0 -79
- package/client/features/dev/ui-components/ui-component-previews.tsx +0 -855
- package/client/features/dev/ui-components/ui-components-page.tsx +0 -60
- package/client/features/dev/workspace-setup-mocks.ts +0 -103
- package/client/features/dev/workspace-setup-page.tsx +0 -11
- package/client/features/dev/workspace-setup-preview.tsx +0 -249
- package/client/features/drawings/capture-element.ts +0 -57
- package/client/features/drawings/drawing-layer.tsx +0 -49
- package/client/features/drawings/drawing-toolbar.tsx +0 -95
- package/client/features/drawings/use-chat-annotation.ts +0 -228
- package/client/features/drawings/use-drawing-layer.ts +0 -756
- package/client/features/drawings/use-view-sketch.ts +0 -154
- package/client/features/harness/api.ts +0 -69
- package/client/features/harness/device-login-steps.tsx +0 -103
- package/client/features/harness/harness-login-panel.tsx +0 -232
- package/client/features/harness/harness-presentation.ts +0 -15
- package/client/features/harness/harness-selector.tsx +0 -119
- package/client/features/harness/use-harness-login.ts +0 -77
- package/client/features/home/api.ts +0 -135
- package/client/features/home/home-logo.tsx +0 -344
- package/client/features/home/home-page.tsx +0 -305
- package/client/features/home/shared-workspaces.tsx +0 -70
- package/client/features/home/workspace-invitations.tsx +0 -101
- package/client/features/home/workspace-preview.tsx +0 -213
- package/client/features/identity/host-api.ts +0 -35
- package/client/features/identity/store.ts +0 -26
- package/client/features/identity/types.ts +0 -41
- package/client/features/identity/use-identity.ts +0 -6
- package/client/features/onboarding/agent-setup-step.tsx +0 -57
- package/client/features/onboarding/api.ts +0 -42
- package/client/features/onboarding/onboarding-idea-disk.tsx +0 -129
- package/client/features/onboarding/onboarding-page.tsx +0 -33
- package/client/features/onboarding/onboarding-screen.tsx +0 -20
- package/client/features/onboarding/onboarding-status.tsx +0 -24
- package/client/features/onboarding/workspace-setup-step.tsx +0 -239
- package/client/features/overview/api.ts +0 -28
- package/client/features/overview/default/registry.tsx +0 -34
- package/client/features/overview/default/views-widget.tsx +0 -246
- package/client/features/overview/grid.ts +0 -77
- package/client/features/overview/hidden-panel.tsx +0 -111
- package/client/features/overview/overview.tsx +0 -299
- package/client/features/overview/use-grid-reconcile.ts +0 -94
- package/client/features/overview/widget-canvas.tsx +0 -166
- package/client/features/overview/widget-frame.tsx +0 -77
- package/client/features/overview/workspace-name.tsx +0 -55
- package/client/features/scratchpad/scratch-session.ts +0 -71
- package/client/features/scratchpad/scratchpad-controls.tsx +0 -516
- package/client/features/scratchpad/scratchpad.tsx +0 -360
- package/client/features/scratchpad/use-scratchpad-snapshot.tsx +0 -133
- package/client/features/update/api.ts +0 -35
- package/client/features/update/update-control.tsx +0 -102
- package/client/features/views/api.ts +0 -188
- package/client/features/views/pending-view-screen.tsx +0 -303
- package/client/features/views/use-view-actions.ts +0 -119
- package/client/features/views/use-view-drafts.ts +0 -88
- package/client/features/views/view-manager.tsx +0 -293
- package/client/features/views/view-presentation.ts +0 -12
- package/client/features/views/view-residency.ts +0 -77
- package/client/features/views/view-submission.ts +0 -56
- package/client/features/workspace/add/api.ts +0 -61
- package/client/features/workspace/add/create-workspace-dialog.tsx +0 -230
- package/client/features/workspace/add/import-workspace-dialog.tsx +0 -81
- package/client/features/workspace/add/use-workspace-import.ts +0 -61
- package/client/features/workspace/add/workspace-agent-options.ts +0 -53
- package/client/features/workspace/add/workspace-agent-selector.tsx +0 -96
- package/client/features/workspace/add/workspace-dialog-content.tsx +0 -22
- package/client/features/workspace/api.ts +0 -180
- package/client/features/workspace/harness-transition.ts +0 -81
- package/client/features/workspace/moi-context.ts +0 -129
- package/client/features/workspace/remote.ts +0 -34
- package/client/features/workspace/settings/api.ts +0 -112
- package/client/features/workspace/settings/connectors-settings.tsx +0 -110
- package/client/features/workspace/settings/environment-settings.tsx +0 -149
- package/client/features/workspace/settings/general-settings.tsx +0 -180
- package/client/features/workspace/settings/icon-picker-options.ts +0 -30
- package/client/features/workspace/settings/settings-layout.tsx +0 -53
- package/client/features/workspace/settings/use-env-vars.ts +0 -20
- package/client/features/workspace/settings/workspace-icon-picker.tsx +0 -318
- package/client/features/workspace/settings/workspace-settings-dialog.tsx +0 -65
- package/client/features/workspace/setup/workspace-login-state.tsx +0 -56
- package/client/features/workspace/setup/workspace-recovery-states.tsx +0 -142
- package/client/features/workspace/setup/workspace-setup.tsx +0 -98
- package/client/features/workspace/setup/workspace-welcome-state.tsx +0 -81
- package/client/features/workspace/tab-resolution.ts +0 -32
- package/client/features/workspace/theme-panel.tsx +0 -191
- package/client/features/workspace/unavailable-page.tsx +0 -21
- package/client/features/workspace/use-fits-split-layout.ts +0 -69
- package/client/features/workspace/use-workspace-navigation.ts +0 -265
- package/client/features/workspace/use-workspace-socket.ts +0 -51
- package/client/features/workspace/workspace-content.tsx +0 -597
- package/client/features/workspace/workspace-context.tsx +0 -21
- package/client/features/workspace/workspace-frame.tsx +0 -64
- package/client/features/workspace/workspace-identity.tsx +0 -40
- package/client/features/workspace/workspace-layout-context.tsx +0 -156
- package/client/features/workspace/workspace-menu.tsx +0 -67
- package/client/features/workspace/workspace-pane.tsx +0 -22
- package/client/features/workspace/workspace-pending-screen.tsx +0 -26
- package/client/features/workspace/workspace-preferences.ts +0 -91
- package/client/features/workspace/workspace-presentation.tsx +0 -35
- package/client/features/workspace/workspace-screen.tsx +0 -28
- package/client/features/workspace/workspace-split-layout.tsx +0 -116
- package/client/features/workspace/workspace-state.ts +0 -206
- package/client/features/workspace/workspace-tabs.tsx +0 -233
- package/client/features/workspace/workspace-test-utils.ts +0 -23
- package/client/global.d.ts +0 -5
- package/client/index.css +0 -247
- package/client/index.html +0 -81
- package/client/index.tsx +0 -45
- package/client/lib/agent-availability.ts +0 -14
- package/client/lib/browser-tab-id.ts +0 -4
- package/client/lib/cn.ts +0 -6
- package/client/lib/flags.ts +0 -11
- package/client/lib/identity-icon-registry.ts +0 -150
- package/client/lib/rate-limit.ts +0 -77
- package/client/lib/use-latest-ref.ts +0 -11
- package/client/lib/user-display-name.ts +0 -6
- package/client/lib/ws-url.ts +0 -10
- package/client/main.tsx +0 -43
- package/client/runtime/app-context.ts +0 -20
- package/client/runtime/app-events.ts +0 -75
- package/client/runtime/hmr-watchdog.ts +0 -39
- package/client/runtime/reconnecting-socket.ts +0 -115
- package/client/runtime/use-client-events.ts +0 -69
- package/client/runtime/workspace-theme.ts +0 -175
- package/client/store/ui.ts +0 -94
- package/client/store/workspace-session.ts +0 -30
- package/client/structured-clone-shim.ts +0 -14
- package/client/tailwind-config.ts +0 -43
- package/dist/chunk-851bx8ss.js +0 -72
- package/dist/chunk-cty37f3v.js +0 -1
- package/dist/chunk-dy6f6h3e.js +0 -5
- package/dist/chunk-j6928pwm.js +0 -1
- package/dist/chunk-kffcah9w.css +0 -1
- package/dist/chunk-rh58dc0y.js +0 -2
- package/lib/applet-selector.ts +0 -24
- package/lib/attachment-note.ts +0 -66
- package/lib/chat-title.ts +0 -11
- package/lib/collab/colors.ts +0 -30
- package/lib/collab/protocol.ts +0 -84
- package/lib/collab/types.ts +0 -52
- package/lib/default-widgets.ts +0 -32
- package/lib/events.ts +0 -61
- package/lib/format.ts +0 -348
- package/lib/harness-instructions.ts +0 -30
- package/lib/harness-types.ts +0 -13
- package/lib/identity-icons.ts +0 -73
- package/lib/ids.ts +0 -33
- package/lib/message-attachments.ts +0 -40
- package/lib/moi-attachments.ts +0 -204
- package/lib/moi-context.ts +0 -305
- package/lib/navigation.ts +0 -65
- package/lib/onboarding.ts +0 -41
- package/lib/scratchpad-skew.ts +0 -64
- package/lib/session-drafts.ts +0 -10
- package/lib/speed-mode.ts +0 -5
- package/lib/system-messages.ts +0 -241
- package/lib/themes.ts +0 -241
- package/lib/types.ts +0 -776
- package/lib/update.ts +0 -2
- package/lib/view-build-directives.ts +0 -11
- package/lib/workspace-config.ts +0 -48
- package/lib/workspace-icon.ts +0 -20
- package/lib/workspace-layout.ts +0 -15
- package/lib/workspace-name.ts +0 -17
- package/lib/workspace-tabs.ts +0 -29
- package/server/AGENTS.md +0 -17
- package/server/README.md +0 -123
- package/server/agent-caller.ts +0 -16
- package/server/agent-launcher.ts +0 -27
- package/server/api/harnesses.ts +0 -79
- package/server/api/index.ts +0 -1351
- package/server/api/onboarding.ts +0 -46
- package/server/app-config.ts +0 -264
- package/server/app-settings.ts +0 -69
- package/server/applets/api-base.ts +0 -4
- package/server/applets/applet-css.ts +0 -55
- package/server/applets/build-applet.ts +0 -475
- package/server/applets/build-worker.ts +0 -179
- package/server/applets/bundle-queue.ts +0 -19
- package/server/applets/config.ts +0 -226
- package/server/applets/declarations.ts +0 -45
- package/server/applets/dependencies.ts +0 -206
- package/server/applets/functions-worker.ts +0 -121
- package/server/applets/functions.ts +0 -392
- package/server/applets/index.ts +0 -504
- package/server/applets/log.ts +0 -149
- package/server/applets/runtime/collab.ts +0 -94
- package/server/applets/runtime/moi.ts +0 -35
- package/server/applets/runtime/rpc.ts +0 -15
- package/server/applets/thumbnails.ts +0 -200
- package/server/applets/typecheck.ts +0 -100
- package/server/applets/ui-components.ts +0 -241
- package/server/applets/view-source.ts +0 -73
- package/server/applets/views.ts +0 -323
- package/server/applets/widgets.ts +0 -181
- package/server/cli/applet-selector.ts +0 -19
- package/server/cli/args.ts +0 -5
- package/server/cli/colors.ts +0 -20
- package/server/cli/commands/bundle.ts +0 -119
- package/server/cli/commands/call-server-fn.ts +0 -42
- package/server/cli/commands/check.ts +0 -53
- package/server/cli/commands/config.ts +0 -120
- package/server/cli/commands/debug.ts +0 -119
- package/server/cli/commands/env.ts +0 -162
- package/server/cli/commands/hermes.ts +0 -149
- package/server/cli/commands/init.ts +0 -323
- package/server/cli/commands/navigate.ts +0 -35
- package/server/cli/commands/openclaw.ts +0 -168
- package/server/cli/commands/refresh.ts +0 -45
- package/server/cli/commands/remote.ts +0 -330
- package/server/cli/commands/scratch.ts +0 -496
- package/server/cli/commands/service.ts +0 -298
- package/server/cli/commands/skill.ts +0 -121
- package/server/cli/commands/start.ts +0 -112
- package/server/cli/commands/status.ts +0 -80
- package/server/cli/commands/tabs.ts +0 -36
- package/server/cli/commands/theme.ts +0 -192
- package/server/cli/commands/ui-components.ts +0 -15
- package/server/cli/commands/update.ts +0 -192
- package/server/cli/commands/version.ts +0 -9
- package/server/cli/commands/views.ts +0 -87
- package/server/cli/control.ts +0 -120
- package/server/cli/env.ts +0 -259
- package/server/cli/index.ts +0 -175
- package/server/cli/pc.ts +0 -20
- package/server/cli/provider.ts +0 -25
- package/server/cli/remote-command.ts +0 -77
- package/server/cli/remote-control.ts +0 -73
- package/server/cli/remote-operations.ts +0 -247
- package/server/cli/server-version.ts +0 -16
- package/server/cli/server.ts +0 -93
- package/server/cli/ui-components.ts +0 -294
- package/server/cli/ui.ts +0 -52
- package/server/cli.ts +0 -3
- package/server/collab/cloudflare-access.ts +0 -78
- package/server/collab/config.ts +0 -13
- package/server/collab/manager.ts +0 -413
- package/server/collab/service.ts +0 -136
- package/server/collab/skill/index.ts +0 -7
- package/server/collab/worker-messages.ts +0 -10
- package/server/collab/worker.ts +0 -52
- package/server/constants.ts +0 -13
- package/server/control-client.ts +0 -124
- package/server/control.ts +0 -572
- package/server/data-dir.ts +0 -22
- package/server/debug.ts +0 -10
- package/server/events.ts +0 -25
- package/server/harness/README.md +0 -381
- package/server/harness/acp/NOTES.md +0 -426
- package/server/harness/acp/adapter.ts +0 -206
- package/server/harness/acp/archived.ts +0 -88
- package/server/harness/acp/client.ts +0 -329
- package/server/harness/acp/discovery.ts +0 -127
- package/server/harness/acp/model-state.ts +0 -57
- package/server/harness/acp/run-durations.ts +0 -68
- package/server/harness/acp/session.ts +0 -786
- package/server/harness/acp/wire.ts +0 -132
- package/server/harness/auth.ts +0 -272
- package/server/harness/claude-code/NOTES.md +0 -651
- package/server/harness/claude-code/adapter.ts +0 -876
- package/server/harness/claude-code/auth.ts +0 -178
- package/server/harness/claude-code/cli.ts +0 -42
- package/server/harness/claude-code/git-worktree.ts +0 -35
- package/server/harness/claude-code/index.ts +0 -171
- package/server/harness/claude-code/mcp.ts +0 -152
- package/server/harness/claude-code/models.ts +0 -102
- package/server/harness/claude-code/permissions.ts +0 -34
- package/server/harness/claude-code/run-action.ts +0 -123
- package/server/harness/claude-code/session-title.ts +0 -104
- package/server/harness/claude-code/session.ts +0 -969
- package/server/harness/claude-code/sessions.ts +0 -153
- package/server/harness/codex/NOTES.md +0 -259
- package/server/harness/codex/adapter.ts +0 -633
- package/server/harness/codex/auth.ts +0 -140
- package/server/harness/codex/client.ts +0 -439
- package/server/harness/codex/connectors.ts +0 -92
- package/server/harness/codex/discovery.ts +0 -106
- package/server/harness/codex/index.ts +0 -107
- package/server/harness/codex/pagination.ts +0 -27
- package/server/harness/codex/permissions.ts +0 -80
- package/server/harness/codex/probe.ts +0 -183
- package/server/harness/codex/run-action.ts +0 -93
- package/server/harness/codex/session-title.ts +0 -147
- package/server/harness/codex/session.ts +0 -1196
- package/server/harness/codex/status.ts +0 -31
- package/server/harness/codex/thread-list.ts +0 -78
- package/server/harness/codex/transport.ts +0 -191
- package/server/harness/command.ts +0 -45
- package/server/harness/debug.ts +0 -57
- package/server/harness/detect.ts +0 -164
- package/server/harness/executable.ts +0 -125
- package/server/harness/fork.ts +0 -14
- package/server/harness/hermes/NOTES.md +0 -833
- package/server/harness/hermes/discovery.ts +0 -175
- package/server/harness/hermes/index.ts +0 -167
- package/server/harness/hermes/models.ts +0 -99
- package/server/harness/install.ts +0 -49
- package/server/harness/openclaw/NOTES.md +0 -749
- package/server/harness/openclaw/adapter.ts +0 -336
- package/server/harness/openclaw/compat.ts +0 -95
- package/server/harness/openclaw/cron-view.ts +0 -78
- package/server/harness/openclaw/discovery.ts +0 -456
- package/server/harness/openclaw/gateway.ts +0 -467
- package/server/harness/openclaw/index.ts +0 -125
- package/server/harness/openclaw/session.ts +0 -1512
- package/server/harness/openclaw/strip.ts +0 -184
- package/server/harness/openclaw/thinking.ts +0 -150
- package/server/harness/registry.ts +0 -39
- package/server/harness/run-action.ts +0 -85
- package/server/harness/session-title.ts +0 -59
- package/server/harness/shell-path.ts +0 -89
- package/server/harness/types.ts +0 -170
- package/server/navigation-relay.ts +0 -110
- package/server/onboarding/brief.ts +0 -29
- package/server/onboarding/ideas.ts +0 -48
- package/server/onboarding/jobs.ts +0 -291
- package/server/open-browser.ts +0 -7
- package/server/operations/commands.ts +0 -46
- package/server/operations/files.ts +0 -148
- package/server/operations/server.ts +0 -206
- package/server/remote/agent.ts +0 -103
- package/server/remote/broker-client.ts +0 -76
- package/server/remote/broker.ts +0 -81
- package/server/remote/client.ts +0 -725
- package/server/remote/errors.ts +0 -2
- package/server/remote/routes.ts +0 -121
- package/server/remote/workspace.ts +0 -34
- package/server/scratchpad/assets.ts +0 -258
- package/server/scratchpad/document.ts +0 -312
- package/server/scratchpad/executor.ts +0 -499
- package/server/scratchpad/relay.ts +0 -44
- package/server/scratchpad/shape-defaults.ts +0 -82
- package/server/server-cwd.ts +0 -23
- package/server/service.ts +0 -800
- package/server/sessions/archive.ts +0 -23
- package/server/sessions/attachment-message.ts +0 -95
- package/server/sessions/config.ts +0 -45
- package/server/sessions/lifecycle.ts +0 -19
- package/server/sessions/pending-views.ts +0 -158
- package/server/sessions/selected.ts +0 -113
- package/server/sessions/send-message.ts +0 -102
- package/server/sessions/store.ts +0 -54
- package/server/sessions/view-sessions.ts +0 -192
- package/server/skills/locations.ts +0 -82
- package/server/skills/lock.ts +0 -29
- package/server/skills/template.ts +0 -94
- package/server/skills/update.ts +0 -94
- package/server/skills/version.ts +0 -129
- package/server/skills/workspace.ts +0 -121
- package/server/state.ts +0 -40
- package/server/static.ts +0 -25
- package/server/status.ts +0 -110
- package/server/tldraw-package.d.ts +0 -4
- package/server/update.ts +0 -429
- package/server/uploads.ts +0 -290
- package/server/vendor.ts +0 -63
- package/server/version.ts +0 -41
- package/server/web.ts +0 -350
- package/server/workspace-state/file.ts +0 -181
- package/server/workspace-state/index.ts +0 -169
- package/server/workspace-state/lock.ts +0 -42
- package/server/workspace-state/types.ts +0 -16
- package/server/workspaces/api.ts +0 -24
- package/server/workspaces/change-harness.ts +0 -77
- package/server/workspaces/config.ts +0 -42
- package/server/workspaces/env-apply.ts +0 -20
- package/server/workspaces/env.ts +0 -424
- package/server/workspaces/harness-transition.ts +0 -29
- package/server/workspaces/icon.ts +0 -13
- package/server/workspaces/import.ts +0 -74
- package/server/workspaces/init.ts +0 -74
- package/server/workspaces/layout.ts +0 -190
- package/server/workspaces/preview.ts +0 -72
- package/server/workspaces/registry.ts +0 -330
- package/server/workspaces/required-env.ts +0 -19
- package/server/workspaces/scaffold.ts +0 -189
- package/server/workspaces/shared.ts +0 -74
- package/server/workspaces/tabs.ts +0 -35
- package/server/workspaces/theme.ts +0 -58
- package/tsconfig.json +0 -20
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{H}from"./chunk-kjp60rqs.js";import{An}from"./chunk-c3qyet60.js";import"./chunk-zwvtkb81.js";import{a,t,Te}from"./chunk-wvarpvem.js";import{existsSync as O}from"fs";import{mkdir as q}from"fs/promises";import{join as D,relative as A}from"path";import{join as S}from"path";var b={$schema:"https://ui.shadcn.com/schema/registry.json",name:"moi",homepage:"https://moi.computer",items:[{name:"accordion",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/accordion.tsx",type:"registry:ui"}],title:"Accordion",description:"Vertically stacked sections that expand one at a time"},{name:"alert",type:"registry:ui",dependencies:["class-variance-authority"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/alert.tsx",type:"registry:ui"}],title:"Alert",description:"Callout box for statuses and short messages"},{name:"alert-dialog",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/alert-dialog.tsx",type:"registry:ui"}],title:"Alert Dialog",description:"Modal confirmation dialog for destructive or blocking actions"},{name:"scoped-portal",type:"registry:lib",files:[{path:"ui-components/scoped-portal.tsx",type:"registry:lib",target:"@ui/scoped-portal.tsx"}],title:"Scoped portal",description:"Preserves the surrounding CSS scope across a portal."},{name:"attachment",type:"registry:ui",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils"],files:[{path:"ui-components/attachment.tsx",type:"registry:ui"}],title:"Attachment",description:"File or image attachment tile with metadata and actions"},{name:"avatar",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/avatar.tsx",type:"registry:ui"}],title:"Avatar",description:"User or entity image with fallback initials"},{name:"badge",type:"registry:ui",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/badge.tsx",type:"registry:ui"}],title:"Badge",description:"Small status or count label"},{name:"button",type:"registry:ui",title:"Button",description:"The button: variants, sizes, icon support",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/button.tsx",type:"registry:ui"}]},{name:"button-group",type:"registry:ui",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/separator","molefrog/moi/utils"],files:[{path:"ui-components/button-group.tsx",type:"registry:ui"}],title:"Button Group",description:"Buttons joined into one segmented control"},{name:"calendar",type:"registry:ui",dependencies:["@tabler/icons-react","date-fns","react-day-picker@latest"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils"],files:[{path:"ui-components/calendar.tsx",type:"registry:ui"}],title:"Calendar",description:"Month calendar for picking dates and ranges"},{name:"card",type:"registry:ui",registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/card.tsx",type:"registry:ui"}],title:"Card",description:"Container with header, content, and footer"},{name:"carousel",type:"registry:ui",dependencies:["@tabler/icons-react","embla-carousel-react"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils"],files:[{path:"ui-components/carousel.tsx",type:"registry:ui"}],title:"Carousel",description:"Swipeable slides with prev/next controls"},{name:"chart",type:"registry:ui",dependencies:["recharts@3.8.0"],registryDependencies:["molefrog/moi/card","molefrog/moi/utils"],files:[{path:"ui-components/chart.tsx",type:"registry:ui"}],title:"Chart",description:"Recharts-based charts wired to workspace theme tokens"},{name:"checkbox",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/checkbox.tsx",type:"registry:ui"}],title:"Checkbox",description:"Binary checkbox with indeterminate state"},{name:"collapsible",type:"registry:ui",dependencies:["@base-ui/react"],files:[{path:"ui-components/collapsible.tsx",type:"registry:ui"}],title:"Collapsible",description:"Single section that expands and collapses"},{name:"combobox",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/button","molefrog/moi/input-group","molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/combobox.tsx",type:"registry:ui"}],title:"Combobox",description:"Text input with a filtered dropdown of options"},{name:"context-menu",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/context-menu.tsx",type:"registry:ui"}],title:"Context Menu",description:"Right-click menu with items, submenus, and shortcuts"},{name:"data-table",type:"registry:block",dependencies:["@tanstack/react-table"],registryDependencies:["molefrog/moi/table"],title:"Data Table",description:"Sortable, filterable table pattern built on Table and TanStack Table"},{name:"date-picker",type:"registry:block",registryDependencies:["molefrog/moi/calendar","molefrog/moi/popover","molefrog/moi/button"],title:"Date Picker",description:"Date picker pattern built from Calendar, Popover, and Button"},{name:"dialog",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/dialog.tsx",type:"registry:ui"}],title:"Dialog",description:"Modal dialog with backdrop, header, and footer"},{name:"drawer",type:"registry:ui",title:"Drawer",description:"Right-side detail panel scoped to the current view",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils"],files:[{path:"ui-components/drawer.tsx",type:"registry:ui"}]},{name:"dropdown-menu",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/dropdown-menu.tsx",type:"registry:ui"}],title:"Dropdown Menu",description:"Menu opened from a trigger: items, groups, submenus"},{name:"field",type:"registry:ui",dependencies:["class-variance-authority"],registryDependencies:["molefrog/moi/label","molefrog/moi/separator","molefrog/moi/utils"],files:[{path:"ui-components/field.tsx",type:"registry:ui"}],title:"Field",description:"Form field wrapper: label, control, description, error"},{name:"hover-card",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/hover-card.tsx",type:"registry:ui"}],title:"Hover Card",description:"Preview card shown on hover over a link or element"},{name:"input",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/input.tsx",type:"registry:ui"}],title:"Input",description:"Single-line text input"},{name:"input-group",type:"registry:ui",dependencies:["class-variance-authority"],registryDependencies:["molefrog/moi/button","molefrog/moi/input","molefrog/moi/textarea","molefrog/moi/utils"],files:[{path:"ui-components/input-group.tsx",type:"registry:ui"}],title:"Input Group",description:"Input with attached addons, buttons, or icons"},{name:"kbd",type:"registry:ui",registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/kbd.tsx",type:"registry:ui"}],title:"Kbd",description:"Keyboard keys and shortcut combinations"},{name:"label",type:"registry:ui",registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/label.tsx",type:"registry:ui"}],title:"Label",description:"Form control label"},{name:"pagination",type:"registry:ui",dependencies:["@tabler/icons-react"],registryDependencies:["molefrog/moi/button","molefrog/moi/utils"],files:[{path:"ui-components/pagination.tsx",type:"registry:ui"}],title:"Pagination",description:"Page navigation with prev/next and page links"},{name:"popover",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/popover.tsx",type:"registry:ui"}],title:"Popover",description:"Floating panel anchored to a trigger"},{name:"progress",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/progress.tsx",type:"registry:ui"}],title:"Progress",description:"Determinate progress bar"},{name:"radio-group",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/radio-group.tsx",type:"registry:ui"}],title:"Radio Group",description:"Single-choice radio button set"},{name:"resizable",type:"registry:ui",dependencies:["react-resizable-panels"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/resizable.tsx",type:"registry:ui"}],title:"Resizable",description:"Resizable split panels with drag handles"},{name:"select",type:"registry:ui",dependencies:["@base-ui/react","@tabler/icons-react"],registryDependencies:["molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/select.tsx",type:"registry:ui"}],title:"Select",description:"Native-feeling select with a styled popup"},{name:"separator",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/separator.tsx",type:"registry:ui"}],title:"Separator",description:"Horizontal or vertical dividing line"},{name:"skeleton",type:"registry:ui",registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/skeleton.tsx",type:"registry:ui"}],title:"Skeleton",description:"Loading placeholder block"},{name:"slider",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/slider.tsx",type:"registry:ui"}],title:"Slider",description:"Range slider with one or more thumbs"},{name:"spinner",type:"registry:ui",dependencies:["@tabler/icons-react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/spinner.tsx",type:"registry:ui"}],title:"Spinner",description:"Inline loading spinner"},{name:"switch",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/switch.tsx",type:"registry:ui"}],title:"Switch",description:"On/off toggle switch"},{name:"table",type:"registry:ui",registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/table.tsx",type:"registry:ui"}],title:"Table",description:"Styled table primitives (header, body, rows, cells)"},{name:"tabs",type:"registry:ui",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/tabs.tsx",type:"registry:ui"}],title:"Tabs",description:"Tabbed panels with a tab list"},{name:"textarea",type:"registry:ui",registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/textarea.tsx",type:"registry:ui"}],title:"Textarea",description:"Multi-line text input"},{name:"toggle",type:"registry:ui",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/utils"],files:[{path:"ui-components/toggle.tsx",type:"registry:ui"}],title:"Toggle",description:"Two-state button that can be on or off"},{name:"toggle-group",type:"registry:ui",dependencies:["@base-ui/react","class-variance-authority"],registryDependencies:["molefrog/moi/toggle","molefrog/moi/utils"],files:[{path:"ui-components/toggle-group.tsx",type:"registry:ui"}],title:"Toggle Group",description:"Group of two-state toggle buttons"},{name:"tooltip",type:"registry:ui",dependencies:["@base-ui/react"],registryDependencies:["molefrog/moi/utils","molefrog/moi/scoped-portal"],files:[{path:"ui-components/tooltip.tsx",type:"registry:ui"}],title:"Tooltip",description:"Small label shown on hover or focus"},{name:"utils",type:"registry:lib",dependencies:["clsx","tailwind-merge"],files:[{path:"ui-components/utils.ts",type:"registry:lib",target:"@ui/utils.ts"}],title:"Utils",description:"Shared class name utility."}]};var W=new Map(b.items.map((e)=>[e.name,e])),f=Object.fromEntries(b.items.filter((e)=>e.type==="registry:ui"||e.type==="registry:block").map((e)=>[e.name,{description:e.description??e.title??e.name}]).sort(([e],[i])=>e.localeCompare(i))),h=Object.keys(f);function y(e){let i=e.split("#",1)[0];return i.split("/").at(-1)??i}function x(e){let i=new Set,n=new Set,s=(o)=>{if(n.has(o))return;n.add(o);let r=W.get(o);if(!r)return;if(r.files?.length){for(let l of r.files)i.add(U(l.path));return}for(let l of r.registryDependencies??[])s(y(l))};return s(y(e)),[...i]}function U(e){return e.split("/").pop()??e}async function P(e,i=H){let{loadRegistryItem:n}=await import("./chunk-ewc55jga.js"),s=new Map,o=new Set,r=new Set,l=async(c)=>{let d=y(c);if(r.has(d))return;r.add(d);let u=await n(d,{cwd:i});for(let m of u.files??[]){if(!m.content)throw Error(`Registry item "${d}" has a missing file: ${m.path}`);s.set(U(m.path),m.content)}for(let m of u.dependencies??[])o.add(m);for(let m of u.registryDependencies??[])await l(m)};for(let c of new Set(e))await l(c);return{files:[...s.entries()].map(([c,d])=>({name:c,content:d})),dependencies:[...o].sort()}}async function R(e,i=H){let n=y(e),s=S(i,"ui-components","docs",`${n}.md`),o=Bun.file(s);if(!await o.exists())throw Error(`Missing local docs for "${n}": ${s}`);return o.text()}function w(e){let i=[],n=[];for(let s of e){let o=s.toLowerCase();if(!f[o]){n.push(s);continue}if(i.includes(o))continue;i.push(o)}return{entries:i,unknown:n}}function I(e,i=3){let n=e.toLowerCase().replace(/[^a-z0-9]/g,"");return h.map((o)=>{let r=o.replace(/[^a-z0-9]/g,""),l=0;if(r===n)l=100;else if(r.startsWith(n)||n.startsWith(r))l=80;else if(r.includes(n)||n.includes(r))l=60;else{let c=0;while(c<Math.min(r.length,n.length)&&r[c]===n[c])c++;l=c>=3?c*10:0}return{candidate:o,score:l}}).filter((o)=>o.score>0).sort((o,r)=>r.score-o.score).slice(0,i).map((o)=>o.candidate)}function T(e,i){let n=e.filter((o)=>!o.support),s=i?[]:n.filter((o)=>o.exists);return{write:e.filter((o)=>!o.exists||i&&!o.support),keepSupport:e.filter((o)=>o.support&&o.exists),skipInstalled:s}}function M(e){let i=new Set(e.requestedFiles);return e.files.map((s)=>{let o=S(e.uiDir,s.name);return{...s,path:o,exists:e.exists(o),support:!i.has(s.name)}})}function v(e){return D(e,".moi","ui")}function N(e){for(let i of e){let n=I(i);console.error(t.red("\u2717")+` "${i}" is not in the component catalog.`+(n.length?t.dim(` Did you mean: ${n.join(", ")}?`):""))}console.error(t.dim(`
|
|
3
|
+
moi ui-components \u2014 the full catalog
|
|
4
|
+
`)),process.exit(1)}var L=a({meta:{name:"add",description:"Add components from the local registry to .moi/ui/"},args:{name:{type:"positional",required:!0,description:"Component names (see `moi ui-components`)"},force:{type:"boolean",default:!1,description:"Overwrite existing files of the requested components"},install:{type:"boolean",default:!1,description:"Run `bun install` in .moi/ for the printed dependencies"}},async run({args:e}){let i=w(e._);if(i.unknown.length>0)N(i.unknown);let n=await Te(),s=v(n.path),o;try{o=await P(i.entries)}catch(p){console.error(`
|
|
5
|
+
`+t.red("\u2717")+` Could not load the requested components from the local registry.
|
|
6
|
+
`+t.dim(` ${p.message}
|
|
7
|
+
`)),process.exit(1)}let r=M({files:o.files,requestedFiles:i.entries.flatMap(x),uiDir:s,exists:O}),l=T(r,e.force);if(l.write.length===0)console.error(`
|
|
8
|
+
`+t.red("\u2717")+" Already installed: "+l.skipInstalled.map((p)=>t.bold(p.name)).join(", ")+`
|
|
9
|
+
`+t.dim(` Files in .moi/ui/ may carry your customizations.
|
|
10
|
+
`)+t.dim(` Re-run with --force to overwrite them.
|
|
11
|
+
`)),process.exit(1);await q(s,{recursive:!0});let c=[];for(let p of l.write)await Bun.write(p.path,p.content),c.push(p.name);let d=l.keepSupport.map((p)=>p.name),u=l.skipInstalled.map((p)=>p.name),m=new Set(Object.keys(An.dependencies)),g=[...new Set(o.dependencies)].filter((p)=>!m.has(p.replace(/@[^@/]+$/,""))).sort();if(console.log(`
|
|
12
|
+
`+t.green("\u2713")+" Added to "+t.bold(".moi/ui/")+":"),console.log(t.dim(" "+c.join(", "))),d.length>0)console.log(t.dim(` kept existing: ${d.join(", ")}`));if(u.length>0)console.log(t.dim(` already installed, kept: ${u.join(", ")} \u2014 re-run with --force to overwrite`));let C=D(n.path,".moi"),k=g.length>0;if(e.install){if(Bun.spawnSync(["bun","install",...g],{cwd:C,stdout:"inherit",stderr:"inherit"}).exitCode!==0)console.error(`
|
|
13
|
+
`+t.red("\u2717")+` bun install failed in ${t.bold(".moi/")} \u2014 install the dependencies yourself:
|
|
14
|
+
`+t.dim(` bun install ${g.join(" ")}
|
|
15
|
+
`)),process.exit(1);console.log(t.green("\u2713")+" Installed dependencies in "+t.bold(".moi/")+(g.length>0?t.dim(` (${g.join(", ")})`):"")),k=!1}if(console.log(`
|
|
16
|
+
Next steps (yours):`),k){let p=A(process.cwd(),C),E=p===""?"":`cd ${/\s/.test(p)?JSON.stringify(p):p} && `;console.log(" 1. Install dependencies: "+t.bold(`${E}bun install ${g.join(" ")}`)+t.dim(" (or re-run add with --install)")),console.log(" 2. Import relatively \u2014 "+t.bold("import { \u2026 } from '../ui/<name>'")),console.log(" 3. Rebuild: "+t.bold("moi bundle"))}else console.log(" 1. Import relatively \u2014 "+t.bold("import { \u2026 } from '../ui/<name>'")),console.log(" 2. Rebuild: "+t.bold("moi bundle"));console.log(t.dim(`
|
|
17
|
+
Component docs: moi ui-components docs ${i.entries.join(" ")}
|
|
18
|
+
`))}}),_=a({meta:{name:"docs",description:"Print component docs as markdown"},args:{name:{type:"positional",required:!0,description:"Component names (see `moi ui-components`)"}},async run({args:e}){let i=w(e._);if(i.unknown.length>0)N(i.unknown);console.log("> Import components relatively from `../ui/<name>` and use `@tabler/icons-react` for icons.\n");for(let n of i.entries)try{let s=await R(n);if(i.entries.length>1)console.log(`
|
|
19
|
+
---
|
|
20
|
+
# ${n}
|
|
21
|
+
`);console.log(s)}catch(s){console.error(t.red("\u2717")+` Could not load docs for "${n}": ${s.message}`),process.exitCode=1}}});function j(e,i){let n=i?.toLowerCase(),s=Math.max(...h.map((r)=>r.length))+2,o=[];for(let r of h){let l=f[r];if(n&&!r.includes(n)&&!l.description.toLowerCase().includes(n))continue;let c=x(r).every((d)=>O(D(e,d)));o.push(" "+(c?t.green("\u2713 "):" ")+t.cyan(r.padEnd(s))+t.dim(l.description))}if(o.length===0){console.log(`
|
|
22
|
+
`+t.dim(` Nothing matches "${i}".`)+`
|
|
23
|
+
`);return}console.log(),console.log(o.join(`
|
|
24
|
+
`)),console.log(`
|
|
25
|
+
`+t.dim(" \u2713 installed in .moi/ui/ \xB7 add: ")+t.bold("moi ui-components add <name\u2026>")+t.dim(" \xB7 docs: ")+t.bold("moi ui-components docs <name\u2026>")+`
|
|
26
|
+
`)}var z=a({meta:{name:"list",description:"The component catalog with installed state"},args:{q:{type:"string",description:"Filter by name or description"}},async run({args:e}){let i=await Te();j(v(i.path),e.q)}}),B={add:L,docs:_,list:z};async function se(e){let i=e.find((s)=>!s.startsWith("-"));if(i&&Object.hasOwn(B,i))return;let n=await Te();j(v(n.path))}export{se as runUiComponentsCatalog,B as uiComponentsSubCommands};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{e,n}from"./chunk-7c0zbz74.js";var lc=e(function(kl,pc){var ze=n("constants"),Xu=process.cwd,Et=null,Hu=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!Et)Et=Xu.call(process);return Et};try{process.cwd()}catch(t){}if(typeof process.chdir==="function"){if(Tt=process.chdir,process.chdir=function(t){Et=null,Tt.call(process,t)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,Tt)}var Tt;pc.exports=Qu;function Qu(t){if(ze.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))a(t);if(!t.lutimes)p(t);if(t.chown=d(t.chown),t.fchown=d(t.fchown),t.lchown=d(t.lchown),t.chmod=l(t.chmod),t.fchmod=l(t.fchmod),t.lchmod=l(t.lchmod),t.chownSync=h(t.chownSync),t.fchownSync=h(t.fchownSync),t.lchownSync=h(t.lchownSync),t.chmodSync=f(t.chmodSync),t.fchmodSync=f(t.fchmodSync),t.lchmodSync=f(t.lchmodSync),t.stat=g(t.stat),t.fstat=g(t.fstat),t.lstat=g(t.lstat),t.statSync=y(t.statSync),t.fstatSync=y(t.fstatSync),t.lstatSync=y(t.lstatSync),t.chmod&&!t.lchmod)t.lchmod=function(x,w,S){if(S)process.nextTick(S)},t.lchmodSync=function(){};if(t.chown&&!t.lchown)t.lchown=function(x,w,S,z){if(z)process.nextTick(z)},t.lchownSync=function(){};if(Hu==="win32")t.rename=typeof t.rename!=="function"?t.rename:function(x){function w(S,z,O){var C=Date.now(),N=0;x(S,z,function L(ce){if(ce&&(ce.code==="EACCES"||ce.code==="EPERM"||ce.code==="EBUSY")&&Date.now()-C<60000){if(setTimeout(function(){t.stat(z,function(U,D){if(U&&U.code==="ENOENT")x(S,z,L);else O(ce)})},N),N<100)N+=10;return}if(O)O(ce)})}if(Object.setPrototypeOf)Object.setPrototypeOf(w,x);return w}(t.rename);t.read=typeof t.read!=="function"?t.read:function(x){function w(S,z,O,C,N,L){var ce;if(L&&typeof L==="function"){var U=0;ce=function(D,H,Le){if(D&&D.code==="EAGAIN"&&U<10)return U++,x.call(t,S,z,O,C,N,ce);L.apply(this,arguments)}}return x.call(t,S,z,O,C,N,ce)}if(Object.setPrototypeOf)Object.setPrototypeOf(w,x);return w}(t.read),t.readSync=typeof t.readSync!=="function"?t.readSync:function(x){return function(w,S,z,O,C){var N=0;while(!0)try{return x.call(t,w,S,z,O,C)}catch(L){if(L.code==="EAGAIN"&&N<10){N++;continue}throw L}}}(t.readSync);function a(x){x.lchmod=function(w,S,z){x.open(w,ze.O_WRONLY|ze.O_SYMLINK,S,function(O,C){if(O){if(z)z(O);return}x.fchmod(C,S,function(N){x.close(C,function(L){if(z)z(N||L)})})})},x.lchmodSync=function(w,S){var z=x.openSync(w,ze.O_WRONLY|ze.O_SYMLINK,S),O=!0,C;try{C=x.fchmodSync(z,S),O=!1}finally{if(O)try{x.closeSync(z)}catch(N){}else x.closeSync(z)}return C}}function p(x){if(ze.hasOwnProperty("O_SYMLINK")&&x.futimes)x.lutimes=function(w,S,z,O){x.open(w,ze.O_SYMLINK,function(C,N){if(C){if(O)O(C);return}x.futimes(N,S,z,function(L){x.close(N,function(ce){if(O)O(L||ce)})})})},x.lutimesSync=function(w,S,z){var O=x.openSync(w,ze.O_SYMLINK),C,N=!0;try{C=x.futimesSync(O,S,z),N=!1}finally{if(N)try{x.closeSync(O)}catch(L){}else x.closeSync(O)}return C};else if(x.futimes)x.lutimes=function(w,S,z,O){if(O)process.nextTick(O)},x.lutimesSync=function(){}}function l(x){if(!x)return x;return function(w,S,z){return x.call(t,w,S,function(O){if(v(O))O=null;if(z)z.apply(this,arguments)})}}function f(x){if(!x)return x;return function(w,S){try{return x.call(t,w,S)}catch(z){if(!v(z))throw z}}}function d(x){if(!x)return x;return function(w,S,z,O){return x.call(t,w,S,z,function(C){if(v(C))C=null;if(O)O.apply(this,arguments)})}}function h(x){if(!x)return x;return function(w,S,z){try{return x.call(t,w,S,z)}catch(O){if(!v(O))throw O}}}function g(x){if(!x)return x;return function(w,S,z){if(typeof S==="function")z=S,S=null;function O(C,N){if(N){if(N.uid<0)N.uid+=4294967296;if(N.gid<0)N.gid+=4294967296}if(z)z.apply(this,arguments)}return S?x.call(t,w,S,O):x.call(t,w,O)}}function y(x){if(!x)return x;return function(w,S){var z=S?x.call(t,w,S):x.call(t,w);if(z){if(z.uid<0)z.uid+=4294967296;if(z.gid<0)z.gid+=4294967296}return z}}function v(x){if(!x)return!0;if(x.code==="ENOSYS")return!0;var w=!process.getuid||process.getuid()!==0;if(w){if(x.code==="EINVAL"||x.code==="EPERM")return!0}return!1}}});var dc=e(function(Zl,mc){var fc=n("stream").Stream;mc.exports=ea;function ea(t){return{ReadStream:a,WriteStream:p};function a(l,f){if(!(this instanceof a))return new a(l,f);fc.call(this);var d=this;this.path=l,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,f=f||{};var h=Object.keys(f);for(var g=0,y=h.length;g<y;g++){var v=h[g];this[v]=f[v]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){d._read()});return}t.open(this.path,this.flags,this.mode,function(x,w){if(x){d.emit("error",x),d.readable=!1;return}d.fd=w,d.emit("open",w),d._read()})}function p(l,f){if(!(this instanceof p))return new p(l,f);fc.call(this),this.path=l,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,f=f||{};var d=Object.keys(f);for(var h=0,g=d.length;h<g;h++){var y=d[h];this[y]=f[y]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var _c=e(function(Sl,hc){hc.exports=ra;var ta=Object.getPrototypeOf||function(t){return t.__proto__};function ra(t){if(t===null||typeof t!=="object")return t;if(t instanceof Object)var a={__proto__:ta(t)};else var a=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(p){Object.defineProperty(a,p,Object.getOwnPropertyDescriptor(t,p))}),a}});var Gr=e(function(Pl,Vr){var Y=n("fs"),oa=lc(),na=dc(),ia=_c(),It=n("util"),ie,At;if(typeof Symbol==="function"&&typeof Symbol.for==="function")ie=Symbol.for("graceful-fs.queue"),At=Symbol.for("graceful-fs.previous");else ie="___graceful-fs.queue",At="___graceful-fs.previous";function sa(){}function yc(t,a){Object.defineProperty(t,ie,{get:function(){return a}})}var Oe=sa;if(It.debuglog)Oe=It.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))Oe=function(){var t=It.format.apply(It,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
3
|
+
GFS4: `),console.error(t)};if(!Y[ie]){if(Ur=global[ie]||[],yc(Y,Ur),Y.close=function(t){function a(p,l){return t.call(Y,p,function(f){if(!f)gc();if(typeof l==="function")l.apply(this,arguments)})}return Object.defineProperty(a,At,{value:t}),a}(Y.close),Y.closeSync=function(t){function a(p){t.apply(Y,arguments),gc()}return Object.defineProperty(a,At,{value:t}),a}(Y.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){Oe(Y[ie]),n("assert").equal(Y[ie].length,0)})}var Ur;if(!global[ie])yc(global,Y[ie]);Vr.exports=Jr(ia(Y));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Y.__patched)Vr.exports=Jr(Y),Y.__patched=!0;function Jr(t){oa(t),t.gracefulify=Jr,t.createReadStream=H,t.createWriteStream=Le;var a=t.readFile;t.readFile=p;function p(A,R,j){if(typeof R==="function")j=R,R=null;return te(A,R,j);function te(re,ee,K,X){return a(re,ee,function(J){if(J&&(J.code==="EMFILE"||J.code==="ENFILE"))je([te,[re,ee,K],J,X||Date.now(),Date.now()]);else if(typeof K==="function")K.apply(this,arguments)})}}var l=t.writeFile;t.writeFile=f;function f(A,R,j,te){if(typeof j==="function")te=j,j=null;return re(A,R,j,te);function re(ee,K,X,J,oe){return l(ee,K,X,function(V){if(V&&(V.code==="EMFILE"||V.code==="ENFILE"))je([re,[ee,K,X,J],V,oe||Date.now(),Date.now()]);else if(typeof J==="function")J.apply(this,arguments)})}}var d=t.appendFile;if(d)t.appendFile=h;function h(A,R,j,te){if(typeof j==="function")te=j,j=null;return re(A,R,j,te);function re(ee,K,X,J,oe){return d(ee,K,X,function(V){if(V&&(V.code==="EMFILE"||V.code==="ENFILE"))je([re,[ee,K,X,J],V,oe||Date.now(),Date.now()]);else if(typeof J==="function")J.apply(this,arguments)})}}var g=t.copyFile;if(g)t.copyFile=y;function y(A,R,j,te){if(typeof j==="function")te=j,j=0;return re(A,R,j,te);function re(ee,K,X,J,oe){return g(ee,K,X,function(V){if(V&&(V.code==="EMFILE"||V.code==="ENFILE"))je([re,[ee,K,X,J],V,oe||Date.now(),Date.now()]);else if(typeof J==="function")J.apply(this,arguments)})}}var v=t.readdir;t.readdir=w;var x=/^v[0-5]\./;function w(A,R,j){if(typeof R==="function")j=R,R=null;var te=x.test(process.version)?function(K,X,J,oe){return v(K,re(K,X,J,oe))}:function(K,X,J,oe){return v(K,X,re(K,X,J,oe))};return te(A,R,j);function re(ee,K,X,J){return function(oe,V){if(oe&&(oe.code==="EMFILE"||oe.code==="ENFILE"))je([te,[ee,K,X],oe,J||Date.now(),Date.now()]);else{if(V&&V.sort)V.sort();if(typeof X==="function")X.call(this,oe,V)}}}}if(process.version.substr(0,4)==="v0.8"){var S=na(t);L=S.ReadStream,U=S.WriteStream}var z=t.ReadStream;if(z)L.prototype=Object.create(z.prototype),L.prototype.open=ce;var O=t.WriteStream;if(O)U.prototype=Object.create(O.prototype),U.prototype.open=D;Object.defineProperty(t,"ReadStream",{get:function(){return L},set:function(A){L=A},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return U},set:function(A){U=A},enumerable:!0,configurable:!0});var C=L;Object.defineProperty(t,"FileReadStream",{get:function(){return C},set:function(A){C=A},enumerable:!0,configurable:!0});var N=U;Object.defineProperty(t,"FileWriteStream",{get:function(){return N},set:function(A){N=A},enumerable:!0,configurable:!0});function L(A,R){if(this instanceof L)return z.apply(this,arguments),this;else return L.apply(Object.create(L.prototype),arguments)}function ce(){var A=this;Fe(A.path,A.flags,A.mode,function(R,j){if(R){if(A.autoClose)A.destroy();A.emit("error",R)}else A.fd=j,A.emit("open",j),A.read()})}function U(A,R){if(this instanceof U)return O.apply(this,arguments),this;else return U.apply(Object.create(U.prototype),arguments)}function D(){var A=this;Fe(A.path,A.flags,A.mode,function(R,j){if(R)A.destroy(),A.emit("error",R);else A.fd=j,A.emit("open",j)})}function H(A,R){return new t.ReadStream(A,R)}function Le(A,R){return new t.WriteStream(A,R)}var pt=t.open;t.open=Fe;function Fe(A,R,j,te){if(typeof j==="function")te=j,j=null;return re(A,R,j,te);function re(ee,K,X,J,oe){return pt(ee,K,X,function(V,Ca){if(V&&(V.code==="EMFILE"||V.code==="ENFILE"))je([re,[ee,K,X,J],V,oe||Date.now(),Date.now()]);else if(typeof J==="function")J.apply(this,arguments)})}}return t}function je(t){Oe("ENQUEUE",t[0].name,t[1]),Y[ie].push(t),Br()}var Nt;function gc(){var t=Date.now();for(var a=0;a<Y[ie].length;++a)if(Y[ie][a].length>2)Y[ie][a][3]=t,Y[ie][a][4]=t;Br()}function Br(){if(clearTimeout(Nt),Nt=void 0,Y[ie].length===0)return;var t=Y[ie].shift(),a=t[0],p=t[1],l=t[2],f=t[3],d=t[4];if(f===void 0)Oe("RETRY",a.name,p),a.apply(null,p);else if(Date.now()-f>=60000){Oe("TIMEOUT",a.name,p);var h=p.pop();if(typeof h==="function")h.call(null,l)}else{var g=Date.now()-d,y=Math.max(d-f,1),v=Math.min(y*1.2,100);if(g>=v)Oe("RETRY",a.name,p),a.apply(null,p.concat([f]));else Y[ie].push(t)}if(Nt===void 0)Nt=setTimeout(Br,0)}});var vc=e(function(Ol,xc){function pe(t,a){if(typeof a==="boolean")a={forever:a};if(this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=a||{},this._maxRetryTime=a&&a.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}xc.exports=pe;pe.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};pe.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};pe.prototype.retry=function(t){if(this._timeout)clearTimeout(this._timeout);if(!t)return!1;var a=new Date().getTime();if(t&&a-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var p=this._timeouts.shift();if(p===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),p=this._timeouts.shift();else return!1;var l=this,f=setTimeout(function(){if(l._attempts++,l._operationTimeoutCb){if(l._timeout=setTimeout(function(){l._operationTimeoutCb(l._attempts)},l._operationTimeout),l._options.unref)l._timeout.unref()}l._fn(l._attempts)},p);if(this._options.unref)f.unref();return!0};pe.prototype.attempt=function(t,a){if(this._fn=t,a){if(a.timeout)this._operationTimeout=a.timeout;if(a.cb)this._operationTimeoutCb=a.cb}var p=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){p._operationTimeoutCb()},p._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};pe.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};pe.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};pe.prototype.start=pe.prototype.try;pe.prototype.errors=function(){return this._errors};pe.prototype.attempts=function(){return this._attempts};pe.prototype.mainError=function(){if(this._errors.length===0)return null;var t={},a=null,p=0;for(var l=0;l<this._errors.length;l++){var f=this._errors[l],d=f.message,h=(t[d]||0)+1;if(t[d]=h,h>=p)a=f,p=h}return a}});var $c=e(function(Wr){var ca=vc();Wr.operation=function(t){var a=Wr.timeouts(t);return new ca(a,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};Wr.timeouts=function(t){if(t instanceof Array)return[].concat(t);var a={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var p in t)a[p]=t[p];if(a.minTimeout>a.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var l=[];for(var f=0;f<a.retries;f++)l.push(this.createTimeout(f,a));if(t&&t.forever&&!l.length)l.push(this.createTimeout(f,a));return l.sort(function(d,h){return d-h}),l};Wr.createTimeout=function(t,a){var p=a.randomize?Math.random()+1:1,l=Math.round(p*a.minTimeout*Math.pow(a.factor,t));return l=Math.min(l,a.maxTimeout),l};Wr.wrap=function(t,a,p){if(a instanceof Array)p=a,a=null;if(!p){p=[];for(var l in t)if(typeof t[l]==="function")p.push(l)}for(var f=0;f<p.length;f++){var d=p[f],h=t[d];t[d]=function(y){var v=Wr.operation(a),x=Array.prototype.slice.call(arguments,1),w=x.pop();x.push(function(S){if(v.retry(S))return;if(S)arguments[0]=v.mainError();w.apply(this,arguments)}),v.attempt(function(){y.apply(t,x)})}.bind(t,h),t[d].options=a}}});var bc=e(function(Tl,Ct){Ct.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")Ct.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Ct.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var wc=e(function(Il,De){var q=global.process,Ee=function(t){return t&&typeof t==="object"&&typeof t.removeListener==="function"&&typeof t.emit==="function"&&typeof t.reallyExit==="function"&&typeof t.listeners==="function"&&typeof t.kill==="function"&&typeof t.pid==="number"&&typeof t.on==="function"};if(!Ee(q))De.exports=function(){return function(){}};else{if(qr=n("assert"),Te=bc(),Kr=/^win/i.test(q.platform),Re=n("events"),typeof Re!=="function")Re=Re.EventEmitter;if(q.__signal_exit_emitter__)Q=q.__signal_exit_emitter__;else Q=q.__signal_exit_emitter__=new Re,Q.count=0,Q.emitted={};if(!Q.infinite)Q.setMaxListeners(1/0),Q.infinite=!0;De.exports=function(t,a){if(!Ee(global.process))return function(){};if(qr.equal(typeof t,"function","a callback must be provided for exit handler"),Ie===!1)jt();var p="exit";if(a&&a.alwaysLast)p="afterexit";var l=function(){if(Q.removeListener(p,t),Q.listeners("exit").length===0&&Q.listeners("afterexit").length===0)it()};return Q.on(p,t),l},it=function(){if(!Ie||!Ee(global.process))return;Ie=!1,Te.forEach(function(a){try{q.removeListener(a,st[a])}catch(p){}}),q.emit=ct,q.reallyExit=Rt,Q.count-=1},De.exports.unload=it,$e=function(a,p,l){if(Q.emitted[a])return;Q.emitted[a]=!0,Q.emit(a,p,l)},st={},Te.forEach(function(t){st[t]=function(){if(!Ee(global.process))return;var p=q.listeners(t);if(p.length===Q.count){if(it(),$e("exit",null,t),$e("afterexit",null,t),Kr&&t==="SIGHUP")t="SIGINT";q.kill(q.pid,t)}}}),De.exports.signals=function(){return Te},Ie=!1,jt=function(){if(Ie||!Ee(global.process))return;Ie=!0,Q.count+=1,Te=Te.filter(function(a){try{return q.on(a,st[a]),!0}catch(p){return!1}}),q.emit=Xr,q.reallyExit=Yr},De.exports.load=jt,Rt=q.reallyExit,Yr=function(a){if(!Ee(global.process))return;q.exitCode=a||0,$e("exit",q.exitCode,null),$e("afterexit",q.exitCode,null),Rt.call(q,q.exitCode)},ct=q.emit,Xr=function(a,p){if(a==="exit"&&Ee(global.process)){if(p!==void 0)q.exitCode=p;var l=ct.apply(this,arguments);return $e("exit",q.exitCode,null),$e("afterexit",q.exitCode,null),l}else return ct.apply(this,arguments)}}var qr,Te,Kr,Re,Q,it,$e,st,Ie,jt,Rt,Yr,ct,Xr});var Zc=e(function(ma,Hr){var kc=Symbol();function la(t,a,p){let l=a[kc];if(l)return a.stat(t,(d,h)=>{if(d)return p(d);p(null,h.mtime,l)});let f=new Date(Math.ceil(Date.now()/1000)*1000+5);a.utimes(t,f,f,(d)=>{if(d)return p(d);a.stat(t,(h,g)=>{if(h)return p(h);let y=g.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(a,kc,{value:y}),p(null,g.mtime,y)})})}function fa(t){let a=Date.now();if(t==="s")a=Math.ceil(a/1000)*1000;return new Date(a)}ma.probe=la;ma.getMtime=fa});var Ic=e(function(va,at){var Sc=n("path"),ro=Gr(),Pc=$c(),_a=wc(),Lt=Zc(),he={};function ut(t,a){return a.lockfilePath||`${t}.lock`}function oo(t,a,p){if(!a.realpath)return p(null,Sc.resolve(t));a.fs.realpath(t,p)}function to(t,a,p){let l=ut(t,a);a.fs.mkdir(l,(f)=>{if(!f)return Lt.probe(l,a.fs,(d,h,g)=>{if(d)return a.fs.rmdir(l,()=>{}),p(d);p(null,h,g)});if(f.code!=="EEXIST")return p(f);if(a.stale<=0)return p(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:t}));a.fs.stat(l,(d,h)=>{if(d){if(d.code==="ENOENT")return to(t,{...a,stale:0},p);return p(d)}if(!Oc(h,a))return p(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:t}));Ec(t,a,(g)=>{if(g)return p(g);to(t,{...a,stale:0},p)})})})}function Oc(t,a){return t.mtime.getTime()<Date.now()-a.stale}function Ec(t,a,p){a.fs.rmdir(ut(t,a),(l)=>{if(l&&l.code!=="ENOENT")return p(l);p()})}function Dt(t,a){let p=he[t];if(p.updateTimeout)return;if(p.updateDelay=p.updateDelay||a.update,p.updateTimeout=setTimeout(()=>{p.updateTimeout=null,a.fs.stat(p.lockfilePath,(l,f)=>{let d=p.lastUpdate+a.stale<Date.now();if(l){if(l.code==="ENOENT"||d)return eo(t,p,Object.assign(l,{code:"ECOMPROMISED"}));return p.updateDelay=1000,Dt(t,a)}if(p.mtime.getTime()!==f.mtime.getTime())return eo(t,p,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let g=Lt.getMtime(p.mtimePrecision);a.fs.utimes(p.lockfilePath,g,g,(y)=>{let v=p.lastUpdate+a.stale<Date.now();if(p.released)return;if(y){if(y.code==="ENOENT"||v)return eo(t,p,Object.assign(y,{code:"ECOMPROMISED"}));return p.updateDelay=1000,Dt(t,a)}p.mtime=g,p.lastUpdate=Date.now(),p.updateDelay=null,Dt(t,a)})})},p.updateDelay),p.updateTimeout.unref)p.updateTimeout.unref()}function eo(t,a,p){if(a.released=!0,a.updateTimeout)clearTimeout(a.updateTimeout);if(he[t]===a)delete he[t];a.options.onCompromised(p)}function ga(t,a,p){a={stale:1e4,update:null,realpath:!0,retries:0,fs:ro,onCompromised:(l)=>{throw l},...a},a.retries=a.retries||0,a.retries=typeof a.retries==="number"?{retries:a.retries}:a.retries,a.stale=Math.max(a.stale||0,2000),a.update=a.update==null?a.stale/2:a.update||0,a.update=Math.max(Math.min(a.update,a.stale/2),1000),oo(t,a,(l,f)=>{if(l)return p(l);let d=Pc.operation(a.retries);d.attempt(()=>{to(f,a,(h,g,y)=>{if(d.retry(h))return;if(h)return p(d.mainError());let v=he[f]={lockfilePath:ut(f,a),mtime:g,mtimePrecision:y,options:a,lastUpdate:Date.now()};Dt(f,a),p(null,(x)=>{if(v.released)return x&&x(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Tc(f,{...a,realpath:!1},x)})})})})}function Tc(t,a,p){a={fs:ro,realpath:!0,...a},oo(t,a,(l,f)=>{if(l)return p(l);let d=he[f];if(!d)return p(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));d.updateTimeout&&clearTimeout(d.updateTimeout),d.released=!0,delete he[f],Ec(f,a,p)})}function ya(t,a,p){a={stale:1e4,realpath:!0,fs:ro,...a},a.stale=Math.max(a.stale||0,2000),oo(t,a,(l,f)=>{if(l)return p(l);a.fs.stat(ut(f,a),(d,h)=>{if(d)return d.code==="ENOENT"?p(null,!1):p(d);return p(null,!Oc(h,a))})})}function xa(){return he}_a(()=>{for(let t in he){let a=he[t].options;try{a.fs.rmdirSync(ut(t,a))}catch(p){}}});va.lock=ga;va.unlock=Tc;va.check=ya;va.getLocks=xa});var Ac=e(function(Nl,Nc){var ka=Gr();function Za(t){let a=["mkdir","realpath","stat","rmdir","utimes"],p={...t};return a.forEach((l)=>{p[l]=(...f)=>{let d=f.pop(),h;try{h=t[`${l}Sync`](...f)}catch(g){return d(g)}d(null,h)}}),p}function Sa(t){return(...a)=>new Promise((p,l)=>{a.push((f,d)=>{if(f)l(f);else p(d)}),t(...a)})}function Pa(t){return(...a)=>{let p,l;if(a.push((f,d)=>{p=f,l=d}),t(...a),p)throw p;return l}}function Oa(t){if(t={...t},t.fs=Za(t.fs||ka),typeof t.retries==="number"&&t.retries>0||t.retries&&typeof t.retries.retries==="number"&&t.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return t}Nc.exports={toPromise:Sa,toSync:Pa,toSyncOptions:Oa}});var sn=e(function(Al,be){var le=Ic(),{toPromise:Ft,toSync:Mt,toSyncOptions:no}=Ac();async function Cc(t,a){let p=await Ft(le.lock)(t,a);return Ft(p)}function Ea(t,a){let p=Mt(le.lock)(t,no(a));return Mt(p)}function Ta(t,a){return Ft(le.unlock)(t,a)}function Ia(t,a){return Mt(le.unlock)(t,no(a))}function Na(t,a){return Ft(le.check)(t,a)}function Aa(t,a){return Mt(le.check)(t,no(a))}be.exports=Cc;be.exports.lock=Cc;be.exports.unlock=Ta;be.exports.lockSync=Ea;be.exports.unlockSync=Ia;be.exports.check=Na;be.exports.checkSync=Aa});var io;function i(t,a,p){function l(g,y){if(!g._zod)Object.defineProperty(g,"_zod",{value:{def:y,constr:h,traits:new Set},enumerable:!1});if(g._zod.traits.has(t))return;g._zod.traits.add(t),a(g,y);let v=h.prototype,x=Object.keys(v);for(let w=0;w<x.length;w++){let S=x[w];if(!(S in g))g[S]=v[S].bind(g)}}let f=p?.Parent??Object;class d extends f{}Object.defineProperty(d,"name",{value:t});function h(g){var y;let v=p?.Parent?new d:this;l(v,g),(y=v._zod).deferred??(y.deferred=[]);for(let x of v._zod.deferred)x();return v}return Object.defineProperty(h,"init",{value:l}),Object.defineProperty(h,Symbol.hasInstance,{value:(g)=>{if(p?.Parent&&g instanceof p.Parent)return!0;return g?._zod?.traits?.has(t)}}),Object.defineProperty(h,"name",{value:t}),h}var ja=Symbol("zod_brand");class de extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Me extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`);this.name="ZodEncodeError"}}(io=globalThis).__zod_globalConfig??(io.__zod_globalConfig={});var Ne=globalThis.__zod_globalConfig;function se(t){if(t)Object.assign(Ne,t);return Ne}function ft(t){let a=Object.values(t).filter((l)=>typeof l==="number");return Object.entries(t).filter(([l,f])=>a.indexOf(+l)===-1).map(([l,f])=>f)}function ai(t,a="|"){return t.map((p)=>oi(p)).join(a)}function Ue(t,a){if(typeof a==="bigint")return a.toString();return a}function Je(t){return{get value(){{let p=t();return Object.defineProperty(this,"value",{value:p}),p}throw Error("cached value already set")}}}function mt(t){return t===null||t===void 0}function dt(t){let a=t.startsWith("^")?1:0,p=t.endsWith("$")?t.length-1:t.length;return t.slice(a,p)}function co(t,a){let p=t/a,l=Math.round(p),f=Number.EPSILON*Math.max(Math.abs(p),1);if(Math.abs(p-l)<f)return 0;return p-l}var so=Symbol("evaluating");function _(t,a,p){let l=void 0;Object.defineProperty(t,a,{get(){if(l===so)return;if(l===void 0)l=so,l=p();return l},set(f){Object.defineProperty(t,a,{value:f})},configurable:!0})}function we(t,a,p){Object.defineProperty(t,a,{value:p,writable:!0,enumerable:!0,configurable:!0})}function _e(...t){let a={};for(let p of t){let l=Object.getOwnPropertyDescriptors(p);Object.assign(a,l)}return Object.defineProperties({},a)}function Jt(t){return JSON.stringify(t)}function uo(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Bt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Ae(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var ao=Je(()=>{if(Ne.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(t){return!1}});function ke(t){if(Ae(t)===!1)return!1;let a=t.constructor;if(a===void 0)return!0;if(typeof a!=="function")return!0;let p=a.prototype;if(Ae(p)===!1)return!1;if(Object.prototype.hasOwnProperty.call(p,"isPrototypeOf")===!1)return!1;return!0}function Vt(t){if(ke(t))return{...t};if(Array.isArray(t))return[...t];if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);return t}var po=new Set(["string","number","symbol"]);function ge(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function me(t,a,p){let l=new t._zod.constr(a??t._zod.def);if(!a||p?.parent)l._zod.parent=t;return l}function c(t){let a=t;if(!a)return{};if(typeof a==="string")return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");a.error=a.message}if(delete a.message,typeof a.error==="string")return{...a,error:()=>a.error};return a}function oi(t){if(typeof t==="bigint")return t.toString()+"n";if(typeof t==="string")return`"${t}"`;return`${t}`}function lo(t){return Object.keys(t).filter((a)=>t[a]._zod.optin==="optional"&&t[a]._zod.optout==="optional")}var fo={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function jc(t,a){let p=t._zod.def,l=p.checks;if(l&&l.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let d=_e(t._zod.def,{get shape(){let h={};for(let g in a){if(!(g in p.shape))throw Error(`Unrecognized key: "${g}"`);if(!a[g])continue;h[g]=p.shape[g]}return we(this,"shape",h),h},checks:[]});return me(t,d)}function Rc(t,a){let p=t._zod.def,l=p.checks;if(l&&l.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let d=_e(t._zod.def,{get shape(){let h={...t._zod.def.shape};for(let g in a){if(!(g in p.shape))throw Error(`Unrecognized key: "${g}"`);if(!a[g])continue;delete h[g]}return we(this,"shape",h),h},checks:[]});return me(t,d)}function Dc(t,a){if(!ke(a))throw Error("Invalid input to extend: expected a plain object");let p=t._zod.def.checks;if(p&&p.length>0){let d=t._zod.def.shape;for(let h in a)if(Object.getOwnPropertyDescriptor(d,h)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let f=_e(t._zod.def,{get shape(){let d={...t._zod.def.shape,...a};return we(this,"shape",d),d}});return me(t,f)}function Lc(t,a){if(!ke(a))throw Error("Invalid input to safeExtend: expected a plain object");let p=_e(t._zod.def,{get shape(){let l={...t._zod.def.shape,...a};return we(this,"shape",l),l}});return me(t,p)}function Fc(t,a){if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let p=_e(t._zod.def,{get shape(){let l={...t._zod.def.shape,...a._zod.def.shape};return we(this,"shape",l),l},get catchall(){return a._zod.def.catchall},checks:a._zod.def.checks??[]});return me(t,p)}function Mc(t,a,p){let f=a._zod.def.checks;if(f&&f.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let h=_e(a._zod.def,{get shape(){let g=a._zod.def.shape,y={...g};if(p)for(let v in p){if(!(v in g))throw Error(`Unrecognized key: "${v}"`);if(!p[v])continue;y[v]=t?new t({type:"optional",innerType:g[v]}):g[v]}else for(let v in g)y[v]=t?new t({type:"optional",innerType:g[v]}):g[v];return we(this,"shape",y),y},checks:[]});return me(a,h)}function Uc(t,a,p){let l=_e(a._zod.def,{get shape(){let f=a._zod.def.shape,d={...f};if(p)for(let h in p){if(!(h in d))throw Error(`Unrecognized key: "${h}"`);if(!p[h])continue;d[h]=new t({type:"nonoptional",innerType:f[h]})}else for(let h in f)d[h]=new t({type:"nonoptional",innerType:f[h]});return we(this,"shape",d),d}});return me(a,l)}function Ze(t,a=0){if(t.aborted===!0)return!0;for(let p=a;p<t.issues.length;p++)if(t.issues[p]?.continue!==!0)return!0;return!1}function mo(t,a=0){if(t.aborted===!0)return!0;for(let p=a;p<t.issues.length;p++)if(t.issues[p]?.continue===!1)return!0;return!1}function ye(t,a){return a.map((p)=>{var l;return(l=p).path??(l.path=[]),p.path.unshift(t),p})}function lt(t){return typeof t==="string"?t:t?.message}function fe(t,a,p){let l=t.message?t.message:lt(t.inst?._zod.def?.error?.(t))??lt(a?.error?.(t))??lt(p.customError?.(t))??lt(p.localeError?.(t))??"Invalid input",{inst:f,continue:d,input:h,...g}=t;if(g.path??(g.path=[]),g.message=l,a?.reportInput)g.input=h;return g}function ht(t){if(Array.isArray(t))return"array";if(typeof t==="string")return"string";return"unknown"}function Os(t){let a=typeof t;switch(a){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let p=t;if(p&&Object.getPrototypeOf(p)!==Object.prototype&&"constructor"in p&&p.constructor)return p.constructor.name}}return a}function Se(...t){let[a,p,l]=t;if(typeof a==="string")return{message:a,code:"custom",input:p,inst:l};return{...a}}var ho=(t,a)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:a,enumerable:!1}),t.message=JSON.stringify(a,Ue,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},_t=i("$ZodError",ho),Be=i("$ZodError",ho,{Parent:Error});function _o(t,a=(p)=>p.message){let p={},l=[];for(let f of t.issues)if(f.path.length>0)p[f.path[0]]=p[f.path[0]]||[],p[f.path[0]].push(a(f));else l.push(a(f));return{formErrors:l,fieldErrors:p}}function go(t,a=(p)=>p.message){let p={_errors:[]},l=(f,d=[])=>{for(let h of f.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map((g)=>l({issues:g},[...d,...h.path]));else if(h.code==="invalid_key")l({issues:h.issues},[...d,...h.path]);else if(h.code==="invalid_element")l({issues:h.issues},[...d,...h.path]);else{let g=[...d,...h.path];if(g.length===0)p._errors.push(a(h));else{let y=p,v=0;while(v<g.length){let x=g[v];if(v!==g.length-1)y[x]=y[x]||{_errors:[]};else y[x]=y[x]||{_errors:[]},y[x]._errors.push(a(h));y=y[x],v++}}}};return l(t),p}var Ve=(t)=>(a,p,l,f)=>{let d=l?{...l,async:!1}:{async:!1},h=a._zod.run({value:p,issues:[]},d);if(h instanceof Promise)throw new de;if(h.issues.length){let g=new(f?.Err??t)(h.issues.map((y)=>fe(y,d,se())));throw Bt(g,f?.callee),g}return h.value},Zr=Ve(Be),Ge=(t)=>async(a,p,l,f)=>{let d=l?{...l,async:!0}:{async:!0},h=a._zod.run({value:p,issues:[]},d);if(h instanceof Promise)h=await h;if(h.issues.length){let g=new(f?.Err??t)(h.issues.map((y)=>fe(y,d,se())));throw Bt(g,f?.callee),g}return h.value},Qr=Ge(Be),We=(t)=>(a,p,l)=>{let f=l?{...l,async:!1}:{async:!1},d=a._zod.run({value:p,issues:[]},f);if(d instanceof Promise)throw new de;return d.issues.length?{success:!1,error:new(t??_t)(d.issues.map((h)=>fe(h,f,se())))}:{success:!0,data:d.value}},et=We(Be),qe=(t)=>async(a,p,l)=>{let f=l?{...l,async:!0}:{async:!0},d=a._zod.run({value:p,issues:[]},f);if(d instanceof Promise)d=await d;return d.issues.length?{success:!1,error:new t(d.issues.map((h)=>fe(h,f,se())))}:{success:!0,data:d.value}},tt=qe(Be),yo=(t)=>(a,p,l)=>{let f=l?{...l,direction:"backward"}:{direction:"backward"};return Ve(t)(a,p,f)};var xo=(t)=>(a,p,l)=>Ve(t)(a,p,l);var vo=(t)=>async(a,p,l)=>{let f=l?{...l,direction:"backward"}:{direction:"backward"};return Ge(t)(a,p,f)};var zo=(t)=>async(a,p,l)=>Ge(t)(a,p,l);var $o=(t)=>(a,p,l)=>{let f=l?{...l,direction:"backward"}:{direction:"backward"};return We(t)(a,p,f)};var bo=(t)=>(a,p,l)=>We(t)(a,p,l);var wo=(t)=>async(a,p,l)=>{let f=l?{...l,direction:"backward"}:{direction:"backward"};return qe(t)(a,p,f)};var ko=(t)=>async(a,p,l)=>qe(t)(a,p,l);var Zo=/^[cC][0-9a-z]{6,}$/,So=/^[0-9a-z]+$/,Po=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Oo=/^[0-9a-vA-V]{20}$/,Eo=/^[A-Za-z0-9]{27}$/,To=/^[a-zA-Z0-9_-]{21}$/,Io=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var No=/^([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})$/,Gt=(t)=>{if(!t)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var Ao=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var Bc="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Co(){return new RegExp(Bc,"u")}var jo=/^(?:(?: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])$/,Ro=/^(([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}|:))$/;var Do=/^((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])$/,Lo=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wt=/^[A-Za-z0-9_-]*$/;var Mo=/^https?$/,Uo=/^\+[1-9]\d{6,14}$/,Jo="(?:(?:\\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])))",Bo=new RegExp(`^${Jo}$`);function Vo(t){return typeof t.precision==="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Go(t){return new RegExp(`^${Vo(t)}$`)}function Wo(t){let a=Vo({precision:t.precision}),p=["Z"];if(t.local)p.push("");if(t.offset)p.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let l=`${a}(?:${p.join("|")})`;return new RegExp(`^${Jo}T(?:${l})$`)}var qo=(t)=>{let a=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${a}$`)};var Ko=/^-?\d+$/,qt=/^-?\d+(?:\.\d+)?$/,Yo=/^(?:true|false)$/i,Xo=/^null$/i;var Ho=/^[^A-Z]*$/,Qo=/^[^a-z]*$/;var ne=i("$ZodCheck",(t,a)=>{var p;t._zod??(t._zod={}),t._zod.def=a,(p=t._zod).onattach??(p.onattach=[])}),on={number:"number",bigint:"bigint",object:"date"},Kt=i("$ZodCheckLessThan",(t,a)=>{ne.init(t,a);let p=on[typeof a.value];t._zod.onattach.push((l)=>{let f=l._zod.bag,d=(a.inclusive?f.maximum:f.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(a.value<d)if(a.inclusive)f.maximum=a.value;else f.exclusiveMaximum=a.value}),t._zod.check=(l)=>{if(a.inclusive?l.value<=a.value:l.value<a.value)return;l.issues.push({origin:p,code:"too_big",maximum:typeof a.value==="object"?a.value.getTime():a.value,input:l.value,inclusive:a.inclusive,inst:t,continue:!a.abort})}}),Yt=i("$ZodCheckGreaterThan",(t,a)=>{ne.init(t,a);let p=on[typeof a.value];t._zod.onattach.push((l)=>{let f=l._zod.bag,d=(a.inclusive?f.minimum:f.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(a.value>d)if(a.inclusive)f.minimum=a.value;else f.exclusiveMinimum=a.value}),t._zod.check=(l)=>{if(a.inclusive?l.value>=a.value:l.value>a.value)return;l.issues.push({origin:p,code:"too_small",minimum:typeof a.value==="object"?a.value.getTime():a.value,input:l.value,inclusive:a.inclusive,inst:t,continue:!a.abort})}}),cn=i("$ZodCheckMultipleOf",(t,a)=>{ne.init(t,a),t._zod.onattach.push((p)=>{var l;(l=p._zod.bag).multipleOf??(l.multipleOf=a.value)}),t._zod.check=(p)=>{if(typeof p.value!==typeof a.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof p.value==="bigint"?p.value%a.value===BigInt(0):co(p.value,a.value)===0)return;p.issues.push({origin:typeof p.value,code:"not_multiple_of",divisor:a.value,input:p.value,inst:t,continue:!a.abort})}}),un=i("$ZodCheckNumberFormat",(t,a)=>{ne.init(t,a),a.format=a.format||"float64";let p=a.format?.includes("int"),l=p?"int":"number",[f,d]=fo[a.format];t._zod.onattach.push((h)=>{let g=h._zod.bag;if(g.format=a.format,g.minimum=f,g.maximum=d,p)g.pattern=Ko}),t._zod.check=(h)=>{let g=h.value;if(p){if(!Number.isInteger(g)){h.issues.push({expected:l,format:a.format,code:"invalid_type",continue:!1,input:g,inst:t});return}if(!Number.isSafeInteger(g)){if(g>0)h.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!a.abort});else h.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!a.abort});return}}if(g<f)h.issues.push({origin:"number",input:g,code:"too_small",minimum:f,inclusive:!0,inst:t,continue:!a.abort});if(g>d)h.issues.push({origin:"number",input:g,code:"too_big",maximum:d,inclusive:!0,inst:t,continue:!a.abort})}});var an=i("$ZodCheckMaxLength",(t,a)=>{var p;ne.init(t,a),(p=t._zod.def).when??(p.when=(l)=>{let f=l.value;return!mt(f)&&f.length!==void 0}),t._zod.onattach.push((l)=>{let f=l._zod.bag.maximum??Number.POSITIVE_INFINITY;if(a.maximum<f)l._zod.bag.maximum=a.maximum}),t._zod.check=(l)=>{let f=l.value;if(f.length<=a.maximum)return;let h=ht(f);l.issues.push({origin:h,code:"too_big",maximum:a.maximum,inclusive:!0,input:f,inst:t,continue:!a.abort})}}),pn=i("$ZodCheckMinLength",(t,a)=>{var p;ne.init(t,a),(p=t._zod.def).when??(p.when=(l)=>{let f=l.value;return!mt(f)&&f.length!==void 0}),t._zod.onattach.push((l)=>{let f=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(a.minimum>f)l._zod.bag.minimum=a.minimum}),t._zod.check=(l)=>{let f=l.value;if(f.length>=a.minimum)return;let h=ht(f);l.issues.push({origin:h,code:"too_small",minimum:a.minimum,inclusive:!0,input:f,inst:t,continue:!a.abort})}}),ln=i("$ZodCheckLengthEquals",(t,a)=>{var p;ne.init(t,a),(p=t._zod.def).when??(p.when=(l)=>{let f=l.value;return!mt(f)&&f.length!==void 0}),t._zod.onattach.push((l)=>{let f=l._zod.bag;f.minimum=a.length,f.maximum=a.length,f.length=a.length}),t._zod.check=(l)=>{let f=l.value,d=f.length;if(d===a.length)return;let h=ht(f),g=d>a.length;l.issues.push({origin:h,...g?{code:"too_big",maximum:a.length}:{code:"too_small",minimum:a.length},inclusive:!0,exact:!0,input:l.value,inst:t,continue:!a.abort})}}),Ke=i("$ZodCheckStringFormat",(t,a)=>{var p,l;if(ne.init(t,a),t._zod.onattach.push((f)=>{let d=f._zod.bag;if(d.format=a.format,a.pattern)d.patterns??(d.patterns=new Set),d.patterns.add(a.pattern)}),a.pattern)(p=t._zod).check??(p.check=(f)=>{if(a.pattern.lastIndex=0,a.pattern.test(f.value))return;f.issues.push({origin:"string",code:"invalid_format",format:a.format,input:f.value,...a.pattern?{pattern:a.pattern.toString()}:{},inst:t,continue:!a.abort})});else(l=t._zod).check??(l.check=()=>{})}),fn=i("$ZodCheckRegex",(t,a)=>{Ke.init(t,a),t._zod.check=(p)=>{if(a.pattern.lastIndex=0,a.pattern.test(p.value))return;p.issues.push({origin:"string",code:"invalid_format",format:"regex",input:p.value,pattern:a.pattern.toString(),inst:t,continue:!a.abort})}}),mn=i("$ZodCheckLowerCase",(t,a)=>{a.pattern??(a.pattern=Ho),Ke.init(t,a)}),dn=i("$ZodCheckUpperCase",(t,a)=>{a.pattern??(a.pattern=Qo),Ke.init(t,a)}),hn=i("$ZodCheckIncludes",(t,a)=>{ne.init(t,a);let p=ge(a.includes),l=new RegExp(typeof a.position==="number"?`^.{${a.position}}${p}`:p);a.pattern=l,t._zod.onattach.push((f)=>{let d=f._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(l)}),t._zod.check=(f)=>{if(f.value.includes(a.includes,a.position))return;f.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:a.includes,input:f.value,inst:t,continue:!a.abort})}}),_n=i("$ZodCheckStartsWith",(t,a)=>{ne.init(t,a);let p=new RegExp(`^${ge(a.prefix)}.*`);a.pattern??(a.pattern=p),t._zod.onattach.push((l)=>{let f=l._zod.bag;f.patterns??(f.patterns=new Set),f.patterns.add(p)}),t._zod.check=(l)=>{if(l.value.startsWith(a.prefix))return;l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:a.prefix,input:l.value,inst:t,continue:!a.abort})}}),gn=i("$ZodCheckEndsWith",(t,a)=>{ne.init(t,a);let p=new RegExp(`.*${ge(a.suffix)}$`);a.pattern??(a.pattern=p),t._zod.onattach.push((l)=>{let f=l._zod.bag;f.patterns??(f.patterns=new Set),f.patterns.add(p)}),t._zod.check=(l)=>{if(l.value.endsWith(a.suffix))return;l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:a.suffix,input:l.value,inst:t,continue:!a.abort})}});var yn=i("$ZodCheckOverwrite",(t,a)=>{ne.init(t,a),t._zod.check=(p)=>{p.value=a.tx(p.value)}});class Xt{constructor(t=[]){if(this.content=[],this.indent=0,this)this.args=t}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t==="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let p=t.split(`
|
|
4
|
+
`).filter((d)=>d),l=Math.min(...p.map((d)=>d.length-d.trimStart().length)),f=p.map((d)=>d.slice(l)).map((d)=>" ".repeat(this.indent*2)+d);for(let d of f)this.content.push(d)}compile(){let t=Function,a=this?.args,l=[...(this?.content??[""]).map((f)=>` ${f}`)];return new t(...a,l.join(`
|
|
5
|
+
`))}}var vn={major:4,minor:4,patch:3};var E=i("$ZodType",(t,a)=>{var p;t??(t={}),t._zod.def=a,t._zod.bag=t._zod.bag||{},t._zod.version=vn;let l=[...t._zod.def.checks??[]];if(t._zod.traits.has("$ZodCheck"))l.unshift(t);for(let f of l)for(let d of f._zod.onattach)d(t);if(l.length===0)(p=t._zod).deferred??(p.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let f=(h,g,y)=>{let v=Ze(h),x;for(let w of g){if(w._zod.def.when){if(mo(h))continue;if(!w._zod.def.when(h))continue}else if(v)continue;let S=h.issues.length,z=w._zod.check(h);if(z instanceof Promise&&y?.async===!1)throw new de;if(x||z instanceof Promise)x=(x??Promise.resolve()).then(async()=>{if(await z,h.issues.length===S)return;if(!v)v=Ze(h,S)});else{if(h.issues.length===S)continue;if(!v)v=Ze(h,S)}}if(x)return x.then(()=>h);return h},d=(h,g,y)=>{if(Ze(h))return h.aborted=!0,h;let v=f(g,l,y);if(v instanceof Promise){if(y.async===!1)throw new de;return v.then((x)=>t._zod.parse(x,y))}return t._zod.parse(v,y)};t._zod.run=(h,g)=>{if(g.skipChecks)return t._zod.parse(h,g);if(g.direction==="backward"){let v=t._zod.parse({value:h.value,issues:[]},{...g,skipChecks:!0});if(v instanceof Promise)return v.then((x)=>d(x,h,g));return d(v,h,g)}let y=t._zod.parse(h,g);if(y instanceof Promise){if(g.async===!1)throw new de;return y.then((v)=>f(v,l,g))}return f(y,l,g)}}_(t,"~standard",()=>({validate:(f)=>{try{let d=et(t,f);return d.success?{value:d.data}:{issues:d.error?.issues}}catch(d){return tt(t,f).then((h)=>h.success?{value:h.data}:{issues:h.error?.issues})}},vendor:"zod",version:1}))}),vt=i("$ZodString",(t,a)=>{E.init(t,a),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??qo(t._zod.bag),t._zod.parse=(p,l)=>{if(a.coerce)try{p.value=String(p.value)}catch(f){}if(typeof p.value==="string")return p;return p.issues.push({expected:"string",code:"invalid_type",input:p.value,inst:t}),p}}),B=i("$ZodStringFormat",(t,a)=>{Ke.init(t,a),vt.init(t,a)}),On=i("$ZodGUID",(t,a)=>{a.pattern??(a.pattern=No),B.init(t,a)}),En=i("$ZodUUID",(t,a)=>{if(a.version){let l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[a.version];if(l===void 0)throw Error(`Invalid UUID version: "${a.version}"`);a.pattern??(a.pattern=Gt(l))}else a.pattern??(a.pattern=Gt());B.init(t,a)}),Tn=i("$ZodEmail",(t,a)=>{a.pattern??(a.pattern=Ao),B.init(t,a)}),In=i("$ZodURL",(t,a)=>{B.init(t,a),t._zod.check=(p)=>{try{let l=p.value.trim();if(!a.normalize&&a.protocol?.source===Mo.source){if(!/^https?:\/\//i.test(l)){p.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:p.value,inst:t,continue:!a.abort});return}}let f=new URL(l);if(a.hostname){if(a.hostname.lastIndex=0,!a.hostname.test(f.hostname))p.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:a.hostname.source,input:p.value,inst:t,continue:!a.abort})}if(a.protocol){if(a.protocol.lastIndex=0,!a.protocol.test(f.protocol.endsWith(":")?f.protocol.slice(0,-1):f.protocol))p.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:a.protocol.source,input:p.value,inst:t,continue:!a.abort})}if(a.normalize)p.value=f.href;else p.value=l;return}catch(l){p.issues.push({code:"invalid_format",format:"url",input:p.value,inst:t,continue:!a.abort})}}}),Nn=i("$ZodEmoji",(t,a)=>{a.pattern??(a.pattern=Co()),B.init(t,a)}),An=i("$ZodNanoID",(t,a)=>{a.pattern??(a.pattern=To),B.init(t,a)}),Cn=i("$ZodCUID",(t,a)=>{a.pattern??(a.pattern=Zo),B.init(t,a)}),jn=i("$ZodCUID2",(t,a)=>{a.pattern??(a.pattern=So),B.init(t,a)}),Rn=i("$ZodULID",(t,a)=>{a.pattern??(a.pattern=Po),B.init(t,a)}),Dn=i("$ZodXID",(t,a)=>{a.pattern??(a.pattern=Oo),B.init(t,a)}),Ln=i("$ZodKSUID",(t,a)=>{a.pattern??(a.pattern=Eo),B.init(t,a)}),Fn=i("$ZodISODateTime",(t,a)=>{a.pattern??(a.pattern=Wo(a)),B.init(t,a)}),Mn=i("$ZodISODate",(t,a)=>{a.pattern??(a.pattern=Bo),B.init(t,a)}),Un=i("$ZodISOTime",(t,a)=>{a.pattern??(a.pattern=Go(a)),B.init(t,a)}),Jn=i("$ZodISODuration",(t,a)=>{a.pattern??(a.pattern=Io),B.init(t,a)}),Bn=i("$ZodIPv4",(t,a)=>{a.pattern??(a.pattern=jo),B.init(t,a),t._zod.bag.format="ipv4"}),Vn=i("$ZodIPv6",(t,a)=>{a.pattern??(a.pattern=Ro),B.init(t,a),t._zod.bag.format="ipv6",t._zod.check=(p)=>{try{new URL(`http://[${p.value}]`)}catch{p.issues.push({code:"invalid_format",format:"ipv6",input:p.value,inst:t,continue:!a.abort})}}});var Gn=i("$ZodCIDRv4",(t,a)=>{a.pattern??(a.pattern=Do),B.init(t,a)}),Wn=i("$ZodCIDRv6",(t,a)=>{a.pattern??(a.pattern=Lo),B.init(t,a),t._zod.check=(p)=>{let l=p.value.split("/");try{if(l.length!==2)throw Error();let[f,d]=l;if(!d)throw Error();let h=Number(d);if(`${h}`!==d)throw Error();if(h<0||h>128)throw Error();new URL(`http://[${f}]`)}catch{p.issues.push({code:"invalid_format",format:"cidrv6",input:p.value,inst:t,continue:!a.abort})}}});function qn(t){if(t==="")return!0;if(/\s/.test(t))return!1;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Kn=i("$ZodBase64",(t,a)=>{a.pattern??(a.pattern=Fo),B.init(t,a),t._zod.bag.contentEncoding="base64",t._zod.check=(p)=>{if(qn(p.value))return;p.issues.push({code:"invalid_format",format:"base64",input:p.value,inst:t,continue:!a.abort})}});function Vc(t){if(!Wt.test(t))return!1;let a=t.replace(/[-_]/g,(l)=>l==="-"?"+":"/"),p=a.padEnd(Math.ceil(a.length/4)*4,"=");return qn(p)}var Yn=i("$ZodBase64URL",(t,a)=>{a.pattern??(a.pattern=Wt),B.init(t,a),t._zod.bag.contentEncoding="base64url",t._zod.check=(p)=>{if(Vc(p.value))return;p.issues.push({code:"invalid_format",format:"base64url",input:p.value,inst:t,continue:!a.abort})}}),Xn=i("$ZodE164",(t,a)=>{a.pattern??(a.pattern=Uo),B.init(t,a)});function Gc(t,a=null){try{let p=t.split(".");if(p.length!==3)return!1;let[l]=p;if(!l)return!1;let f=JSON.parse(atob(l));if("typ"in f&&f?.typ!=="JWT")return!1;if(!f.alg)return!1;if(a&&(!("alg"in f)||f.alg!==a))return!1;return!0}catch{return!1}}var Hn=i("$ZodJWT",(t,a)=>{B.init(t,a),t._zod.check=(p)=>{if(Gc(p.value,a.alg))return;p.issues.push({code:"invalid_format",format:"jwt",input:p.value,inst:t,continue:!a.abort})}});var er=i("$ZodNumber",(t,a)=>{E.init(t,a),t._zod.pattern=t._zod.bag.pattern??qt,t._zod.parse=(p,l)=>{if(a.coerce)try{p.value=Number(p.value)}catch(h){}let f=p.value;if(typeof f==="number"&&!Number.isNaN(f)&&Number.isFinite(f))return p;let d=typeof f==="number"?Number.isNaN(f)?"NaN":!Number.isFinite(f)?"Infinity":void 0:void 0;return p.issues.push({expected:"number",code:"invalid_type",input:f,inst:t,...d?{received:d}:{}}),p}}),Qn=i("$ZodNumberFormat",(t,a)=>{un.init(t,a),er.init(t,a)}),ei=i("$ZodBoolean",(t,a)=>{E.init(t,a),t._zod.pattern=Yo,t._zod.parse=(p,l)=>{if(a.coerce)try{p.value=Boolean(p.value)}catch(d){}let f=p.value;if(typeof f==="boolean")return p;return p.issues.push({expected:"boolean",code:"invalid_type",input:f,inst:t}),p}});var ti=i("$ZodNull",(t,a)=>{E.init(t,a),t._zod.pattern=Xo,t._zod.values=new Set([null]),t._zod.parse=(p,l)=>{let f=p.value;if(f===null)return p;return p.issues.push({expected:"null",code:"invalid_type",input:f,inst:t}),p}});var ri=i("$ZodUnknown",(t,a)=>{E.init(t,a),t._zod.parse=(p)=>p}),ni=i("$ZodNever",(t,a)=>{E.init(t,a),t._zod.parse=(p,l)=>(p.issues.push({expected:"never",code:"invalid_type",input:p.value,inst:t}),p)});function zn(t,a,p){if(t.issues.length)a.issues.push(...ye(p,t.issues));a.value[p]=t.value}var ii=i("$ZodArray",(t,a)=>{E.init(t,a),t._zod.parse=(p,l)=>{let f=p.value;if(!Array.isArray(f))return p.issues.push({expected:"array",code:"invalid_type",input:f,inst:t}),p;p.value=Array(f.length);let d=[];for(let h=0;h<f.length;h++){let g=f[h],y=a.element._zod.run({value:g,issues:[]},l);if(y instanceof Promise)d.push(y.then((v)=>zn(v,p,h)));else zn(y,p,h)}if(d.length)return Promise.all(d).then(()=>p);return p}});function xt(t,a,p,l,f,d){let h=p in l;if(t.issues.length){if(f&&d&&!h)return;a.issues.push(...ye(p,t.issues))}if(!h&&!f){if(!t.issues.length)a.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[p]});return}if(t.value===void 0){if(h)a.value[p]=void 0}else a.value[p]=t.value}function si(t){let a=Object.keys(t.shape);for(let l of a)if(!t.shape?.[l]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${l}": expected a Zod schema`);let p=lo(t.shape);return{...t,keys:a,keySet:new Set(a),numKeys:a.length,optionalKeys:new Set(p)}}function pi(t,a,p,l,f,d){let h=[],g=f.keySet,y=f.catchall._zod,v=y.def.type,x=y.optin==="optional",w=y.optout==="optional";for(let S in a){if(S==="__proto__")continue;if(g.has(S))continue;if(v==="never"){h.push(S);continue}let z=y.run({value:a[S],issues:[]},l);if(z instanceof Promise)t.push(z.then((O)=>xt(O,p,S,a,x,w)));else xt(z,p,S,a,x,w)}if(h.length)p.issues.push({code:"unrecognized_keys",keys:h,input:a,inst:d});if(!t.length)return p;return Promise.all(t).then(()=>p)}var li=i("$ZodObject",(t,a)=>{if(E.init(t,a),!Object.getOwnPropertyDescriptor(a,"shape")?.get){let g=a.shape;Object.defineProperty(a,"shape",{get:()=>{let y={...g};return Object.defineProperty(a,"shape",{value:y}),y}})}let l=Je(()=>si(a));_(t._zod,"propValues",()=>{let g=a.shape,y={};for(let v in g){let x=g[v]._zod;if(x.values){y[v]??(y[v]=new Set);for(let w of x.values)y[v].add(w)}}return y});let f=Ae,d=a.catchall,h;t._zod.parse=(g,y)=>{h??(h=l.value);let v=g.value;if(!f(v))return g.issues.push({expected:"object",code:"invalid_type",input:v,inst:t}),g;g.value={};let x=[],w=h.shape;for(let S of h.keys){let z=w[S],O=z._zod.optin==="optional",C=z._zod.optout==="optional",N=z._zod.run({value:v[S],issues:[]},y);if(N instanceof Promise)x.push(N.then((L)=>xt(L,g,S,v,O,C)));else xt(N,g,S,v,O,C)}if(!d)return x.length?Promise.all(x).then(()=>g):g;return pi(x,v,g,y,l.value,t)}}),fi=i("$ZodObjectJIT",(t,a)=>{li.init(t,a);let p=t._zod.parse,l=Je(()=>si(a)),f=(S)=>{let z=new Xt(["shape","payload","ctx"]),O=l.value,C=(U)=>{let D=Jt(U);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};z.write("const input = payload.value;");let N=Object.create(null),L=0;for(let U of O.keys)N[U]=`key_${L++}`;z.write("const newResult = {};");for(let U of O.keys){let D=N[U],H=Jt(U),Le=S[U],pt=Le?._zod?.optin==="optional",Fe=Le?._zod?.optout==="optional";if(z.write(`const ${D} = ${C(U)};`),pt&&Fe)z.write(`
|
|
6
|
+
if (${D}.issues.length) {
|
|
7
|
+
if (${H} in input) {
|
|
8
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
9
|
+
...iss,
|
|
10
|
+
path: iss.path ? [${H}, ...iss.path] : [${H}]
|
|
11
|
+
})));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (${D}.value === undefined) {
|
|
16
|
+
if (${H} in input) {
|
|
17
|
+
newResult[${H}] = undefined;
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
newResult[${H}] = ${D}.value;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
`);else if(!pt)z.write(`
|
|
24
|
+
const ${D}_present = ${H} in input;
|
|
25
|
+
if (${D}.issues.length) {
|
|
26
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
27
|
+
...iss,
|
|
28
|
+
path: iss.path ? [${H}, ...iss.path] : [${H}]
|
|
29
|
+
})));
|
|
30
|
+
}
|
|
31
|
+
if (!${D}_present && !${D}.issues.length) {
|
|
32
|
+
payload.issues.push({
|
|
33
|
+
code: "invalid_type",
|
|
34
|
+
expected: "nonoptional",
|
|
35
|
+
input: undefined,
|
|
36
|
+
path: [${H}]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (${D}_present) {
|
|
41
|
+
if (${D}.value === undefined) {
|
|
42
|
+
newResult[${H}] = undefined;
|
|
43
|
+
} else {
|
|
44
|
+
newResult[${H}] = ${D}.value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
`);else z.write(`
|
|
49
|
+
if (${D}.issues.length) {
|
|
50
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
51
|
+
...iss,
|
|
52
|
+
path: iss.path ? [${H}, ...iss.path] : [${H}]
|
|
53
|
+
})));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (${D}.value === undefined) {
|
|
57
|
+
if (${H} in input) {
|
|
58
|
+
newResult[${H}] = undefined;
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
newResult[${H}] = ${D}.value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
`)}z.write("payload.value = newResult;"),z.write("return payload;");let ce=z.compile();return(U,D)=>ce(S,U,D)},d,h=Ae,g=!Ne.jitless,v=g&&ao.value,x=a.catchall,w;t._zod.parse=(S,z)=>{w??(w=l.value);let O=S.value;if(!h(O))return S.issues.push({expected:"object",code:"invalid_type",input:O,inst:t}),S;if(g&&v&&z?.async===!1&&z.jitless!==!0){if(!d)d=f(a.shape);if(S=d(S,z),!x)return S;return pi([],O,S,z,w,t)}return p(S,z)}});function $n(t,a,p,l){for(let d of t)if(d.issues.length===0)return a.value=d.value,a;let f=t.filter((d)=>!Ze(d));if(f.length===1)return a.value=f[0].value,f[0];return a.issues.push({code:"invalid_union",input:a.value,inst:p,errors:t.map((d)=>d.issues.map((h)=>fe(h,l,se())))}),a}var tr=i("$ZodUnion",(t,a)=>{E.init(t,a),_(t._zod,"optin",()=>a.options.some((l)=>l._zod.optin==="optional")?"optional":void 0),_(t._zod,"optout",()=>a.options.some((l)=>l._zod.optout==="optional")?"optional":void 0),_(t._zod,"values",()=>{if(a.options.every((l)=>l._zod.values))return new Set(a.options.flatMap((l)=>Array.from(l._zod.values)));return}),_(t._zod,"pattern",()=>{if(a.options.every((l)=>l._zod.pattern)){let l=a.options.map((f)=>f._zod.pattern);return new RegExp(`^(${l.map((f)=>dt(f.source)).join("|")})$`)}return});let p=a.options.length===1?a.options[0]._zod.run:null;t._zod.parse=(l,f)=>{if(p)return p(l,f);let d=!1,h=[];for(let g of a.options){let y=g._zod.run({value:l.value,issues:[]},f);if(y instanceof Promise)h.push(y),d=!0;else{if(y.issues.length===0)return y;h.push(y)}}if(!d)return $n(h,l,t,f);return Promise.all(h).then((g)=>$n(g,l,t,f))}});var mi=i("$ZodDiscriminatedUnion",(t,a)=>{a.inclusive=!1,tr.init(t,a);let p=t._zod.parse;_(t._zod,"propValues",()=>{let f={};for(let d of a.options){let h=d._zod.propValues;if(!h||Object.keys(h).length===0)throw Error(`Invalid discriminated union option at index "${a.options.indexOf(d)}"`);for(let[g,y]of Object.entries(h)){if(!f[g])f[g]=new Set;for(let v of y)f[g].add(v)}}return f});let l=Je(()=>{let f=a.options,d=new Map;for(let h of f){let g=h._zod.propValues?.[a.discriminator];if(!g||g.size===0)throw Error(`Invalid discriminated union option at index "${a.options.indexOf(h)}"`);for(let y of g){if(d.has(y))throw Error(`Duplicate discriminator value "${String(y)}"`);d.set(y,h)}}return d});t._zod.parse=(f,d)=>{let h=f.value;if(!Ae(h))return f.issues.push({code:"invalid_type",expected:"object",input:h,inst:t}),f;let g=l.value.get(h?.[a.discriminator]);if(g)return g._zod.run(f,d);if(a.unionFallback||d.direction==="backward")return p(f,d);return f.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:a.discriminator,options:Array.from(l.value.keys()),input:h,path:[a.discriminator],inst:t}),f}}),di=i("$ZodIntersection",(t,a)=>{E.init(t,a),t._zod.parse=(p,l)=>{let f=p.value,d=a.left._zod.run({value:f,issues:[]},l),h=a.right._zod.run({value:f,issues:[]},l);if(d instanceof Promise||h instanceof Promise)return Promise.all([d,h]).then(([y,v])=>bn(p,y,v));return bn(p,d,h)}});function Ht(t,a){if(t===a)return{valid:!0,data:t};if(t instanceof Date&&a instanceof Date&&+t===+a)return{valid:!0,data:t};if(ke(t)&&ke(a)){let p=Object.keys(a),l=Object.keys(t).filter((d)=>p.indexOf(d)!==-1),f={...t,...a};for(let d of l){let h=Ht(t[d],a[d]);if(!h.valid)return{valid:!1,mergeErrorPath:[d,...h.mergeErrorPath]};f[d]=h.data}return{valid:!0,data:f}}if(Array.isArray(t)&&Array.isArray(a)){if(t.length!==a.length)return{valid:!1,mergeErrorPath:[]};let p=[];for(let l=0;l<t.length;l++){let f=t[l],d=a[l],h=Ht(f,d);if(!h.valid)return{valid:!1,mergeErrorPath:[l,...h.mergeErrorPath]};p.push(h.data)}return{valid:!0,data:p}}return{valid:!1,mergeErrorPath:[]}}function bn(t,a,p){let l=new Map,f;for(let g of a.issues)if(g.code==="unrecognized_keys"){f??(f=g);for(let y of g.keys){if(!l.has(y))l.set(y,{});l.get(y).l=!0}}else t.issues.push(g);for(let g of p.issues)if(g.code==="unrecognized_keys")for(let y of g.keys){if(!l.has(y))l.set(y,{});l.get(y).r=!0}else t.issues.push(g);let d=[...l].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(d.length&&f)t.issues.push({...f,keys:d});if(Ze(t))return t;let h=Ht(a.value,p.value);if(!h.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(h.mergeErrorPath)}`);return t.value=h.data,t}var hi=i("$ZodRecord",(t,a)=>{E.init(t,a),t._zod.parse=(p,l)=>{let f=p.value;if(!ke(f))return p.issues.push({expected:"record",code:"invalid_type",input:f,inst:t}),p;let d=[],h=a.keyType._zod.values;if(h){p.value={};let g=new Set;for(let v of h)if(typeof v==="string"||typeof v==="number"||typeof v==="symbol"){g.add(typeof v==="number"?v.toString():v);let x=a.keyType._zod.run({value:v,issues:[]},l);if(x instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(x.issues.length){p.issues.push({code:"invalid_key",origin:"record",issues:x.issues.map((z)=>fe(z,l,se())),input:v,path:[v],inst:t});continue}let w=x.value,S=a.valueType._zod.run({value:f[v],issues:[]},l);if(S instanceof Promise)d.push(S.then((z)=>{if(z.issues.length)p.issues.push(...ye(v,z.issues));p.value[w]=z.value}));else{if(S.issues.length)p.issues.push(...ye(v,S.issues));p.value[w]=S.value}}let y;for(let v in f)if(!g.has(v))y=y??[],y.push(v);if(y&&y.length>0)p.issues.push({code:"unrecognized_keys",input:f,inst:t,keys:y})}else{p.value={};for(let g of Reflect.ownKeys(f)){if(g==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(f,g))continue;let y=a.keyType._zod.run({value:g,issues:[]},l);if(y instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof g==="string"&&qt.test(g)&&y.issues.length){let w=a.keyType._zod.run({value:Number(g),issues:[]},l);if(w instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(w.issues.length===0)y=w}if(y.issues.length){if(a.mode==="loose")p.value[g]=f[g];else p.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map((w)=>fe(w,l,se())),input:g,path:[g],inst:t});continue}let x=a.valueType._zod.run({value:f[g],issues:[]},l);if(x instanceof Promise)d.push(x.then((w)=>{if(w.issues.length)p.issues.push(...ye(g,w.issues));p.value[y.value]=w.value}));else{if(x.issues.length)p.issues.push(...ye(g,x.issues));p.value[y.value]=x.value}}}if(d.length)return Promise.all(d).then(()=>p);return p}});var _i=i("$ZodEnum",(t,a)=>{E.init(t,a);let p=ft(a.entries),l=new Set(p);t._zod.values=l,t._zod.pattern=new RegExp(`^(${p.filter((f)=>po.has(typeof f)).map((f)=>typeof f==="string"?ge(f):f.toString()).join("|")})$`),t._zod.parse=(f,d)=>{let h=f.value;if(l.has(h))return f;return f.issues.push({code:"invalid_value",values:p,input:h,inst:t}),f}}),gi=i("$ZodLiteral",(t,a)=>{if(E.init(t,a),a.values.length===0)throw Error("Cannot create literal schema with no valid values");let p=new Set(a.values);t._zod.values=p,t._zod.pattern=new RegExp(`^(${a.values.map((l)=>typeof l==="string"?ge(l):l?ge(l.toString()):String(l)).join("|")})$`),t._zod.parse=(l,f)=>{let d=l.value;if(p.has(d))return l;return l.issues.push({code:"invalid_value",values:a.values,input:d,inst:t}),l}});var yi=i("$ZodTransform",(t,a)=>{E.init(t,a),t._zod.optin="optional",t._zod.parse=(p,l)=>{if(l.direction==="backward")throw new Me(t.constructor.name);let f=a.transform(p.value,p);if(l.async)return(f instanceof Promise?f:Promise.resolve(f)).then((h)=>(p.value=h,p.fallback=!0,p));if(f instanceof Promise)throw new de;return p.value=f,p.fallback=!0,p}});function wn(t,a){if(a===void 0&&(t.issues.length||t.fallback))return{issues:[],value:void 0};return t}var rr=i("$ZodOptional",(t,a)=>{E.init(t,a),t._zod.optin="optional",t._zod.optout="optional",_(t._zod,"values",()=>a.innerType._zod.values?new Set([...a.innerType._zod.values,void 0]):void 0),_(t._zod,"pattern",()=>{let p=a.innerType._zod.pattern;return p?new RegExp(`^(${dt(p.source)})?$`):void 0}),t._zod.parse=(p,l)=>{if(a.innerType._zod.optin==="optional"){let f=p.value,d=a.innerType._zod.run(p,l);if(d instanceof Promise)return d.then((h)=>wn(h,f));return wn(d,f)}if(p.value===void 0)return p;return a.innerType._zod.run(p,l)}}),xi=i("$ZodExactOptional",(t,a)=>{rr.init(t,a),_(t._zod,"values",()=>a.innerType._zod.values),_(t._zod,"pattern",()=>a.innerType._zod.pattern),t._zod.parse=(p,l)=>a.innerType._zod.run(p,l)}),vi=i("$ZodNullable",(t,a)=>{E.init(t,a),_(t._zod,"optin",()=>a.innerType._zod.optin),_(t._zod,"optout",()=>a.innerType._zod.optout),_(t._zod,"pattern",()=>{let p=a.innerType._zod.pattern;return p?new RegExp(`^(${dt(p.source)}|null)$`):void 0}),_(t._zod,"values",()=>a.innerType._zod.values?new Set([...a.innerType._zod.values,null]):void 0),t._zod.parse=(p,l)=>{if(p.value===null)return p;return a.innerType._zod.run(p,l)}}),zi=i("$ZodDefault",(t,a)=>{E.init(t,a),t._zod.optin="optional",_(t._zod,"values",()=>a.innerType._zod.values),t._zod.parse=(p,l)=>{if(l.direction==="backward")return a.innerType._zod.run(p,l);if(p.value===void 0)return p.value=a.defaultValue,p;let f=a.innerType._zod.run(p,l);if(f instanceof Promise)return f.then((d)=>kn(d,a));return kn(f,a)}});function kn(t,a){if(t.value===void 0)t.value=a.defaultValue;return t}var $i=i("$ZodPrefault",(t,a)=>{E.init(t,a),t._zod.optin="optional",_(t._zod,"values",()=>a.innerType._zod.values),t._zod.parse=(p,l)=>{if(l.direction==="backward")return a.innerType._zod.run(p,l);if(p.value===void 0)p.value=a.defaultValue;return a.innerType._zod.run(p,l)}}),bi=i("$ZodNonOptional",(t,a)=>{E.init(t,a),_(t._zod,"values",()=>{let p=a.innerType._zod.values;return p?new Set([...p].filter((l)=>l!==void 0)):void 0}),t._zod.parse=(p,l)=>{let f=a.innerType._zod.run(p,l);if(f instanceof Promise)return f.then((d)=>Zn(d,t));return Zn(f,t)}});function Zn(t,a){if(!t.issues.length&&t.value===void 0)t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:a});return t}var wi=i("$ZodCatch",(t,a)=>{E.init(t,a),t._zod.optin="optional",_(t._zod,"optout",()=>a.innerType._zod.optout),_(t._zod,"values",()=>a.innerType._zod.values),t._zod.parse=(p,l)=>{if(l.direction==="backward")return a.innerType._zod.run(p,l);let f=a.innerType._zod.run(p,l);if(f instanceof Promise)return f.then((d)=>{if(p.value=d.value,d.issues.length)p.value=a.catchValue({...p,error:{issues:d.issues.map((h)=>fe(h,l,se()))},input:p.value}),p.issues=[],p.fallback=!0;return p});if(p.value=f.value,f.issues.length)p.value=a.catchValue({...p,error:{issues:f.issues.map((d)=>fe(d,l,se()))},input:p.value}),p.issues=[],p.fallback=!0;return p}});var or=i("$ZodPipe",(t,a)=>{E.init(t,a),_(t._zod,"values",()=>a.in._zod.values),_(t._zod,"optin",()=>a.in._zod.optin),_(t._zod,"optout",()=>a.out._zod.optout),_(t._zod,"propValues",()=>a.in._zod.propValues),t._zod.parse=(p,l)=>{if(l.direction==="backward"){let d=a.out._zod.run(p,l);if(d instanceof Promise)return d.then((h)=>yt(h,a.in,l));return yt(d,a.in,l)}let f=a.in._zod.run(p,l);if(f instanceof Promise)return f.then((d)=>yt(d,a.out,l));return yt(f,a.out,l)}});function yt(t,a,p){if(t.issues.length)return t.aborted=!0,t;return a._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},p)}var ki=i("$ZodPreprocess",(t,a)=>{or.init(t,a)}),Zi=i("$ZodReadonly",(t,a)=>{E.init(t,a),_(t._zod,"propValues",()=>a.innerType._zod.propValues),_(t._zod,"values",()=>a.innerType._zod.values),_(t._zod,"optin",()=>a.innerType?._zod?.optin),_(t._zod,"optout",()=>a.innerType?._zod?.optout),t._zod.parse=(p,l)=>{if(l.direction==="backward")return a.innerType._zod.run(p,l);let f=a.innerType._zod.run(p,l);if(f instanceof Promise)return f.then(Sn);return Sn(f)}});function Sn(t){return t.value=Object.freeze(t.value),t}var Si=i("$ZodCustom",(t,a)=>{ne.init(t,a),E.init(t,a),t._zod.parse=(p,l)=>p,t._zod.check=(p)=>{let l=p.value,f=a.fn(l);if(f instanceof Promise)return f.then((d)=>Pn(d,p,l,t));Pn(f,p,l,t);return}});function Pn(t,a,p,l){if(!t){let f={code:"custom",input:p,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};if(l._zod.def.params)f.params=l._zod.def.params;a.issues.push(Se(f))}}var Pi,ep=Symbol("ZodOutput"),tp=Symbol("ZodInput");class Oi{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...a){let p=a[0];if(this._map.set(t,p),p&&typeof p==="object"&&"id"in p)this._idmap.set(p.id,t);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let a=this._map.get(t);if(a&&typeof a==="object"&&"id"in a)this._idmap.delete(a.id);return this._map.delete(t),this}get(t){let a=t._zod.parent;if(a){let p={...this.get(a)??{}};delete p.id;let l={...p,...this._map.get(t)};return Object.keys(l).length?l:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Wc(){return new Oi}(Pi=globalThis).__zod_globalRegistry??(Pi.__zod_globalRegistry=Wc());var Pe=globalThis.__zod_globalRegistry;function Ei(t,a){return new t({type:"string",...c(a)})}function Ti(t,a){return new t({type:"string",format:"email",check:"string_format",abort:!1,...c(a)})}function nr(t,a){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...c(a)})}function Ii(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...c(a)})}function Ni(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...c(a)})}function Ai(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...c(a)})}function Ci(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...c(a)})}function ir(t,a){return new t({type:"string",format:"url",check:"string_format",abort:!1,...c(a)})}function ji(t,a){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...c(a)})}function Ri(t,a){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...c(a)})}function Di(t,a){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...c(a)})}function Li(t,a){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...c(a)})}function Fi(t,a){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...c(a)})}function Mi(t,a){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...c(a)})}function Ui(t,a){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...c(a)})}function Ji(t,a){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...c(a)})}function Bi(t,a){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...c(a)})}function Vi(t,a){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...c(a)})}function Gi(t,a){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...c(a)})}function Wi(t,a){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...c(a)})}function qi(t,a){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...c(a)})}function Ki(t,a){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...c(a)})}function Yi(t,a){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...c(a)})}function Xi(t,a){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...c(a)})}function Hi(t,a){return new t({type:"string",format:"date",check:"string_format",...c(a)})}function Qi(t,a){return new t({type:"string",format:"time",check:"string_format",precision:null,...c(a)})}function es(t,a){return new t({type:"string",format:"duration",check:"string_format",...c(a)})}function ts(t,a){return new t({type:"number",checks:[],...c(a)})}function rs(t,a){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...c(a)})}function os(t,a){return new t({type:"boolean",...c(a)})}function ns(t,a){return new t({type:"null",...c(a)})}function is(t){return new t({type:"unknown"})}function ss(t,a){return new t({type:"never",...c(a)})}function zt(t,a){return new Kt({check:"less_than",...c(a),value:t,inclusive:!1})}function Ye(t,a){return new Kt({check:"less_than",...c(a),value:t,inclusive:!0})}function $t(t,a){return new Yt({check:"greater_than",...c(a),value:t,inclusive:!1})}function Xe(t,a){return new Yt({check:"greater_than",...c(a),value:t,inclusive:!0})}function bt(t,a){return new cn({check:"multiple_of",...c(a),value:t})}function wt(t,a){return new an({check:"max_length",...c(a),maximum:t})}function Ce(t,a){return new pn({check:"min_length",...c(a),minimum:t})}function kt(t,a){return new ln({check:"length_equals",...c(a),length:t})}function sr(t,a){return new fn({check:"string_format",format:"regex",...c(a),pattern:t})}function cr(t){return new mn({check:"string_format",format:"lowercase",...c(t)})}function ur(t){return new dn({check:"string_format",format:"uppercase",...c(t)})}function ar(t,a){return new hn({check:"string_format",format:"includes",...c(a),includes:t})}function pr(t,a){return new _n({check:"string_format",format:"starts_with",...c(a),prefix:t})}function lr(t,a){return new gn({check:"string_format",format:"ends_with",...c(a),suffix:t})}function ve(t){return new yn({check:"overwrite",tx:t})}function fr(t){return ve((a)=>a.normalize(t))}function mr(){return ve((t)=>t.trim())}function dr(){return ve((t)=>t.toLowerCase())}function hr(){return ve((t)=>t.toUpperCase())}function _r(){return ve((t)=>uo(t))}function cs(t,a,p){return new t({type:"array",element:a,...c(p)})}function us(t,a,p){let l=c(p);return l.abort??(l.abort=!0),new t({type:"custom",check:"custom",fn:a,...l})}function as(t,a,p){return new t({type:"custom",check:"custom",fn:a,...c(p)})}function ps(t,a){let p=qc((l)=>(l.addIssue=(f)=>{if(typeof f==="string")l.issues.push(Se(f,l.value,p._zod.def));else{let d=f;if(d.fatal)d.continue=!1;d.code??(d.code="custom"),d.input??(d.input=l.value),d.inst??(d.inst=p),d.continue??(d.continue=!p._zod.def.abort),l.issues.push(Se(d))}},t(l.value,l)),a);return p}function qc(t,a){let p=new ne({check:"custom",...c(a)});return p._zod.check=t,p}function Qe(t){let a=t?.target??"draft-2020-12";if(a==="draft-4")a="draft-04";if(a==="draft-7")a="draft-07";return{processors:t.processors??{},metadataRegistry:t?.metadata??Pe,target:a,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function M(t,a,p={path:[],schemaPath:[]}){var l;let f=t._zod.def,d=a.seen.get(t);if(d){if(d.count++,p.schemaPath.includes(t))d.cycle=p.path;return d.schema}let h={schema:{},count:1,cycle:void 0,path:p.path};a.seen.set(t,h);let g=t._zod.toJSONSchema?.();if(g)h.schema=g;else{let x={...p,schemaPath:[...p.schemaPath,t],path:p.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(a,h.schema,x);else{let S=h.schema,z=a.processors[f.type];if(!z)throw Error(`[toJSONSchema]: Non-representable type encountered: ${f.type}`);z(t,a,S,x)}let w=t._zod.parent;if(w){if(!h.ref)h.ref=w;M(w,a,x),a.seen.get(w).isParent=!0}}let y=a.metadataRegistry.get(t);if(y)Object.assign(h.schema,y);if(a.io==="input"&&ue(t))delete h.schema.examples,delete h.schema.default;if(a.io==="input"&&"_prefault"in h.schema)(l=h.schema).default??(l.default=h.schema._prefault);return delete h.schema._prefault,a.seen.get(t).schema}function rt(t,a){let p=t.seen.get(a);if(!p)throw Error("Unprocessed schema. This is a bug in Zod.");let l=new Map;for(let h of t.seen.entries()){let g=t.metadataRegistry.get(h[0])?.id;if(g){let y=l.get(g);if(y&&y!==h[0])throw Error(`Duplicate schema id "${g}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(g,h[0])}}let f=(h)=>{let g=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let w=t.external.registry.get(h[0])?.id,S=t.external.uri??((O)=>O);if(w)return{ref:S(w)};let z=h[1].defId??h[1].schema.id??`schema${t.counter++}`;return h[1].defId=z,{defId:z,ref:`${S("__shared")}#/${g}/${z}`}}if(h[1]===p)return{ref:"#"};let v=`${"#"}/${g}/`,x=h[1].schema.id??`__schema${t.counter++}`;return{defId:x,ref:v+x}},d=(h)=>{if(h[1].schema.$ref)return;let g=h[1],{ref:y,defId:v}=f(h);if(g.def={...g.schema},v)g.defId=v;let x=g.schema;for(let w in x)delete x[w];x.$ref=y};if(t.cycles==="throw")for(let h of t.seen.entries()){let g=h[1];if(g.cycle)throw Error(`Cycle detected: #/${g.cycle?.join("/")}/<root>
|
|
65
|
+
|
|
66
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let h of t.seen.entries()){let g=h[1];if(a===h[0]){d(h);continue}if(t.external){let v=t.external.registry.get(h[0])?.id;if(a!==h[0]&&v){d(h);continue}}if(t.metadataRegistry.get(h[0])?.id){d(h);continue}if(g.cycle){d(h);continue}if(g.count>1){if(t.reused==="ref"){d(h);continue}}}}function ot(t,a){let p=t.seen.get(a);if(!p)throw Error("Unprocessed schema. This is a bug in Zod.");let l=(g)=>{let y=t.seen.get(g);if(y.ref===null)return;let v=y.def??y.schema,x={...v},w=y.ref;if(y.ref=null,w){l(w);let z=t.seen.get(w),O=z.schema;if(O.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"))v.allOf=v.allOf??[],v.allOf.push(O);else Object.assign(v,O);if(Object.assign(v,x),g._zod.parent===w)for(let N in v){if(N==="$ref"||N==="allOf")continue;if(!(N in x))delete v[N]}if(O.$ref&&z.def)for(let N in v){if(N==="$ref"||N==="allOf")continue;if(N in z.def&&JSON.stringify(v[N])===JSON.stringify(z.def[N]))delete v[N]}}let S=g._zod.parent;if(S&&S!==w){l(S);let z=t.seen.get(S);if(z?.schema.$ref){if(v.$ref=z.schema.$ref,z.def)for(let O in v){if(O==="$ref"||O==="allOf")continue;if(O in z.def&&JSON.stringify(v[O])===JSON.stringify(z.def[O]))delete v[O]}}}t.override({zodSchema:g,jsonSchema:v,path:y.path??[]})};for(let g of[...t.seen.entries()].reverse())l(g[0]);let f={};if(t.target==="draft-2020-12")f.$schema="https://json-schema.org/draft/2020-12/schema";else if(t.target==="draft-07")f.$schema="http://json-schema.org/draft-07/schema#";else if(t.target==="draft-04")f.$schema="http://json-schema.org/draft-04/schema#";else if(t.target==="openapi-3.0");if(t.external?.uri){let g=t.external.registry.get(a)?.id;if(!g)throw Error("Schema is missing an `id` property");f.$id=t.external.uri(g)}Object.assign(f,p.def??p.schema);let d=t.metadataRegistry.get(a)?.id;if(d!==void 0&&f.id===d)delete f.id;let h=t.external?.defs??{};for(let g of t.seen.entries()){let y=g[1];if(y.def&&y.defId){if(y.def.id===y.defId)delete y.def.id;h[y.defId]=y.def}}if(t.external);else if(Object.keys(h).length>0)if(t.target==="draft-2020-12")f.$defs=h;else f.definitions=h;try{let g=JSON.parse(JSON.stringify(f));return Object.defineProperty(g,"~standard",{value:{...a["~standard"],jsonSchema:{input:He(a,"input",t.processors),output:He(a,"output",t.processors)}},enumerable:!1,writable:!1}),g}catch(g){throw Error("Error converting schema to JSON.")}}function ue(t,a){let p=a??{seen:new Set};if(p.seen.has(t))return!1;p.seen.add(t);let l=t._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return ue(l.element,p);if(l.type==="set")return ue(l.valueType,p);if(l.type==="lazy")return ue(l.getter(),p);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return ue(l.innerType,p);if(l.type==="intersection")return ue(l.left,p)||ue(l.right,p);if(l.type==="record"||l.type==="map")return ue(l.keyType,p)||ue(l.valueType,p);if(l.type==="pipe"){if(t._zod.traits.has("$ZodCodec"))return!0;return ue(l.in,p)||ue(l.out,p)}if(l.type==="object"){for(let f in l.shape)if(ue(l.shape[f],p))return!0;return!1}if(l.type==="union"){for(let f of l.options)if(ue(f,p))return!0;return!1}if(l.type==="tuple"){for(let f of l.items)if(ue(f,p))return!0;if(l.rest&&ue(l.rest,p))return!0;return!1}return!1}var ls=(t,a={})=>(p)=>{let l=Qe({...p,processors:a});return M(t,l),rt(l,t),ot(l,t)},He=(t,a,p={})=>(l)=>{let{libraryOptions:f,target:d}=l??{},h=Qe({...f??{},target:d,io:a,processors:p});return M(t,h),rt(h,t),ot(h,t)};var Kc={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gr=(t,a,p,l)=>{let f=p;f.type="string";let{minimum:d,maximum:h,format:g,patterns:y,contentEncoding:v}=t._zod.bag;if(typeof d==="number")f.minLength=d;if(typeof h==="number")f.maxLength=h;if(g){if(f.format=Kc[g]??g,f.format==="")delete f.format;if(g==="time")delete f.format}if(v)f.contentEncoding=v;if(y&&y.size>0){let x=[...y];if(x.length===1)f.pattern=x[0].source;else if(x.length>1)f.allOf=[...x.map((w)=>({...a.target==="draft-07"||a.target==="draft-04"||a.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))]}},yr=(t,a,p,l)=>{let f=p,{minimum:d,maximum:h,format:g,multipleOf:y,exclusiveMaximum:v,exclusiveMinimum:x}=t._zod.bag;if(typeof g==="string"&&g.includes("int"))f.type="integer";else f.type="number";let w=typeof x==="number"&&x>=(d??Number.NEGATIVE_INFINITY),S=typeof v==="number"&&v<=(h??Number.POSITIVE_INFINITY),z=a.target==="draft-04"||a.target==="openapi-3.0";if(w)if(z)f.minimum=x,f.exclusiveMinimum=!0;else f.exclusiveMinimum=x;else if(typeof d==="number")f.minimum=d;if(S)if(z)f.maximum=v,f.exclusiveMaximum=!0;else f.exclusiveMaximum=v;else if(typeof h==="number")f.maximum=h;if(typeof y==="number")f.multipleOf=y},xr=(t,a,p,l)=>{p.type="boolean"},ms=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},ds=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},vr=(t,a,p,l)=>{if(a.target==="openapi-3.0")p.type="string",p.nullable=!0,p.enum=[null];else p.type="null"},hs=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},_s=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},zr=(t,a,p,l)=>{p.not={}},gs=(t,a,p,l)=>{},$r=(t,a,p,l)=>{},ys=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},br=(t,a,p,l)=>{let f=t._zod.def,d=ft(f.entries);if(d.every((h)=>typeof h==="number"))p.type="number";if(d.every((h)=>typeof h==="string"))p.type="string";p.enum=d},wr=(t,a,p,l)=>{let f=t._zod.def,d=[];for(let h of f.values)if(h===void 0){if(a.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof h==="bigint")if(a.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else d.push(Number(h));else d.push(h);if(d.length===0);else if(d.length===1){let h=d[0];if(p.type=h===null?"null":typeof h,a.target==="draft-04"||a.target==="openapi-3.0")p.enum=[h];else p.const=h}else{if(d.every((h)=>typeof h==="number"))p.type="number";if(d.every((h)=>typeof h==="string"))p.type="string";if(d.every((h)=>typeof h==="boolean"))p.type="boolean";if(d.every((h)=>h===null))p.type="null";p.enum=d}},xs=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},vs=(t,a,p,l)=>{let f=p,d=t._zod.pattern;if(!d)throw Error("Pattern not found in template literal");f.type="string",f.pattern=d.source},zs=(t,a,p,l)=>{let f=p,d={type:"string",format:"binary",contentEncoding:"binary"},{minimum:h,maximum:g,mime:y}=t._zod.bag;if(h!==void 0)d.minLength=h;if(g!==void 0)d.maxLength=g;if(y)if(y.length===1)d.contentMediaType=y[0],Object.assign(f,d);else Object.assign(f,d),f.anyOf=y.map((v)=>({contentMediaType:v}));else Object.assign(f,d)},$s=(t,a,p,l)=>{p.type="boolean"},kr=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},bs=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},Sr=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},ws=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Zs=(t,a,p,l)=>{if(a.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Pr=(t,a,p,l)=>{let f=p,d=t._zod.def,{minimum:h,maximum:g}=t._zod.bag;if(typeof h==="number")f.minItems=h;if(typeof g==="number")f.maxItems=g;f.type="array",f.items=M(d.element,a,{...l,path:[...l.path,"items"]})},Or=(t,a,p,l)=>{let f=p,d=t._zod.def;f.type="object",f.properties={};let h=d.shape;for(let v in h)f.properties[v]=M(h[v],a,{...l,path:[...l.path,"properties",v]});let g=new Set(Object.keys(h)),y=new Set([...g].filter((v)=>{let x=d.shape[v]._zod;if(a.io==="input")return x.optin===void 0;else return x.optout===void 0}));if(y.size>0)f.required=Array.from(y);if(d.catchall?._zod.def.type==="never")f.additionalProperties=!1;else if(!d.catchall){if(a.io==="output")f.additionalProperties=!1}else if(d.catchall)f.additionalProperties=M(d.catchall,a,{...l,path:[...l.path,"additionalProperties"]})},Er=(t,a,p,l)=>{let f=t._zod.def,d=f.inclusive===!1,h=f.options.map((g,y)=>M(g,a,{...l,path:[...l.path,d?"oneOf":"anyOf",y]}));if(d)p.oneOf=h;else p.anyOf=h},Tr=(t,a,p,l)=>{let f=t._zod.def,d=M(f.left,a,{...l,path:[...l.path,"allOf",0]}),h=M(f.right,a,{...l,path:[...l.path,"allOf",1]}),g=(v)=>("allOf"in v)&&Object.keys(v).length===1,y=[...g(d)?d.allOf:[d],...g(h)?h.allOf:[h]];p.allOf=y},Ss=(t,a,p,l)=>{let f=p,d=t._zod.def;f.type="array";let h=a.target==="draft-2020-12"?"prefixItems":"items",g=a.target==="draft-2020-12"?"items":a.target==="openapi-3.0"?"items":"additionalItems",y=d.items.map((S,z)=>M(S,a,{...l,path:[...l.path,h,z]})),v=d.rest?M(d.rest,a,{...l,path:[...l.path,g,...a.target==="openapi-3.0"?[d.items.length]:[]]}):null;if(a.target==="draft-2020-12"){if(f.prefixItems=y,v)f.items=v}else if(a.target==="openapi-3.0"){if(f.items={anyOf:y},v)f.items.anyOf.push(v);if(f.minItems=y.length,!v)f.maxItems=y.length}else if(f.items=y,v)f.additionalItems=v;let{minimum:x,maximum:w}=t._zod.bag;if(typeof x==="number")f.minItems=x;if(typeof w==="number")f.maxItems=w},Ir=(t,a,p,l)=>{let f=p,d=t._zod.def;f.type="object";let h=d.keyType,y=h._zod.bag?.patterns;if(d.mode==="loose"&&y&&y.size>0){let x=M(d.valueType,a,{...l,path:[...l.path,"patternProperties","*"]});f.patternProperties={};for(let w of y)f.patternProperties[w.source]=x}else{if(a.target==="draft-07"||a.target==="draft-2020-12")f.propertyNames=M(d.keyType,a,{...l,path:[...l.path,"propertyNames"]});f.additionalProperties=M(d.valueType,a,{...l,path:[...l.path,"additionalProperties"]})}let v=h._zod.values;if(v){let x=[...v].filter((w)=>typeof w==="string"||typeof w==="number");if(x.length>0)f.required=x}},Nr=(t,a,p,l)=>{let f=t._zod.def,d=M(f.innerType,a,l),h=a.seen.get(t);if(a.target==="openapi-3.0")h.ref=f.innerType,p.nullable=!0;else p.anyOf=[d,{type:"null"}]},Ar=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);d.ref=f.innerType},Cr=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);d.ref=f.innerType,p.default=JSON.parse(JSON.stringify(f.defaultValue))},jr=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);if(d.ref=f.innerType,a.io==="input")p._prefault=JSON.parse(JSON.stringify(f.defaultValue))},Rr=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);d.ref=f.innerType;let h;try{h=f.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}p.default=h},Dr=(t,a,p,l)=>{let f=t._zod.def,d=f.in._zod.traits.has("$ZodTransform"),h=a.io==="input"?d?f.out:f.in:f.out;M(h,a,l);let g=a.seen.get(t);g.ref=h},Lr=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);d.ref=f.innerType,p.readOnly=!0},Ps=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);d.ref=f.innerType},St=(t,a,p,l)=>{let f=t._zod.def;M(f.innerType,a,l);let d=a.seen.get(t);d.ref=f.innerType},Es=(t,a,p,l)=>{let f=t._zod.innerType;M(f,a,l);let d=a.seen.get(t);d.ref=f},fs={string:gr,number:yr,boolean:xr,bigint:ms,symbol:ds,null:vr,undefined:hs,void:_s,never:zr,any:gs,unknown:$r,date:ys,enum:br,literal:wr,nan:xs,template_literal:vs,file:zs,success:$s,custom:kr,function:bs,transform:Sr,map:ws,set:Zs,array:Pr,object:Or,union:Er,intersection:Tr,tuple:Ss,record:Ir,nullable:Nr,nonoptional:Ar,default:Cr,prefault:jr,catch:Rr,pipe:Dr,readonly:Lr,promise:Ps,optional:St,lazy:Es};function Zt(t,a){if("_idmap"in t){let l=t,f=Qe({...a,processors:fs}),d={};for(let y of l._idmap.entries()){let[v,x]=y;M(x,f)}let h={},g={registry:l,uri:a?.uri,defs:d};f.external=g;for(let y of l._idmap.entries()){let[v,x]=y;rt(f,x),h[v]=ot(f,x)}if(Object.keys(d).length>0){let y=f.target==="draft-2020-12"?"$defs":"definitions";h.__shared={[y]:d}}return{schemas:h}}let p=Qe({...a,processors:fs});return M(t,p),rt(p,t),ot(p,t)}var ru=i("ZodISODateTime",(t,a)=>{Fn.init(t,a),G.init(t,a)});function ci(t){return Xi(ru,t)}var ou=i("ZodISODate",(t,a)=>{Mn.init(t,a),G.init(t,a)});function Ts(t){return Hi(ou,t)}var nu=i("ZodISOTime",(t,a)=>{Un.init(t,a),G.init(t,a)});function Is(t){return Qi(nu,t)}var iu=i("ZodISODuration",(t,a)=>{Jn.init(t,a),G.init(t,a)});function Ns(t){return es(iu,t)}var As=(t,a)=>{_t.init(t,a),t.name="ZodError",Object.defineProperties(t,{format:{value:(p)=>go(t,p)},flatten:{value:(p)=>_o(t,p)},addIssue:{value:(p)=>{t.issues.push(p),t.message=JSON.stringify(t.issues,Ue,2)}},addIssues:{value:(p)=>{t.issues.push(...p),t.message=JSON.stringify(t.issues,Ue,2)}},isEmpty:{get(){return t.issues.length===0}}})},Fs=i("ZodError",As),ae=i("ZodError",As,{Parent:Error});var Cs=Ve(ae),js=Ge(ae),Ds=We(ae),Ls=qe(ae),Ms=yo(ae),Us=xo(ae),Js=vo(ae),Vs=zo(ae),Gs=$o(ae),Ws=bo(ae),qs=wo(ae),Ks=ko(ae);var Ys=new WeakMap;function nt(t,a,p){let l=Object.getPrototypeOf(t),f=Ys.get(l);if(!f)f=new Set,Ys.set(l,f);if(f.has(a))return;f.add(a);for(let d in p){let h=p[d];Object.defineProperty(l,d,{configurable:!0,enumerable:!1,get(){let g=h.bind(this);return Object.defineProperty(this,d,{configurable:!0,writable:!0,enumerable:!0,value:g}),g},set(g){Object.defineProperty(this,d,{configurable:!0,writable:!0,enumerable:!0,value:g})}})}}var W=i("ZodType",(t,a)=>(E.init(t,a),Object.assign(t["~standard"],{jsonSchema:{input:He(t,"input"),output:He(t,"output")}}),t.toJSONSchema=ls(t,{}),t.def=a,t.type=a.type,Object.defineProperty(t,"_def",{value:a}),t.parse=(p,l)=>Cs(t,p,l,{callee:t.parse}),t.safeParse=(p,l)=>Ds(t,p,l),t.parseAsync=async(p,l)=>js(t,p,l,{callee:t.parseAsync}),t.safeParseAsync=async(p,l)=>Ls(t,p,l),t.spa=t.safeParseAsync,t.encode=(p,l)=>Ms(t,p,l),t.decode=(p,l)=>Us(t,p,l),t.encodeAsync=async(p,l)=>Js(t,p,l),t.decodeAsync=async(p,l)=>Vs(t,p,l),t.safeEncode=(p,l)=>Gs(t,p,l),t.safeDecode=(p,l)=>Ws(t,p,l),t.safeEncodeAsync=async(p,l)=>qs(t,p,l),t.safeDecodeAsync=async(p,l)=>Ks(t,p,l),nt(t,"ZodType",{check(...p){let l=this.def;return this.clone(_e(l,{checks:[...l.checks??[],...p.map((f)=>typeof f==="function"?{_zod:{check:f,def:{check:"custom"},onattach:[]}}:f)]}),{parent:!0})},with(...p){return this.check(...p)},clone(p,l){return me(this,p,l)},brand(){return this},register(p,l){return p.add(this,l),this},refine(p,l){return this.check(Ku(p,l))},superRefine(p,l){return this.check(Yu(p,l))},overwrite(p){return this.check(ve(p))},optional(){return I(this)},exactOptional(){return Ru(this)},nullable(){return Qs(this)},nullish(){return I(Qs(this))},nonoptional(p){return Ju(this,p)},array(){return u(this)},or(p){return b([this,p])},and(p){return tn(this,p)},transform(p){return ec(this,sc(p))},default(p){return Fu(this,p)},prefault(p){return Uu(this,p)},catch(p){return Vu(this,p)},pipe(p){return ec(this,p)},readonly(){return qu(this)},describe(p){let l=this.clone();return Pe.add(l,{description:p}),l},meta(...p){if(p.length===0)return Pe.get(this);let l=this.clone();return Pe.add(l,p[0]),l},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(p){return p(this)}}),Object.defineProperty(t,"description",{get(){return Pe.get(t)?.description},configurable:!0}),t)),tc=i("_ZodString",(t,a)=>{vt.init(t,a),W.init(t,a),t._zod.processJSONSchema=(l,f,d)=>gr(t,l,f,d);let p=t._zod.bag;t.format=p.format??null,t.minLength=p.minimum??null,t.maxLength=p.maximum??null,nt(t,"_ZodString",{regex(...l){return this.check(sr(...l))},includes(...l){return this.check(ar(...l))},startsWith(...l){return this.check(pr(...l))},endsWith(...l){return this.check(lr(...l))},min(...l){return this.check(Ce(...l))},max(...l){return this.check(wt(...l))},length(...l){return this.check(kt(...l))},nonempty(...l){return this.check(Ce(1,...l))},lowercase(l){return this.check(cr(l))},uppercase(l){return this.check(ur(l))},trim(){return this.check(mr())},normalize(...l){return this.check(fr(...l))},toLowerCase(){return this.check(dr())},toUpperCase(){return this.check(hr())},slugify(){return this.check(_r())}})}),au=i("ZodString",(t,a)=>{vt.init(t,a),tc.init(t,a),t.email=(p)=>t.check(Ti(pu,p)),t.url=(p)=>t.check(ir(rc,p)),t.jwt=(p)=>t.check(Yi(ku,p)),t.emoji=(p)=>t.check(ji(lu,p)),t.guid=(p)=>t.check(nr(Xs,p)),t.uuid=(p)=>t.check(Ii(Ot,p)),t.uuidv4=(p)=>t.check(Ni(Ot,p)),t.uuidv6=(p)=>t.check(Ai(Ot,p)),t.uuidv7=(p)=>t.check(Ci(Ot,p)),t.nanoid=(p)=>t.check(Ri(fu,p)),t.guid=(p)=>t.check(nr(Xs,p)),t.cuid=(p)=>t.check(Di(mu,p)),t.cuid2=(p)=>t.check(Li(du,p)),t.ulid=(p)=>t.check(Fi(hu,p)),t.base64=(p)=>t.check(Wi($u,p)),t.base64url=(p)=>t.check(qi(bu,p)),t.xid=(p)=>t.check(Mi(_u,p)),t.ksuid=(p)=>t.check(Ui(gu,p)),t.ipv4=(p)=>t.check(Ji(yu,p)),t.ipv6=(p)=>t.check(Bi(xu,p)),t.cidrv4=(p)=>t.check(Vi(vu,p)),t.cidrv6=(p)=>t.check(Gi(zu,p)),t.e164=(p)=>t.check(Ki(wu,p)),t.datetime=(p)=>t.check(ci(p)),t.date=(p)=>t.check(Ts(p)),t.time=(p)=>t.check(Is(p)),t.duration=(p)=>t.check(Ns(p))});function r(t){return Ei(au,t)}var G=i("ZodStringFormat",(t,a)=>{B.init(t,a),tc.init(t,a)}),pu=i("ZodEmail",(t,a)=>{Tn.init(t,a),G.init(t,a)});var Xs=i("ZodGUID",(t,a)=>{On.init(t,a),G.init(t,a)});var Ot=i("ZodUUID",(t,a)=>{En.init(t,a),G.init(t,a)});var rc=i("ZodURL",(t,a)=>{In.init(t,a),G.init(t,a)});function Bs(t){return ir(rc,t)}var lu=i("ZodEmoji",(t,a)=>{Nn.init(t,a),G.init(t,a)});var fu=i("ZodNanoID",(t,a)=>{An.init(t,a),G.init(t,a)});var mu=i("ZodCUID",(t,a)=>{Cn.init(t,a),G.init(t,a)});var du=i("ZodCUID2",(t,a)=>{jn.init(t,a),G.init(t,a)});var hu=i("ZodULID",(t,a)=>{Rn.init(t,a),G.init(t,a)});var _u=i("ZodXID",(t,a)=>{Dn.init(t,a),G.init(t,a)});var gu=i("ZodKSUID",(t,a)=>{Ln.init(t,a),G.init(t,a)});var yu=i("ZodIPv4",(t,a)=>{Bn.init(t,a),G.init(t,a)});var xu=i("ZodIPv6",(t,a)=>{Vn.init(t,a),G.init(t,a)});var vu=i("ZodCIDRv4",(t,a)=>{Gn.init(t,a),G.init(t,a)});var zu=i("ZodCIDRv6",(t,a)=>{Wn.init(t,a),G.init(t,a)});var $u=i("ZodBase64",(t,a)=>{Kn.init(t,a),G.init(t,a)});var bu=i("ZodBase64URL",(t,a)=>{Yn.init(t,a),G.init(t,a)});var wu=i("ZodE164",(t,a)=>{Xn.init(t,a),G.init(t,a)});var ku=i("ZodJWT",(t,a)=>{Hn.init(t,a),G.init(t,a)});var oc=i("ZodNumber",(t,a)=>{er.init(t,a),W.init(t,a),t._zod.processJSONSchema=(l,f,d)=>yr(t,l,f,d),nt(t,"ZodNumber",{gt(l,f){return this.check($t(l,f))},gte(l,f){return this.check(Xe(l,f))},min(l,f){return this.check(Xe(l,f))},lt(l,f){return this.check(zt(l,f))},lte(l,f){return this.check(Ye(l,f))},max(l,f){return this.check(Ye(l,f))},int(l){return this.check(en(l))},safe(l){return this.check(en(l))},positive(l){return this.check($t(0,l))},nonnegative(l){return this.check(Xe(0,l))},negative(l){return this.check(zt(0,l))},nonpositive(l){return this.check(Ye(0,l))},multipleOf(l,f){return this.check(bt(l,f))},step(l,f){return this.check(bt(l,f))},finite(){return this}});let p=t._zod.bag;t.minValue=Math.max(p.minimum??Number.NEGATIVE_INFINITY,p.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(p.maximum??Number.POSITIVE_INFINITY,p.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(p.format??"").includes("int")||Number.isSafeInteger(p.multipleOf??0.5),t.isFinite=!0,t.format=p.format??null});function m(t){return ts(oc,t)}var Zu=i("ZodNumberFormat",(t,a)=>{Qn.init(t,a),oc.init(t,a)});function en(t){return rs(Zu,t)}var Su=i("ZodBoolean",(t,a)=>{ei.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>xr(t,p,l,f)});function k(t){return os(Su,t)}var Pu=i("ZodNull",(t,a)=>{ti.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>vr(t,p,l,f)});function ks(t){return ns(Pu,t)}var Ou=i("ZodUnknown",(t,a)=>{ri.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>$r(t,p,l,f)});function P(){return is(Ou)}var Eu=i("ZodNever",(t,a)=>{ni.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>zr(t,p,l,f)});function nc(t){return ss(Eu,t)}var Tu=i("ZodArray",(t,a)=>{ii.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Pr(t,p,l,f),t.element=a.element,nt(t,"ZodArray",{min(p,l){return this.check(Ce(p,l))},nonempty(p){return this.check(Ce(1,p))},max(p,l){return this.check(wt(p,l))},length(p,l){return this.check(kt(p,l))},unwrap(){return this.element}})});function u(t,a){return cs(Tu,t,a)}var Mr=i("ZodObject",(t,a)=>{fi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Or(t,p,l,f),_(t,"shape",()=>a.shape),nt(t,"ZodObject",{keyof(){return F(Object.keys(this._zod.def.shape))},catchall(p){return this.clone({...this._zod.def,catchall:p})},passthrough(){return this.clone({...this._zod.def,catchall:P()})},loose(){return this.clone({...this._zod.def,catchall:P()})},strict(){return this.clone({...this._zod.def,catchall:nc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(p){return Dc(this,p)},safeExtend(p){return Lc(this,p)},merge(p){return Fc(this,p)},pick(p){return jc(this,p)},omit(p){return Rc(this,p)},partial(...p){return Mc(rn,this,p[0])},required(...p){return Uc(cc,this,p[0])}})});function s(t,a){let p={type:"object",shape:t??{},...c(a)};return new Mr(p)}function Rs(t,a){return new Mr({type:"object",shape:t,catchall:nc(),...c(a)})}function Z(t,a){return new Mr({type:"object",shape:t,catchall:P(),...c(a)})}var ic=i("ZodUnion",(t,a)=>{tr.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Er(t,p,l,f),t.options=a.options});function b(t,a){return new ic({type:"union",options:t,...c(a)})}var Iu=i("ZodDiscriminatedUnion",(t,a)=>{ic.init(t,a),mi.init(t,a)});function Qt(t,a,p){return new Iu({type:"union",options:a,discriminator:t,...c(p)})}var Nu=i("ZodIntersection",(t,a)=>{di.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Tr(t,p,l,f)});function tn(t,a){return new Nu({type:"intersection",left:t,right:a})}var Hs=i("ZodRecord",(t,a)=>{hi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Ir(t,p,l,f),t.keyType=a.keyType,t.valueType=a.valueType});function T(t,a,p){if(!a||!a._zod)return new Hs({type:"record",keyType:r(),valueType:t,...c(a)});return new Hs({type:"record",keyType:t,valueType:a,...c(p)})}var Fr=i("ZodEnum",(t,a)=>{_i.init(t,a),W.init(t,a),t._zod.processJSONSchema=(l,f,d)=>br(t,l,f,d),t.enum=a.entries,t.options=Object.values(a.entries);let p=new Set(Object.keys(a.entries));t.extract=(l,f)=>{let d={};for(let h of l)if(p.has(h))d[h]=a.entries[h];else throw Error(`Key ${h} not found in enum`);return new Fr({...a,checks:[],...c(f),entries:d})},t.exclude=(l,f)=>{let d={...a.entries};for(let h of l)if(p.has(h))delete d[h];else throw Error(`Key ${h} not found in enum`);return new Fr({...a,checks:[],...c(f),entries:d})}});function F(t,a){let p=Array.isArray(t)?Object.fromEntries(t.map((l)=>[l,l])):t;return new Fr({type:"enum",entries:p,...c(a)})}var Au=i("ZodLiteral",(t,a)=>{gi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>wr(t,p,l,f),t.values=new Set(a.values),Object.defineProperty(t,"value",{get(){if(a.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return a.values[0]}})});function o(t,a){return new Au({type:"literal",values:Array.isArray(t)?t:[t],...c(a)})}var Cu=i("ZodTransform",(t,a)=>{yi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Sr(t,p,l,f),t._zod.parse=(p,l)=>{if(l.direction==="backward")throw new Me(t.constructor.name);p.addIssue=(d)=>{if(typeof d==="string")p.issues.push(Se(d,p.value,a));else{let h=d;if(h.fatal)h.continue=!1;h.code??(h.code="custom"),h.input??(h.input=p.value),h.inst??(h.inst=t),p.issues.push(Se(h))}};let f=a.transform(p.value,p);if(f instanceof Promise)return f.then((d)=>(p.value=d,p.fallback=!0,p));return p.value=f,p.fallback=!0,p}});function sc(t){return new Cu({type:"transform",transform:t})}var rn=i("ZodOptional",(t,a)=>{rr.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>St(t,p,l,f),t.unwrap=()=>t._zod.def.innerType});function I(t){return new rn({type:"optional",innerType:t})}var ju=i("ZodExactOptional",(t,a)=>{xi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>St(t,p,l,f),t.unwrap=()=>t._zod.def.innerType});function Ru(t){return new ju({type:"optional",innerType:t})}var Du=i("ZodNullable",(t,a)=>{vi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Nr(t,p,l,f),t.unwrap=()=>t._zod.def.innerType});function Qs(t){return new Du({type:"nullable",innerType:t})}var Lu=i("ZodDefault",(t,a)=>{zi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Cr(t,p,l,f),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Fu(t,a){return new Lu({type:"default",innerType:t,get defaultValue(){return typeof a==="function"?a():Vt(a)}})}var Mu=i("ZodPrefault",(t,a)=>{$i.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>jr(t,p,l,f),t.unwrap=()=>t._zod.def.innerType});function Uu(t,a){return new Mu({type:"prefault",innerType:t,get defaultValue(){return typeof a==="function"?a():Vt(a)}})}var cc=i("ZodNonOptional",(t,a)=>{bi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Ar(t,p,l,f),t.unwrap=()=>t._zod.def.innerType});function Ju(t,a){return new cc({type:"nonoptional",innerType:t,...c(a)})}var Bu=i("ZodCatch",(t,a)=>{wi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Rr(t,p,l,f),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function Vu(t,a){return new Bu({type:"catch",innerType:t,catchValue:typeof a==="function"?a:()=>a})}var uc=i("ZodPipe",(t,a)=>{or.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Dr(t,p,l,f),t.in=a.in,t.out=a.out});function ec(t,a){return new uc({type:"pipe",in:t,out:a})}var Gu=i("ZodPreprocess",(t,a)=>{uc.init(t,a),ki.init(t,a)}),Wu=i("ZodReadonly",(t,a)=>{Zi.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>Lr(t,p,l,f),t.unwrap=()=>t._zod.def.innerType});function qu(t){return new Wu({type:"readonly",innerType:t})}var ac=i("ZodCustom",(t,a)=>{Si.init(t,a),W.init(t,a),t._zod.processJSONSchema=(p,l,f)=>kr(t,p,l,f)});function nn(t,a){return us(ac,t??(()=>!0),a)}function Ku(t,a={}){return as(ac,t,a)}function Yu(t,a){return ps(t,a)}function ui(t,a){return new Gu({type:"pipe",in:sc(t),out:a})}export{i,se,ai,_,me,c,oi,Os,Zr,Qr,et,tt,E,li,Zt,ci,Fs,r,Bs,m,en,k,ks,P,u,s,Rs,Z,b,Qt,tn,T,F,o,rn,I,nn,ui,sn};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{v}from"./chunk-kjp60rqs.js";import{Mt,Ue}from"./chunk-c3qyet60.js";import{existsSync as c}from"fs";import{dirname as p,join as i}from"path";import r from"typescript";function g(t=v("server")){try{return p(p(Bun.resolveSync("@types/bun/package.json",t)))}catch{throw Error("Moi's bundled @types/bun is missing \u2014 reinstall moi-computer")}}var d=new Bun.Glob("**/*.{ts,tsx}");async function y(t){if(!c(t))return[];return(await Array.fromAsync(d.scan({cwd:t,onlyFiles:!0}))).map((s)=>i(t,s)).sort()}async function f(t,e){let s=[`${e}.tsx`,`${e}.ts`].map((n)=>i(t,n)).find(c);if(!s)return[];let o=i(t,`${e}.server.ts`);return c(o)?[s,o]:[s]}async function S(t,e){let s=i(t,".moi"),[o,n]=e?.split("/")??[],l=n?await f(i(s,o),n):(await Promise.all((o?[o]:["widgets","views"]).map((u)=>y(i(s,u))))).flat().sort();if(l.length===0)return{files:l,diagnostics:[]};await Ue(t);let a=Mt(t,"collab.d.ts"),m=r.createProgram({rootNames:[Mt(t,"base.d.ts"),...c(a)?[a]:[],...l],options:{allowImportingTsExtensions:!0,esModuleInterop:!0,jsx:r.JsxEmit.ReactJSX,lib:["lib.esnext.d.ts","lib.dom.d.ts","lib.dom.iterable.d.ts"],module:r.ModuleKind.ESNext,moduleResolution:r.ModuleResolutionKind.Bundler,noEmit:!0,resolveJsonModule:!0,skipLibCheck:!0,strict:!0,target:r.ScriptTarget.ESNext,typeRoots:[g()],types:["bun"]}});return{files:l,diagnostics:r.getPreEmitDiagnostics(m)}}function w(t){return r.formatDiagnosticsWithColorAndContext([...t],{getCanonicalFileName:(e)=>e,getCurrentDirectory:()=>process.cwd(),getNewLine:()=>`
|
|
3
|
+
`})}export{w as formatAppletTypecheckDiagnostics,S as typecheckApplets};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var $i="bun@1.4.4";var Lt={name:"moi-computer",version:"0.14.0",description:"Local AI workspace powered by the Claude Agent SDK, Bun, React, and Tailwind. Requires Bun.",license:"Elastic-2.0",type:"module",homepage:"https://github.com/moi-computer/moi#readme",repository:{type:"git",url:"git+https://github.com/moi-computer/moi.git"},bugs:{url:"https://github.com/moi-computer/moi/issues"},keywords:["ai","agent","claude","claude-agent-sdk","bun","workspace","cli"],packageManager:$i,engines:{bun:">=1.4.0"},bin:{moi:"bin/moi.mjs"},files:["bin","runtime","dist","client/vendor","client/theme.css","server/applets/declarations","server/onboarding/prompt.md","skill","registry.json","ui-components","!**/*.test.ts","!**/*.test.tsx"],scripts:{dev:"bun server/cli.ts start --dev --debug","build:client":"bun scripts/build-client.ts","vendor:react":"bun scripts/build-vendor.ts",prepack:"bun run build:client && bun run build:package",lint:"oxlint","lint:fix":"oxlint --fix","registry:validate":"shadcn registry validate",typecheck:"tsc -p tsconfig.json","test:visual":"bun tests/visual/run.ts",format:"oxfmt","format:check":"oxfmt --check",prepare:"git config core.hooksPath .githooks","check:repo":"bun scripts/check-repo.ts","build:package":"bun scripts/build-package.ts"},dependencies:{"@types/bun":"1.3.10","bun-plugin-tailwind":"^0.1.2",devalue:"^5.9.2",sharp:"^0.35.4",tailwindcss:"^4.3.3",typescript:"^5.9.3",ws:"8.22.0"},devDependencies:{"@agentclientprotocol/sdk":"^1.4.0","@anthropic-ai/claude-agent-sdk":"^0.3.317","@anthropic-ai/sdk":"^0.109.1","@babel/parser":"^7.29.8","@babel/types":"^7.29.8","@base-ui/react":"^1.8.0","@blobatar/react":"^2.7.0","@dnd-kit/core":"^6.3.1","@modelcontextprotocol/sdk":"^1.29.0","@openclaw/gateway-client":"2026.11.5","@tabler/icons-react":"^3.46.0","@tailwindcss/typography":"^0.5.20","@tanstack/query-core":"5.102.8","@tanstack/react-query":"^5.102.8","@tldraw/store":"5.2.3","@tldraw/tlschema":"5.2.3","@tldraw/utils":"5.2.3","@types/culori":"^4.0.1","@types/proper-lockfile":"^4.1.4","@types/react":"^19.2.18","@types/react-dom":"^19.2.7","@types/react-grid-layout":"^2.1.0","@types/react-resizable":"^3.0.8","@uiverify/bun":"1.0.1","async-mutex":"0.5.0",blobatar:"^2.7.0",bun:">=1.4.4",citty:"^0.2.2","class-variance-authority":"^0.7.1",clsx:"^2.1.1",conf:"^15.1.0",culori:"^4.0.2","date-fns":"^4.4.0","embla-carousel-react":"^8.6.0","env-paths":"^4.0.0",frimousse:"^0.3.0","highlight.js":"^10.7.3",hono:"^4.13.7",jose:"^6.2.12",linkedom:"0.18.12","lru-cache":"^11.5.2","modern-screenshot":"^4.7.0",motion:"^12.43.0",nanoevents:"^10.0.0",nanoid:"^6.0.1",open:"^11.0.0",oxfmt:"^0.54.0",oxlint:"^1.82.0",pathe:"^2.0.3",picocolors:"^1.1.1",postcss:"^8.5.28","proper-lockfile":"4.1.2",react:"19.2.4","react-day-picker":"^10.0.1","react-dom":"19.2.4","react-grid-layout":"^2.2.4","react-markdown":"^10.1.0","react-resizable":"^3.2.0","react-resizable-panels":"^4.12.4",recharts:"3.8.0",regexparam:"^3.0.0","rehype-highlight":"^7.0.2","remark-gfm":"^4.0.1",shadcn:"4.21.0","shell-quote":"^1.10.0","sugar-high":"^1.3.0","tailwind-merge":"^3.6.0",tldraw:"5.2.3","tw-animate-css":"^1.4.0",wouter:"^3.11.0",zod:"^4.3.6",zustand:"^5.0.15"}};
|
|
3
|
+
export{$i,Lt};
|