@lobu/runtime-server 24.1.1 → 24.3.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/dist/catalogs/connectors.json +175 -39
- package/dist/catalogs/skills.json +2 -2
- package/dist/component.json +1 -1
- package/dist/connectors/gchat.ts +31 -1
- package/dist/connectors/google_gmail.ts +70 -41
- package/dist/connectors/google_gmail_references.ts +406 -0
- package/dist/connectors/linkedin-inbox-adapter.js +107 -36
- package/dist/connectors/linkedin-inbox.ts +13 -0
- package/dist/connectors/linkedin.ts +1 -1
- package/dist/connectors/postgres.ts +14 -8
- package/dist/connectors/reddit.ts +171 -5
- package/dist/connectors/whatsapp-web-adapter.js +147 -61
- package/dist/connectors/whatsapp-web-helpers.ts +6 -2
- package/dist/connectors/whatsapp_web.ts +48 -17
- package/dist/connectors/x-dm-adapter.js +252 -35
- package/dist/connectors/x.ts +189 -13
- package/dist/db/migrations/20261020140000_view_attachments_by_page.sql +3 -1
- package/dist/db/migrations/20261024050000_events_source_reference_arrival.sql +27 -0
- package/dist/db/migrations/20261026000000_turn_write_receipts.sql +36 -0
- package/dist/db/migrations/20261026190000_federated_relationship_endpoints.sql +143 -0
- package/dist/dependencies.bun.lock +137 -202
- package/dist/embeddings-server.mjs +81 -11
- package/dist/guest.bundle.js +62 -25
- package/dist/owletto/dist/assets/_-XKF0m81R.js +3 -0
- package/dist/owletto/dist/assets/_-e8MbEBtw.js +2 -0
- package/dist/owletto/dist/assets/_agentId-Cv9goIFf.js +2 -0
- package/dist/owletto/dist/assets/_agentId-emObu67X.js +2 -0
- package/dist/owletto/dist/assets/_automationId-CfFFAYK1.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-D6NKXSOE.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-DFrkLLTU.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-D3vuAQPe.js +2 -0
- package/dist/owletto/dist/assets/_eventId-BV5SQaUA.js +2 -0
- package/dist/owletto/dist/assets/_name-DjtJMop4.js +2 -0
- package/dist/owletto/dist/assets/_owner-oBX68rb9.js +3 -0
- package/dist/owletto/dist/assets/_shape-C4lLPAwI.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-Cw-7q6hI.js +2 -0
- package/dist/owletto/dist/assets/_slug-B2g5qzn3.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-CIKGCtdK.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-Dx4kJo7o.js +2 -0
- package/dist/owletto/dist/assets/accept-invitation-38lHBvjO.js +2 -0
- package/dist/owletto/dist/assets/activity-route-view-voRYSM3a.js +2 -0
- package/dist/owletto/dist/assets/agent-card-controls-DiU7Un5w.js +2 -0
- package/dist/owletto/dist/assets/{agent-client-setup-list-BlXB4SE5.js → agent-client-setup-list-Bkyw22GW.js} +4 -4
- package/dist/owletto/dist/assets/agent-connect-pages-CpBxQCpx.js +2 -0
- package/dist/owletto/dist/assets/{agent-editor-form-DsSoeQeF.js → agent-editor-form-QrIDroFL.js} +2 -2
- package/dist/owletto/dist/assets/agent-guardrails-route-CyoGSxcZ.js +2 -0
- package/dist/owletto/dist/assets/{agent-loading-shells-B7v6Cffw.js → agent-loading-shells-CamDtzHY.js} +2 -2
- package/dist/owletto/dist/assets/agent-permissions-matrix-CgsQ8BK_.js +2 -0
- package/dist/owletto/dist/assets/{agent-skill-context-DFucg4c4.js → agent-skill-context-lWbXKEm1.js} +2 -2
- package/dist/owletto/dist/assets/agent-skills-route-D-w3tY_2.js +2 -0
- package/dist/owletto/dist/assets/agent-subpage-shell-CLqpn5Tb.js +2 -0
- package/dist/owletto/dist/assets/{agent-thread-D38STyeu.js → agent-thread-CsRexwTv.js} +4 -4
- package/dist/owletto/dist/assets/agents-DzH_FFKU.js +2 -0
- package/dist/owletto/dist/assets/agents-workbench-CmGrMvPC.js +2 -0
- package/dist/owletto/dist/assets/app-bridge-C4nPtae3.js +121 -0
- package/dist/owletto/dist/assets/app._appId-BO7G38fL.js +2 -0
- package/dist/owletto/dist/assets/automation-detail-content-DMYxs6F6.js +2 -0
- package/dist/owletto/dist/assets/automations-DzH_FFKU.js +2 -0
- package/dist/owletto/dist/assets/calendar-DDCCSPW6.js +2 -0
- package/dist/owletto/dist/assets/callback-DFciMR8u.js +2 -0
- package/dist/owletto/dist/assets/{card-jzhQrMDP.js → card-BCsbrdGs.js} +2 -2
- package/dist/owletto/dist/assets/{claim-B-wq745Q.js → claim-BRua2b_7.js} +2 -2
- package/dist/owletto/dist/assets/client-activity-scopes-BLIy1Zc3.js +2 -0
- package/dist/owletto/dist/assets/client-rows-DiJQ5D1z.js +2 -0
- package/dist/owletto/dist/assets/clients-8-EpRjsm.js +2 -0
- package/dist/owletto/dist/assets/{code-editor-CEqoCky-.js → code-editor-BFZa4EIt.js} +3 -3
- package/dist/owletto/dist/assets/connect-C0cHE9Xl.js +2 -0
- package/dist/owletto/dist/assets/connect-menu-D2K4tmvW.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-D4EG5a0v.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-DhoCT6sT.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-Dn4qw2Us.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.index-BTI5JXA3.js +2 -0
- package/dist/owletto/dist/assets/connection-X9VU9Ijm.js +2 -0
- package/dist/owletto/dist/assets/connection-feed-detail-B6ydKasK.js +2 -0
- package/dist/owletto/dist/assets/connections-browser-BMV8bf54.js +2 -0
- package/dist/owletto/dist/assets/connector-boxes-DqZA-FdG.js +2 -0
- package/dist/owletto/dist/assets/{connector-provenance-D-ECOlMJ.js → connector-provenance-BIg8P8WY.js} +2 -2
- package/dist/owletto/dist/assets/connector-scope-lists-CJYz53YF.js +2 -0
- package/dist/owletto/dist/assets/{connectors-CH4KBZyT.js → connectors-BroKpwhB.js} +2 -2
- package/dist/owletto/dist/assets/{consent-C9ZpHb7V.js → consent-fzLN-Qy7.js} +2 -2
- package/dist/owletto/dist/assets/copy-button-Df7QXE0w.js +2 -0
- package/dist/owletto/dist/assets/{core.esm-BupT3V0i.js → core.esm-A1UnFbGs.js} +2 -2
- package/dist/owletto/dist/assets/create-BjwsYarn.js +2 -0
- package/dist/owletto/dist/assets/create-Dzr4mlr0.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-DHW6OUoS.js +3 -0
- package/dist/owletto/dist/assets/create-c94SPL21.js +2 -0
- package/dist/owletto/dist/assets/create._connectorKey-DLLn2nej.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-CWImw-kf.js → cronstrue-xxpD1P2-.js} +2 -2
- package/dist/owletto/dist/assets/{device-D-7WBe9E.js → device-C3AEoL5c.js} +2 -2
- package/dist/owletto/dist/assets/{device-pin-tombstone-2U0UMu3_.js → device-pin-tombstone-B_te59GE.js} +2 -2
- package/dist/owletto/dist/assets/device._deviceId-ZU09qrot.js +2 -0
- package/dist/owletto/dist/assets/elk-worker.min-BENGc9gn.js +23 -0
- package/dist/owletto/dist/assets/{entity-avatar-mdh7Kq5D.js → entity-avatar-CEV4ttUQ.js} +2 -2
- package/dist/owletto/dist/assets/entity-options-DJv2EhVV.js +2 -0
- package/dist/owletto/dist/assets/entity-page-BUghWZ1s.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-Lf6ONdpf.js +2 -0
- package/dist/owletto/dist/assets/event-card-CBlsG32u.js +2 -0
- package/dist/owletto/dist/assets/event-detail-BKSGEOdW.js +2 -0
- package/dist/owletto/dist/assets/events-feed-VfU4csn2.js +2 -0
- package/dist/owletto/dist/assets/feed-event-kinds-BYuZCoU4.js +2 -0
- package/dist/owletto/dist/assets/filter-bar-COU0sBFQ.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-BVbcpW3R.js → full-page-spinner-C1Q_jEzD.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-6ZJv1uzM.js +2 -0
- package/dist/owletto/dist/assets/identity-BaFLmbSo.js +2 -0
- package/dist/owletto/dist/assets/index-008wj-Pz.js +7950 -0
- package/dist/owletto/dist/assets/index-BaetvYLa.js +2 -0
- package/dist/owletto/dist/assets/index-BiEf5xOE.css +1 -0
- package/dist/owletto/dist/assets/{index-CxF2XXzl.js → index-BrDP4PCs.js} +2 -2
- package/dist/owletto/dist/assets/index-BuXIeK7D.js +2 -0
- package/dist/owletto/dist/assets/index-CAVcR9za.js +2 -0
- package/dist/owletto/dist/assets/index-CMLfWGPU.js +2 -0
- package/dist/owletto/dist/assets/index-D0YEYP7N.js +2 -0
- package/dist/owletto/dist/assets/index-DFyBbp7b.js +2 -0
- package/dist/owletto/dist/assets/{index-D7gHOpfg.js → index-DNtYqkiA.js} +2 -2
- package/dist/owletto/dist/assets/index-DQxzeM37.js +2 -0
- package/dist/owletto/dist/assets/index-DkO0nPex.js +2 -0
- package/dist/owletto/dist/assets/index-KlRId0g6.js +2 -0
- package/dist/owletto/dist/assets/index-Ywnqi4A6.js +2 -0
- package/dist/owletto/dist/assets/index-wHFQv1aT.js +12 -0
- package/dist/owletto/dist/assets/index-xnxhf3Op.js +2 -0
- package/dist/owletto/dist/assets/{index-BTlx9K_t.js → index-yIub2xUM.js} +2 -2
- package/dist/owletto/dist/assets/json-diff-LE_vNZrM.js +4 -0
- package/dist/owletto/dist/assets/{list-skeleton-CepswBka.js → list-skeleton-Kzxi2OXB.js} +2 -2
- package/dist/owletto/dist/assets/login-DWOT6jtS.js +2 -0
- package/dist/owletto/dist/assets/logout-Dt_VDilG.js +2 -0
- package/dist/owletto/dist/assets/{member-scope-gate-DD4YBFn-.js → member-scope-gate-De75CR7W.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-p2vIbfkC.js +74 -0
- package/dist/owletto/dist/assets/{model-selector-CDrAjH31.js → model-selector-3l9lY50C.js} +2 -2
- package/dist/owletto/dist/assets/model-udnQ_S43.js +2 -0
- package/dist/owletto/dist/assets/models-CQj7GIOp.js +2 -0
- package/dist/owletto/dist/assets/new-BOwIHkre.js +2 -0
- package/dist/owletto/dist/assets/{new-ktz9Cs_P.js → new-BbdwuJPm.js} +2 -2
- package/dist/owletto/dist/assets/new-DTuFCQhV.js +2 -0
- package/dist/owletto/dist/assets/{oauth-workspace-access-lZNZ9gul.js → oauth-workspace-access-QPo4YwRX.js} +2 -2
- package/dist/owletto/dist/assets/organization-BDzjnqPf.js +2 -0
- package/dist/owletto/dist/assets/peek-pane-content-D7yt0PrA.js +2 -0
- package/dist/owletto/dist/assets/permissions-CfoY4WFY.js +2 -0
- package/dist/owletto/dist/assets/proposal-review-shell-CVkLnnKo.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-DXUTTGGp.js +2 -0
- package/dist/owletto/dist/assets/record-activity-BXhvJbd9.js +2 -0
- package/dist/owletto/dist/assets/{record-session-Pbr5czGw.js → record-session-D07szzqN.js} +2 -2
- package/dist/owletto/dist/assets/renderer-AJxSmE3-.js +97 -0
- package/dist/owletto/dist/assets/reset-password-kRYyQuTY.js +2 -0
- package/dist/owletto/dist/assets/runs-lG2ChtOt.js +2 -0
- package/dist/owletto/dist/assets/runs-panel-LnGpHCAQ.js +2 -0
- package/dist/owletto/dist/assets/schema-type-editor-panel-C_Es0qDf.js +2 -0
- package/dist/owletto/dist/assets/settings-CEAOg7fr.js +2 -0
- package/dist/owletto/dist/assets/settings-gGYXbFfd.js +2 -0
- package/dist/owletto/dist/assets/skills-BOL5c_Tk.js +2 -0
- package/dist/owletto/dist/assets/source-record-panels-CjFPgKKJ.js +2 -0
- package/dist/owletto/dist/assets/status-dot-CSBtKT4g.js +2 -0
- package/dist/owletto/dist/assets/table-DHM-vCxP.js +2 -0
- package/dist/owletto/dist/assets/use-automations-C4TSie1i.js +2 -0
- package/dist/owletto/dist/assets/{use-mention-search-Dcunv4L0.js → use-mention-search-PfZrNbu_.js} +4 -4
- package/dist/owletto/dist/assets/use-scroll-sentinel-D-fJx_Md.js +2 -0
- package/dist/owletto/dist/assets/view-param-filters-DkX4YdDT.js +2 -0
- package/dist/owletto/dist/assets/views-access-required-2ubIf_3N.js +2 -0
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +137007 -132255
- package/npm-shrinkwrap.json +723 -1095
- package/package.json +7 -10
- package/vendor/@better-auth-kysely-adapter/LICENSE.md +20 -0
- package/vendor/@better-auth-kysely-adapter/README.md +17 -0
- package/vendor/@better-auth-kysely-adapter/dist/bun-sqlite-dialect-DoOVo4ja.mjs +123 -0
- package/vendor/@better-auth-kysely-adapter/dist/d1-sqlite-dialect-Cru74LbR.mjs +133 -0
- package/vendor/@better-auth-kysely-adapter/dist/index.d.mts +116 -0
- package/vendor/@better-auth-kysely-adapter/dist/index.mjs +719 -0
- package/vendor/@better-auth-kysely-adapter/dist/node-sqlite-dialect.d.mts +27 -0
- package/vendor/@better-auth-kysely-adapter/dist/node-sqlite-dialect.mjs +123 -0
- package/vendor/@better-auth-kysely-adapter/dist/sqlite-introspector-DSCAP82F.mjs +90 -0
- package/vendor/@better-auth-kysely-adapter/package.json +52 -0
- package/vendor/connector-sdk/dist/browser-requirement.js +1 -1
- package/vendor/connector-sdk/dist/connector-types.d.ts +34 -1
- package/vendor/connector-sdk/dist/index.d.ts +3 -1
- package/vendor/connector-sdk/dist/index.js +4 -0
- package/vendor/connector-sdk/dist/redact.d.ts +10 -0
- package/vendor/connector-sdk/dist/redact.js +130 -0
- package/vendor/connector-sdk/dist/types.d.ts +2 -1
- package/vendor/connector-sdk/package.json +6 -1
- package/vendor/core/dist/agent-tooling.d.ts +8 -0
- package/vendor/core/dist/agent-tooling.js +9 -1
- package/vendor/core/dist/capabilities.d.ts +1 -1
- package/vendor/core/dist/capabilities.js +5 -0
- package/vendor/core/dist/connector-query-errors.d.ts +6 -0
- package/vendor/core/dist/connector-query-errors.js +4 -0
- package/vendor/core/dist/contracts/entity-reference.d.ts +3 -0
- package/vendor/core/dist/contracts/entity-reference.js +31 -0
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +3 -0
- package/vendor/core/dist/contracts/tools/manage-automations.js +4 -1
- package/vendor/core/dist/contracts/tools/manage-connections.js +1 -1
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +2 -2
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +117 -34
- package/vendor/core/dist/contracts/tools/manage-entity.js +47 -14
- package/vendor/core/dist/contracts/tools/manage-operations.d.ts +13 -4
- package/vendor/core/dist/contracts/tools/manage-operations.js +19 -7
- package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +6 -1
- package/vendor/core/dist/contracts/tools/read-knowledge.js +20 -1
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +1 -1
- package/vendor/core/dist/contracts/tools/view-runtime.d.ts +2 -0
- package/vendor/core/dist/contracts/tools/view-runtime.js +3 -1
- package/vendor/core/dist/contracts/worker/device-automation.d.ts +4 -9
- package/vendor/core/dist/contracts/worker/device-automation.js +10 -15
- package/vendor/core/dist/contracts/worker/protocol.d.ts +20 -0
- package/vendor/core/dist/contracts/worker/protocol.js +20 -0
- package/vendor/core/dist/errors.d.ts +0 -20
- package/vendor/core/dist/errors.js +1 -25
- package/vendor/core/dist/otel.js +38 -10
- package/vendor/core/dist/reserved.d.ts +6 -3
- package/vendor/core/dist/reserved.js +6 -3
- package/vendor/core/dist/utils/ajv.js +3 -1
- package/vendor/core/dist/worker/auth.d.ts +3 -2
- package/vendor/core/package.json +31 -5
- package/vendor/postgres/.bun-tag-22d644c2873790db +0 -0
- package/vendor/postgres/cf/src/query.js +3 -1
- package/vendor/postgres/cjs/src/query.js +3 -1
- package/vendor/postgres/src/query.js +3 -1
- package/vendor/views/dist/api.js +31 -7
- package/vendor/views/dist/bridge.d.ts +2 -1
- package/vendor/views/dist/bridge.js +10 -1
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-BorucF19.js +0 -3
- package/dist/owletto/dist/assets/_-CkGyNi0G.js +0 -2
- package/dist/owletto/dist/assets/_agentId-BrhcaxUk.js +0 -2
- package/dist/owletto/dist/assets/_agentId-DgRrCE2B.js +0 -2
- package/dist/owletto/dist/assets/_automationId-DSrZIYcs.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-DWxv1uoi.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-BTP5ijdT.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-98Y3RuRO.js +0 -2
- package/dist/owletto/dist/assets/_deploymentId-B1UWPY0i.js +0 -2
- package/dist/owletto/dist/assets/_eventId-BAnr8g8z.js +0 -2
- package/dist/owletto/dist/assets/_name-BUfFO_A0.js +0 -2
- package/dist/owletto/dist/assets/_owner-C79BwQ0I.js +0 -3
- package/dist/owletto/dist/assets/_shape-Ep6JpyFX.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-B24alBfT.js +0 -2
- package/dist/owletto/dist/assets/_slug-DbPdDc-5.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-DDUxjjFD.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-hdpq3RoX.js +0 -2
- package/dist/owletto/dist/assets/accept-invitation-UXU5Fx2G.js +0 -2
- package/dist/owletto/dist/assets/activity-route-view-D7ORHntE.js +0 -2
- package/dist/owletto/dist/assets/agent-card-controls-CplnPhbv.js +0 -2
- package/dist/owletto/dist/assets/agent-connect-pages-BmknviTI.js +0 -2
- package/dist/owletto/dist/assets/agent-guardrails-route-TdvvIc_J.js +0 -2
- package/dist/owletto/dist/assets/agent-permissions-matrix-BkZu1LYE.js +0 -2
- package/dist/owletto/dist/assets/agent-skills-route-B3vvvZZe.js +0 -2
- package/dist/owletto/dist/assets/agent-subpage-shell-CZJvnjNC.js +0 -2
- package/dist/owletto/dist/assets/agents-DAOln24A.js +0 -2
- package/dist/owletto/dist/assets/agents-workbench-DJ67GZ93.js +0 -2
- package/dist/owletto/dist/assets/app-bridge-BCm4muqj.js +0 -128
- package/dist/owletto/dist/assets/app._appId-Cp78oEZ9.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-DSwbRpbx.js +0 -2
- package/dist/owletto/dist/assets/automations-DAOln24A.js +0 -2
- package/dist/owletto/dist/assets/callback-CBexCo3F.js +0 -2
- package/dist/owletto/dist/assets/client-rows-BYbsXGy9.js +0 -2
- package/dist/owletto/dist/assets/clients-BhNl1tVq.js +0 -2
- package/dist/owletto/dist/assets/connect-wx-qqLir.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-kk0_4Svo.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-QR8o-7M5.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-BqprYeOX.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.index-DhRoSzBr.js +0 -2
- package/dist/owletto/dist/assets/connection-CNm2ukrI.js +0 -2
- package/dist/owletto/dist/assets/connection-feed-detail-WcGCA6qY.js +0 -2
- package/dist/owletto/dist/assets/connections-browser-CrtnAs0Q.js +0 -2
- package/dist/owletto/dist/assets/connector-scope-lists-CRFEpSvk.js +0 -2
- package/dist/owletto/dist/assets/conversations-table-D_HOe1jN.js +0 -2
- package/dist/owletto/dist/assets/create-C4lptGWj.js +0 -2
- package/dist/owletto/dist/assets/create-CCjZxIkK.js +0 -2
- package/dist/owletto/dist/assets/create-DkgUQAbB.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-Bpy92SM5.js +0 -3
- package/dist/owletto/dist/assets/create._connectorKey-D6Kc-YQ3.js +0 -2
- package/dist/owletto/dist/assets/deployments-C5hvipQh.js +0 -2
- package/dist/owletto/dist/assets/deployments-CPpFAd_w.js +0 -2
- package/dist/owletto/dist/assets/deployments-body-DGII20dQ.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-Bn37UpWH.js +0 -2
- package/dist/owletto/dist/assets/entity-options-Clz_WXK-.js +0 -2
- package/dist/owletto/dist/assets/entity-page-D3e4iPle.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-DebN1vCM.js +0 -2
- package/dist/owletto/dist/assets/event-detail-DV_zfWnC.js +0 -2
- package/dist/owletto/dist/assets/events-feed-DO3IiJO2.js +0 -2
- package/dist/owletto/dist/assets/filter-editors-Bwhqj7lY.js +0 -2
- package/dist/owletto/dist/assets/guardrails-BiJollCA.js +0 -2
- package/dist/owletto/dist/assets/identity-HCFWtdaI.js +0 -2
- package/dist/owletto/dist/assets/index-8wxsyxqt.js +0 -2
- package/dist/owletto/dist/assets/index-9YuSRymd.js +0 -7950
- package/dist/owletto/dist/assets/index-B3c-0eZG.js +0 -2
- package/dist/owletto/dist/assets/index-B64PGxQm.js +0 -2
- package/dist/owletto/dist/assets/index-BSH07yVD.css +0 -1
- package/dist/owletto/dist/assets/index-BX0EA_oB.js +0 -2
- package/dist/owletto/dist/assets/index-CDz3-ieP.js +0 -12
- package/dist/owletto/dist/assets/index-CdJJaQDX.js +0 -2
- package/dist/owletto/dist/assets/index-CfT_W8Vo.js +0 -2
- package/dist/owletto/dist/assets/index-D3WHeGql.js +0 -2
- package/dist/owletto/dist/assets/index-DB1iWI_a.js +0 -2
- package/dist/owletto/dist/assets/index-DMNzF8Lf.js +0 -2
- package/dist/owletto/dist/assets/index-DyB3IzOA.js +0 -2
- package/dist/owletto/dist/assets/index-Vcq4gwWv.js +0 -2
- package/dist/owletto/dist/assets/index-fgAJydgX.js +0 -2
- package/dist/owletto/dist/assets/json-diff-DIN5Jhfx.js +0 -4
- package/dist/owletto/dist/assets/login-DxGYyE4n.js +0 -2
- package/dist/owletto/dist/assets/logout-Bkzc7J44.js +0 -2
- package/dist/owletto/dist/assets/memory-browse-page-BnuhLJ6X.css +0 -1
- package/dist/owletto/dist/assets/memory-browse-page-D_UlBa27.js +0 -103
- package/dist/owletto/dist/assets/models-BAVeysNq.js +0 -2
- package/dist/owletto/dist/assets/new-C2av0diq.js +0 -2
- package/dist/owletto/dist/assets/new-snm1ctHn.js +0 -2
- package/dist/owletto/dist/assets/organization-Cb0W823y.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-BNR9ImQY.js +0 -2
- package/dist/owletto/dist/assets/permissions-Dv39zWKt.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-CFhOqCLf.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-DqX8AXfw.js +0 -2
- package/dist/owletto/dist/assets/recent-QhnLDU1_.js +0 -2
- package/dist/owletto/dist/assets/record-activity-ZJntBfN_.js +0 -2
- package/dist/owletto/dist/assets/record-field-peek-Brh1IQGy.js +0 -2
- package/dist/owletto/dist/assets/reset-password-CzZw6RcC.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-C0_DNTcq.js +0 -2
- package/dist/owletto/dist/assets/runs-table-B1APZv7d.js +0 -2
- package/dist/owletto/dist/assets/schema-value-normalization-CKdPjdPC.js +0 -97
- package/dist/owletto/dist/assets/settings-CgZ5Z7wD.js +0 -2
- package/dist/owletto/dist/assets/settings-VDNiffKU.js +0 -2
- package/dist/owletto/dist/assets/skills-DgDGscm5.js +0 -2
- package/dist/owletto/dist/assets/source-record-panels-BdfOVPWn.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-B0quibBi.js +0 -2
- /package/vendor/{postgres/.bun-tag-2f292c6554a8475e → @better-auth-kysely-adapter/.bun-tag-abf95749a412716} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as fe,et as oe,hS as ge,hT as ie,hU as ke,ay as ce,hX as je,hY as be,hZ as ve,h_ as ye,r as j,u as re,h$ as _e,j as s,hp as Ae,i0 as Ce,V as ue,hq as w,i1 as Ne,d9 as H,ho as Se,B as f,cL as Oe,h as I,hn as ne,h4 as De,h5 as Le,h6 as we,h7 as Me,h8 as Pe,i2 as $e,i3 as ae,i4 as Fe,L as Re,i5 as Ue,i6 as ze,i7 as Be,bX as B,i8 as Ee,i9 as Ie,bW as Te,eB as qe,H as Y,f3 as Ke,dk as Ve,I as le,eC as Xe,b_ as We,a5 as Ye,eD as He}from"./index-008wj-Pz.js";function es({connector:t,organizationId:l,ownerSlug:n,connections:r,openNewApp:g=!1,onNewAppHandled:c}){const{session:b}=fe(),{isAdmin:u,isLoading:A}=oe(l),M=ge(t.auth_schema),i=ie(t.auth_schema),C=ke(t.auth_schema),N=ce(l,{connectorKey:t.key,provider:i?.provider}),m=je(l,t.key),S=be(),P=ve(),h=ye(),[O,D]=j.useState(null),[v,y]=j.useState(null),[x,$]=j.useState([]),F=re(),k=j.useCallback(e=>F?.open({href:"",key:`oauth-apps:${t.key}`,title:"OAuth apps",connectorPanel:{section:"oauth-apps",connectorKey:t.key,organizationId:l,ownerSlug:n,newApp:e}}),[F,t.key,l,n]);j.useEffect(()=>{!g||!u||(k(!0),c?.())},[g,u,k,c]);const R=b?.user?.id;if(!R||A||N.isLoading||m.isPending)return null;const a=(N.data??[]).filter(e=>e.profile_kind==="oauth_app"),_=a.filter(e=>e.status==="active"),Z=e=>E(e,t.key),U=_.find(Z),de=new Set(r.map(e=>e.auth_profile_slug)),he=(N.data??[]).filter(e=>e.profile_kind==="oauth_account"&&e.created_by===R&&!de.has(e.slug)),pe=(m.data?.options??[]).filter(e=>e.kind!=="local"&&e.configured&&!!e.url),T=m.data?.options.find(e=>e.kind==="local"),q=m.isError||m.data?.cloud_status==="unavailable",d=[],G=e=>({key:`app:${e.slug}`,kind:"app",slug:e.slug,button:"Connect account",label:e.display_name,hint:"Your OAuth app",badge:Z(e)?"Default":void 0,canLead:!!U||_.length===1}),K=u?_:U?[U]:[],V=U??(K.length===1?K[0]:void 0);V&&d.push(G(V));for(const e of pe)d.push({key:`offer:${e.kind}:${e.managed_by_org??e.url}`,kind:"link",href:e.url,external:!0,note:e.instructions,button:e.label,label:e.label,hint:e.execution==="cloud"?"Runs in Lobu Cloud":"The cloud holds the grant; data syncs here",canLead:!0});C&&T?.configured&&T.url&&d.push({key:"install",kind:"link",href:_e(T.url,{installShape:C.installShape}),external:!1,button:`Install ${t.name} app`,label:`Install ${t.name} app`,hint:"Installs on your provider account",canLead:!0});for(const e of K)e!==V&&d.push(G(e));for(const e of he){const o=e.status==="active";d.push({key:`account:${e.slug}`,kind:"account",profile:e,button:o?"Use this account":"Reconnect",label:`${o?"Use":"Reconnect"} ${e.display_name}`,canLead:!1})}(!i||M.some(e=>e.type!=="oauth"))&&d.push({key:"create",kind:"create",button:"Add connection",label:C?"Use your own app":"Add connection",canLead:!0});const me=u&&i?{key:"new-app",kind:"new-app",button:"New OAuth app",label:"New OAuth app…",canLead:!0}:void 0,p=d.find(e=>e.canLead)??(d.length?void 0:me),J=e=>h.begin(()=>S.mutateAsync({connector_key:t.key,app_auth_profile_slug:e,requested_scopes:i?Ue(i,x):[]})),X=e=>{if(D(null),e.kind==="app")i&&ae(i).length?y(e.slug):J(e.slug);else if(e.kind==="account"){const{profile:o}=e;h.begin(()=>o.status==="active"?S.mutateAsync({connector_key:t.key,auth_profile_slug:o.slug}):P.mutateAsync({auth_profile_slug:o.slug}))}else e.kind==="new-app"?k(!0):e.kind==="link"&&D(e.note??null)},Q=(e,o)=>e.kind==="link"?s.jsx("a",{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},onClick:()=>X(e),children:o}):e.kind==="create"?s.jsx(Re,{to:"/$owner/connectors/create/$connectorKey",params:{owner:n,connectorKey:t.key},children:o}):null,z=d.length===1&&d[0]===p?[]:d,ee=!!(u&&i),W=z.length>0||q||ee&&(d.length>0||a.length>0),se=s.jsxs(Ae,{align:"end",className:"w-72",children:[z.length?s.jsx(Ce,{children:"Connect with"}):null,z.map(e=>{const o=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate",children:e.label}),e.hint?s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.hint}):null]}),e.badge?s.jsx(ue,{variant:"secondary",className:"text-[10px]",children:e.badge}):null]}),L=Q(e,o);return L?s.jsx(w,{asChild:!0,children:L},e.key):s.jsx(w,{onSelect:()=>X(e),children:o},e.key)}),q?s.jsx(w,{onSelect:e=>{e.preventDefault(),m.refetch()},children:s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block",children:"Retry cloud options"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:"Cloud connection options could not be checked"})]})}):null,ee?s.jsxs(s.Fragment,{children:[z.length||q?s.jsx(Ne,{}):null,s.jsxs(w,{onSelect:()=>k(!0),children:[s.jsx(H,{}),"New OAuth app…"]}),a.length?s.jsx(w,{onSelect:()=>k(!1),children:"Manage OAuth apps…"}):null]}):null]}),te=s.jsx(Se,{asChild:!0,children:s.jsxs(f,{size:"sm",variant:p?"default":"outline",className:I(p&&"rounded-l-none border-l border-primary-foreground/25 px-2"),"aria-label":p?"More ways to connect":void 0,children:[p?null:"Connect",s.jsx(Oe,{className:"size-3.5"})]})});return s.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1.5",children:[p?s.jsxs(ne,{children:[s.jsxs("div",{className:"inline-flex",children:[(()=>{const e=s.jsxs(s.Fragment,{children:[p.kind==="new-app"||p.kind==="create"?s.jsx(H,{className:"size-3.5"}):null,p.button]}),o=Q(p,e);return s.jsx(f,{size:"sm",disabled:h.pending,className:I(W&&"rounded-r-none"),asChild:!!o,onClick:o?void 0:()=>X(p),children:o??e})})(),W?te:null]}),se]}):W?s.jsxs(ne,{children:[te,se]}):s.jsxs(s.Fragment,{children:[s.jsx(f,{size:"sm",disabled:!0,children:"Connect account"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ask an administrator to set the workspace-default OAuth app."})]}),O?s.jsx("p",{className:"max-w-sm text-xs text-muted-foreground",children:O}):null,h.error?s.jsx("p",{role:"alert",className:"max-w-sm text-xs text-destructive",children:h.error}):null,h.continueUrl?s.jsx("a",{href:h.continueUrl,target:"_blank",rel:"noreferrer",className:"text-xs underline",children:"Continue authorization in your browser"}):null,i?s.jsx(De,{open:v!==null,onOpenChange:e=>!e&&y(null),children:s.jsxs(Le,{className:"max-w-md",children:[s.jsxs(we,{children:[s.jsx(Me,{children:"Permissions"}),s.jsxs(Pe,{children:["Choose what ",t.name," may access."]})]}),s.jsx($e,{requiredScopes:Fe(i),optionalScopes:ae(i),selectedOptionalScopes:x,onToggleOptionalScope:(e,o)=>$(L=>o?[...new Set([...L,e])]:L.filter(xe=>xe!==e))}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{size:"sm",disabled:h.pending,onClick:()=>{const e=v;y(null),e&&J(e)},children:"Continue"})})]})}):null]})}function ss({connector:t,organizationId:l,newApp:n}){const r=re(),{isAdmin:g}=oe(l),c=ie(t.auth_schema),b=ce(l,{connectorKey:t.key,provider:c?.provider});return c?s.jsx(Ze,{connector:t,oauthMethod:c,appProfiles:(b.data??[]).filter(u=>u.profile_kind==="oauth_app"),isAdmin:g,initialOpen:n,onClose:n?()=>r?.close():void 0,refetchProfiles:()=>void b.refetch()}):null}function Ze({initialOpen:t=!1,onClose:l,connector:n,oauthMethod:r,appProfiles:g,isAdmin:c,refetchProfiles:b}){const u=ze(),A=Be(),[M,i]=B(n.key,t&&c),[C,N]=j.useState(!1);j.useEffect(()=>{t&&c&&i(!0)},[t,c,i]);const m=`${Ee()}/connect/oauth/callback`,[S,P]=B(n.key,`${n.name} OAuth App`),[h,O]=B(n.key,""),[D,v]=B(n.key,null),y=Ie(r),x=Te(`${n.key}:${M}`,qe(y),y),{values:$,setValues:F}=x,k=g.find(a=>E(a,n.key)),R=()=>{x.canSubmit&&(v(null),u.mutate({connector_key:n.key,profile_kind:"oauth_app",display_name:S.trim()||`${n.name} OAuth App`,slug:h.trim()||void 0,credentials:Je(He($))},{onSuccess:a=>{const _=a.auth_profile?.slug;_&&!k&&A.mutate({connector_key:n.key,auth_profile_slug:_}),i(!1),l?.(),P(`${n.name} OAuth App`),O(""),b()},onError:a=>{v(a instanceof Error?a.message:"Failed to add OAuth app")}}))};return s.jsxs("div",{className:"min-w-0 space-y-4",children:[c&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(Y,{children:"OAuth callback URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:m}),s.jsxs(f,{variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(m).then(()=>N(!0)).catch(()=>v("Could not copy the callback URL. Select and copy it above."))},children:[s.jsx(Ke,{className:"mr-1.5 h-3.5 w-3.5"}),C?"Copied":"Copy callback URL"]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Register this exact URL in your provider’s app settings before saving the client configuration."})]}),g.length>0?s.jsx("div",{className:"space-y-2",children:g.map(a=>s.jsxs("div",{className:I(Ve,"flex flex-wrap items-center gap-3 p-3"),children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"truncate text-sm font-medium",children:a.display_name}),E(a,n.key)?s.jsx(ue,{variant:"secondary",className:"text-[10px]",children:"Default"}):null,s.jsx(Ge,{status:a.status})]}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:a.slug})]}),c&&!E(a,n.key)&&a.connector_key===n.key&&a.status==="active"?s.jsx(f,{variant:"outline",size:"sm",disabled:A.isPending,onClick:()=>A.mutate({connector_key:n.key,auth_profile_slug:a.slug}),children:"Set default"}):null]},a.slug))}):null,c?M?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Y,{htmlFor:"oauth-app-name",children:"Display name"}),s.jsx(le,{id:"oauth-app-name",value:S,onChange:a=>P(a.target.value)})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Y,{htmlFor:"oauth-app-slug",children:"Slug"}),s.jsx(le,{id:"oauth-app-slug",placeholder:"optional",value:h,onChange:a=>O(a.target.value)})]}),s.jsx(Xe,{schema:x.revision??void 0,values:$,onValuesChange:F,fieldIdPrefix:"oauth-app-"}),s.jsx(We,{visible:x.hasConflict,onReload:x.reset}),D?s.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:D}):null,s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(f,{variant:"outline",size:"sm",disabled:u.isPending,onClick:()=>{i(!1),l?.()},children:"Cancel"}),s.jsxs(f,{size:"sm",disabled:u.isPending||!x.canSubmit,onClick:R,children:[u.isPending?s.jsx(Ye,{size:"md",className:"mr-1.5"}):null,"Save OAuth app"]})]})]}):s.jsxs(f,{variant:"outline",size:"sm",onClick:()=>i(!0),children:[s.jsx(H,{className:"size-3.5"}),"Add OAuth app"]}):null]})}function E(t,l){return!!t.is_default_for_connector&&t.connector_key===l}function Ge({status:t}){const l=t==="active"?"text-green-500":t==="error"||t==="revoked"?"text-destructive":"text-amber-500";return s.jsxs("span",{className:I("text-xs",l),children:["· ",t]})}function Je(t){const l={};for(const[n,r]of Object.entries(t))typeof r=="string"&&r.trim()?l[n]=r.trim():(typeof r=="number"||typeof r=="boolean")&&(l[n]=String(r));return l}export{Ge as A,es as C,ss as O};
|
|
2
|
+
//# sourceMappingURL=connect-menu-D2K4tmvW.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{iL as r,j as t,av as a}from"./index-008wj-Pz.js";import{a as i}from"./agent-connect-pages-CpBxQCpx.js";import"./agent-client-setup-list-Bkyw22GW.js";import"./copy-button-Df7QXE0w.js";import"./clients-8-EpRjsm.js";import"./client-rows-DiJQ5D1z.js";function j(){const{owner:e,clientId:o}=r.useParams();return t.jsx(a,{owner:e,children:({ownerSlug:n})=>t.jsx(i,{owner:n,clientId:o})})}export{j as component};
|
|
2
|
+
//# sourceMappingURL=connect._clientId-D4EG5a0v.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as e,av as w,r as y,hy as p,gr as x,gs as u,L as r,gt as o,F as N,bq as j,a$ as _,dz as L,B as $,A,iZ as g}from"./index-008wj-Pz.js";import{E as B}from"./events-feed-VfU4csn2.js";import{u as E}from"./client-activity-scopes-BLIy1Zc3.js";import{u as k}from"./clients-8-EpRjsm.js";import{g as P,a as R}from"./client-rows-DiJQ5D1z.js";import"./event-card-CBlsG32u.js";import"./use-scroll-sentinel-D-fJx_Md.js";import"./use-automations-C4TSie1i.js";import"./renderer-AJxSmE3-.js";import"./calendar-DDCCSPW6.js";import"./table-DHM-vCxP.js";import"./card-BCsbrdGs.js";import"./json-diff-LE_vNZrM.js";import"./index-wHFQv1aT.js";import"./copy-button-Df7QXE0w.js";const S="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-2.5 pb-8 lg:px-6";function D({owner:s,clientId:a,mcpActivityId:t}){return e.jsx("div",{className:S,children:e.jsx(w,{owner:s,children:({organizationId:n,ownerSlug:l})=>e.jsx(O,{ownerSlug:l,organizationId:n,clientId:a,mcpActivityId:t})})})}function O({ownerSlug:s,organizationId:a,clientId:t,mcpActivityId:n}){const{data:l=[],isLoading:f}=k(null),i=y.useMemo(()=>P(l).find(h=>h.clientIds.includes(t)),[t,l]),d=i?.clientIds??[],{data:v=[],isLoading:C}=E({enabled:!!i&&!!a,limit:100,clientIds:d,organizationId:a}),c=n?v.find(h=>h.activityId===n)??null:null,m=i?.title??"Connected agent",b=c?R(c):"Conversation";return!a||f||n&&C?e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(u,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents")]}),title:"Conversation"}),children:e.jsx("p",{className:"py-3 text-xs text-muted-foreground",children:"Loading…"})}):n&&(!i||!c||c.organizationId===null)?e.jsx(N,{to:"/$owner/events",params:{owner:"me"},search:{client_ids:i?d.join(","):t,mcp_activity_id:n},replace:!0}):i?n?e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(u,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents"),e.jsx(r,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:t},className:o,children:m},"app")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(j,{name:c?.clientName??m})}),title:b,meta:e.jsx($,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs(r,{to:"/$owner/events",params:{owner:s},search:{client_ids:d.join(","),mcp_activity_id:n},children:["See in Activity",e.jsx(A,{className:"h-3.5 w-3.5"})]})})}),children:e.jsx(B,{organizationId:a,ownerSlug:s,filters:{clientIds:d,mcpActivityId:n,sortBy:"date",sortOrder:"desc"},hideOriginator:!0,foldConsecutiveCalls:!0,emptyState:e.jsx(_,{icon:L,title:"No activity in this conversation yet",description:"Calls this app makes will appear here."})})}):e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(u,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents"),e.jsx(r,{to:"/$owner/agents/connected/$clientId",params:{owner:s,clientId:t},className:o,children:m},"app")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(j,{name:m})}),title:"Conversation"}),children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a conversation on this app's page to see its activity."})}):e.jsx(p,{header:e.jsx(x,{breadcrumb:e.jsx(u,{crumbs:[e.jsx(r,{to:"/$owner/agents",params:{owner:s},className:o,children:"Agents"},"agents")]}),title:"Conversation"}),children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"This app isn't connected to this workspace, so its activity isn't available."})})}function Y(){const{owner:s,clientId:a}=g.useParams(),t=g.useSearch();return e.jsx(D,{owner:s,clientId:a,mcpActivityId:typeof t.mcp_activity_id=="string"?t.mcp_activity_id:null})}export{Y as component};
|
|
2
|
+
//# sourceMappingURL=connected._clientId.activity-Dn4qw2Us.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as e,V as R,v as U,L as b,bk as $,A as _,t as M,et as D,r as u,S as I,cV as K,cK as G,g4 as f,B as y,a5 as H,hy as V,gr as O,bq as Q,gs as q,gt as W,iS as F,av as J}from"./index-008wj-Pz.js";import{T as X,a as Y,b as S,c as d,d as Z,e as x}from"./table-DHM-vCxP.js";import{a as w,g as P}from"./client-rows-DiJQ5D1z.js";import{u as A}from"./client-activity-scopes-BLIy1Zc3.js";import{u as B,a as ee}from"./clients-8-EpRjsm.js";function se({isLive:n}){return e.jsx(R,{variant:n?"default":"secondary",className:`shrink-0 text-[10px] ${n?"":"text-muted-foreground"}`,title:n?"Live MCP transport":"No live MCP transport; activity history is retained",children:n?"Active":"Ended"})}function L({scopes:n,ownerSlug:i}){const l=U(),o=s=>s.organizationId===null?{to:"/$owner/events",params:{owner:"me"},search:{client_ids:s.clientId,mcp_activity_id:s.activityId}}:{to:"/$owner/agents/connected/$clientId/activity",params:{owner:i,clientId:s.clientId},search:{mcp_activity_id:s.activityId}},r=s=>{l(o(s))};return e.jsx("div",{className:"rounded-lg border",children:e.jsxs(X,{children:[e.jsx(Y,{children:e.jsxs(S,{children:[e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Conversation"}),e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Calls"}),e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Last action"}),e.jsx(d,{className:"px-3 py-1.5 text-xs",children:"Last active"}),e.jsx(d,{className:"w-8 px-3 py-1.5"})]})}),e.jsx(Z,{children:n.map(s=>e.jsxs(S,{className:"cursor-pointer transition-colors hover:bg-accent/50",onClick:()=>r(s),children:[e.jsx(x,{className:"max-w-0 px-3 py-2 text-xs font-medium",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{...o(s),onClick:c=>c.stopPropagation(),className:"truncate hover:underline",children:w(s)}),s.activityKind==="session"?e.jsx(se,{isLive:s.isLive}):null,s.unreadNotificationCount>0?e.jsxs(R,{variant:"secondary",className:"shrink-0 text-[10px]",children:[s.unreadNotificationCount," unread"]}):null]})}),e.jsx(x,{className:"px-3 py-2 font-mono text-xs text-muted-foreground",children:s.callCount}),e.jsx(x,{className:"max-w-0 truncate px-3 py-2 text-xs text-muted-foreground",children:s.lastAction||"—"}),e.jsx(x,{className:"px-3 py-2 text-xs text-muted-foreground",children:$(s.lastCallAt)}),e.jsx(x,{className:"px-3 py-2 text-right",children:e.jsx("button",{type:"button","aria-label":`View ${w(s)} activity`,className:"text-muted-foreground hover:text-foreground",tabIndex:-1,children:e.jsx(_,{className:"h-3.5 w-3.5"})})})]},`${s.clientId}:${s.activityId}`))})]})})}function te({ownerSlug:n,clientId:i}){const{orgContext:l}=M(),{isAdmin:o}=D(l.organizationId),{data:r=[],isLoading:s}=B(null),c=ee(),[T,h]=u.useState(!1),t=u.useMemo(()=>P(r),[r]).find(a=>a.clientIds.includes(i)),N=t?.clientIds??[],g=A({enabled:!!t,limit:100,clientIds:N,activityKind:"conversation",organizationId:l?.organizationId??null}),p=A({enabled:!!t,limit:100,clientIds:N,activityKind:"session",organizationId:l?.organizationId??null,refetchInterval:a=>a?5e3:!1}),m=g.data??[],v=p.data??[],z=u.useMemo(()=>r.filter(a=>t?.clientIds.includes(a.id)),[r,t]);if(s)return e.jsxs("div",{className:"space-y-4",children:[e.jsx(I,{className:"h-16 w-full rounded-lg"}),e.jsx(I,{className:"h-24 w-full rounded-lg"})]});if(!t)return e.jsx("p",{className:"text-sm text-muted-foreground",children:"This app isn't connected to this workspace, so its details aren't available."});const j=z[0],C=j?.details?.redirectUris??[],k=t.linkedUserEntitySlug?K(n,[{entity_type:"$member",slug:t.linkedUserEntitySlug}]):null,E=[{label:"Registered",value:t.title},{label:t.clientIds.length===1?"Client ID":"Client IDs",value:e.jsx("div",{className:"space-y-1",children:t.clientIds.map(a=>e.jsx("code",{className:"block break-all",children:a},a))})},...t.drivenBy&&t.drivenBy!==t.title?[{label:"Driven by",value:t.drivenBy}]:[],...j?.platform?[{label:"Software",value:j.platform}]:[],...C.length>0?[{label:"Redirects",value:C.join(", ")}]:[],{label:"Granted by",value:k&&t.linkedUser?e.jsx(b,{to:k,className:"font-medium text-primary hover:underline",children:t.linkedUser}):t.linkedUser??"—"},{label:"Last active",value:t.connected?G(t.lastSeenAt):"disconnected"},{label:"Registrations",value:String(t.clientIds.length)}];return e.jsxs("div",{className:"space-y-7",children:[e.jsx(f,{title:"Settings",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border text-xs",children:e.jsx("dl",{className:"divide-y",children:E.map(a=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-28 shrink-0 text-muted-foreground",children:a.label}),e.jsx("dd",{className:"min-w-0 flex-1 break-words",children:a.value})]},a.label))})}),o&&t.connected?e.jsxs("div",{className:"space-y-2 rounded-lg border p-3",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Revoking disconnects every registration this app holds",t.clientIds.length>1?` (${t.clientIds.length} of them)`:""," ","and kills its live sessions. It can reconnect by authorizing again."]}),T?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{variant:"destructive",size:"sm",className:"h-7 px-2 text-xs",disabled:c.isPending,onClick:()=>c.mutate({clientId:t.clientIds[0],scope:"all"},{onSettled:()=>h(!1)}),children:c.isPending?"Revoking…":"Confirm revoke"}),e.jsx(y,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",disabled:c.isPending,onClick:()=>h(!1),children:"Cancel"})]}):e.jsx(y,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs text-destructive hover:text-destructive",onClick:()=>h(!0),children:"Revoke"})]}):null]})}),e.jsx(f,{title:"Conversations",count:m.length>0?String(m.length):void 0,children:g.isLoading||p.isLoading?e.jsxs("div",{className:"flex items-center py-4 text-xs text-muted-foreground",children:[e.jsx(H,{className:"mr-2"})," Loading client activity…"]}):g.isError||p.isError?e.jsx("p",{className:"py-3 text-xs text-destructive",children:"Could not load this app's activity."}):m.length===0?e.jsx("p",{className:"py-3 text-xs text-muted-foreground",children:"No recent conversations."}):e.jsx(L,{scopes:m,ownerSlug:n})}),v.length>0?e.jsx(f,{title:"Sessions",count:String(v.length),children:e.jsx(L,{scopes:v,ownerSlug:n})}):null]})}const ne="flex min-h-0 flex-1 flex-col gap-3 px-4 pt-2.5 pb-8 lg:px-6";function ae({owner:n,clientId:i}){const{data:l=[]}=B(null),r=u.useMemo(()=>P(l).find(s=>s.clientIds.includes(i)),[i,l])?.title??"Connected agent";return e.jsx("div",{className:ne,children:e.jsx(V,{header:e.jsx(O,{breadcrumb:e.jsx(q,{crumbs:[e.jsx(b,{to:"/$owner/agents",params:{owner:n},className:W,children:"Agents"},"agents")]}),icon:e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(Q,{name:r})}),title:r,caption:"An external agent connected to this workspace through Lobu. Review its Lobu conversations, activity, and access."}),children:e.jsx(te,{ownerSlug:n,clientId:i},i)})})}function xe(){const{owner:n,clientId:i}=F.useParams();return e.jsx(J,{owner:n,children:({ownerSlug:l})=>e.jsx(ae,{owner:l,clientId:i})})}export{xe as component};
|
|
2
|
+
//# sourceMappingURL=connected._clientId.index-BTI5JXA3.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{bu as W,E as F,r as l,$ as z,Q as R,j as e,a5 as N,B as f,bv as V,bw as q,bx as M,by as Y,bz as E,I as B,x as D,a6 as G,ab as J,a1 as K,a8 as H,J as Q}from"./index-008wj-Pz.js";import{C as X,a as Z,b as ee,c as ne}from"./card-BCsbrdGs.js";const w="__new_org__";function te(r){return r.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function C(r){return G.find(i=>i.provider===r)?.name??r}function re(r,i){return`${window.location.origin}/connector/${encodeURIComponent(r)}/connection?${new URLSearchParams({ref:i})}`}function ie(r,i){return r==="account_already_linked_to_different_user"?`This ${i} account belongs to a different Lobu account than the one you are signed in to. Sign out, then continue with ${i} to finish setup as that account.`:`We couldn’t verify your ${i} account for this setup. Sign out, then continue with ${i} to try again.`}function oe(r,i){const[s,n]=l.useState({}),o=i?`${i}:${r}`:null;return l.useEffect(()=>{if(!o||!i||o in s)return;let c=!1;return D(i).then(h=>h.find(g=>g.key===r)?.name??null).catch(()=>null).then(h=>{c||n(g=>({...g,[o]:h}))}),()=>{c=!0}},[o,r,s,i]),o?s[o]??null:null}function I(r,i,s){if(!r)return"/";const n=`/${encodeURIComponent(r)}/`;if(s?.startsWith(n)){const o=new URL(s,window.location.origin);if(o.origin===window.location.origin&&o.pathname.startsWith(n))return o.pathname+o.search}return`${n}connectors/${encodeURIComponent(i)}?connected=1`}function se(r,i){return r==="not_admin"?`You must be an admin or owner to connect ${i} to Lobu.`:`You don't have permission to connect ${i} to Lobu.`}function T(r,i,s){switch(r){case"not_authorized":return se(i,s);case"no_pending":return`No Lobu install was found for ${s}. Add Lobu from the marketplace to get started.`;case"no_org":return`Your account has no Lobu organization to connect ${s} to.`;default:return`Something went wrong while connecting ${s}. Please try again.`}}function le(){const{name:r}=W({from:"/connector/$name/connection"}),{ref:i,error:s}=F({from:"/connector/$name/connection"}),[n,o]=l.useState({kind:"loading"}),[c,h]=l.useState(""),[g,O]=l.useState(""),[x,$]=l.useState(!1),[_,p]=l.useState(null),[j,k]=l.useState(null),u=oe(r,n.kind==="confirm"?n.orgs[0]?.slug??null:n.kind==="already_connected"?n.orgSlug:null),m=n.kind==="confirm"&&n.subjectKind||"connection",S=n.kind==="confirm"&&n.subjectName?n.subjectName:u?`this ${u} ${m}`:`this ${m}`,P=l.useCallback(async()=>{if(!i){o({kind:"error",message:"This connection link is missing its reference."});return}o({kind:"loading"});try{const t=await(await z(`${R}/api/connector/${encodeURIComponent(r)}/connection/claim-context?ref=${encodeURIComponent(i)}`,{credentials:"include"})).json();if("error"in t){if(t.error==="unauthenticated"){o({kind:"signin",signinProvider:t.signinProvider??r,linkAccount:!1});return}if(t.error==="signin_required"){o(s?{kind:"link_failed",signinProvider:t.signinProvider??r,error:s}:{kind:"signin",signinProvider:t.signinProvider??r,linkAccount:!0});return}o({kind:"error",message:T(t.error,t.code,"this connection")});return}if("alreadyConnected"in t){o({kind:"already_connected",orgSlug:t.orgSlug,nextUrl:t.nextUrl});return}h(t.orgs[0]?.slug??""),o({kind:"confirm",subjectKind:t.subjectKind,subjectName:t.subjectName,orgs:t.orgs})}catch{o({kind:"error",message:"We couldn’t load this connection link. Please try again."})}},[r,i,s]);l.useEffect(()=>{P()},[P]);const L=async d=>{if(!i)return;const t=re(r,i);if(n.kind==="signin"&&n.linkAccount){const y=await J.linkSocial({provider:d,callbackURL:t,errorCallbackURL:t});y.error&&o({kind:"error",message:y.error.message??"Couldn’t verify this account."});return}n.kind==="link_failed"&&await K(),await H.social({provider:d,callbackURL:t,errorCallbackURL:t})},U=async(d=!1)=>{if(!(!i||!c)){$(!0),p(null),k(null);try{let t=c;if(c===w){const b=g.trim();if(!b){p("Enter a name for the new organization.");return}const v=await Q.create({name:b,slug:te(b)});if(v.error||!v.data){p(v.error?.message??"Couldn’t create the organization.");return}t=v.data.slug}const a=await(await z(`${R}/api/connector/${encodeURIComponent(r)}/connection/claim`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({ref:i,org:t,confirmMove:d})})).json();if("error"in a){if(a.error==="signin_required"||a.error==="unauthenticated"){o({kind:"signin",signinProvider:a.signinProvider??r,linkAccount:a.error==="signin_required"});return}if((a.error==="already_connected_elsewhere"||a.error==="enterprise_scope_overlap")&&a.existing){k({kind:a.error,existing:a.existing});return}p(T(a.error,a.code,S));return}window.location.href=I(a.orgSlug,r,a.nextUrl)}catch{p(`Something went wrong while connecting this ${m}. Please try again.`)}finally{$(!1)}}},A=n.kind==="signin"?"Sign in to continue":n.kind==="link_failed"?"Use a different account":n.kind==="error"?`Can’t connect this ${m}`:n.kind==="already_connected"?"Already connected":u?`Connect ${u} to Lobu`:"Connect to Lobu";return e.jsx("div",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center",children:e.jsx("div",{className:"w-full max-w-md p-8",children:e.jsxs(X,{children:[e.jsx(Z,{children:e.jsx(ee,{asChild:!0,children:e.jsx("h1",{children:A})})}),e.jsxs(ne,{children:[n.kind==="loading"&&e.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[e.jsx(N,{size:"lg"}),e.jsx("span",{children:"Checking this connection link…"})]}),n.kind==="error"&&e.jsx("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:n.message}),n.kind==="already_connected"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This ",u?`${u} `:"",m," is already connected to Lobu."]}),e.jsx(f,{className:"w-full",asChild:!0,children:e.jsx("a",{href:I(n.orgSlug,r,n.nextUrl),children:n.nextUrl?"Choose an agent":"Open Lobu"})})]}),n.kind==="signin"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Sign in with ",C(n.signinProvider)," to verify you can connect this ",m,"."]}),e.jsxs(f,{className:"w-full",onClick:()=>L(n.signinProvider),children:["Sign in with ",C(n.signinProvider)]})]}),n.kind==="link_failed"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{role:"alert",className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:ie(n.error,C(n.signinProvider))}),e.jsxs(f,{className:"w-full",onClick:()=>L(n.signinProvider),children:["Sign out and continue with"," ",C(n.signinProvider)]})]}),n.kind==="confirm"&&(()=>{const d=n.subjectName||S;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Connecting"," ",e.jsx("strong",{className:"font-medium text-foreground",children:d}),". Choose the organization to connect it to:"]}),e.jsxs(V,{value:c,onValueChange:t=>{k(null),h(t)},children:[e.jsx(q,{children:e.jsx(M,{placeholder:"Select an organization"})}),e.jsxs(Y,{children:[n.orgs.map(t=>e.jsxs(E,{value:t.slug,children:[t.name,t.isPersonal&&e.jsx("span",{className:"ml-1 text-muted-foreground",children:"(personal)"})]},t.id)),e.jsx(E,{value:w,children:"+ New organization"})]})]}),c===w&&e.jsx(B,{autoFocus:!0,value:g,onChange:t=>O(t.target.value),placeholder:"New organization name","aria-label":"New organization name"}),_&&e.jsx("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:_}),j&&(()=>{const t=j.existing.orgName??j.existing.orgSlug??"another organization";return j.kind==="already_connected_elsewhere"?e.jsxs("div",{className:"space-y-3 rounded-lg border border-border bg-muted/40 px-3 py-3",children:[e.jsxs("p",{className:"text-sm text-foreground",children:[d," is already connected in"," ",e.jsx("strong",{className:"font-medium",children:t}),". Move it here?"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(f,{className:"flex-1",onClick:()=>U(!0),disabled:x,children:x?e.jsxs(e.Fragment,{children:[e.jsx(N,{size:"lg"}),e.jsx("span",{className:"ml-2",children:"Moving…"})]}):"Move it here"}),e.jsx(f,{className:"flex-1",variant:"outline",onClick:()=>k(null),disabled:x,children:"Cancel"})]})]}):e.jsxs("div",{className:"rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive",children:["This ",u?`${u} `:"","Enterprise Grid is already connected in"," ",e.jsx("strong",{className:"font-medium",children:t}),"; ","connecting this ",m," here may change how its messages route. Contact support to move it."]})})(),e.jsx(f,{className:"w-full",onClick:()=>U(),disabled:x||j!==null||!c||c===w&&!g.trim(),children:x?e.jsxs(e.Fragment,{children:[e.jsx(N,{size:"lg"}),e.jsx("span",{className:"ml-2",children:"Connecting…"})]}):`Connect ${d}`})]})})()]})]})})})}export{le as component};
|
|
2
|
+
//# sourceMappingURL=connection-X9VU9Ijm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g$ as q,r,j as e,eP as G,cY as J,dF as Q,h as F,B as N,eR as X,iF as Y,bW as O,eB as E,h3 as $,bv as Z,bw as ee,bx as se,by as te,bz as ne,eC as R,b_ as B,bG as ae,a5 as V,iG as ce,cO as ie,cU as le,iH as re,dk as oe,iI as de,iJ as me,cp as ue,iK as xe,cQ as he,cu as ge,cN as pe,L as z,g4 as D,V as K,bk as T}from"./index-008wj-Pz.js";import{f as fe,C as je}from"./entity-options-DJv2EhVV.js";import{s as L}from"./event-card-CBlsG32u.js";import{V as ve,b as ye,S as M,g as I}from"./runs-panel-LnGpHCAQ.js";import{f as Ne}from"./feed-event-kinds-BYuZCoU4.js";function be({organizationId:s,value:t,onChange:i,entities:a,className:d}){const{data:c=[]}=q(a?void 0:s),o=r.useMemo(()=>a??fe(c),[a,c]),x=new Set(t),l=o.filter(n=>x.has(n.id)),g=n=>{const u=new Set(x);u.has(n)?u.delete(n):u.add(n),i(Array.from(u).sort((v,y)=>v-y))},j=l.length===0?"All entities":l.length===1?l[0].name:`${l.length} entities selected`;return e.jsx(G,{contentClassName:"w-[320px]",searchPlaceholder:"Filter entities...",emptyText:"No entities found.",trigger:n=>e.jsxs(N,{variant:"outline",role:"combobox","aria-expanded":n,className:F("justify-between",d),children:[j,e.jsx(X,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),children:()=>o.map(n=>{const u=x.has(n.id);return e.jsxs(J,{value:`${n.name} ${n.entityType}`,onSelect:()=>g(n.id),className:"cursor-pointer",children:[e.jsx(Q,{className:F("mr-2 h-4 w-4",u?"opacity-100":"opacity-0")}),e.jsxs("span",{children:[n.name," ",e.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",n.entityType,")"]})]})]},n.id)})})}function _e(s){return s?.feeds_schema?Object.entries(s.feeds_schema).map(([t,i])=>({key:t,name:i.name??t,description:i.description,configSchema:i.configSchema})):[]}const Ve="Feeds are optional scheduled sync targets for an existing connection.";function De({organizationId:s,connections:t,connectorDefinitions:i,entityId:a,onClose:d}){const c=t.length===1,[o,x]=r.useState(c?String(t[0].id):""),[l,g]=r.useState(""),[j,n]=r.useState(a?[a]:[]),[u,v]=r.useState(null),y=Y(),w=r.useMemo(()=>new Map(i.map(m=>[m.key,m])),[i]),p=r.useMemo(()=>t.find(m=>String(m.id)===o),[t,o]),b=r.useMemo(()=>p?_e(w.get(p.connector_key)):[],[p,w]),_=r.useMemo(()=>b.find(m=>m.key===l)??null,[b,l]),h=O(`${o}:${l}`,E(_?.configSchema),_?.configSchema),{values:S,setValues:C}=h,f=r.useCallback(()=>{x(c?String(t[0].id):""),g(""),n(a?[a]:[]),v(null)},[a,c,t]),k=r.useCallback(()=>{f(),d()},[d,f]),U=r.useCallback(async()=>{if(!h.canSubmit||!p||!l)return;v(null);const m=$(S);try{await y.mutateAsync({connection_id:p.id,feed_key:l,config:Object.keys(m).length>0?m:void 0,entity_ids:a?[a]:j.length>0?j:void 0}),k()}catch(A){v(A instanceof Error?A.message:"Failed to create feed")}},[S,h.canSubmit,y,a,k,p,j,l]),W=e.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto py-6 pr-1",children:[!c&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Connection"}),e.jsx(je,{connections:t,value:o,onValueChange:m=>{x(m),g(""),v(null)},placeholder:"Select a connection"})]}),p&&b.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Feed Type"}),e.jsxs(Z,{value:l,onValueChange:g,children:[e.jsx(ee,{children:e.jsx(se,{placeholder:"Select feed type"})}),e.jsx(te,{children:b.map(m=>e.jsx(ne,{value:m.key,children:e.jsxs("div",{children:[e.jsx("span",{children:m.name}),m.description&&e.jsxs("span",{className:"text-muted-foreground ml-1 text-xs",children:["— ",m.description]})]})},m.key))})]})]}),a?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entity"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This feed will be attached to the current entity."})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Target Entities"}),e.jsx(be,{organizationId:s,value:j,onChange:n,className:"w-full"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Leave empty to create an unscoped feed."})]}),h.revision&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Feed Configuration"}),e.jsx(R,{schema:h.revision,values:S,onValuesChange:C})]}),p&&b.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector has no configurable feed types."}),e.jsx(B,{visible:h.hasConflict,onReload:h.reset}),u&&e.jsx("p",{className:"text-sm text-destructive",children:u})]}),H=e.jsx(ae,{onCancel:k,className:"mt-2",children:e.jsxs(N,{disabled:!h.canSubmit||!l||y.isPending,onClick:()=>void U(),children:[y.isPending&&e.jsx(V,{size:"lg",className:"mr-2"}),"Create Feed"]})});return e.jsxs("div",{className:"flex flex-col",children:[W,H]})}function Ae({feed:s,onClose:t,hideHeader:i=!1}){const a=s.display_name?.trim()||s.feed_key,d=s.feed_key.includes(":")?s.feed_key.slice(s.feed_key.indexOf(":")+1):s.feed_key,c=s.external_tenant_id,o=s.connector_key==="slack"&&c?`https://app.slack.com/client/${c}/${d}`:void 0;return e.jsxs("div",{className:"flex max-w-xl flex-col gap-4",children:[i?null:e.jsxs(e.Fragment,{children:[t?e.jsxs("button",{type:"button",onClick:t,className:"inline-flex w-fit items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[e.jsx(ce,{className:"h-3 w-3"}),"Back to connection"]}):null,e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ie,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("h2",{className:"text-lg font-semibold leading-tight",children:a}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"chat channel"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Messages captured for this channel are available to Lobu Automations. Open Slack to read the channel history."}),o?e.jsx(N,{asChild:!0,variant:"outline",className:"w-full justify-center",children:e.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(le,{className:"mr-2 h-4 w-4"}),"Open in Slack"]})}):null,e.jsxs("div",{className:F(oe,"flex flex-col gap-3 p-4"),children:[e.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground",children:"Channel"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[e.jsx(re,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("span",{className:"break-all",children:a})]}),c?e.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Workspace"}),e.jsx("span",{className:"break-all font-mono text-xs",children:c})]}):null,e.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages the bot sees here are captured as they arrive. Open the channel in Slack to read the full history."})]})]})}function Te(s,t){return s.display_name?s.display_name:t?.feeds_schema?.[s.feed_key]?.name??s.feed_key}function Se(s,t){const i=s?.feeds_schema;if(!i)return;if(i[t])return i[t];const a=Object.values(i);return a.find(d=>d?.key===t)??(a.length===1?a[0]:void 0)}const P=8;function Ce({kinds:s}){const[t,i]=r.useState(!1),a=t?s:s.slice(0,P);return e.jsxs(D,{title:"Event types",count:`${s.length} ${s.length===1?"kind":"kinds"}`,children:[e.jsx("ul",{className:"divide-y",children:a.map(({kind:d,description:c,targets:o})=>e.jsxs("li",{className:"flex flex-col gap-1 py-2 sm:flex-row sm:items-start sm:gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:L(d)}),e.jsx("code",{className:"truncate font-mono text-[11px] text-muted-foreground",children:d})]}),c?e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",title:c,children:c}):null]}),o.length>0?e.jsx("div",{className:"flex flex-wrap gap-1 sm:max-w-[40%] sm:justify-end",children:o.map(({entityType:x,creates:l})=>e.jsx(K,{variant:"secondary",className:"font-normal",title:l?`Creates ${x} records`:`Links to existing ${x} records`,children:L(x)},x))}):null]},d))}),s.length>P?e.jsx(N,{variant:"ghost",size:"sm",className:"mt-1 h-7 px-2 text-xs text-muted-foreground",onClick:()=>i(d=>!d),children:t?"Show fewer":`Show all ${s.length}`}):null]})}function Le({feed:s,ownerSlug:t}){return e.jsxs(e.Fragment,{children:[e.jsx(M,{status:I(s.status),showDot:!0,children:s.status}),s.connection_status&&s.connection_status!==s.status&&e.jsxs(M,{status:I(s.connection_status),showDot:!0,children:["Connection: ",s.connection_status]}),s.device_worker_id?e.jsx(z,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:s.device_worker_id},children:e.jsx(K,{variant:s.device_status==="offline"?"secondary":"outline",className:"text-xs hover:bg-accent",children:s.device_status==="offline"?`Waiting for ${s.device_label||s.device_platform||"device"}`:`On ${s.device_label||s.device_platform||"device"}`})}):null]})}function Me({feed:s}){return s.operations.includes("sync")?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Last sync: ",s.last_sync_at?T(s.last_sync_at):"—"]}),e.jsxs("span",{children:["Next: ",s.next_run_at?T(s.next_run_at):"—"]}),e.jsxs("span",{className:"font-mono",children:[(s.event_count??0).toLocaleString()," events"]})]}):e.jsx("span",{children:"Read live when queried"})}function Ie({feed:s,connectorDef:t,ownerSlug:i}){const{data:a,refetch:d}=de(s.id),c=me(),o=ue(),x=a?.recent_runs?.some(f=>["running","pending","claimed"].includes(f.status));r.useEffect(()=>{if(!x)return;const f=setInterval(()=>d(),5e3);return()=>clearInterval(f)},[x,d]);const l=r.useMemo(()=>Se(t,s.feed_key),[t,s.feed_key]),g=l?.configSchema,j=r.useMemo(()=>Ne(l).sort((f,k)=>f.kind.localeCompare(k.kind)),[l]),n=O(s.id,E(g,s.config??{}),g),{values:u,setValues:v,dirty:y}=n,w=r.useCallback(async()=>{n.canSubmit&&(await c.mutateAsync({feed_id:s.id,config:$(u)}),n.accept(u,E(g,$(u))))},[c,s.id,u,g,n.canSubmit,n.accept]),p=r.useCallback(async()=>{const f=s.status==="active"?"paused":"active";await c.mutateAsync({feed_id:s.id,status:f})},[c,s.id,s.status]),b=r.useCallback(async()=>{await o.mutateAsync(s.id)},[o,s.id]),_=s.status==="active",h=s.operations.includes("sync"),S=s.auth_profile_status&&s.auth_profile_status!=="active",C=c.isPending||o.isPending;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(N,{variant:"outline",size:"sm",disabled:C,onClick:()=>void p(),children:[_?e.jsx(xe,{className:"h-3.5 w-3.5 mr-1.5"}):e.jsx(he,{className:"h-3.5 w-3.5 mr-1.5"}),_?"Pause":"Resume"]}),h?e.jsxs(N,{variant:"outline",size:"sm",disabled:C||!_,onClick:()=>void b(),children:[o.isPending?e.jsx(V,{size:"md",className:"mr-1.5"}):e.jsx(ge,{className:"h-3.5 w-3.5 mr-1.5"}),"Sync now"]}):null,e.jsx(ve,{ownerSlug:i,scope:{kind:"feed",id:s.id},variant:"ghost",label:"View in memory"})]}),S&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-amber-50 dark:bg-amber-950/20 px-3 py-2 text-sm",children:[e.jsx(pe,{className:"h-4 w-4 text-amber-500 shrink-0"}),e.jsxs("span",{className:"text-amber-700 dark:text-amber-400",children:["Authentication issue: ",s.auth_profile_status]}),e.jsx(N,{asChild:!0,variant:"outline",size:"sm",className:"ml-auto h-7 text-xs",children:e.jsx(z,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:i,connectorKey:s.connector_key,connectionId:String(s.connection_id)},search:{settings:!0},children:"Fix auth"})})]}),n.revision?e.jsx(D,{title:"Settings",children:e.jsxs("div",{className:"max-w-xl space-y-4",children:[e.jsx(R,{schema:n.revision,values:u,onValuesChange:v}),e.jsx(B,{visible:n.hasConflict,onReload:n.reset}),y&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(N,{size:"sm",disabled:C||!n.canSubmit,onClick:()=>void w(),children:[c.isPending?e.jsx(V,{size:"md",className:"mr-1.5"}):null,"Save"]})})]})}):null,j.length>0?e.jsx(Ce,{kinds:j}):null,h?e.jsx(D,{title:"Recent syncs",children:a?.recent_runs&&a.recent_runs.length>0?e.jsx(ye,{runs:a.recent_runs,ownerSlug:i}):e.jsx("p",{className:"rounded-lg border bg-muted/20 px-3 py-6 text-center text-xs text-muted-foreground",children:"No syncs yet."})}):null]})}export{De as A,Ae as C,Le as F,Me as a,Ie as b,Ve as c,Te as f};
|
|
2
|
+
//# sourceMappingURL=connection-feed-detail-B6ydKasK.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g2 as h,j as e,B as u,L as m,d9 as g,g3 as f,g4 as j,r as p,g5 as v,C as N}from"./index-008wj-Pz.js";import{c as w}from"./connection-label-BobuYiAG.js";import{S as C}from"./status-dot-CSBtKT4g.js";function b(t){return e.jsx(j,{title:"Connections",count:t.isLoading||t.isError?void 0:String(t.entries.length),children:e.jsx(x,{...t})})}function x({entries:t,action:n,isLoading:r,isError:i,onRetry:d}){const[o,l]=p.useState("");if(r)return e.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading connections…"});if(i)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsx("p",{children:"Could not load connections."}),d&&e.jsx(u,{variant:"outline",size:"sm",onClick:d,children:"Retry"})]});const a=t.filter(s=>`${s.name} ${s.description??""}`.toLowerCase().includes(o.trim().toLowerCase())).sort((s,c)=>+!!c.needsAttention-+!!s.needsAttention);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(v,{label:"connections",query:o,onQueryChange:l,count:a.length,action:n}),e.jsx("ul",{className:a.length>0?"overflow-hidden rounded-lg border divide-y":void 0,children:a.map(s=>e.jsx("li",{children:e.jsxs(m,{...s.link,className:"flex items-center justify-between gap-3 px-3 py-2.5 transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[e.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(C,{tone:s.tone}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-sm font-medium",children:s.name}),s.description&&e.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:s.description})]})]}),e.jsxs("span",{className:"flex min-w-0 max-w-1/2 shrink-0 items-center gap-2",children:[s.status&&e.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:s.status}),e.jsx(N,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"})]})]})},s.id))}),a.length===0&&e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:o.trim()?"No matches. Try another search.":"No connections yet."})]})}function k(t,n){const r=!!n&&h(n)&&!t.device_worker_id,i=["error","revoked","pending_auth"].includes(t.status);return{needsAttention:i||r,tone:t.status==="error"||t.status==="revoked"?"destructive":r||t.status!=="active"?"amber":null,status:r?"Needs a device":i?t.error_message?.trim()||(t.status==="pending_auth"?"needs reconnect":t.status):void 0}}function A({ownerSlug:t,connectorKey:n}){return e.jsx(u,{asChild:!0,size:"sm",variant:"outline",children:e.jsxs(m,{to:"/$owner/connectors/create/$connectorKey",params:{owner:t,connectorKey:n},children:[e.jsx(g,{className:"size-3.5"}),"Add connection"]})})}function L({connections:t,connector:n,connectorKey:r,ownerSlug:i,section:d=!1,action:o}){const l=t.filter(s=>s.connector_key===r).map(s=>{const c=k(s,n);return{id:String(s.id),name:w({...s,connector_name:s.connector_name??n?.name??null}),needsAttention:c.needsAttention,tone:c.tone,status:c.status,link:f({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:i,connectorKey:r,connectionId:String(s.id)},search:{}})}}),a=d?b:x;return e.jsx(a,{entries:l,action:o??e.jsx(A,{ownerSlug:i,connectorKey:r})})}export{A,b as C,L as a,k as c};
|
|
2
|
+
//# sourceMappingURL=connections-browser-BMV8bf54.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v as B,r as p,aN as L,j as e,dI as S,dK as M,B as T,aW as K,dJ as O,dM as P,dN as F,dO as U,dP as z,cX as _,b1 as b,cY as w,b5 as k,fD as E,g1 as y,L as u,b3 as R,b4 as q,V as G,bk as C,h as $,C as H,d9 as J,be as V}from"./index-008wj-Pz.js";import{c as g}from"./connection-label-BobuYiAG.js";import{c as N}from"./connections-browser-BMV8bf54.js";import{f as W,a as X}from"./connector-scope-lists-CJYz53YF.js";import{S as A}from"./status-dot-CSBtKT4g.js";const Y={trigger:"runs on arrival",delivery:"delivers here"};function le(n){const s=new Map,o=(a,t,i,c)=>{const d=Number(a);if(!Number.isInteger(d)||d<=0)return;const m=s.get(d)??[],r=m.find(l=>l.automation.automation_id===t.automation_id);if(r){if(r.reason===i)for(const l of c)r.eventTypes.includes(l)||r.eventTypes.push(l);return}m.push({automation:t,reason:i,eventTypes:[...c]}),s.set(d,m)};for(const a of n){for(const t of a.triggers??[]){const i=Array.isArray(t.event_types)?t.event_types.map(String):[];o(t.connection_id,a,"trigger",i)}o(a.delivery_target?.connection_id,a,"delivery",[])}return s}function de(n){const s=new Map;for(const o of n){const a=s.get(o.connection_id)??[];a.push(o),s.set(o.connection_id,a)}return s}function Z(n){const s=(o,a,t)=>`${o} ${o===1?a:t}`;return[s(n.feeds,"feed","feeds"),n.actions>0?s(n.actions,"action","actions"):null,n.automations>0?s(n.automations,"Automation","Automations"):null].filter(Boolean).join(" · ")}function Q({header:n,action:s,children:o,dashed:a=!1}){return e.jsxs("section",{className:$("overflow-hidden rounded-lg border bg-card",a&&"border-dashed bg-transparent"),children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"min-w-0 flex-1",children:n}),s?e.jsx("div",{className:"shrink-0 pr-3",children:s}):null]}),o]})}function ee(n){const s=p.useMemo(()=>[...n.connections].sort((t,i)=>Number(N(i,n.connectorDefs.get(i.connector_key)).needsAttention)-Number(N(t,n.connectorDefs.get(t.connector_key)).needsAttention)||g(t).localeCompare(g(i))),[n.connections,n.connectorDefs]),[o,a]=p.useState(()=>new Set(s.length<=2?s.map(t=>t.id):[]));return s.length===0?null:e.jsx("ul",{className:"divide-y border-t",children:s.map(t=>e.jsx("li",{children:e.jsx(ne,{...n,connection:t,open:o.has(t.id),onToggle:()=>a(i=>{const c=new Set(i);return c.delete(t.id)||c.add(t.id),c})})},t.id))})}function ne({connection:n,connectorDefs:s,feeds:o,automations:a,ownerSlug:t,showConnector:i,open:c,onToggle:d}){const m=s.get(n.connector_key),r=N(n,m),l=o.get(n.id)??[],j=a.get(n.id)??[],h=n.operations_summary?.total??0,I=l.length||n.feed_count,v={owner:t,connectorKey:n.connector_key,connectionId:String(n.id)},D=Z({feeds:I,actions:h,automations:j.length}),f=b(n.connector_key,s,{name:n.connector_name??n.connector_key});return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 py-2 pr-3 pl-4 text-sm",children:[e.jsx("button",{type:"button",onClick:d,"aria-expanded":c,"aria-label":`${c?"Collapse":"Expand"} ${g(n)}`,className:"flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",children:e.jsx(H,{className:$("size-3.5 transition-transform",c&&"rotate-90")})}),e.jsx(A,{tone:r.tone??"live"}),i?e.jsx(k,{icon:f.icon,iconUrl:f.iconUrl,name:f.name,faviconDomain:f.faviconDomain,className:"h-5 w-5 shrink-0 rounded text-[9px]"}):null,e.jsx(u,{to:"/$owner/connectors/$connectorKey/$connectionId",params:v,search:{},className:"min-w-0 truncate font-medium hover:underline",children:g(n)}),!i&&n.device_worker_id?e.jsxs("span",{className:"shrink-0 rounded border px-1.5 text-[11px] text-muted-foreground",children:[n.device_label||n.device_platform||"Device",n.device_online===!1?" · offline":""]}):null,r.status?e.jsx("span",{className:"min-w-0 truncate text-xs text-amber-600 dark:text-amber-400",children:r.status}):null,e.jsx("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:D})]}),c?e.jsxs("div",{className:"grid grid-cols-[4.5rem_1fr] items-start gap-x-2 gap-y-2 pr-3 pb-3 pl-11 text-xs",children:[e.jsx("span",{className:"pt-1 text-[10.5px] tracking-wide text-muted-foreground uppercase",children:"Feeds"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.map(x=>e.jsx(se,{feed:x,params:v},x.id)),l.length===0&&n.feed_count>0?e.jsx("span",{className:"text-muted-foreground",children:"Loading feeds…"}):null,e.jsxs(u,{to:"/$owner/connectors/$connectorKey/$connectionId",params:v,search:{addFeed:!0},className:"inline-flex items-center gap-1 rounded-full border border-dashed px-2 py-0.5 text-muted-foreground hover:bg-accent hover:text-foreground",children:[e.jsx(J,{className:"size-3"}),"Feed"]})]}),h>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"pt-1 text-[10.5px] tracking-wide text-muted-foreground uppercase",children:"Actions"}),e.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:e.jsxs(u,{to:"/$owner/connectors/$connectorKey",params:{owner:t,connectorKey:n.connector_key},className:"text-muted-foreground hover:text-foreground hover:underline",children:[h," ",h===1?"action":"actions",n.operations_summary?` · ${n.operations_summary.reads} read, ${n.operations_summary.writes} write`:""]})})]}):null,e.jsx("span",{className:"pt-1 text-[10.5px] tracking-wide text-muted-foreground uppercase",children:"Automations"}),e.jsxs("div",{className:"flex flex-col gap-1 pt-0.5",children:[j.map(x=>e.jsx(te,{link:x,ownerSlug:t},x.automation.automation_id)),j.length===0?e.jsx("span",{className:"text-muted-foreground",children:"No Automation is triggered by or delivers to this connection."}):null]})]}):null]})}function te({link:n,ownerSlug:s}){const{automation:o,reason:a,eventTypes:t}=n;return e.jsxs(u,{to:"/$owner/automations/$automationId",params:{owner:s,automationId:o.automation_id},search:{view:"definition",run_id:void 0},title:t.length>0?`On ${t.join(", ")}`:void 0,className:"flex min-w-0 items-center gap-1.5 hover:underline",children:[e.jsx(V,{className:"size-3 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"truncate",children:o.name}),e.jsx("span",{className:"shrink-0 text-muted-foreground",children:Y[a]})]})}function se({feed:n,params:s}){const o=W(n),a=X(n),t=n.display_name?.trim()||n.feed_key;return e.jsxs(u,{to:"/$owner/connectors/$connectorKey/$connectionId",params:s,search:{feedId:n.id},title:o??void 0,className:"inline-flex max-w-full items-center gap-1.5 rounded-full border bg-background px-2 py-0.5 hover:bg-accent",children:[e.jsx(A,{tone:a??"live"}),e.jsx("span",{className:"truncate",children:t}),n.last_sync_at?e.jsx("span",{className:"shrink-0 text-muted-foreground",children:C(n.last_sync_at)}):null]})}function me({devices:n,connections:s,...o}){const a=[...n].sort((t,i)=>Number(i.online)-Number(t.online)||y(t).localeCompare(y(i)));return e.jsx("div",{className:"space-y-3",children:a.map(t=>{const i=s.filter(c=>c.device_worker_id===t.id);return e.jsx(Q,{dashed:i.length===0,header:e.jsxs(u,{to:"/$owner/connectors/device/$deviceId",params:{owner:o.ownerSlug,deviceId:t.id},className:"flex items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-accent/50",children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border",children:e.jsx(R,{platform:q(t)})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:y(t)}),t.update_required.length>0?e.jsx(G,{variant:"secondary",className:"text-[10px]",children:"Update needed"}):null]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:[t.online?"Online":`Last seen ${C(t.last_seen_at)}`,t.app_version?`v${t.app_version}`:null,i.length===0?"nothing runs here yet":`${i.length} ${i.length===1?"connection":"connections"}`].filter(Boolean).join(" · ")})]})]}),children:e.jsx(ee,{...o,connections:i,showConnector:!0})},t.id)})})}function ue({ownerSlug:n,catalog:s,trigger:o}){const a=B(),[t,i]=p.useState(!1),c=p.useMemo(()=>new Map(s.map(r=>[r.key,r])),[s]),d=p.useMemo(()=>s.filter(r=>!L(r)).sort((r,l)=>r.name.localeCompare(l.name)),[s]),m=r=>{i(!1),a(r?{to:"/$owner/connectors/create/$connectorKey",params:{owner:n,connectorKey:r}}:{to:"/$owner/connectors/create",params:{owner:n}})};return e.jsxs(S,{open:t,onOpenChange:i,children:[e.jsx(M,{asChild:!0,children:o??e.jsxs(T,{size:"sm",className:"h-8 shrink-0 justify-start text-xs",children:[e.jsx(K,{className:"mr-1.5 h-3.5 w-3.5"}),"Add connector"]})}),e.jsx(O,{align:"end",className:"w-72 p-0",children:e.jsxs(P,{children:[e.jsx(F,{placeholder:"Search connectors…"}),e.jsxs(U,{children:[e.jsx(z,{children:"No connector matches."}),e.jsx(_,{children:d.map(r=>{const l=b(r.key,c,{name:r.name});return e.jsxs(w,{value:`${r.name} ${r.key}`,onSelect:()=>m(r.key),className:"gap-2",children:[e.jsx(k,{icon:l.icon,iconUrl:l.iconUrl,name:l.name,faviconDomain:l.faviconDomain,className:"h-5 w-5 shrink-0 rounded text-[9px]"}),e.jsx("span",{className:"truncate",children:r.name}),r.installed?e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"Added"}):null]},r.key)})}),e.jsx(E,{}),e.jsx(_,{children:e.jsx(w,{value:"browse all connectors",onSelect:()=>m(),children:"Browse all connectors…"})})]})]})})]})}export{ue as A,Q as C,me as D,le as a,ee as b,Y as c,Z as d,de as f};
|
|
2
|
+
//# sourceMappingURL=connector-boxes-DqZA-FdG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,
|
|
2
|
-
//# sourceMappingURL=connector-provenance-
|
|
1
|
+
import{j as e,dI as m,dK as u,dJ as h,cU as v,V as x,L as c}from"./index-008wj-Pz.js";function N({connectorDef:s,connectorKey:t,ownerSlug:n,deviceWorkerId:i,deviceLabel:o}){return s?e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5 text-[11.5px] text-muted-foreground",children:[e.jsx("span",{children:"Runs on"}),e.jsx(c,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:t},className:"underline underline-offset-2 hover:text-foreground",children:s.name}),e.jsx(f,{deviceWorkerId:i,deviceLabel:o,connectorDef:s,ownerSlug:n})]}):null}function f({connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i}){return e.jsxs(m,{children:[e.jsxs(u,{className:"rounded border px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground transition-colors hover:border-muted-foreground hover:text-foreground",children:["v",s.version||"unknown"]}),e.jsx(h,{align:"start",className:"w-80 p-0",children:e.jsx(j,{connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i})})]})}function j({connectorDef:s,ownerSlug:t,deviceWorkerId:n,deviceLabel:i}){const o=s.runtime?.platforms??[],d=s.runtime?.scopes??[],r=s.source_uri?.trim()||null,p=!!r&&(r.startsWith("http://")||r.startsWith("https://")),l=[{label:"Key",value:e.jsx("span",{className:"font-mono",children:s.key})},{label:"Version",value:e.jsx("span",{className:"font-mono",children:s.version?`v${s.version}`:"unknown"})}];return s.catalog_origin&&l.push({label:"Origin",value:s.catalog_origin==="org"?e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:"Built in this workspace"}):e.jsx("span",{children:"Lobu catalog"})}),r&&l.push({label:"Source",value:p?e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",className:"inline-flex max-w-full items-start gap-1 break-all font-mono text-primary hover:underline",children:[r,e.jsx(v,{className:"mt-0.5 h-3 w-3 shrink-0"})]}):e.jsx("span",{className:"break-all font-mono",children:r})}),o.length>0&&l.push({label:"Platforms",value:e.jsx("span",{className:"flex flex-wrap gap-1",children:o.map(a=>e.jsx(x,{variant:"secondary",className:"h-4 px-1 py-0 font-mono text-[10px]",children:a},a))})}),s.required_capability&&l.push({label:"Capability",value:e.jsx("span",{className:"font-mono",children:s.required_capability})}),d.length>0&&l.push({label:"Scopes",value:e.jsx("span",{className:"flex flex-wrap gap-1",children:d.map(a=>e.jsx(x,{variant:"secondary",className:"h-4 px-1 py-0 font-mono text-[10px]",children:a},a))})}),e.jsxs("div",{className:"text-xs",children:[e.jsx("dl",{className:"divide-y",children:l.map(a=>e.jsxs("div",{className:"flex gap-3 px-3 py-2",children:[e.jsx("dt",{className:"w-20 shrink-0 text-muted-foreground",children:a.label}),e.jsx("dd",{className:"min-w-0 flex-1",children:a.value})]},a.label))}),o.length>0?e.jsx("div",{className:"border-t px-3 py-2 text-muted-foreground",children:n?e.jsxs(e.Fragment,{children:["Runs on"," ",e.jsx(c,{to:"/$owner/connectors/device/$deviceId",params:{owner:t,deviceId:n},className:"text-primary hover:underline",children:i||"this device"}),"."]}):"Runs on a linked device."}):null]})}export{f as C,N as a};
|
|
2
|
+
//# sourceMappingURL=connector-provenance-BIg8P8WY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d6 as g,j as t,S as f,B as p,a$ as v,cP as j,L as _,d9 as N,bk as $,u as b,g6 as w}from"./index-008wj-Pz.js";import{S as k}from"./status-dot-CSBtKT4g.js";function y(e){switch(e.attention){case"needs_auth":return"Needs authentication";case"setup_required":return e.attention_reason?.trim()||"Setup required";case"paused":return"Paused";case"misconfigured":return"Configuration error";case"device_offline":return`Waiting for ${e.device_label||e.device_platform||"device"}`;case"last_attempt_failed":{const r=Number(e.consecutive_failures??0);return e.last_error?.trim()||(r>0?`${r} consecutive sync ${r===1?"failure":"failures"}`:"Last sync failed")}case"overdue":return"Scheduled run overdue";case"no_trigger":return"No schedule — this feed only runs when you sync it";case"never_run":return e.execution_mode==="scheduled"?"Scheduled, not run yet":"Not synced yet";default:return null}}function C(e){switch(e.attention){case"last_attempt_failed":case"misconfigured":return"destructive";case"needs_auth":case"setup_required":case"device_offline":case"overdue":case"no_trigger":case"never_run":return e.attention==="never_run"&&e.execution_mode!=="scheduled"?"muted":"amber";case"paused":return"muted";default:return e.status==="active"?null:e.status==="error"?"destructive":"muted"}}function S(e){return Object.keys(e?.feeds_schema??{}).length>0}function F({connection:e,ownerSlug:r,connectorKey:u,connectorDef:h}){const{data:i=[],isLoading:l,isError:m,refetch:a}=g(e.id),d=S(h),o=e.facets?.chat??!1,c={owner:r,connectorKey:u,connectionId:String(e.id)};return l?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(f,{className:"h-12 w-full rounded-lg"}),t.jsx(f,{className:"h-12 w-full rounded-lg"})]}):m?t.jsxs("div",{role:"alert",className:"space-y-2",children:[t.jsx("p",{children:"Could not load feeds."}),t.jsx(p,{variant:"outline",size:"sm",onClick:()=>void a(),children:"Retry"})]}):i.length===0?t.jsx(v,{icon:j,title:o?"No channels":"No feeds",description:d?o?"Bind a channel to route conversations to this connection.":"Add a feed to start collecting data from this connection.":o?"This chat connection has no bound channels yet.":"This connector doesn't provide any feeds.",children:d?t.jsx(p,{asChild:!0,size:"sm",children:t.jsxs(_,{to:"/$owner/connectors/$connectorKey/$connectionId",params:c,search:{addFeed:!0},children:[t.jsx(N,{className:"h-3.5 w-3.5"}),o?"Add channel":"Add feed"]})}):null}):t.jsx("ul",{className:"flex flex-col gap-2",children:i.map(n=>{const s=n.display_name?.trim()||n.feed_key,x=y(n);return t.jsx("li",{children:t.jsxs(_,{to:"/$owner/connectors/$connectorKey/$connectionId",params:c,search:{feedId:n.id},className:"flex w-full items-center justify-between gap-3 rounded-lg border border-border px-3 py-2.5 text-left transition-colors hover:bg-accent/50",children:[t.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(k,{tone:C(n)}),t.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:s})]}),t.jsx("span",{className:n.attention==="last_attempt_failed"||n.attention==="misconfigured"?"max-w-[50%] shrink-0 text-right text-xs text-destructive":n.attention&&n.attention!=="healthy"?"max-w-[50%] shrink-0 text-right text-xs text-amber-600 dark:text-amber-400":"shrink-0 text-xs text-muted-foreground",title:x??void 0,children:x??(n.store==="channel_messages"?"chat channel":n.operations.includes("read")&&n.operations.includes("sync")?"synced + live":n.operations.includes("read")?"live":n.last_sync_at?`synced ${$(n.last_sync_at)}`:"not synced yet")})]})},n.id)})})}function I({connection:e,ownerSlug:r,title:u}){const h=b(),{data:i=[],isLoading:l,isError:m}=g(e.id),a=i.filter(s=>["needs_auth","setup_required","misconfigured","last_attempt_failed","device_offline","overdue"].includes(s.attention??"")),d=i.filter(s=>s.status==="paused").length,o=l?e.feed_count:i.length,c=e.facets?.chat?"channels":"feeds",n=l?`Loading ${c}…`:m?`Could not load ${c} — open to retry`:`${o} ${c}${a.length?` · ${a.length} need attention`:""}${d?` · ${d} paused`:""}`;return t.jsxs("div",{className:"space-y-2",children:[t.jsx(w,{title:u,summary:n,onOpen:()=>h?.open({href:"",title:e.facets?.chat?"Channels":"Feeds",connectorPanel:{section:"feeds",connectorKey:e.connector_key,connectionId:e.id,organizationId:e.organization_id,ownerSlug:r}})}),a.length>0&&t.jsxs("ul",{className:"space-y-1 text-xs text-destructive",children:[a.slice(0,3).map(s=>t.jsxs("li",{children:[s.display_name||s.feed_key,": ",y(s)]},s.id)),a.length>3&&t.jsxs("li",{children:[a.length-3," more sources need attention."]})]})]})}export{F as C,C as a,I as b,S as c,y as f};
|
|
2
|
+
//# sourceMappingURL=connector-scope-lists-CJYz53YF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,O as l}from"./index-
|
|
2
|
-
//# sourceMappingURL=connectors-
|
|
1
|
+
import{j as e,O as l}from"./index-008wj-Pz.js";function n(){return e.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-3 px-4 pt-2.5 pb-8 lg:px-6",children:e.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:e.jsx(l,{})})})}export{n as component};
|
|
2
|
+
//# sourceMappingURL=connectors-BroKpwhB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=consent-
|
|
1
|
+
import{T as I,o as T,r,j as e,B as M,Q as D,U as B}from"./index-008wj-Pz.js";import{u as $,b as F,a as H,s as Q,g as G,A as J,W as K}from"./oauth-workspace-access-QPo4YwRX.js";import{C as V,a as X,b as Y,d as Z,c as ee}from"./card-BCsbrdGs.js";const se=["client_id","redirect_uri","scope","code_challenge","code_challenge_method"];function ce(){const s=I.useSearch(),f=s.workspace_grants==="1",{session:y,isReady:N}=T(),j=!N,{orgList:L,workspaceAccess:P,setWorkspaceAccess:q,selectedOrgIds:w,toggleSelectedOrgId:E,orgsLoading:O,orgsError:b,retryOrgs:W,workspaceSelectionReady:_}=$({allowMultiple:f}),[n,A]=r.useState(null),[k,a]=r.useState(null);F(!!y,j);const h=r.useMemo(()=>se.filter(t=>!s[t]||s[t]?.length===0),[s]),o=h.length===0,U=s.client_name?.trim()||null,i=r.useMemo(()=>Array.from(new Set((s.scope||"").split(" ").map(t=>t.trim()).filter(Boolean))),[s.scope]),g=H(i),[l,v]=r.useState(g);r.useEffect(()=>{v(g)},[g]);const d=r.useMemo(()=>Q(i,l),[l,i]),S=r.useMemo(()=>d.some(t=>t.startsWith("mcp:")),[d]),x=l,u=r.useMemo(()=>G(s.resource),[s.resource]),m=S&&!u,z=()=>{const t=new URL("/auth/login",window.location.origin);t.searchParams.set("callbackUrl",window.location.href),window.location.href=t.toString()},C=async t=>{if(!o){a(`Missing required query params: ${h.join(", ")}`);return}if(t&&m&&!_){a(b?"Workspaces could not be loaded. Retry before approving.":"Choose at least one workspace before approving.");return}A(t?"approve":"deny"),a(null);try{const c=await fetch(`${D}/oauth/authorize/consent`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({client_id:s.client_id,redirect_uri:s.redirect_uri,scope:t?d.join(" "):s.scope,state:s.state??"",code_challenge:s.code_challenge,code_challenge_method:s.code_challenge_method,client_name:s.client_name,resource:s.resource,authorization_intent:s.authorization_intent,approved:t,...t&&m?{workspace_access:P,organization_ids:w}:{}})}),p=await c.json().catch(()=>null);if(c.status===401){z();return}if(!c.ok)throw new Error(p?.error_description||p?.message||p?.error||`Failed to ${t?"approve":"deny"} OAuth consent`);const R=B(p?.redirect_url);if(!R)throw new Error("Consent response did not include a valid redirect URL");window.location.href=R}catch(c){A(null),a(c instanceof Error?c.message:"Unexpected error while submitting consent")}};return j||!y?e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking authentication..."})}):e.jsx("main",{className:"min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4",children:e.jsxs(V,{className:"w-full max-w-lg",children:[e.jsxs(X,{children:[e.jsx(Y,{asChild:!0,children:e.jsx("h1",{children:"Authorize application"})}),e.jsx(Z,{children:"Review the application, access level, and workspaces."})]}),e.jsxs(ee,{className:"space-y-5","aria-busy":n!==null,children:[e.jsx(J,{idPrefix:"oauth-consent",clientName:U,requestedScopes:i,accessLevel:l,onAccessLevelChange:v,disabled:n!==null}),m&&e.jsx(K,{idPrefix:"oauth-consent",allowMultiple:f,orgList:L,selectedOrgIds:w,onWorkspaceAccessChange:q,onSelectedOrgChange:E,orgsLoading:O,orgsError:b,onRetry:W,disabled:n!==null||!o}),(u||s.resource)&&e.jsx("section",{className:"rounded-md border bg-muted/20 p-3 text-sm text-muted-foreground space-y-1",children:s.resource&&e.jsx("p",{children:e.jsx("span",{className:"font-medium text-foreground",children:s.resource})})}),S&&u&&e.jsxs("section",{className:"rounded-md border border-primary/20 bg-primary/5 p-3 text-sm space-y-2",children:[e.jsxs("p",{className:"font-medium text-foreground",children:["Workspace access: only ",u]}),e.jsxs("ul",{className:"space-y-1 text-muted-foreground",children:[e.jsx("li",{children:"If this workspace is public, the app can read public data immediately after approval."}),x==="write"&&e.jsx("li",{children:"If you are not already a member, this connection will stay read-only. Ask an organization admin to grant write access, then reconnect the MCP client."}),x==="admin"&&e.jsx("li",{children:"If you are not already an admin or owner, elevated actions will stay blocked. Ask an organization owner to grant the required role, then reconnect the MCP client."}),x==="read"&&e.jsx("li",{children:"Public read access does not require membership."})]})]}),k&&e.jsx("p",{role:"alert",className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:k}),!o&&e.jsxs("p",{role:"alert",className:"text-sm text-destructive",children:["Missing required query params: ",h.join(", ")]}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx(M,{type:"button",variant:"outline",onClick:()=>C(!1),disabled:n!==null||!o,children:n==="deny"?"Denying...":"Deny"}),e.jsx(M,{type:"button",onClick:()=>C(!0),disabled:n!==null||!o||d.length===0||m&&!_,children:n==="approve"?"Approving...":"Approve"})]})]})]})})}export{ce as component};
|
|
2
|
+
//# sourceMappingURL=consent-fzLN-Qy7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,j as a,B as p,dF as n,f3 as d,bP as i}from"./index-008wj-Pz.js";function m({text:u,label:o,iconOnly:t=!1}){const[r,c]=s.useState(!1),e=s.useRef(void 0);return s.useEffect(()=>()=>clearTimeout(e.current),[]),a.jsxs(p,{type:"button",variant:t?"ghost":"outline",size:t?"icon":"sm",className:t?"h-6 w-6 shrink-0":"h-8 text-xs","aria-label":t?`Copy ${o}`:void 0,onClick:async()=>{try{await navigator.clipboard.writeText(u),c(!0),i.success("Copied to clipboard"),clearTimeout(e.current),e.current=setTimeout(()=>c(!1),1500)}catch{i.error("Could not copy. Please select and copy the text.")}},children:[r?a.jsx(n,{className:"h-3.5 w-3.5"}):a.jsx(d,{className:"h-3.5 w-3.5"}),!t&&(r?"Copied":o)]})}export{m as C};
|
|
2
|
+
//# sourceMappingURL=copy-button-Df7QXE0w.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as s,
|
|
1
|
+
import{r as s,ef as X,g9 as me}from"./index-008wj-Pz.js";function Lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Fe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ge(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function nt(e){return"nodeType"in e}function k(e){var t,n;return e?ge(e)?e:nt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function rt(e){const{Document:t}=k(e);return e instanceof t}function Ee(e){return ge(e)?!1:e instanceof k(e).HTMLElement}function $t(e){return e instanceof k(e).SVGElement}function ve(e){return e?ge(e)?e.document:nt(e)?rt(e)?e:Ee(e)||$t(e)?e.ownerDocument:document:document:document}const re=Fe?s.useLayoutEffect:s.useEffect;function ot(e){const t=s.useRef(e);return re(()=>{t.current=e}),s.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function gn(){const e=s.useRef(null),t=s.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=s.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Se(e,t){t===void 0&&(t=[e]);const n=s.useRef(e);return re(()=>{n.current!==e&&(n.current=e)},t),n}function Me(e,t){const n=s.useRef();return s.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ke(e){const t=ot(e),n=s.useRef(null),r=s.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Qe(e){const t=s.useRef();return s.useEffect(()=>{t.current=e},[e]),t.current}let Ve={};function $e(e,t){return s.useMemo(()=>{if(t)return t;const n=Ve[e]==null?0:Ve[e]+1;return Ve[e]=n,e+"-"+n},[e,t])}function Xt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,l)=>{const a=Object.entries(l);for(const[c,u]of a){const f=i[c];f!=null&&(i[c]=f+e*u)}return i},{...t})}}const he=Xt(1),ze=Xt(-1);function vn(e){return"clientX"in e&&"clientY"in e}function jt(e){if(!e)return!1;const{KeyboardEvent:t}=k(e.target);return t&&e instanceof t}function pn(e){if(!e)return!1;const{TouchEvent:t}=k(e.target);return t&&e instanceof t}function Ze(e){if(pn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return vn(e)?{x:e.clientX,y:e.clientY}:null}const Rt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Rt.Translate.toString(e),Rt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Et="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bn(e){return e.matches(Et)?e:e.querySelector(Et)}const wn={display:"none"};function yn(e){let{id:t,value:n}=e;return X.createElement("div",{id:t,style:wn},n)}function mn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return X.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function xn(){const[e,t]=s.useState("");return{announce:s.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ut=s.createContext(null);function Dn(e){const t=s.useContext(Ut);s.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Cn(){const[e]=s.useState(()=>new Set),t=s.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[s.useCallback(r=>{let{type:o,event:i}=r;e.forEach(l=>{var a;return(a=l[o])==null?void 0:a.call(l,i)})},[e]),t]}const Sn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
5
|
`},Rn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function En(e){let{announcements:t=Rn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Sn}=e;const{announce:i,announcement:l}=xn(),a=$e("DndLiveRegion"),[c,u]=s.useState(!1);if(s.useEffect(()=>{u(!0)},[]),Dn(s.useMemo(()=>({onDragStart(d){let{active:v}=d;i(t.onDragStart({active:v}))},onDragMove(d){let{active:v,over:h}=d;t.onDragMove&&i(t.onDragMove({active:v,over:h}))},onDragOver(d){let{active:v,over:h}=d;i(t.onDragOver({active:v,over:h}))},onDragEnd(d){let{active:v,over:h}=d;i(t.onDragEnd({active:v,over:h}))},onDragCancel(d){let{active:v,over:h}=d;i(t.onDragCancel({active:v,over:h}))}}),[i,t])),!c)return null;const f=X.createElement(X.Fragment,null,X.createElement(yn,{id:r,value:o.draggable}),X.createElement(mn,{id:a,announcement:l}));return n?me.createPortal(f,n):f}var E;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(E||(E={}));function Pe(){}function Ir(e,t){return s.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function kr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const W=Object.freeze({x:0,y:0});function Wt(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Yt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Mn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Mt(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function An(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function At(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const zr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=At(t,t.left,t.top),i=[];for(const l of r){const{id:a}=l,c=n.get(a);if(c){const u=Wt(At(c),o);i.push({id:a,data:{droppableContainer:l,value:u}})}}return i.sort(Yt)},Pr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Mt(t),i=[];for(const l of r){const{id:a}=l,c=n.get(a);if(c){const u=Mt(c),f=o.reduce((v,h,C)=>v+Wt(u[C],h),0),d=Number((f/4).toFixed(4));i.push({id:a,data:{droppableContainer:l,value:d}})}}return i.sort(Yt)};function On(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=o-r,a=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,f=l*a,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const Tn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:l}=i,a=n.get(l);if(a){const c=On(a,t);c>0&&o.push({id:l,data:{droppableContainer:i,value:c}})}}return o.sort(Mn)};function Nn(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Kt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:W}function Ln(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((l,a)=>({...l,top:l.top+e*a.y,bottom:l.bottom+e*a.y,left:l.left+e*a.x,right:l.right+e*a.x}),{...n})}}const In=Ln(1);function kn(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function zn(e,t,n){const r=kn(t);if(!r)return e;const{scaleX:o,scaleY:i,x:l,y:a}=r,c=e.left-l-(1-o)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const Pn={ignoreTransform:!1};function Ae(e,t){t===void 0&&(t=Pn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=k(e).getComputedStyle(e);u&&(n=zn(n,u,f))}const{top:r,left:o,width:i,height:l,bottom:a,right:c}=n;return{top:r,left:o,width:i,height:l,bottom:a,right:c}}function Ot(e){return Ae(e,{ignoreTransform:!0})}function Bn(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Fn(e,t){return t===void 0&&(t=k(e).getComputedStyle(e)),t.position==="fixed"}function $n(e,t){t===void 0&&(t=k(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function it(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(rt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ee(o)||$t(o)||n.includes(o))return n;const i=k(e).getComputedStyle(o);return o!==e&&$n(o,i)&&n.push(o),Fn(o,i)?n:r(o.parentNode)}return e?r(e):n}function Ht(e){const[t]=it(e,1);return t??null}function qe(e){return!Fe||!e?null:ge(e)?e:nt(e)?rt(e)||e===ve(e).scrollingElement?window:Ee(e)?e:null:null}function Vt(e){return ge(e)?e.scrollX:e.scrollLeft}function qt(e){return ge(e)?e.scrollY:e.scrollTop}function _e(e){return{x:Vt(e),y:qt(e)}}var O;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(O||(O={}));function Jt(e){return!Fe||!e?!1:e===document.scrollingElement}function Gt(e){const t={x:0,y:0},n=Jt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,l=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:l,isRight:a,maxScroll:r,minScroll:t}}const Xn={x:.2,y:.2};function jn(e,t,n,r,o){let{top:i,left:l,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Xn);const{isTop:u,isBottom:f,isLeft:d,isRight:v}=Gt(e),h={x:0,y:0},C={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+g.height?(h.y=O.Backward,C.y=r*Math.abs((t.top+g.height-i)/g.height)):!f&&c>=t.bottom-g.height&&(h.y=O.Forward,C.y=r*Math.abs((t.bottom-g.height-c)/g.height)),!v&&a>=t.right-g.width?(h.x=O.Forward,C.x=r*Math.abs((t.right-g.width-a)/g.width)):!d&&l<=t.left+g.width&&(h.x=O.Backward,C.x=r*Math.abs((t.left+g.width-l)/g.width)),{direction:h,speed:C}}function Un(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:l}=window;return{top:0,left:0,right:i,bottom:l,width:i,height:l}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Qt(e){return e.reduce((t,n)=>he(t,_e(n)),W)}function Wn(e){return e.reduce((t,n)=>t+Vt(n),0)}function Yn(e){return e.reduce((t,n)=>t+qt(n),0)}function Kn(e,t){if(t===void 0&&(t=Ae),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Ht(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Hn=[["x",["left","right"],Wn],["y",["top","bottom"],Yn]];class st{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=it(n),o=Qt(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,l,a]of Hn)for(const c of l)Object.defineProperty(this,c,{get:()=>{const u=a(r),f=o[i]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class xe{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Vn(e){const{EventTarget:t}=k(e);return e instanceof t?e:ve(e)}function Je(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var $;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})($||($={}));function Tt(e){e.preventDefault()}function qn(e){e.stopPropagation()}var x;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(x||(x={}));const Zt={start:[x.Space,x.Enter],cancel:[x.Esc],end:[x.Space,x.Enter,x.Tab]},Jn=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case x.Right:return{...n,x:n.x+25};case x.Left:return{...n,x:n.x-25};case x.Down:return{...n,y:n.y+25};case x.Up:return{...n,y:n.y-25}}};class _t{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new xe(ve(n)),this.windowListeners=new xe(k(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add($.Resize,this.handleCancel),this.windowListeners.add($.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add($.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Kn(r),n(W)}handleKeyDown(t){if(jt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=Zt,coordinateGetter:l=Jn,scrollBehavior:a="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:W;this.referenceCoordinates||(this.referenceCoordinates=f);const d=l(t,{active:n,context:r.current,currentCoordinates:f});if(d){const v=ze(d,f),h={x:0,y:0},{scrollableAncestors:C}=r.current;for(const g of C){const p=t.code,{isTop:m,isRight:D,isLeft:y,isBottom:N,maxScroll:S,minScroll:R}=Gt(g),w=Un(g),b={x:Math.min(p===x.Right?w.right-w.width/2:w.right,Math.max(p===x.Right?w.left:w.left+w.width/2,d.x)),y:Math.min(p===x.Down?w.bottom-w.height/2:w.bottom,Math.max(p===x.Down?w.top:w.top+w.height/2,d.y))},M=p===x.Right&&!D||p===x.Left&&!y,I=p===x.Down&&!N||p===x.Up&&!m;if(M&&b.x!==d.x){const A=g.scrollLeft+v.x,H=p===x.Right&&A<=S.x||p===x.Left&&A>=R.x;if(H&&!v.y){g.scrollTo({left:A,behavior:a});return}H?h.x=g.scrollLeft-A:h.x=p===x.Right?g.scrollLeft-S.x:g.scrollLeft-R.x,h.x&&g.scrollBy({left:-h.x,behavior:a});break}else if(I&&b.y!==d.y){const A=g.scrollTop+v.y,H=p===x.Down&&A<=S.y||p===x.Up&&A>=R.y;if(H&&!v.x){g.scrollTo({top:A,behavior:a});return}H?h.y=g.scrollTop-A:h.y=p===x.Down?g.scrollTop-S.y:g.scrollTop-R.y,h.y&&g.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,he(ze(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}_t.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Zt,onActivation:o}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(r.start.includes(l)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Nt(e){return!!(e&&"distance"in e)}function Lt(e){return!!(e&&"delay"in e)}class at{constructor(t,n,r){var o;r===void 0&&(r=Vn(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:l}=i;this.props=t,this.events=n,this.document=ve(l),this.documentListeners=new xe(this.document),this.listeners=new xe(r),this.windowListeners=new xe(k(l)),this.initialCoordinates=(o=Ze(i))!=null?o:W,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add($.Resize,this.handleCancel),this.windowListeners.add($.DragStart,Tt),this.windowListeners.add($.VisibilityChange,this.handleCancel),this.windowListeners.add($.ContextMenu,Tt),this.documentListeners.add($.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Lt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Nt(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add($.Click,qn,{capture:!0}),this.removeTextSelection(),this.documentListeners.add($.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:l,options:{activationConstraint:a}}=i;if(!o)return;const c=(n=Ze(t))!=null?n:W,u=ze(o,c);if(!r&&a){if(Nt(a)){if(a.tolerance!=null&&Je(u,a.tolerance))return this.handleCancel();if(Je(u,a.distance))return this.handleStart()}if(Lt(a)&&Je(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),l(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===x.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Gn={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class en extends at{constructor(t){const{event:n}=t,r=ve(n.target);super(t,Gn,r)}}en.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Qn={move:{name:"mousemove"},end:{name:"mouseup"}};var et;(function(e){e[e.RightClick=2]="RightClick"})(et||(et={}));class Zn extends at{constructor(t){super(t,Qn,ve(t.event.target))}}Zn.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===et.RightClick?!1:(r?.({event:n}),!0)}}];const Ge={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _n extends at{constructor(t){super(t,Ge)}static setup(){return window.addEventListener(Ge.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ge.move.name,t)};function t(){}}}_n.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var De;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(De||(De={}));var Be;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Be||(Be={}));function er(e){let{acceleration:t,activator:n=De.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:l=5,order:a=Be.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:v}=e;const h=nr({delta:d,disabled:!i}),[C,g]=gn(),p=s.useRef({x:0,y:0}),m=s.useRef({x:0,y:0}),D=s.useMemo(()=>{switch(n){case De.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case De.DraggableRect:return o}},[n,o,c]),y=s.useRef(null),N=s.useCallback(()=>{const R=y.current;if(!R)return;const w=p.current.x*m.current.x,b=p.current.y*m.current.y;R.scrollBy(w,b)},[]),S=s.useMemo(()=>a===Be.TreeOrder?[...u].reverse():u,[a,u]);s.useEffect(()=>{if(!i||!u.length||!D){g();return}for(const R of S){if(r?.(R)===!1)continue;const w=u.indexOf(R),b=f[w];if(!b)continue;const{direction:M,speed:I}=jn(R,b,D,t,v);for(const A of["x","y"])h[A][M[A]]||(I[A]=0,M[A]=0);if(I.x>0||I.y>0){g(),y.current=R,C(N,l),p.current=I,m.current=M;return}}p.current={x:0,y:0},m.current={x:0,y:0},g()},[t,N,r,g,i,l,JSON.stringify(D),JSON.stringify(h),C,u,S,f,JSON.stringify(v)])}const tr={x:{[O.Backward]:!1,[O.Forward]:!1},y:{[O.Backward]:!1,[O.Forward]:!1}};function nr(e){let{delta:t,disabled:n}=e;const r=Qe(t);return Me(o=>{if(n||!r||!o)return tr;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[O.Backward]:o.x[O.Backward]||i.x===-1,[O.Forward]:o.x[O.Forward]||i.x===1},y:{[O.Backward]:o.y[O.Backward]||i.y===-1,[O.Forward]:o.y[O.Forward]||i.y===1}}},[n,t,r])}function rr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Me(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function or(e,t){return s.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,r)}));return[...n,...i]},[]),[e,t])}var Re;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Re||(Re={}));var tt;(function(e){e.Optimized="optimized"})(tt||(tt={}));const It=new Map;function ir(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,l]=s.useState(null),{frequency:a,measure:c,strategy:u}=o,f=s.useRef(e),d=p(),v=Se(d),h=s.useCallback(function(m){m===void 0&&(m=[]),!v.current&&l(D=>D===null?m:D.concat(m.filter(y=>!D.includes(y))))},[v]),C=s.useRef(null),g=Me(m=>{if(d&&!n)return It;if(!m||m===It||f.current!==e||i!=null){const D=new Map;for(let y of e){if(!y)continue;if(i&&i.length>0&&!i.includes(y.id)&&y.rect.current){D.set(y.id,y.rect.current);continue}const N=y.node.current,S=N?new st(c(N),N):null;y.rect.current=S,S&&D.set(y.id,S)}return D}return m},[e,i,n,d,c]);return s.useEffect(()=>{f.current=e},[e]),s.useEffect(()=>{d||h()},[n,d]),s.useEffect(()=>{i&&i.length>0&&l(null)},[JSON.stringify(i)]),s.useEffect(()=>{d||typeof a!="number"||C.current!==null||(C.current=setTimeout(()=>{h(),C.current=null},a))},[a,d,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case Re.Always:return!1;case Re.BeforeDragging:return n;default:return!n}}}function tn(e,t){return Me(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function sr(e,t){return tn(e,t)}function ar(e){let{callback:t,disabled:n}=e;const r=ot(t),o=s.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return s.useEffect(()=>()=>o?.disconnect(),[o]),o}function Xe(e){let{callback:t,disabled:n}=e;const r=ot(t),o=s.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return s.useEffect(()=>()=>o?.disconnect(),[o]),o}function lr(e){return new st(Ae(e),e)}function kt(e,t,n){t===void 0&&(t=lr);const[r,o]=s.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const l=ar({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),a=Xe({callback:i});return re(()=>{i(),e?(a?.observe(e),l?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),l?.disconnect())},[e]),r}function cr(e){const t=tn(e);return Kt(e,t)}const zt=[];function ur(e){const t=s.useRef(e),n=Me(r=>e?r&&r!==zt&&e&&t.current&&e.parentNode===t.current.parentNode?r:it(e):zt,[e]);return s.useEffect(()=>{t.current=e},[e]),n}function dr(e){const[t,n]=s.useState(null),r=s.useRef(e),o=s.useCallback(i=>{const l=qe(i.target);l&&n(a=>a?(a.set(l,_e(l)),new Map(a)):null)},[]);return s.useEffect(()=>{const i=r.current;if(e!==i){l(i);const a=e.map(c=>{const u=qe(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,_e(u)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{l(e),l(i)};function l(a){a.forEach(c=>{const u=qe(c);u?.removeEventListener("scroll",o)})}},[o,e]),s.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,l)=>he(i,l),W):Qt(e):W,[e,t])}function Pt(e,t){t===void 0&&(t=[]);const n=s.useRef(null);return s.useEffect(()=>{n.current=null},t),s.useEffect(()=>{const r=e!==W;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?ze(e,n.current):W}function fr(e){s.useEffect(()=>{if(!Fe)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function hr(e,t){return s.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=l=>{i(l,t)},n},{}),[e,t])}function nn(e){return s.useMemo(()=>e?Bn(e):null,[e])}const Bt=[];function gr(e,t){t===void 0&&(t=Ae);const[n]=e,r=nn(n?k(n):null),[o,i]=s.useState(Bt);function l(){i(()=>e.length?e.map(c=>Jt(c)?r:new st(t(c),c)):Bt)}const a=Xe({callback:l});return re(()=>{a?.disconnect(),l(),e.forEach(c=>a?.observe(c))},[e]),o}function vr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ee(t)?t:e}function pr(e){let{measure:t}=e;const[n,r]=s.useState(null),o=s.useCallback(u=>{for(const{target:f}of u)if(Ee(f)){r(d=>{const v=t(f);return d?{...d,width:v.width,height:v.height}:v});break}},[t]),i=Xe({callback:o}),l=s.useCallback(u=>{const f=vr(u);i?.disconnect(),f&&i?.observe(f),r(f?t(f):null)},[t,i]),[a,c]=ke(l);return s.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const br=[{sensor:en,options:{}},{sensor:_t,options:{}}],wr={current:{}},Ie={draggable:{measure:Ot},droppable:{measure:Ot,strategy:Re.WhileDragging,frequency:tt.Optimized},dragOverlay:{measure:Ae}};class Ce extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const yr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ce,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Pe},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ie,measureDroppableContainers:Pe,windowRect:null,measuringScheduled:!1},mr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Pe,draggableNodes:new Map,over:null,measureDroppableContainers:Pe},je=s.createContext(mr),rn=s.createContext(yr);function xr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ce}}}function Dr(e,t){switch(t.type){case E.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case E.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case E.DragEnd:case E.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case E.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ce(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case E.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const l=new Ce(e.droppable.containers);return l.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:l}}}case E.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ce(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Cr(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=s.useContext(je),i=Qe(r),l=Qe(n?.id);return s.useEffect(()=>{if(!t&&!r&&i&&l!=null){if(!jt(i)||document.activeElement===i.target)return;const a=o.get(l);if(!a)return;const{activatorNode:c,node:u}=a;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=bn(f);if(d){d.focus();break}}})}},[r,t,o,l,i]),null}function Sr(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Rr(e){return s.useMemo(()=>({draggable:{...Ie.draggable,...e?.draggable},droppable:{...Ie.droppable,...e?.droppable},dragOverlay:{...Ie.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Er(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=s.useRef(!1),{x:l,y:a}=typeof o=="boolean"?{x:o,y:o}:o;re(()=>{if(!l&&!a||!t){i.current=!1;return}if(i.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Kt(f,r);if(l||(d.x=0),a||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const v=Ht(u);v&&v.scrollBy({top:d.y,left:d.x})}},[t,l,a,r,n])}const on=s.createContext({...W,scaleX:1,scaleY:1});var ne;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ne||(ne={}));const Br=s.memo(function(t){var n,r,o,i;let{id:l,accessibility:a,autoScroll:c=!0,children:u,sensors:f=br,collisionDetection:d=Tn,measuring:v,modifiers:h,...C}=t;const g=s.useReducer(Dr,void 0,xr),[p,m]=g,[D,y]=Cn(),[N,S]=s.useState(ne.Uninitialized),R=N===ne.Initialized,{draggable:{active:w,nodes:b,translate:M},droppable:{containers:I}}=p,A=w!=null?b.get(w):null,H=s.useRef({initial:null,translated:null}),V=s.useMemo(()=>{var L;return w!=null?{id:w,data:(L=A?.data)!=null?L:wr,rect:H}:null},[w,A]),G=s.useRef(null),[lt,ct]=s.useState(null),[q,ut]=s.useState(null),oe=Se(C,Object.values(C)),Ue=$e("DndDescribedBy",l),dt=s.useMemo(()=>I.getEnabled(),[I]),ie=Rr(v),{droppableRects:le,measureDroppableContainers:Oe,measuringScheduled:ft}=ir(dt,{dragging:R,dependencies:[M.x,M.y],config:ie.droppable}),j=rr(b,w),ht=s.useMemo(()=>q?Ze(q):null,[q]),gt=hn(),vt=sr(j,ie.draggable.measure);Er({activeNode:w!=null?b.get(w):null,config:gt.layoutShiftCompensation,initialRect:vt,measure:ie.draggable.measure});const U=kt(j,ie.draggable.measure,vt),We=kt(j?j.parentElement:null),se=s.useRef({activatorEvent:null,active:null,activeNode:j,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:b,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),pt=I.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=pr({measure:ie.dragOverlay.measure}),Te=(r=ae.nodeRef.current)!=null?r:j,ce=R?(o=ae.rect)!=null?o:U:null,bt=!!(ae.nodeRef.current&&ae.rect),wt=cr(bt?null:U),Ye=nn(Te?k(Te):null),Q=ur(R?pt??j:null),Ne=gr(Q),Le=Sr(h,{transform:{x:M.x-wt.x,y:M.y-wt.y,scaleX:1,scaleY:1},activatorEvent:q,active:V,activeNodeRect:U,containerNodeRect:We,draggingNodeRect:ce,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:Q,scrollableAncestorRects:Ne,windowRect:Ye}),yt=ht?he(ht,M):null,mt=dr(Q),sn=Pt(mt),an=Pt(mt,[U]),ue=he(Le,sn),de=ce?In(ce,Le):null,pe=V&&de?d({active:V,collisionRect:de,droppableRects:le,droppableContainers:dt,pointerCoordinates:yt}):null,xt=An(pe,"id"),[Z,Dt]=s.useState(null),ln=bt?Le:he(Le,an),cn=Nn(ln,(i=Z?.rect)!=null?i:null,U),Ke=s.useRef(null),Ct=s.useCallback((L,z)=>{let{sensor:P,options:_}=z;if(G.current==null)return;const F=b.get(G.current);if(!F)return;const B=L.nativeEvent,Y=new P({active:G.current,activeNode:F,event:B,options:_,context:se,onAbort(T){if(!b.get(T))return;const{onDragAbort:K}=oe.current,J={id:T};K?.(J),D({type:"onDragAbort",event:J})},onPending(T,ee,K,J){if(!b.get(T))return;const{onDragPending:we}=oe.current,te={id:T,constraint:ee,initialCoordinates:K,offset:J};we?.(te),D({type:"onDragPending",event:te})},onStart(T){const ee=G.current;if(ee==null)return;const K=b.get(ee);if(!K)return;const{onDragStart:J}=oe.current,be={activatorEvent:B,active:{id:ee,data:K.data,rect:H}};me.unstable_batchedUpdates(()=>{J?.(be),S(ne.Initializing),m({type:E.DragStart,initialCoordinates:T,active:ee}),D({type:"onDragStart",event:be}),ct(Ke.current),ut(B)})},onMove(T){m({type:E.DragMove,coordinates:T})},onEnd:fe(E.DragEnd),onCancel:fe(E.DragCancel)});Ke.current=Y;function fe(T){return async function(){const{active:K,collisions:J,over:be,scrollAdjustedTranslate:we}=se.current;let te=null;if(K&&we){const{cancelDrop:ye}=oe.current;te={activatorEvent:B,active:K,collisions:J,delta:we,over:be},T===E.DragEnd&&typeof ye=="function"&&await Promise.resolve(ye(te))&&(T=E.DragCancel)}G.current=null,me.unstable_batchedUpdates(()=>{m({type:T}),S(ne.Uninitialized),Dt(null),ct(null),ut(null),Ke.current=null;const ye=T===E.DragEnd?"onDragEnd":"onDragCancel";if(te){const He=oe.current[ye];He?.(te),D({type:ye,event:te})}})}}},[b]),un=s.useCallback((L,z)=>(P,_)=>{const F=P.nativeEvent,B=b.get(_);if(G.current!==null||!B||F.dndKit||F.defaultPrevented)return;const Y={active:B};L(P,z.options,Y)===!0&&(F.dndKit={capturedBy:z.sensor},G.current=_,Ct(P,z))},[b,Ct]),St=or(f,un);fr(f),re(()=>{U&&N===ne.Initializing&&S(ne.Initialized)},[U,N]),s.useEffect(()=>{const{onDragMove:L}=oe.current,{active:z,activatorEvent:P,collisions:_,over:F}=se.current;if(!z||!P)return;const B={active:z,activatorEvent:P,collisions:_,delta:{x:ue.x,y:ue.y},over:F};me.unstable_batchedUpdates(()=>{L?.(B),D({type:"onDragMove",event:B})})},[ue.x,ue.y]),s.useEffect(()=>{const{active:L,activatorEvent:z,collisions:P,droppableContainers:_,scrollAdjustedTranslate:F}=se.current;if(!L||G.current==null||!z||!F)return;const{onDragOver:B}=oe.current,Y=_.get(xt),fe=Y&&Y.rect.current?{id:Y.id,rect:Y.rect.current,data:Y.data,disabled:Y.disabled}:null,T={active:L,activatorEvent:z,collisions:P,delta:{x:F.x,y:F.y},over:fe};me.unstable_batchedUpdates(()=>{Dt(fe),B?.(T),D({type:"onDragOver",event:T})})},[xt]),re(()=>{se.current={activatorEvent:q,active:V,activeNode:j,collisionRect:de,collisions:pe,droppableRects:le,draggableNodes:b,draggingNode:Te,draggingNodeRect:ce,droppableContainers:I,over:Z,scrollableAncestors:Q,scrollAdjustedTranslate:ue},H.current={initial:ce,translated:de}},[V,j,pe,de,b,Te,ce,le,I,Z,Q,ue]),er({...gt,delta:M,draggingRect:de,pointerCoordinates:yt,scrollableAncestors:Q,scrollableAncestorRects:Ne});const dn=s.useMemo(()=>({active:V,activeNode:j,activeNodeRect:U,activatorEvent:q,collisions:pe,containerNodeRect:We,dragOverlay:ae,draggableNodes:b,droppableContainers:I,droppableRects:le,over:Z,measureDroppableContainers:Oe,scrollableAncestors:Q,scrollableAncestorRects:Ne,measuringConfiguration:ie,measuringScheduled:ft,windowRect:Ye}),[V,j,U,q,pe,We,ae,b,I,le,Z,Oe,Q,Ne,ie,ft,Ye]),fn=s.useMemo(()=>({activatorEvent:q,activators:St,active:V,activeNodeRect:U,ariaDescribedById:{draggable:Ue},dispatch:m,draggableNodes:b,over:Z,measureDroppableContainers:Oe}),[q,St,V,U,m,Ue,b,Z,Oe]);return X.createElement(Ut.Provider,{value:y},X.createElement(je.Provider,{value:fn},X.createElement(rn.Provider,{value:dn},X.createElement(on.Provider,{value:cn},u)),X.createElement(Cr,{disabled:a?.restoreFocus===!1})),X.createElement(En,{...a,hiddenTextDescribedById:Ue}));function hn(){const L=lt?.autoScrollEnabled===!1,z=typeof c=="object"?c.enabled===!1:c===!1,P=R&&!L&&!z;return typeof c=="object"?{...c,enabled:P}:{enabled:P}}}),Mr=s.createContext(null),Ft="button",Ar="Draggable";function Fr(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=$e(Ar),{activators:l,activatorEvent:a,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:v}=s.useContext(je),{role:h=Ft,roleDescription:C="draggable",tabIndex:g=0}=o??{},p=c?.id===t,m=s.useContext(p?on:Mr),[D,y]=ke(),[N,S]=ke(),R=hr(l,t),w=Se(n);re(()=>(d.set(t,{id:t,key:i,node:D,activatorNode:N,data:w}),()=>{const M=d.get(t);M&&M.key===i&&d.delete(t)}),[d,t]);const b=s.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":p&&h===Ft?!0:void 0,"aria-roledescription":C,"aria-describedby":f.draggable}),[r,h,g,p,C,f.draggable]);return{active:c,activatorEvent:a,activeNodeRect:u,attributes:b,isDragging:p,listeners:r?void 0:R,node:D,over:v,setNodeRef:y,setActivatorNodeRef:S,transform:m}}function $r(){return s.useContext(rn)}const Or="Droppable",Tr={timeout:25};function Xr(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=$e(Or),{active:l,dispatch:a,over:c,measureDroppableContainers:u}=s.useContext(je),f=s.useRef({disabled:n}),d=s.useRef(!1),v=s.useRef(null),h=s.useRef(null),{disabled:C,updateMeasurementsFor:g,timeout:p}={...Tr,...o},m=Se(g??r),D=s.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},p)},[p]),y=Xe({callback:D,disabled:C||!l}),N=s.useCallback((b,M)=>{y&&(M&&(y.unobserve(M),d.current=!1),b&&y.observe(b))},[y]),[S,R]=ke(N),w=Se(t);return s.useEffect(()=>{!y||!S.current||(y.disconnect(),d.current=!1,y.observe(S.current))},[S,y]),s.useEffect(()=>(a({type:E.RegisterDroppable,element:{id:r,key:i,disabled:n,node:S,rect:v,data:w}}),()=>a({type:E.UnregisterDroppable,key:i,id:r})),[r]),s.useEffect(()=>{n!==f.current.disabled&&(a({type:E.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,a]),{active:l,rect:v,isOver:c?.id===r,node:S,over:c,setNodeRef:R}}export{Rt as C,Br as D,x as K,en as P,Ir as a,Xr as b,Fr as c,Pr as d,it as e,$r as f,An as g,$e as h,re as i,Lr as j,jt as k,Ae as l,_t as m,zr as n,ze as s,kr as u};
|
|
6
|
-
//# sourceMappingURL=core.esm-
|
|
6
|
+
//# sourceMappingURL=core.esm-A1UnFbGs.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i_ as r,j as e}from"./index-008wj-Pz.js";import{a as i}from"./agent-skills-route-D-w3tY_2.js";import"./agent-skill-context-lWbXKEm1.js";import"./core.esm-A1UnFbGs.js";import"./skill-editor-D_W3QlRz.js";import"./agent-subpage-shell-CLqpn5Tb.js";import"./agent-loading-shells-CamDtzHY.js";import"./agent-card-controls-DiU7Un5w.js";function x(){const{owner:t,agentId:o}=r.useParams();return e.jsx(i,{owner:t,agentId:o})}export{x as component};
|
|
2
|
+
//# sourceMappingURL=create-BjwsYarn.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j0 as o,j as e}from"./index-008wj-Pz.js";import{a}from"./agent-guardrails-route-CyoGSxcZ.js";import"./model-selector-3l9lY50C.js";import"./agent-subpage-shell-CLqpn5Tb.js";import"./table-DHM-vCxP.js";import"./agent-loading-shells-CamDtzHY.js";import"./agent-card-controls-DiU7Un5w.js";function j(){const{owner:r,agentId:t}=o.useParams();return e.jsx(a,{owner:r,agentId:t})}export{j as component};
|
|
2
|
+
//# sourceMappingURL=create-Dzr4mlr0.js.map
|