vite-hub 0.5.0 → 0.6.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 +9 -8
- package/dist/_internal/runtime/browser-errors.d.ts +0 -2
- package/dist/_internal/runtime/browser-errors.js +3 -4
- package/dist/_internal/runtime/redirects.d.ts +1 -2
- package/dist/_internal/runtime/redirects.js +2 -3
- package/dist/_internal/runtime/request-policy.d.ts +1 -2
- package/dist/_internal/runtime/request-policy.js +2 -3
- package/dist/_internal/runtime/security.d.ts +1 -2
- package/dist/_internal/runtime/security.js +1 -2
- package/dist/{access-BC9HtX_M.js → access-CUFHPi8T.js} +13 -140
- package/dist/{access-policy-DhsEACna.d.ts → access-DkBck8Vu.d.ts} +17 -21
- package/dist/{access-policy-CVZg9LPR.js → access-policy-BM48XstY.js} +5 -6
- package/dist/{account-Cjj-tYzo.d.ts → account-DNr8fHcQ.d.ts} +5 -7
- package/dist/{console/runtime/server → agent/console}/agents.get.d.ts +2 -3
- package/dist/{console/runtime/server → agent/console}/agents.get.js +3 -4
- package/dist/{console/runtime/server → agent/console}/channel-replay.d.ts +3 -5
- package/dist/{console/runtime/server → agent/console}/channel-replay.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.d.ts +1 -3
- package/dist/{console/runtime/server → agent/console}/invocation-capabilities.get.js +4 -5
- package/dist/agent/console/invocation-workspace.get.d.ts +6 -0
- package/dist/{console/runtime/server → agent/console}/invocation-workspace.get.js +6 -7
- package/dist/{console/runtime/server → agent/console}/invocation.get.d.ts +4 -6
- package/dist/{console/runtime/server → agent/console}/invocation.get.js +8 -9
- package/dist/{console/runtime/server → agent/console}/invocations.get.d.ts +1 -2
- package/dist/{console/runtime/server → agent/console}/invocations.get.js +5 -6
- package/dist/agent/console/invocations.usage.d.ts +6 -0
- package/dist/agent/console/invocations.usage.js +51 -0
- package/dist/agent/console/operations.d.ts +6 -0
- package/dist/agent/console/operations.js +247 -0
- package/dist/{console/runtime/server → agent/console}/status.get.d.ts +2 -4
- package/dist/{console/runtime/server → agent/console}/status.get.js +6 -7
- package/dist/{server-W0c79AYZ.js → agent-console-CHsLxKk_.js} +4 -4
- package/dist/agent-console-FmaYpVv-.d.ts +14 -0
- package/dist/{agent-invocations.post-C3Onl2yH.js → agent-invocations.post-CF5anHY6.js} +14 -17
- package/dist/agents-DBm_PJie.js +1 -0
- package/dist/{agents-B76RICcy.js → agents-DXLHsE7x.js} +5 -6
- package/dist/{agents-C94A4N9u.d.ts → agents-Gyw4VKPt.d.ts} +0 -2
- package/dist/auth/console/auth.d.ts +25 -0
- package/dist/{console/runtime/server → auth/console}/auth.js +11 -13
- package/dist/auth/console/operations.d.ts +3 -0
- package/dist/auth/console/operations.js +135 -0
- package/dist/auth/server.js +1 -2
- package/dist/{auth-operations-GcQk0O0X.js → auth-operations-BKqoX8Ua.js} +4 -5
- package/dist/{auth-types-D3ugQ8xM.d.ts → auth-types-Cotn7406.d.ts} +4 -21
- package/dist/bin.js +8 -11
- package/dist/blob/console/operations.d.ts +3 -0
- package/dist/blob/console/operations.js +44 -0
- package/dist/blob/nuxt-image.js +1 -2
- package/dist/{blob-BcgsZtqM.js → blob-iw8pWQ6o.js} +5 -6
- package/dist/{blob-iVewd7KQ.d.ts → blob-uNin0_TV.d.ts} +1 -3
- package/dist/{browser-error-limits-CToqAD-O.js → browser-error-limits-B0yS95zt.js} +2 -4
- package/dist/cache/operations.d.ts +2 -4
- package/dist/cache/operations.js +3 -4
- package/dist/cache.d.ts +1 -3
- package/dist/cache.js +2 -3
- package/dist/{cli-config-FPHk1nbC.js → cli-config-BX8H4ZCo.js} +2 -3
- package/dist/cli-config-DgpmE_7z.js +1 -0
- package/dist/cms.js +1 -2
- package/dist/console/auth-types.d.ts +2 -2
- package/dist/console/auth.d.ts +2 -4
- package/dist/console/auth.js +2 -3
- package/dist/console/runtime/auth-operations.d.ts +4 -6
- package/dist/console/runtime/auth-operations.js +1 -2
- package/dist/console/runtime/client/account-views.d.ts +1 -3
- package/dist/console/runtime/client/account-views.js +1 -2
- package/dist/console/runtime/client/account.d.ts +1 -1
- package/dist/console/runtime/client/account.js +29 -45
- package/dist/console/runtime/client/appearance.d.ts +1 -2
- package/dist/console/runtime/client/appearance.js +1 -2
- package/dist/console/runtime/client/auth-management.ts +6 -6
- package/dist/console/runtime/client/blob-media.d.ts +2 -4
- package/dist/console/runtime/client/blob-media.js +5 -6
- package/dist/console/runtime/client/comment-thread.d.ts +1 -3
- package/dist/console/runtime/client/comment-thread.js +3 -4
- package/dist/console/runtime/client/content-heads.d.ts +1 -2
- package/dist/console/runtime/client/content-heads.js +2 -3
- package/dist/console/runtime/client/documents.d.ts +2 -2
- package/dist/console/runtime/client/documents.js +1 -2
- package/dist/console/runtime/client/editor.d.ts +3 -5
- package/dist/console/runtime/client/editor.js +1 -2
- package/dist/console/runtime/client/env-groups.d.ts +1 -3
- package/dist/console/runtime/client/env-groups.js +1 -2
- package/dist/console/runtime/client/env-status.d.ts +1 -3
- package/dist/console/runtime/client/env-status.js +1 -2
- package/dist/console/runtime/client/format.d.ts +1 -3
- package/dist/console/runtime/client/format.js +1 -2
- package/dist/console/runtime/client/invocation-deletion.d.ts +1 -2
- package/dist/console/runtime/client/invocation-deletion.js +1 -2
- package/dist/console/runtime/client/invocation.d.ts +1 -2
- package/dist/console/runtime/client/invocation.js +4 -5
- package/dist/console/runtime/client/live.d.ts +2 -4
- package/dist/console/runtime/client/live.js +1 -2
- package/dist/console/runtime/client/mcp-client.d.ts +7 -5
- package/dist/console/runtime/client/mcp-client.js +10 -5
- package/dist/console/runtime/client/media-library.d.ts +1 -1
- package/dist/console/runtime/client/media-library.js +1 -2
- package/dist/console/runtime/client/media-uploads.d.ts +2 -4
- package/dist/console/runtime/client/media-uploads.js +2 -3
- package/dist/console/runtime/client/media.d.ts +1 -1
- package/dist/console/runtime/client/media.js +1 -2
- package/dist/console/runtime/client/operation-view.d.ts +2 -4
- package/dist/console/runtime/client/operation-view.js +4 -5
- package/dist/console/runtime/client/presence.d.ts +2 -4
- package/dist/console/runtime/client/presence.js +1 -2
- package/dist/console/runtime/client/preview.d.ts +1 -3
- package/dist/console/runtime/client/preview.js +1 -2
- package/dist/console/runtime/client/problem.d.ts +2 -4
- package/dist/console/runtime/client/problem.js +3 -4
- package/dist/console/runtime/client/project-link.d.ts +1 -1
- package/dist/console/runtime/client/project-link.js +1 -2
- package/dist/console/runtime/client/project-session.d.ts +19 -10
- package/dist/console/runtime/client/project-session.js +1 -723
- package/dist/console/runtime/client/project.d.ts +1 -3
- package/dist/console/runtime/client/project.js +1 -2
- package/dist/console/runtime/client/projects.d.ts +1 -1
- package/dist/console/runtime/client/projects.js +1 -2
- package/dist/console/runtime/client/publish.d.ts +2 -4
- package/dist/console/runtime/client/publish.js +1 -2
- package/dist/console/runtime/client/rate-limit.d.ts +1 -3
- package/dist/console/runtime/client/rate-limit.js +3 -4
- package/dist/console/runtime/client/read-only.d.ts +2 -4
- package/dist/console/runtime/client/read-only.js +2 -3
- package/dist/console/runtime/client/request.d.ts +2 -2
- package/dist/console/runtime/client/request.js +1 -2
- package/dist/console/runtime/client/route-query.d.ts +4 -5
- package/dist/console/runtime/client/route-query.js +1 -2
- package/dist/console/runtime/client/schedule-run.d.ts +1 -3
- package/dist/console/runtime/client/schedule-run.js +3 -4
- package/dist/console/runtime/client/schema-form.d.ts +1 -1
- package/dist/console/runtime/client/schema-form.js +1 -2
- package/dist/console/runtime/client/sections.d.ts +1 -1
- package/dist/console/runtime/client/sections.js +1 -2
- package/dist/console/runtime/client/site-access.d.ts +83 -16
- package/dist/console/runtime/client/site-access.js +159 -32
- package/dist/console/runtime/client/site-link.d.ts +2 -0
- package/dist/console/runtime/client/site-link.js +1 -0
- package/dist/console/runtime/client/stored.d.ts +1 -3
- package/dist/console/runtime/client/stored.js +1 -2
- package/dist/console/runtime/client/toast.d.ts +1 -3
- package/dist/console/runtime/client/toast.js +1 -2
- package/dist/console/runtime/client/workflow.d.ts +1 -3
- package/dist/console/runtime/client/workflow.js +3 -4
- package/dist/console/runtime/components/console-account-home.vue +9 -7
- package/dist/console/runtime/components/console-account-link.vue +8 -5
- package/dist/console/runtime/components/console-account-setup.vue +10 -7
- package/dist/console/runtime/components/console-account-shell.vue +7 -2
- package/dist/console/runtime/components/console-account-unlink.vue +2 -3
- package/dist/console/runtime/components/console-app-settings.vue +8 -2
- package/dist/console/runtime/components/console-auth-detail.vue +1 -1
- package/dist/console/runtime/components/console-auth-event-list.vue +1 -0
- package/dist/console/runtime/components/console-document-editor.vue +3 -4
- package/dist/console/runtime/components/console-hosted-comments-embed.vue +106 -0
- package/dist/console/runtime/components/console-mcp-callback.vue +6 -1
- package/dist/console/runtime/components/console-mcp-items.vue +3 -16
- package/dist/console/runtime/components/console-site.vue +10 -8
- package/dist/console/runtime/components/console-usage.vue +2 -2
- package/dist/console/runtime/console-route.d.ts +1 -3
- package/dist/console/runtime/console-route.js +1 -2
- package/dist/console/runtime/definitions.d.ts +1 -1
- package/dist/console/runtime/definitions.js +1 -2
- package/dist/console/runtime/diagnostics.ts +14 -49
- package/dist/console/runtime/mcp-client.d.ts +2 -2
- package/dist/console/runtime/mcp-client.js +1 -2
- package/dist/console/runtime/operation-loader.d.ts +1 -0
- package/dist/console/runtime/operation-loader.js +10 -0
- package/dist/console/runtime/page-tool/account.js +26 -0
- package/dist/console/runtime/page-tool/page-tool.js +2 -2
- package/dist/console/runtime/rpc.d.ts +1 -1
- package/dist/console/runtime/rpc.js +1 -2
- package/dist/console/runtime/sections.d.ts +2 -2
- package/dist/console/runtime/sections.js +1 -2
- package/dist/console/runtime/server/access-policy.d.ts +1 -1
- package/dist/console/runtime/server/access-policy.js +1 -2
- package/dist/console/runtime/server/agent-console.d.ts +2 -0
- package/dist/console/runtime/server/agent-console.js +1 -0
- package/dist/console/runtime/server/blob.d.ts +1 -1
- package/dist/console/runtime/server/blob.js +1 -2
- package/dist/console/runtime/server/database.d.ts +1 -1
- package/dist/console/runtime/server/database.js +1 -2
- package/dist/console/runtime/server/definitions.d.ts +1 -1
- package/dist/console/runtime/server/definitions.get.d.ts +4 -6
- package/dist/console/runtime/server/definitions.get.js +5 -6
- package/dist/console/runtime/server/definitions.js +1 -2
- package/dist/console/runtime/server/development.d.ts +1 -1
- package/dist/console/runtime/server/development.js +1 -2
- package/dist/console/runtime/server/documents.d.ts +2 -2
- package/dist/console/runtime/server/documents.js +3 -3
- package/dist/console/runtime/server/entry-site-access.d.ts +3 -0
- package/dist/console/runtime/server/entry-site-access.js +4 -0
- package/dist/console/runtime/server/entry.d.ts +3 -0
- package/dist/console/runtime/server/entry.js +4 -0
- package/dist/console/runtime/server/env.d.ts +1 -3
- package/dist/console/runtime/server/env.js +1 -2
- package/dist/console/runtime/server/operation-contributions.d.ts +1 -1
- package/dist/console/runtime/server/operation-contributions.js +1 -2
- package/dist/console/runtime/server/pill.d.ts +45 -0
- package/dist/console/runtime/server/pill.js +62 -0
- package/dist/console/runtime/server/rpc.d.ts +5 -10
- package/dist/console/runtime/server/rpc.js +19 -27
- package/dist/console/runtime/server/runtime.d.ts +1 -1
- package/dist/console/runtime/server/runtime.js +1 -2
- package/dist/console/runtime/server/sections.d.ts +5 -5
- package/dist/console/runtime/server/sections.get.d.ts +1 -1
- package/dist/console/runtime/server/sections.get.js +8 -9
- package/dist/console/runtime/server/sections.js +6 -6
- package/dist/console/runtime/server/setup.d.ts +5 -5
- package/dist/console/runtime/server/setup.js +5 -5
- package/dist/console/runtime/server/site-access-operation.d.ts +7 -0
- package/dist/console/runtime/server/site-access-operation.js +36 -0
- package/dist/console/runtime/server/site-actions.d.ts +73 -0
- package/dist/console/runtime/server/site-actions.js +105 -0
- package/dist/console/runtime/server/site-entry.d.ts +16 -9
- package/dist/console/runtime/server/site-entry.js +62 -46
- package/dist/console/runtime/server/site-visitor.d.ts +17 -0
- package/dist/console/runtime/server/site-visitor.js +1 -0
- package/dist/console/runtime/server/site.d.ts +27 -0
- package/dist/console/runtime/server/site.js +1 -0
- package/dist/console/runtime/skills.d.ts +1 -3
- package/dist/console/runtime/skills.js +1 -2
- package/dist/console/server.d.ts +9 -25
- package/dist/console/server.js +8 -8
- package/dist/console/ui.d.ts +0 -10
- package/dist/console/ui.js +14 -27
- package/dist/console-lazy-views-VEjcbL4Q.js +1 -0
- package/dist/{console-route-CM2G5hiC.js → console-route-DbdnLkkF.js} +2 -3
- package/dist/console-signature--55DIKf2.js +237 -0
- package/dist/console.d.ts +1 -3
- package/dist/console.js +1 -2
- package/dist/content/console/operations.d.ts +3 -0
- package/dist/content/console/operations.js +62 -0
- package/dist/{console/runtime/server → database/console}/database.get.d.ts +2 -3
- package/dist/{console/runtime/server → database/console}/database.get.js +4 -5
- package/dist/database/console/operations.d.ts +3 -0
- package/dist/database/console/operations.js +49 -0
- package/dist/{database-UMJgnU2z.js → database-CrgBUdIx.js} +3 -4
- package/dist/{database-DC67Ipm-.d.ts → database-yFezh5U1.d.ts} +1 -3
- package/dist/{definition-catalog-BUcclwSH.js → definition-catalog-1xPPtzOx.js} +3 -4
- package/dist/definition-catalog-M5ua7JRS.js +1 -0
- package/dist/{definitions-BW6SvmMM.js → definitions-BFYqXchw.js} +1 -2
- package/dist/{definitions-DB4LbZ7T.d.ts → definitions-ChvMnA1L.d.ts} +0 -2
- package/dist/{definitions-DTytrw42.js → definitions-DGo2rNQ9.js} +5 -6
- package/dist/{definitions-Dbgxfz3I.d.ts → definitions-DRkgHKmk.d.ts} +1 -3
- package/dist/{deployment-BUshgN5Q.js → deployment-CURATxjG.js} +2 -3
- package/dist/deployment-l7RuKdEp.js +1 -0
- package/dist/{dev-peer-CHjyHYG6.js → dev-peer-CRYp01PE.js} +2 -222
- package/dist/dev-peer-CX5C9243.js +1 -0
- package/dist/{development-zLxOp-AO.js → development-DD567hhJ.js} +2 -3
- package/dist/{development-RnopiRwK.d.ts → development-I40mfD7B.d.ts} +1 -3
- package/dist/{diagnostics-DtR0TAmq.js → diagnostics-DLHqjKGe.js} +3 -9
- package/dist/diagnostics-DgGKvWzF.d.ts +7 -0
- package/dist/docs/nuxt.js +1 -2
- package/dist/doctor.d.ts +0 -6
- package/dist/doctor.js +11492 -12152
- package/dist/{documents-BDR0AkYR.d.ts → documents-A-7Ho0g0.d.ts} +12 -16
- package/dist/{documents-B4R4JSfH.js → documents-BduuZjm3.js} +6 -6
- package/dist/{documents-BASIRZ91.d.ts → documents-CApMRd4o.d.ts} +4 -7
- package/dist/{documents-BewAPY61.js → documents-D6ueeoUR.js} +17 -21
- package/dist/durability/operations.d.ts +2 -4
- package/dist/durability/operations.js +3 -4
- package/dist/{entries-DbyNPLC9.js → entries-UFs9n1MB.js} +2 -3
- package/dist/{console/runtime/server → env/console}/env.get.d.ts +2 -4
- package/dist/env/console/env.get.js +15 -0
- package/dist/env/console/operations.d.ts +3 -0
- package/dist/env/console/operations.js +12 -0
- package/dist/env/vite.d.ts +1 -0
- package/dist/env/vite.js +2 -0
- package/dist/{env-Dg1I_DWr.js → env-D-wtSupz.js} +2 -3
- package/dist/{error-diagnostics-B1yAIaSn.js → error-diagnostics-CBtvqI30.js} +2 -7
- package/dist/{error-diagnostics-C0KyI408.js → error-diagnostics-kKXseq8d.js} +5 -2
- package/dist/error-diagnostics.ts +1 -7
- package/dist/{features-CC5OcZqJ.js → features-BXRKlmtN.js} +5 -6
- package/dist/features-CD5i5I8V.js +1 -0
- package/dist/{format-BOYlanIZ.js → format-Df-bS4Ly.js} +1 -2
- package/dist/{github-login-Bi3bfjRX.js → github-login-W-vaahWP.js} +1 -2
- package/dist/{host-CkL0jjBq.js → host-DeNPYIeV.js} +1 -2
- package/dist/{http-error-Bs6e8_-8.js → http-error-BorAxJYM.js} +1 -2
- package/dist/index.d.ts +1 -7
- package/dist/index.js +5 -7
- package/dist/{inspect-DbZuP_7b.js → inspect-CWwAuL-B.js} +2 -3
- package/dist/internal/agent-invocations-libsql.js +1 -2
- package/dist/internal/disabled-redis-driver.d.ts +1 -3
- package/dist/internal/disabled-redis-driver.js +2 -3
- package/dist/internal/disabled-upstash-driver.d.ts +1 -3
- package/dist/internal/disabled-upstash-driver.js +2 -3
- package/dist/internal/test-loader.d.ts +1 -3
- package/dist/internal/test-loader.js +2 -3
- package/dist/internal/test-server.js +2 -3
- package/dist/{internal-BreyUsQ6.js → internal-0C_CC601.js} +1 -2
- package/dist/{internal-Cc9N0shU.d.ts → internal-BRNf11h3.d.ts} +14 -8
- package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
- package/dist/{invocation-page-undo-DqYcPlkQ.js → invocation-page-undo-DHbXczWY.js} +8 -7
- package/dist/invocations-B60XWNES.js +45 -0
- package/dist/{limits-BUlwWYQE.js → limits-BLo31qDR.js} +1 -2
- package/dist/logs/client.d.ts +1 -3
- package/dist/logs/client.js +1 -2
- package/dist/{console/runtime/server → logs/console}/logs.get.d.ts +3 -5
- package/dist/{console/runtime/server → logs/console}/logs.get.js +7 -8
- package/dist/logs/console/operations.d.ts +3 -0
- package/dist/logs/console/operations.js +23 -0
- package/dist/logs/host.d.ts +2 -4
- package/dist/logs/host.js +1 -2
- package/dist/logs/memory.d.ts +1 -1
- package/dist/logs/memory.js +1 -2
- package/dist/logs/source.d.ts +1 -1
- package/dist/logs/source.js +1 -2
- package/dist/logs.d.ts +2 -2
- package/dist/logs.js +2 -2
- package/dist/loopback-Bl9Cvj1k.js +139 -0
- package/dist/mcp/eval.d.ts +1 -0
- package/dist/mcp/eval.js +2 -0
- package/dist/{mcp-client-C_sEmyQw.d.ts → mcp-client-uXVvS7RL.d.ts} +5 -10
- package/dist/{media-uKX4Wy-c.d.ts → media-C79RB1oH.d.ts} +0 -2
- package/dist/{media-D3OfyKni.js → media-CNwnh6CG.js} +8 -9
- package/dist/{media-library-o8RRsnn_.js → media-library-DTC8TLsZ.js} +5 -6
- package/dist/{media-library-D9ThbXqs.d.ts → media-library-DxGu6w9z.d.ts} +0 -2
- package/dist/{memory-C54SDH_l.js → memory-D3EJS_Bp.js} +3 -4
- package/dist/{memory-2bbl4hcV.d.ts → memory-GK5ZGWrp.d.ts} +1 -3
- package/dist/{nuxt-server-auto-imports-cfTZYvgy.js → nuxt-server-auto-imports-4aT5BD4u.js} +1 -2
- package/dist/{nuxt-server-imports-75bWMeXc.js → nuxt-server-imports-BdJqiVhT.js} +1 -2
- package/dist/nuxt.d.ts +1 -3
- package/dist/nuxt.js +276 -182
- package/dist/{object-D8pRdprI.js → object-DRSmpe04.js} +1 -2
- package/dist/{operation-contributions-C3lwePQu.js → operation-contributions-BU10k2QS.js} +9 -9
- package/dist/{operation-contributions-CrdmqtJW.d.ts → operation-contributions-xwjDzj28.d.ts} +6 -7
- package/dist/{operation-definition-DxjKcCGm.js → operation-definition-D04Rdjbe.js} +7 -9
- package/dist/operation-modules-BUXlwjvd.js +1 -0
- package/dist/operation-modules-DHWkPcfS.js +139 -0
- package/dist/{operation-registry-BogGwk_I.js → operation-registry-DfQbL7vE.js} +1 -2
- package/dist/{operation-rpc-DI9txNxK.js → operation-rpc-BMdfapja.js} +3 -4
- package/dist/operations-D-7ljPqw.js +1 -0
- package/dist/{operations-TTjL_7Zc.d.ts → operations-DgFhA1WE.d.ts} +0 -4
- package/dist/{operations-CFYGXqLm.js → operations-DksTrRMb.js} +4 -5
- package/dist/operations-byxiZ2R2.js +113 -0
- package/dist/{optional-owners-O6sj4uoj.js → optional-owners-Cypch7V3.js} +4 -6
- package/dist/{out-fRNaVslw.js → out-Cw5Tvr92.js} +2933 -2301
- package/dist/{owned-paths-BnjT0FhU.js → owned-paths-MjjDftBn.js} +1 -2
- package/dist/page/pill.iife.js +2 -2
- package/dist/page-tools-BeZrtn4S.js +46 -0
- package/dist/page-tools-Chk8Gm9x.d.ts +23 -0
- package/dist/page-tools-shared-BLPidmCi.js +39 -0
- package/dist/{pathe.M-eThtNZ-J4gfe1m9.js → pathe.M-eThtNZ-D4EC7Wue.js} +1 -2
- package/dist/{plugins-DoXnU6-s.d.ts → plugins-BmkOoyIh.d.ts} +25 -110
- package/dist/{plugins-BTZQaFtZ.js → plugins-DfXcUnzN.js} +1779 -1384
- package/dist/presets/workspace.js +1 -2
- package/dist/{project-Dgyq1F1V.d.ts → project-B2qWt8on.d.ts} +3 -12
- package/dist/{project-DlWTGB7h.js → project-DRC67Uiu.js} +1 -2
- package/dist/{project-DXZRZEPX.js → project-_juMSuAS.js} +8 -11
- package/dist/{project-link-DT99MoyU.js → project-link-CJbCkOlC.js} +7 -8
- package/dist/{project-link-bNS-KROO.d.ts → project-link-Ck3vuq9w.d.ts} +2 -4
- package/dist/{project-root-v6ba4tn7.js → project-root-mAVQGZTX.js} +1 -2
- package/dist/project-session-8pN7pRo8.js +764 -0
- package/dist/{projects-CAcXztf4.js → projects-BRp0iseV.js} +1 -2
- package/dist/{projects-Ddvl9EJp.d.ts → projects-mgPxrKZr.d.ts} +0 -2
- package/dist/{registry-zw6aE2N9.js → registry-B8JE5NY-.js} +1 -2
- package/dist/{registry-CDKLACCZ.js → registry-CnPC-gNu.js} +1 -2
- package/dist/{request-CMA2UKKq.js → request-D769eiBL.js} +5 -6
- package/dist/{request-D7h3SQ92.d.ts → request-DYmjLTqP.d.ts} +2 -4
- package/dist/{request-SBLxvpyr.d.ts → request-DkoE0b2h.d.ts} +11 -4
- package/dist/{request-Cs0FqxEL.js → request-XFVx7CGC.js} +30 -9
- package/dist/{request-origin-COUkgHd6.js → request-origin-pzWr9UUu.js} +1 -2
- package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-DegdyBIC.js} +2 -3
- package/dist/{route-query-CRVWXIrc.js → route-query-BWVl6ZO6.js} +4 -5
- package/dist/routes-D02vxUSg.js +26 -0
- package/dist/{rpc-DIUA61pv.js → rpc-D3tsx5lZ.js} +1 -2
- package/dist/{rpc-7nlHSv3y.d.ts → rpc-oijgKQtD.d.ts} +0 -2
- package/dist/{runtime-YLWfdrtO.js → runtime-CAbuQGMP.js} +3 -4
- package/dist/{runtime-B-46Bawt.js → runtime-CRJsqVTa.js} +2 -3
- package/dist/{runtime-DxfJOfCd.js → runtime-DA7HJe10.js} +3 -4
- package/dist/runtime-DGvimtvc.d.ts +5 -0
- package/dist/{runtime-CX_l_78I.js → runtime-F0CTqBFx.js} +5 -6
- package/dist/{runtime-feature-guard-CuyPVGj9.js → runtime-feature-guard-BKAMRZzM.js} +6 -7
- package/dist/scan-module-B1A24jqP.js +1 -0
- package/dist/{scan-module-Df58L_6T.js → scan-module-BfZvDBxb.js} +2 -4
- package/dist/{schema-form-C-fy3xaU.d.ts → schema-form-Bl79Bdm-.d.ts} +0 -2
- package/dist/search-jgMrZJXR.js +84 -0
- package/dist/{sections-DumoLKQN.js → sections-AUGy9EkY.js} +2 -8
- package/dist/{sections-BogiCmtz.d.ts → sections-BMkFB3S-.d.ts} +4 -6
- package/dist/{sections-C83x0slv.js → sections-BNTdIEJw.js} +2 -3
- package/dist/{sections-Do7X4Nwt.d.ts → sections-DCoCa4nF.d.ts} +1 -8
- package/dist/sections-DjeAUX7o.d.ts +8 -0
- package/dist/{sections-BKUReack.js → sections-ZFAlI4JW.js} +14 -7
- package/dist/{sections.get-H46e2urg.d.ts → sections.get-BY5dClJY.d.ts} +2 -4
- package/dist/seo/runtime.d.ts +2 -5
- package/dist/seo/runtime.js +3 -5
- package/dist/{seo-CtLywyRx.d.ts → seo-CgW5uI9L.d.ts} +0 -2
- package/dist/seo.d.ts +1 -1
- package/dist/seo.js +1 -2
- package/dist/{setup-BC0P3eZy.d.ts → setup-BBnZPziq.d.ts} +5 -10
- package/dist/{setup-DNGzawFn.js → setup-yc3_WKNG.js} +4 -17
- package/dist/site-CZCIWsUQ.js +169 -0
- package/dist/site-link-Bvo2SxPo.js +58 -0
- package/dist/site-link-Dtw8MNVB.d.ts +18 -0
- package/dist/site-pages-B6J8U2Nq.js +66 -0
- package/dist/site-token-Wa7fhjwg.js +215 -0
- package/dist/site-visitor-BkhE2TA0.js +89 -0
- package/dist/skills/operations.d.ts +1 -5
- package/dist/skills/operations.js +4 -5
- package/dist/{skills-DdpSMiCI.js → skills-C1MaGEbO.js} +1 -2
- package/dist/skills.d.ts +1 -2
- package/dist/{skills.get-CRd06TTb.js → skills.get-CW8vc_Hf.js} +3 -4
- package/dist/skills.js +1 -2
- package/dist/{source-Cw3iYvJF.js → source-DYFndd0W.js} +2 -3
- package/dist/{source-S-LChQvw.d.ts → source-DemBtwla.d.ts} +0 -2
- package/dist/{stored-Dhv2qsQv.js → stored-J3TetMKf.js} +1 -2
- package/dist/task/operations.d.ts +1 -5
- package/dist/task/operations.js +3 -4
- package/dist/test/register.js +2 -3
- package/dist/test.d.ts +0 -4
- package/dist/test.js +1 -2
- package/dist/ui/vite.js +1 -2
- package/dist/usage-DBi7aOhx.js +33 -0
- package/dist/{version-dkga9imp.js → version-DUCd7Orc.js} +24 -21
- package/dist/{vite-stage-D7fe614I.js → vite-stage-Dmo4RgnK.js} +3 -5
- package/dist/{vue-router-C68IU1jM.d.ts → vue-router-plZJLlpm.d.ts} +120 -182
- package/dist/workspace/console/operations.d.ts +3 -0
- package/dist/workspace/console/operations.js +22 -0
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.d.ts +3 -5
- package/dist/{console/runtime/server → workspace/console}/workspace-files.get.js +4 -5
- package/dist/{workspace-history-B95Q-kGI.js → workspace-history-B52xib2J.js} +3 -4
- package/dist/{workspace-history-CeVwBB6Q.d.ts → workspace-history-WuxgLsi4.d.ts} +0 -2
- package/package.json +158 -149
- package/dist/agents-BhFggA26.js +0 -2
- package/dist/auth-GFIN6xSJ.d.ts +0 -120
- package/dist/cli-config-g_mbWdjT.js +0 -2
- package/dist/cloudflare-env-lookup-DKXdr4P_.js +0 -16
- package/dist/console/runtime/client/ticket.d.ts +0 -2
- package/dist/console/runtime/client/ticket.js +0 -2
- package/dist/console/runtime/page/loader.js +0 -134
- package/dist/console/runtime/server/auth.d.ts +0 -2
- package/dist/console/runtime/server/env.get.js +0 -16
- package/dist/console/runtime/server/invocation-workspace.get.d.ts +0 -8
- package/dist/console/runtime/server/mcp-client-operations.d.ts +0 -5
- package/dist/console/runtime/server/mcp-client-operations.js +0 -139
- package/dist/console/runtime/server/page-auth.d.ts +0 -18
- package/dist/console/runtime/server/page-auth.js +0 -44
- package/dist/console/runtime/server/page-tool.d.ts +0 -2
- package/dist/console/runtime/server/page-tool.js +0 -110
- package/dist/console/runtime/server/page-tools-route.d.ts +0 -2
- package/dist/console/runtime/server/page-tools-route.js +0 -5
- package/dist/console/runtime/server/search.get.d.ts +0 -4
- package/dist/console/runtime/server/search.get.js +0 -97
- package/dist/console/runtime/server/site-session.d.ts +0 -80
- package/dist/console/runtime/server/site-session.js +0 -2
- package/dist/console/runtime/server/tickets.d.ts +0 -2
- package/dist/console/runtime/server/tickets.js +0 -2
- package/dist/console/runtime/server/usage.get.d.ts +0 -10
- package/dist/console/runtime/server/usage.get.js +0 -92
- package/dist/console/runtime/site-access.d.ts +0 -2
- package/dist/console/runtime/site-access.js +0 -2
- package/dist/console-lazy-views-DXnIkdyd.js +0 -2
- package/dist/definition-catalog-og_1razf.js +0 -2
- package/dist/deployment-C2B0hBBj.js +0 -2
- package/dist/diagnostics-CjGiniKb.d.ts +0 -11
- package/dist/features-ujWsvlEH.js +0 -2
- package/dist/invocations-6jxqLkGY.js +0 -86
- package/dist/mcp-client-C91h8Taa.js +0 -1024
- package/dist/mcp-client-CTbTbn7d.js +0 -10
- package/dist/operations-5Lwd1xEI.js +0 -2
- package/dist/operations-ChEXk2ij.js +0 -853
- package/dist/page-tool-PmxH65gt.d.ts +0 -69
- package/dist/page-tools-ClgqElu-.js +0 -462
- package/dist/page-tools-DcCCtDKi.d.ts +0 -23
- package/dist/page-tools-shared-aNC9YtoI.js +0 -125
- package/dist/runtime-B_btezs1.d.ts +0 -7
- package/dist/scan-module-D_3X08mj.js +0 -2
- package/dist/secret-DELGKpCJ.js +0 -44
- package/dist/sections-CFiMNsqu.d.ts +0 -10
- package/dist/site-access-BycrwM2v.js +0 -18
- package/dist/site-access-CAiWyKOD.js +0 -2
- package/dist/site-access-DxfdOel1.d.ts +0 -55
- package/dist/site-access-L1qbvKt6.js +0 -293
- package/dist/site-session-CRwgKtTF.js +0 -300
- package/dist/skills/vitehub/SKILL.md +0 -142
- package/dist/skills/vitehub/agents/openai.yaml +0 -4
- package/dist/skills/vitehub/references/agent-definitions.md +0 -36
- package/dist/skills/vitehub/references/bundle.md +0 -57
- package/dist/skills/vitehub/references/capabilities-authority.md +0 -30
- package/dist/skills/vitehub/references/channels-triggers.md +0 -27
- package/dist/skills/vitehub/references/framework-composition.md +0 -29
- package/dist/skills/vitehub/references/preview-contract.md +0 -44
- package/dist/skills/vitehub/references/primitives/auth.md +0 -14
- package/dist/skills/vitehub/references/primitives/blob.md +0 -13
- package/dist/skills/vitehub/references/primitives/browser.md +0 -17
- package/dist/skills/vitehub/references/primitives/cache.md +0 -13
- package/dist/skills/vitehub/references/primitives/channels.md +0 -11
- package/dist/skills/vitehub/references/primitives/connections.md +0 -14
- package/dist/skills/vitehub/references/primitives/content.md +0 -13
- package/dist/skills/vitehub/references/primitives/database.md +0 -15
- package/dist/skills/vitehub/references/primitives/email.md +0 -11
- package/dist/skills/vitehub/references/primitives/env.md +0 -13
- package/dist/skills/vitehub/references/primitives/kv.md +0 -13
- package/dist/skills/vitehub/references/primitives/markdown-template.md +0 -13
- package/dist/skills/vitehub/references/primitives/queue.md +0 -14
- package/dist/skills/vitehub/references/primitives/rate-limit.md +0 -11
- package/dist/skills/vitehub/references/primitives/realtime.md +0 -19
- package/dist/skills/vitehub/references/primitives/sandbox-task.md +0 -11
- package/dist/skills/vitehub/references/primitives/sandbox.md +0 -13
- package/dist/skills/vitehub/references/primitives/schedule.md +0 -11
- package/dist/skills/vitehub/references/primitives/shell.md +0 -11
- package/dist/skills/vitehub/references/primitives/source.md +0 -11
- package/dist/skills/vitehub/references/primitives/workflow.md +0 -11
- package/dist/skills/vitehub/references/primitives/workspace.md +0 -11
- package/dist/skills/vitehub/references/project-patterns.md +0 -19
- package/dist/skills/vitehub/references/project-shapes.md +0 -81
- package/dist/skills/vitehub/references/proof-recovery.md +0 -31
- package/dist/skills/vitehub/references/sandboxes-hosts.md +0 -26
- package/dist/skills/vitehub/references/schedules-workflows-invocations.md +0 -28
- package/dist/skills/vitehub/references/server-primitives.md +0 -39
- package/dist/skills/vitehub/references/workspaces-sources-access.md +0 -26
- package/dist/ticket-DtBAstEU.js +0 -31
- package/dist/ticket-Pr_8ZtXW.d.ts +0 -14
- package/dist/tickets-DahBmKDT.js +0 -357
- package/dist/usage-CoQXs5nW.d.ts +0 -22
- package/dist/usage-index-VJAZ7a0p.js +0 -335
- package/dist/usage-jKtAgJZ0.js +0 -571
- /package/dist/{console/runtime/public/skills → console-skills}/index.json +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/SKILL.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/agents/openai.yaml +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/agent-definitions.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/bundle.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/capabilities-authority.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/channels-triggers.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/framework-composition.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/preview-contract.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/auth.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/blob.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/browser.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/cache.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/channels.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/connections.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/content.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/database.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/email.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/env.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/kv.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/markdown-template.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/queue.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/rate-limit.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/realtime.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox-task.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/sandbox.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/schedule.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/shell.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/source.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workflow.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/primitives/workspace.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-patterns.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/project-shapes.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/proof-recovery.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/sandboxes-hosts.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/schedules-workflows-invocations.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/server-primitives.md +0 -0
- /package/dist/{console/runtime/public/skills → console-skills}/vitehub/references/workspaces-sources-access.md +0 -0
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
const e=/* @__PURE__ */ new Set;let t,n=!1;function r(){return t?.matches??!1}function i(){let t=r();if(t!==n){n=t;for(let n of e)n(t)}}function a(){t||typeof matchMedia!=`function`||(t=matchMedia(`(prefers-reduced-motion: reduce)`),t.addEventListener?.(`change`,i),n=r())}function o(){return a(),r()}function s(t){return a(),e.add(t),()=>e.delete(t)}const c={snappy:{stiffness:520,damping:34},soft:{stiffness:380,damping:20}},l=/* @__PURE__ */ new Map,u=/* @__PURE__ */ new Set;let d=0,f=!1,p=0,m=0;function h(){return 1}function g(e){let t=Math.min(.032,m?(e-m)/1e3:.016)/1;m=e;let n=Array.from(l),r=Array.from(u);for(let[e,r]of n)if(l.get(e)===r){if(e.tween){let n=e.tween;n.elapsed+=t;let r=Math.min(1,n.elapsed/n.duration),i=1-(1-r)**3,a=n.from+(e.target-n.from)*i;e.velocity=(a-e.value)/(t||1),e.value=a,r>=1&&_(e)}else{let{stiffness:n,damping:r}=e.preset,i=t/6;for(let t=0;t<6;t++){let t=-n*(e.value-e.target)-r*e.velocity;e.velocity+=t*i,e.value+=e.velocity*i}Math.abs(e.velocity)<.002&&Math.abs(e.value-e.target)<5e-4&&_(e)}e.frame(e.value,e.velocity)}for(let e of r)u.has(e)&&e(t)===!1&&u.delete(e);l.size||u.size?p=requestAnimationFrame(g):(p=0,m=0)}function _(e){e.value=e.target,e.velocity=0,e.tween=void 0,l.delete(e)}function v(e){l.set(e,++d),p||=requestAnimationFrame(g)}function y(e){let t=t=>e(t);return u.add(t),p||=requestAnimationFrame(g),()=>{u.delete(t)}}function b(e){if(!e)return;let t=Array.from(l);for(let[e,n]of t)l.get(e)!==n||e.tween||(_(e),e.frame(e.value,0))}function x(e,t,n=c.snappy){let r={value:e,velocity:0,target:e,preset:n,tween:void 0,frame:t},i={get value(){return r.value},get velocity(){return r.velocity},get target(){return r.target},get active(){return l.has(r)},to(e,t={}){if(t.preset&&(r.preset=t.preset),t.tween===void 0&&o())return i.set(e);t.tween===void 0&&!f&&(f=!0,s(b)),r.target=e,t.velocity!==void 0&&(r.velocity+=t.velocity),r.tween=t.tween===void 0?void 0:{from:r.value,elapsed:0,duration:t.tween},v(r)},set(e){r.value=r.target=e,r.velocity=0,r.tween=void 0,l.delete(r),t(e,0)},stop(){r.velocity=0,r.tween=void 0,l.delete(r)}};return i}function S(e){let t=e;for(;t;){if(t.closest(`[data-motion="none"]`))return!0;let e=t.getRootNode();t=e instanceof ShadowRoot?e.host:null}return!1}const C=[`aria-checked`,`aria-selected`,`aria-pressed`,`aria-expanded`,`aria-valuenow`,`aria-valuetext`,`data-state`,`data-checked`,`data-open`,`open`,`data-leaving`],w=/* @__PURE__ */ new Map,T=/* @__PURE__ */ new Set,E=Symbol.for(`vite-hub.motion.layer`);let ee;function te(){let e=Reflect.get(globalThis,E);if(e&&e!==ee&&typeof e==`object`&&`define`in e&&`install`in e)return e}function ne(e){ee=e,Reflect.get(globalThis,E)||Reflect.set(globalThis,E,e)}function re(e){let t=[...w.values()];w.clear();for(let n of t)n.removeFromShared=e.define(n.effect,n.isReduced)}function ie(e,t=o){let n={effect:e,isReduced:t};w.set(e.name,n);for(let e of T)e();return()=>{if(n.removeFromShared)return n.removeFromShared();if(w.get(e.name)===n){w.delete(e.name);for(let e of T)e()}}}function D(){return[...w.values()].map(e=>e.effect)}function ae(){return[...w.values()]}function oe(e){return T.add(e),()=>T.delete(e)}function O(e,t){for(let[n,r]of Object.entries(t))r?e.style.setProperty(n,r):e.style.removeProperty(n)}const k=/* @__PURE__ */ new Map;let A;const j=/* @__PURE__ */ new Map;let M,se=[];const ce=Symbol.for(`vite-hub.motion.effect-presses`),le=e=>{let t=Reflect.get(e,ce);if(t)return t;let n=/* @__PURE__ */ new Map;return Reflect.set(e,ce,n),n},ue=/* @__PURE__ */ new Set;function de(e,t){if(ue.has(t))return!1;try{return e.matches(t)}catch{return ue.add(t),!1}}function fe(e){let t=e;for(;;){for(let e of k.keys())if(e instanceof Element&&e.contains(t))return!0;let e=t.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&k.has(e))return!0;if(!(e instanceof ShadowRoot))return!1;t=e.host}}function pe(e,t){let n=-1;e.forEach((e,t)=>{e instanceof Element&&e.matches(`[data-motion="none"]`)&&(n=t)});let r=e.findIndex(e=>e instanceof HTMLElement&&de(e,t));return r===-1||r<=n||!fe(e[r])?void 0:e[r]}function me(e,t,n){N(e,!0);let r=le(t),i=[];for(let{effect:a,isReduced:o}of ae()){if(!a.press||o())continue;let s=pe(n,a.selector);if(!s||e===`key`&&s!==n[0])continue;let c=r.get(s);if(c?.has(a.name))continue;let l=a.press(s,t);if(!l)continue;c?c.add(a.name):r.set(s,/* @__PURE__ */ new Set([a.name]));let u={element:s,press:l};e!==`key`&&!l.move&&(u.leave=()=>he(e,u,!0),s.addEventListener(`pointerleave`,u.leave,{once:!0})),i.push(u)}i.length&&(j.set(e,i),i.some(e=>e.press.move)&&document.addEventListener(`pointermove`,ye,{capture:!0,passive:!0}))}function N(e,t=!1){let n=j.get(e);if(n){j.delete(e);for(let{element:e,press:r,leave:i}of n)i&&e.removeEventListener(`pointerleave`,i),t&&r.cancel?r.cancel():r.release();ge()}}function he(e,t,n=!1){let r=j.get(e),i=r?.indexOf(t)??-1;r&&i!==-1&&(t.leave&&t.element.removeEventListener(`pointerleave`,t.leave),r.splice(i,1),r.length||j.delete(e),n&&t.press.cancel?t.press.cancel():t.press.release(),ge())}function ge(){[...j.values()].some(e=>e.some(e=>e.press.move))||document.removeEventListener(`pointermove`,ye,{capture:!0})}function _e(e){if(e.button!==0)return;let t=e.composedPath();e.isPrimary&&(M={event:e,path:t}),me(e.pointerId,e,t)}function ve(e){M?.event.pointerId===e.pointerId&&(M=void 0),N(e.pointerId,e.type===`pointercancel`)}function ye(e){for(let{press:t}of j.get(e.pointerId)??[])t.move?.(e)}function be(e){if(e.repeat||e.key!==` `&&e.key!==`Enter`)return;let t=e.composedPath();e.key===` `&&t[0]instanceof Element&&t[0].matches(`a[href], [role=link]`)||me(`key`,e,t)}function xe(e){(e.key===` `||e.key===`Enter`)&&N(`key`)}function Se(e,t){let n=t.filter(e=>e.content);if(!n.length)return;let r=/* @__PURE__ */ new Map;for(let t of e){if(t.type===`attributes`)continue;let e=t.type===`characterData`?t.target.parentElement:t.target;if(!(e instanceof HTMLElement||e instanceof SVGElement))continue;let n=r.get(e);if(n||(n={added:[],removed:[],oldText:void 0,texts:/* @__PURE__ */ new Map},r.set(e,n)),t.type===`characterData`){n.texts.has(t.target)||n.texts.set(t.target,t.oldValue);continue}n.added.push(...t.addedNodes),n.removed.push(...t.removedNodes)}for(let[e,t]of r){if(!e.isConnected)continue;let r=t.added.filter(e=>!t.removed.includes(e)),i=t.removed.filter(e=>!t.added.includes(e)),a=t.texts,o,s=[...e.childNodes];i.length&&s.every(e=>r.includes(e))?o=i.map(e=>e.textContent??``).join(``):a.size===1&&s.length===1&&a.has(s[0])&&(o=a.get(s[0])??``);for(let t of n)de(e,t.selector)&&!S(e)&&t.content(e,{added:r,removed:i,oldText:o})}}function Ce(e){if(!M||!e.matches(`[role=separator][data-panel-resize-handle-id]`))return;let t=ae().find(({effect:e})=>e.name===`divider`);if(!t||t.isReduced())return;let{event:n,path:r}=M,i=j.get(n.pointerId)??[],a=i.find(t=>t.splitter&&t.element===e);if(e.getAttribute(`data-resize-handle-active`)!==`pointer`){a&&he(n.pointerId,a);return}if(a||!r.includes(e.getRootNode())||!fe(e)||S(e))return;let o=t.effect.press?.(e,n);o&&(i.push({element:e,press:o,splitter:!0}),j.set(n.pointerId,i),document.addEventListener(`pointermove`,ye,{capture:!0,passive:!0}))}function we(e){let t=[...new Set(e)],n=D(),r=/* @__PURE__ */ new Map;Se(t,n);for(let e of t)if(e.type!==`characterData`){if(e.type===`attributes`){let t=e.target;if(!(t instanceof HTMLElement))continue;if(e.attributeName===`data-resize-handle-active`){Ce(t);continue}let i=e.attributeName,a=t.getAttribute(i);if(a===e.oldValue)continue;let o=r.get(t);o||r.set(t,o=/* @__PURE__ */ new Map);let s=o.get(i);if(s||o.set(i,s=/* @__PURE__ */ new Set),s.has(e.oldValue))continue;s.add(e.oldValue);for(let r of n)r.state&&de(t,r.selector)&&!S(t)&&r.state(t,{attribute:i,oldValue:e.oldValue,value:a});continue}for(let t of e.addedNodes)if(t instanceof HTMLElement&&t.isConnected)for(let e of n){if(!e.enter)continue;let n=de(t,e.selector);if(ue.has(e.selector))continue;let r=[...n?[t]:[],...t.querySelectorAll(e.selector)];for(let t of r)S(t)||e.enter(t)}}}function Te(e,t){let n=D().some(e=>e.content);t.observe(e,{attributes:!0,attributeFilter:[...C,...D().some(e=>e.name===`divider`)?[`data-resize-handle-active`]:[]],attributeOldValue:!0,childList:n||D().some(e=>e.enter),characterData:n,characterDataOldValue:n,subtree:!0})}function Ee(e,t){let n=D();for(let[e,r]of t)n.includes(e)||(r(),t.delete(e));for(let r of n)r.watch&&!t.has(r)&&t.set(r,r.watch(e))}function De(){let e={capture:!0,passive:!0};document.addEventListener(`pointerdown`,_e,e),document.addEventListener(`pointerup`,ve,e),document.addEventListener(`pointercancel`,ve,e),document.addEventListener(`keydown`,be,e),document.addEventListener(`keyup`,xe,e),se=[()=>{document.removeEventListener(`pointerdown`,_e,e),document.removeEventListener(`pointerup`,ve,e),document.removeEventListener(`pointercancel`,ve,e),document.removeEventListener(`keydown`,be,e),document.removeEventListener(`keyup`,xe,e),M=void 0;for(let e of j.keys())N(e,!0)},s(e=>{if(e){M=void 0;for(let e of j.keys())N(e,!0)}})]}function P(e,t){if(typeof document>`u`)return()=>{};let n=te();return n?(re(n),n.install(e,t.effects,o)):(ne(Oe),ke(e,t.effects))}const Oe={define:ie,install:ke};function ke(e,t,n=o){let r=new Set(D().map(e=>e.name));for(let e of t)r.has(e.name)||ie(e,n);if(!A){De();let e=new MutationObserver((e,t)=>we(e.concat(t.takeRecords())));A=e,se.push(oe(()=>{for(let[t,{watchers:n}]of k)Te(t,e),Ee(t,n)}))}let i=k.get(e);if(i)i.installs++;else{let t=/* @__PURE__ */ new Map;Te(e,A),k.set(e,{installs:1,watchers:t}),Ee(e,t)}let a=!1;return()=>{if(a)return;a=!0;let t=k.get(e);if(!t||--t.installs>0)return;k.delete(e);let n=A,r=n.takeRecords();n.disconnect();for(let e of t.watchers.values())e();if(k.size){for(let e of k.keys())Te(e,n);r.length&&queueMicrotask(()=>{if(A!==n)return;let e=[...k.keys()];we(r.filter(t=>e.some(e=>e.contains(t.target))))});return}A=void 0;for(let e of se)e();se=[]}}function Ae(e,t,n){let r=e.cloneNode(!0);for(let e of[r,...r.querySelectorAll(`*`)])for(let t of[`id`,`role`,`tabindex`,`hidden`,`inert`,`popover`,`data-ending-style`,`data-starting-style`,`aria-live`])e.removeAttribute(t);return r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`data-motion`,`none`),r instanceof HTMLElement&&(r.inert=!0),r.style.pointerEvents=`none`,t.insertBefore(r,n?.parentNode===t?n:null),r}function je(e,t){Object.assign(e.style,{position:`fixed`,inset:`auto`,left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,margin:`0`,boxSizing:`border-box`,transform:`none`,translate:`none`,zIndex:`2147483647`});let n=e.getBoundingClientRect();Math.abs(n.left-t.left)>.5&&(e.style.left=`${2*t.left-n.left}px`),Math.abs(n.top-t.top)>.5&&(e.style.top=`${2*t.top-n.top}px`)}function Me(e,t){return window.setTimeout(t,e*h())}function Ne(e,t,n,r){let i=(e,t,n)=>3*t*e*(1-e)**2+3*n*e**2*(1-e)+e**3;return a=>{if(a<=0||a>=1)return a<=0?0:1;let o=0,s=1,c=a;for(let t=0;t<24;t++)i(c,e,n)<a?o=c:s=c,c=(o+s)/2;return i(c,t,r)}}const Pe=e=>e;function Fe(e,t,n,r,i){let a=(n.delay??0)/1e3,s=n.duration/1e3,c=n.ease??Pe,l=o(),u=0;return{stop:y(n=>{u+=n;let d=!l&&o()||u>=a+s?1:s>0?Math.max(0,(u-a)/s):0;return r(e+(t-e)*c(d)),d<1||(i?.(),!1)})}}function Ie(e,t,n=Pe,r=0){let i=()=>{},a=new Promise(e=>i=e),o=Fe(0,1,{duration:e*1e3,delay:r*1e3,ease:n},t,()=>i(!0));return{done:a,stop:()=>{o.stop(),i(!1)}}}const Le={stiffness:900,damping:40},Re={stiffness:380,damping:14},ze=`:is(button, a[href], summary, input:is([type=button], [type=submit], [type=reset], [type=checkbox], [type=radio]), ${[`button`,`link`,`tab`,`radio`,`menuitem`,`menuitemradio`,`menuitemcheckbox`,`option`,`checkbox`].map(e=>`[role=${e}]`).join(`, `)}):not(:disabled, [aria-disabled="true"], [role=switch])`,Be=/* @__PURE__ */ new WeakMap,Ve=e=>e>=40?.03:e>=32?.04:.05;function He(e){let t=e.dataset.motionPressTarget?e.closest(e.dataset.motionPressTarget):null;if(t instanceof HTMLElement)return{target:t,amount:Ve(t.offsetHeight)};let n=e.firstElementChild;return e.childElementCount===1&&!e.textContent?.trim()&&(n instanceof HTMLElement||n instanceof SVGElement)&&n.matches(`svg, img, .iconify, [data-slot=icon], [data-slot$=Icon], [data-slot=swap-icon]`)?{target:n,amount:.15}:{target:e,amount:Ve(e.offsetHeight)}}function Ue(e){let t=e.transitionDuration.split(`,`);return e.transitionProperty.split(`,`).some((e,n)=>/^\s*(?:scale|all)\s*$/.test(e)&&Number.parseFloat(t[n%t.length])>0)}function We(e,t,n){let{left:r,right:i,top:a,bottom:o,width:s,height:c}=e;return Math.min(t.clientX-r,i-t.clientX)<=s*n||Math.min(t.clientY-a,o-t.clientY)<=c*n}const Ge={name:`press`,selector:ze,press(e,t){let{target:n,amount:r}=He(e),i=getComputedStyle(n);if(Ue(i)||i.display===`contents`||i.display===`inline`&&n===e&&!(e instanceof HTMLInputElement))return;let a;if(n===e&&`pointerId`in t&&(a=e.getBoundingClientRect(),We(a,t,r)))return;let o=Be.get(n);if(!o){let e={amount:r,spring:x(0,t=>{O(n,{scale:t?String(1-e.amount*t):null})},Le)};o=e,Be.set(n,o)}o.amount=r;let{spring:s}=o;s.to(1,{preset:Le});let c=!1,l=()=>{c||(c=!0,s.set(0))};return{move:a?e=>{We(a,e,r)&&l()}:void 0,release:()=>{c||s.to(0,{preset:Re})},cancel:l}}},F={stiffness:480,damping:36},Ke={stiffness:380,damping:26},I={stiffness:440,damping:32},qe=.24,Je=.14,Ye=.15,L=/* @__PURE__ */ new WeakMap,R=/* @__PURE__ */ new Set,Xe=/* @__PURE__ */ new Set;let z;function Ze(e){let t=getComputedStyle(e);return t.clipPath===`inset(50%)`||t.clip===`rect(0px, 0px, 0px, 0px)`}function Qe(e){return e.matches(`[role=tooltip]`)?e:e.querySelector(`:scope > [role=tooltip]`)}const $e=`[data-motion-appear]`;function et(e){if(e.matches($e))return e;if(e.matches(`[role=tooltip]`))return Ze(e)?e.parentElement:e;let t=e.querySelector(`:scope > [role=tooltip]`);return t&&Ze(t)?e:null}function tt(e){let t=e.getAttribute(`data-state`);return t===null?!e.hidden&&!e.hasAttribute(`data-closed`):t!==`closed`}function nt(e){let t=e.getAttribute(`data-motion-appear`);if(t!==null){let n=e.parentElement;return!t||!n?null:n.closest(t)??[...n.children].find(n=>n!==e&&n.matches(t))??null}let n=Qe(e)?.id;return n?e.getRootNode().querySelector(`[aria-describedby~="${CSS.escape(n)}"]`)??document.querySelector(`[aria-describedby~="${CSS.escape(n)}"]`):null}function rt(e){let t=[`translate`,`scale`,`clip-path`,`opacity`].map(t=>[t,e.style.getPropertyValue(t)]);O(e,{translate:null,scale:null,"clip-path":null});let n=e.getBoundingClientRect();for(let[n,r]of t)r&&e.style.setProperty(n,r);return n}function it(e,t,n){let r=e.getAttribute(`data-side`);if(r===`top`||r===`bottom`||r===`left`||r===`right`)return r;if(!n)return`top`;let i=n.left+n.width/2-(t.left+t.width/2),a=n.top+n.height/2-(t.top+t.height/2);return Math.abs(a)>=Math.abs(i)?a>0?`top`:`bottom`:i>0?`left`:`right`}function at(e,t,n){return e===`top`?n?.top??t.bottom+8:e===`bottom`?n?.bottom??t.top-8:e===`left`?n?.left??t.right+8:n?.right??t.left-8}const ot=e=>e===`top`||e===`bottom`;function st(e){let{rest:t,side:n,edge:r}=e;return n===`top`?r+t.height/2:n===`bottom`?r-t.height/2:n===`left`?r+t.width/2:r-t.width/2}function B(e){return[...e.element.children].filter(t=>t instanceof HTMLElement&&t!==e.old?.element&&!t.matches(`[role=tooltip]`)&&!Ze(t))}function ct(e){return[...e.element.childNodes].filter(t=>t.nodeType===Node.TEXT_NODE||t instanceof Element&&t!==e.old?.element&&!t.matches(`[role=tooltip]`)&&!Ze(t)).map(e=>e.textContent??``).join(``)}function lt(e){return[...e.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())}const V=e=>`${Math.round(e*100)/100}px`;function H(e){let{element:t,rest:n,side:r,edge:i,origin:a}=e,o=Math.max(1,e.width.value),s=e.mode===`clip`&&o<n.width,c=s?1:o/n.width,l=e.x.value-o/2,u=s?e.x.value-(n.left+n.width/2):l-n.left-a*(1-c),d=e.y.value-(n.top+n.height/2),f=[-40,-40,-40,-40];r===`top`&&(f[2]=e.y.value+n.height/2-i),r===`bottom`&&(f[0]=i-(e.y.value-n.height/2)),r===`left`&&(f[1]=(e.x.value+o/2-i)/c),r===`right`&&(f[3]=(i-(e.x.value-o/2))/c);let p=f.some(e=>e>0),m=null;if(s){let t=(n.width-o)/2;m=`inset(${[Math.max(0,f[0]),t+Math.max(0,f[1]),Math.max(0,f[2]),t+Math.max(0,f[3])].map(V).join(` `)} round ${e.radius})`}else p&&(m=`inset(${f.map(V).join(` `)})`);O(t,{translate:Math.abs(u)>.01||Math.abs(d)>.01||e.old?`${V(u)} ${V(d)}`:null,scale:Math.abs(c-1)>.001?`${c} 1`:null,"clip-path":m,opacity:e.fade.active||e.fade.value<1?String(e.fade.value):null});let h=Math.abs(c-1)>.001?`${1/c} 1`:null,g=e.label.value;for(let t of B(e))O(t,{scale:h,opacity:g<1?String(g):null,filter:g<1?`blur(${V((1-g)*6)})`:null});if(e.old){let t=e.old.spring.value;O(e.old.element,{scale:h,opacity:String(t),filter:`blur(${V((1-t)*5)})`})}}function U(e){if(!(e.holding||e.timers.size||[e.x,e.y,e.width,e.label,e.fade,e.old?.spring].some(e=>e?.active))){e.old?.element.remove(),e.old=void 0,O(e.element,{translate:null,scale:null,"clip-path":null,opacity:null});for(let t of B(e))O(t,{scale:null,opacity:null,filter:null});e.done?.()}}function ut(e,t,n){let r=getComputedStyle(e),i=it(e,t,n),a={element:e,rest:t,origin:Number.parseFloat(r.transformOrigin)||t.width/2,side:i,edge:at(i,t,n),trigger:n,mode:lt(e)||e.matches($e)?`clip`:`scale`,handoff:!e.matches($e),radius:r.borderRadius||`0px`,timers:/* @__PURE__ */ new Set,holding:!0},o=()=>{H(a),U(a)};return a.x=x(t.left+t.width/2,o,F),a.y=x(t.top+t.height/2,o,F),a.width=x(t.width,o,I),a.label=x(1,o),a.fade=x(1,o),a}function W(e,t,n){let r=Me(t,()=>{e.timers.delete(r),n(),U(e)});e.timers.add(r)}function dt(e){for(let t of e.timers)clearTimeout(t);e.timers.clear();for(let t of[e.x,e.y,e.width,e.label,e.fade,e.old?.spring])t?.stop()}function G(e){dt(e),Xe.delete(e),z===e&&(z=void 0),e.element.closest(`[data-motion=none]`)?.remove()}function ft(e){if(e){for(let e of Xe)G(e);for(let e of R){let t=L.get(e)?.box;t&&(dt(t),t.holding=!0,t.x.set(t.rest.left+t.rest.width/2),t.y.set(t.rest.top+t.rest.height/2),t.width.set(t.rest.width),t.label.set(1),t.fade.set(1),t.holding=!1,U(t))}}}function pt(e,t){let n=e.trigger,r=t.trigger;return!n||!r||e.side!==t.side?!1:ot(t.side)?n.top<r.bottom&&r.top<n.bottom:n.left<r.right&&r.left<n.right}function mt(e){return ot(e.side)?e.y:e.x}function ht(e,t,n){if(!t.length)return;let r=document.createElement(`span`);r.setAttribute(`aria-hidden`,`true`),Object.assign(r.style,{position:`absolute`,inset:`0`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`inherit`,pointerEvents:`none`,whiteSpace:`nowrap`}),r.append(...t),e.element.append(r);let i=x(n,()=>{H(e),U(e)});e.old={element:r,spring:i},i.to(0,{tween:.15})}function gt(e){return e.mode===`clip`?[...e.element.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.cloneNode()):B(e).map(e=>{let t=e.cloneNode(!0);return t.style.removeProperty(`scale`),t.style.removeProperty(`opacity`),t.style.removeProperty(`filter`),t})}function _t(e,t){let n=t.trigger?.getBoundingClientRect(),r=rt(e),i=ut(e,r,n);t.box=i,t.text=ct(i),t.label=gt(i),O(e,{opacity:null});let a=i.handoff&&z&&pt(z,i)?z:void 0;if(a&&(z=void 0),o()){a&&vt(a,!0),i.fade.set(0),i.holding=!1,i.fade.to(1,{tween:Ye});return}if(a){let e=gt(a),t={x:[a.x.value,a.x.velocity],y:[a.y.value,a.y.velocity],width:[a.width.value,a.width.velocity]},n=a.old?0:a.label.value;G(a),i.x.set(t.x[0]),i.y.set(t.y[0]),i.width.set(t.width[0]),i.label.set(0),ht(i,e,n),i.x.to(r.left+r.width/2,{preset:F,velocity:t.x[1]}),i.y.to(r.top+r.height/2,{preset:F,velocity:t.y[1]}),i.width.to(r.width,{preset:I,velocity:t.width[1]}),W(i,40,()=>i.label.to(1,{tween:qe})),i.holding=!1,H(i);return}mt(i).set(st(i)),i.width.set(Math.min(30,r.width)),i.label.set(0),H(i),mt(i).to(ot(i.side)?r.top+r.height/2:r.left+r.width/2,{preset:Ke}),W(i,120,()=>{i.width.to(r.width,{preset:I}),W(i,70,()=>i.label.to(1,{tween:qe}))}),i.holding=!1}function vt(e,t){if(Xe.add(e),e.holding=!1,t){e.done=()=>G(e),e.fade.to(0,{tween:Ye});return}e.handoff&&(z=e),e.old&&e.old.spring.to(0,{tween:Je}),e.label.to(0,{tween:Je}),e.width.to(Math.min(30,e.rest.width),{preset:I}),W(e,90,()=>{z===e&&(z=void 0),mt(e).to(st(e),{preset:Ke})}),W(e,520,()=>G(e))}function yt(e,t){if(!t.open)return;t.open=!1,R.delete(e),t.stopWatch?.(),t.stopWatch=void 0,R.size||At();let n=t.box;if(t.box=void 0,O(e,{opacity:null}),!n)return;let r=t.root.parentNode??t.parent,i=r?.isConnected?Ae(t.root,r,t.root.isConnected?t.root.nextSibling:t.next):void 0,a={x:n.x,y:n.y,width:n.width,label:n.label,fade:n.fade},s=Object.fromEntries(Object.entries(a).map(([e,t])=>[e,[t.value,t.velocity]])),c=n.old?.spring.value;dt(n),n.old?.element.remove(),O(e,{translate:null,scale:null,"clip-path":null,opacity:null});for(let e of B(n))O(e,{scale:null,opacity:null,filter:null});if(!i)return;let l=bt(t.root,e).reduce((e,t)=>e?.children[t],i);if(!(l instanceof HTMLElement)){i.remove();return}e.hasAttribute(`popover`)&&(O(l,{scale:null}),je(l,n.rest));let u=ut(l,n.rest,void 0);Object.assign(u,{side:n.side,edge:n.edge,trigger:n.trigger,mode:n.mode,origin:n.origin,radius:n.radius,handoff:n.handoff});let d=l.querySelector(`:scope > [aria-hidden=true][style*=absolute]`);c!==void 0&&d&&(u.old={element:d,spring:x(c,()=>H(u))});for(let e of[`x`,`y`,`width`,`label`,`fade`])u[e].set(s[e][0]);H(u);for(let e of[`x`,`y`,`width`])s[e][1]&&u[e].to(s[e][0],{velocity:s[e][1]});vt(u,o())}function bt(e,t){let n=[];for(let r=t;r!==e&&r.parentElement;r=r.parentElement)n.unshift([...r.parentElement.children].indexOf(r));return n}function xt(e,t,n,r=20){requestAnimationFrame(()=>{if(!t.open||!e.isConnected)return;let i=e.closest(`[data-reka-popper-content-wrapper]`);if(r>0&&i?.style.transform.includes(`-200%`))return xt(e,t,n,r-1);n()})}function St(e,t){let n=()=>{r.disconnect();let t=e;for(;t;){let e=t.parentNode;e&&r.observe(e,{childList:!0}),t=e??(t instanceof ShadowRoot?t.host:null)}},r=new MutationObserver(()=>{e.isConnected?(t.parent=t.root.parentNode,t.next=t.root.nextSibling,n()):yt(e,t)});return n(),()=>r.disconnect()}function Ct(e){let t=L.get(e);if(t?.open)return;let n=nt(e);if(n&&S(n))return;let r=e.closest(`[data-reka-popper-content-wrapper]`)??e;t={open:!0,root:r,parent:r.parentNode,next:r.nextSibling,text:``,label:[],trigger:n},L.set(e,t),R.add(e),kt(),O(e,{opacity:`0`}),t.stopWatch=St(e,t);let i=t;xt(e,t,()=>_t(e,i))}let wt=0;function Tt(){wt=0;for(let e of R){let t=L.get(e),n=t?.box;if(!t||!n)continue;let r=rt(e),i=ct(n);if(!(Math.abs(r.left-n.rest.left)>1||Math.abs(r.top-n.rest.top)>1||Math.abs(r.width-n.rest.width)>1)&&i===t.text)continue;let a=i===t.text?[]:t.label;t.trigger=nt(e)??t.trigger;let s=t.trigger?.getBoundingClientRect();if(t.text=i,t.label=gt(n),n.rest=r,n.side=it(e,r,s),n.edge=at(n.side,r,s),o()){n.x.set(r.left+r.width/2),n.y.set(r.top+r.height/2),n.width.set(r.width);continue}n.x.to(r.left+r.width/2,{preset:F}),n.y.to(r.top+r.height/2,{preset:F}),n.width.to(r.width,{preset:I}),a.length&&(n.old?.spring.stop(),n.old?.element.remove(),ht(n,a,n.label.value),n.label.set(0),W(n,40,()=>n.label.to(1,{tween:qe})))}}function Et(){wt||=requestAnimationFrame(Tt)}let Dt=!1,Ot;function kt(){Ot??=s(ft),!Dt&&(Dt=!0,document.addEventListener(`pointerover`,Et,{capture:!0,passive:!0}),document.addEventListener(`focusin`,Et,{capture:!0,passive:!0}))}function At(){Dt=!1,cancelAnimationFrame(wt),wt=0,document.removeEventListener(`pointerover`,Et,{capture:!0}),document.removeEventListener(`focusin`,Et,{capture:!0})}const jt={enter(e){et(e)===e&&tt(e)&&Ct(e)},state(e){if(et(e)!==e)return;let t=L.get(e);tt(e)?Ct(e):t&&yt(e,t)}};({...jt});const Mt={name:`appear`,selector:$e,...jt};function Nt(e){let t=e.cloneNode(!0);t.inert=!0,t.setAttribute(`aria-hidden`,`true`);for(let e of[t,...t.querySelectorAll(`[id], [name], [form], input, button, select, textarea, fieldset`)])e.removeAttribute(`id`),e.removeAttribute(`name`),e.removeAttribute(`form`),e.matches(`input, button, select, textarea, fieldset`)&&e.setAttribute(`disabled`,``);return t}const Pt={stiffness:380,damping:26},Ft={stiffness:260,damping:28},It=.9,Lt=Ne(.5,0,.75,0),Rt=`data-motion-ghost`,K=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function zt(e){return e.bottom>0&&e.right>0&&e.top<innerHeight&&e.left<innerWidth&&e.width+e.height>0}function Bt(e){return[...e.children].filter(e=>e instanceof HTMLElement&&!e.hasAttribute(Rt))}function Vt(e,t={}){let n=t.items??Bt,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new Map,s=!1;function l(e){if(!e)return{x:0,y:0};let t=1-e.grow.value;return{x:e.x.value+e.from.x*t,y:e.y.value+e.from.y*t}}function u(e,t){let{x:n,y:i,grow:a,from:o}=t;if(!n.active&&!i.active&&!a.active&&n.value===0&&i.value===0&&a.value===1){O(e,{translate:null,scale:null,opacity:null}),s||r.delete(e);return}let{x:c,y:u}=l(t),d=o.scale+(1-o.scale)*a.value;O(e,{translate:c||u?`${c.toFixed(2)}px ${u.toFixed(2)}px`:null,scale:d===1?null:d.toFixed(4),opacity:a.value>=1?null:Math.max(0,Math.min(1,a.value)).toFixed(3)})}function d(e){let t=r.get(e);if(t)return t;let n=()=>t&&u(e,t);return t={x:x(0,n,c.snappy),y:x(0,n,c.snappy),grow:x(1,n,Pt),from:{x:0,y:0,scale:1}},r.set(e,t),t}function f(e){let t=r.get(e);t&&(r.delete(e),t.x.stop(),t.y.stop(),t.grow.stop(),O(e,{translate:null,scale:null,opacity:null}))}function p(e,t){let n=e.velocity;e.set(t),e.to(0,{preset:c.snappy,velocity:n})}function m(t,n,r){if(!zt(n))return;let a=e.getBoundingClientRect();getComputedStyle(e).position===`static`&&(e.style.position=`relative`);let s=Nt(t);s.setAttribute(Rt,``),Object.assign(s.style,{boxSizing:`border-box`,height:`${n.height}px`,left:`${n.left-a.left-e.clientLeft+e.scrollLeft}px`,margin:`0`,pointerEvents:`none`,position:`absolute`,top:`${n.top-a.top-e.clientTop+e.scrollTop}px`,width:`${n.width}px`}),O(s,{translate:null,scale:null,opacity:null,filter:null}),e.append(s);let c={element:s,stop:()=>{}},l=()=>{c.stop(),s.remove(),i.delete(c)};if(i.add(c),o()){let e=Ie(.15,e=>O(s,{opacity:(1-e).toFixed(3)}));c.stop=e.stop,e.done.then(l);return}if(r){let e=K(r.getBoundingClientRect()),t=K(n),i=Ie(.32,n=>{O(s,{translate:`${((e.x-t.x)*n).toFixed(2)}px ${((e.y-t.y)*n).toFixed(2)}px`,scale:(1-.8*n).toFixed(4),opacity:(1-n).toFixed(3),filter:n>0?`blur(${(3*n).toFixed(2)}px)`:null})},Lt);c.stop=i.stop,i.done.then(l);return}let u=x(1,e=>{O(s,{scale:(It+.09999999999999998*e).toFixed(4),opacity:Math.max(0,e).toFixed(3)}),e<.02&&l()},Ft);c.stop=()=>u.stop(),u.to(0)}return{measure(){a=/* @__PURE__ */ new Map;for(let t of n(e)){let e=t.getBoundingClientRect();if(!e.width&&!e.height)continue;let n=K(e),i=l(r.get(t));a.set(t,{x:n.x-i.x,y:n.y-i.y,rect:e})}},play(i={}){let c=a;a=/* @__PURE__ */ new Map;let u=S(e),h=n(e),g=new Set(h),_=h.map(e=>{let t=e.getBoundingClientRect(),n=l(r.get(e)),i=K(t);return{element:e,rect:t,layout:{x:i.x-n.x,y:i.y-n.y}}}),v=_.map(({element:e})=>{if(!c.has(e)&&i.origin)return(typeof i.origin==`function`?i.origin(e):i.origin)?.getBoundingClientRect()});for(let[e,{rect:n}]of c)g.has(e)||(f(e),!u&&!t.movesOnly&&!e.hasAttribute(`data-motion-leaving`)&&m(e,n,i.target));s=!0,_.forEach(({element:e,rect:n,layout:r},i)=>{if(u)return f(e);let a=c.get(e);if(a){let t=a.x-r.x,i=a.y-r.y;if(Math.abs(t)<.5&&Math.abs(i)<.5)return;if(!zt(a.rect)&&!zt(n))return f(e);let o=d(e);p(o.x,o.x.value+t),p(o.y,o.y.value+i);return}if(!zt(n)||t.movesOnly)return;let s=d(e),l=v[i];if(o())s.from={x:0,y:0,scale:1};else if(l){let e=K(l),t=Math.min(1,Math.max(.2,Math.min(l.width/(n.width||1),l.height/(n.height||1))));s.from={x:e.x-r.x,y:e.y-r.y,scale:t}}else s.from={x:0,y:0,scale:It};s.grow.set(0),s.grow.to(1,o()?{tween:.15}:{preset:Pt})}),s=!1},destroy(){for(let e of r.keys())f(e);for(let e of i)e.stop(),e.element.remove();i.clear(),a=/* @__PURE__ */ new Map}}}const Ht=`vitehub`,Ut=[`comment`];function Wt(e,t){let n=new URLSearchParams(e);if(n.has(`vitehub`)||Ut.some(e=>n.has(e)))return!0;let r=t.split(`;`).map(e=>e.trim());return r.includes(`vitehub-tools=1`)?!0:r.includes(`vitehub_session=1`)&&!r.some(e=>e.startsWith(`vitehub-tools=`))}const Gt=`/_vitehub/page/tools`,Kt=`button{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:var(--vitehub-pill-justify,center);gap:4px;min-width:28px;height:28px;padding:0 8px;border-radius:8px;font:inherit;white-space:nowrap;color:var(--vitehub-pill-text);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition-property:background-color,color;transition-duration:150ms;transition-timing-function:cubic-bezier(.23,1,.32,1)}
|
|
2
|
-
@media(hover:hover){button:where(:not(:disabled):hover){background:var(--vitehub-pill-hover);color:var(--vitehub-pill-strong)}}
|
|
3
|
-
button[aria-pressed=true],button[aria-expanded=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text)}
|
|
4
|
-
:host([aria-busy=true]) button,button[aria-busy=true]{background:var(--vitehub-pill-on);color:var(--vitehub-pill-on-text);cursor:progress}
|
|
5
|
-
button:focus-visible{outline:2px solid var(--vitehub-pill-on);outline-offset:1px}
|
|
6
|
-
button svg{width:14px;height:14px;flex:none}
|
|
7
|
-
@media(any-pointer:coarse){button{min-width:44px;height:44px}}
|
|
8
|
-
@media(prefers-reduced-motion:reduce){button{transition:none}}`;function qt(e){let t=new URL(e,`http://localhost`).pathname,n=t.lastIndexOf(`/_vitehub/page/assets/`);return n===-1?Gt:`${t.slice(0,n)}${Gt}`}function q(e){return typeof e==`string`&&e?e:void 0}function Jt(e){if(typeof e!=`object`||!e)return;let t=q(Reflect.get(e,`id`)),n=q(Reflect.get(e,`script`));if(!t||!n)return;let r={id:t,label:q(Reflect.get(e,`label`))??t,icon:q(Reflect.get(e,`icon`))??``,script:n};Reflect.get(e,`lazy`)===!0&&(r.lazy=!0);let i=q(Reflect.get(e,`hotkey`));i&&(r.hotkey=i);let a=q(Reflect.get(e,`param`));return a&&(r.param=a),r}function Yt(e){if(typeof e!=`object`||!e)return;let t=q(Reflect.get(e,`name`)),n=q(Reflect.get(e,`signOut`));if(!t||!n?.startsWith(`/`)||n.startsWith(`//`)||n.includes(`\\`))return;let r={name:t,signOut:n},i=q(Reflect.get(e,`email`));i&&(r.email=i);let a=q(Reflect.get(e,`image`));return a&&/^https?:\/\//i.test(a)&&(r.image=a),Reflect.get(e,`via`)===`console`&&(r.via=`console`),r}function Xt(e){let t=typeof e==`object`&&e?Reflect.get(e,`tools`):void 0,n={tools:Array.isArray(t)?t.map(Jt).filter(e=>!!e):[]},r=typeof e==`object`&&e?Yt(Reflect.get(e,`account`)):void 0;return r&&(n.account=r),n}const J={effects:[Ge]},Zt=[[`0px`,`6px`],[`6px`,`0px`],[`calc(100% - 6px)`,`0px`],[`100%`,`6px`],[`100%`,`50%`],[`100%`,`50%`],[`100%`,`calc(100% - 6px)`],[`calc(100% - 6px)`,`100%`],[`6px`,`100%`],[`0px`,`calc(100% - 6px)`],[`0px`,`50%`],[`0px`,`50%`]],Qt=e=>e.map(([e,t])=>[`calc(50% + var(--vitehub-hex-w) * ${e})`,`calc(50% + var(--vitehub-hex-h) * ${t})`]),$t=Qt([[-.28,-.453],[-.208,-.5],[.208,-.5],[.28,-.453],[.488,-.047],[.488,.047],[.28,.453],[.208,.5],[-.208,.5],[-.28,.453],[-.488,.047],[-.488,-.047]]),en=Qt([[-.5,-.5],[-.5,-.5],[.5,-.5],[.5,-.5],[.5,0],[.5,0],[.5,.5],[.5,.5],[-.5,.5],[-.5,.5],[-.5,0],[-.5,0]]),tn=e=>`polygon(${e.map(([e,t])=>`${e} ${t}`).join(`,`)})`;function nn(e,t,n){let r=(1-n).toFixed(4),i=n.toFixed(4);return tn(e.map(([e,n],a)=>[`calc(${e} * ${r} + ${t[a][0]} * ${i})`,`calc(${n} * ${r} + ${t[a][1]} * ${i})`]))}const rn=tn(Zt),an=tn($t),on=tn(en),Y=e=>`calc(var(--start) + ${e} / 2 + (100% - var(--start) - var(--end) - ${e}) * var(--at) / 100)`,sn=`:host{all:initial;position:fixed;z-index:2147483001;pointer-events:none;filter:drop-shadow(0 8px 24px rgb(0 0 0/25%));color-scheme:dark;font:500 12px/1 ui-sans-serif,system-ui,sans-serif;color:#d4d4d4;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--vitehub-pill-text:#d4d4d4;--vitehub-pill-strong:#fafafa;--vitehub-pill-muted:#a3a3a3;--vitehub-pill-hover:rgb(255 255 255/8%);--vitehub-pill-on:#fafafa;--vitehub-pill-on-text:#0a0a0a;--vitehub-pill-line:rgb(255 255 255/12%);--vitehub-pill-surface:#111;--vitehub-pill-flow:row;--vitehub-hex-h:24px;--vitehub-hex-w:calc(var(--vitehub-hex-h) * 10 / 9);--vitehub-pill-fade:opacity 160ms ease-out 80ms,visibility 0s;--vitehub-pill-fade-end:opacity 160ms ease-out 120ms,visibility 0s;--at:50;--margin:16px;--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
|
|
9
|
-
:host([collapsed]){--margin:2px;--vitehub-pill-fade:opacity 80ms ease-out,visibility 0s 80ms;--vitehub-pill-fade-end:opacity 40ms ease-out,visibility 0s 40ms}
|
|
10
|
-
:host(:is([edge=top],[edge=bottom])){left:${Y(`0px`)};--start:max(var(--margin),var(--safe-left));--end:max(var(--margin),var(--safe-right));--x:calc(var(--at) * -1%)}
|
|
11
|
-
:host(:is([edge=left],[edge=right])){top:${Y(`0px`)};--start:max(var(--margin),var(--safe-top));--end:max(var(--margin),var(--safe-bottom));--y:calc(var(--at) * -1%);--vitehub-pill-flow:column;--vitehub-pill-justify:flex-start}
|
|
12
|
-
:host([edge=bottom]){bottom:max(16px,var(--safe-bottom))}
|
|
13
|
-
:host([edge=top]){top:max(16px,var(--safe-top))}
|
|
14
|
-
:host([edge=right]){right:max(16px,var(--safe-right))}
|
|
15
|
-
:host([edge=left]){left:max(16px,var(--safe-left))}
|
|
16
|
-
:host([collapsed]:is([edge=top],[edge=bottom])){left:${Y(`var(--vitehub-hex-w)`)};--x:-50%}
|
|
17
|
-
:host([collapsed]:is([edge=left],[edge=right])){top:${Y(`var(--vitehub-hex-h)`)};--y:-50%}
|
|
18
|
-
:host([collapsed][edge=bottom]){bottom:calc(max(2px,var(--safe-bottom)) + var(--vitehub-hex-h) / 2);--y:50%}
|
|
19
|
-
:host([collapsed][edge=top]){top:calc(max(2px,var(--safe-top)) + var(--vitehub-hex-h) / 2);--y:-50%}
|
|
20
|
-
:host([collapsed][edge=right]){right:calc(max(2px,var(--safe-right)) + var(--vitehub-hex-w) / 2);--x:50%}
|
|
21
|
-
:host([collapsed][edge=left]){left:calc(max(2px,var(--safe-left)) + var(--vitehub-hex-w) / 2);--x:-50%}
|
|
22
|
-
:host{transform:translate(var(--x,0),var(--y,0))}
|
|
23
|
-
:host([dragging]){transition:none;cursor:grabbing;user-select:none;-webkit-user-select:none}
|
|
24
|
-
div{position:relative;box-sizing:border-box;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;scrollbar-width:none;display:flex;flex-direction:var(--vitehub-pill-flow);align-items:center;gap:8px;padding:4px;border:1px solid var(--vitehub-pill-line);border-radius:12px;background:rgb(17 17 17/92%);pointer-events:auto;clip-path:${rn};transition:background-color 150ms ease-out}
|
|
25
|
-
:host(:is([edge=left],[edge=right])) div{display:grid;grid-template-columns:auto 1fr;align-items:stretch;gap:8px 2px}
|
|
26
|
-
:host([collapsed]) div{clip-path:${an}}
|
|
27
|
-
@media(hover:hover){:host([collapsed]) div:hover{background:rgb(38 38 38/94%)}}
|
|
28
|
-
:host([dragging]) div{transition:none}
|
|
29
|
-
::slotted(*){flex-shrink:0;display:flex;flex-direction:var(--vitehub-pill-flow);align-items:center;gap:2px;transition:var(--vitehub-pill-fade)}
|
|
30
|
-
:host(:is([edge=left],[edge=right])) ::slotted(*){grid-column:1/-1;align-items:stretch}
|
|
31
|
-
::slotted([hidden]){display:none!important}
|
|
32
|
-
:host([collapsed]) ::slotted(*),:host([collapsed]) .exit{opacity:0;visibility:hidden}
|
|
33
|
-
.tabs{position:absolute;display:flex;width:max-content;height:max-content;max-width:calc(100vw - max(16px,var(--safe-left)) - max(16px,var(--safe-right)));max-height:calc(100dvh - max(16px,var(--safe-top)) - max(16px,var(--safe-bottom)));gap:4px;overflow:auto;pointer-events:auto}
|
|
34
|
-
:host([collapsed]) .tabs{visibility:hidden}
|
|
35
|
-
:host(:is([edge=top],[edge=bottom])) .tabs{left:calc(var(--at) * 1%);translate:calc(var(--at) * -1%) 0;max-height:calc(100dvh - max(16px,var(--safe-top)) - max(16px,var(--safe-bottom)) - 100%)}
|
|
36
|
-
:host(:is([edge=left],[edge=right])) .tabs{top:calc(var(--at) * 1%);translate:0 calc(var(--at) * -1%);max-width:calc(100vw - max(16px,var(--safe-left)) - max(16px,var(--safe-right)) - 100%);flex-direction:column}
|
|
37
|
-
:host([edge=bottom]) .tabs{bottom:100%;align-items:safe flex-end}
|
|
38
|
-
:host([edge=top]) .tabs{top:100%;align-items:flex-start}
|
|
39
|
-
:host([edge=left]) .tabs{left:100%;align-items:flex-start}
|
|
40
|
-
:host([edge=right]) .tabs{right:100%;align-items:safe flex-end}
|
|
41
|
-
::slotted([slot=tab]){padding:3px;border:1px solid var(--vitehub-pill-line);background:rgb(17 17 17/92%);pointer-events:auto}
|
|
42
|
-
:host([edge=bottom]) ::slotted([slot=tab]){border-bottom:0;border-radius:10px 10px 0 0}
|
|
43
|
-
:host([edge=top]) ::slotted([slot=tab]){border-top:0;border-radius:0 0 10px 10px}
|
|
44
|
-
:host([edge=left]) ::slotted([slot=tab]){border-left:0;border-radius:0 10px 10px 0}
|
|
45
|
-
:host([edge=right]) ::slotted([slot=tab]){border-right:0;border-radius:10px 0 0 10px}
|
|
46
|
-
${Kt}
|
|
47
|
-
button{flex-shrink:0;padding:0;justify-content:center}
|
|
48
|
-
.exit{position:sticky;right:0;bottom:0;transition:background-color 150ms,color 150ms,var(--vitehub-pill-fade-end)}
|
|
49
|
-
:host(:is([edge=left],[edge=right])) .mark{justify-self:start}
|
|
50
|
-
:host(:is([edge=left],[edge=right])) .exit{grid-area:1/2;justify-self:end;top:0;bottom:auto}
|
|
51
|
-
.mark{position:sticky;left:0;top:0;z-index:1;cursor:grab}
|
|
52
|
-
:host([dragging]) .mark{cursor:grabbing}
|
|
53
|
-
.mark,.mark[aria-expanded=true]{background:none;color:var(--vitehub-pill-strong)}
|
|
54
|
-
@media(hover:hover){.mark:hover{background:var(--vitehub-pill-hover)}}
|
|
55
|
-
.mark svg{width:16px;height:16px;transition:opacity 160ms ease-out 120ms}
|
|
56
|
-
:host([collapsed]) .mark svg{opacity:0;transform:scale(.6);transition-duration:40ms;transition-delay:0s}
|
|
57
|
-
:host([collapsed]) .mark:is(:hover,:active){background:none}
|
|
58
|
-
:host([collapsed]) .mark{transform:translate(var(--vitehub-mark-x,0),var(--vitehub-mark-y,0))}
|
|
59
|
-
:host([collapsed]) .mark::before{content:"";position:absolute;inset:-8px}
|
|
60
|
-
:host([fold=mark]){transition:filter 240ms ease-out}
|
|
61
|
-
:host([fold=mark][collapsed]){filter:drop-shadow(0 1px 2px rgb(0 0 0/25%))}
|
|
62
|
-
:host([fold=mark]:not([dragging])) div{transition:background-color 120ms ease-out,border-color 120ms ease-out}
|
|
63
|
-
:host([fold=mark][collapsed]) div,:host([fold=mark][collapsed]) div:hover{clip-path:${on};background-color:transparent;border-color:transparent}
|
|
64
|
-
:host([fold=mark]) .mark{transition:background-color 150ms ease-out,color 150ms ease-out}
|
|
65
|
-
:host([fold=mark]) .mark svg{transition:none}
|
|
66
|
-
:host([fold=mark][collapsed]) .mark svg{opacity:1;transform:scale(1.5)}
|
|
67
|
-
@media(any-pointer:coarse){:host{--vitehub-hex-h:40px}:host([fold=mark][collapsed]) .mark svg{transform:scale(2.5)}}
|
|
68
|
-
@media(prefers-reduced-motion:reduce){:host,div,::slotted(*),.exit,.mark svg,:host([fold=mark]) :is(div,.mark){transition:none}}`;function cn(e,t,n){let r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(let[t,i]of Object.entries({viewBox:e,"aria-hidden":`true`,...n}))r.setAttribute(t,i);let i=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return i.setAttribute(`d`,t),r.append(i),r}const ln=[`top`,`right`,`bottom`,`left`];function un(e){return ln.some(t=>t===e)}function dn(e){let t=typeof e==`object`&&e?Reflect.get(e,`edge`):void 0,n=typeof e==`object`&&e?Reflect.get(e,`at`):void 0;return un(t)&&typeof n==`number`&&n>=0&&n<=100?{edge:t,at:n}:void 0}function fn(e){try{return dn(JSON.parse(localStorage.getItem(e)??`null`))}catch{return}}function pn(e,t,n,r){let i=Math.min(70,r/4),a=Math.atan2(t-r/2,e-n/2),o=Math.atan2(i-r/2,-n/2),s=Math.atan2(i-r/2,n/2),c=Math.atan2(r/2-i,n/2),l=Math.atan2(r/2-i,-n/2);return a>=o&&a<=s?`top`:a>s&&a<c?`right`:a>=c&&a<=l?`bottom`:`left`}function mn(e,t,n,r,i){let a=i-n-r-t,o=a>0?Math.min(100,Math.max(0,(e-n-t/2)/a*100)):50;return o<2?0:o>98?100:Math.abs(o-50)<3?50:Math.round(o*10)/10}const hn=/* @__PURE__ */ new WeakMap;function gn(e){let t=e?getComputedStyle(e).transform:`none`,n=/^matrix\(([^,]+)/.exec(t)?.[1];return n&&Number.parseFloat(n)||1}function _n(e,t,n,r,i){let a=()=>e.getAttribute(`fold`)===`mark`?en:$t,s=()=>n.querySelector(`svg`),l={x:0,y:0},u=1,d=!1,f,p=[],m=()=>{if(!d&&!g.active&&!_.active&&!v.active){O(t,{"clip-path":null}),O(e,{translate:null}),O(n,{translate:null});let r=s();r&&O(r,{scale:null});for(let e of p)e();p=[],i();return}let r=e.hasAttribute(`collapsed`),o=g.value;O(t,{"clip-path":nn(Zt,a(),o)}),O(e,{translate:`${_.value.toFixed(2)}px ${v.value.toFixed(2)}px`});let c=r?l:{x:0,y:0};O(n,{translate:`${(l.x*o-c.x).toFixed(2)}px ${(l.y*o-c.y).toFixed(2)}px`});let f=s();f&&O(f,{scale:((1+(u-1)*o)/(r?u:1)).toFixed(4)})},g=x(0,m,c.snappy),_=x(0,m,c.snappy),v=x(0,m,c.snappy),y=()=>{let e=t.getBoundingClientRect();return{x:e.left+e.width/2-_.value,y:e.top+e.height/2-v.value}},b=()=>{l={x:Number.parseFloat(n.style.getPropertyValue(`--vitehub-mark-x`))||0,y:Number.parseFloat(n.style.getPropertyValue(`--vitehub-mark-y`))||0},e.hasAttribute(`collapsed`)&&(u=gn(s()))};return{get moving(){return d||g.active||_.active||v.active},move(t,n=0){r();let i=new Promise(e=>p.push(e)),a=y(),s=e.hasAttribute(`collapsed`);b(),t(),b();let l=y(),u=e.hasAttribute(`collapsed`);clearTimeout(f),d=!0;for(let[e,t]of[[_,a.x-l.x+_.value],[v,a.y-l.y+v.value]]){let n=e.velocity;e.set(t),n&&e.to(t,{velocity:n})}g.active||g.set(+!!s);let m=()=>{d=!1,_.to(0,{preset:c.snappy}),v.to(0,{preset:c.snappy}),g.to(+!!u,{preset:c.snappy})};return n>0&&!o()?f=setTimeout(m,n*h()):m(),i}}}function vn(e){let{signal:t}=e,n=document.createElement(e.name);n.style.viewTransitionName=e.name,e.fold===`mark`&&n.setAttribute(`fold`,`mark`);let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`);i.textContent=sn;let a=document.createElement(`div`);a.setAttribute(`role`,`toolbar`),a.setAttribute(`aria-label`,e.label);let o=document.createElement(`button`);o.className=`mark`,o.append(e.mark);let s=e.initial?.collapsed===!0,l=t=>{t&&a.scrollTo(0,0),n.toggleAttribute(`collapsed`,t),t&&e.fold!==`mark`?o.dataset.motionPressTarget=`[role=toolbar]`:delete o.dataset.motionPressTarget,o.setAttribute(`aria-expanded`,String(!t)),o.setAttribute(`aria-label`,`${t?`Show`:`Hide`} ${e.label}`),o.title=`${o.getAttribute(`aria-label`)}. Drag to move.`},u=()=>e.markOnly?.active()===!0,d=e.markOnly?.opened===!0,f=()=>u()?!d:xn(e.storage.collapsed)??s;l(f()),o.addEventListener(`click`,()=>{if(b())return;let t=!n.hasAttribute(`collapsed`);if(E.move(()=>{l(t),y(g)},t?40:0),u()){d=!t;return}try{t===s?localStorage.removeItem(e.storage.collapsed):localStorage.setItem(e.storage.collapsed,t?`1`:`0`)}catch{}});let p=e.exit,m;p&&(m=document.createElement(`button`),m.className=`exit`,m.setAttribute(`aria-label`,p.label),m.title=p.label,m.append(cn(`0 0 24 24`,`M18 6 6 18M6 6l12 12`,{width:`15`,height:`15`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})),m.addEventListener(`click`,e=>p.press(e.detail===0))),a.append(o,...m?[m]:[]);let h=document.createElement(`slot`);h.name=`tab`,h.className=`tabs`,r.append(i,h,a);for(let t of e.slots){let e=document.createElement(`slot`);e.name=t,a.insertBefore(e,m??null)}let g=fn(e.storage.dock)??e.initial?.dock??{edge:`bottom`,at:50},_=g,v=()=>g.edge===`left`||g.edge===`right`,y=t=>{g=t,_=u()&&!n.hasAttribute(`dragging`)&&t.edge===`bottom`?{edge:`bottom`,at:t.at<50?0:100}:t,n.setAttribute(`edge`,_.edge),n.style.setProperty(`--at`,String(_.at));let r=n.hasAttribute(`collapsed`),i=r?v()?X(n).width:X(n).height:v()?a.offsetWidth:a.offsetHeight;e.onPlace?.({..._,collapsed:r,thickness:i}),o.style.setProperty(`--vitehub-mark-x`,`${a.clientWidth/2-o.offsetLeft-o.offsetWidth/2}px`),o.style.setProperty(`--vitehub-mark-y`,`${a.clientHeight/2-o.offsetTop-o.offsetHeight/2}px`)},b=bn({host:n,handle:o,dock:()=>g,shape:e=>{let t=n.hasAttribute(`collapsed`),r=t?e?n.offsetHeight:n.offsetWidth:e?a.offsetHeight:a.offsetWidth;return{size:r,lead:t?r/2:e?o.offsetTop+o.offsetHeight/2:o.offsetLeft+o.offsetWidth/2,part:t?e?X(n).height:X(n).width:r,margin:t?2:16}},place:y,drop:()=>{E.move(()=>y(g));try{localStorage.setItem(e.storage.dock,JSON.stringify({edge:g.edge,at:g.at}))}catch{}},signal:t}),S=Vt(a,{items:()=>[o,...[...n.children].filter(e=>e instanceof HTMLElement&&e.slot!==`tab`),...m?[m]:[]],movesOnly:!0}),C={width:0,height:0},w={top:0,right:0,bottom:0,left:0},T=x(0,(e,t)=>{O(a,{"clip-path":t===0&&e===0?null:`inset(${[w.top,w.right,w.bottom,w.left].map(t=>`${(t*e).toFixed(2)}px`).join(` `)} round 12px)`})},c.snappy),E=_n(n,a,o,()=>T.stop(),()=>S.measure());hn.set(n,E);let ee=[P(n,J),P(r,J)];if(t.aborted){for(let e of ee)e();return n}let te=new ResizeObserver(()=>{let e=C;if(C={width:a.offsetWidth,height:a.offsetHeight},y(g),n.hasAttribute(`collapsed`)||n.hasAttribute(`dragging`)||E.moving)return;if(!e.width)return S.measure();S.play(),S.measure();let t={x:C.width-e.width,y:C.height-e.height},r={x:v()?_.edge===`right`?t.x:0:t.x*_.at/100,y:v()?t.y*_.at/100:_.edge===`bottom`?t.y:0};w={top:Math.max(0,r.y),right:Math.max(0,t.x-r.x),bottom:Math.max(0,t.y-r.y),left:Math.max(0,r.x)},(w.top||w.right||w.bottom||w.left)&&(T.set(1),T.to(0,{preset:c.snappy}))});return t.addEventListener(`abort`,()=>{n.remove(),te.disconnect(),T.stop(),S.destroy();for(let e of ee)e()},{once:!0}),(e.parent??document.documentElement).append(n),y(g),t.aborted||(te.observe(a),e.markOnly?.watch(()=>{d=!1;let e=n.contains(document.activeElement),t=f();E.move(()=>{l(t),y(g)},t&&!n.hasAttribute(`collapsed`)?40:0),e&&n.hasAttribute(`collapsed`)&&o.focus({preventScroll:!0})},t)),n}async function yn(e){if(e.inert=!0,e.hasAttribute(`collapsed`)||matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let t=e.shadowRoot?.querySelector(`div`),n=hn.get(e);if(!t?.offsetWidth||!n){e.setAttribute(`collapsed`,``);return}Object.assign(t.style,{width:`${t.offsetWidth}px`,height:`${t.offsetHeight}px`});let r=n.move(()=>e.setAttribute(`collapsed`,``),40);await Promise.race([r,new Promise(e=>setTimeout(e,600*h()))])}function bn(e){let{host:t,handle:n}=e,r,i=!1;return n.style.touchAction=`none`,n.addEventListener(`pointerdown`,a=>{if(a.button!==0||r!==void 0)return;r=a.pointerId,i=!1;let o=n.getBoundingClientRect(),s={x:a.clientX-o.left-o.width/2,y:a.clientY-o.top-o.height/2};n.setPointerCapture(a.pointerId);let c=n=>{if(n.pointerId!==a.pointerId||!i&&Math.hypot(n.clientX-a.clientX,n.clientY-a.clientY)<4)return;i=!0,t.setAttribute(`dragging`,``);let r=document.documentElement.clientWidth,o=document.documentElement.clientHeight,c=n.clientX-s.x,l=n.clientY-s.y,u=pn(c,l,r,o);u!==e.dock().edge&&e.place({edge:u,at:e.dock().at});let d=u===`left`||u===`right`,{size:f,lead:p,part:m,margin:h}=e.shape(d),g=(d?l:c)-p+f/2,_=getComputedStyle(t),v=Math.max(h,Number.parseFloat(_.getPropertyValue(d?`--safe-top`:`--safe-left`))||0),y=Math.max(h,Number.parseFloat(_.getPropertyValue(d?`--safe-bottom`:`--safe-right`))||0);e.place({edge:u,at:mn(g,m,v,y,d?o:r)})};n.addEventListener(`pointermove`,c);let l=o=>{o.pointerId===a.pointerId&&(n.removeEventListener(`pointermove`,c),n.removeEventListener(`lostpointercapture`,l),r=void 0,i&&(t.removeAttribute(`dragging`),e.drop(),setTimeout(()=>{i=!1})))};n.addEventListener(`lostpointercapture`,l)},{signal:e.signal}),()=>i}function X(e){let t=Number.parseFloat(getComputedStyle(e).getPropertyValue(`--vitehub-hex-h`))||24;return{width:t*10/9,height:t}}function xn(e){try{let t=localStorage.getItem(e);return t===`1`||t!==`0`&&void 0}catch{return}}const Sn=`${Kt}
|
|
69
|
-
.who{align-self:flex-start;padding:0 3px}
|
|
70
|
-
.avatar{box-sizing:border-box;display:grid;place-items:center;width:22px;height:22px;flex:none;overflow:hidden;border-radius:50%;background:#404040;color:var(--vitehub-pill-strong);font-size:10px;font-weight:600;line-height:1}
|
|
71
|
-
.avatar img{display:block;width:100%;height:100%;object-fit:cover}
|
|
72
|
-
[role=menu]{position:fixed;inset:auto;box-sizing:border-box;width:max-content;min-width:220px;max-width:min(300px,calc(100vw - 16px));margin:0;padding:6px;overflow:visible;border:1px solid var(--vitehub-pill-line);border-radius:12px;background:#171717;color:var(--vitehub-pill-text);font:500 13px/1.3 ui-sans-serif,system-ui,sans-serif;box-shadow:0 16px 40px rgb(0 0 0/30%);color-scheme:dark}
|
|
73
|
-
.me{display:flex;align-items:center;gap:10px;margin-bottom:4px;padding:8px 8px 10px;border-bottom:1px solid var(--vitehub-pill-line)}
|
|
74
|
-
.me .avatar{width:32px;height:32px;font-size:12px}
|
|
75
|
-
.me div{min-width:0}
|
|
76
|
-
.me b,.me small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
77
|
-
.me b{color:var(--vitehub-pill-strong);font-weight:500}
|
|
78
|
-
.me small{margin-top:2px;color:var(--vitehub-pill-muted);font-size:12px}
|
|
79
|
-
.via{display:flex;align-items:center;gap:6px;padding:6px 8px;color:var(--vitehub-pill-muted);font-size:12px}
|
|
80
|
-
.via svg{width:11px;height:10px;flex:none;fill:var(--vitehub-pill-text)}
|
|
81
|
-
[role=menuitem]{display:flex;width:100%;height:32px;justify-content:flex-start;gap:8px;font-size:13px}
|
|
82
|
-
[role=menuitem] svg{width:15px;height:15px;color:var(--vitehub-pill-muted)}
|
|
83
|
-
[role=menuitem][hidden]{display:none}
|
|
84
|
-
[role=menuitem][aria-disabled=true]{cursor:progress}
|
|
85
|
-
@media(any-pointer:coarse){[role=menuitem]{height:44px}}`;function Cn(e){return e.trim().split(/\s+/).slice(0,2).map(e=>[...e][0]??``).join(``).toLocaleUpperCase()}function wn(e){let t=document.createElement(`span`);if(t.className=`avatar`,t.setAttribute(`aria-hidden`,`true`),t.textContent=Cn(e.name),e.image){let n=document.createElement(`img`);n.alt=``,n.referrerPolicy=`no-referrer`,n.src=e.image,n.addEventListener(`load`,()=>t.replaceChildren(n),{once:!0})}return t}function Tn(e,t){let n=document.createElement(`button`);n.type=`button`,n.setAttribute(`role`,`menuitem`),n.tabIndex=-1,n.insertAdjacentHTML(`beforeend`,e);let r=document.createElement(`span`);return r.textContent=t,n.append(r),{item:n,label:r}}function En(){let e=new URL(location.href);for(let t of[Ht,...Ut])e.searchParams.delete(t);return e}function Dn(e){let{account:t,bar:n,signal:r}=e,i=n.parentElement,a=n.attachShadow({mode:`open`});r.addEventListener(`abort`,P(a,J),{once:!0});let o=document.createElement(`style`);o.textContent=Sn;let s=document.createElement(`div`);s.id=`account-menu`,s.setAttribute(`popover`,`auto`),s.setAttribute(`role`,`menu`),s.setAttribute(`aria-label`,t.name);let c=document.createElement(`button`);c.type=`button`,c.className=`who`,c.title=t.email?`${t.name} (${t.email})`:t.name,c.setAttribute(`aria-label`,`Account: ${t.name}`),c.setAttribute(`aria-haspopup`,`menu`),c.setAttribute(`aria-expanded`,`false`),c.setAttribute(`aria-controls`,s.id),c.setAttribute(`popovertarget`,s.id),c.append(wn(t));let l=document.createElement(`div`);l.className=`me`,l.setAttribute(`role`,`none`);let u=document.createElement(`div`),d=document.createElement(`b`);if(d.textContent=t.name,u.append(d),t.email){let e=document.createElement(`small`);e.textContent=t.email,u.append(e)}if(l.append(wn(t),u),s.append(l),t.via===`console`){let t=document.createElement(`div`);t.className=`via`,t.setAttribute(`role`,`none`),t.append(cn(`0 0 20 18`,e.mark,{}),`Signed in with ViteHub Console`),s.append(t)}let f=Tn(`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 7h10v10M7 17 17 7"/></svg>`,`Open in the Console`),p=Tn(`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 17 5-5-5-5M21 12H9M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/></svg>`,`Sign out of ${location.host}`);s.append(f.item,p.item),a.append(o,c,s);let m=()=>[...s.querySelectorAll(`[role=menuitem]`)].filter(e=>!e.hidden),h,g=e=>{let t=document.documentElement.clientWidth,r=document.documentElement.clientHeight,a=(i??n).getBoundingClientRect(),o=c.getBoundingClientRect(),l={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};e===`bottom`||e===`top`?(l.right=`${Math.max(8,t-o.right)}px`,e===`bottom`?l.bottom=`${r-a.top+8}px`:l.top=`${a.bottom+8}px`):(o.top<r/2?l.top=`${Math.max(8,o.top)}px`:l.bottom=`${Math.max(8,r-o.bottom)}px`,e===`left`?l.left=`${a.right+8}px`:l.right=`${t-a.left+8}px`),Object.assign(s.style,l)},_=e=>{if(e!==`bottom`&&e!==`top`)return;let t=document.documentElement.clientWidth,n=c.getBoundingClientRect(),r=s.getBoundingClientRect().width;s.style.right=`auto`,s.style.left=`${Math.max(8,Math.min(n.right-r,t-r-8))}px`};if(s.addEventListener(`beforetoggle`,t=>{if(t.newState===`closed`){s.contains(a.activeElement)&&c.focus({preventScroll:!0});return}h=e.openConsole?.(),f.item.hidden=!h;let n=i?.getAttribute(`edge`)??`bottom`;g(n),requestAnimationFrame(()=>_(n))},{signal:r}),s.addEventListener(`toggle`,e=>{let t=e.newState===`open`;c.setAttribute(`aria-expanded`,String(t)),t&&m()[0]?.focus({preventScroll:!0})},{signal:r}),s.addEventListener(`keydown`,e=>{let t=m(),n=t.findIndex(e=>e===a.activeElement),r=e.key===`ArrowDown`?n+1:e.key===`ArrowUp`?n-1:e.key===`Home`?0:e.key===`End`?t.length-1:void 0;r===void 0?e.key===`Escape`?e.stopPropagation():e.key===`Tab`&&s.hidePopover():(e.preventDefault(),t[(r+t.length)%t.length]?.focus())},{signal:r}),f.item.addEventListener(`click`,()=>{s.hidePopover(),h?.()},{signal:r}),p.item.addEventListener(`click`,async()=>{if(p.item.getAttribute(`aria-disabled`)===`true`)return;p.item.setAttribute(`aria-disabled`,`true`),p.label.textContent=`Signing out…`;let e=await fetch(t.signOut,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:`{}`}).catch(e=>e);if(!(e instanceof Response)||!e.ok){console.error(`[vitehub] The sign-out failed. The session stays.`,e instanceof Response?`The sign-out answered ${e.status}.`:e),p.item.removeAttribute(`aria-disabled`),p.label.textContent=`Could not sign out. Try again`;return}let n=En();n.href===location.href?location.reload():location.replace(n)},{signal:r}),i){let e=new MutationObserver(e=>{e.some(e=>e.oldValue!==i.getAttribute(e.attributeName??``))&&s.hidePopover()});e.observe(i,{attributes:!0,attributeOldValue:!0,attributeFilter:[`collapsed`,`dragging`,`edge`]}),r.addEventListener(`abort`,()=>e.disconnect(),{once:!0})}r.addEventListener(`abort`,()=>s.hidePopover(),{once:!0})}function On(e,...t){return typeof e==`function`?e(...t):e}const kn=Error.captureStackTrace;var An=class e extends Error{get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.docs=t.docs,this.fix=t.fix,this.sources=t.sources,this.data=t.data,kn?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function jn(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}const Mn=e=>t=>t instanceof An&&e in t;/* @__NO_SIDE_EFFECTS__ */
|
|
86
|
-
function Nn(e){let t=e.reporters??[],n=Symbol(),r=Object.defineProperty({},"is",{value:Mn(n)}),{docsBase:i}=e;for(let a of Object.keys(e.codes)){let o=e.codes[a],s=o.docs===!1?void 0:o.docs||jn(i,a),c=(e={},r={})=>{let i=new An({code:a,why:On(o.why,e),fix:On(o.fix,e),docs:s,cause:e.cause,sources:e.sources,data:On(o.data,e)},c);i[n]=1;for(let e of t)e(i,r);return i};c.is=e=>r.is(e)&&e.code===a,r[a]=c}return r}const Pn=/*#__PURE__*/ Nn({docsBase:`https://vitehub.dev/docs/development/diagnostics`,codes:{INTERNAL_INVARIANT_FAILED:{why:({what:e})=>`ViteHub reached a state that it does not expect: ${e}`,fix:`This is a ViteHub bug. Open an issue at https://github.com/vite-hub/vitehub/issues with this error message and its stack trace.`}}});function Fn(e){return Pn.INTERNAL_INVARIANT_FAILED({what:e})}function In(e,t){if(!e)throw Fn(t)}let Z={edge:`bottom`,at:50};const Ln=/* @__PURE__ */ new Set;let Rn=0;function zn(e){e.setAttribute(`edge`,Z.edge),e.toggleAttribute(`collapsed`,!!Z.collapsed),e.style.setProperty(`--at`,String(Z.at)),Z.thickness?e.style.setProperty(`--thickness`,`${Z.thickness}px`):e.style.removeProperty(`--thickness`);for(let t of[`top`,`right`,`bottom`,`left`])e.shadowRoot.querySelector(`.grip.${t}`).hidden=Bn(t)===0}function Bn(e){return(e===`top`||e===`bottom`)==(Z.edge===`top`||Z.edge===`bottom`)?1:e===`top`||e===`left`?Z.at/100:1-Z.at/100}function Vn(e){Z=e;for(let e of Ln)zn(e)}function Hn(e){let t=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(let[e,n]of Object.entries({width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.75`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`}))t.setAttribute(e,n);let n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return n.setAttribute(`d`,e),t.append(n),t}function Un(e){let t=document.createElement(`vitehub-window`);t.hidden=!0;let n=t.attachShadow({mode:`open`}),r=document.createElement(`style`);r.textContent=`
|
|
87
|
-
:host{all:initial;--surface:light-dark(#fff,#0a0a0a);--text:light-dark(#18181b,#fafafa);--muted:light-dark(#71717a,#a1a1aa);--line:light-dark(rgb(0 0 0/8%),rgb(255 255 255/9%));--hover:light-dark(rgb(0 0 0/5%),rgb(255 255 255/7%));--focus:light-dark(#18181b,#fafafa);--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--at:50;--margin:16px;--start:max(var(--margin),var(--safe-left));--end:max(var(--margin),var(--safe-right));--far:max(16px,var(--safe-top));--along:calc(var(--start) + (100% - var(--start) - var(--end)) * var(--at) / 100);--shift:calc(var(--at) * -1%);--dock:calc(max(var(--margin),var(--safe-bottom)) + var(--thickness,38px) + 8px);--width:calc(100vw - var(--start) - var(--end));--height:calc(100dvh - var(--dock) - var(--far));position:fixed;inset:0;z-index:2147483000;pointer-events:none;color:var(--text);font:400 .875rem/1.5 system-ui,sans-serif;color-scheme:light dark}
|
|
88
|
-
:host([collapsed]){--margin:2px}
|
|
89
|
-
:host([edge=top]){--dock:calc(max(var(--margin),var(--safe-top)) + var(--thickness,38px) + 8px);--far:max(16px,var(--safe-bottom))}
|
|
90
|
-
:host(:is([edge=left],[edge=right])){--start:max(var(--margin),var(--safe-top));--end:max(var(--margin),var(--safe-bottom));--width:calc(100vw - var(--dock) - var(--far));--height:calc(100dvh - var(--start) - var(--end))}
|
|
91
|
-
:host([edge=right]){--dock:calc(max(var(--margin),var(--safe-right)) + var(--thickness,38px) + 8px);--far:max(16px,var(--safe-left))}
|
|
92
|
-
:host([edge=left]){--dock:calc(max(var(--margin),var(--safe-left)) + var(--thickness,38px) + 8px);--far:max(16px,var(--safe-right))}
|
|
93
|
-
:host([hidden]){display:none}
|
|
94
|
-
.window{position:absolute;width:min(600px,var(--width));height:min(640px,var(--height));min-width:min(300px,var(--width));min-height:min(240px,var(--height));max-width:var(--width);max-height:var(--height);display:flex;flex-direction:column;pointer-events:auto;background:var(--surface);border-radius:12px;box-shadow:0 0 0 1px light-dark(rgb(0 0 0/8%),rgb(255 255 255/10%)),0 2px 4px light-dark(rgb(0 0 0/4%),rgb(0 0 0/24%)),0 16px 40px -8px light-dark(rgb(0 0 0/18%),rgb(0 0 0/56%));outline:none}
|
|
95
|
-
:host([edge=bottom]) .window{bottom:var(--dock);left:var(--along);translate:var(--shift) 0}
|
|
96
|
-
:host([edge=top]) .window{top:var(--dock);left:var(--along);translate:var(--shift) 0}
|
|
97
|
-
:host([edge=right]) .window{right:var(--dock);top:var(--along);translate:0 var(--shift)}
|
|
98
|
-
:host([edge=left]) .window{left:var(--dock);top:var(--along);translate:0 var(--shift)}
|
|
99
|
-
:host([edge]) .window.expanded{inset:max(12px,var(--safe-top)) max(12px,var(--safe-right)) max(12px,var(--safe-bottom)) max(12px,var(--safe-left));translate:none;width:auto!important;height:auto!important;max-width:none;max-height:none}
|
|
100
|
-
:host([edge=bottom]) .window.expanded{bottom:var(--dock)}:host([edge=top]) .window.expanded{top:var(--dock)}:host([edge=right]) .window.expanded{right:var(--dock)}:host([edge=left]) .window.expanded{left:var(--dock)}
|
|
101
|
-
.frame{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;border-radius:inherit}
|
|
102
|
-
.grip{position:absolute;z-index:1;touch-action:none}
|
|
103
|
-
.grip.top,.grip.bottom{left:12px;right:12px;height:8px;cursor:ns-resize}
|
|
104
|
-
.grip.top{top:-4px}.grip.bottom{bottom:-4px}
|
|
105
|
-
.grip.left,.grip.right{top:12px;bottom:12px;width:8px;cursor:ew-resize}
|
|
106
|
-
.grip.left{left:-4px}.grip.right{right:-4px}
|
|
107
|
-
:host([edge=bottom]) .grip.bottom,:host([edge=top]) .grip.top,:host([edge=right]) .grip.right,:host([edge=left]) .grip.left,.expanded .grip{display:none}
|
|
108
|
-
header{display:flex;align-items:center;gap:2px;min-height:44px;padding:0 6px 0 8px;border-bottom:1px solid var(--line);flex:none}
|
|
109
|
-
h2{font:600 .875rem/1.5 system-ui,sans-serif;margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px}
|
|
110
|
-
header :is(button,a){display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;font:inherit;touch-action:manipulation;transition:background-color 150ms ease-out,color 150ms ease-out}
|
|
111
|
-
header a[hidden]{display:none}
|
|
112
|
-
@media(hover:hover){header :is(button,a):hover{background:var(--hover);color:var(--text)}}
|
|
113
|
-
header :is(button,a):focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
|
|
114
|
-
@media(any-pointer:coarse){:host{--thickness:54px}.grip{display:none}header :is(button,a){width:44px;height:44px}}
|
|
115
|
-
.body{flex:1;min-height:0;overflow:auto;position:relative}iframe{display:block;border:0;width:100%;height:100%;background:var(--surface)}
|
|
116
|
-
@media(max-width:640px){:host([edge]) .window,:host([edge]) .window.expanded{inset:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);translate:none;width:auto!important;height:auto!important;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:0}:host([edge=bottom]) :is(.window,.window.expanded){bottom:var(--dock)}:host([edge=top]) :is(.window,.window.expanded){top:var(--dock)}:host([edge=right]) :is(.window,.window.expanded){right:var(--dock)}:host([edge=left]) :is(.window,.window.expanded){left:var(--dock)}:host(:is([edge=top],[edge=bottom])) .window:not(.expanded){left:var(--start);right:var(--end)}:host(:is([edge=left],[edge=right])) .window:not(.expanded){top:var(--start);bottom:var(--end)}.grip{display:none}header :is(button,a){width:44px;height:44px}.expand{display:none}}
|
|
117
|
-
@media(forced-colors:active){.window{border:1px solid CanvasText}header :is(button,a):focus-visible{outline-color:Highlight}}
|
|
118
|
-
`;let i=document.createElement(`section`);i.className=`window`,i.setAttribute(`role`,`dialog`),i.setAttribute(`aria-labelledby`,`title`),i.tabIndex=-1;let a=document.createElement(`header`),o=document.createElement(`h2`);o.id=`title`,o.textContent=e.title;let s=document.createElement(`div`);s.className=`body`;let c=(e,t,n)=>{let r=document.createElement(`button`);return r.className=e,r.type=`button`,r.setAttribute(`aria-label`,t),r.title=t,r.append(Hn(n)),r},l=c(`expand`,`Expand window`,`M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5`),u=c(`hide`,`Minimize window`,`M5 12h14`),d=document.createElement(`a`);d.className=`tab`,d.target=`_blank`,d.rel=`noopener`,d.setAttribute(`aria-label`,`Open in new tab`),d.title=`Open in new tab`,d.append(Hn(`M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`));let f=()=>{let t=e.href?.();d.hidden=!t,t?d.href=t:d.removeAttribute(`href`)};for(let e of[`pointerenter`,`pointerdown`,`focus`,`click`,`contextmenu`])d.addEventListener(e,f);f(),a.append(o,...e.href?[d]:[],l,u);let p=document.createElement(`div`);p.className=`frame`,p.append(a,s);let m=[`top`,`right`,`bottom`,`left`].map(e=>{let t=document.createElement(`div`);return t.className=`grip ${e}`,t.addEventListener(`pointerdown`,n=>{if(n.button!==0)return;let r=Bn(e);if(r===0)return;n.preventDefault(),t.setPointerCapture(n.pointerId);let a=e===`top`||e===`bottom`,o=a?i.offsetHeight:i.offsetWidth,s=t=>{let s=a?t.clientY-n.clientY:t.clientX-n.clientX,c=o+(e===`top`||e===`left`?-s:s)/r;a?i.style.height=`${Math.max(240,c)}px`:i.style.width=`${Math.max(300,c)}px`};t.addEventListener(`pointermove`,s),t.addEventListener(`lostpointercapture`,()=>t.removeEventListener(`pointermove`,s),{once:!0})}),t});i.append(p,...m),n.append(r,i);let h=`vitehub-window:${e.id}`;try{let e=JSON.parse(localStorage.getItem(h)??`null`);e&&typeof e==`object`&&`width`in e&&`height`in e&&typeof e.width==`number`&&typeof e.height==`number`&&(Number.isFinite(e.width)&&(i.style.width=`${Math.max(300,e.width)}px`),Number.isFinite(e.height)&&(i.style.height=`${Math.max(240,e.height)}px`))}catch{}let g=new ResizeObserver(()=>{if(t.hidden||i.classList.contains(`expanded`)||innerWidth<=640)return;let e=i.offsetWidth,n=i.offsetHeight;try{localStorage.setItem(h,JSON.stringify({width:e,height:n}))}catch{}});g.observe(i);let _=()=>{t.hidden=!0,e.trigger.setAttribute(`aria-expanded`,`false`),e.trigger.focus({preventScroll:!0}),e.onHide?.()};l.addEventListener(`click`,()=>{let e=i.classList.toggle(`expanded`);l.setAttribute(`aria-label`,e?`Restore window size`:`Expand window`),l.title=e?`Restore window size`:`Expand window`,l.setAttribute(`aria-pressed`,String(e))}),u.addEventListener(`click`,_),e.colorScheme&&addEventListener(`storage`,()=>{t.style.colorScheme=e.colorScheme?.()??``},{signal:e.signal}),n.addEventListener(`keydown`,e=>{e instanceof KeyboardEvent&&e.key===`Escape`&&!e.defaultPrevented&&(e.preventDefault(),e.stopPropagation(),_())}),t.style.viewTransitionName=`vitehub-window-${++Rn}`,zn(t);let v=P(n,J),y=()=>{Ln.delete(t),g.disconnect(),t.remove(),v()};return e.signal.aborted?y():(e.signal.addEventListener(`abort`,y,{once:!0}),Ln.add(t),document.documentElement.append(t)),{body:s,show(){e.signal.aborted||(t.style.colorScheme=e.colorScheme?.()??``,f(),t.hidden=!1,e.trigger.setAttribute(`aria-expanded`,`true`),i.focus({preventScroll:!0}))},hide:_,destroy:y}}function Wn(e){let t=typeof e==`object`&&e?Reflect.get(e,`default`):void 0;return t instanceof Function?t:void 0}const Gn=`vitehub-tools-off`,Kn=`vitehub-tools-collapsed`,Q=`vitehub-tools-dock`,qn=`vitehub-account`,Jn=`M19.734 8.156 15.576.844A1.66 1.66 0 0 0 14.135 0H5.819C5.226 0 4.677.32 4.38.844L.222 8.156a1.71 1.71 0 0 0 0 1.688l4.158 7.312c.297.523.846.844 1.439.844h8.316c.593 0 1.142-.32 1.438-.844l4.158-7.312c.3-.523.3-1.165.003-1.688Z`;function Yn(){try{return localStorage.getItem(Gn)===`1`}catch{return!1}}function Xn(e){try{e?localStorage.setItem(Gn,`1`):localStorage.removeItem(Gn)}catch{}}function Zn(){return document.documentElement.getAttribute(`data-vitehub-pill`)===`mark`||$}let $=!1,Qn=!1;function $n(){try{return localStorage.getItem(Q)}catch{return null}}function er(){if(Qn||typeof document.elementsFromPoint!=`function`)return!1;let e=e=>{let t=e.getBoundingClientRect();return t.width*t.height<innerWidth*innerHeight/2},t=Array.from({length:36},(e,t)=>[Math.min(innerWidth-1,Math.max(0,innerWidth/2-140+t%18*16+8)),innerHeight-(t<18?24:44)]),n=/* @__PURE__ */ new Set;for(let[r,i]of t)for(let t of document.elementsFromPoint(r,i))if(!n.has(t)){n.add(t);for(let n=t;n&&n!==document.body&&n!==document.documentElement&&!n.localName.startsWith(`vitehub-`);n=n.parentElement){let r=getComputedStyle(n);if(r.position===`fixed`||r.position===`sticky`&&r.bottom!==`auto`){if(e(n)||n!==t&&e(t))return!0;break}if(/auto|scroll/.test(r.overflowY)&&n.scrollHeight>n.clientHeight)break}}return!1}function tr(e){return e.edge===`bottom`?{edge:`bottom`,at:e.at<50?0:100}:e}function nr(e,t){let n=Zn(),r=$n(),i=()=>{Qn||=$n()!==r;let t=$;if($=er(),t&&!$&&Qn&&document.querySelector(`vitehub-pill`)?.hasAttribute(`collapsed`))try{localStorage.setItem(Kn,`1`)}catch{}Zn()!==n&&(n=!n,e())},a=new MutationObserver(i);a.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-vitehub-pill`]});let o,s=()=>{o??=setTimeout(()=>{o=void 0,i()},200)},c=new MutationObserver(e=>{e.some(e=>!(e.target instanceof Element&&e.target.localName.startsWith(`vitehub-`)))&&s()});c.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`hidden`,`class`,`style`]}),addEventListener(`scroll`,s,{capture:!0,passive:!0,signal:t}),addEventListener(`resize`,s,{signal:t}),addEventListener(`storage`,e=>{(e.key===null||e.key===Q)&&(r=$n()),s()},{signal:t}),document.addEventListener(`pointerup`,s,{signal:t}),t.addEventListener(`abort`,()=>{a.disconnect(),c.disconnect(),clearTimeout(o)},{once:!0})}function rr(e,t,n,r){if(e.aborted)return;let i=document.createElement(`vitehub-tools-off`);i.setAttribute(`off`,``),i.setAttribute(`collapsed`,``),r&&i.setAttribute(`closing`,``),i.style.viewTransitionName=`vitehub-pill`;let a=fn(Q)??{edge:`bottom`,at:50},o=()=>{let e=Zn()&&!i.hasAttribute(`dragging`)?tr(a):a;i.setAttribute(`edge`,e.edge),i.style.setProperty(`--at`,String(e.at))};o();let s=new AbortController;e.addEventListener(`abort`,()=>{s.abort(),i.remove()},{once:!0,signal:s.signal}),nr(o,s.signal);let l=i.attachShadow({mode:`open`}),u=P(l,J);s.signal.addEventListener(`abort`,u,{once:!0});let d=document.createElement(`style`);d.textContent=`${sn}\n:host([off]){--vitehub-hex-h:14px;filter:drop-shadow(0 1px 2px rgb(0 0 0/25%))}
|
|
119
|
-
:host([off]) button{position:relative;display:block;width:var(--vitehub-hex-w);min-width:0;height:var(--vitehub-hex-h);padding:0;border-radius:4px;pointer-events:auto;cursor:grab;opacity:.55;transition:opacity 150ms ease-out}
|
|
120
|
-
:host([off][edge=bottom]) button{transform-origin:calc(var(--at) * 1%) 100%}
|
|
121
|
-
:host([off][edge=top]) button{transform-origin:calc(var(--at) * 1%) 0}
|
|
122
|
-
:host([off][edge=left]) button{transform-origin:0 calc(var(--at) * 1%)}
|
|
123
|
-
:host([off][edge=right]) button{transform-origin:100% calc(var(--at) * 1%)}
|
|
124
|
-
:host([off][closing]) button{opacity:1}
|
|
125
|
-
:host([off][dragging]) button{opacity:1;cursor:grabbing}
|
|
126
|
-
:host([off]) button::before{content:"";position:absolute;inset:-6px}
|
|
127
|
-
svg{display:block;width:100%;height:100%;overflow:visible;fill:rgb(17 17 17/92%);stroke:rgb(255 255 255/18%);stroke-width:1px;vector-effect:non-scaling-stroke;transition:fill 150ms ease-out}
|
|
128
|
-
:host([off]) button:focus-visible{opacity:1}
|
|
129
|
-
:host([off][dragging]) svg{scale:none}
|
|
130
|
-
@media(hover:hover){:host([off]) button:hover{opacity:1;background:none}button:hover svg{fill:rgb(38 38 38/94%)}}
|
|
131
|
-
@media(any-pointer:coarse){:host([off]){--vitehub-hex-h:20px}:host([off]) button{min-width:0;height:var(--vitehub-hex-h)}:host([off]) button::before{inset:-10px}}
|
|
132
|
-
@media(prefers-reduced-motion:reduce){:host([off]) button,svg{transition:none}}`;let f=document.createElement(`button`);if(f.type=`button`,f.setAttribute(`aria-label`,`Turn on ViteHub tools`),f.title=`Turn on ViteHub tools`,f.append(cn(`0 0 20 18`,Jn,{})),l.append(d,f),document.documentElement.append(i),r){let e=r/X(i).height,t=x(e,(e,t)=>{let n=t===0&&e===1;O(f,{scale:n?null:e.toFixed(4)}),n&&i.removeAttribute(`closing`)},c.snappy);t.set(e),t.to(1,{preset:c.snappy})}let p=bn({host:i,handle:f,dock:()=>a,shape:e=>{let t=e?i.offsetHeight:i.offsetWidth,n=X(i);return{size:t,lead:t/2,part:e?n.height:n.width,margin:2}},place:e=>{a=e,o()},drop:()=>{o();try{localStorage.setItem(Q,JSON.stringify(a))}catch{}},signal:s.signal});f.addEventListener(`click`,()=>{p()||(s.abort(),i.remove(),t())}),n&&f.focus({preventScroll:!0})}async function ir(e={}){return await or(e,!1)}let ar=new AbortController;async function or(e,t){let n=new URLSearchParams(location.search);if(!Wt(location.search,document.cookie))return[];let{signal:r}=ar;Qn=fn(Q)!==void 0,$=er();let i=e.load??(e=>import(
|
|
133
|
-
/* @vite-ignore */
|
|
134
|
-
e)),a;try{let t=new URL(e.session??qt(import.meta.url),location.href);t.searchParams.set(`page`,location.pathname);let n=await fetch(t.origin===location.origin?`${t.pathname}${t.search}`:t.href,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)return[];a=Xt(await n.json())}catch{return[]}if(r.aborted||a.tools.length===0||document.querySelector(`vitehub-pill, vitehub-tools-off`))return[];let o=a.tools.find(e=>e.param&&n.has(e.param));if(n.has(`vitehub`)||o)Xn(!1);else if(Yn())return rr(r,()=>{Xn(!1),or(e,!0)},!1),[];let s=n.get(`vitehub`)||o?.id,c=a.tools.some(e=>e.id===s),l=new AbortController,u=a.tools.map(()=>new AbortController);r.addEventListener(`abort`,()=>{for(let e of u)e.abort();l.abort()},{once:!0,signal:l.signal});let d=/* @__PURE__ */ new Set,f=!1,p=(t=!1)=>{if(f||[...d].some(e=>!e()))return;f=!0;let n=a.tools.filter(e=>v(e.id));for(let e of a.tools)_(e.id,!1);Xn(!0);let i=new URL(location.href);i.searchParams.delete(Ht);for(let e of a.tools)e.param&&i.searchParams.delete(e.param);i.href!==location.href&&history.replaceState(history.state,``,i);let o=X(m).height,s=yn(m);for(let e of u)e.abort();s.then(()=>{l.abort(),rr(r,()=>{Xn(!1);for(let e of n)_(e.id,!0);or(e,!0)},t,o&&!matchMedia(`(prefers-reduced-motion: reduce)`).matches?o:void 0)})},m=vn({name:`vitehub-pill`,label:`ViteHub tools`,mark:cn(`0 0 20 18`,Jn,{fill:`currentColor`}),slots:[...a.tools.map(e=>e.id),...a.account?[qn]:[]],storage:{collapsed:Kn,dock:Q},exit:{label:`Turn off ViteHub tools`,press:p},onPlace:Vn,markOnly:{active:Zn,watch:nr,opened:t},signal:l.signal});if(l.signal.addEventListener(`abort`,P(m,{effects:[Ge,Mt]}),{once:!0}),a.account){let e=document.createElement(`vitehub-account`);e.slot=qn,m.append(e),Dn({account:a.account,bar:e,mark:Jn,openConsole:()=>{let e=m.querySelector(`vitehub-tool[slot="console"]`);return e&&!e.hidden?()=>void b(`console`):void 0},signal:l.signal})}let h=/* @__PURE__ */ new Map,g=t=>`vitehub-open:${e.session??qt(import.meta.url)}:${t}`,_=(e,t)=>{try{sessionStorage.setItem(g(e),String(t))}catch{}},v=e=>{try{return sessionStorage.getItem(g(e))===`true`}catch{return!1}},y=/* @__PURE__ */ new Map,b=async(e,t)=>await y.get(e)?.(t)??!1,x=(await Promise.all(a.tools.map(async(e,t)=>{let{signal:n}=u[t],r=document.createElement(`vitehub-tool`);r.slot=e.id,m.append(r);let a,o,l,f=()=>(l||(l=i(e.script),l.catch(()=>{l=void 0})),l),g=!1,x=()=>{let t=document.createElement(`vitehub-tool`);t.slot=e.id,r.replaceWith(t),r=t},S=()=>{let e=r.attachShadow({mode:`open`}),t=P(e,J);n.addEventListener(`abort`,t,{once:!0});let i=document.createElement(`style`);i.textContent=Kt,e.append(i,w)},C=(t,i=!0)=>n.aborted?Promise.resolve(!1):g?(a?.(t),Promise.resolve(!0)):o?o.then(e=>(e&&a?.(t),e)):(o=(async()=>{let c=new AbortController,l=()=>c.abort();n.addEventListener(`abort`,l,{once:!0});try{r.setAttribute(`aria-busy`,`true`);let o=Wn(await f());if(In(o,`the script of a page tool default-exports a function (${e.script})`),n.aborted)return!1;w.remove(),r.shadowRoot?x():r.replaceChildren();let l=o({beforeExit:e=>{let t=()=>e();d.add(t),c.signal.addEventListener(`abort`,()=>d.delete(t),{once:!0})},tool:e,bar:r,signal:c.signal,open:i&&(e.lazy===!0||e.id===s||v(e.id)),exit:()=>p(),createWindow:t=>{let n=Un({...t,signal:c.signal,onHide:()=>{_(e.id,!1),m.hasAttribute(`collapsed`)&&m.shadowRoot.querySelector(`button.mark`).focus({preventScroll:!0}),t.onHide?.()}}),r={...n,show(){if(!c.signal.aborted){for(let[t,n]of h)t!==e.id&&n.hide();_(e.id,!0),n.show()}},destroy(){h.get(e.id)===r&&(h.delete(e.id),_(e.id,!1)),n.destroy()}};return h.set(e.id,r),r},openTool:b,createTab:()=>{let e=document.createElement(`vitehub-tab`);return e.slot=`tab`,e.setAttribute(`data-motion-appear`,`vitehub-pill`),m.append(e),c.signal.addEventListener(`abort`,()=>e.remove(),{once:!0}),e},onOpen:e=>{a=e}});return g=!0,t&&a?.(t),!r.shadowRoot&&!r.hasChildNodes()&&(r.hidden=!0),l instanceof Function&&(n.aborted?l():c.signal.addEventListener(`abort`,()=>l(),{once:!0})),!n.aborted}catch(t){return c.abort(),n.removeEventListener(`abort`,l),h.delete(e.id)&&_(e.id,!1),a=void 0,g=!1,console.error(`[vitehub] The page tool "${e.id}" did not start.`,t),x(),w.textContent=`Retry ${e.label}`,w.title=`The tool could not load. Try again.`,r.hidden=!1,S(),!1}finally{r.removeAttribute(`aria-busy`),o=void 0}})(),o),w=document.createElement(`button`);w.type=`button`,w.textContent=e.label,w.addEventListener(`click`,()=>void C());for(let e of[`pointerenter`,`pointerdown`,`focus`])w.addEventListener(e,()=>void f());return y.set(e.id,C),e.lazy&&e.id!==s&&!v(e.id)?(S(),e):(await C(void 0,!c||e.id===s),n.aborted?void 0:e)}))).filter(e=>!!e);return x.length===0&&l.abort(),x}ir({session:new URL(`../tools`,import.meta.url).pathname});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as runAuthConsoleRead, i as runAuthConsoleAction, n as authConsoleFailure, r as issueImpersonationTicket, t as AuthOperationContext } from "../../../auth-GFIN6xSJ.js";
|
|
2
|
-
export { AuthOperationContext, authConsoleFailure, issueImpersonationTicket, runAuthConsoleAction, runAuthConsoleRead };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { t as viteHubErrorDiagnostics } from "../../../error-diagnostics-B1yAIaSn.js";
|
|
2
|
-
import { h as withConsoleAccess } from "../../../access-BC9HtX_M.js";
|
|
3
|
-
import { t as consoleHttpError } from "../../../http-error-Bs6e8_-8.js";
|
|
4
|
-
import { t as assertConsoleRequest } from "../../../request-CMA2UKKq.js";
|
|
5
|
-
import { r as getConsoleSections } from "../../../sections-C83x0slv.js";
|
|
6
|
-
import { t as getConsoleEnv } from "../../../env-Dg1I_DWr.js";
|
|
7
|
-
//#region src/console/runtime/server/env.get.ts
|
|
8
|
-
/** Returns declaration metadata. The `env.inspect` operation of Env returns the status of each value. */
|
|
9
|
-
async function consoleEnvHandler(event) {
|
|
10
|
-
assertConsoleRequest(event);
|
|
11
|
-
if (!getConsoleSections().includes("env")) throw consoleHttpError(404, viteHubErrorDiagnostics.VITE_HUB_C0001({ message: "Env section not found." }));
|
|
12
|
-
return getConsoleEnv();
|
|
13
|
-
}
|
|
14
|
-
const guardedHandler = withConsoleAccess(consoleEnvHandler, { section: "env" });
|
|
15
|
-
//#endregion
|
|
16
|
-
export { guardedHandler as default };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as ConsoleRequestEvent } from "../../../request-D7h3SQ92.js";
|
|
2
|
-
import { s as ConsoleAccessRoute } from "../../../access-policy-DhsEACna.js";
|
|
3
|
-
import { n as WorkspaceFileResponse, t as WorkspaceDescriptor } from "../../../workspace-history-CeVwBB6Q.js";
|
|
4
|
-
//#region src/console/runtime/server/invocation-workspace.get.d.ts
|
|
5
|
-
declare function consoleInvocationWorkspaceHandler(event: ConsoleRequestEvent): Promise<WorkspaceDescriptor | WorkspaceFileResponse>;
|
|
6
|
-
declare const guardedHandler: ConsoleAccessRoute<typeof consoleInvocationWorkspaceHandler>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { guardedHandler as default };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { n as AnyOperation } from "../../../operations-TTjL_7Zc.js";
|
|
2
|
-
//#region src/console/runtime/server/mcp-client-operations.d.ts
|
|
3
|
-
/** The operations of the MCP client section. The Console contributes them only when `console.mcpClient` is on. */
|
|
4
|
-
export declare const consoleMcpClientOperations: readonly AnyOperation[];
|
|
5
|
-
//#endregion
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { i as consoleRequestError } from "../../../request-CMA2UKKq.js";
|
|
2
|
-
import { r as defineConsoleOperation } from "../../../operations-ChEXk2ij.js";
|
|
3
|
-
import * as v from "valibot";
|
|
4
|
-
//#region src/console/runtime/server/mcp-client-operations.ts
|
|
5
|
-
const id = v.pipe(v.string(), v.minLength(1), v.maxLength(64));
|
|
6
|
-
const optionalText = v.optional(v.pipe(v.string(), v.maxLength(4096)));
|
|
7
|
-
const prompt = v.optional(v.picklist(["login"]));
|
|
8
|
-
const listKind = v.picklist([
|
|
9
|
-
"prompts",
|
|
10
|
-
"resource-templates",
|
|
11
|
-
"resources",
|
|
12
|
-
"tools"
|
|
13
|
-
]);
|
|
14
|
-
/**
|
|
15
|
-
* The MCP grants of the Console belong to the person who signed in to it. Agents and MCP clients of the app's own
|
|
16
|
-
* operations cannot drive them. The CLI of `vite dev` uses them as the local developer.
|
|
17
|
-
*/
|
|
18
|
-
function caller(context) {
|
|
19
|
-
if (context.surface !== "console" && context.surface !== "cli") throw consoleRequestError(403, "MCP connections of the Console belong to the person who opened the Console. Agents cannot use them.");
|
|
20
|
-
return {
|
|
21
|
-
access: context.access,
|
|
22
|
-
...context.request ? { request: context.request } : {}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
const server = () => import("../../../mcp-client-C91h8Taa.js");
|
|
26
|
-
/** The operations of the MCP client section. The Console contributes them only when `console.mcpClient` is on. */
|
|
27
|
-
const consoleMcpClientOperations = [
|
|
28
|
-
defineConsoleOperation({
|
|
29
|
-
description: "List your MCP connections and the MCP servers that this app announces.",
|
|
30
|
-
input: v.strictObject({}),
|
|
31
|
-
kind: "read",
|
|
32
|
-
name: "mcp-client.list",
|
|
33
|
-
run: async (_input, context) => (await server()).listConsoleMcp(caller(context), { sharedSession: false }),
|
|
34
|
-
section: "mcp-client"
|
|
35
|
-
}),
|
|
36
|
-
defineConsoleOperation({
|
|
37
|
-
cli: { positional: ["server"] },
|
|
38
|
-
description: "Connect to an MCP server. Without a token, a server that asks for credentials starts the OAuth sign-in.",
|
|
39
|
-
input: v.strictObject({
|
|
40
|
-
label: v.optional(v.pipe(v.string(), v.maxLength(80))),
|
|
41
|
-
prompt,
|
|
42
|
-
server: v.pipe(v.string(), v.minLength(1), v.maxLength(2048)),
|
|
43
|
-
token: optionalText
|
|
44
|
-
}),
|
|
45
|
-
kind: "write",
|
|
46
|
-
name: "mcp-client.connect",
|
|
47
|
-
run: async (input, context) => (await server()).connectConsoleMcp(caller(context), input),
|
|
48
|
-
section: "mcp-client"
|
|
49
|
-
}),
|
|
50
|
-
defineConsoleOperation({
|
|
51
|
-
description: "Finish the OAuth sign-in that an authorization server redirected back from.",
|
|
52
|
-
input: v.strictObject({
|
|
53
|
-
code: optionalText,
|
|
54
|
-
error: v.optional(v.pipe(v.string(), v.maxLength(200))),
|
|
55
|
-
errorDescription: optionalText,
|
|
56
|
-
iss: optionalText,
|
|
57
|
-
state: v.pipe(v.string(), v.minLength(1), v.maxLength(200))
|
|
58
|
-
}),
|
|
59
|
-
kind: "write",
|
|
60
|
-
name: "mcp-client.complete",
|
|
61
|
-
run: async (input, context) => (await server()).completeConsoleMcp(caller(context), input),
|
|
62
|
-
section: "mcp-client"
|
|
63
|
-
}),
|
|
64
|
-
defineConsoleOperation({
|
|
65
|
-
cli: { positional: ["id"] },
|
|
66
|
-
description: "Sign in to an MCP connection again, or open a new MCP session.",
|
|
67
|
-
input: v.strictObject({
|
|
68
|
-
id,
|
|
69
|
-
prompt
|
|
70
|
-
}),
|
|
71
|
-
kind: "write",
|
|
72
|
-
name: "mcp-client.reconnect",
|
|
73
|
-
run: async (input, context) => (await server()).reconnectConsoleMcp(caller(context), input),
|
|
74
|
-
section: "mcp-client"
|
|
75
|
-
}),
|
|
76
|
-
defineConsoleOperation({
|
|
77
|
-
cli: { positional: ["id"] },
|
|
78
|
-
description: "End the MCP session of a connection, revoke its OAuth tokens, and forget it.",
|
|
79
|
-
input: v.strictObject({ id }),
|
|
80
|
-
kind: "write",
|
|
81
|
-
name: "mcp-client.disconnect",
|
|
82
|
-
run: async (input, context) => (await server()).disconnectConsoleMcp(caller(context), input),
|
|
83
|
-
section: "mcp-client"
|
|
84
|
-
}),
|
|
85
|
-
defineConsoleOperation({
|
|
86
|
-
cli: { positional: ["id", "kind"] },
|
|
87
|
-
description: "List the tools, resources, resource templates, or prompts of an MCP connection, one page at a time.",
|
|
88
|
-
input: v.strictObject({
|
|
89
|
-
cursor: optionalText,
|
|
90
|
-
id,
|
|
91
|
-
kind: listKind
|
|
92
|
-
}),
|
|
93
|
-
kind: "read",
|
|
94
|
-
name: "mcp-client.items",
|
|
95
|
-
run: async (input, context) => (await server()).listConsoleMcpItems(caller(context), input),
|
|
96
|
-
section: "mcp-client"
|
|
97
|
-
}),
|
|
98
|
-
defineConsoleOperation({
|
|
99
|
-
cli: { positional: ["id", "tool"] },
|
|
100
|
-
description: "Call one tool of an MCP connection and return its result, or the error of the server.",
|
|
101
|
-
input: v.strictObject({
|
|
102
|
-
arguments: v.optional(v.record(v.string(), v.unknown())),
|
|
103
|
-
id,
|
|
104
|
-
tool: v.pipe(v.string(), v.minLength(1), v.maxLength(256))
|
|
105
|
-
}),
|
|
106
|
-
kind: "write",
|
|
107
|
-
maxRequestBytes: 262144,
|
|
108
|
-
name: "mcp-client.call",
|
|
109
|
-
run: async (input, context) => (await server()).callConsoleMcpTool(caller(context), input),
|
|
110
|
-
section: "mcp-client"
|
|
111
|
-
}),
|
|
112
|
-
defineConsoleOperation({
|
|
113
|
-
cli: { positional: ["id", "uri"] },
|
|
114
|
-
description: "Read one resource of an MCP connection.",
|
|
115
|
-
input: v.strictObject({
|
|
116
|
-
id,
|
|
117
|
-
uri: v.pipe(v.string(), v.minLength(1), v.maxLength(2048))
|
|
118
|
-
}),
|
|
119
|
-
kind: "read",
|
|
120
|
-
name: "mcp-client.read",
|
|
121
|
-
run: async (input, context) => (await server()).readConsoleMcpResource(caller(context), input),
|
|
122
|
-
section: "mcp-client"
|
|
123
|
-
}),
|
|
124
|
-
defineConsoleOperation({
|
|
125
|
-
cli: { positional: ["id", "name"] },
|
|
126
|
-
description: "Get one prompt of an MCP connection with its arguments filled in.",
|
|
127
|
-
input: v.strictObject({
|
|
128
|
-
arguments: v.optional(v.record(v.string(), v.string())),
|
|
129
|
-
id,
|
|
130
|
-
name: v.pipe(v.string(), v.minLength(1), v.maxLength(256))
|
|
131
|
-
}),
|
|
132
|
-
kind: "read",
|
|
133
|
-
name: "mcp-client.prompt",
|
|
134
|
-
run: async (input, context) => (await server()).getConsoleMcpPrompt(caller(context), input),
|
|
135
|
-
section: "mcp-client"
|
|
136
|
-
})
|
|
137
|
-
];
|
|
138
|
-
//#endregion
|
|
139
|
-
export { consoleMcpClientOperations };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { n as ConsolePageUser } from "../../../page-tool-PmxH65gt.js";
|
|
2
|
-
//#region src/console/runtime/server/page-auth.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Whether Better Auth's `admin()` plugin counts a user as an admin: one of the comma-separated roles in `user.role` is
|
|
5
|
-
* in `adminRoles` (default `admin`), or the id is in `adminUserIds`. `VITEHUB_ADMINS` and `vitehub auth claim` give
|
|
6
|
-
* this role. Without `admin()`, nobody is an admin.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isAuthAdmin(plugins: readonly unknown[] | undefined, user: {
|
|
9
|
-
id: string;
|
|
10
|
-
role?: unknown;
|
|
11
|
-
}): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The ViteHub Auth user of a page request, for the Console page tool: an admin of `admin()`, or a user with the
|
|
14
|
-
* `console` role, which Site access gives to Console members, gets the link. `signOut` is Better Auth's sign-out route
|
|
15
|
-
* below the app's Auth `basePath`, for the account menu of the pill. Generated Console output loads it for apps with Auth.
|
|
16
|
-
*/
|
|
17
|
-
export declare function consolePageAuthUser(request: Request): Promise<ConsolePageUser | undefined>;
|
|
18
|
-
//#endregion
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { useAuth } from "@vite-hub/auth/server";
|
|
2
|
-
//#region src/console/runtime/server/page-auth.ts
|
|
3
|
-
function strings(value) {
|
|
4
|
-
if (typeof value === "string") return value.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
5
|
-
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
|
|
6
|
-
}
|
|
7
|
-
function option(plugin, name) {
|
|
8
|
-
const options = plugin !== null && typeof plugin === "object" ? Reflect.get(plugin, "options") : void 0;
|
|
9
|
-
return options !== null && typeof options === "object" ? Reflect.get(options, name) : void 0;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Whether Better Auth's `admin()` plugin counts a user as an admin: one of the comma-separated roles in `user.role` is
|
|
13
|
-
* in `adminRoles` (default `admin`), or the id is in `adminUserIds`. `VITEHUB_ADMINS` and `vitehub auth claim` give
|
|
14
|
-
* this role. Without `admin()`, nobody is an admin.
|
|
15
|
-
*/
|
|
16
|
-
function isAuthAdmin(plugins, user) {
|
|
17
|
-
const admin = plugins?.find((plugin) => plugin !== null && typeof plugin === "object" && Reflect.get(plugin, "id") === "admin");
|
|
18
|
-
if (!admin) return false;
|
|
19
|
-
const roles = strings(option(admin, "adminRoles"));
|
|
20
|
-
const adminRoles = roles.length ? roles : ["admin"];
|
|
21
|
-
const defaultRole = option(admin, "defaultRole");
|
|
22
|
-
return strings(typeof user.role === "string" && user.role ? user.role : typeof defaultRole === "string" && defaultRole ? defaultRole : "user").some((name) => adminRoles.includes(name)) || strings(option(admin, "adminUserIds")).includes(user.id);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The ViteHub Auth user of a page request, for the Console page tool: an admin of `admin()`, or a user with the
|
|
26
|
-
* `console` role, which Site access gives to Console members, gets the link. `signOut` is Better Auth's sign-out route
|
|
27
|
-
* below the app's Auth `basePath`, for the account menu of the pill. Generated Console output loads it for apps with Auth.
|
|
28
|
-
*/
|
|
29
|
-
async function consolePageAuthUser(request) {
|
|
30
|
-
const auth = useAuth(request);
|
|
31
|
-
const user = (await auth.api.getSession({ headers: request.headers }))?.user;
|
|
32
|
-
if (user === null || typeof user !== "object" || !("id" in user) || typeof user.id !== "string") return void 0;
|
|
33
|
-
const person = {
|
|
34
|
-
...user,
|
|
35
|
-
id: user.id
|
|
36
|
-
};
|
|
37
|
-
return {
|
|
38
|
-
user: person,
|
|
39
|
-
console: isAuthAdmin(auth.options.plugins, person) || strings(person.role).includes("console"),
|
|
40
|
-
signOut: `${auth.options.basePath ?? "/api/auth"}/sign-out`
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { consolePageAuthUser, isAuthAdmin };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as installConsolePageTool, i as consolePageToolAllowed, n as ConsolePageUser, r as consolePageAccount, t as ConsolePageToolOptions } from "../../../page-tool-PmxH65gt.js";
|
|
2
|
-
export { ConsolePageToolOptions, ConsolePageUser, consolePageAccount, consolePageToolAllowed, installConsolePageTool };
|