decocms 4.20.1 → 4.22.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/client/assets/{AlertCircle-DMGExMxY.js → AlertCircle-BAqebLND.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BYUnq8gY.js → ArrowUpRight-BejkutVa.js} +1 -1
- package/dist/client/assets/Check-CC3ah2EP.js +1 -0
- package/dist/client/assets/{CheckCircle-C5ITwmFz.js → CheckCircle-C_Aedf-I.js} +1 -1
- package/dist/client/assets/{ChevronDown-BDi4pzpg.js → ChevronDown-ChsImHZJ.js} +1 -1
- package/dist/client/assets/{ChevronRight-CkirMRmz.js → ChevronRight-DKpM0qdo.js} +1 -1
- package/dist/client/assets/ChevronUp-CJ6cOnxb.js +1 -0
- package/dist/client/assets/Circle-Blw66dbf.js +1 -0
- package/dist/client/assets/Copy01-B9fTK-Gv.js +1 -0
- package/dist/client/assets/DotsVertical-CmhOyP1I.js +1 -0
- package/dist/client/assets/Eye-CFP70kHf.js +1 -0
- package/dist/client/assets/{FilterLines-DCrHo_W-.js → FilterLines-BCJIlwsH.js} +1 -1
- package/dist/client/assets/{Globe01-CHueNlXT.js → Globe01-CdKa67VI.js} +1 -1
- package/dist/client/assets/{Globe04-D1Ia72FD.js → Globe04-BwB-L-v7.js} +1 -1
- package/dist/client/assets/{HardDrive-C5pxB0xX.js → HardDrive-Cvln_XgB.js} +1 -1
- package/dist/client/assets/{Key01-D_Aswhqq.js → Key01-Dq3fyqt5.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BIAH0kog.js → LayoutLeft-D7T3E-u6.js} +1 -1
- package/dist/client/assets/{LinkExternal01-vG76nXPe.js → LinkExternal01-Cohlmmy1.js} +1 -1
- package/dist/client/assets/List-BX1Dxe3c.js +1 -0
- package/dist/client/assets/Loading02-DutOxXF8.js +1 -0
- package/dist/client/assets/{Monitor01-BEHd5v9A.js → Monitor01-Do0cCBdt.js} +1 -1
- package/dist/client/assets/{Palette-CUxSqgEM.js → Palette-BmgCpHFj.js} +1 -1
- package/dist/client/assets/{Play-B6SMfN5e.js → Play-BBHolMYa.js} +1 -1
- package/dist/client/assets/{Plus-B3W-zU0m.js → Plus-Cpa6DE3F.js} +1 -1
- package/dist/client/assets/{SearchLg-CwA3o7Kq.js → SearchLg-D1sKIH4t.js} +1 -1
- package/dist/client/assets/{SearchMd-CG-ZdWyV.js → SearchMd-CafLz5-k.js} +1 -1
- package/dist/client/assets/{Settings02-BXQlyl72.js → Settings02-Qe5DtIFk.js} +1 -1
- package/dist/client/assets/{Shield01-C5cTYwHG.js → Shield01-CmqQX7z4.js} +1 -1
- package/dist/client/assets/{Star01-CaO0nMo9.js → Star01-Dx3yxBV5.js} +1 -1
- package/dist/client/assets/{Stars01-DjfTA0U2.js → Stars01-Cjj351UH.js} +1 -1
- package/dist/client/assets/{Stars02-oR68jXM_.js → Stars02-DVjaFNiu.js} +1 -1
- package/dist/client/assets/{Sun-gt9ujltE.js → Sun-9KvJTXMD.js} +1 -1
- package/dist/client/assets/SwitchHorizontal01-C2AiHI6d.js +1 -0
- package/dist/client/assets/{Tool01-CPfgYpSb.js → Tool01-CMdJij71.js} +1 -1
- package/dist/client/assets/{Trash01-De9U-JcA.js → Trash01-Bk68wFhO.js} +1 -1
- package/dist/client/assets/{Upload01-XVwkIKd6.js → Upload01-DfieuDNH.js} +1 -1
- package/dist/client/assets/{User01--wnyNy2g.js → User01-BiwKrQu6.js} +1 -1
- package/dist/client/assets/{Users01-DQSxkCun.js → Users01-rcBZnIdC.js} +1 -1
- package/dist/client/assets/{Users03-DEShSeP4.js → Users03-C2FdBaet.js} +1 -1
- package/dist/client/assets/{X-DchRughI.js → X-Dfoip5yB.js} +1 -1
- package/dist/client/assets/{XCircle-BMPeQmo7.js → XCircle-C9R5bCeP.js} +1 -1
- package/dist/client/assets/{XClose-BlQxiRFv.js → XClose-CPqc0UtD.js} +1 -1
- package/dist/client/assets/{Zap-gCfOy-ns.js → Zap-CRPirG1P.js} +1 -1
- package/dist/client/assets/{ZapSquare-DRmIxSdp.js → ZapSquare-CGsw7HnP.js} +1 -1
- package/dist/client/assets/{ZoomOut-VZDZQqnX.js → ZoomOut-Cq_jwvnh.js} +1 -1
- package/dist/client/assets/{access-gate-Cqrbc3BU.js → access-gate-7q5PI6kF.js} +1 -1
- package/dist/client/assets/{add-section-modal-DgQQFrd8.js → add-section-modal-BVhFBSux.js} +1 -1
- package/dist/client/assets/agent-capabilities-BGx_yFvg.js +1 -0
- package/dist/client/assets/agent-icon-DAuEpvjN.js +1 -0
- package/dist/client/assets/agents-list-DEbqbve9.js +1 -0
- package/dist/client/assets/ai-providers-jW9pV5wT.js +1 -0
- package/dist/client/assets/{alert-CWiQ4BOG.js → alert-Chi9L6Lo.js} +1 -1
- package/dist/client/assets/{alert-dialog-Buxux4Jv.js → alert-dialog-DNV8OhbX.js} +1 -1
- package/dist/client/assets/app-editor-B90O76NW.js +1 -0
- package/dist/client/assets/{auth-catchall-BM5rYO-b.js → auth-catchall-BeENOKgo.js} +1 -1
- package/dist/client/assets/{auth-entry-Cvl9qiXx.js → auth-entry-Banhr0Dj.js} +1 -1
- package/dist/client/assets/{auth-BZgEN2RD.js → auth-k2I4x92r.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Dfe6g0QY.js → auth-split-layout-BpIandE_.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-cJNik8J_.js → authenticate-and-persist-oauth-DiKNvlD_.js} +1 -1
- package/dist/client/assets/{automation-list-row-BUhdfpZz.js → automation-list-row-pGg9Lluh.js} +1 -1
- package/dist/client/assets/automation-runs-8IQ_r9WW.js +1 -0
- package/dist/client/assets/automations-DYcjcF3S.js +1 -0
- package/dist/client/assets/{avatar-B8STW9mD.js → avatar-BD1bv4j8.js} +1 -1
- package/dist/client/assets/{badge-D5WiG5D4.js → badge-Dz2OFDxQ.js} +1 -1
- package/dist/client/assets/{block-document-CyegCur0.js → block-document-MEJKfSm3.js} +1 -1
- package/dist/client/assets/{brand-context-BclDTNfv.js → brand-context-C-0cx-zk.js} +1 -1
- package/dist/client/assets/{breadcrumb-CrhSDATC.js → breadcrumb-DDrlJm3F.js} +1 -1
- package/dist/client/assets/buckets-K1kG3QiU.js +1 -0
- package/dist/client/assets/bulk-category-panel-Cpe8cv7-.js +1 -0
- package/dist/client/assets/{capability-load-error-DB0r6fSo.js → capability-load-error-CV7OdywL.js} +1 -1
- package/dist/client/assets/{card-BWrHlXPo.js → card-DT6z8UIy.js} +1 -1
- package/dist/client/assets/category-editor-97EZw1QP.js +1 -0
- package/dist/client/assets/{chat-context-D6mGbi6m.js → chat-context-CcZXAHlF.js} +5 -5
- package/dist/client/assets/checkbox-CGiCIR_t.js +1 -0
- package/dist/client/assets/{cli-auth-success-DYZ43GUt.js → cli-auth-success-C0sOgmEb.js} +1 -1
- package/dist/client/assets/collection-detail-Clwh-BUk.js +1 -0
- package/dist/client/assets/collection-display-button-S0ZgQk6P.js +1 -0
- package/dist/client/assets/{collection-search-C_fvYmsw.js → collection-search-eFRNtpdt.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Cv1VGTD3.js → collection-table-wrapper-DQSn1GJT.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bj8UeBuP.js → collection-tabs-CYD2CpTe.js} +1 -1
- package/dist/client/assets/{command-DeIgAPPz.js → command-DWilEO1e.js} +1 -1
- package/dist/client/assets/commerce-onboarding-Dmxkngyz.js +1 -0
- package/dist/client/assets/connect-desktop-dialog-C8fqunJ_.js +1 -0
- package/dist/client/assets/connection-card-De6SHWCH.js +1 -0
- package/dist/client/assets/connection-detail-BUV19nAJ.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DYr5JaDw.js → connection-form-helpers-DsTip61C.js} +1 -1
- package/dist/client/assets/connections-DHz382Nc.js +1 -0
- package/dist/client/assets/constants-C8_Swa4x.js +1 -0
- package/dist/client/assets/{decopilot-BEN2dFqJ.js → decopilot-DA6E6MgD.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-D-yGYu6w.js → decopilot-sse-pool-B-Li8vIf.js} +1 -1
- package/dist/client/assets/{dialog-Bw0pp5yj.js → dialog-Bx9_D2-i.js} +1 -1
- package/dist/client/assets/{domain-settings-ClPu3y3V.js → domain-settings-CmBMcneA.js} +1 -1
- package/dist/client/assets/{drawer-Bqwp_rDk.js → drawer-DUrVpGtt.js} +1 -1
- package/dist/client/assets/dropdown-menu-BXlOZYEj.js +1 -0
- package/dist/client/assets/{empty-state-DEvtcbTs.js → empty-state-DrOUH3OQ.js} +1 -1
- package/dist/client/assets/extract-connection-data-AeQK1qls.js +1 -0
- package/dist/client/assets/file-explorer-cazCHuV9.js +2 -0
- package/dist/client/assets/{file-type-icon-CeDR5FDE.js → file-type-icon-DHWkW0ug.js} +1 -1
- package/dist/client/assets/{files-BhVyoXap.js → files-CHpi2r2q.js} +1 -1
- package/dist/client/assets/{form-BvyPfbLQ.js → form-C6xzxaKT.js} +1 -1
- package/dist/client/assets/format-time-Cy7tTmZp.js +1 -0
- package/dist/client/assets/general-CBqmiHQR.js +1 -0
- package/dist/client/assets/github-repo-picker-BFPwF92l.js +1 -0
- package/dist/client/assets/{hooks-BPEh0QmD.js → hooks-DPy92pzv.js} +4 -4
- package/dist/client/assets/{index-BLK_ychv.js → index-C8i8F2aZ.js} +12 -12
- package/dist/client/assets/index-CARq6YCN.js +1 -0
- package/dist/client/assets/{index-DSmc84cq.js → index-CO9SnRbg.js} +4 -4
- package/dist/client/assets/{index-DBQeQBu7.js → index-CYLzTU3h.js} +6 -6
- package/dist/client/assets/{index-Bi8gy8BM.js → index-ChSXukaC.js} +1 -1
- package/dist/client/assets/index-CveMeMql.css +1 -0
- package/dist/client/assets/{index-C0UjMZmb.js → index-DD6weYxO.js} +1 -1
- package/dist/client/assets/{index-CuLYHmz6.js → index-DU_SD-rb.js} +1 -1
- package/dist/client/assets/{index-C4E5A5_g.js → index-DWzm9A1x.js} +1 -1
- package/dist/client/assets/{index-WiwoxaKL.js → index-Dx-JuX8X.js} +2 -2
- package/dist/client/assets/{index-BAAVzGGp.js → index-LGROg_hz.js} +1 -1
- package/dist/client/assets/index-Mlqi33Qh.js +1 -0
- package/dist/client/assets/{index-OF548fxc.js → index-S0Q7YlOD.js} +25 -25
- package/dist/client/assets/index-r-ZTThxt.js +1 -0
- package/dist/client/assets/{index-redirect-Ckad27gh.js → index-redirect-BDcT3T7b.js} +1 -1
- package/dist/client/assets/{index-C3UHIWhR.js → index-zDHcoqw4.js} +1 -1
- package/dist/client/assets/{input-C6fESize.js → input-Dmp_t77f.js} +1 -1
- package/dist/client/assets/{integration-icon-B3836mZm.js → integration-icon-D1vivc8T.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BuboFMvI.js → invite-member-dialog-B52NxzkC.js} +2 -2
- package/dist/client/assets/{label-Cpj2tcAv.js → label-D3ajqQqF.js} +1 -1
- package/dist/client/assets/{library-tab-BBjWEEvH.js → library-tab-D0-rbhqe.js} +3 -3
- package/dist/client/assets/{login-BGIn53vR.js → login-B5g56FG8.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DXbhYp2n.js → mcp-oauth-jAFObzAH.js} +1 -1
- package/dist/client/assets/members-C3EfSHkY.js +1 -0
- package/dist/client/assets/{monaco-editor-Dg_OXRF1.js → monaco-editor-DMzl3sdg.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-ty05snCg.js → monitoring-stats-row-Cn7CUK3V.js} +1 -1
- package/dist/client/assets/{oauth-callback-DmDYtprU.js → oauth-callback-Bs1-J2uC.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-nV9ol-kz.js → oauth-callback-ai-provider-1jknSd8R.js} +1 -1
- package/dist/client/assets/{onboarding-DFxThqB8.js → onboarding-DvEuy0D_.js} +1 -1
- package/dist/client/assets/{org-install-C6-_thTM.js → org-install-CJ7F5mZU.js} +1 -1
- package/dist/client/assets/{org-layout-rq33k6_9.js → org-layout-CQsIu6xu.js} +1 -1
- package/dist/client/assets/{organization-choice-LqtmycnE.js → organization-choice-UHSo9CAk.js} +1 -1
- package/dist/client/assets/{page-seo-form-SfmOLumQ.js → page-seo-form-BY-XtFIF.js} +1 -1
- package/dist/client/assets/page-seo-sheet-C-o48EMg.js +1 -0
- package/dist/client/assets/{popover-CPAEPhwT.js → popover-DbclufIS.js} +1 -1
- package/dist/client/assets/post-editor-o5fS997b.js +1 -0
- package/dist/client/assets/{primitives-TAuh4FGx.js → primitives-PoyK9-WR.js} +1 -1
- package/dist/client/assets/profile-DXLRzqRR.js +1 -0
- package/dist/client/assets/project-app-view-sebr-y53.js +1 -0
- package/dist/client/assets/record-editor-BGPyrMO7.js +1 -0
- package/dist/client/assets/registry-GJh_dUyE.js +2 -0
- package/dist/client/assets/{registry-layout-D8trut1f.js → registry-layout-DaPQiP8-.js} +4 -4
- package/dist/client/assets/{require-capability-Dh5JJLWW.js → require-capability-D_bY_XS6.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BFKAd6mb.js → required-auth-layout-CUJtlw7e.js} +1 -1
- package/dist/client/assets/{reset-password-BVwK480T.js → reset-password-Boo6v3a2.js} +1 -1
- package/dist/client/assets/roles-CP5n6DBo.js +1 -0
- package/dist/client/assets/{scroll-area-DVylVd8s.js → scroll-area-C9lD0DG9.js} +11 -11
- package/dist/client/assets/{search-input-DsIBo_sc.js → search-input-CDcgzOxB.js} +1 -1
- package/dist/client/assets/secrets-BXbhAnGl.js +1 -0
- package/dist/client/assets/{sections-editor-BexUuo8y.js → sections-editor-DHI42whV.js} +2 -2
- package/dist/client/assets/select-CsaBdTgI.js +1 -0
- package/dist/client/assets/{select-model-BEsDOV7S.js → select-model-DflkFrTV.js} +1 -1
- package/dist/client/assets/seo-editor-CaMUQOw8.js +1 -0
- package/dist/client/assets/{settings-layout-CP6mrAe7.js → settings-layout-B_-ExZeb.js} +1 -1
- package/dist/client/assets/{settings-section-Cd3zmde3.js → settings-section-URYHyOYi.js} +1 -1
- package/dist/client/assets/{sheet-S1l6W00L.js → sheet-BGhHsN5F.js} +1 -1
- package/dist/client/assets/{shell-controls-CgJrLQ34.js → shell-controls-6cosW1pP.js} +1 -1
- package/dist/client/assets/shell-layout-DdBCXSg-.js +1 -0
- package/dist/client/assets/{sidebar-DKxDx7lC.js → sidebar-BAsFQ-MT.js} +1 -1
- package/dist/client/assets/{skeleton-wLHgTqVy.js → skeleton-BUBk-3xi.js} +1 -1
- package/dist/client/assets/sso-D_2b6Fc8.js +1 -0
- package/dist/client/assets/store-ievF1htD.js +1 -0
- package/dist/client/assets/store-registry-B3gzmTlr.js +2 -0
- package/dist/client/assets/{studio-tools-DkATXRgK.js → studio-tools-DgAshZ-_.js} +1 -1
- package/dist/client/assets/{switch-C4FKiTgP.js → switch-BonZrdli.js} +1 -1
- package/dist/client/assets/{table-BV3Hd7cI.js → table-DEH4uiQe.js} +1 -1
- package/dist/client/assets/{tabs-B9iGaa-Z.js → tabs-CRj6AkcW.js} +1 -1
- package/dist/client/assets/task-row-ChWV-nAj.js +1 -0
- package/dist/client/assets/task-status-Dh1x9gPU.js +1 -0
- package/dist/client/assets/{textarea-CiUwXw-w.js → textarea-BNlJNx-b.js} +1 -1
- package/dist/client/assets/{toggle-group-CN_l4byE.js → toggle-group-QkV1Q0_i.js} +1 -1
- package/dist/client/assets/{toolbar-ekp7NSbq.js → toolbar-CCAeF5A-.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CBlJ6I0o.js → toolbar-icon-button-D7VY-9VN.js} +1 -1
- package/dist/client/assets/{tools-list-D_VeN0IP.js → tools-list-M23BH1hq.js} +1 -1
- package/dist/client/assets/{tooltip-CKk6MyBG.js → tooltip-FlCInimM.js} +1 -1
- package/dist/client/assets/{types-CeLnpp7L.js → types-kWY4145T.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DhQCSBc1.js → use-ai-providers-Bc5pT284.js} +1 -1
- package/dist/client/assets/use-automations-CF2YS293.js +1 -0
- package/dist/client/assets/{use-capability-HK8_0h49.js → use-capability-BY1ZsP4P.js} +1 -1
- package/dist/client/assets/use-clock-tick-DiVstnVw.js +1 -0
- package/dist/client/assets/{use-collections-CdbL-rX2.js → use-collections-BwIgjkkY.js} +1 -1
- package/dist/client/assets/use-connection-BuLrAfYP.js +1 -0
- package/dist/client/assets/{use-copy-Ba_RrSds.js → use-copy-ue2G1-hn.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-CwTiuOpk.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-B6gDjRvo.js → use-debounced-autosave-DPoL6EyR.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CyOmB5fJ.js → use-debounced-value-BaMggBf4.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DwY1rJO2.js → use-decopilot-events-CqBKeCC-.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CPWy2xmw.js → use-delete-connection-Dz7PGuLT.js} +1 -1
- package/dist/client/assets/{use-file-configs-SlXV4SMn.js → use-file-configs-DG9Mhiyd.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DHUYU_kG.js → use-infinite-scroll-3Uj2RNwo.js} +1 -1
- package/dist/client/assets/{use-join-requests-f9qAAjhC.js → use-join-requests-S43CfCdf.js} +1 -1
- package/dist/client/assets/use-mcp-client-CnRSGieI.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-UzvitU_e.js → use-mcp-prompts-BHkYncis.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-zFZxfr6-.js → use-mcp-tools-CDyeZmTp.js} +1 -1
- package/dist/client/assets/{use-members-DTTAqnQj.js → use-members-DSSi_h3c.js} +1 -1
- package/dist/client/assets/{use-mobile-71FrMeIQ.js → use-mobile-FUxUqTQv.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DIwK9fdW.js → use-navigate-to-agent-DqOg0uVZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CfqWFlO5.js → use-org-auth-client-DOD7ccpR.js} +1 -1
- package/dist/client/assets/{use-org-sso-DnPy8IJo.js → use-org-sso-DU73DmAG.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DLiC1YgM.js → use-organization-roles-Dcz2MjMd.js} +1 -1
- package/dist/client/assets/use-organization-settings-C8EmnI93.js +1 -0
- package/dist/client/assets/use-registry-connections-Ctaa0JQV.js +1 -0
- package/dist/client/assets/{use-secrets-CJb3Q-KQ.js → use-secrets-B5E8bF7h.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C23loojF.js → use-status-sounds-BH3nLka8.js} +1 -1
- package/dist/client/assets/{use-view-mode-DtQqfjJM.js → use-view-mode-DHvPeuX3.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-iU8WqU_q.js +1 -0
- package/dist/client/assets/useInfiniteQuery-MSYpmccr.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Wt188HkA.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-f54Kg_lq.js → useSuspenseQueries-Cy-j8ofE.js} +1 -1
- package/dist/client/assets/variant-calendar-BWM8PQLC.js +1 -0
- package/dist/client/assets/{view-mode-toggle-xMIlyXz_.js → view-mode-toggle-td--5Ihh.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +521 -507
- package/dist/server/migrate.js +83 -83
- package/dist/server/server.js +314 -314
- package/package.json +1 -1
- package/dist/client/assets/ChevronUp-BgfgTfJo.js +0 -1
- package/dist/client/assets/DotsVertical-wFUaTKIr.js +0 -1
- package/dist/client/assets/Eye-BPtPfNj_.js +0 -1
- package/dist/client/assets/SwitchHorizontal01-DKfBMAMt.js +0 -1
- package/dist/client/assets/agent-capabilities-Bxs0ILD3.js +0 -1
- package/dist/client/assets/agent-icon-Bw-pYaqu.js +0 -1
- package/dist/client/assets/agents-list-BaYiXH15.js +0 -1
- package/dist/client/assets/ai-providers-C4e06NrJ.js +0 -1
- package/dist/client/assets/app-editor-DtV9KQKR.js +0 -1
- package/dist/client/assets/automation-runs-D52rO4m5.js +0 -1
- package/dist/client/assets/automations-Cc50qZvh.js +0 -1
- package/dist/client/assets/buckets--3cPd2W_.js +0 -1
- package/dist/client/assets/bulk-category-panel-DsOXc5WN.js +0 -1
- package/dist/client/assets/category-editor-EHZdd7WQ.js +0 -1
- package/dist/client/assets/checkbox-B0iPK-Vx.js +0 -1
- package/dist/client/assets/collection-detail-pr_0VNQT.js +0 -1
- package/dist/client/assets/collection-display-button-BdyEgFyg.js +0 -1
- package/dist/client/assets/commerce-onboarding-CHMkWtbP.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-DU7oJbU_.js +0 -1
- package/dist/client/assets/connection-card-CIIT6a-B.js +0 -1
- package/dist/client/assets/connection-detail-DW7R20rk.js +0 -1
- package/dist/client/assets/connections-BXo316Yj.js +0 -1
- package/dist/client/assets/dropdown-menu-DBdT-R6w.js +0 -1
- package/dist/client/assets/extract-connection-data-DB2mp1s-.js +0 -1
- package/dist/client/assets/file-explorer-CCDyOatC.js +0 -2
- package/dist/client/assets/general-Cppvys0u.js +0 -1
- package/dist/client/assets/github-repo-picker-D7QB7NBL.js +0 -1
- package/dist/client/assets/index-B1I1Oi0g.css +0 -1
- package/dist/client/assets/index-BASamdWA.js +0 -1
- package/dist/client/assets/index-CgS6ZFaA.js +0 -1
- package/dist/client/assets/members-BJuT40Uf.js +0 -1
- package/dist/client/assets/page-seo-sheet-rEaKbGL4.js +0 -1
- package/dist/client/assets/post-editor-DNSrY2g5.js +0 -1
- package/dist/client/assets/profile-BJUc-WPJ.js +0 -1
- package/dist/client/assets/project-app-view-vdCIDY4V.js +0 -1
- package/dist/client/assets/record-editor-ChG8xfNH.js +0 -1
- package/dist/client/assets/registry-BDvYq0sF.js +0 -2
- package/dist/client/assets/roles-BVmBg8nQ.js +0 -1
- package/dist/client/assets/secrets-okf3dR05.js +0 -1
- package/dist/client/assets/select-CYLZmEqL.js +0 -1
- package/dist/client/assets/seo-editor-lx2p6Zbz.js +0 -1
- package/dist/client/assets/shell-layout-D3aCzUD1.js +0 -1
- package/dist/client/assets/sso-CsR0QPxD.js +0 -1
- package/dist/client/assets/store-Dmf6IFoE.js +0 -1
- package/dist/client/assets/store-registry-Ci8hLaqa.js +0 -2
- package/dist/client/assets/task-row-Dq6a6p3f.js +0 -1
- package/dist/client/assets/task-status-vCNfacyn.js +0 -1
- package/dist/client/assets/use-automations-DH-tTWJO.js +0 -1
- package/dist/client/assets/use-clock-tick-7xgXM9p8.js +0 -1
- package/dist/client/assets/use-connection-BoEeMU65.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-DCJ_9oKR.js +0 -1
- package/dist/client/assets/use-mcp-client-PdP6F3TE.js +0 -10
- package/dist/client/assets/use-organization-settings-BZHnFHzb.js +0 -1
- package/dist/client/assets/use-registry-connections-BItKY-Xq.js +0 -1
- package/dist/client/assets/use-virtual-mcp-D3Xj1Zyr.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CdROm-U7.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DtKEQU_S.js +0 -1
- package/dist/client/assets/variant-calendar-BSvOsjHM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{be as p,bf as t,ay as y,s as a,b$ as q,o as s,az as g,aw as u,ac as m,a$ as x,bc as O,c0 as ge,c1 as fe,c2 as B,c3 as j,c4 as be,c5 as ye,c6 as $,c7 as Se,c8 as _e,c9 as He,ca as Me,cb as ke,cc as Pe,cd as qe,ce as Te,bq as Ie,cf as Ee,cg as Le,ch as ze,ci as Ae,cj as De,ck as Ue,cl as Ne,bp as Oe,r as te,c as V,j as b,cm as je,cn as Be,v as $e,l as oe}from"./index-
|
|
1
|
+
import{be as p,bf as t,ay as y,s as a,b$ as q,o as s,az as g,aw as u,ac as m,a$ as x,bc as O,c0 as ge,c1 as fe,c2 as B,c3 as j,c4 as be,c5 as ye,c6 as $,c7 as Se,c8 as _e,c9 as He,ca as Me,cb as ke,cc as Pe,cd as qe,ce as Te,bq as Ie,cf as Ee,cg as Le,ch as ze,ci as Ae,cj as De,ck as Ue,cl as Ne,bp as Oe,r as te,c as V,j as b,cm as je,cn as Be,v as $e,l as oe}from"./index-S0Q7YlOD.js";import{P as Ve}from"./use-mcp-client-CnRSGieI.js";const le=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Fe(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ke(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const f=(l.index??0)+l[0].length;return r.slice(0,f)+`
|
|
2
2
|
`+i+r.slice(f)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=r.match(c);if(d){const f=(d.index??0)+d[0].length;return r.slice(0,f)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,
|
|
1
|
+
import{c as d,D as f,q as P,K as m,k as K}from"./index-S0Q7YlOD.js";import{u as S,c as T}from"./studio-tools-DgAshZ-_.js";function g(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await T(s,"AI_PROVIDER_KEY_LIST",{})}}function E(){const s=d.c(7),{org:e}=f(),o=S();let i;s[0]!==e.id?(i=m.aiProviders(e.id),s[0]=e.id,s[1]=i):i=s[1];let t;s[2]!==o?(t=async()=>await o.call("AI_PROVIDERS_LIST",{}),s[2]=o,s[3]=t):t=s[3];let l;s[4]!==i||s[5]!==t?(l={queryKey:i,staleTime:1/0,queryFn:t},s[4]=i,s[5]=t,s[6]=l):l=s[6];const{data:r}=P(l);return r}function R(){const s=d.c(5),{org:e}=f();let o;s[0]!==e.id||s[1]!==e.slug?(o=g(e.slug,e.id),s[0]=e.id,s[1]=e.slug,s[2]=o):o=s[2];const{data:i}=P(o);let t;return s[3]!==i?.keys?(t=i?.keys??[],s[3]=i?.keys,s[4]=t):t=s[4],t}function p(s){const e=d.c(15),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s??""),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];const l=!!s;let r;e[3]!==s||e[4]!==i?(r=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s??""}),e[3]=s,e[4]=i,e[5]=r):r=e[5];let n;e[6]!==t||e[7]!==l||e[8]!==r?(n={queryKey:t,enabled:l,staleTime:6e4,queryFn:r},e[6]=t,e[7]=l,e[8]=r,e[9]=n):n=e[9];const{data:a,isLoading:_}=K(n);let u;e[10]!==a?.models?(u=a?.models??[],e[10]=a?.models,e[11]=u):u=e[11];const y=!!s&&_;let c;return e[12]!==u||e[13]!==y?(c={models:u,isLoading:y},e[12]=u,e[13]=y,e[14]=c):c=e[14],c}function A(s){const e=d.c(11),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];let l;e[3]!==s||e[4]!==i?(l=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==t||e[7]!==l?(r={queryKey:t,staleTime:6e4,queryFn:l},e[6]=t,e[7]=l,e[8]=r):r=e[8];const{data:n}=P(r);let a;return e[9]!==n?.models?(a=n?.models??[],e[9]=n?.models,e[10]=a):a=e[10],a}export{g as a,p as b,E as c,A as d,R as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as D,D as U,K as T,k as I,m as x,d as y,t as m}from"./index-S0Q7YlOD.js";import{u as z}from"./use-mcp-client-CnRSGieI.js";import{S as J}from"./constants-C8_Swa4x.js";import{u as k}from"./studio-tools-DgAshZ-_.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function it(t){const e=D.c(12),{org:s}=U(),l=t??J;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=z(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const r=!!t;let c;return e[8]!==n||e[9]!==o||e[10]!==r?(c={queryKey:n,queryFn:o,enabled:r,staleTime:3e4},e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],I(c)}function ot(t){const e=D.c(9),{org:s}=U(),l=k();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],I(n)}function at(t){const e=D.c(10),{org:s}=U(),l=k();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],I(o)}function nt(t,e){const s=D.c(12),{org:l}=U(),a=k();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let r;return s[8]!==i||s[9]!==n||s[10]!==o?(r={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=r):r=s[11],I(r)}function lt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function ut(){const t=D.c(64),{org:e}=U(),s=k(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let r;t[6]!==s?(r=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=r):r=t[7];let c;t[8]!==i?(c=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=c):c=t[9];let d;t[10]!==r||t[11]!==c?(d={mutationFn:r,onSuccess:c,onError:X},t[10]=r,t[11]=c,t[12]=d):d=t[12];const q=y(d);let p;t[13]!==s?(p=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=p):p=t[14];let A;t[15]!==i||t[16]!==o?(A=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=A):A=t[17];let G;t[18]!==p||t[19]!==A?(G={mutationFn:p,onSuccess:A,onError:W},t[18]=p,t[19]=A,t[20]=G):G=t[20];const Q=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const j=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==q||t[57]!==j||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==Q?(M={create:q,update:Q,remove:j,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=q,t[57]=j,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=Q,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{it as a,at as b,ot as c,lt as d,nt as e,ut as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,
|
|
1
|
+
import{c as u,D as m,k as g,K as p}from"./index-S0Q7YlOD.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as l,r as u}from"./index-S0Q7YlOD.js";const i=new Map;function c(r){let t=i.get(r);return t||(t={tick:0,subscribers:new Set,intervalId:null},i.set(r,t)),t}function a(r,t){const e=c(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.tick+=1;for(const s of e.subscribers)s()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function d(r){const t=l.c(3),e=r===void 0?6e4:r;let s,n;return t[0]!==e?(s=o=>a(e,o),n=()=>c(e).tick,t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]),u.useSyncExternalStore(s,n,b)}function b(){return 0}export{d as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q,c as v,m as b,d as F,aD as x,t as _}from"./index-
|
|
1
|
+
import{q,c as v,m as b,d as F,aD as x,t as _}from"./index-S0Q7YlOD.js";function D(e,s,o){const t=[];if(e?.trim()){const n=e.trim(),r=o.map(a=>({field:[String(a)],operator:"contains",value:n}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const n of s)t.push({field:[n.column],operator:"eq",value:n.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function Q(e,s,o){const t=e??o,n=s??"desc";return[{field:[String(t)],direction:n}]}function O(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function k(e,s,o,t){const n=s.toUpperCase(),r=`COLLECTION_${n}_GET`;return{queryKey:x.collectionItem(t,e,"",n,o??""),queryFn:async()=>{if(!o)return{item:null};const a=await t.callTool({name:r,arguments:{id:o}});return O(a)},staleTime:6e4}}function j(e,s,o,t){const n=v.c(5);let r;n[0]!==t||n[1]!==s||n[2]!==o||n[3]!==e?(r=k(e,s,o,t),n[0]=t,n[1]=s,n[2]=o,n[3]=e,n[4]=r):r=n[4];const{data:a}=q(r);return a?.item??null}const K={structuredContent:{items:[]},isError:!1};function z(e,s,o,t={}){const{searchTerm:n,filters:r,sortKey:a,sortDirection:L,searchFields:S=["title","description"],defaultSortKey:h="updated_at",pageSize:g=100,additionalToolArgs:c}=t,l=s.toUpperCase(),f=`COLLECTION_${l}_LIST`,p=D(n,r,S),T=Q(a,L,h),u={...p&&{where:p},...T&&{orderBy:T},limit:g,offset:0,...c},m=JSON.stringify(u),C=x.collectionList(o,e,"",l,m),{data:w}=q({queryKey:C,queryFn:async()=>o?await o.callTool({name:f,arguments:u}):K,staleTime:3e4,retry:!1,select:d=>O(d??{})?.items??[]});return w}function G(e,s,o){const t=v.c(34),n=b();let r;t[0]!==s?(r=s.toUpperCase(),t[0]=s,t[1]=r):r=t[1];const a=r,L=`COLLECTION_${a}_CREATE`,S=`COLLECTION_${a}_UPDATE`,h=`COLLECTION_${a}_DELETE`;let g;t[2]!==n||t[3]!==e||t[4]!==a?(g=()=>{n.invalidateQueries({predicate:E=>{const i=E.queryKey;return i[1]===e&&i[3]==="collection"&&i[4]===a}})},t[2]=n,t[3]=e,t[4]=a,t[5]=g):g=t[5];const c=g;let l;t[6]!==o||t[7]!==L?(l=async E=>{const i=await o.callTool({name:L,arguments:{data:E}});if(i.isError)throw new Error(Array.isArray(i.content)?i.content[0]?.text:String(i.content));return O(i).item},t[6]=o,t[7]=L,t[8]=l):l=t[8];let f;t[9]!==c?(f=()=>{c(),_.success("Item created successfully")},t[9]=c,t[10]=f):f=t[10];let p;t[11]!==l||t[12]!==f?(p={mutationFn:l,onSuccess:f,onError:B},t[11]=l,t[12]=f,t[13]=p):p=t[13];const T=F(p);let u;t[14]!==o||t[15]!==S?(u=async E=>{const{id:i,data:A}=E,U=await o.callTool({name:S,arguments:{id:i,data:A}});return O(U).item},t[14]=o,t[15]=S,t[16]=u):u=t[16];let m;t[17]!==c?(m=()=>{c(),_.success("Item updated successfully")},t[17]=c,t[18]=m):m=t[18];let C;t[19]!==u||t[20]!==m?(C={mutationFn:u,onSuccess:m,onError:R},t[19]=u,t[20]=m,t[21]=C):C=t[21];const w=F(C);let d;t[22]!==o||t[23]!==h?(d=async E=>{const i=await o.callTool({name:h,arguments:{id:E}});return O(i).item.id},t[22]=o,t[23]=h,t[24]=d):d=t[24];let y;t[25]!==c?(y=()=>{c(),_.success("Item deleted successfully")},t[25]=c,t[26]=y):y=t[26];let N;t[27]!==d||t[28]!==y?(N={mutationFn:d,onSuccess:y,onError:P},t[27]=d,t[28]=y,t[29]=N):N=t[29];const $=F(N);let I;return t[30]!==T||t[31]!==$||t[32]!==w?(I={create:T,update:w,delete:$},t[30]=T,t[31]=$,t[32]=w,t[33]=I):I=t[33],I}function P(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to delete item: ${s}`)}function R(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to update item: ${s}`)}function B(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to create item: ${s}`)}export{G as a,z as b,k as c,j as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as f,D as C}from"./index-S0Q7YlOD.js";import{a as N,b as O,u as S}from"./use-collections-BwIgjkkY.js";import{u as I}from"./use-mcp-client-CnRSGieI.js";import{S as m}from"./constants-C8_Swa4x.js";function _(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:m,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=I(a);return O(u.id,"CONNECTIONS",A,p)}function x(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:m,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function L(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:m,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return N(o.id,"CONNECTIONS",n)}export{x as a,L as b,_ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,r as n}from"./index-
|
|
1
|
+
import{c as i,r as n}from"./index-S0Q7YlOD.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as g}from"./index-S0Q7YlOD.js";import{b as f}from"./use-virtual-mcp-iU8WqU_q.js";import{u as p}from"./use-navigate-to-agent-DqOg0uVZ.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:l}=d,c=l===void 0?!1:l,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(u.id,{search:{main:"instructions"}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
|
package/dist/client/assets/{use-debounced-autosave-B6gDjRvo.js → use-debounced-autosave-DPoL6EyR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-S0Q7YlOD.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
|
package/dist/client/assets/{use-debounced-value-CyOmB5fJ.js → use-debounced-value-BaMggBf4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r as n}from"./index-
|
|
1
|
+
import{c as m,r as n}from"./index-S0Q7YlOD.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
|
package/dist/client/assets/{use-decopilot-events-DwY1rJO2.js → use-decopilot-events-CqBKeCC-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-S0Q7YlOD.js";import{d as R,D as u}from"./decopilot-sse-pool-B-Li8vIf.js";const f=()=>0;function g(E){const{orgSlug:t,taskId:a,enabled:n=!0,onStep:o,onFinish:S,onTaskStatus:i}=E,l=s.useRef({taskId:a,onStep:o,onFinish:S,onTaskStatus:i});l.current={taskId:a,onStep:o,onFinish:S,onTaskStatus:i};const c=s.useRef(null),p=s.useRef(n),b=s.useRef(t);(!c.current||p.current!==n||b.current!==t)&&(p.current=n,b.current=t,c.current=d=>{if(!n||!t)return()=>{};const k=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=l.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}d()}};return R.subscribe(t,k)}),s.useSyncExternalStore(c.current,f,f)}export{g as u};
|
package/dist/client/assets/{use-delete-connection-CPWy2xmw.js → use-delete-connection-Dz7PGuLT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as H,j as t,
|
|
1
|
+
import{c as H,j as t,D as Q,m as J,r as M,t as F,b7 as P,b8 as Y}from"./index-S0Q7YlOD.js";import{c as I,b as L,d as R,A as q,e as U,g as k,a as K,f as $}from"./alert-dialog-DNV8OhbX.js";import{u as z}from"./studio-tools-DgAshZ-_.js";function W(T){const e=H.c(41),{deleteState:s,cancelDelete:c,confirmDelete:i,confirmForceDelete:l}=T,N=s.mode==="deleting";let r;e[0]!==c?(r=w=>{w||c()},e[0]=c,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(I,{children:"Delete Connection?"}),e[2]=f):f=e[2];const S=s.mode==="deleting"&&s.connection.title;let u;e[3]!==S?(u=t.jsxs(L,{children:[f,t.jsxs(R,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:S}),"."]})]}),e[3]=S,e[4]=u):u=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(q,{children:"Cancel"}),e[5]=E):E=e[5];let h;e[6]!==i?(h=t.jsxs(U,{children:[E,t.jsx(k,{onClick:i,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[6]=i,e[7]=h):h=e[7];let n;e[8]!==u||e[9]!==h?(n=t.jsxs(K,{children:[u,h]}),e[8]=u,e[9]=h,e[10]=n):n=e[10];let o;e[11]!==N||e[12]!==r||e[13]!==n?(o=t.jsx($,{open:N,onOpenChange:r,children:n}),e[11]=N,e[12]=r,e[13]=n,e[14]=o):o=e[14];const a=s.mode==="force-deleting";let d;e[15]!==c?(d=w=>{w||c()},e[15]=c,e[16]=d):d=e[16];let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(I,{children:"Connection Used by Agents"}),e[17]=m):m=e[17];const _=s.mode==="force-deleting"&&s.connection.title;let g;e[18]!==_?(g=t.jsx("span",{className:"font-medium text-foreground",children:_}),e[18]=_,e[19]=g):g=e[19];const A=s.mode==="force-deleting"&&s.agentNames;let x;e[20]!==A?(x=t.jsx("span",{className:"font-medium text-foreground",children:A}),e[20]=A,e[21]=x):x=e[21];let C;e[22]!==g||e[23]!==x?(C=t.jsxs("p",{children:["The connection"," ",g," ","is currently used by the following agent(s):"," ",x,"."]}),e[22]=g,e[23]=x,e[24]=C):C=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."}),e[25]=O):O=e[25];let D;e[26]!==C?(D=t.jsxs(L,{children:[m,t.jsx(R,{asChild:!0,children:t.jsxs("div",{children:[C,O]})})]}),e[26]=C,e[27]=D):D=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(q,{children:"Cancel"}),e[28]=b):b=e[28];let j;e[29]!==l?(j=t.jsxs(U,{children:[b,t.jsx(k,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]}),e[29]=l,e[30]=j):j=e[30];let p;e[31]!==D||e[32]!==j?(p=t.jsxs(K,{children:[D,j]}),e[31]=D,e[32]=j,e[33]=p):p=e[33];let y;e[34]!==a||e[35]!==d||e[36]!==p?(y=t.jsx($,{open:a,onOpenChange:d,children:p}),e[34]=a,e[35]=d,e[36]=p,e[37]=y):y=e[37];let v;return e[38]!==y||e[39]!==o?(v=t.jsxs(t.Fragment,{children:[o,y]}),e[38]=y,e[39]=o,e[40]=v):v=e[40],v}function X({onSuccess:T}={}){const{org:e}=Q(),s=J(),c=z(),[i,l]=M.useState({mode:"idle"}),N=()=>{s.invalidateQueries({predicate:n=>{const o=n.queryKey;return o[1]===e.id&&o[3]==="collection"&&o[4]==="CONNECTIONS"}})},r=n=>{P(n),s.invalidateQueries({predicate:o=>o.queryKey[1]===Y&&o.queryKey[3]===n})},f=n=>{N(),r(n),F.success("Connection deleted successfully"),l({mode:"idle"}),T?.()};return{deleteState:i,requestDelete:n=>{l({mode:"deleting",connection:n})},cancelDelete:()=>{l({mode:"idle"})},confirmDelete:async()=>{if(i.mode!=="deleting")return;const n=i.connection;l({mode:"idle"});try{await c.call("COLLECTION_CONNECTIONS_DELETE",{id:n.id}),f(n.id)}catch(o){const a=o instanceof Error?o.message:String(o),d=a.replace(/^Error:\s*/,"");try{const m=JSON.parse(d);if(m.code==="CONNECTION_IN_USE"&&m.agentNames){l({mode:"force-deleting",connection:n,agentNames:m.agentNames.map(_=>`"${_}"`).join(", ")});return}}catch{}F.error(`Failed to delete connection: ${a}`)}},confirmForceDelete:async()=>{if(i.mode!=="force-deleting")return;const n=i.connection.id;l({mode:"idle"});try{await c.call("COLLECTION_CONNECTIONS_DELETE",{id:n,force:!0}),f(n)}catch(o){const a=o instanceof Error?o.message:String(o);F.error(`Failed to delete connection: ${a}`)}}}}export{W as D,X as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,
|
|
1
|
+
import{c as u,D as c,K as r,q as y,m as C,d,k as F}from"./index-S0Q7YlOD.js";import{u as f}from"./studio-tools-DgAshZ-_.js";function E(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:l}=y(s);return l.configs}function I(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;return e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6],F(s)}function q(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_CREATE",{...a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}function _(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_DELETE",{id:a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}export{I as a,q as b,_ as c,E as u};
|
package/dist/client/assets/{use-infinite-scroll-DHUYU_kG.js → use-infinite-scroll-3Uj2RNwo.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{al as d,
|
|
1
|
+
import{al as d,dW as l,dX as v,r as i}from"./index-S0Q7YlOD.js";var p=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,u=super.createResult(e,t),{isFetching:r,isRefetching:h,isError:a,isRefetchError:g}=u,s=n.fetchMeta?.fetchMore?.direction,o=a&&s==="forward",P=r&&s==="forward",c=a&&s==="backward",f=r&&s==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,n.data),hasPreviousPage:l(t,n.data),isFetchNextPageError:o,isFetchingNextPage:P,isFetchPreviousPageError:c,isFetchingPreviousPage:f,isRefetchError:g&&!o&&!c,isRefetching:h&&!P&&!f}}};function b(e,t,n=!1,u){const r=i.useRef(null),h=i.useRef(null),a=i.useRef(e),g=i.useRef(t),s=i.useRef(n),o=i.useRef(u);a.current=e,g.current=t,s.current=n,o.current=u;const[P]=i.useState(()=>c=>{h.current=c,r.current&&(r.current.disconnect(),r.current=null),c&&queueMicrotask(()=>{if(h.current!==c)return;const f=new IntersectionObserver(R=>{R[0]?.isIntersecting&&g.current&&!s.current&&a.current()},{root:o.current?.current??null,rootMargin:"0px 0px 200px 0px"});f.observe(c),r.current=f})});return P}export{p as I,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,
|
|
1
|
+
import{c as g,D as N,K as y,k as _,m as A,d as I,t as q}from"./index-S0Q7YlOD.js";import{a as S}from"./use-capability-BY1ZsP4P.js";import{u as O}from"./studio-tools-DgAshZ-_.js";function F(){const e=g.c(10),{org:r}=N(),u=O(),{capabilities:a,isPrivileged:c}=S(),d=c||!!a["members:manage"];let t;e[0]!==r.id?(t=y.organizationJoinRequests(r.id),e[0]=r.id,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=u,e[3]=s):s=e[3];const i=!!r.id&&d;let n;e[4]!==t||e[5]!==s||e[6]!==i?(n={queryKey:t,queryFn:s,enabled:i},e[4]=t,e[5]=s,e[6]=i,e[7]=n):n=e[7];const{data:l}=_(n);let o;return e[8]!==l?.requests?(o=l?.requests??[],e[8]=l?.requests,e[9]=o):o=e[9],o}function K(){const e=g.c(21),{org:r,locator:u}=N(),a=O(),c=A();let d;e[0]!==u||e[1]!==r||e[2]!==c?(d=()=>{c.invalidateQueries({queryKey:y.organizationJoinRequests(r.id)}),c.invalidateQueries({queryKey:y.members(u)})},e[0]=u,e[1]=r,e[2]=c,e[3]=d):d=e[3];const t=d;let s;e[4]!==a?(s=R=>a.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:R}),e[4]=a,e[5]=s):s=e[5];let i;e[6]!==t?(i=()=>{t(),q.success("Request approved")},e[6]=t,e[7]=i):i=e[7];let n;e[8]!==s||e[9]!==i?(n={mutationFn:s,onSuccess:i,onError:v},e[8]=s,e[9]=i,e[10]=n):n=e[10];const l=I(n);let o;e[11]!==a?(o=R=>a.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:R}),e[11]=a,e[12]=o):o=e[12];let f;e[13]!==t?(f=()=>{t(),q.success("Request denied")},e[13]=t,e[14]=f):f=e[14];let m;e[15]!==o||e[16]!==f?(m={mutationFn:o,onSuccess:f,onError:T},e[15]=o,e[16]=f,e[17]=m):m=e[17];const E=I(m);let p;return e[18]!==l||e[19]!==E?(p={approve:l,deny:E},e[18]=l,e[19]=E,e[20]=p):p=e[20],p}function T(e){return q.error(e instanceof Error?e.message:"Failed to deny")}function v(e){return q.error(e instanceof Error?e.message:"Failed to approve")}export{F as a,K as u};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{cT as ce,cU as le,cV as ue,c8 as de,cW as he,bP as m,bQ as g,cX as fe,cY as pe,cZ as me,c_ as M,c$ as _e,d0 as F,d1 as we,d2 as q,d3 as ge,d4 as D,d5 as Te,d6 as ye,d7 as ke,d8 as z,bt as ve,bv as Se,ba as Ce,c3 as ee,cf as be,cl as Re,cj as Ie,cH as Ee,d9 as qe,da as Pe,db as A,dc as $e,dd as Me,ck as Ae,cg as He,ch as Oe,ci as xe,bq as Ne,de as Ue,df as je,dg as Fe,ca as De,dh as Le,di as Ve,dj as Qe,bp as N,c as te,q as se,aD as V}from"./index-S0Q7YlOD.js";import{S as ze}from"./constants-C8_Swa4x.js";import{U as P,a as H,e as J}from"./auth-k2I4x92r.js";function x(a){return!!a._zod}function b(a,e){return x(a)?ce(a,e):a.safeParse(e)}function re(a){if(!a)return;let e;if(x(a)?e=a._zod?.def?.shape:e=a.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Je(a){if(x(a)){const o=a._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const t=a._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const s=a.value;if(s!==void 0)return s}function R(a){return a==="completed"||a==="failed"||a==="cancelled"}function W(a){const t=re(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Je(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function K(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const We=6e4;class Ke{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(le,t=>{this._oncancel(t)}),this.setNotificationHandler(ue,t=>{this._onprogress(t)}),this.setRequestHandler(de,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(he,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(fe,async(t,s)=>{const r=async()=>{const o=t.params.taskId;if(this._taskMessageQueue){let i;for(;i=await this._taskMessageQueue.dequeue(o,s.sessionId);){if(i.type==="response"||i.type==="error"){const u=i.message,p=u.id,l=this._requestResolvers.get(p);if(l)if(this._requestResolvers.delete(p),i.type==="response")l(u);else{const h=u,f=new m(h.error.code,h.error.message,h.error.data);l(f)}else{const h=i.type==="response"?"Response":"Error";this._onerror(new Error(`${h} handler missing for request ${p}`))}continue}await this._transport?.send(i.message,{relatedRequestId:s.requestId})}}const n=await this._taskStore.getTask(o,s.sessionId);if(!n)throw new m(g.InvalidParams,`Task not found: ${o}`);if(!R(n.status))return await this._waitForTaskUpdate(o,s.signal),await r();if(R(n.status)){const i=await this._taskStore.getTaskResult(o,s.sessionId);return this._clearTaskQueue(o),{...i,_meta:{...i._meta,[q]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(pe,async(t,s)=>{try{const{tasks:r,nextCursor:o}=await this._taskStore.listTasks(t.params?.cursor,s.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new m(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(me,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new m(g.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(t.params.taskId);const o=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!o)throw new m(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof m?r:new m(g.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,s,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:s,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const s=Date.now()-t.startTime;if(t.maxTotalTimeout&&s>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),m.fromError(g.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:s});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=o=>{s?.(o),this._onerror(o)};const r=this._transport?.onmessage;this._transport.onmessage=(o,n)=>{r?.(o,n),M(o)||_e(o)?this._onresponse(o):F(o)?this._onrequest(o,n):we(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const s of this._timeoutInfo.values())clearTimeout(s.timeoutId);this._timeoutInfo.clear();for(const s of this._requestHandlerAbortControllers.values())s.abort();this._requestHandlerAbortControllers.clear();const t=m.fromError(g.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[q]?.taskId;if(s===void 0){const l={jsonrpc:"2.0",id:e.id,error:{code:g.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},r?.sessionId).catch(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(l).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ge(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,p={signal:n.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(n.signal.aborted)return;const h={relatedRequestId:e.id};o&&(h.relatedTask={taskId:o}),await this.notification(l,h)},sendRequest:async(l,h,f)=>{if(n.signal.aborted)throw new m(g.ConnectionClosed,"Request was cancelled");const w={...f,relatedRequestId:e.id};o&&!w.relatedTask&&(w.relatedTask={taskId:o});const y=w.relatedTask?.taskId??o;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(l,h,w)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:o,taskStore:u,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,p)).then(async l=>{if(n.signal.aborted)return;const h={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async l=>{if(n.signal.aborted)return;const h={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:g.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===n&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...s}=e.params,r=Number(t),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const n=this._responseHandlers.get(r),i=this._timeoutInfo.get(r);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(u){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),n(u);return}o(s)}_onresponse(e){const t=Number(e.id),s=this._requestResolvers.get(t);if(s){if(this._requestResolvers.delete(t),M(e))s(e);else{const n=new m(e.error.code,e.error.message,e.error.data);s(n)}return}const r=this._responseHandlers.get(t);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let o=!1;if(M(e)&&e.result&&typeof e.result=="object"){const n=e.result;if(n.task&&typeof n.task=="object"){const i=n.task;typeof i.taskId=="string"&&(o=!0,this._taskProgressTokens.set(i.taskId,t))}}if(o||this._progressHandlers.delete(t),M(e))r(e);else{const n=m.fromError(e.error.code,e.error.message,e.error.data);r(n)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,s){const{task:r}=s??{};if(!r){try{yield{type:"result",result:await this.request(e,t,s)}}catch(n){yield{type:"error",error:n instanceof m?n:new m(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,D,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new m(g.InternalError,"Task creation did not return a task");for(;;){const i=await this.getTask({taskId:o},s);if(yield{type:"taskStatus",task:i},R(i.status)){i.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)}:i.status==="failed"?yield{type:"error",error:new m(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new m(g.InternalError,`Task ${o} was cancelled`)});return}if(i.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)};return}const u=i.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(p=>setTimeout(p,u)),s?.signal?.throwIfAborted()}}catch(n){yield{type:"error",error:n instanceof m?n:new m(g.InternalError,String(n))}}}request(e,t,s){const{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n,task:i,relatedTask:u}=s??{};return new Promise((p,l)=>{const h=c=>{l(c)};if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){h(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,w={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),w.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(w.params={...w.params,task:i}),u&&(w.params={...w.params,_meta:{...w.params?._meta||{},[q]:u}});const y=c=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(c)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`)));const _=c instanceof m?c:new m(g.RequestTimeout,String(c));l(_)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const _=b(t,c.result);_.success?p(_.data):l(_.error)}catch(_){l(_)}}}),s?.signal?.addEventListener("abort",()=>{y(s?.signal?.reason)});const T=s?.timeout??We,k=()=>y(m.fromError(g.RequestTimeout,"Request timed out",{timeout:T}));this._setupTimeout(f,T,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const d=u?.taskId;if(d){const c=_=>{const v=this._responseHandlers.get(f);v?v(_):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(d,{type:"request",message:w,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(f),l(_)})}else this._transport.send(w,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(c=>{this._cleanupTimeout(f),l(c)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},Te,t)}async getTaskResult(e,t,s){return this.request({method:"tasks/result",params:e},t,s)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},ye,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},ke,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=t?.relatedTask?.taskId;if(s){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[q]:t.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:i,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[q]:t.relatedTask}}}),this._transport?.send(i,t).catch(u=>this._onerror(u))});return}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[q]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const s=W(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=K(e,r);return Promise.resolve(t(n,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const s=W(e);this._notificationHandlers.set(s,r=>{const o=K(e,r);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,s,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,t);for(const r of s)if(r.type==="request"&&F(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new m(g.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let s=this._options?.defaultTaskPollInterval??1e3;try{const r=await this._taskStore?.getTask(e);r?.pollInterval&&(s=r.pollInterval)}catch{}return new Promise((r,o)=>{if(t.aborted){o(new m(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new m(g.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await s.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async r=>{const o=await s.getTask(r,t);if(!o)throw new m(g.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,n)=>{await s.storeTaskResult(r,o,n,t);const i=await s.getTask(r,t);if(i){const u=z.parse({method:"notifications/tasks/status",params:i});await this.notification(u),R(i.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>s.getTaskResult(r,t),updateTaskStatus:async(r,o,n)=>{const i=await s.getTask(r,t);if(!i)throw new m(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new m(g.InvalidParams,`Cannot update task "${r}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(r,o,n,t);const u=await s.getTask(r,t);if(u){const p=z.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function G(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ge(a,e){const t={...a};for(const s in e){const r=s,o=e[r];if(o===void 0)continue;const n=t[r];G(n)&&G(o)?t[r]={...n,...o}:t[r]=o}return t}var Ze=Se();const Be=ve(Ze);function Ye(){const a=new Be({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Ce(a),a}class Xe{constructor(e){this._ajv=e??Ye()}getValidator(e){const t="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return s=>t(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}class et{constructor(e){this._client=e}async*callToolStream(e,t=ee,s){const r=this._client,o={...s,task:s?.task??(r.isToolTask(e.name)?{}:void 0)},n=r.requestStream({method:"tools/call",params:e},t,o),i=r.getToolOutputValidator(e.name);for await(const u of n){if(u.type==="result"&&i){const p=u.result;if(!p.structuredContent&&!p.isError){yield{type:"error",error:new m(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(p.structuredContent)try{const l=i(p.structuredContent);if(!l.valid){yield{type:"error",error:new m(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof m){yield{type:"error",error:l};return}yield{type:"error",error:new m(g.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield u}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,s){return this._client.getTaskResult({taskId:e},t,s)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,s){return this._client.requestStream(e,t,s)}}function tt(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!a.tools?.call)throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break}}function st(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!a.sampling?.createMessage)throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!a.elicitation?.create)throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break}}function O(a,e){if(!(!a||e===null||typeof e!="object")){if(a.type==="object"&&a.properties&&typeof a.properties=="object"){const t=e,s=a.properties;for(const r of Object.keys(s)){const o=s[r];t[r]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(t[r]=o.default),t[r]!==void 0&&O(o,t[r])}}if(Array.isArray(a.anyOf))for(const t of a.anyOf)typeof t!="boolean"&&O(t,e);if(Array.isArray(a.oneOf))for(const t of a.oneOf)typeof t!="boolean"&&O(t,e)}}function rt(a){if(!a)return{supportsFormMode:!1,supportsUrlMode:!1};const e=a.form!==void 0,t=a.url!==void 0;return{supportsFormMode:e||!e&&!t,supportsUrlMode:t}}let ot=class extends Ke{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xe,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",be,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Re,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",Ie,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new et(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ge(this._capabilities,e)}setRequestHandler(e,t){const r=re(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o;if(x(r)){const i=r;o=i._zod?.def?.value??i.value}else{const i=r;o=i._def?.value??i.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");const n=o;if(n==="elicitation/create"){const i=async(u,p)=>{const l=b(je,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:h}=l.data;h.mode=h.mode??"form";const{supportsFormMode:f,supportsUrlMode:w}=rt(this._capabilities.elicitation);if(h.mode==="form"&&!f)throw new m(g.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!w)throw new m(g.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(t(u,p));if(h.task){const c=b(D,y);if(!c.success){const _=c.error instanceof Error?c.error.message:String(c.error);throw new m(g.InvalidParams,`Invalid task creation result: ${_}`)}return c.data}const T=b(Fe,y);if(!T.success){const c=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=T.data,d=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&k.action==="accept"&&k.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{O(d,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:h}=l.data,f=await Promise.resolve(t(u,p));if(h.task){const k=b(D,f);if(!k.success){const d=k.error instanceof Error?k.error.message:String(k.error);throw new m(g.InvalidParams,`Invalid task creation result: ${d}`)}return k.data}const y=h.tools||h.toolChoice?Le:Ve,T=b(y,f);if(!T.success){const k=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid sampling result: ${k}`)}return T.data};return super.setRequestHandler(e,i)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{const s=await this.request({method:"initialize",params:{protocolVersion:Ee,capabilities:this._capabilities,clientInfo:this._clientInfo}},qe,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Pe.includes(s.protocolVersion))throw new Error(`Server's protocol version is not supported: ${s.protocolVersion}`);this._serverCapabilities=s.capabilities,this._serverVersion=s.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(s.protocolVersion),this._instructions=s.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(s){throw this.close(),s}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break}}assertTaskCapability(e){tt(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&st(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},A,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},$e,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},A,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},Me,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Ae,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},He,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Oe,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},xe,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},A,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},A,t)}async callTool(e,t=ee,s){if(this.isToolTaskRequired(e.name))throw new m(g.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const r=await this.request({method:"tools/call",params:e},t,s),o=this.getToolOutputValidator(e.name);if(o){if(!r.structuredContent&&!r.isError)throw new m(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{const n=o(r.structuredContent);if(!n.valid)throw new m(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof m?n:new m(g.InvalidParams,`Failed to validate structured content: ${n instanceof Error?n.message:String(n)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const t of e){if(t.outputSchema){const r=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,r)}const s=t.execution?.taskSupport;(s==="required"||s==="optional")&&this._cachedKnownTaskTools.add(t.name),s==="required"&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const s=await this.request({method:"tools/list",params:e},Ne,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Ue.safeParse(s);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof s.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);const{autoRefresh:n,debounceMs:i}=o.data,{onChanged:u}=s,p=async()=>{if(!n){u(null,null);return}try{const h=await r();u(null,h)}catch(h){const f=h instanceof Error?h:new Error(String(h));u(f,null)}},l=()=>{if(i){const h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);const f=setTimeout(p,i);this._listChangedDebounceTimers.set(e,f)}else p()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const U=a=>[{type:"text",text:a}];function at(a){const e=a.meshUrl??(typeof window<"u"?window.location.origin:void 0);if(!e)throw new Error("RestSelfClient requires either meshUrl or a browser environment.");const t={"Content-Type":"application/json",Accept:"application/json",...a.token?{Authorization:`Bearer ${a.token}`}:{}},s=u=>new URL(`/api/${encodeURIComponent(a.orgSlug)}${u}`,e).href,r=async u=>{let p;try{p=await fetch(s(`/tools/${encodeURIComponent(u.name)}`),{method:"POST",headers:t,credentials:"include",body:JSON.stringify(u.arguments??{})})}catch(h){const f=h instanceof Error?h.message:"Network error";return{content:U(f),isError:!0}}if(!p.ok){let h=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(h=f.error)}catch{}return{content:U(h),isError:!0}}const l=await p.json().catch(()=>({}));return{content:U(typeof l=="string"?l:JSON.stringify(l)),structuredContent:l}},o=async()=>{const u=await fetch(s("/tools"),{method:"GET",headers:t,credentials:"include"});return u.ok?await u.json():{tools:[]}},n=u=>()=>Promise.reject(new Error(`RestSelfClient: ${u} is not supported over REST for the self connection`));return{callTool:r,listTools:o,listPrompts:n("listPrompts"),getPrompt:n("getPrompt"),listResources:n("listResources"),readResource:n("readResource"),listResourceTemplates:n("listResourceTemplates"),close:()=>Promise.resolve(),toJSON:()=>a.toJSONString}}function L(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function nt(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...L(e.headers),...L(s.headers)}:e.headers};return a(t,r)}:a}class Z extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}const B=10,it=13,I=32;function j(a){}function ct(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=j,onError:t=j,onRetry:s=j,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function h(d){if(n&&(n=!1,d.charCodeAt(0)===239&&d.charCodeAt(1)===187&&d.charCodeAt(2)===191&&(d=d.slice(3))),o.length===0){const v=f(d);v!==""&&o.push(v);return}if(d.indexOf(`
|
|
2
|
+
`)===-1&&d.indexOf("\r")===-1){o.push(d);return}o.push(d);const c=o.join("");o.length=0;const _=f(c);_!==""&&o.push(_)}function f(d){let c=0;if(d.indexOf("\r")===-1){let _=d.indexOf(`
|
|
3
|
+
`,c);for(;_!==-1;){if(c===_){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0,c=_+1,_=d.indexOf(`
|
|
4
|
+
`,c);continue}const v=d.charCodeAt(c);if(Y(d,c,v)){const S=d.charCodeAt(c+5)===I?c+6:c+5,C=d.slice(S,_);if(p===0&&d.charCodeAt(_+1)===B){e({id:i,event:l,data:C}),i=void 0,u="",l=void 0,c=_+2,_=d.indexOf(`
|
|
5
|
+
`,c);continue}u=p===0?C:`${u}
|
|
6
|
+
${C}`,p++}else X(d,c,v)?l=d.slice(d.charCodeAt(c+6)===I?c+7:c+6,_)||void 0:w(d,c,_);c=_+1,_=d.indexOf(`
|
|
7
|
+
`,c)}return d.slice(c)}for(;c<d.length;){const _=d.indexOf("\r",c),v=d.indexOf(`
|
|
8
|
+
`,c);let S=-1;if(_!==-1&&v!==-1?S=_<v?_:v:_!==-1?_===d.length-1?S=-1:S=_:v!==-1&&(S=v),S===-1)break;w(d,c,S),c=S+1,d.charCodeAt(c-1)===it&&d.charCodeAt(c)===B&&c++}return d.slice(c)}function w(d,c,_){if(c===_){T();return}const v=d.charCodeAt(c);if(Y(d,c,v)){const E=d.charCodeAt(c+5)===I?c+6:c+5,Q=d.slice(E,_);u=p===0?Q:`${u}
|
|
9
|
+
${Q}`,p++;return}if(X(d,c,v)){l=d.slice(d.charCodeAt(c+6)===I?c+7:c+6,_)||void 0;return}if(v===105&&d.charCodeAt(c+1)===100&&d.charCodeAt(c+2)===58){const E=d.slice(d.charCodeAt(c+3)===I?c+4:c+3,_);i=E.includes("\0")?void 0:E;return}if(v===58){if(r){const E=d.slice(c,_);r(E.slice(d.charCodeAt(c+1)===I?2:1))}return}const S=d.slice(c,_),C=S.indexOf(":");if(C===-1){y(S,"",S);return}const ae=S.slice(0,C),ne=S.charCodeAt(C+1)===I?2:1,ie=S.slice(C+ne);y(ae,ie,S)}function y(d,c,_){switch(d){case"event":l=c||void 0;break;case"data":u=p===0?c:`${u}
|
|
10
|
+
${c}`,p++;break;case"id":i=c.includes("\0")?void 0:c;break;case"retry":/^\d+$/.test(c)?s(parseInt(c,10)):t(new Z(`Invalid \`retry\` value: "${c}"`,{type:"invalid-retry",value:c,line:_}));break;default:t(new Z(`Unknown field "${d.length>20?`${d.slice(0,20)}…`:d}"`,{type:"unknown-field",field:d,value:c,line:_}));break}}function T(){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0}function k(d={}){if(d.consume&&o.length>0){const c=o.join("");w(c,0,c.length)}n=!0,i=void 0,u="",p=0,l=void 0,o.length=0}return{feed:h,reset:k}}function Y(a,e,t){return t===100&&a.charCodeAt(e+1)===97&&a.charCodeAt(e+2)===116&&a.charCodeAt(e+3)===97&&a.charCodeAt(e+4)===58}function X(a,e,t){return t===101&&a.charCodeAt(e+1)===118&&a.charCodeAt(e+2)===101&&a.charCodeAt(e+3)===110&&a.charCodeAt(e+4)===116&&a.charCodeAt(e+5)===58}class lt extends TransformStream{constructor({onError:e,onRetry:t,onComment:s}={}){let r;super({start(o){r=ct({onEvent:n=>{o.enqueue(n)},onError(n){e==="terminate"?o.error(n):typeof e=="function"&&e(n)},onRetry:t,onComment:s})},transform(o){r.feed(o)}})}}const ut={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class $ extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}}let dt=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=nt(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??ut}async _authThenStart(){if(!this._authProvider)throw new P("No auth provider");let e;try{e=await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(t){throw this.onerror?.(t),t}if(e!=="AUTHORIZED")throw new P;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const e={};if(this._authProvider){const s=await this._authProvider.tokens();s&&(e.Authorization=`Bearer ${s.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const t=L(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){const{resumptionToken:t}=e;try{const s=await this._commonHeaders();s.set("Accept","text/event-stream"),t&&s.set("last-event-id",t);const r=await(this._fetch??fetch)(this._url,{method:"GET",headers:s,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new $(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(s){throw this.onerror?.(s),s}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const t=this._reconnectionOptions.initialReconnectionDelay,s=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(s,e),r)}_scheduleReconnection(e,t=0){const s=this._reconnectionOptions.maxRetries;if(t>=s){this.onerror?.(new Error(`Maximum reconnection attempts (${s}) exceeded.`));return}const r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(o=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${o instanceof Error?o.message:String(o)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,s){if(!e)return;const{onresumptiontoken:r,replayMessageId:o}=t;let n,i=!1,u=!1;(async()=>{try{const l=e.pipeThrough(new TextDecoderStream).pipeThrough(new lt({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:y}=await l.read();if(y)break;if(w.id&&(n=w.id,i=!0,r?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const T=N.parse(JSON.parse(w.data));M(T)&&(u=!0,o!==void 0&&(T.id=o)),this.onmessage?.(T)}catch(T){this.onerror?.(T)}}(s||i)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:n,onresumptiontoken:r,replayMessageId:o},0)}catch(l){if(this.onerror?.(new Error(`SSE stream disconnected: ${l}`)),(s||i)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:n,onresumptiontoken:r,replayMessageId:o},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new P("No auth provider");if(await H(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{const{resumptionToken:s,onresumptiontoken:r}=t||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:F(e)?e.id:void 0}).catch(f=>this.onerror?.(f));return}const o=await this._commonHeaders();o.set("content-type","application/json"),o.set("accept","application/json, text/event-stream");const n={...this._requestInit,method:"POST",headers:o,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,n),u=i.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!i.ok){const f=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new $(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:y}=J(i);if(this._resourceMetadataUrl=w,this._scope=y,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P;return this._hasCompletedAuthFlow=!0,this.send(e)}if(i.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:y,error:T}=J(i);if(T==="insufficient_scope"){const k=i.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===k)throw new $(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=k??void 0,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new P;return this.send(e)}}throw new $(i.status,`Error POSTing to endpoint: ${f}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,i.status===202){await i.body?.cancel(),Qe(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(f=>this.onerror?.(f));return}const l=(Array.isArray(e)?e:[e]).filter(f=>"method"in f&&"id"in f&&f.id!==void 0).length>0,h=i.headers.get("content-type");if(l)if(h?.includes("text/event-stream"))this._handleSseStream(i.body,{onresumptiontoken:r},!1);else if(h?.includes("application/json")){const f=await i.json(),w=Array.isArray(f)?f.map(y=>N.parse(y)):[N.parse(f)];for(const y of w)this.onmessage?.(y)}else throw await i.body?.cancel(),new $(-1,`Unexpected content type: ${h}`);else await i.body?.cancel()}catch(s){throw this.onerror?.(s),s}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const e=await this._commonHeaders(),t={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},s=await(this._fetch??fetch)(this._url,t);if(await s.body?.cancel(),!s.ok&&s.status!==405)throw new $(s.status,`Failed to terminate session: ${s.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}};class ht extends dt{constructor(e,t){super(e,t)}send(e,t){const s=ft(e);return s?.type==="emit"?(this.onmessage?.(s.message),Promise.resolve()):s?.type==="suppress"?Promise.resolve():super.send(e,t)}}function ft(a){const e=a;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const t=e?.params?.protocolVersion;return t?{type:"emit",message:{result:{protocolVersion:t,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"mesh-virtual-mcp",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}const pt={name:"mesh-sdk",version:"1.0.0"};function mt(a,e,t){const s=t??(typeof window<"u"?window.location.origin:void 0);if(!s)throw new Error("MCP client requires either meshUrl option or a browser environment.");const r=`/api/${encodeURIComponent(e)}`,o=a?`${r}/mcp/${a}`:`${r}/mcp`;return new URL(o,s).href}async function oe({connectionId:a,orgId:e,orgSlug:t,token:s,meshUrl:r,mcpUrl:o}){const n=V.mcpClient(e,a??"self",s??"",o??r??"");if(!o&&(!a||a===ze))return at({orgSlug:t,token:s,meshUrl:r,toJSONString:`mcp-client:${n.join(":")}`});const i=o??mt(a,t,r),u=new ot(pt,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),p=new ht(new URL(i),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream",...s?{Authorization:`Bearer ${s}`}:{}}}});return await u.connect(p),u.toJSON=()=>`mcp-client:${n.join(":")}`,u}function _t(a){const{connectionId:e,token:t,meshUrl:s,mcpUrl:r,orgId:o}=a;return{queryKey:V.mcpClient(o,e??"self",t??"",r??s??""),queryFn:()=>oe(a),staleTime:1/0,gcTime:6e4}}function vt(a){const e=te.c(2);let t;e[0]!==a?(t=_t(a),e[0]=a,e[1]=t):t=e[1];const{data:s}=se(t);return s}function St(a){const e=te.c(16),{connectionId:t,orgId:s,orgSlug:r,token:o,meshUrl:n,mcpUrl:i}=a;let u;e[0]!==t||e[1]!==i||e[2]!==n||e[3]!==s||e[4]!==o?(u=t!==void 0?V.mcpClient(s,t??"self",o??"",i??n??""):["mcp","client","skip",s],e[0]=t,e[1]=i,e[2]=n,e[3]=s,e[4]=o,e[5]=u):u=e[5];const p=u;let l;e[6]!==t||e[7]!==i||e[8]!==n||e[9]!==s||e[10]!==r||e[11]!==o?(l=async()=>t===void 0?null:oe({connectionId:t,orgId:s,orgSlug:r,token:o,meshUrl:n,mcpUrl:i}),e[6]=t,e[7]=i,e[8]=n,e[9]=s,e[10]=r,e[11]=o,e[12]=l):l=e[12];let h;e[13]!==p||e[14]!==l?(h={queryKey:p,queryFn:l,staleTime:1/0,gcTime:6e4},e[13]=p,e[14]=l,e[15]=h):h=e[15];const{data:f}=se(h);return f??null}export{Be as A,ot as C,Ke as P,dt as S,St as a,ct as b,oe as c,nt as d,_t as m,L as n,vt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,k as c,bP as m,bQ as f,q as y,aD as n}from"./index-
|
|
1
|
+
import{c as l,k as c,bP as m,bQ as f,q as y,aD as n}from"./index-S0Q7YlOD.js";async function u(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(t){if(t instanceof m&&t.code===f.MethodNotFound)return{prompts:[]};throw t}}async function b(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function q(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>u(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],y(a)}function g(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>u(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],c(a)}export{g as a,b as g,u as l,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,k as p,q,aD as T}from"./index-
|
|
1
|
+
import{c as m,k as p,q,aD as T}from"./index-S0Q7YlOD.js";function C(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],q(i)}function K(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],p(i)}function O(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=q,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}function w(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=p,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{K as a,C as b,O as c,w as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,
|
|
1
|
+
import{c as n,D as i,q as l,K as m}from"./index-S0Q7YlOD.js";import{u as a}from"./use-org-auth-client-DOD7ccpR.js";function p(){const e=n.c(7),{locator:o}=i(),u=a();let t;e[0]!==o?(t=m.members(o),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.organization.listMembers(),e[2]=u,e[3]=s):s=e[3];let r;return e[4]!==t||e[5]!==s?(r={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=r):r=e[6],l(r)}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r}from"./index-
|
|
1
|
+
import{c as m,r}from"./index-S0Q7YlOD.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
package/dist/client/assets/{use-navigate-to-agent-DIwK9fdW.js → use-navigate-to-agent-DqOg0uVZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as p,r as l,c as S,j as I,b,
|
|
1
|
+
import{L as p,r as l,c as S,j as I,b,D as v,a as x}from"./index-S0Q7YlOD.js";import{u as A}from"./use-virtual-mcp-iU8WqU_q.js";const f=new Map;function O(e){return`${e.orgId}:${e.userId}`}function C(e){return`sidebar.group-order.${e}`}function m(e){try{const r=localStorage.getItem(e),t=r?JSON.parse(r):[];return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function R(e,r){try{localStorage.setItem(e,JSON.stringify(r))}catch{}}function E(e){const r=O(e),t=f.get(r);if(t)return t;const n=p.sidebarGroupOrder(e.orgId,e.userId);let c=!1;try{c=localStorage.getItem(n)!==null}catch{}let s=m(n);if(!c&&s.length===0&&e.userId!=="anon"){const a=m(C(e.orgId));a.length>0&&(s=a)}return f.set(r,s),s}function P(e,r){const t=new Set(r);return E(e).filter(n=>!t.has(n))}function $(e,r){f.set(O(e),r),R(p.sidebarGroupOrder(e.orgId,e.userId),r)}function G(e,r,t=[]){if(t.includes(r))return;const n=P(e,t);n.includes(r)||$(e,[r,...n])}const g=l.createContext(null);function k(e){const r=S.c(7),{children:t}=e,[n,c]=l.useState(!1),[s,a]=l.useState(0);let i;r[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>a(U),r[0]=i):i=r[0];const d=i;let o;r[1]!==n||r[2]!==s?(o={empty:n,setEmpty:c,orderRevision:s,bumpOrderRevision:d},r[1]=n,r[2]=s,r[3]=o):o=r[3];let u;return r[4]!==t||r[5]!==o?(u=I.jsx(g.Provider,{value:o,children:t}),r[4]=t,r[5]=o,r[6]=u):u=r[6],u}function U(e){return e+1}function L(){return l.useContext(g)?.empty??!1}function w(){return l.useContext(g)?.bumpOrderRevision??_}function _(){}function j(e){return(e??[]).filter(r=>!!r.pinned).map(r=>r.id)}function T(){const e=S.c(9),r=b(),{org:t}=v(),n=A(),{data:c}=x.useSession(),s=c?.user?.id??"anon";let a;e[0]!==n?(a=j(n),e[0]=n,e[1]=a):a=e[1];const i=a,d=w();let o;return e[2]!==d||e[3]!==r||e[4]!==t.id||e[5]!==t.slug||e[6]!==i||e[7]!==s?(o=(u,y)=>{G({orgId:t.id,userId:s},u,i),d();const h=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:t.slug,taskId:h},search:{...y?.search??{},virtualmcpid:u}})},e[2]=d,e[3]=r,e[4]=t.id,e[5]=t.slug,e[6]=i,e[7]=s,e[8]=o):o=e[8],o}export{k as S,L as a,w as b,G as c,j as g,T as u};
|
package/dist/client/assets/{use-org-auth-client-CfqWFlO5.js → use-org-auth-client-DOD7ccpR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,
|
|
1
|
+
import{c as x,D as j,a as i}from"./index-S0Q7YlOD.js";function A(){const e=x.c(32),{org:O}=j(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let I;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(I={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=I):I=e[31],I}export{A as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,k as S,m as l,d as y,K as c}from"./index-
|
|
1
|
+
import{c as u,k as S,m as l,d as y,K as c}from"./index-S0Q7YlOD.js";function w(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoStatus(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/status`);if(!r.ok)throw new Error("Failed to check SSO status");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function m(o,a){const e=u.c(8);let s;e[0]!==o?(s=c.orgSsoConfig(o??""),e[0]=o,e[1]=s):s=e[1];let t;e[2]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`);if(!r.ok)throw new Error("Failed to fetch SSO config");return r.json()},e[2]=a,e[3]=t):t=e[3];const n=!!o&&!!a;let i;return e[4]!==s||e[5]!==t||e[6]!==n?(i={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=i):i=e[7],S(i)}function q(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to save SSO config")}return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function C(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async()=>{const r=await fetch(`/api/${a}/sso/config`,{method:"DELETE"});if(!r.ok)throw new Error("Failed to delete SSO config");return r.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}function O(o,a){const e=u.c(8),s=l();let t;e[0]!==a?(t=async r=>{const f=await fetch(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:r})});if(!f.ok)throw new Error("Failed to toggle SSO enforcement");return f.json()},e[0]=a,e[1]=t):t=e[1];let n;e[2]!==o||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(o)}),s.invalidateQueries({queryKey:c.orgSsoStatus(o)})},e[2]=o,e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],y(i)}export{m as a,q as b,C as c,O as d,w as u};
|
package/dist/client/assets/{use-organization-roles-DLiC1YgM.js → use-organization-roles-Dcz2MjMd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as R}from"./use-org-auth-client-
|
|
1
|
+
import{u as R}from"./use-org-auth-client-DOD7ccpR.js";import{D as b,k as P,K as y}from"./index-S0Q7YlOD.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let i=!1;const u=[];let c=!1;const a=new Set;let s=!1,f=0,e=!1;for(const[l,o]of Object.entries(t)){if(l==="self"){o.includes("*")?i=!0:n.push(...o);continue}if(l==="models"){o.includes("*:*")?e=!0:f=o.length;continue}if(l==="*"){if(c=!0,o.includes("*"))s=!0;else for(const r of o)a.add(r);continue}if(u.push(l),o.includes("*"))s=!0;else for(const r of o)a.add(r)}return{staticPermissions:n,allowsAllStaticPermissions:i,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(a),allowsAllTools:s,modelCount:f,allowsAllModels:e}}function I(){const{locator:t}=b(),n=R(),{data:i,isLoading:u,error:c,refetch:a}=P({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const e=await n.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),s=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(i&&Array.isArray(i))for(const e of i){const l=e.role;if(!l||w.some(h=>h.value===l))continue;const{staticPermissions:o,allowsAllStaticPermissions:r,connectionIds:g,allowsAllConnections:m,toolNames:p,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(e.permission);s.push({id:e.id,role:l,label:B(l),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:r?-1:o.length,allowsAllStaticPermissions:r,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:p.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(e=>!e.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:a}}export{I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as f,c as l,D as _,k as b,m as E,d as z,r as D}from"./index-S0Q7YlOD.js";import{W as R}from"./constants-C8_Swa4x.js";import{c as G,u as M}from"./studio-tools-DgAshZ-_.js";const I={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null,task_board_enabled:!1},k={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function N(t,e){return{queryKey:f.organizationSettings(e),queryFn:async()=>{try{return await G(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function g(t){const e=l.c(6),{org:s}=_();let n;e[0]!==s.id||e[1]!==s.slug?(n=N(s.slug,s.id),e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const a=t;let i;return e[3]!==n||e[4]!==a?(i={...n,select:a},e[3]=n,e[4]=a,e[5]=i):i=e[5],b(i)}function W(t,e){const s=l.c(3);let n;s[0]!==t||s[1]!==e?(n=N(e,t),s[0]=t,s[1]=e,s[2]=n):n=s[2];const{data:a}=b(n);return a??null}function y(){const t=l.c(9),{org:e}=_(),s=M(),n=E();let a;t[0]!==e||t[1]!==s?(a=async u=>{const o=await s.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...u});if(!o)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return o},t[0]=e,t[1]=s,t[2]=a):a=t[2];let i;t[3]!==e||t[4]!==n?(i=u=>{n.setQueryData(f.organizationSettings(e.id),o=>({...o??I,...u}))},t[3]=e,t[4]=n,t[5]=i):i=t[5];let r;return t[6]!==a||t[7]!==i?(r={mutationFn:a,onSuccess:i},t[6]=a,t[7]=i,t[8]=r):r=t[8],z(r)}function Q(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:k}function Z(){const{data:t}=g($);return t??k}function $(t){return Q(t.simple_mode)}function F(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(i,r)=>e.mutate({simple_mode:i},r),n=(i,r)=>e.mutateAsync({simple_mode:i},r),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function j(){const{data:t}=g(C);return t??!1}function C(t){return t.task_board_enabled??!1}function L(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(i,r)=>e.mutate({task_board_enabled:i},r),n=(i,r)=>e.mutateAsync({task_board_enabled:i},r),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function P(){const{data:t}=g(U);return t??null}function U(t){return t.registry_config}function v(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(i,r)=>e.mutate({registry_config:i},r),n=(i,r)=>e.mutateAsync({registry_config:i},r),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function J(){const{data:t}=g(x);return t??null}function x(t){return t.default_home_agents}function q(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(i,r)=>e.mutate({default_home_agents:i},r),n=(i,r)=>e.mutateAsync({default_home_agents:i},r),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function V(){const t=l.c(14),{org:e}=_(),s=q(),n=E();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=Promise.resolve(),t[0]=a):a=t[0];const i=D.useRef(a);let r;t[1]!==e.id?(r=f.organizationSettings(e.id),t[1]=e.id,t[2]=r):r=t[2];const u=r;let o;t[3]!==u||t[4]!==n?(o=()=>n.getQueryData(u)?.default_home_agents?.ids??[],t[3]=u,t[4]=n,t[5]=o):o=t[5];const p=o;let m;t[6]!==u||t[7]!==e.slug||t[8]!==n||t[9]!==s?(m=O=>{const T=i.current.then(async()=>{const A=n.getQueryData(u),S=O(A?.default_home_agents?.ids??[]);if(S!==null){n.setQueryData(u,c=>c&&{...c,default_home_agents:{ids:S}});try{await s.mutateAsync({ids:S}),await n.refetchQueries({queryKey:f.homeNextActions(e.slug),type:"active"})}catch(c){const w=c;throw n.setQueryData(u,A),w}}});return i.current=T.catch(K),T},t[6]=u,t[7]=e.slug,t[8]=n,t[9]=s,t[10]=m):m=t[10];const h=m;let d;return t[11]!==h||t[12]!==p?(d={currentIds:p,apply:h},t[11]=h,t[12]=p,t[13]=d):d=t[13],d}function K(){}function X(){const t=l.c(5),{org:e}=_(),s=P();let n;t[0]!==e.id?(n=R.REGISTRY(e.id),t[0]=e.id,t[1]=n):n=t[1];const a=n;let i;return t[2]!==a||t[3]!==s?(i=r=>{if(!s)return r===a;const u=s.registries[r];return u?u.enabled:r===a},t[2]=a,t[3]=s,t[4]=i):i=t[4],i}export{J as a,V as b,X as c,W as d,L as e,Z as f,F as g,P as h,v as i,N as o,j as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,D as R}from"./index-S0Q7YlOD.js";import{u as p}from"./use-connection-BuLrAfYP.js";import{W as a}from"./constants-C8_Swa4x.js";import{h as y}from"./use-organization-settings-C8EmnI93.js";function M(){const e=C.c(19),{org:i}=R(),o=y();let l;e[0]!==i.id?(l=a.REGISTRY(i.id),e[0]=i.id,e[1]=l):l=e[1];const d=l;let f;e[2]!==i.id?(f=a.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=f):f=e[3];const g=f;let r;e[4]!==g||e[5]!==d?(r=[d,g],e[4]=g,e[5]=d,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const u of s)t.add(u)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const m=p();let n;e[12]!==m?(n=m??[],e[12]=m,e[13]=n):n=e[13];let c;if(e[14]!==t||e[15]!==n){let s;e[17]!==t?(s=u=>t.has(u.id),e[17]=t,e[18]=s):s=e[18],c=n.filter(s),e[14]=t,e[15]=n,e[16]=c}else c=e[16];return c}export{M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,
|
|
1
|
+
import{c as r,D as a,K as c,q as f,m as y,d as m}from"./index-S0Q7YlOD.js";import{u as l}from"./studio-tools-DgAshZ-_.js";function C(){const e=r.c(7),{org:o}=a(),u=l();let i;e[0]!==o.id?(i=c.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==u?(t=async()=>await u.call("SECRET_LIST",{}),e[2]=u,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:n}=f(s);return n.secrets}function p(){const e=r.c(8),{org:o}=a(),u=l(),i=y();let t;e[0]!==u?(t=async d=>await u.call("SECRET_CREATE",{...d}),e[0]=u,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:c.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],m(n)}export{p as a,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,I as u}from"./index-
|
|
1
|
+
import{c as r,I as u}from"./index-S0Q7YlOD.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-CqBKeCC-.js";const p=new Set(["completed","failed","requires_action"]);function q(s){const e=r.c(5),[n]=u();let t;e[0]!==n?(t=o=>{n.enableSounds&&p.has(o.data.status)&&i(c.dataUri).catch(l)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function l(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,r as f}from"./index-
|
|
1
|
+
import{c as p,r as f}from"./index-S0Q7YlOD.js";import{u as w}from"./use-mobile-FUxUqTQv.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,D as d,aD as p,k as P}from"./index-S0Q7YlOD.js";import{b as L,a as S,u as V,c as _}from"./use-collections-BwIgjkkY.js";import{u as g}from"./use-mcp-client-CnRSGieI.js";import{S as m}from"./constants-C8_Swa4x.js";function R(s){const t=a.c(5);let e;t[0]!==s?(e=s===void 0?{}:s,t[0]=s,t[1]=e):e=t[1];const i=e,{org:n}=d();let o;t[2]!==n.id||t[3]!==n.slug?(o={connectionId:m,orgId:n.id,orgSlug:n.slug},t[2]=n.id,t[3]=n.slug,t[4]=o):o=t[4];const l=g(o);return L(n.id,"VIRTUAL_MCP",l,i)}function b(s,t,e){return _(s,"VIRTUAL_MCP",t??void 0,e)}function D(s){const t=a.c(3),{org:e}=d();let i;t[0]!==e.id||t[1]!==e.slug?(i={connectionId:m,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=i):i=t[2];const n=g(i);return V(e.id,"VIRTUAL_MCP",s??void 0,n)}function E(s){const t=a.c(15),{org:e}=d();let i;t[0]!==e.id||t[1]!==e.slug?(i={connectionId:m,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=i):i=t[2];const n=g(i);let o,l,c;t[3]!==s||t[4]!==e.id?(o=[...s].sort(),c=P,l=p.virtualMcpLastUsed(e.id,o),t[3]=s,t[4]=e.id,t[5]=o,t[6]=l,t[7]=c):(o=t[5],l=t[6],c=t[7]);const I=o.length>0;let u;t[8]!==n||t[9]!==o?(u=async()=>{const M=(await n.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:o}})).structuredContent??{items:[]},f=new Map;for(const C of M.items)f.set(C.id,C);return f},t[8]=n,t[9]=o,t[10]=u):u=t[10];let r;return t[11]!==l||t[12]!==I||t[13]!==u?(r={queryKey:l,enabled:I,staleTime:3e4,queryFn:u},t[11]=l,t[12]=I,t[13]=u,t[14]=r):r=t[14],c(r)}function $(){const s=a.c(3),{org:t}=d();let e;s[0]!==t.id||s[1]!==t.slug?(e={connectionId:m,orgId:t.id,orgSlug:t.slug},s[0]=t.id,s[1]=t.slug,s[2]=e):e=s[2];const i=g(e);return S(t.id,"VIRTUAL_MCP",i)}export{D as a,$ as b,E as c,R as u,b as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as u}from"./use-infinite-scroll-3Uj2RNwo.js";import{cD as i}from"./index-S0Q7YlOD.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as s}from"./use-infinite-scroll-3Uj2RNwo.js";import{cD as u,av as n}from"./index-S0Q7YlOD.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
package/dist/client/assets/{useSuspenseQueries-f54Kg_lq.js → useSuspenseQueries-Cy-j8ofE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ah as C,ai as y,aj as w,ak as S,al as E,m as k,am as q,an as x,r as p,ao as M,ap as H,aq as L,ar as P,as as O,at as B,au as T,av as A}from"./index-
|
|
1
|
+
import{ah as C,ai as y,aj as w,ak as S,al as E,m as k,am as q,an as x,r as p,ao as M,ap as H,aq as L,ar as P,as as O,at as B,au as T,av as A}from"./index-S0Q7YlOD.js";function R(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function j(t,e,s){const r=t.slice(0);return r[e]=s,r}var z=class extends C{#i;#e;#n;#r;#s;#t;#u;#o;#a;#h=[];constructor(t,e,s){super(),this.#i=t,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(t=>{t.destroy()})}setQueries(t,e){this.#n=t,this.#r=e,y.batch(()=>{const s=this.#s,r=this.#d(this.#n);r.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const i=r.map(u=>u.observer),n=i.map(u=>u.getCurrentResult()),o=s.length!==i.length,c=i.some((u,f)=>u!==s[f]),d=o||c,b=d?!0:n.some((u,f)=>{const g=this.#e[f];return!g||!w(u,g)});!d&&!b||(d&&(this.#h=r,this.#s=i),this.#e=n,this.hasListeners()&&(d&&(R(s,i).forEach(u=>{u.destroy()}),R(i,s).forEach(u=>{u.subscribe(f=>{this.#f(u,f)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(t=>t.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(t,e){const s=this.#d(t),r=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[r,n=>this.#l(n??r,e,i),()=>this.#c(r,s)]}#c(t,e){return e.map((s,r)=>{const i=t[r];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(o=>{o.observer.trackProp(n)})})})}#l(t,e,s){if(e){const r=this.#a,i=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((n,o)=>n!==r[o]));return(!this.#t||this.#e!==this.#o||i||e!==this.#u)&&(this.#u=e,this.#o=this.#e,s!==void 0&&(this.#a=s),this.#t=S(this.#t,e(t))),this.#t}return t}#b(){return this.#r?.combine!==void 0&&this.#s.some((t,e)=>t.options.suspense&&this.#e[e]?.data===void 0)}#d(t){const e=new Map;this.#s.forEach(r=>{const i=r.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(r):e.set(i,[r])});const s=[];return t.forEach(r=>{const i=this.#i.defaultQueryOptions(r),o=e.get(i.queryHash)?.shift()??new E(this.#i,i);s.push({defaultedQueryOptions:i,observer:o})}),s}#f(t,e){const s=this.#s.indexOf(t);s!==-1&&(this.#e=j(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const t=this.#c(this.#e,this.#h),e=this.#b(),s=this.#t,r=e?s:this.#l(t,this.#r?.combine);(e||s!==r)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function D({queries:t,...e},s){const r=k(s),i=q(),n=x(),o=p.useMemo(()=>t.map(a=>{const h=r.defaultQueryOptions(a);return h._optimisticResults=i?"isRestoring":"optimistic",h}),[t,r,i]);o.forEach(a=>{M(a);const h=r.getQueryCache().get(a.queryHash);H(a,n,h)}),L(n);const[c]=p.useState(()=>new z(r,o,e)),[d,b,u]=c.getOptimisticResult(o,e.combine),f=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(a=>f?c.subscribe(y.batchCalls(a)):P,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(o,e)},[o,e,c]);const m=d.some((a,h)=>O(o[h],a))?d.flatMap((a,h)=>{const l=o[h];if(l&&O(l,a)){const Q=new E(r,l);return B(l,Q,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((a,h)=>{const l=o[h];return l&&T({result:a,errorResetBoundary:n,throwOnError:l.throwOnError,query:r.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(u())}function U(t,e){return D({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:A,enabled:!0,placeholderData:void 0}))},e)}export{U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as V,r as U,j as o,l as J,B as Y}from"./index-S0Q7YlOD.js";import{n as ct,X as et,f as mt}from"./agent-icon-DAuEpvjN.js";import{i as dt}from"./ChevronRight-DKpM0qdo.js";import{L as ft}from"./label-D3ajqQqF.js";import{S as nt}from"./scroll-area-C9lD0DG9.js";import{S as pt}from"./switch-BonZrdli.js";import{a as ut,T as ht,b as gt}from"./tooltip-FlCInimM.js";import{V as xt}from"./view-mode-toggle-td--5Ihh.js";import"./AlertCircle-BAqebLND.js";import"./Tool01-CMdJij71.js";import"./SwitchHorizontal01-C2AiHI6d.js";import"./Settings02-Qe5DtIFk.js";import"./XCircle-C9R5bCeP.js";import"./ArrowUpRight-BejkutVa.js";import"./ZapSquare-CGsw7HnP.js";import"./Users03-C2FdBaet.js";import"./CheckCircle-C_Aedf-I.js";import"./Check-CC3ah2EP.js";import"./ChevronDown-ChsImHZJ.js";import"./ChevronUp-CJ6cOnxb.js";import"./Circle-Blw66dbf.js";import"./Stars02-DVjaFNiu.js";import"./Loading02-DutOxXF8.js";import"./Copy01-B9fTK-Gv.js";import"./ZoomOut-Cq_jwvnh.js";import"./DotsVertical-CmhOyP1I.js";import"./Globe01-CdKa67VI.js";import"./Eye-CFP70kHf.js";import"./FilterLines-BCJIlwsH.js";import"./Star01-Dx3yxBV5.js";import"./Globe04-BwB-L-v7.js";import"./HardDrive-Cvln_XgB.js";import"./Key01-Dq3fyqt5.js";import"./LayoutLeft-D7T3E-u6.js";import"./LinkExternal01-Cohlmmy1.js";import"./List-BX1Dxe3c.js";import"./Monitor01-Do0cCBdt.js";import"./Sun-9KvJTXMD.js";import"./Palette-BmgCpHFj.js";import"./Play-BBHolMYa.js";import"./Plus-Cpa6DE3F.js";import"./SearchLg-D1sKIH4t.js";import"./SearchMd-CafLz5-k.js";import"./Shield01-CmqQX7z4.js";import"./Stars01-Cjj351UH.js";import"./Trash01-Bk68wFhO.js";import"./Upload01-DfieuDNH.js";import"./User01-BiwKrQu6.js";import"./Users01-rcBZnIdC.js";import"./XClose-CPqc0UtD.js";import"./X-Dfoip5yB.js";import"./Zap-CRPirG1P.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-ue2G1-hn.js";import"./file-type-icon-DHWkW0ug.js";import"./dialog-Bx9_D2-i.js";import"./use-mobile-FUxUqTQv.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-kWY4145T.js";import"./use-mcp-client-CnRSGieI.js";import"./constants-C8_Swa4x.js";import"./auth-k2I4x92r.js";import"./chat-context-CcZXAHlF.js";import"./hooks-DPy92pzv.js";import"./decopilot-sse-pool-B-Li8vIf.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-iU8WqU_q.js";import"./use-collections-BwIgjkkY.js";import"./use-ai-providers-Bc5pT284.js";import"./studio-tools-DgAshZ-_.js";import"./use-decopilot-events-CqBKeCC-.js";import"./use-organization-settings-C8EmnI93.js";import"./use-clock-tick-DiVstnVw.js";import"./shell-layout-DdBCXSg-.js";import"./avatar-BD1bv4j8.js";import"./alert-dialog-DNV8OhbX.js";import"./required-auth-layout-CUJtlw7e.js";import"./use-org-sso-DU73DmAG.js";import"./sheet-BGhHsN5F.js";import"./integration-icon-D1vivc8T.js";import"./use-navigate-to-agent-DqOg0uVZ.js";import"./use-connection-BuLrAfYP.js";import"./use-mcp-prompts-BHkYncis.js";import"./form-C6xzxaKT.js";import"./input-Dmp_t77f.js";import"./select-CsaBdTgI.js";const bt=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),yt=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Tt=new Date(-864e13),vt=new Date(864e13),jt=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Nt=/\/flags\/multivariate\.ts$/;function wt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function kt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",l=typeof n=="string";if(!r&&!l)return null;const s=r?new Date(t):Tt,m=l?new Date(n):vt;return Number.isNaN(s.getTime())||Number.isNaN(m.getTime())||r&&l&&m.getTime()<=s.getTime()?null:{start:s,end:m,openStart:!r,openEnd:!l}}function rt(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(bt.has(n)){const r=kt(e);r&&t.push(r);return}if(yt.has(n)){const r=e.matchers;if(Array.isArray(r))for(const l of r)rt(l,t)}}}function _t(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!jt.test(t))return!1;const n=e.variants;return Array.isArray(n)}function Mt(e){if(typeof e=="string"){const a=e.trim();if(a.length===0)return null;try{const i=new URL(a).pathname.split("/").filter(Boolean),d=i[i.length-1];if(d)return decodeURIComponent(d)}catch{}return a.length>80?`${a.slice(0,77)}…`:a}if(!e||typeof e!="object")return null;const t=e,n=t.config,l=t.desktop?.media,s=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,l?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const a of s)if(typeof a=="string"&&a.trim().length>0)return a.trim();const m=t.__resolveType;if(typeof m=="string"){const c=(m.split("/").pop()??m).replace(/\.(tsx?|jsx?)$/i,"");if(c.length>0)return c}return null}function St(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function W(e,t,n,r,l){if(_t(e)){const s=e.variants,m=e.__resolveType,a=Nt.test(m)?"":St(r);s.forEach((c,i)=>{if(!c||typeof c!="object")return;const d=c,f=[];if(rt(d.rule,f),f.length===0)return;const x=Mt(d.value)??(a||n);for(const h of f)l.push({blockKey:t,blockLabel:n,innerPath:a,variantIndex:i,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:m})});for(let c=0;c<s.length;c++){const i=s[c];i&&typeof i=="object"&&W(i.value,t,n,[...r,"variants",c,"value"],l)}return}if(Array.isArray(e)){for(let s=0;s<e.length;s++)W(e[s],t,n,[...r,s],l);return}if(e&&typeof e=="object")for(const[s,m]of Object.entries(e))s!=="__resolveType"&&W(m,t,n,[...r,s],l)}function Et(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))W(r,n,wt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function At(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,l)=>{const s=l*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${s})`,text:"white",border:`oklch(0.50 0.14 ${s})`})}),n}const Dt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function st(e,t){return e.get(t)??Dt}const $t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ot=["January","February","March","April","May","June","July","August","September","October","November","December"],it=1440*60*1e3;function P(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function at(e){return new Date(e.getFullYear(),e.getMonth(),1)}function F(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function K(e,t){return Math.round((P(e).getTime()-P(t).getTime())/it)}function Ct(e){const t=(e.getTime()-P(e).getTime())/it;return Math.min(Math.max(t,0),1)}function X(e,t){return K(e,t)+Ct(e)}function Rt(e){const t=z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const l=[];for(let s=0;s<7;s++)l.push(z(t,r*7+s));n.push(l)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Lt(e,t){const n=P(e[0]),r=z(n,7),l=n.getTime(),s=r.getTime(),m=[];for(const i of t){const d=P(i.start),f=P(i.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?z(r,-1):f,h=K(u,n),g=K(x,u)+1;if(g<=0)continue;const b=Math.max(i.start.getTime(),l),y=Math.min(i.end.getTime(),s),T=X(new Date(b),n),p=Math.max(X(new Date(y),n)-T,0);p<=0||m.push({variant:i,startCol:h,span:g,leftUnits:T,widthUnits:p})}m.sort((i,d)=>i.startCol-d.startCol||d.span-i.span||i.variant.blockKey.localeCompare(d.variant.blockKey));const a=[],c=[];for(const i of m){let d=a.findIndex(f=>f<=i.startCol);d===-1&&(d=a.length,a.push(0)),a[d]=i.startCol+i.span,c.push({...i,lane:d})}return c}const q=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ot(e){const t=e.openStart?"Always":q.format(e.start),n=e.openEnd?"Ongoing":q.format(e.end);return`${t} → ${n}`}function Pt(e){const t=V.c(17),{variant:n}=e;let r;t[0]!==n.blockLabel?(r=o.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=r):r=t[1];let l;t[2]!==n.innerPath?(l=n.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=l):l=t[3];let s;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(s=n.label!==n.blockLabel&&n.label!==n.innerPath&&o.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=s):s=t[7];let m;t[8]!==n?(m=Ot(n),t[8]=n,t[9]=m):m=t[9];let a;t[10]!==m?(a=o.jsx("div",{className:"mt-1",children:m}),t[10]=m,t[11]=a):a=t[11];let c;return t[12]!==r||t[13]!==l||t[14]!==s||t[15]!==a?(c=o.jsx(gt,{children:o.jsxs("div",{className:"text-xs",children:[r,l,s,a]})}),t[12]=r,t[13]=l,t[14]=s,t[15]=a,t[16]=c):c=t[16],c}const Q=16;function It(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${Q}px, #000 calc(100% - ${Q}px), ${r})`}function lt(e){const t=V.c(26),{variant:n,color:r,style:l,children:s,fadeStart:m,fadeEnd:a}=e,c=m===void 0?!1:m,i=a===void 0?!1:a;let d;t[0]!==i||t[1]!==c?(d=It(c,i),t[0]=i,t[1]=c,t[2]=d):d=t[2];const f=d;let u;t[3]!==c?(u=c&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=c,t[4]=u):u=t[4];let x;t[5]!==i?(x=i&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=i,t[6]=x):x=t[6];let h;t[7]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==l||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...l},t[9]=r.bg,t[10]=r.text,t[11]=l,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==s?(b=o.jsx("span",{className:"truncate",children:s}),t[16]=s,t[17]=b):b=t[17];let y;t[18]!==g||t[19]!==b?(y=o.jsx(ut,{asChild:!0,children:o.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=y):y=t[20];let T;t[21]!==n?(T=o.jsx(Pt,{variant:n}),t[21]=n,t[22]=T):T=t[22];let p;return t[23]!==T||t[24]!==y?(p=o.jsxs(ht,{children:[y,T]}),t[23]=T,t[24]=y,t[25]=p):p=t[25],p}function Ln(e){const t=V.c(49),{decofile:n}=e,[r,l]=U.useState("calendar"),[s,m]=U.useState(Bt),[a,c]=U.useState(!1);let i,d,f;if(t[0]!==n||t[1]!==a){const E=Et(n);i=E.filter(Ht).length,f=a?E:E.filter(Vt),d=At(f.map(Ft)),t[0]=n,t[1]=a,t[2]=i,t[3]=d,t[4]=f}else i=t[2],d=t[3],f=t[4];const u=d;let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=()=>m(at(new Date)),t[5]=x):x=t[5];const h=x;let g;t[6]!==r?(g=()=>m(E=>r==="calendar"?F(E,-1):F(E,-3)),t[6]=r,t[7]=g):g=t[7];const b=g;let y;t[8]!==r?(y=()=>m(E=>r==="calendar"?F(E,1):F(E,3)),t[8]=r,t[9]=y):y=t[9];const T=y;let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(Y,{variant:"outline",size:"sm",onClick:h,children:"Today"}),t[10]=p):p=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(ct,{size:16}),t[11]=w):w=t[11];let k;t[12]!==b?(k=o.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:b,"aria-label":"Previous",children:w}),t[12]=b,t[13]=k):k=t[13];let _;t[14]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(dt,{size:16}),t[14]=_):_=t[14];let M;t[15]!==T?(M=o.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:T,"aria-label":"Next",children:_}),t[15]=T,t[16]=M):M=t[16];const A=ot[s.getMonth()];let S;t[17]!==s?(S=s.getFullYear(),t[17]=s,t[18]=S):S=t[18];let v;t[19]!==A||t[20]!==S?(v=o.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[A," ",S]}),t[19]=A,t[20]=S,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==k||t[24]!==M?(j=o.jsxs("div",{className:"flex items-center gap-2",children:[p,k,M,v]}),t[22]=v,t[23]=k,t[24]=M,t[25]=j):j=t[25];let D;t[26]!==i||t[27]!==a?(D=i>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(pt,{id:"show-ongoing",checked:a,onCheckedChange:c}),o.jsxs(ft,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:["Show ongoing (",i,")"]})]}),t[26]=i,t[27]=a,t[28]=D):D=t[28];let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L={value:"calendar",icon:o.jsx(et,{}),label:"Calendar"},t[29]=L):L=t[29];let I;t[30]===Symbol.for("react.memo_cache_sentinel")?(I=[L,{value:"timeline",icon:o.jsx(mt,{}),label:"Timeline"}],t[30]=I):I=t[30];let N;t[31]!==r?(N=o.jsx(xt,{value:r,onValueChange:l,options:I}),t[31]=r,t[32]=N):N=t[32];let R;t[33]!==D||t[34]!==N?(R=o.jsxs("div",{className:"flex items-center gap-4",children:[D,N]}),t[33]=D,t[34]=N,t[35]=R):R=t[35];let $;t[36]!==j||t[37]!==R?($=o.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,R]}),t[36]=j,t[37]=R,t[38]=$):$=t[38];let C;t[39]!==u||t[40]!==s||t[41]!==i||t[42]!==a||t[43]!==f||t[44]!==r?(C=f.length===0?o.jsx(Wt,{hiddenOngoing:a?0:i}):r==="calendar"?o.jsx(Ut,{monthStart:s,variants:f,colorMap:u}):o.jsx(Jt,{monthStart:s,variants:f,colorMap:u}),t[39]=u,t[40]=s,t[41]=i,t[42]=a,t[43]=f,t[44]=r,t[45]=C):C=t[45];let O;return t[46]!==$||t[47]!==C?(O=o.jsxs("div",{className:"flex h-full w-full flex-col",children:[$,C]}),t[46]=$,t[47]=C,t[48]=O):O=t[48],O}function Ft(e){return e.blockKey}function Vt(e){return!e.openEnd}function Ht(e){return e.openEnd}function Bt(){return at(new Date)}function Wt(e){const t=V.c(3),{hiddenOngoing:n}=e,r=n===void 0?0:n;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(et,{size:24,className:"text-muted-foreground/60"}),t[0]=l):l=t[0];let s;return t[1]!==r?(s=o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[l,r>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{children:"No dated variants in view."}),o.jsxs("div",{className:"text-xs text-muted-foreground/80",children:[r," ongoing"," ",r===1?"variant is":"variants are"," hidden — enable “Show ongoing” to view."]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{children:"No scheduled variants."}),o.jsx("div",{className:"text-xs text-muted-foreground/80",children:"Variants gated by a date matcher appear here."})]})]}),t[1]=r,t[2]=s):s=t[2],s}const G=20,Z=2,tt=28,zt=6;function Ut(e){const t=V.c(17),{monthStart:n,variants:r,colorMap:l}=e;let s,m,a,c,i;if(t[0]!==l||t[1]!==n||t[2]!==r){const u=Rt(n),x=P(new Date);s=nt,i="flex-1 min-h-0",m="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:$t.map(Gt)}),t[8]=a):a=t[8],c=u.map((h,g)=>{const b=Lt(h,r),y=b.reduce(Yt,0),T=tt+y*(G+Z)+8;return o.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((p,w)=>{const k=p.getMonth()===n.getMonth(),_=p.getTime()===x.getTime();return o.jsx("div",{className:J("border-r last:border-r-0 px-2 pt-1.5 text-xs",k?"bg-background":"bg-muted/30 text-muted-foreground"),children:o.jsx("span",{className:J("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",_&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},w)}),b.map((p,w)=>{const k=st(l,p.variant.blockKey),_=tt+p.lane*(G+Z),M=p.leftUnits/7*100,A=p.widthUnits/7*100,S=p.variant.openStart&&g===0,v=p.variant.openEnd&&g===u.length-1;return o.jsxs(lt,{variant:p.variant,color:k,fadeStart:S,fadeEnd:v,style:{top:_,left:`calc(${M}% + 2px)`,width:`calc(${A}% - 4px)`,minWidth:zt,height:G},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&o.jsxs("span",{className:"opacity-70",children:[" · ",p.variant.label]})]},`${g}-${w}`)})]},g)}),t[0]=l,t[1]=n,t[2]=r,t[3]=s,t[4]=m,t[5]=a,t[6]=c,t[7]=i}else s=t[3],m=t[4],a=t[5],c=t[6],i=t[7];let d;t[9]!==m||t[10]!==a||t[11]!==c?(d=o.jsxs("div",{className:m,children:[a,c]}),t[9]=m,t[10]=a,t[11]=c,t[12]=d):d=t[12];let f;return t[13]!==s||t[14]!==i||t[15]!==d?(f=o.jsx(s,{className:i,children:d}),t[13]=s,t[14]=i,t[15]=d,t[16]=f):f=t[16],f}function Yt(e,t){return Math.max(e,t.lane+1)}function Gt(e){return o.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const B=4,Kt=32,H=240;function Jt(e){const t=V.c(27),{monthStart:n,variants:r,colorMap:l}=e,s=n;let m,a,c,i,d,f;if(t[0]!==l||t[1]!==n||t[2]!==s||t[3]!==r){const h=F(n,B),g=new Date,b=new Map;for(const v of r){const j=b.get(v.blockKey)??[];j.push(v),b.set(v.blockKey,j)}const y=Array.from(b.entries()).sort(Qt),T=h.getTime()-s.getTime(),p=v=>(Math.max(s.getTime(),Math.min(h.getTime(),v.getTime()))-s.getTime())/T*100;let w;t[10]!==s?(w=(v,j)=>F(s,j),t[10]=s,t[11]=w):w=t[11];const k=Array.from({length:B},w),_=g.getTime()>=s.getTime()&&g.getTime()<=h.getTime()?p(g):null;m=nt,f="flex-1 min-h-0",a="min-w-[900px] relative";let M;t[12]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:{width:H},children:"Variant / Block"}),t[12]=M):M=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},t[13]=A):A=t[13];const S=k.map(qt);t[14]!==S?(c=o.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[M,o.jsx("div",{className:"flex-1 grid",style:A,children:S})]}),t[14]=S,t[15]=c):c=t[15],t[16]!==_?(i=_!==null&&o.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${H}px + (100% - ${H}px) * ${_} / 100)`},children:o.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:"Today"})}),t[16]=_,t[17]=i):i=t[17],d=y.map(v=>{const[j,D]=v,L=st(l,j),I=D[0]?.blockLabel??j;return o.jsxs("div",{children:[o.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:o.jsx("div",{className:"px-3 truncate",style:{width:H},children:I})}),D.map((N,R)=>o.jsxs("div",{className:"flex border-b items-center",style:{height:Kt},children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:H},children:[o.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:L.bg}}),o.jsx("span",{className:"truncate text-foreground/80",children:N.label})]}),o.jsxs("div",{className:"relative flex-1 h-full",children:[o.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},children:k.map(Xt)}),(()=>{const $=Math.max(N.start.getTime(),s.getTime()),C=Math.min(N.end.getTime(),h.getTime());if(C<=$)return null;const O=p(new Date($)),E=p(new Date(C))-O;return o.jsx(lt,{variant:N,color:L,fadeStart:N.openStart,fadeEnd:N.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${E}% - 2px)`,height:22},children:N.label})})()]})]},R))]},j)}),t[0]=l,t[1]=n,t[2]=s,t[3]=r,t[4]=m,t[5]=a,t[6]=c,t[7]=i,t[8]=d,t[9]=f}else m=t[4],a=t[5],c=t[6],i=t[7],d=t[8],f=t[9];let u;t[18]!==a||t[19]!==c||t[20]!==i||t[21]!==d?(u=o.jsxs("div",{className:a,children:[c,i,d]}),t[18]=a,t[19]=c,t[20]=i,t[21]=d,t[22]=u):u=t[22];let x;return t[23]!==m||t[24]!==f||t[25]!==u?(x=o.jsx(m,{className:f,children:u}),t[23]=m,t[24]=f,t[25]=u,t[26]=x):x=t[26],x}function Xt(e,t){return o.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function qt(e,t){return o.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ot[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function Qt(e,t){return e[0].localeCompare(t[0])}export{Ln as VariantCalendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as T,l as f,j as i}from"./index-
|
|
1
|
+
import{c as $,r as T,l as f,j as i}from"./index-S0Q7YlOD.js";import{T as k,a as I,b as P}from"./tooltip-FlCInimM.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,b=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),m=R.current[e];m&&S({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const n=M[_];let l;t[6]!==z?(l=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=l):l=t[7];let a;t[8]!==n||t[9]!==b||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,m)=>{const j=i.jsxs("button",{ref:V=>{R.current[m]=V},type:"button",onClick:()=>y(e.value),className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b?"flex-1 h-12 px-4":e.label?f(n.buttonWithLabel,"px-3"):n.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=n,t[9]=b,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=b?"h-12":n.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==l||t[25]!==a?(v=i.jsxs("div",{className:l,children:[a,u]}),t[23]=u,t[24]=l,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
|
package/dist/client/index.html
CHANGED
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
57
57
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
58
58
|
<meta name="apple-mobile-web-app-title" content="deco Studio" />
|
|
59
|
-
<script type="module" crossorigin src="/assets/index-
|
|
60
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
59
|
+
<script type="module" crossorigin src="/assets/index-S0Q7YlOD.js"></script>
|
|
60
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CveMeMql.css">
|
|
61
61
|
</head>
|
|
62
62
|
<body>
|
|
63
63
|
<div id="root"></div>
|