decocms 4.520.0 → 4.522.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/{ActiveShapeUtils-a2DoNLsg.js → ActiveShapeUtils-DgNRIskl.js} +1 -1
- package/dist/client/assets/{AlertCircle-CePpxiVL.js → AlertCircle-CM8LBbRI.js} +1 -1
- package/dist/client/assets/{AreaChart-futTS77r.js → AreaChart-BDF0Y7ZZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DPa6sZRI.js → ArrowLeft-o6iMnbNE.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bc6Es12Z.js → ArrowUp-BXMfywqx.js} +1 -1
- package/dist/client/assets/{BarChart-CJBobvga.js → BarChart-CXp4Uz8n.js} +1 -1
- package/dist/client/assets/{Building02-BbEppJaI.js → Building02-BHRxs6ob.js} +1 -1
- package/dist/client/assets/{CartesianChart-D2mofn_H.js → CartesianChart-PuQz8SzS.js} +1 -1
- package/dist/client/assets/{CategoricalChart-1f5JjzPP.js → CategoricalChart-ixJIwUQc.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dlz5XR1a.js → CheckCircle-_6kE8J_Y.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BjvpkKQW.js → ChevronSelectorVertical-Cxa072WE.js} +1 -1
- package/dist/client/assets/{ChevronUp-CHckv_8T.js → ChevronUp-CzyRtbYf.js} +1 -1
- package/dist/client/assets/{Copy01-ynYolVGY.js → Copy01-DHQGmb70.js} +1 -1
- package/dist/client/assets/{CreditCard01-CJRwgkVP.js → CreditCard01-h12_eEzi.js} +1 -1
- package/dist/client/assets/{DotsVertical-xGYJd_oZ.js → DotsVertical-Bq4P-tWv.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bu4h-9ud.js → ErrorBarContext-DndlWqze.js} +1 -1
- package/dist/client/assets/{Globe04-rKrlqbJ3.js → Globe04-fNWMmp0g.js} +1 -1
- package/dist/client/assets/{Image01-J72Rm0Yr.js → Image01-nc4SHYwM.js} +1 -1
- package/dist/client/assets/{Key01-GACmaKDe.js → Key01-D-TFQCEV.js} +1 -1
- package/dist/client/assets/{Link01-Dy_bSHLe.js → Link01-BXRKhx3s.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Dbb_PbFz.js → LinkBroken01-BGVU3ZYB.js} +1 -1
- package/dist/client/assets/{Minus-cuNEQYA9.js → Minus-I9YJmaEA.js} +1 -1
- package/dist/client/assets/{Monitor01-CW3G0lSo.js → Monitor01-DKMgKH5T.js} +1 -1
- package/dist/client/assets/{Play-RPF1C2F0.js → Play-DRKKkb6S.js} +1 -1
- package/dist/client/assets/{Plus-DXIMcQkQ.js → Plus-BDzIUMmX.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CYgqeMqY.js → ReferenceLine-aBuxkoA0.js} +1 -1
- package/dist/client/assets/{SearchMd-DQ6xirDN.js → SearchMd-DaDIzrN6.js} +1 -1
- package/dist/client/assets/{Sector-fbb2Py22.js → Sector-DgbJAFTT.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B81IcYcu.js → ShoppingBag01-D8V6jyOF.js} +1 -1
- package/dist/client/assets/{Sun-Bd7hlMAK.js → Sun-pq7DLIkN.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-QjLd4gai.js → SwitchHorizontal01-BkDZFUwe.js} +1 -1
- package/dist/client/assets/{Tool01-D7eccoeh.js → Tool01-kEVQyvkb.js} +1 -1
- package/dist/client/assets/{Trash01-CTrNlbT8.js → Trash01-C0MTVRPf.js} +1 -1
- package/dist/client/assets/{Upload01-B9oMCz-6.js → Upload01-Bzv5xKwk.js} +1 -1
- package/dist/client/assets/{User01-BgWUolo8.js → User01-CWMwTWQs.js} +1 -1
- package/dist/client/assets/UserSquare-C9kie61X.js +1 -0
- package/dist/client/assets/{Users01-B7zAiC4m.js → Users01-wuFaBjJt.js} +1 -1
- package/dist/client/assets/{XClose-C9XzQkao.js → XClose-BhvC0HDH.js} +1 -1
- package/dist/client/assets/{ZoomOut-DKNOmfuK.js → ZoomOut-OMu4FTNj.js} +1 -1
- package/dist/client/assets/{access-gate-BBEga0hz.js → access-gate-CleNG4b1.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-ldH4ynvN.js → add-connection-dialog-cxw9Vczu.js} +1 -1
- package/dist/client/assets/agent-analytics-BziQPnGE.js +1 -0
- package/dist/client/assets/agent-app-B_sgoDWu.js +1 -0
- package/dist/client/assets/{agent-assets-BTuYhb0x.js → agent-assets-B66pzU8f.js} +1 -1
- package/dist/client/assets/{agent-automation-CPVX6Ssc.js → agent-automation-CPwvPaTi.js} +1 -1
- package/dist/client/assets/{agent-automations-Depk4_IZ.js → agent-automations-B54NFYpy.js} +1 -1
- package/dist/client/assets/agent-calendar-DZOmQQue.js +1 -0
- package/dist/client/assets/{agent-connect-sources-B_w_bZyW.js → agent-connect-sources-BPjRiYtY.js} +1 -1
- package/dist/client/assets/agent-deck-Ba91n9SI.js +1 -0
- package/dist/client/assets/agent-e2e-BFK9eU0J.js +1 -0
- package/dist/client/assets/agent-experiments-D8m0kz__.js +1 -0
- package/dist/client/assets/agent-file-C093Q8j5.js +1 -0
- package/dist/client/assets/agent-hosting-C1kU5jFj.js +1 -0
- package/dist/client/assets/agent-icon-CkduijMR.js +1 -0
- package/dist/client/assets/agent-library-Bt1DJeQH.js +1 -0
- package/dist/client/assets/agent-library-file-AfgLtORg.js +1 -0
- package/dist/client/assets/agent-monitor-DI6jTwwp.js +1 -0
- package/dist/client/assets/{agent-overview-D3DqJ6Lq.js → agent-overview-y5Nh2nwn.js} +1 -1
- package/dist/client/assets/{agent-releases-JCAWDH6g.js → agent-releases-kZt-8iLB.js} +1 -1
- package/dist/client/assets/agent-settings-OvqJh8WY.js +1 -0
- package/dist/client/assets/{agent-site-editor-DmMopyU6.js → agent-site-editor-C5VhY5wZ.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DzKBDbgz.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BngyQ48R.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Bj-4WvPn.js +1 -0
- package/dist/client/assets/agent-view-B1RWTFTJ.js +1 -0
- package/dist/client/assets/{agent-view-guard-MrJ6Jxxx.js → agent-view-guard-C1iKElhG.js} +1 -1
- package/dist/client/assets/{agents-list-6A96PYcg.js → agents-list-JKV6Z3Xq.js} +1 -1
- package/dist/client/assets/{ai-providers-DLOQtpHm.js → ai-providers-CPQGsZpL.js} +1 -1
- package/dist/client/assets/{alert-BEazQOeN.js → alert-CQRqIByK.js} +1 -1
- package/dist/client/assets/{alert-dialog-DdGCb0IF.js → alert-dialog-vz8WFIXE.js} +1 -1
- package/dist/client/assets/{analytics-sections-BO4YnAjA.js → analytics-sections-Br7qXadL.js} +1 -1
- package/dist/client/assets/{analytics-tab-DaOlRgMk.js → analytics-tab-Ca8Gnxj6.js} +1 -1
- package/dist/client/assets/api-keys-CbEdpED-.js +1 -0
- package/dist/client/assets/{api-keys-BJgy-lS2.js → api-keys-MDgvdru8.js} +1 -1
- package/dist/client/assets/{app-editor-DLE8thcF.js → app-editor-BagDBqNr.js} +1 -1
- package/dist/client/assets/app-preview-url-9Od4s8Sz.js +1 -0
- package/dist/client/assets/{asset-utils-BCgXGBCC.js → asset-utils-DMAyDksX.js} +1 -1
- package/dist/client/assets/{auth-D6exVMlw.js → auth-ClNhQHlU.js} +1 -1
- package/dist/client/assets/{auth-catchall-DvDQWdKb.js → auth-catchall-Dzeq8yKB.js} +1 -1
- package/dist/client/assets/{auth-entry-C86oFADV.js → auth-entry-CoGcxry-.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DyRJlWjB.js → auth-split-layout-d-6d2zKA.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ByNJ3IhY.js → authenticate-and-persist-oauth-5jgv9Xa2.js} +1 -1
- package/dist/client/assets/{automation-list-row-CX5dszCC.js → automation-list-row-B7N_rQ-Y.js} +1 -1
- package/dist/client/assets/{automation-runs-CHeG76Ew.js → automation-runs-Dvua0N09.js} +1 -1
- package/dist/client/assets/{automations-BpcPPmZL.js → automations-BQ3r7tjH.js} +1 -1
- package/dist/client/assets/{autosend-DJIOdR-h.js → autosend-B29qh5n2.js} +1 -1
- package/dist/client/assets/{avatar-49aPXdv7.js → avatar-CFIaQZRf.js} +1 -1
- package/dist/client/assets/{badge-Xi0bu-aJ.js → badge-BsRLQum1.js} +1 -1
- package/dist/client/assets/{block-document-Cn8tlonv.js → block-document-BSywzMOo.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-QgOcURJH.js → blocks-preview-workspace-context-oHu98aZe.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BG-MFk9Q.js → blocks-tab-states-BDili_03.js} +1 -1
- package/dist/client/assets/{blog-schema-BO9IdDkD.js → blog-schema-D3dQU75t.js} +1 -1
- package/dist/client/assets/{buckets-xqarwZ-o.js → buckets-BJl3bULc.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-D7Pi_LQA.js → build-improve-prompt-doc-BzT4r5hv.js} +1 -1
- package/dist/client/assets/{calendar-HcE4WZuE.js → calendar-Dclm8CN2.js} +1 -1
- package/dist/client/assets/{campaigns-view-BLsQazTL.js → campaigns-view-CmIRcofB.js} +1 -1
- package/dist/client/assets/{capability-load-error-BzCsh693.js → capability-load-error-WW2Kcric.js} +1 -1
- package/dist/client/assets/{category-editor-Cwe6Gn4P.js → category-editor-huqv9n0W.js} +1 -1
- package/dist/client/assets/{cdn-tab-tnk9RtCD.js → cdn-tab-9Cucncg1.js} +1 -1
- package/dist/client/assets/{chart-BKCzQrbM.js → chart-CZwNq7lc.js} +1 -1
- package/dist/client/assets/{chat-context-CwxNIspy.js → chat-context-BQpXrVMs.js} +1 -1
- package/dist/client/assets/{chat-draft-Czzd6Fgc.js → chat-draft-Bns-ELTf.js} +1 -1
- package/dist/client/assets/{checkbox-IscGSBh9.js → checkbox-1Jo3Rqz5.js} +1 -1
- package/dist/client/assets/{choose-editor-uAgHg51i.js → choose-editor-9aJwWQ-M.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BhFG_H4z.js → cli-auth-success-BarCqyVt.js} +1 -1
- package/dist/client/assets/{client-icons-CZ-ZSlxS.js → client-icons-ZCQWA3z5.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CrRPvfvI.js +1 -0
- package/dist/client/assets/{collapsible-D314pUSB.js → collapsible-CAZdvMIU.js} +1 -1
- package/dist/client/assets/{collection-detail-CuIOpuSM.js → collection-detail-BECO_yHl.js} +1 -1
- package/dist/client/assets/{collection-display-button-kbHHi0Kq.js → collection-display-button-BZ9Qz-3L.js} +1 -1
- package/dist/client/assets/{collection-search-DCYm5aP4.js → collection-search-cWsbRUjB.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DDG00R7J.js → collection-table-wrapper-CTDkSQdz.js} +1 -1
- package/dist/client/assets/{collection-tabs-CpRvK4aY.js → collection-tabs-CD4jljvJ.js} +1 -1
- package/dist/client/assets/{column-rules-yLNPamrN.js → column-rules-BGaJgm-I.js} +1 -1
- package/dist/client/assets/{combobox-uDe7w0z0.js → combobox-DDNVNn5C.js} +1 -1
- package/dist/client/assets/{command-DcKOVszs.js → command-BBdqXAPJ.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DZ2ioXzY.js → companion-mcps-section-BNjkM4cU.js} +1 -1
- package/dist/client/assets/{config-DlkgY7Jy.js → config-CCpNMXqo.js} +1 -1
- package/dist/client/assets/{connect-wFJx1iR7.js → connect-CQEXdvDN.js} +1 -1
- package/dist/client/assets/{connect-layout-DU417orE.js → connect-layout-BEF1TkbT.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-B6k_6_M9.js → connect-source-dialog-C13X-wCa.js} +1 -1
- package/dist/client/assets/{connection-CLuVf0UF.js → connection-DQvDlLfk.js} +1 -1
- package/dist/client/assets/{connection-card-BaWG41H0.js → connection-card-d-hDQNew.js} +1 -1
- package/dist/client/assets/{connection-detail-B8vzaLYN.js → connection-detail-Bp-r3EJs.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BWk506qj.js → connection-form-helpers-BXv-epm5.js} +1 -1
- package/dist/client/assets/{connections-ajPWQmhT.js → connections-r5CBQTPj.js} +1 -1
- package/dist/client/assets/{content-tab-C9mWHRiZ.js → content-tab-axoESGsZ.js} +3 -3
- package/dist/client/assets/{context-BZM48LEC.js → context-Cppcn4Xj.js} +1 -1
- package/dist/client/assets/{context-menu-DuBXLH-0.js → context-menu-C6lu6sij.js} +1 -1
- package/dist/client/assets/{context-shell-DBFau4jR.js → context-shell-DnRrhD8r.js} +3 -3
- package/dist/client/assets/{core.esm-r_1fOlla.js → core.esm-DlrTVFm2.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-DinRNNUe.js → create-organization-dialog-Dk6dw47b.js} +1 -1
- package/dist/client/assets/{daily-pulse-DIrHsqZA.js → daily-pulse-C9hDLLgw.js} +1 -1
- package/dist/client/assets/{discover-fUj70D62.js → discover-CNW-wNTc.js} +1 -1
- package/dist/client/assets/{domain-settings-CLujyp1m.js → domain-settings-Dy4NOoy7.js} +1 -1
- package/dist/client/assets/{drawer-CyiQimHr.js → drawer-8XhEo4S9.js} +1 -1
- package/dist/client/assets/{editor-BpL3QDOn.js → editor-RlVhV_5_.js} +1 -1
- package/dist/client/assets/{editor-classes-DA3QHiC-.js → editor-classes-C3bkPxTU.js} +1 -1
- package/dist/client/assets/{empty-state-Bw4axBb5.js → empty-state-COpU6lcn.js} +1 -1
- package/dist/client/assets/{empty-state-B0G_CGwR.js → empty-state-p228cI1e.js} +1 -1
- package/dist/client/assets/{experiments-tab-BkzMMdcP.js → experiments-tab-D2FKrGeK.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BYO4Dw1S.js → experiments-tab-choice-Z74ukAS5.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CwDf8Ns1.js → extract-connection-data-BJS9dJQe.js} +1 -1
- package/dist/client/assets/{feature-gate-BxG3yqt8.js → feature-gate-tPt6Tn6z.js} +1 -1
- package/dist/client/assets/{feature-paywall-BHK5XVuW.js → feature-paywall-OwIX0f3G.js} +1 -1
- package/dist/client/assets/{file-explorer-CPGV5tot.js → file-explorer-CEw1YBaZ.js} +1 -1
- package/dist/client/assets/{file-preview-BdEwMhOt.js → file-preview-i9LkXBSE.js} +1 -1
- package/dist/client/assets/{file-share-button-C4MFpt4s.js → file-share-button-B06eRoXO.js} +1 -1
- package/dist/client/assets/{file-type-icon-BnEUVv2h.js → file-type-icon-C1atr-sB.js} +1 -1
- package/dist/client/assets/{folder-icon-DOB3P9Vd.js → folder-icon-Du4go64w.js} +1 -1
- package/dist/client/assets/{form-CpnGThcL.js → form-MT3iZ1Vu.js} +1 -1
- package/dist/client/assets/{general-7WS5B97k.js → general-DqW0kTD8.js} +1 -1
- package/dist/client/assets/{home-CfcdGSri.js → home-CmVL1fox.js} +1 -1
- package/dist/client/assets/{icon-button-B1pb2_kW.js → icon-button-Bt9yq8Xo.js} +1 -1
- package/dist/client/assets/{index-DwGMmQy3.js → index-6KnUwzPl.js} +1 -1
- package/dist/client/assets/{index-BlsmUzy2.js → index-BKThXOYa.js} +1 -1
- package/dist/client/assets/{index-Okf21u4l.js → index-BMe2AVc3.js} +1 -1
- package/dist/client/assets/index-BQfNeaI1.css +1 -0
- package/dist/client/assets/{index-tbca9DY7.js → index-B_5mdOkJ.js} +1 -1
- package/dist/client/assets/{index-B-nEUC-m.js → index-CJ0HMSBA.js} +1 -1
- package/dist/client/assets/{index-B6fYZNK2.js → index-CWpr_BWP.js} +1 -1
- package/dist/client/assets/{index-CMr2QK3C.js → index-CkE02jcD.js} +1 -1
- package/dist/client/assets/{index-P7t2U4iN.js → index-D2IcFDBY.js} +1 -1
- package/dist/client/assets/{index-D2b1OQG0.js → index-DIs1KTwD.js} +1 -1
- package/dist/client/assets/{index-CZWqOlKo.js → index-DnroRdaH.js} +1 -1
- package/dist/client/assets/{index-C_uum72U.js → index-DuRsqxKc.js} +1 -1
- package/dist/client/assets/{index-CMKEBGKX.js → index-DyYo9Tzb.js} +7 -7
- package/dist/client/assets/{index-CXV4VJ6T.js → index-hZj-AA0X.js} +1 -1
- package/dist/client/assets/{index-redirect-B2074CyX.js → index-redirect-B4v1eDMS.js} +1 -1
- package/dist/client/assets/index-vV-QfGRD.js +4 -0
- package/dist/client/assets/{index-CDmfe_Ze.js → index-zVFg_sNX.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-sZS50x9h.js → infiniteQueryObserver-CuPmu1oh.js} +1 -1
- package/dist/client/assets/{infra-billing-Cf1YDWV8.js → infra-billing-BS6n5yAA.js} +1 -1
- package/dist/client/assets/{input-DlOSVkNE.js → input-C2OmAhM5.js} +3 -3
- package/dist/client/assets/{input-qA_oxMGt.js → input-C_izEjEb.js} +1 -1
- package/dist/client/assets/{integration-icon-mkTLlJYZ.js → integration-icon-DOchPlwn.js} +1 -1
- package/dist/client/assets/{jira-icon-C5lcBXYi.js → jira-icon-CbdTqBoW.js} +1 -1
- package/dist/client/assets/{label-8_hsm0_y.js → label-I4hMcj8q.js} +1 -1
- package/dist/client/assets/{layout-C4N_3p9u.js → layout-D5TkSoGq.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Zsw21wnc.js → legacy-agents-deep-DGKAIGFW.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-RzdE-Ynb.js → legacy-main-redirect-CytPUWwX.js} +1 -1
- package/dist/client/assets/library-DtKkvgcM.js +1 -0
- package/dist/client/assets/{login-B439_6KR.js → login-8xawz8Ys.js} +1 -1
- package/dist/client/assets/{markdown-yQLRhm2z.js → markdown-Djk34d4X.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-gJ1lyd1u.js → mcp-app-renderer-Bme3JE-4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B64tInkO.js → mcp-oauth-7ZYfLtAb.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BFUDXDf6.js → mcp-oauth-DSndhUBm.js} +1 -1
- package/dist/client/assets/{members-Beq92g_c.js → members-CmDYFY4J.js} +1 -1
- package/dist/client/assets/{memory-BkOPkUkc.js → memory-Dc9IJUtC.js} +1 -1
- package/dist/client/assets/{mini-report-page-BWPJGpfB.js → mini-report-page-CQACEwiO.js} +1 -1
- package/dist/client/assets/{mock-board-qTnFSOlt.js → mock-board-Dg4mWd3n.js} +3 -3
- package/dist/client/assets/{monaco-editor-C2ej8TCv.js → monaco-editor-B01xJhQJ.js} +1 -1
- package/dist/client/assets/{monitoring-BdT45NJd.js → monitoring-BazEB5tH.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-QRt_yzIW.js → monitoring-stats-row-B6BOcziE.js} +1 -1
- package/dist/client/assets/{multi-select-D4sL81eP.js → multi-select-7hIXxB_M.js} +1 -1
- package/dist/client/assets/{mustache-3jnCJNSv.js → mustache-DIVQnpzp.js} +1 -1
- package/dist/client/assets/{named-rule-uses-u1am7LRC.js → named-rule-uses-IzC6F6u2.js} +1 -1
- package/dist/client/assets/{named-rule-view-B49ZuZC_.js → named-rule-view-DtNzMl0M.js} +1 -1
- package/dist/client/assets/{new-project-dialog-DCNrhfVx.js → new-project-dialog-BT2t_SSj.js} +1 -1
- package/dist/client/assets/{oauth-callback-D1lTLeuO.js → oauth-callback-Do_YigFi.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-uHk7H4_s.js → oauth-callback-ai-provider-C0f_zQCS.js} +1 -1
- package/dist/client/assets/{onboarding-Cqmu7Q1I.js → onboarding-BnkfQtqs.js} +1 -1
- package/dist/client/assets/{openai-conversation-D9oaPp7I.js → openai-conversation-uf-NaETi.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C2xkkt2n.js → optimistic-project-sidebar-views-DcAPj08x.js} +1 -1
- package/dist/client/assets/{order-monitor-day-Bn2RftCy.js → order-monitor-day-b0dngH-9.js} +1 -1
- package/dist/client/assets/{organization-choice-DbSR_Tq1.js → organization-choice-C4lluOTa.js} +1 -1
- package/dist/client/assets/{orgs-Dv6ZMLaR.js → orgs-BCDy4mZz.js} +1 -1
- package/dist/client/assets/{page-seo-form-CYdB-eYU.js → page-seo-form-B1PV8KNM.js} +1 -1
- package/dist/client/assets/{pair-DIRyClgs.js → pair-B3zvEIIj.js} +1 -1
- package/dist/client/assets/{parse-sections-CvCJ7mYl.js → parse-sections-qa9uMkWq.js} +1 -1
- package/dist/client/assets/{plan-bTtLskYs.js → plan-CQxNZHC8.js} +1 -1
- package/dist/client/assets/{plan-ladder-DNfn-N6n.js → plan-ladder-a4C7BXTB.js} +1 -1
- package/dist/client/assets/{popover-n_tcLsd5.js → popover-4xaDZJbI.js} +1 -1
- package/dist/client/assets/{post-calendar-DnSIZDH2.js → post-calendar-DNeEjANZ.js} +1 -1
- package/dist/client/assets/{post-editor-Ds8VBbi2.js → post-editor-DfeVzrAc.js} +1 -1
- package/dist/client/assets/{preview-content-YpNvTcZt.js → preview-content-COrzQemh.js} +1 -1
- package/dist/client/assets/{preview-dialog-DJ8srmsM.js → preview-dialog-CChuJR-E.js} +1 -1
- package/dist/client/assets/{preview-panel-C7cA2AYG.js → preview-panel-B4T5VF9k.js} +1 -1
- package/dist/client/assets/preview-tab-nDzq5CI_.js +551 -0
- package/dist/client/assets/{product-picker-dialog-BQZeexho.js → product-picker-dialog-66_ZBd6p.js} +1 -1
- package/dist/client/assets/{profile-D9pE1ZCt.js → profile-BoXxRe7I.js} +1 -1
- package/dist/client/assets/{project-app-view-BJMSCiLQ.js → project-app-view-CTZMqjMN.js} +1 -1
- package/dist/client/assets/{project-apps-CKpWGbT4.js → project-apps-CFTq1Y-8.js} +1 -1
- package/dist/client/assets/{project-feed-BFyTaEPY.js → project-feed-L5bWiY53.js} +1 -1
- package/dist/client/assets/{project-icon-BozuiJlT.js → project-icon-COhPwkM1.js} +1 -1
- package/dist/client/assets/project-reports-DtdDzr3n.js +1 -0
- package/dist/client/assets/project-tasks-CChFXQQd.js +1 -0
- package/dist/client/assets/{projects-Bj8bu01s.js → projects-JfCJ9HCR.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Co0D5JhR.js → projects-empty-state-DyHgWh9N.js} +1 -1
- package/dist/client/assets/{prompts-CUYrqR6B.js → prompts-Cm2D0Z05.js} +1 -1
- package/dist/client/assets/record-editor-2KaA7crX.js +1 -0
- package/dist/client/assets/{redirect-editor-tsiTjzIT.js → redirect-editor-CggwOLDc.js} +1 -1
- package/dist/client/assets/{releases-api-DuhgreiH.js → releases-api-GGZ-8Anh.js} +1 -1
- package/dist/client/assets/reports-C15MDy2O.js +1 -0
- package/dist/client/assets/{reports-BG2If9Qe.js → reports-CkzVYOoY.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DMCkOYqe.js → reports-onboarding-DWlbzUF4.js} +1 -1
- package/dist/client/assets/{reports-tab-LnruJoPA.js → reports-tab-BYq7jCB4.js} +2 -2
- package/dist/client/assets/repositories-BMJ80hvj.js +1 -0
- package/dist/client/assets/{repositories-D-cEWI3N.js → repositories-DYf28QZF.js} +1 -1
- package/dist/client/assets/{repository-binding-BBtZf2zz.js → repository-binding-gq1GBtrT.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Dm0ES3Rv.js → repository-import-picker-C73tcC8B.js} +1 -1
- package/dist/client/assets/{repository-picker-CPuj3bZ1.js → repository-picker-B8wuJyRa.js} +1 -1
- package/dist/client/assets/{require-capability-C24QIC4M.js → require-capability-D7dgUciv.js} +1 -1
- package/dist/client/assets/{required-auth-layout-PhuA3Ewp.js → required-auth-layout-DZkKYp8M.js} +1 -1
- package/dist/client/assets/{reset-password-C8SdUbOh.js → reset-password-CfQZGfa5.js} +1 -1
- package/dist/client/assets/{resizable-miZzhQuc.js → resizable-D1dDtqQL.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CpfXvomr.js → resolve-tab-icon-lfySyczb.js} +1 -1
- package/dist/client/assets/review-settings-Dj-sWMX-.js +1 -0
- package/dist/client/assets/{roles-BlQqDK5V.js → roles-ByQqydIE.js} +1 -1
- package/dist/client/assets/route-CysIWZWk.js +1 -0
- package/dist/client/assets/{route-fvDFg13s.js → route-DHhUQOhe.js} +1 -1
- package/dist/client/assets/{route-C1AFWDaT.js → route-QYIHXwU7.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-Bn4b767r.js → runnable-block-editor-B4zh6lba.js} +3 -3
- package/dist/client/assets/{sandbox-lifecycle-context-DR0GTBJX.js → sandbox-lifecycle-context-DloCbbmN.js} +1 -1
- package/dist/client/assets/{schema-CylodOUQ.js → schema-CPwozgJP.js} +1 -1
- package/dist/client/assets/{schema-BRZOWw0d.js → schema-CTTxJoP_.js} +1 -1
- package/dist/client/assets/{scroll-area-BH2Oy8PV.js → scroll-area-DiGl8PGX.js} +1 -1
- package/dist/client/assets/{search-input-RbNJNFgo.js → search-input-CEnhZhls.js} +1 -1
- package/dist/client/assets/{search-toggle-BKYod6Wy.js → search-toggle-CHDTRD6S.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-IJ4Mey7K.js → secret-ciphertext-BCK--5Cz.js} +1 -1
- package/dist/client/assets/{secret-picker-C-cbBnBP.js → secret-picker-C7nA9X4N.js} +1 -1
- package/dist/client/assets/{secrets-BvD9KlhJ.js → secrets-Ce2i66vs.js} +1 -1
- package/dist/client/assets/{sections-C2rk7uX1.js → sections-bCMUlLuC.js} +1 -1
- package/dist/client/assets/{sections-editor-DTbMqnxy.js → sections-editor-XSwlJ2Cj.js} +1 -1
- package/dist/client/assets/{select-B-vRTlp8.js → select-C-zh4izi.js} +1 -1
- package/dist/client/assets/{select-model-jzXUtlUA.js → select-model-BtS81Ntu.js} +1 -1
- package/dist/client/assets/{seo-editor-BqtZxWFt.js → seo-editor-CIajRMfi.js} +1 -1
- package/dist/client/assets/{separator-DQdTCaJ6.js → separator-DIkWQC_j.js} +1 -1
- package/dist/client/assets/settings-tab-CK_vb6JO.js +1 -0
- package/dist/client/assets/{sheet-DIT9lGlU.js → sheet-BGGFeoq4.js} +1 -1
- package/dist/client/assets/{shell-layout-NV-fbXIm.js → shell-layout-B-nPBdqh.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DpuJ9efE.js → site-draft-actions-DjhWpZtv.js} +1 -1
- package/dist/client/assets/site-draft-view-JHzZFPts.js +2 -0
- package/dist/client/assets/site-editor-DdWjSX_7.js +1 -0
- package/dist/client/assets/{site-editor-toast-hxv14akZ.js → site-editor-toast-_3UyGVXO.js} +1 -1
- package/dist/client/assets/{skills-Dmur65NR.js → skills-CQRbtiaU.js} +1 -1
- package/dist/client/assets/{slider-DL5ZrKD2.js → slider-CAxJNhVJ.js} +1 -1
- package/dist/client/assets/{sortable.esm-CmQjLRc-.js → sortable.esm-CTCSonzx.js} +1 -1
- package/dist/client/assets/{sso-DJaANv0k.js → sso-C3qgAqTV.js} +1 -1
- package/dist/client/assets/{suggestion-Dp-vLwaS.js → suggestion-BreNkI7w.js} +1 -1
- package/dist/client/assets/{switch-CWqn4x2S.js → switch-BhAC9EZR.js} +1 -1
- package/dist/client/assets/{symbol-9K-WFQbg.js → symbol-BNtwIEgn.js} +1 -1
- package/dist/client/assets/{synced-repos-C6pBMypP.js → synced-repos-DfPDLDas.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CM3k-yhU.js → tab-icon-glyph-BGL6d0vd.js} +1 -1
- package/dist/client/assets/{table-Clkje7xI.js → table-COAtImDT.js} +1 -1
- package/dist/client/assets/{tabs-SpJ7v19a.js → tabs-B7U3KLHD.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-D7x8Ztl2.js → task-assignee-avatar-DnziWP0c.js} +1 -1
- package/dist/client/assets/{task-board-CEgpYip9.js → task-board-DEUJ2XLS.js} +1 -1
- package/dist/client/assets/{task-route-0IGfE2Sp.js → task-route-CdSfJVrQ.js} +1 -1
- package/dist/client/assets/{task-status-DxuW2r4d.js → task-status-C5L321bH.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D5efiDoG.js → taskboard-analytics-DWL_sW0h.js} +1 -1
- package/dist/client/assets/tasks-30CPgq9I.js +1 -0
- package/dist/client/assets/{tasks-BOOTk53y.js → tasks-HKWQm6zE.js} +1 -1
- package/dist/client/assets/{textarea-DhtVYf8e.js → textarea-Cv4TQOKa.js} +1 -1
- package/dist/client/assets/{thread-analytics-WxV3T9V2.js → thread-analytics-B326k_i6.js} +1 -1
- package/dist/client/assets/{thread-intent-BS7K-UuZ.js → thread-intent-jHkZEAkC.js} +1 -1
- package/dist/client/assets/{thread-route-BkotEDA1.js → thread-route-CLZvS5V9.js} +1 -1
- package/dist/client/assets/{thread-route-BZhEwUGV.js → thread-route-CazXc1NZ.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-F9Cd7VsI.js → thread-sheet-body-DRJG57mM.js} +1 -1
- package/dist/client/assets/{time-range-picker-DgOYXLpU.js → time-range-picker-C2pswe5U.js} +1 -1
- package/dist/client/assets/{toggle-group-errY3aOY.js → toggle-group-YVE3K8WT.js} +1 -1
- package/dist/client/assets/{tool-namespace-BVXAR9Sk.js → tool-namespace-B_9TZDnU.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cq4ZT7sJ.js → toolbar-icon-button-BCVN_LM1.js} +1 -1
- package/dist/client/assets/{tooltip-WTx8RFDb.js → tooltip-GaCwLmrY.js} +1 -1
- package/dist/client/assets/{tooltipContext-Ccm0pmDN.js → tooltipContext-CwU4QuBB.js} +1 -1
- package/dist/client/assets/{track-DGHY3NJe.js → track-D8i5l6Cn.js} +1 -1
- package/dist/client/assets/{types-C2kyJgqF.js → types-dnuqvL8k.js} +1 -1
- package/dist/client/assets/{url-slug-eBdSwuRg.js → url-slug-Q7mUdJTY.js} +1 -1
- package/dist/client/assets/{usage-stats-BCvxtMFR.js → usage-stats-BL4ux2To.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BUYCLrsq.js → use-ai-providers-5JlPbZUZ.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-D8uSRmIc.js → use-apply-named-rule-BhihCRUb.js} +1 -1
- package/dist/client/assets/{use-automations-BKnx1LOU.js → use-automations-BgRj8Qi2.js} +1 -1
- package/dist/client/assets/{use-autosave-C0kQXP3a.js → use-autosave-CLzL7buY.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CoSgX-8p.js → use-chat-layout-state-BmbACNVo.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BVcS6c_m.js → use-clock-tick-BT2wKcdE.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Dfch6Pn5.js → use-connect-companion-BG0eO1j9.js} +1 -1
- package/dist/client/assets/{use-connection-C2QTK4P4.js → use-connection-RsX02h--.js} +1 -1
- package/dist/client/assets/{use-content-sync-cSja7hdH.js → use-content-sync-CfkEzIh9.js} +1 -1
- package/dist/client/assets/{use-copy-DedJIHzN.js → use-copy-DURp1qxD.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-JDXemb5m.js → use-create-virtual-mcp-CAFje7fY.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-ByEf5sEV.js → use-date-fns-locale-BQOaedf-.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C_RB3agc.js → use-debounced-autosave-BTXPrvCH.js} +1 -1
- package/dist/client/assets/{use-debounced-value-ELHlrW87.js → use-debounced-value-upvagLL0.js} +1 -1
- package/dist/client/assets/{use-deco-credits-D6gi2fbm.js → use-deco-credits-CKkvjPFp.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CwR46UgN.js → use-decopilot-events-BTx6-qTi.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BTgka6iQ.js → use-delete-connection-CiYgYxZE.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BCN-ylik.js → use-deployment-admin-vZDJlQ6F.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CVZxF7Um.js → use-fast-preview-draft-url-zBO4zzxr.js} +1 -1
- package/dist/client/assets/{use-file-configs-Br5njpmm.js → use-file-configs-BhQVXI_M.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-Dz2zKYVV.js → use-inbox-feed-pFcAadCx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C3u8iypP.js → use-infinite-scroll-BwdSukxD.js} +1 -1
- package/dist/client/assets/{use-join-requests-D2Wm3dTe.js → use-join-requests-BIxxkmdF.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CTK-I6l5.js → use-main-panel-tabs-BRdyiq_g.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BPhXIpD4.js → use-mcp-auth-status-BknaNnme.js} +1 -1
- package/dist/client/assets/{use-mcp-client-COM3gP2O.js → use-mcp-client-BqYCJLNH.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-1pj8Mn9o.js → use-mcp-prompts-DDgYwR7u.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DVMy4xzU.js → use-mcp-tools-PibnH1lh.js} +1 -1
- package/dist/client/assets/{use-members-BXYZ5GWT.js → use-members-DjoUUKip.js} +1 -1
- package/dist/client/assets/{use-mobile-Bq3CXRKG.js → use-mobile-DIircfAX.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BrZbG7eM.js → use-move-blocks-CZVHB-Qe.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-F9oDR6Aw.js → use-navigate-to-agent-ORYVFAbZ.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-D4P9ija_.js → use-open-billing-url-DOXR78A2.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C3gy1liR.js → use-org-auth-client-CIaaKZte.js} +1 -1
- package/dist/client/assets/{use-org-fs-BRfBBlvJ.js → use-org-fs-C7LGz1-C.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-IArfEyUi.js → use-org-repo-syncs-D94nqbQj.js} +1 -1
- package/dist/client/assets/{use-org-sso-ChkTjfH5.js → use-org-sso-DN4ZiztH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Dx88n2m6.js → use-organization-roles-fM-riBuc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-dAOl4U_-.js → use-organization-settings-CPceHw0I.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CW6DUzf9.js → use-panel-navigate-D4lLfNFu.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CTc7wMZF.js → use-project-native-view-presence-BvyTsGLr.js} +1 -1
- package/dist/client/assets/{use-project-scope-BFye4eeg.js → use-project-scope-B4y5G2Ei.js} +1 -1
- package/dist/client/assets/{use-recent-apps-BU79Go-x.js → use-recent-apps-C_8OWGAP.js} +1 -1
- package/dist/client/assets/{use-releases-CfZAXBwl.js → use-releases-DeERsgJz.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CJiI0aEe.js → use-reports-diagnostic-DCvOvl0T.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-Bryc2tH_.js → use-sandbox-events-D8NHRWeu.js} +1 -1
- package/dist/client/assets/{use-secrets-BBwZJiLY.js → use-secrets-BdvIPaij.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-B5gtsawP.js → use-section-preview-base-BvxipU3p.js} +1 -1
- package/dist/client/assets/{use-session-runtime-C6i7UtWU.js → use-session-runtime-CqcbAAQE.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CKSL9ORL.js → use-sidebar-collapsed-HOr77qXH.js} +1 -1
- package/dist/client/assets/{use-tags-C7NcCL7l.js → use-tags-Dma5_1PE.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CmTEpb8g.js → use-task-board-analytics-BurDuxFg.js} +1 -1
- package/dist/client/assets/{use-task-board-events-bChrXXDv.js → use-task-board-events-CzPazKvc.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B5n2Imtn.js → use-task-board-item-prs-CUp5a2aS.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CyLevNIC.js → use-task-metadata-Bp_awmsI.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BdSD31wi.js → use-thread-analytics-BoPqG6bS.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-COl9UfXy.js → use-thread-outputs-BGT_pFPh.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D_Px4YIv.js +1 -0
- package/dist/client/assets/{useQueries-Dgo1k5er.js → useQueries-aBrIvzTH.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-4o7EP3RX.js +1 -0
- package/dist/client/assets/{users-BOMrf4Fo.js → users-CjdCQhWU.js} +1 -1
- package/dist/client/assets/{utils-fsgeKe9W.js → utils-CdAi3CPI.js} +1 -1
- package/dist/client/assets/{variant-calendar-CGX7TiEA.js → variant-calendar-CVabKfKo.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-D3H0IPwr.js → variant-matcher-override-D18mNo8N.js} +1 -1
- package/dist/client/assets/virtual-mcp-6YEjnlwk.js +1 -0
- package/dist/client/assets/{watch-sse-pool-9c6_Ze8B.js → watch-sse-pool-FRqOQxvE.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +680 -680
- package/package.json +1 -1
- package/dist/client/assets/UserSquare-CZXKi88L.js +0 -1
- package/dist/client/assets/agent-analytics-CAeIvLpw.js +0 -1
- package/dist/client/assets/agent-app-BIZw6O6x.js +0 -1
- package/dist/client/assets/agent-calendar-rSYcBUhL.js +0 -1
- package/dist/client/assets/agent-deck-BdTe1uEF.js +0 -1
- package/dist/client/assets/agent-e2e-BUjIk9_k.js +0 -1
- package/dist/client/assets/agent-experiments-C9MFznl7.js +0 -1
- package/dist/client/assets/agent-file-CD0Yoa7I.js +0 -1
- package/dist/client/assets/agent-hosting-DZFLF8mA.js +0 -1
- package/dist/client/assets/agent-icon-DtT3h4UX.js +0 -1
- package/dist/client/assets/agent-library-ClrTwj50.js +0 -1
- package/dist/client/assets/agent-library-file-CAlMp336.js +0 -1
- package/dist/client/assets/agent-monitor-Bn4RTzzk.js +0 -1
- package/dist/client/assets/agent-settings-DUBumxG4.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CXdBuByv.js +0 -2
- package/dist/client/assets/agent-site-editor-content-xxngWBr2.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DBUt1iNd.js +0 -1
- package/dist/client/assets/agent-view-BiUQ1gj5.js +0 -1
- package/dist/client/assets/api-keys-bhSN63jL.js +0 -1
- package/dist/client/assets/cms-settings-editor-DVlUigtK.js +0 -1
- package/dist/client/assets/index-MPdUOMBb.css +0 -1
- package/dist/client/assets/index-uNmIis3_.js +0 -4
- package/dist/client/assets/library-CKihNjtp.js +0 -1
- package/dist/client/assets/preview-tab-lR6Zy9Kz.js +0 -551
- package/dist/client/assets/project-reports-B6AQHucI.js +0 -1
- package/dist/client/assets/project-tasks-DFBfLTNl.js +0 -1
- package/dist/client/assets/record-editor-Dq4w4KU3.js +0 -1
- package/dist/client/assets/reports-DhdnjILE.js +0 -1
- package/dist/client/assets/repositories-CBH2GIms.js +0 -1
- package/dist/client/assets/review-settings-BrKUWarQ.js +0 -1
- package/dist/client/assets/route-DSfRBjPS.js +0 -1
- package/dist/client/assets/settings-tab-CPth5xHx.js +0 -1
- package/dist/client/assets/site-draft-view-D6YYVH6j.js +0 -2
- package/dist/client/assets/site-editor-CpNSE9w9.js +0 -1
- package/dist/client/assets/tasks-DBKhuSFQ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-EcJS-_aQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-XLLgwpcB.js +0 -1
- package/dist/client/assets/virtual-mcp-th0bGjq5.js +0 -1
package/dist/client/assets/{monitoring-stats-row-QRt_yzIW.js → monitoring-stats-row-B6BOcziE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as lt,l as J,j as l}from"./index-
|
|
1
|
+
import{c as lt,l as J,j as l}from"./index-DyYo9Tzb.js";import{C as Q,b as Z}from"./chart-CZwNq7lc.js";import{C as tt,X as et,Y as at}from"./CartesianChart-PuQz8SzS.js";import{A as mt,a as ut}from"./AreaChart-BDF0Y7ZZ.js";import{C as dt}from"./tooltipContext-CwU4QuBB.js";import{B as ht,a as pt}from"./BarChart-CXp4Uz8n.js";const it=60*1e3,P=60*it,xt=24*P,st=25*P;function q(s,t){if(s.length===0)return 0;const r=[...s].sort((f,c)=>f-c),e=Math.max(0,Math.min(r.length-1,Math.ceil(t*r.length)-1));return r[e]??0}function gt(s,t){return t<=st?s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString([],{month:"short",day:"numeric"})}function yt(s,t){const r=t-s;return r<=P?Math.max(1,Math.min(60,Math.ceil(r/it))):r<=st?Math.max(1,Math.min(25,Math.ceil(r/P))):Math.max(1,Math.min(31,Math.ceil(r/xt)))}function kt(s,t,r,e){const f=t.getTime(),c=r.getTime(),h=Math.max(1,c-f),n=yt(f,c),g=Math.max(1,Math.floor(h/n)),a=[];for(let o=0;o<n;o++){const i=new Date(f+o*g);a.push({t:i.toISOString(),ts:i.getTime(),label:gt(i,h),calls:0,errors:0,durations:[]})}for(const o of s){const i=new Date(o.timestamp).getTime(),m=Math.floor((i-f)/g),x=Math.max(0,Math.min(n-1,m)),u=a[x];u&&(u.calls+=1,o.isError&&(u.errors+=1),Number.isFinite(o.durationMs)&&u.durations.push(o.durationMs))}return a.map(o=>({t:o.t,ts:o.ts,label:o.label,calls:o.calls,errors:o.errors,errorRate:o.calls>0?o.errors/o.calls*100:0,avg:Math.round(o.durations.length>0?o.durations.reduce((i,m)=>i+m,0)/o.durations.length:0),p50:Math.round(q(o.durations,.5)),p95:Math.round(q(o.durations,.95))}))}function Ct(s,t,r,e,f){const c=e??s.length,h=f??s.filter(i=>i.isError).length,n=s.map(i=>i.durationMs),g=n.length>0?n.reduce((i,m)=>i+m,0)/n.length:0,a=q(n,.95),o=kt(s,t.startDate,t.endDate);return{totalCalls:c,totalErrors:h,avgDurationMs:g,p95DurationMs:a,data:o}}function ot(s){return s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}function rt(s){const t=lt.c(19),{active:r,payload:e,dataKey:f,colorVar:c}=s;if(!r||!e?.length)return null;const h=e[0],n=h?.payload?.t??"";let g;t[0]!==h?.payload?.label||t[1]!==n?(g=n?new Date(n).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):h?.payload?.label??"",t[0]=h?.payload?.label,t[1]=n,t[2]=g):g=t[2];const a=g,o=h?.value,i=typeof o=="number"?o:0,m=f==="avg"||f==="p50"||f==="p95",x=f==="costUsd";let u;t[3]!==x||t[4]!==m||t[5]!==i?(u=x?`$${i.toFixed(i<1?4:2)}`:m?i>=1e4?`${(i/1e3).toFixed(1)}s`:`${Math.round(i)}ms`:i.toLocaleString(),t[3]=x,t[4]=m,t[5]=i,t[6]=u):u=t[6];const S=u;let y;t[7]!==a?(y=l.jsx("div",{className:"text-2xs text-muted-foreground mb-1",children:a}),t[7]=a,t[8]=y):y=t[8];let k;t[9]!==c?(k=l.jsx("div",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:c}}),t[9]=c,t[10]=k):k=t[10];let v;t[11]!==S?(v=l.jsx("span",{className:"text-xs font-medium tabular-nums",children:S}),t[11]=S,t[12]=v):v=t[12];let p;t[13]!==k||t[14]!==v?(p=l.jsxs("div",{className:"flex items-center gap-1.5",children:[k,v]}),t[13]=k,t[14]=v,t[15]=p):p=t[15];let j;return t[16]!==y||t[17]!==p?(j=l.jsxs("div",{className:"rounded-lg bg-popover px-3 py-2 shadow-soft",children:[y,p]}),t[16]=y,t[17]=p,t[18]=j):j=t[18],j}function Lt(s){const t=lt.c(85),{data:r,dataKey:e,colorNum:f,chartHeight:c,variant:h,ariaLabel:n}=s,g=h===void 0?"bar":h,a=`var(--chart-${f})`,o=`kpi-gradient-${e}-${f}`,i=Math.max(...r.map(d=>d[e]??0),0);if(g==="area"){let d;t[0]!==c?(d=J(c,"w-full"),t[0]=c,t[1]=d):d=t[1];let M;t[2]!==a||t[3]!==e?(M={label:e,color:a},t[2]=a,t[3]=e,t[4]=M):M=t[4];let b;t[5]!==e||t[6]!==M?(b={[e]:M},t[5]=e,t[6]=M,t[7]=b):b=t[7];let I;t[8]===Symbol.for("react.memo_cache_sentinel")?(I={left:0,right:-12,top:8,bottom:8},t[8]=I):I=t[8];let $,O;t[9]!==a?($=l.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.2}),O=l.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),t[9]=a,t[10]=$,t[11]=O):($=t[10],O=t[11]);let w;t[12]!==o||t[13]!==$||t[14]!==O?(w=l.jsx("defs",{children:l.jsxs("linearGradient",{id:o,x1:"0",y1:"0",x2:"0",y2:"1",children:[$,O]})}),t[12]=o,t[13]=$,t[14]=O,t[15]=w):w=t[15];let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R=l.jsx(tt,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),t[16]=R):R=t[16];let V;t[17]===Symbol.for("react.memo_cache_sentinel")?(V=l.jsx(et,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)",opacity:.7},interval:"preserveStartEnd",tickMargin:8}),t[17]=V):V=t[17];let U;t[18]===Symbol.for("react.memo_cache_sentinel")?(U={fontSize:11,fill:"var(--muted-foreground)",opacity:.7},t[18]=U):U=t[18];const W=i>0?"auto":10;let E;t[19]!==W?(E=l.jsx(at,{orientation:"right",axisLine:!1,tickLine:!1,tick:U,tickFormatter:ot,width:40,domain:[0,W],tickCount:5}),t[19]=W,t[20]=E):E=t[20];let Y;t[21]===Symbol.for("react.memo_cache_sentinel")?(Y={stroke:"var(--border)",strokeDasharray:"4 4"},t[21]=Y):Y=t[21];let T;t[22]!==a||t[23]!==e?(T=l.jsx(Q,{cursor:Y,content:nt=>{const{active:ct,payload:ft}=nt;return l.jsx(rt,{active:ct,payload:ft,dataKey:e,colorVar:a})}}),t[22]=a,t[23]=e,t[24]=T):T=t[24];const X=`url(#${o})`;let z;t[25]!==a?(z={r:4,fill:a,stroke:"var(--background)",strokeWidth:2},t[25]=a,t[26]=z):z=t[26];let A;t[27]!==a||t[28]!==e||t[29]!==X||t[30]!==z?(A=l.jsx(mt,{type:"linear",dataKey:e,stroke:a,strokeWidth:2,fill:X,animationDuration:300,dot:!1,activeDot:z}),t[27]=a,t[28]=e,t[29]=X,t[30]=z,t[31]=A):A=t[31];let B;t[32]!==r||t[33]!==E||t[34]!==T||t[35]!==A||t[36]!==w?(B=l.jsxs(ut,{data:r,margin:I,children:[w,R,V,E,T,A]}),t[32]=r,t[33]=E,t[34]=T,t[35]=A,t[36]=w,t[37]=B):B=t[37];let H;return t[38]!==n||t[39]!==B||t[40]!==d||t[41]!==b?(H=l.jsx(Z,{role:"img","aria-label":n,className:d,config:b,children:B}),t[38]=n,t[39]=B,t[40]=d,t[41]=b,t[42]=H):H=t[42],H}let m;t[43]!==c?(m=J(c,"w-full"),t[43]=c,t[44]=m):m=t[44];let x;t[45]!==a||t[46]!==e?(x={label:e,color:a},t[45]=a,t[46]=e,t[47]=x):x=t[47];let u;t[48]!==e||t[49]!==x?(u={[e]:x},t[48]=e,t[49]=x,t[50]=u):u=t[50];let S,y;t[51]===Symbol.for("react.memo_cache_sentinel")?(S={left:0,right:-12,top:8,bottom:8},y=l.jsx(tt,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),t[51]=S,t[52]=y):(S=t[51],y=t[52]);let k;t[53]===Symbol.for("react.memo_cache_sentinel")?(k={fontSize:11,fill:"var(--muted-foreground)",opacity:.7},t[53]=k):k=t[53];const v=r.length<=6?0:Math.floor(r.length/6);let p;t[54]!==v?(p=l.jsx(et,{dataKey:"label",axisLine:!1,tickLine:!1,tick:k,interval:v,tickMargin:8}),t[54]=v,t[55]=p):p=t[55];let j;t[56]===Symbol.for("react.memo_cache_sentinel")?(j={fontSize:11,fill:"var(--muted-foreground)",opacity:.7},t[56]=j):j=t[56];const G=i>0?"auto":10;let _;t[57]!==G?(_=l.jsx(at,{orientation:"right",axisLine:!1,tickLine:!1,tick:j,tickFormatter:ot,width:40,domain:[0,G],tickCount:5}),t[57]=G,t[58]=_):_=t[58];let K;t[59]===Symbol.for("react.memo_cache_sentinel")?(K={fill:"var(--muted)",opacity:.3},t[59]=K):K=t[59];let C;t[60]!==a||t[61]!==e?(C=l.jsx(Q,{cursor:K,content:d=>{const{active:M,payload:b}=d;return l.jsx(rt,{active:M,payload:b,dataKey:e,colorVar:a})}}),t[60]=a,t[61]=e,t[62]=C):C=t[62];let L;if(t[63]!==a||t[64]!==r||t[65]!==e){let d;t[67]!==a||t[68]!==e?(d=(M,b)=>l.jsx(dt,{fill:(M[e]??0)===0?"var(--muted-foreground)":a,fillOpacity:(M[e]??0)===0?.15:.85},`cell-${b}`),t[67]=a,t[68]=e,t[69]=d):d=t[69],L=r.map(d),t[63]=a,t[64]=r,t[65]=e,t[66]=L}else L=t[66];let D;t[70]!==a||t[71]!==e||t[72]!==L?(D=l.jsx(ht,{dataKey:e,fill:a,radius:0,minPointSize:1,children:L}),t[70]=a,t[71]=e,t[72]=L,t[73]=D):D=t[73];let N;t[74]!==r||t[75]!==_||t[76]!==C||t[77]!==D||t[78]!==p?(N=l.jsxs(pt,{data:r,margin:S,children:[y,p,_,C,D]}),t[74]=r,t[75]=_,t[76]=C,t[77]=D,t[78]=p,t[79]=N):N=t[79];let F;return t[80]!==n||t[81]!==N||t[82]!==m||t[83]!==u?(F=l.jsx(Z,{role:"img","aria-label":n,className:m,config:u,children:N}),t[80]=n,t[81]=N,t[82]=m,t[83]=u,t[84]=F):F=t[84],F}export{Lt as K,Ct as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ie,r as U,l as ce,j as t}from"./index-
|
|
1
|
+
import{c as ie,r as U,l as ce,j as t}from"./index-DyYo9Tzb.js";import{B as le}from"./badge-BsRLQum1.js";import{C as ne}from"./checkbox-1Jo3Rqz5.js";import{t as ae}from"./ChevronUp-CzyRtbYf.js";import{e as de,C as me,b as oe,c as ue,a as fe,d as he}from"./command-BBdqXAPJ.js";import{a as xe,b as pe,P as ge}from"./popover-4xaDZJbI.js";const ve=[];function Ve(r){const e=ie.c(68),{options:a,onValueChange:o,defaultValue:W,placeholder:X,animation:Z,maxCount:ee,modalPopover:te,className:M,disabled:se,onSearchChange:S}=r,d=W===void 0?ve:W,$=X===void 0?"Select items":X,P=Z===void 0?0:Z,k=ee===void 0?3:ee,J=te===void 0?!1:te,Y=se===void 0?!1:se,[s,y]=U.useState(d),[F,_]=U.useState(!1);let V,E;e[0]!==d||e[1]!==s?(V=()=>{JSON.stringify(s)!==JSON.stringify(d)&&y(d)},E=[d,s],e[0]=d,e[1]=s,e[2]=V,e[3]=E):(V=e[2],E=e[3]),U.useEffect(V,E);let O;e[4]!==o||e[5]!==s?(O=l=>{if(l.key==="Enter")_(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const n=[...s];n.pop(),y(n),o(n)}},e[4]=o,e[5]=s,e[6]=O):O=e[6];const G=O;let D;e[7]!==o||e[8]!==s?(D=l=>{const n=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];y(n),o(n)},e[7]=o,e[8]=s,e[9]=D):D=e[9];const c=D;let I;e[10]!==o?(I=()=>{y([]),o([])},e[10]=o,e[11]=I):I=e[11];const L=I;let z;e[12]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{_(Ne)},e[12]=z):z=e[12];const re=z;let A;e[13]!==L||e[14]!==o||e[15]!==a||e[16]!==s.length?(A=()=>{if(s.length===a.length)L();else{const l=a.map(Ce);y(l),o(l)}},e[13]=L,e[14]=o,e[15]=a,e[16]=s.length,e[17]=A):A=e[17];const i=A;let m;e[18]!==M?(m=ce("focus-ring aria-invalid:bg-destructive/10 aria-invalid:shadow-[inset_0_0_0_1px_var(--destructive)] flex h-[var(--studio-control-height,2.25rem)] w-full max-w-xs items-center justify-between gap-2 rounded-[var(--studio-control-radius,var(--radius-lg))] bg-[var(--studio-input-background)] pr-3 pl-1.5 text-sm shadow-edge transition-[background-color,box-shadow] hover:bg-sidebar disabled:pointer-events-none disabled:text-subtle-foreground",M),e[18]=M,e[19]=m):m=e[19];let u;e[20]!==P||e[21]!==k||e[22]!==a||e[23]!==$||e[24]!==s?(u=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const n=a.find(Q=>Q.value===l),w=n?.icon;return t.jsxs(le,{variant:"outline",size:"lg",className:"bg-card max-w-28",style:{animationDuration:`${P}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:n?.label})]},l)}),s.length>k&&t.jsxs(le,{variant:"outline",size:"lg",className:"bg-card flex-shrink-0",style:{animationDuration:`${P}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(ae,{className:"text-muted-foreground size-3.5 shrink-0"})})]}):t.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[t.jsx("span",{className:"text-subtle-foreground pl-1.5 text-sm",children:$}),t.jsx(ae,{className:"text-muted-foreground size-3.5 shrink-0"})]}),e[20]=P,e[21]=k,e[22]=a,e[23]=$,e[24]=s,e[25]=u):u=e[25];let f;e[26]!==Y||e[27]!==m||e[28]!==u?(f=t.jsx(xe,{asChild:!0,children:t.jsx("button",{type:"button",onClick:re,className:m,disabled:Y,children:u})}),e[26]=Y,e[27]=m,e[28]=u,e[29]=f):f=e[29];let R;e[30]===Symbol.for("react.memo_cache_sentinel")?(R=()=>_(!1),e[30]=R):R=e[30];const q=!S;let h;e[31]!==G||e[32]!==S?(h=t.jsx(de,{placeholder:"Search...",onKeyDown:G,onValueChange:S,className:"rounded-t-xl"}),e[31]=G,e[32]=S,e[33]=h):h=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(me,{children:"No results found."}),e[34]=T):T=e[34];let x;e[35]!==i?(x=()=>{i()},e[35]=i,e[36]=x):x=e[36];let p;e[37]!==i?(p=l=>{l.stopPropagation(),i()},e[37]=i,e[38]=p):p=e[38];const H=s.length===a.length&&a.length>0;let g;e[39]!==H||e[40]!==i?(g=t.jsx(ne,{checked:H,onCheckedChange:i,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:be}),e[39]=H,e[40]=i,e[41]=g):g=e[41];let B;e[42]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx("span",{children:"(Select All)"}),e[42]=B):B=e[42];let v;e[43]!==p||e[44]!==g?(v=t.jsxs("div",{className:"flex items-center w-full",onClick:p,children:[g,B]}),e[43]=p,e[44]=g,e[45]=v):v=e[45];let j;e[46]!==x||e[47]!==v?(j=t.jsx(oe,{onSelect:x,className:"cursor-pointer",children:v},"all"),e[46]=x,e[47]=v,e[48]=j):j=e[48];let b;if(e[49]!==a||e[50]!==s||e[51]!==c){let l;e[53]!==s||e[54]!==c?(l=n=>{const w=s.includes(n.value);return t.jsx(oe,{onSelect:()=>{c(n)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:Q=>{Q.stopPropagation(),c(n)},children:[t.jsx(ne,{checked:w,onCheckedChange:()=>{c(n)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:je}),n.icon&&t.jsx(n.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:n.label})]})},n.value)},e[53]=s,e[54]=c,e[55]=l):l=e[55],b=a.map(l),e[49]=a,e[50]=s,e[51]=c,e[52]=b}else b=e[52];let C;e[56]!==j||e[57]!==b?(C=t.jsxs(ue,{className:"rounded-b-xl",children:[T,t.jsxs(fe,{children:[j,b]})]}),e[56]=j,e[57]=b,e[58]=C):C=e[58];let N;e[59]!==q||e[60]!==h||e[61]!==C?(N=t.jsx(pe,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:R,children:t.jsxs(he,{shouldFilter:q,className:"rounded-xl",children:[h,C]})}),e[59]=q,e[60]=h,e[61]=C,e[62]=N):N=e[62];let K;return e[63]!==F||e[64]!==J||e[65]!==f||e[66]!==N?(K=t.jsxs(ge,{open:F,onOpenChange:_,modal:J,children:[f,N]}),e[63]=F,e[64]=J,e[65]=f,e[66]=N,e[67]=K):K=e[67],K}function je(r){return r.stopPropagation()}function be(r){return r.stopPropagation()}function Ce(r){return r.value}function Ne(r){return!r}export{Ve as M};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as B,e as F,K as q,b as z,r as J,j as x,D as H,q as V,s as G,v as L,B as O,t as U}from"./index-
|
|
1
|
+
import{o as B,e as F,K as q,b as z,r as J,j as x,D as H,q as V,s as G,v as L,B as O,t as U}from"./index-DyYo9Tzb.js";import{u as _}from"./use-session-runtime-CqcbAAQE.js";import{o as $,c as Y,u as X,D as Z,M as I,H as M,F as ee,G as te,Q as re,P as se,q as ne,J as ae}from"./site-editor-toast-_3UyGVXO.js";import{s as ie}from"./sandbox-git-api-CH_-QFpD.js";import{u as oe}from"./chat-context-BQpXrVMs.js";import{b as ce}from"./sandbox-url-D3mC8qhT.js";import{d as ue}from"./utils-CdAi3CPI.js";import{i as le}from"./CheckCircle-_6kE8J_Y.js";import{a as fe}from"./Copy01-DHQGmb70.js";import{MonacoCodeEditor as pe}from"./monaco-editor-B01xJhQJ.js";function We({orgSlug:s,virtualMcpId:e,branch:t}){const r=B(),a=oe()?.taskId??null,n=$(e),i=_(e).runtime==="cms",{url:c}=Y(e),o=X(e,t),l=o.kind==="protocol"?o:null,f=Z({orgSlug:s,virtualMcpId:e,branch:t}),y=async p=>{if(c)return{ok:!0,existed:!0};if(i){const u=await re({orgSlug:s,virtualMcpId:e,branch:t},{delete:[p]});return se(r,{orgSlug:s,virtualMcpId:e,branch:t},u),await r.invalidateQueries({queryKey:ie({orgSlug:s,virtualMcpId:e,branch:t,threadId:a})}),{ok:!0,existed:!0}}const w=ne(n,ue(p)),d=await fetch(ce({orgSlug:s,virtualMcpId:e,branch:t,threadId:a},"unlink"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:w})});return d.ok?d.json():ae(d,"Delete")};return F({mutationKey:te(s,e,t),scope:ee(s,e,t),mutationFn:async({blockKey:p})=>l?(await I(r,l,{orgSlug:s,virtualMcpId:e,branch:t},f,{delete:[p]}),{ok:!0,existed:!0}):M({queryClient:r,orgSlug:s,virtualMcpId:e,branch:t,backend:o,cacheKey:f},{kind:"edit",write:()=>y(p)}),onMutate:async({blockKey:p})=>{const w=q.decofile(f);await r.cancelQueries({queryKey:w});const d=r.getQueryData(w),u=!!d&&p in d,E=d?.[p];return r.setQueryData(w,h=>{if(!h)return h;const{[p]:v,...m}=h;return m}),{queryKey:w,blockKey:p,hadKey:u,previousValue:E}},onError:(p,w,d)=>{d&&r.setQueryData(d.queryKey,u=>d.hadKey?{...u??{},[d.blockKey]:d.previousValue}:u)},onSuccess:()=>{r.invalidateQueries({queryKey:q.liveMeta(s,e,t)})}})}function Be({open:s,onOpenChange:e,pageKey:t,decofile:r,onSave:a}){const n=z(),i=r[t],c=i===void 0,o=c?"":JSON.stringify(i,null,2),[l,f]=J.useState(!1),[y,p]=J.useState(o),[w,d]=J.useState(!1),u=!a||c,E=y!==o,h=()=>{navigator.clipboard.writeText(y).then(()=>{f(!0),setTimeout(()=>f(!1),2e3)})},v=async m=>{if(!a||w)return;let b;try{b=JSON.parse(m)}catch{U.error(n("sectionsEditor.pageJsonDialog.invalidJsonError"));return}d(!0);try{await a(b),U.success(n("sectionsEditor.pageJsonDialog.saveSuccess")),e(!1)}catch(k){U.error(n("sectionsEditor.pageJsonDialog.saveError",{error:k instanceof Error?k.message:String(k)}))}finally{d(!1)}};return x.jsx(H,{open:s,onOpenChange:e,children:x.jsxs(V,{className:"flex h-[85vh] w-[95vw] flex-col gap-0 overflow-hidden p-0 sm:max-w-6xl",children:[x.jsxs(G,{className:"shrink-0 px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[x.jsx(L,{className:"text-sm font-semibold",children:n("sectionsEditor.pageJsonDialog.title")}),x.jsxs("div",{className:"flex items-center gap-2 mr-8",children:[x.jsxs(O,{variant:"ghost",size:"sm",onClick:h,className:"text-xs",children:[l?x.jsx(le,{size:12}):x.jsx(fe,{size:12}),n(l?"sectionsEditor.pageJsonDialog.copied":"sectionsEditor.pageJsonDialog.copy")]}),!u&&x.jsx(O,{size:"sm",onClick:()=>v(y),disabled:!E||w,className:"h-7 text-xs",children:n(w?"sectionsEditor.pageJsonDialog.saving":"sectionsEditor.pageJsonDialog.save")})]})]}),c?x.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",n("sectionsEditor.pageJsonDialog.pageNotFound")]}):x.jsx("div",{className:"min-h-0 flex-1 py-2",children:x.jsx(pe,{code:o,language:"json",readOnly:u,height:"100%",onChange:m=>p(m??""),onSave:m=>{v(m)}})})]})})}var he=Object.prototype.toString,j=Array.isArray||function(e){return he.call(e)==="[object Array]"};function K(s){return typeof s=="function"}function de(s){return j(s)?"array":typeof s}function N(s){return s.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Q(s,e){return s!=null&&typeof s=="object"&&e in s}function ve(s,e){return s!=null&&typeof s!="object"&&s.hasOwnProperty&&s.hasOwnProperty(e)}var ye=RegExp.prototype.test;function ge(s,e){return ye.call(s,e)}var we=/\S/;function me(s){return!ge(we,s)}var Ee={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function xe(s){return String(s).replace(/[&<>"'`=\/]/g,function(t){return Ee[t]})}var ke=/\s*/,Ce=/\s+/,A=/\s*=/,De=/\s*\}/,be=/#|\^|\/|>|\{|&|=|!/;function Pe(s,e){if(!s)return[];var t=!1,r=[],a=[],n=[],i=!1,c=!1,o="",l=0;function f(){if(i&&!c)for(;n.length;)delete a[n.pop()];else n=[];i=!1,c=!1}var y,p,w;function d(D){if(typeof D=="string"&&(D=D.split(Ce,2)),!j(D)||D.length!==2)throw new Error("Invalid tags: "+D);y=new RegExp(N(D[0])+"\\s*"),p=new RegExp("\\s*"+N(D[1])),w=new RegExp("\\s*"+N("}"+D[1]))}d(e||C.tags);for(var u=new R(s),E,h,v,m,b,k;!u.eos();){if(E=u.pos,v=u.scanUntil(y),v)for(var T=0,W=v.length;T<W;++T)m=v.charAt(T),me(m)?(n.push(a.length),o+=m):(c=!0,t=!0,o+=" "),a.push(["text",m,E,E+1]),E+=1,m===`
|
|
2
2
|
`&&(f(),o="",l=0,t=!1);if(!u.scan(y))break;if(i=!0,h=u.scan(be)||"name",u.scan(ke),h==="="?(v=u.scanUntil(A),u.scan(A),u.scanUntil(p)):h==="{"?(v=u.scanUntil(w),u.scan(De),u.scanUntil(p),h="&"):v=u.scanUntil(p),!u.scan(p))throw new Error("Unclosed tag at "+u.pos);if(h==">"?b=[h,v,E,u.pos,o,l,t]:b=[h,v,E,u.pos],l++,a.push(b),h==="#"||h==="^")r.push(b);else if(h==="/"){if(k=r.pop(),!k)throw new Error('Unopened section "'+v+'" at '+E);if(k[1]!==v)throw new Error('Unclosed section "'+k[1]+'" at '+E)}else h==="name"||h==="{"||h==="&"?c=!0:h==="="&&d(v)}if(f(),k=r.pop(),k)throw new Error('Unclosed section "'+k[1]+'" at '+u.pos);return Se(je(a))}function je(s){for(var e=[],t,r,a=0,n=s.length;a<n;++a)t=s[a],t&&(t[0]==="text"&&r&&r[0]==="text"?(r[1]+=t[1],r[3]=t[3]):(e.push(t),r=t));return e}function Se(s){for(var e=[],t=e,r=[],a,n,i=0,c=s.length;i<c;++i)switch(a=s[i],a[0]){case"#":case"^":t.push(a),r.push(a),t=a[4]=[];break;case"/":n=r.pop(),n[5]=a[2],t=r.length>0?r[r.length-1][4]:e;break;default:t.push(a)}return e}function R(s){this.string=s,this.tail=s,this.pos=0}R.prototype.eos=function(){return this.tail===""};R.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};R.prototype.scanUntil=function(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=r.length,r};function P(s,e){this.view=s,this.cache={".":this.view},this.parent=e}P.prototype.push=function(e){return new P(e,this)};P.prototype.lookup=function(e){var t=this.cache,r;if(t.hasOwnProperty(e))r=t[e];else{for(var a=this,n,i,c,o=!1;a;){if(e.indexOf(".")>0)for(n=a.view,i=e.split("."),c=0;n!=null&&c<i.length;)c===i.length-1&&(o=Q(n,i[c])||ve(n,i[c])),n=n[i[c++]];else n=a.view[e],o=Q(a.view,e);if(o){r=n;break}a=a.parent}t[e]=r}return K(r)&&(r=r.call(this.view)),r};function g(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}g.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};g.prototype.parse=function(e,t){var r=this.templateCache,a=e+":"+(t||C.tags).join(":"),n=typeof r<"u",i=n?r.get(a):void 0;return i==null&&(i=Pe(e,t),n&&r.set(a,i)),i};g.prototype.render=function(e,t,r,a){var n=this.getConfigTags(a),i=this.parse(e,n),c=t instanceof P?t:new P(t,void 0);return this.renderTokens(i,c,r,e,a)};g.prototype.renderTokens=function(e,t,r,a,n){for(var i="",c,o,l,f=0,y=e.length;f<y;++f)l=void 0,c=e[f],o=c[0],o==="#"?l=this.renderSection(c,t,r,a,n):o==="^"?l=this.renderInverted(c,t,r,a,n):o===">"?l=this.renderPartial(c,t,r,n):o==="&"?l=this.unescapedValue(c,t):o==="name"?l=this.escapedValue(c,t,n):o==="text"&&(l=this.rawValue(c)),l!==void 0&&(i+=l);return i};g.prototype.renderSection=function(e,t,r,a,n){var i=this,c="",o=t.lookup(e[1]);function l(p){return i.render(p,t,r,n)}if(o){if(j(o))for(var f=0,y=o.length;f<y;++f)c+=this.renderTokens(e[4],t.push(o[f]),r,a,n);else if(typeof o=="object"||typeof o=="string"||typeof o=="number")c+=this.renderTokens(e[4],t.push(o),r,a,n);else if(K(o)){if(typeof a!="string")throw new Error("Cannot use higher-order sections without the original template");o=o.call(t.view,a.slice(e[3],e[5]),l),o!=null&&(c+=o)}else c+=this.renderTokens(e[4],t,r,a,n);return c}};g.prototype.renderInverted=function(e,t,r,a,n){var i=t.lookup(e[1]);if(!i||j(i)&&i.length===0)return this.renderTokens(e[4],t,r,a,n)};g.prototype.indentPartial=function(e,t,r){for(var a=t.replace(/[^ \t]/g,""),n=e.split(`
|
|
3
3
|
`),i=0;i<n.length;i++)n[i].length&&(i>0||!r)&&(n[i]=a+n[i]);return n.join(`
|
|
4
4
|
`)};g.prototype.renderPartial=function(e,t,r,a){if(r){var n=this.getConfigTags(a),i=K(r)?r(e[1]):r[e[1]];if(i!=null){var c=e[6],o=e[5],l=e[4],f=i;o==0&&l&&(f=this.indentPartial(i,l,c));var y=this.parse(f,n);return this.renderTokens(y,t,r,f,a)}}};g.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(r!=null)return r};g.prototype.escapedValue=function(e,t,r){var a=this.getConfigEscape(r)||C.escape,n=t.lookup(e[1]);if(n!=null)return typeof n=="number"&&a===C.escape?String(n):a(n)};g.prototype.rawValue=function(e){return e[1]};g.prototype.getConfigTags=function(e){return j(e)?e:e&&typeof e=="object"?e.tags:void 0};g.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!j(e))return e.escape};var C={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(s){S.templateCache=s},get templateCache(){return S.templateCache}},S=new g;C.clearCache=function(){return S.clearCache()};C.parse=function(e,t){return S.parse(e,t)};C.render=function(e,t,r,a){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+de(e)+'" was given as the first argument for mustache#render(template, view, partials)');return S.render(e,t,r,a)};C.escape=xe;C.Scanner=R;C.Context=P;C.Writer=g;export{Be as P,C as m,We as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as V,p as B,aG as E,A as C,aT as R,aU as O,aV as h,aN as A,aR as x,N as P,l as j}from"./parse-sections-
|
|
1
|
+
import{k as V,p as B,aG as E,A as C,aT as R,aU as O,aV as h,aN as A,aR as x,N as P,l as j}from"./parse-sections-qa9uMkWq.js";function W(e,n){const t=n.pages===1?e("sectionsEditor.namedRuleUses.countPageOne"):n.pages>1?e("sectionsEditor.namedRuleUses.countPages",{count:String(n.pages)}):null,o=n.sections===1?e("sectionsEditor.namedRuleUses.countSectionOne"):n.sections>1?e("sectionsEditor.namedRuleUses.countSections",{count:String(n.sections)}):null,s=t&&o?e("sectionsEditor.namedRuleUses.countBoth",{pages:t,sections:o}):t??o;return s?{places:s,one:n.pages+n.sections===1}:null}const k=()=>({weak:new WeakMap,strong:new Map,has:!1}),v=new Map;function d(e,n,t){let o=v.get(e)??k();v.set(e,o);for(const s of n){const i=typeof s=="object"&&s!==null||typeof s=="function";let a=i?o.weak.get(s):o.strong.get(s);a||(a=k(),i?o.weak.set(s,a):o.strong.set(s,a)),o=a}return o.has||(o.value=t(),o.has=!0),o.value}function D(e){return d("uses",[e.decofile,e.meta,e.changeCount,e.sides],()=>L(e))}function L(e){const n=R(e.decofile,e.meta),t=e.changeCount===0?e.decofile:e.sides?O(e.decofile,e.sides):null;if(t===null)return{refs:h(n,n),published:null};const o=t===e.decofile?n:R(t,e.meta);return{refs:h(n,o),published:t}}const F=e=>e.length===0||e.length===1&&e[0]==="section";function _(e){const n=e[0]==="section"?e.slice(1):e;return n[0]==="variants"&&typeof n[1]=="number"?n[1]:void 0}function y(e,n){return n&&F(e)?n.index:_(e)}function z(e,n,t){if(e==="section"){const l=y(t?.containerPath??n,t);return l===void 0?{}:{variant:l}}const o=t?.containerPath??n;if(o[0]!=="sections")return{};if(t&&o.length===1)return{pageVariant:t.index};let s=o.slice(1),i;s[0]==="variants"&&typeof s[1]=="number"&&(i=s[1],s=s.slice(2),s[0]==="value"&&(s=s.slice(1)),s[0]==="value"&&(s=s.slice(1)));const a=i===void 0?{}:{pageVariant:i},[c,...u]=s;if(typeof c!="number")return a;a.section=c;const r=y(u,t);return r!==void 0&&(a.variant=r),a}function I(e,n,t,o,s){const i=r=>U(r,e,o,s),a=[],c=new Set,u=r=>{const l=w(r);c.has(l)||(c.add(l),a.push(r))};if(t===null){for(const r of e.refs[n].wholeBlock)u({blockKey:r.blockKey,...i(r.blockKey),wholeBlock:!0,state:r.state});return g(a)}for(const r of e.refs[n].byName.get(t)??[]){if(r.savedRule)continue;const l=i(r.blockKey),f=z(l.blockKind,r.path,r.variant),b=l.blockKind==="page"?T(r.blockKey,f,r.state,e,o):void 0;u({blockKey:r.blockKey,...l,...r.variant?{variant:r.variant.index+1}:{},...b?{section:b}:{},focus:f,wholeBlock:!1,state:r.state})}return g(a)}function w(e){const n=e.focus??{};return[e.blockKey,n.pageVariant??"",n.section??"",e.variant??"",e.wholeBlock].join("#")}function T(e,n,t,o,s){if(n.section===void 0)return;const i=t!=="removed-in-draft"&&e in s?s:o.published??s,a=V(i,e,n.pageVariant??0),c=B(a,i,!0)[n.section];return c?c.variantOf??c.label:void 0}function U(e,n,t,o){const s=t[e]??(n.published?n.published[e]:void 0),i=E(e,s,o);if(i)return{blockKind:"page",title:i.name,path:i.path};const a=s&&typeof s=="object"&&!Array.isArray(s)?s:{};return{blockKind:"section",title:C(G(e),a)}}function g(e){const n=t=>t.state==="removed-in-draft"?1:0;return e.sort((t,o)=>n(t)-n(o)||t.title.localeCompare(o.title)||(t.focus?.pageVariant??0)-(o.focus?.pageVariant??0)||(t.focus?.section??0)-(o.focus?.section??0)||(t.variant??0)-(o.variant??0))}function m(e,n,t){return d("missing",[e,t,n],()=>{const o=A(t,n);if(o.kind==="conflict")return[];const s=[];for(const[i,a]of e.refs[n].byName)x(o,i)||a.some(c=>c.state!=="removed-in-draft")&&s.push(i);return s})}function q(e,n,t,o){return N(e,n,t,o).rows}function J(e,n,t,o){return N(e,n,t,o).names}function N(e,n,t,o){return d("missingRows",[e,t,o,n],()=>{const s=[],i=new Set;let a=0;for(const c of m(e,n,t)){let u=!1;for(const r of I(e,n,c,t,o)){if(r.state==="removed-in-draft")continue;u=!0;const l=w(r);i.has(l)||(i.add(l),s.push(r))}u&&a++}return{rows:g(s),names:a}})}function K(e){return P.filter(n=>j(e,n)==="available")}function p(e,n){return D({decofile:e,meta:n,changeCount:0,sides:void 0})}function Q(e,n){return d("blocksUsingMissing",[e,n],()=>{const t=new Map,o=K(n);if(o.length===0)return t;const s=p(e,n);for(const i of o)for(const a of m(s,i,e))for(const c of s.refs[i].byName.get(a)??[]){const u=t.get(c.blockKey)??[];u.includes(i)||u.push(i),t.set(c.blockKey,u)}return t})}function X(e,n){return d("missingUseCounts",[e,n],()=>{const t=new Map,o=K(n);if(o.length===0)return t;const s=p(e,n);for(const i of o){const a=new Set;let c=0;for(const r of m(s,i,e)){let l=!1;for(const f of s.refs[i].byName.get(r)??[])f.savedRule||(a.add(f.blockKey),l=!0);l&&c++}const u=M(a,s,e,n);u.pages+u.sections>0&&t.set(i,{...u,names:c})}return t})}function Y(e,n,t){return S(e,n,t).size}function Z(e,n,t,o){const s=p(e,n);return M(S(s,t,o),s,e,n)}function S(e,n,t){const o=new Set;for(const s of e.refs[n].byName.get(t)??[])s.savedRule||s.state==="removed-in-draft"||o.add(s.blockKey);return o}function M(e,n,t,o){const s={pages:0,sections:0};for(const i of e)U(i,n,t,o).blockKind==="page"?s.pages++:s.sections++;return s}function G(e){try{return decodeURIComponent(e)}catch{return e}}export{w as a,Q as b,Z as c,D as d,q as e,J as f,I as g,Y as h,X as m,W as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N,j as m,B as P,b as C,l as J,z as Q,r as M,t as B,v as ee,I as W,q as te,D as se}from"./index-CMKEBGKX.js";import{i as ne}from"./ArrowLeft-DPa6sZRI.js";import{B as z}from"./badge-Xi0bu-aJ.js";import{L as ae}from"./label-8_hsm0_y.js";import{aN as j,aP as L,aS as X,aX as le,l as ie,aY as oe,aZ as re}from"./parse-sections-CvCJ7mYl.js";import{p as Y,z as Z,d as de}from"./blocks-tab-states-BG-MFk9Q.js";import{s as ce}from"./Trash01-CTrNlbT8.js";import{a as me,n as ue,c as fe,d as xe,e as ge,f as pe,g as A}from"./named-rule-uses-u1am7LRC.js";import{ar as he,as as K,u as ve,D as Re,ag as Ne,ac as be}from"./site-editor-toast-hxv14akZ.js";import{b as je}from"./ZoomOut-DKNOmfuK.js";import{a as we}from"./UserSquare-CZXKi88L.js";import{u as ye}from"./use-apply-named-rule-D8uSRmIc.js";const Xe="p-4";function Ye(s){const e=N.c(14),{intro:t,back:n,actions:l}=s;let d;e[0]!==l?(d=l?m.jsx("div",{className:"flex shrink-0 items-center gap-2","data-slot":"view-actions",children:l}):null,e[0]=l,e[1]=d):d=e[1];const r=d;if(n){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(ne,{size:16}),e[2]=i):i=e[2];let c;e[3]!==n.label||e[4]!==n.onClick?(c=m.jsxs(P,{variant:"ghost",size:"sm",onClick:n.onClick,children:[i,n.label]}),e[3]=n.label,e[4]=n.onClick,e[5]=c):c=e[5];let u;return e[6]!==r||e[7]!==c?(u=m.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4","data-testid":"site-draft-view-header",children:[c,r]}),e[6]=r,e[7]=c,e[8]=u):u=e[8],u}let o;e[9]!==t?(o=m.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:t}),e[9]=t,e[10]=o):o=e[10];let a;return e[11]!==r||e[12]!==o?(a=m.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 pt-4","data-testid":"site-draft-view-header",children:[o,r]}),e[11]=r,e[12]=o,e[13]=a):a=e[13],a}function Ce(s,e,t,n){const l=j(s,e);return l.kind==="conflict"?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ee(s,e,t,n){const l=j(s,e);if(l.kind==="conflict")return{problem:"conflict"};const d=Y(t,Object.keys(l.values));return d?{problem:d}:{change:Ce(s,e,t.trim(),n)}}function Ue(s,e,t){const n=j(s,e);return n.kind!=="saved"||!Object.hasOwn(n.block,t)?null:{writes:{[L(e).blockKey]:le(n.block,t)}}}function Se(s,e,t,n){if(n===void 0)return null;const l=j(s,e);return l.kind==="conflict"||Object.hasOwn(l.block,t)?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ze(s,e,t,n){if(!s)return null;const l=j(s,e);return l.kind!=="saved"||!Object.hasOwn(l.values,t)?"new":ke(l.values[t],n)?"published":"changed"}function Ge(s,e,t){if(!s)return;const n=j(s,e);if(n.kind==="saved")return n.values[t]}function Je(s,e,t){if(!e)return[];const n=j(e,t);if(n.kind!=="saved")return[];const l=j(s,t),d=l.kind==="conflict"?{}:l.values;return Object.keys(n.values).filter(r=>!Object.hasOwn(d,r))}function ke(s,e){return typeof s=="number"||typeof e=="number"?s===e:q(s.start,e.start)&&q(s.end,e.end)}function q(s,e){return s===void 0||e===void 0?s===e:s===e||new Date(s).getTime()===new Date(e).getTime()}function Qe(s){const e=N.c(21),{kind:t,rows:n,wholeRows:l,loading:d,marked:r,onOpen:o}=s,a=C(),i=t==="experiments";let c;e[0]!==a?(c=a("sectionsEditor.namedRuleUses.title"),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==c?(u=m.jsx("h3",{className:"text-sm font-medium",children:c}),e[2]=c,e[3]=u):u=e[3];let f;e[4]!==d||e[5]!==r||e[6]!==o||e[7]!==n||e[8]!==a||e[9]!==i?(f=d?m.jsx("p",{className:"text-sm text-muted-foreground",children:a("sectionsEditor.namedRuleUses.loading")}):n.length===0?m.jsx("p",{className:"text-sm text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.emptyTests":"sectionsEditor.namedRuleUses.emptyCampaigns")}):m.jsx(F,{rows:n,marked:r,onOpen:o}),e[4]=d,e[5]=r,e[6]=o,e[7]=n,e[8]=a,e[9]=i,e[10]=f):f=e[10];let x;e[11]!==r||e[12]!==o||e[13]!==a||e[14]!==i||e[15]!==l?(x=l.length>0&&m.jsxs("div",{className:"mt-3 flex flex-col gap-1",children:[m.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTests":"sectionsEditor.namedRuleUses.wholeCampaigns")}),m.jsx("p",{className:"text-xs text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTestsHint":"sectionsEditor.namedRuleUses.wholeCampaignsHint")}),m.jsx(F,{rows:l,marked:r,onOpen:o})]}),e[11]=r,e[12]=o,e[13]=a,e[14]=i,e[15]=l,e[16]=x):x=e[16];let g;return e[17]!==u||e[18]!==f||e[19]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-used-by",children:[u,f,x]}),e[17]=u,e[18]=f,e[19]=x,e[20]=g):g=e[20],g}function F(s){const e=N.c(11),{rows:t,marked:n,onOpen:l}=s,d=C();let r;if(e[0]!==n||e[1]!==l||e[2]!==t||e[3]!==d){let a;e[5]!==n||e[6]!==l||e[7]!==d?(a=i=>{const c=i.blockKind==="page"?we:je,u=i.state==="removed-in-draft";return m.jsxs("li",{className:"flex items-center gap-3 px-3 py-2","data-use-state":i.state,children:[m.jsx(c,{size:14,className:"shrink-0 text-muted-foreground"}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:J("truncate text-sm",u&&"text-muted-foreground line-through"),children:i.title}),m.jsx("p",{className:"truncate text-xs text-muted-foreground",children:[i.path,i.section,i.variant?d("sectionsEditor.namedRuleUses.variant",{index:String(i.variant)}):null].filter(Boolean).join(" · ")})]}),n&&i.state==="draft-only"&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.draftOnly")}),n&&u&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.removed")}),l&&!u&&m.jsxs(P,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(i),children:[d("sectionsEditor.namedRuleUses.open"),m.jsx(Q,{size:14})]})]},me(i))},e[5]=n,e[6]=l,e[7]=d,e[8]=a):a=e[8],r=t.map(a),e[0]=n,e[1]=l,e[2]=t,e[3]=d,e[4]=r}else r=e[4];let o;return e[9]!==r?(o=m.jsx("ul",{className:"divide-y divide-border/60 rounded-md border border-border/60",children:r}),e[9]=r,e[10]=o):o=e[10],o}function Oe(s){const e=N.c(12),{kind:t,rows:n,names:l,onOpen:d}=s,r=C();if(n.length===0)return null;let o;e[0]!==t||e[1]!==l||e[2]!==r?(o=r(t==="experiments"?l===1?"sectionsEditor.namedRuleUses.missingTestOne":"sectionsEditor.namedRuleUses.missingTests":l===1?"sectionsEditor.namedRuleUses.missingCampaignOne":"sectionsEditor.namedRuleUses.missingCampaigns"),e[0]=t,e[1]=l,e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=m.jsx("p",{className:"text-sm text-muted-foreground",children:o}),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==d||e[7]!==n?(i=m.jsx(F,{rows:n,marked:!1,onOpen:d}),e[6]=d,e[7]=n,e[8]=i):i=e[8];let c;return e[9]!==a||e[10]!==i?(c=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-missing-uses",children:[a,i]}),e[9]=a,e[10]=i,e[11]=c):c=e[11],c}function De({kind:s,name:e,meta:t,pending:n,apply:l,reread:d,onDeleted:r,onUndo:o}){const a=C(),i=s==="experiments",[c,u]=M.useState(!1),f=async()=>{const p=await d();return p||B.info(a("sectionsEditor.namedRules.unavailable"),{...K,description:a("sectionsEditor.namedRules.unavailableHint")}),p},x=async p=>{const h=await f();if(!h)return;const R=Se(h,s,e,p);if(R){o(R);return}const y=j(h,s).kind==="conflict";B.info(a(y?"sectionsEditor.namedRules.changedMeanwhile":"sectionsEditor.namedRules.alreadyBack"),{...K,description:a(y?"sectionsEditor.namedRules.changedMeanwhileHint":"sectionsEditor.namedRules.alreadyBackHint")})},g=async()=>{u(!0);let p;try{p=await f()}finally{u(!1)}if(!p)return;const h=Ue(p,s,e);if(!h)return;const R=j(p,s),y=R.kind==="saved"?R.block[e]:void 0,v=ue(a,fe(p,t,s,e));(await l(h)).ok&&(r(),B.success(i?a("experiments.v8.deleted",{name:e}):a("sandbox.dateCampaigns.deleted",{name:e}),{id:he,description:v?.one?a("sectionsEditor.namedRuleDelete.stillUsedOne",{places:v.places}):v?a("sectionsEditor.namedRuleDelete.stillUsed",{places:v.places}):a(i?"experiments.v8.deletedHint":"sandbox.dateCampaigns.deletedHint"),action:{label:a("sectionsEditor.namedRules.undo"),onClick:()=>{x(y)}}}))};return m.jsxs(P,{type:"button",variant:"ghost",size:"sm",disabled:n||c,onClick:()=>{g()},children:[m.jsx(ce,{size:16}),a(i?"experiments.v8.delete":"sandbox.dateCampaigns.delete")]})}function Te(s){const e=N.c(11);let t;e[0]!==s.branch||e[1]!==s.orgSlug||e[2]!==s.virtualMcpId?(t={orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch},e[0]=s.branch,e[1]=s.orgSlug,e[2]=s.virtualMcpId,e[3]=t):t=e[3];const n=t,l=ve(s.virtualMcpId,s.branch),d=Re(n),r=Ne(l,d||null),o=be(l,d||null,r.data);if(!s.decofile)return null;let a;e[4]!==r.data?(a=r.data?Object.keys(r.data.changes).length:void 0,e[4]=r.data,e[5]=a):a=e[5];const i=o.data?.entries;let c;return e[6]!==s.decofile||e[7]!==s.meta||e[8]!==a||e[9]!==i?(c=xe({decofile:s.decofile,meta:s.meta,changeCount:a,sides:i}),e[6]=s.decofile,e[7]=s.meta,e[8]=a,e[9]=i,e[10]=c):c=e[10],c}function U(s,e){return e==="experiments"?{new:s("experiments.v8.new"),usedBy:t=>s("experiments.v8.usedBy",{count:String(t)}),notUsed:s("experiments.v8.notUsed"),stateNew:s("experiments.v8.state.new"),stateChanged:s("experiments.v8.state.changed"),removedTitle:s("experiments.v8.removedTitle"),removedHint:s("experiments.v8.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdTest",{name:t}),renamed:t=>s("experiments.v8.renamed",{name:t}),renameHint:s("experiments.v8.renameHint"),renameWholeHint:s("experiments.v8.renameWholeHint")}:{new:s("sandbox.dateCampaigns.new"),usedBy:t=>s("sandbox.dateCampaigns.usedBy",{count:String(t)}),notUsed:s("sandbox.dateCampaigns.notUsed"),stateNew:s("sandbox.dateCampaigns.state.new"),stateChanged:s("sandbox.dateCampaigns.state.changed"),removedTitle:s("sandbox.dateCampaigns.removedTitle"),removedHint:s("sandbox.dateCampaigns.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdCampaign",{name:t}),renamed:t=>s("sandbox.dateCampaigns.renamed",{name:t}),renameHint:s("sandbox.dateCampaigns.renameHint"),renameWholeHint:s("sandbox.dateCampaigns.renameWholeHint")}}function He(s,e,t){const n=ie(e,t);return n!=="available"?n:j(s,t).kind==="conflict"?"conflict":null}function et(s,e){const t=N.c(48),n=C(),{orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a}=e;let i;t[0]!==r||t[1]!==o||t[2]!==a||t[3]!==l||t[4]!==d?(i={orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a},t[0]=r,t[1]=o,t[2]=a,t[3]=l,t[4]=d,t[5]=i):i=t[5];const c=Te(i);let u;t[6]!==r||t[7]!==l||t[8]!==d?(u={orgSlug:l,virtualMcpId:d,branch:r},t[6]=r,t[7]=l,t[8]=d,t[9]=u):u=t[9];const{apply:f,reread:x,planStored:g,isPending:p}=ye(u),[h,R]=M.useState(null),[y,v]=M.useState(!1);let E;t[10]!==f||t[11]!==n?(E=async(b,_)=>{const T=_===void 0?n("sectionsEditor.namedRules.saved"):_;if(!b)return!1;const H=await f(b);return H.ok&&B.success(T,{...K,description:n("sectionsEditor.namedRules.savedHint")}),H.ok},t[10]=f,t[11]=n,t[12]=E):E=t[12];const w=E;let I;t[13]!==o||t[14]!==s||t[15]!==w||t[16]!==n?(I=b=>{if(b.kind!==s||!b.create)return;const _=b.kind==="experiments"?b.create.share:b.create.window,T=Ee(o,s,b.name,_);if(!("change"in T)){B.info(T.problem==="conflict"?n("sectionsEditor.namedRules.changedMeanwhile"):Z(n,T.problem),K);return}const H=b.name.trim();w(T.change,U(n,s).created(H)).then(G=>{G&&(v(!1),R(H))})},t[13]=o,t[14]=s,t[15]=w,t[16]=n,t[17]=I):I=t[17];const V=I;let S;t[18]!==o||t[19]!==s||t[20]!==a?(S=He(o,a,s),t[18]=o,t[19]=s,t[20]=a,t[21]=S):S=t[21];let k;t[22]!==o||t[23]!==s||t[24]!==a||t[25]!==c?(k=c?ge(c,s,o,a):[],t[22]=o,t[23]=s,t[24]=a,t[25]=c,t[26]=k):k=t[26];let O;t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==c?(O=c?pe(c,s,o,a):0,t[27]=o,t[28]=s,t[29]=a,t[30]=c,t[31]=O):O=t[31];let D;t[32]!==w?(D=b=>{w(b)},t[32]=w,t[33]=D):D=t[33];let $;return t[34]!==f||t[35]!==V||t[36]!==y||t[37]!==p||t[38]!==h||t[39]!==g||t[40]!==x||t[41]!==w||t[42]!==S||t[43]!==k||t[44]!==O||t[45]!==D||t[46]!==c?($={uses:c,apply:f,reread:x,planStored:g,isPending:p,openName:h,setOpenName:R,creating:y,setCreating:v,blocked:S,missing:k,missingNames:O,save:w,create:V,undo:D},t[34]=f,t[35]=V,t[36]=y,t[37]=p,t[38]=h,t[39]=g,t[40]=x,t[41]=w,t[42]=S,t[43]=k,t[44]=O,t[45]=D,t[46]=c,t[47]=$):$=t[47],$}function tt(s){const e=N.c(23),{kind:t,open:n,onOpenChange:l,existingNames:d,pending:r,onCreate:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];let c;e[3]!==i.new?(c=m.jsx(ee,{className:"sr-only",children:i.new}),e[3]=i.new,e[4]=c):c=e[4];let u;e[5]!==a?(u=a("sectionsEditor.namedRules.create"),e[5]=a,e[6]=u):u=e[6];let f;e[7]!==l?(f=()=>l(!1),e[7]=l,e[8]=f):f=e[8];let x;e[9]!==d||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==u||e[14]!==f?(x=m.jsx(de,{kind:t,initialName:"",existingNames:d,pending:r,submitLabel:u,dismiss:"cancel",standalone:!0,onBack:f,onSubmit:o}),e[9]=d,e[10]=t,e[11]=o,e[12]=r,e[13]=u,e[14]=f,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=m.jsxs(te,{className:"p-0 sm:max-w-md",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let p;return e[19]!==l||e[20]!==n||e[21]!==g?(p=m.jsx(se,{open:n,onOpenChange:l,children:g}),e[19]=l,e[20]=n,e[21]=g,e[22]=p):p=e[22],p}function st(s){const e=N.c(14),{kind:t,missing:n,missingNames:l,removed:d,onOpenUse:r}=s,o=C();let a;e[0]!==t||e[1]!==o?(a=U(o,t),e[0]=t,e[1]=o,e[2]=a):a=e[2];const i=a;let c;e[3]!==t||e[4]!==n||e[5]!==l||e[6]!==r?(c=m.jsx(Oe,{kind:t,rows:n,names:l,onOpen:r}),e[3]=t,e[4]=n,e[5]=l,e[6]=r,e[7]=c):c=e[7];let u;e[8]!==i||e[9]!==d?(u=d.length>0&&m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-sm font-medium",children:i.removedTitle}),m.jsx("p",{className:"text-xs text-muted-foreground",children:i.removedHint}),m.jsx("ul",{className:"text-sm text-muted-foreground",children:d.map(Be)})]}),e[8]=i,e[9]=d,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==u?(f=m.jsxs(m.Fragment,{children:[c,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f}function Be(s){return m.jsx("li",{className:"line-through",children:s},s)}function nt(s,e,t){const n=U(s,e);return t>0?n.usedBy(t):n.notUsed}function Ie(s){const e=N.c(7),{kind:t,state:n,changed:l}=s,d=l===void 0?!0:l,r=C();let o;e[0]!==t||e[1]!==r?(o=U(r,t),e[0]=t,e[1]=r,e[2]=o):o=e[2];const a=o;if(n==="new"){let i;return e[3]!==a.stateNew?(i=m.jsx(z,{variant:"muted",children:a.stateNew}),e[3]=a.stateNew,e[4]=i):i=e[4],i}if(n==="changed"&&d){let i;return e[5]!==a.stateChanged?(i=m.jsx(z,{variant:"muted",children:a.stateChanged}),e[5]=a.stateChanged,e[6]=i):i=e[6],i}return null}function at(s){const e=N.c(9),{kind:t,name:n,status:l,entryState:d}=s;let r;e[0]!==n?(r=m.jsx("h2",{className:"text-lg font-semibold",children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==d||e[3]!==t?(o=m.jsx(Ie,{kind:t,state:d,changed:!1}),e[2]=d,e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==l||e[6]!==r||e[7]!==o?(a=m.jsxs("div",{className:"flex items-center gap-3",children:[r,l,o]}),e[5]=l,e[6]=r,e[7]=o,e[8]=a):a=e[8],a}function lt(s){const e=N.c(9),{kind:t,detail:n}=s;let l;return e[0]!==n.apply||e[1]!==n.meta||e[2]!==n.onDeleted||e[3]!==n.onUndo||e[4]!==n.pending||e[5]!==n.reread||e[6]!==n.row.name||e[7]!==t?(l=m.jsx(De,{kind:t,name:n.row.name,meta:n.meta,pending:n.pending,apply:n.apply,reread:n.reread,onDeleted:n.onDeleted,onUndo:n.onUndo}),e[0]=n.apply,e[1]=n.meta,e[2]=n.onDeleted,e[3]=n.onUndo,e[4]=n.pending,e[5]=n.reread,e[6]=n.row.name,e[7]=t,e[8]=l):l=e[8],l}function it(s,e,t){return{row:e,decofile:t.decofile,meta:t.meta,uses:s.uses,pending:s.isPending,onBack:()=>s.setOpenName(null),onOpenUse:t.onOpenUse,onSave:s.save,onRenamed:s.setOpenName,apply:s.apply,reread:s.reread,planStored:s.planStored,onDeleted:()=>s.setOpenName(null),onUndo:s.undo}}function ot(s,e,t,n,l){return{useRows:t?A(t,s,e,n,l):[],wholeRows:t?A(t,s,null,n,l):[]}}function rt(s,e){const t=N.c(23),n=C(),l=e.row.name,[d,r]=M.useState(l);let o;t[0]!==d?(o=d.trim(),t[0]=d,t[1]=o):o=t[1];const a=o===l;let i,c,u,f,x,g;if(t[2]!==l||t[3]!==s||t[4]!==d||t[5]!==e||t[6]!==n||t[7]!==a){let R;t[14]!==l?(R=v=>v!==l,t[14]=l,t[15]=R):R=t[15];const y=oe(j(e.decofile,s)).filter(R);i=a?null:Y(d,y),c=async()=>{const v=d.trim();if(i||v===l)return;const E=await e.planStored(w=>re(w,s,l,v,e.meta));E&&await e.onSave(E,U(n,s).renamed(v))&&e.onRenamed(v)},u=l,f=d,x=r,g=i?Z(n,i):null,t[2]=l,t[3]=s,t[4]=d,t[5]=e,t[6]=n,t[7]=a,t[8]=i,t[9]=c,t[10]=u,t[11]=f,t[12]=x,t[13]=g}else i=t[8],c=t[9],u=t[10],f=t[11],x=t[12],g=t[13];const p=!!i||a;let h;return t[16]!==c||t[17]!==u||t[18]!==f||t[19]!==x||t[20]!==g||t[21]!==p?(h={savedName:u,name:f,setName:x,message:g,blocked:p,rename:c},t[16]=c,t[17]=u,t[18]=f,t[19]=x,t[20]=g,t[21]=p,t[22]=h):h=t[22],h}function dt(s){const e=N.c(19),{kind:t,id:n,rename:l,pending:d,wholeUses:r,locked:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];const c=i;let u;e[3]!==a?(u=a("sectionsEditor.namedRules.nameLabel"),e[3]=a,e[4]=u):u=e[4];let f;e[5]!==n||e[6]!==u?(f=m.jsx(ae,{htmlFor:n,children:u}),e[5]=n,e[6]=u,e[7]=f):f=e[7];let x;e[8]!==c||e[9]!==n||e[10]!==o||e[11]!==d||e[12]!==l||e[13]!==a||e[14]!==r?(x=o?m.jsxs(m.Fragment,{children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.savedName,readOnly:!0,disabled:!0}),o]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.name,onChange:p=>l.setName(p.target.value)}),m.jsx(P,{size:"sm",variant:"outline",disabled:d||l.blocked,onClick:()=>{l.rename()},children:a("sectionsEditor.namedRules.rename")})]}),l.message&&m.jsx("p",{className:"text-xs text-destructive",children:l.message}),m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameHint}),r>0&&m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameWholeHint})]}),e[8]=c,e[9]=n,e[10]=o,e[11]=d,e[12]=l,e[13]=a,e[14]=r,e[15]=x):x=e[15];let g;return e[16]!==f||e[17]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2",children:[f,x]}),e[16]=f,e[17]=x,e[18]=g):g=e[18],g}export{st as N,Xe as S,nt as a,Ie as b,rt as c,ot as d,at as e,dt as f,Ye as g,tt as h,lt as i,Qe as j,Ze as k,Ge as l,Je as m,it as n,Ce as p,et as u};
|
|
1
|
+
import{c as N,j as m,B as P,b as C,l as J,z as Q,r as M,t as B,v as ee,I as W,q as te,D as se}from"./index-DyYo9Tzb.js";import{i as ne}from"./ArrowLeft-o6iMnbNE.js";import{B as z}from"./badge-BsRLQum1.js";import{L as ae}from"./label-I4hMcj8q.js";import{aN as j,aP as L,aS as X,aX as le,l as ie,aY as oe,aZ as re}from"./parse-sections-qa9uMkWq.js";import{p as Y,z as Z,d as de}from"./blocks-tab-states-BDili_03.js";import{s as ce}from"./Trash01-C0MTVRPf.js";import{a as me,n as ue,c as fe,d as xe,e as ge,f as pe,g as A}from"./named-rule-uses-IzC6F6u2.js";import{ar as he,as as K,u as ve,D as Re,ag as Ne,ac as be}from"./site-editor-toast-_3UyGVXO.js";import{b as je}from"./ZoomOut-OMu4FTNj.js";import{a as we}from"./UserSquare-C9kie61X.js";import{u as ye}from"./use-apply-named-rule-BhihCRUb.js";const Xe="p-4";function Ye(s){const e=N.c(14),{intro:t,back:n,actions:l}=s;let d;e[0]!==l?(d=l?m.jsx("div",{className:"flex shrink-0 items-center gap-2","data-slot":"view-actions",children:l}):null,e[0]=l,e[1]=d):d=e[1];const r=d;if(n){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(ne,{size:16}),e[2]=i):i=e[2];let c;e[3]!==n.label||e[4]!==n.onClick?(c=m.jsxs(P,{variant:"ghost",size:"sm",onClick:n.onClick,children:[i,n.label]}),e[3]=n.label,e[4]=n.onClick,e[5]=c):c=e[5];let u;return e[6]!==r||e[7]!==c?(u=m.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4","data-testid":"site-draft-view-header",children:[c,r]}),e[6]=r,e[7]=c,e[8]=u):u=e[8],u}let o;e[9]!==t?(o=m.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:t}),e[9]=t,e[10]=o):o=e[10];let a;return e[11]!==r||e[12]!==o?(a=m.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 pt-4","data-testid":"site-draft-view-header",children:[o,r]}),e[11]=r,e[12]=o,e[13]=a):a=e[13],a}function Ce(s,e,t,n){const l=j(s,e);return l.kind==="conflict"?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ee(s,e,t,n){const l=j(s,e);if(l.kind==="conflict")return{problem:"conflict"};const d=Y(t,Object.keys(l.values));return d?{problem:d}:{change:Ce(s,e,t.trim(),n)}}function Ue(s,e,t){const n=j(s,e);return n.kind!=="saved"||!Object.hasOwn(n.block,t)?null:{writes:{[L(e).blockKey]:le(n.block,t)}}}function Se(s,e,t,n){if(n===void 0)return null;const l=j(s,e);return l.kind==="conflict"||Object.hasOwn(l.block,t)?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ze(s,e,t,n){if(!s)return null;const l=j(s,e);return l.kind!=="saved"||!Object.hasOwn(l.values,t)?"new":ke(l.values[t],n)?"published":"changed"}function Ge(s,e,t){if(!s)return;const n=j(s,e);if(n.kind==="saved")return n.values[t]}function Je(s,e,t){if(!e)return[];const n=j(e,t);if(n.kind!=="saved")return[];const l=j(s,t),d=l.kind==="conflict"?{}:l.values;return Object.keys(n.values).filter(r=>!Object.hasOwn(d,r))}function ke(s,e){return typeof s=="number"||typeof e=="number"?s===e:q(s.start,e.start)&&q(s.end,e.end)}function q(s,e){return s===void 0||e===void 0?s===e:s===e||new Date(s).getTime()===new Date(e).getTime()}function Qe(s){const e=N.c(21),{kind:t,rows:n,wholeRows:l,loading:d,marked:r,onOpen:o}=s,a=C(),i=t==="experiments";let c;e[0]!==a?(c=a("sectionsEditor.namedRuleUses.title"),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==c?(u=m.jsx("h3",{className:"text-sm font-medium",children:c}),e[2]=c,e[3]=u):u=e[3];let f;e[4]!==d||e[5]!==r||e[6]!==o||e[7]!==n||e[8]!==a||e[9]!==i?(f=d?m.jsx("p",{className:"text-sm text-muted-foreground",children:a("sectionsEditor.namedRuleUses.loading")}):n.length===0?m.jsx("p",{className:"text-sm text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.emptyTests":"sectionsEditor.namedRuleUses.emptyCampaigns")}):m.jsx(F,{rows:n,marked:r,onOpen:o}),e[4]=d,e[5]=r,e[6]=o,e[7]=n,e[8]=a,e[9]=i,e[10]=f):f=e[10];let x;e[11]!==r||e[12]!==o||e[13]!==a||e[14]!==i||e[15]!==l?(x=l.length>0&&m.jsxs("div",{className:"mt-3 flex flex-col gap-1",children:[m.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTests":"sectionsEditor.namedRuleUses.wholeCampaigns")}),m.jsx("p",{className:"text-xs text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTestsHint":"sectionsEditor.namedRuleUses.wholeCampaignsHint")}),m.jsx(F,{rows:l,marked:r,onOpen:o})]}),e[11]=r,e[12]=o,e[13]=a,e[14]=i,e[15]=l,e[16]=x):x=e[16];let g;return e[17]!==u||e[18]!==f||e[19]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-used-by",children:[u,f,x]}),e[17]=u,e[18]=f,e[19]=x,e[20]=g):g=e[20],g}function F(s){const e=N.c(11),{rows:t,marked:n,onOpen:l}=s,d=C();let r;if(e[0]!==n||e[1]!==l||e[2]!==t||e[3]!==d){let a;e[5]!==n||e[6]!==l||e[7]!==d?(a=i=>{const c=i.blockKind==="page"?we:je,u=i.state==="removed-in-draft";return m.jsxs("li",{className:"flex items-center gap-3 px-3 py-2","data-use-state":i.state,children:[m.jsx(c,{size:14,className:"shrink-0 text-muted-foreground"}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:J("truncate text-sm",u&&"text-muted-foreground line-through"),children:i.title}),m.jsx("p",{className:"truncate text-xs text-muted-foreground",children:[i.path,i.section,i.variant?d("sectionsEditor.namedRuleUses.variant",{index:String(i.variant)}):null].filter(Boolean).join(" · ")})]}),n&&i.state==="draft-only"&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.draftOnly")}),n&&u&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.removed")}),l&&!u&&m.jsxs(P,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(i),children:[d("sectionsEditor.namedRuleUses.open"),m.jsx(Q,{size:14})]})]},me(i))},e[5]=n,e[6]=l,e[7]=d,e[8]=a):a=e[8],r=t.map(a),e[0]=n,e[1]=l,e[2]=t,e[3]=d,e[4]=r}else r=e[4];let o;return e[9]!==r?(o=m.jsx("ul",{className:"divide-y divide-border/60 rounded-md border border-border/60",children:r}),e[9]=r,e[10]=o):o=e[10],o}function Oe(s){const e=N.c(12),{kind:t,rows:n,names:l,onOpen:d}=s,r=C();if(n.length===0)return null;let o;e[0]!==t||e[1]!==l||e[2]!==r?(o=r(t==="experiments"?l===1?"sectionsEditor.namedRuleUses.missingTestOne":"sectionsEditor.namedRuleUses.missingTests":l===1?"sectionsEditor.namedRuleUses.missingCampaignOne":"sectionsEditor.namedRuleUses.missingCampaigns"),e[0]=t,e[1]=l,e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=m.jsx("p",{className:"text-sm text-muted-foreground",children:o}),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==d||e[7]!==n?(i=m.jsx(F,{rows:n,marked:!1,onOpen:d}),e[6]=d,e[7]=n,e[8]=i):i=e[8];let c;return e[9]!==a||e[10]!==i?(c=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-missing-uses",children:[a,i]}),e[9]=a,e[10]=i,e[11]=c):c=e[11],c}function De({kind:s,name:e,meta:t,pending:n,apply:l,reread:d,onDeleted:r,onUndo:o}){const a=C(),i=s==="experiments",[c,u]=M.useState(!1),f=async()=>{const p=await d();return p||B.info(a("sectionsEditor.namedRules.unavailable"),{...K,description:a("sectionsEditor.namedRules.unavailableHint")}),p},x=async p=>{const h=await f();if(!h)return;const R=Se(h,s,e,p);if(R){o(R);return}const y=j(h,s).kind==="conflict";B.info(a(y?"sectionsEditor.namedRules.changedMeanwhile":"sectionsEditor.namedRules.alreadyBack"),{...K,description:a(y?"sectionsEditor.namedRules.changedMeanwhileHint":"sectionsEditor.namedRules.alreadyBackHint")})},g=async()=>{u(!0);let p;try{p=await f()}finally{u(!1)}if(!p)return;const h=Ue(p,s,e);if(!h)return;const R=j(p,s),y=R.kind==="saved"?R.block[e]:void 0,v=ue(a,fe(p,t,s,e));(await l(h)).ok&&(r(),B.success(i?a("experiments.v8.deleted",{name:e}):a("sandbox.dateCampaigns.deleted",{name:e}),{id:he,description:v?.one?a("sectionsEditor.namedRuleDelete.stillUsedOne",{places:v.places}):v?a("sectionsEditor.namedRuleDelete.stillUsed",{places:v.places}):a(i?"experiments.v8.deletedHint":"sandbox.dateCampaigns.deletedHint"),action:{label:a("sectionsEditor.namedRules.undo"),onClick:()=>{x(y)}}}))};return m.jsxs(P,{type:"button",variant:"ghost",size:"sm",disabled:n||c,onClick:()=>{g()},children:[m.jsx(ce,{size:16}),a(i?"experiments.v8.delete":"sandbox.dateCampaigns.delete")]})}function Te(s){const e=N.c(11);let t;e[0]!==s.branch||e[1]!==s.orgSlug||e[2]!==s.virtualMcpId?(t={orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch},e[0]=s.branch,e[1]=s.orgSlug,e[2]=s.virtualMcpId,e[3]=t):t=e[3];const n=t,l=ve(s.virtualMcpId,s.branch),d=Re(n),r=Ne(l,d||null),o=be(l,d||null,r.data);if(!s.decofile)return null;let a;e[4]!==r.data?(a=r.data?Object.keys(r.data.changes).length:void 0,e[4]=r.data,e[5]=a):a=e[5];const i=o.data?.entries;let c;return e[6]!==s.decofile||e[7]!==s.meta||e[8]!==a||e[9]!==i?(c=xe({decofile:s.decofile,meta:s.meta,changeCount:a,sides:i}),e[6]=s.decofile,e[7]=s.meta,e[8]=a,e[9]=i,e[10]=c):c=e[10],c}function U(s,e){return e==="experiments"?{new:s("experiments.v8.new"),usedBy:t=>s("experiments.v8.usedBy",{count:String(t)}),notUsed:s("experiments.v8.notUsed"),stateNew:s("experiments.v8.state.new"),stateChanged:s("experiments.v8.state.changed"),removedTitle:s("experiments.v8.removedTitle"),removedHint:s("experiments.v8.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdTest",{name:t}),renamed:t=>s("experiments.v8.renamed",{name:t}),renameHint:s("experiments.v8.renameHint"),renameWholeHint:s("experiments.v8.renameWholeHint")}:{new:s("sandbox.dateCampaigns.new"),usedBy:t=>s("sandbox.dateCampaigns.usedBy",{count:String(t)}),notUsed:s("sandbox.dateCampaigns.notUsed"),stateNew:s("sandbox.dateCampaigns.state.new"),stateChanged:s("sandbox.dateCampaigns.state.changed"),removedTitle:s("sandbox.dateCampaigns.removedTitle"),removedHint:s("sandbox.dateCampaigns.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdCampaign",{name:t}),renamed:t=>s("sandbox.dateCampaigns.renamed",{name:t}),renameHint:s("sandbox.dateCampaigns.renameHint"),renameWholeHint:s("sandbox.dateCampaigns.renameWholeHint")}}function He(s,e,t){const n=ie(e,t);return n!=="available"?n:j(s,t).kind==="conflict"?"conflict":null}function et(s,e){const t=N.c(48),n=C(),{orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a}=e;let i;t[0]!==r||t[1]!==o||t[2]!==a||t[3]!==l||t[4]!==d?(i={orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a},t[0]=r,t[1]=o,t[2]=a,t[3]=l,t[4]=d,t[5]=i):i=t[5];const c=Te(i);let u;t[6]!==r||t[7]!==l||t[8]!==d?(u={orgSlug:l,virtualMcpId:d,branch:r},t[6]=r,t[7]=l,t[8]=d,t[9]=u):u=t[9];const{apply:f,reread:x,planStored:g,isPending:p}=ye(u),[h,R]=M.useState(null),[y,v]=M.useState(!1);let E;t[10]!==f||t[11]!==n?(E=async(b,_)=>{const T=_===void 0?n("sectionsEditor.namedRules.saved"):_;if(!b)return!1;const H=await f(b);return H.ok&&B.success(T,{...K,description:n("sectionsEditor.namedRules.savedHint")}),H.ok},t[10]=f,t[11]=n,t[12]=E):E=t[12];const w=E;let I;t[13]!==o||t[14]!==s||t[15]!==w||t[16]!==n?(I=b=>{if(b.kind!==s||!b.create)return;const _=b.kind==="experiments"?b.create.share:b.create.window,T=Ee(o,s,b.name,_);if(!("change"in T)){B.info(T.problem==="conflict"?n("sectionsEditor.namedRules.changedMeanwhile"):Z(n,T.problem),K);return}const H=b.name.trim();w(T.change,U(n,s).created(H)).then(G=>{G&&(v(!1),R(H))})},t[13]=o,t[14]=s,t[15]=w,t[16]=n,t[17]=I):I=t[17];const V=I;let S;t[18]!==o||t[19]!==s||t[20]!==a?(S=He(o,a,s),t[18]=o,t[19]=s,t[20]=a,t[21]=S):S=t[21];let k;t[22]!==o||t[23]!==s||t[24]!==a||t[25]!==c?(k=c?ge(c,s,o,a):[],t[22]=o,t[23]=s,t[24]=a,t[25]=c,t[26]=k):k=t[26];let O;t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==c?(O=c?pe(c,s,o,a):0,t[27]=o,t[28]=s,t[29]=a,t[30]=c,t[31]=O):O=t[31];let D;t[32]!==w?(D=b=>{w(b)},t[32]=w,t[33]=D):D=t[33];let $;return t[34]!==f||t[35]!==V||t[36]!==y||t[37]!==p||t[38]!==h||t[39]!==g||t[40]!==x||t[41]!==w||t[42]!==S||t[43]!==k||t[44]!==O||t[45]!==D||t[46]!==c?($={uses:c,apply:f,reread:x,planStored:g,isPending:p,openName:h,setOpenName:R,creating:y,setCreating:v,blocked:S,missing:k,missingNames:O,save:w,create:V,undo:D},t[34]=f,t[35]=V,t[36]=y,t[37]=p,t[38]=h,t[39]=g,t[40]=x,t[41]=w,t[42]=S,t[43]=k,t[44]=O,t[45]=D,t[46]=c,t[47]=$):$=t[47],$}function tt(s){const e=N.c(23),{kind:t,open:n,onOpenChange:l,existingNames:d,pending:r,onCreate:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];let c;e[3]!==i.new?(c=m.jsx(ee,{className:"sr-only",children:i.new}),e[3]=i.new,e[4]=c):c=e[4];let u;e[5]!==a?(u=a("sectionsEditor.namedRules.create"),e[5]=a,e[6]=u):u=e[6];let f;e[7]!==l?(f=()=>l(!1),e[7]=l,e[8]=f):f=e[8];let x;e[9]!==d||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==u||e[14]!==f?(x=m.jsx(de,{kind:t,initialName:"",existingNames:d,pending:r,submitLabel:u,dismiss:"cancel",standalone:!0,onBack:f,onSubmit:o}),e[9]=d,e[10]=t,e[11]=o,e[12]=r,e[13]=u,e[14]=f,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=m.jsxs(te,{className:"p-0 sm:max-w-md",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let p;return e[19]!==l||e[20]!==n||e[21]!==g?(p=m.jsx(se,{open:n,onOpenChange:l,children:g}),e[19]=l,e[20]=n,e[21]=g,e[22]=p):p=e[22],p}function st(s){const e=N.c(14),{kind:t,missing:n,missingNames:l,removed:d,onOpenUse:r}=s,o=C();let a;e[0]!==t||e[1]!==o?(a=U(o,t),e[0]=t,e[1]=o,e[2]=a):a=e[2];const i=a;let c;e[3]!==t||e[4]!==n||e[5]!==l||e[6]!==r?(c=m.jsx(Oe,{kind:t,rows:n,names:l,onOpen:r}),e[3]=t,e[4]=n,e[5]=l,e[6]=r,e[7]=c):c=e[7];let u;e[8]!==i||e[9]!==d?(u=d.length>0&&m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-sm font-medium",children:i.removedTitle}),m.jsx("p",{className:"text-xs text-muted-foreground",children:i.removedHint}),m.jsx("ul",{className:"text-sm text-muted-foreground",children:d.map(Be)})]}),e[8]=i,e[9]=d,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==u?(f=m.jsxs(m.Fragment,{children:[c,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f}function Be(s){return m.jsx("li",{className:"line-through",children:s},s)}function nt(s,e,t){const n=U(s,e);return t>0?n.usedBy(t):n.notUsed}function Ie(s){const e=N.c(7),{kind:t,state:n,changed:l}=s,d=l===void 0?!0:l,r=C();let o;e[0]!==t||e[1]!==r?(o=U(r,t),e[0]=t,e[1]=r,e[2]=o):o=e[2];const a=o;if(n==="new"){let i;return e[3]!==a.stateNew?(i=m.jsx(z,{variant:"muted",children:a.stateNew}),e[3]=a.stateNew,e[4]=i):i=e[4],i}if(n==="changed"&&d){let i;return e[5]!==a.stateChanged?(i=m.jsx(z,{variant:"muted",children:a.stateChanged}),e[5]=a.stateChanged,e[6]=i):i=e[6],i}return null}function at(s){const e=N.c(9),{kind:t,name:n,status:l,entryState:d}=s;let r;e[0]!==n?(r=m.jsx("h2",{className:"text-lg font-semibold",children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==d||e[3]!==t?(o=m.jsx(Ie,{kind:t,state:d,changed:!1}),e[2]=d,e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==l||e[6]!==r||e[7]!==o?(a=m.jsxs("div",{className:"flex items-center gap-3",children:[r,l,o]}),e[5]=l,e[6]=r,e[7]=o,e[8]=a):a=e[8],a}function lt(s){const e=N.c(9),{kind:t,detail:n}=s;let l;return e[0]!==n.apply||e[1]!==n.meta||e[2]!==n.onDeleted||e[3]!==n.onUndo||e[4]!==n.pending||e[5]!==n.reread||e[6]!==n.row.name||e[7]!==t?(l=m.jsx(De,{kind:t,name:n.row.name,meta:n.meta,pending:n.pending,apply:n.apply,reread:n.reread,onDeleted:n.onDeleted,onUndo:n.onUndo}),e[0]=n.apply,e[1]=n.meta,e[2]=n.onDeleted,e[3]=n.onUndo,e[4]=n.pending,e[5]=n.reread,e[6]=n.row.name,e[7]=t,e[8]=l):l=e[8],l}function it(s,e,t){return{row:e,decofile:t.decofile,meta:t.meta,uses:s.uses,pending:s.isPending,onBack:()=>s.setOpenName(null),onOpenUse:t.onOpenUse,onSave:s.save,onRenamed:s.setOpenName,apply:s.apply,reread:s.reread,planStored:s.planStored,onDeleted:()=>s.setOpenName(null),onUndo:s.undo}}function ot(s,e,t,n,l){return{useRows:t?A(t,s,e,n,l):[],wholeRows:t?A(t,s,null,n,l):[]}}function rt(s,e){const t=N.c(23),n=C(),l=e.row.name,[d,r]=M.useState(l);let o;t[0]!==d?(o=d.trim(),t[0]=d,t[1]=o):o=t[1];const a=o===l;let i,c,u,f,x,g;if(t[2]!==l||t[3]!==s||t[4]!==d||t[5]!==e||t[6]!==n||t[7]!==a){let R;t[14]!==l?(R=v=>v!==l,t[14]=l,t[15]=R):R=t[15];const y=oe(j(e.decofile,s)).filter(R);i=a?null:Y(d,y),c=async()=>{const v=d.trim();if(i||v===l)return;const E=await e.planStored(w=>re(w,s,l,v,e.meta));E&&await e.onSave(E,U(n,s).renamed(v))&&e.onRenamed(v)},u=l,f=d,x=r,g=i?Z(n,i):null,t[2]=l,t[3]=s,t[4]=d,t[5]=e,t[6]=n,t[7]=a,t[8]=i,t[9]=c,t[10]=u,t[11]=f,t[12]=x,t[13]=g}else i=t[8],c=t[9],u=t[10],f=t[11],x=t[12],g=t[13];const p=!!i||a;let h;return t[16]!==c||t[17]!==u||t[18]!==f||t[19]!==x||t[20]!==g||t[21]!==p?(h={savedName:u,name:f,setName:x,message:g,blocked:p,rename:c},t[16]=c,t[17]=u,t[18]=f,t[19]=x,t[20]=g,t[21]=p,t[22]=h):h=t[22],h}function dt(s){const e=N.c(19),{kind:t,id:n,rename:l,pending:d,wholeUses:r,locked:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];const c=i;let u;e[3]!==a?(u=a("sectionsEditor.namedRules.nameLabel"),e[3]=a,e[4]=u):u=e[4];let f;e[5]!==n||e[6]!==u?(f=m.jsx(ae,{htmlFor:n,children:u}),e[5]=n,e[6]=u,e[7]=f):f=e[7];let x;e[8]!==c||e[9]!==n||e[10]!==o||e[11]!==d||e[12]!==l||e[13]!==a||e[14]!==r?(x=o?m.jsxs(m.Fragment,{children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.savedName,readOnly:!0,disabled:!0}),o]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.name,onChange:p=>l.setName(p.target.value)}),m.jsx(P,{size:"sm",variant:"outline",disabled:d||l.blocked,onClick:()=>{l.rename()},children:a("sectionsEditor.namedRules.rename")})]}),l.message&&m.jsx("p",{className:"text-xs text-destructive",children:l.message}),m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameHint}),r>0&&m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameWholeHint})]}),e[8]=c,e[9]=n,e[10]=o,e[11]=d,e[12]=l,e[13]=a,e[14]=r,e[15]=x):x=e[15];let g;return e[16]!==f||e[17]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2",children:[f,x]}),e[16]=f,e[17]=x,e[18]=g):g=e[18],g}export{st as N,Xe as S,nt as a,Ie as b,rt as c,ot as d,at as e,dt as f,Ye as g,tt as h,lt as i,Qe as j,Ze as k,Ge as l,Je as m,it as n,Ce as p,et as u};
|
package/dist/client/assets/{new-project-dialog-DCNrhfVx.js → new-project-dialog-BT2t_SSj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,j as t,r as w,y as N,b as S,B as _,D as M,q as K,s as A,v as R,aN as E,I as T,l as V,t as $}from"./index-
|
|
1
|
+
import{c as y,j as t,r as w,y as N,b as S,B as _,D as M,q as K,s as A,v as R,aN as E,I as T,l as V,t as $}from"./index-DyYo9Tzb.js";import{i as B}from"./ArrowLeft-o6iMnbNE.js";import{s as F}from"./Plus-BDzIUMmX.js";import{L as H}from"./label-I4hMcj8q.js";import{R as L}from"./repository-import-picker-C73tcC8B.js";import{u as O}from"./use-navigate-to-agent-ORYVFAbZ.js";import{S as z}from"./thread-intent-jHkZEAkC.js";import{d as Z}from"./repository-binding-gq1GBtrT.js";const D={viewBox:"0 0 96 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},l={stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"};function q(a){const e=y.c(9),{className:n}=a;let r,o,s,c,i,u,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("path",{d:"M22 46V22",...l,opacity:.7}),o=t.jsx("circle",{cx:"22",cy:"18",r:"4",...l,opacity:.8}),s=t.jsx("circle",{cx:"22",cy:"50",r:"4",...l,opacity:.8}),c=t.jsx("path",{d:"M22 32h14a6 6 0 0 1 6 6v4",...l,opacity:.6}),i=t.jsx("circle",{cx:"42",cy:"46",r:"4",...l,opacity:.7}),u=t.jsx("path",{d:"M56 22h9l3 4h14a3 3 0 0 1 3 3v20a3 3 0 0 1-3 3H56a3 3 0 0 1-3-3V25a3 3 0 0 1 3-3Z",...l,opacity:.75}),h=t.jsx("path",{d:"M53 34h32",...l,opacity:.5}),e[0]=r,e[1]=o,e[2]=s,e[3]=c,e[4]=i,e[5]=u,e[6]=h):(r=e[0],o=e[1],s=e[2],c=e[3],i=e[4],u=e[5],h=e[6]);let d;return e[7]!==n?(d=t.jsxs("svg",{...D,className:n,children:[r,o,s,c,i,u,h]}),e[7]=n,e[8]=d):d=e[8],d}function I(a){const e=y.c(4),{className:n}=a;let r,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("path",{d:"M16 22a4 4 0 0 1 4-4h14l6 6h20a4 4 0 0 1 4 4v20a4 4 0 0 1-4 4H20a4 4 0 0 1-4-4V22Z",...l,opacity:.8}),o=t.jsx("path",{d:"M16 28h64",...l,opacity:.5}),e[0]=r,e[1]=o):(r=e[0],o=e[1]);let s;return e[2]!==n?(s=t.jsxs("svg",{...D,className:n,children:[r,o]}),e[2]=n,e[3]=s):s=e[3],s}function ie(a){const e=y.c(5),{className:n}=a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("g",{opacity:.55,children:[t.jsx("rect",{x:"46",y:"16",width:"128",height:"88",rx:"8",...l}),t.jsx("path",{d:"M46 34h128",...l,opacity:.6}),t.jsx("circle",{cx:"56",cy:"25",r:"2",fill:"currentColor",opacity:.6}),t.jsx("circle",{cx:"64",cy:"25",r:"2",fill:"currentColor",opacity:.45}),t.jsx("circle",{cx:"72",cy:"25",r:"2",fill:"currentColor",opacity:.3}),t.jsx("rect",{x:"58",y:"44",width:"104",height:"24",rx:"4",...l,opacity:.5}),t.jsx("rect",{x:"58",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.4}),t.jsx("rect",{x:"95",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.3}),t.jsx("rect",{x:"132",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.22})]}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("g",{transform:"rotate(-8 44 92)",children:[t.jsx("rect",{x:"22",y:"52",width:"44",height:"76",rx:"8",...l,fill:"var(--color-background)"}),t.jsx("path",{d:"M37 60h14",...l,opacity:.5}),t.jsx("rect",{x:"29",y:"68",width:"30",height:"20",rx:"3",...l,opacity:.45}),t.jsx("path",{d:"M29 96h30M29 104h20",...l,opacity:.35}),t.jsx("rect",{x:"29",y:"112",width:"30",height:"8",rx:"4",...l,opacity:.5})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("g",{transform:"rotate(10 168 104)",children:[t.jsx("path",{d:"M150 92h30a6 6 0 0 1 6 6v26a6 6 0 0 1-6 6h-30a6 6 0 0 1-6-6V98a6 6 0 0 1 6-6Z",...l,fill:"var(--color-background)"}),t.jsx("circle",{cx:"165",cy:"104",r:"3.5",...l}),t.jsx("path",{d:"M152 116h26M152 124h16",...l,opacity:.45})]}),e[2]=s):s=e[2];let c;return e[3]!==n?(c=t.jsxs("svg",{viewBox:"0 0 220 140",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:n,children:[r,o,s]}),e[3]=n,e[4]=c):c=e[4],c}const v=new z(!1);let k="unknown",P=null;function U(a,e){k=a,P=e?.onCreated??null,N("project_create_clicked",{source:a}),v.set(!0)}function le(){const a=y.c(2),e=w.useSyncExternalStore(v.subscribe,v.get);let n;return a[0]!==e?(n=[e,v.set],a[0]=e,a[1]=n):n=a[1],n}function C(a){const e=P;P=null,e?.(a)}function pe(){return k}const W={repository:{titleKey:"projects.new.path.repository",hintKey:"projects.new.path.repository.hint",art:q,plate:"bg-chart-5/10 group-hover:bg-chart-5/16",art_:"text-chart-5"},folder:{titleKey:"projects.new.path.folder",hintKey:"projects.new.path.folder.hint",art:I,plate:"bg-chart-1/10 group-hover:bg-chart-1/16",art_:"text-chart-1"}},G=["repository","folder"];function J(a){const e=y.c(25),{path:n,onSelect:r}=a,o=S(),s=W[n],c=s.art;let i;e[0]!==s.art_||e[1]!==s.plate?(i=V("flex h-28 items-center justify-center rounded-lg transition-colors",s.plate,s.art_),e[0]=s.art_,e[1]=s.plate,e[2]=i):i=e[2];let u;e[3]!==c?(u=t.jsx(c,{className:"h-20"}),e[3]=c,e[4]=u):u=e[4];let h;e[5]!==i||e[6]!==u?(h=t.jsx("span",{className:i,children:u}),e[5]=i,e[6]=u,e[7]=h):h=e[7];let d;e[8]!==s.titleKey||e[9]!==o?(d=o(s.titleKey),e[8]=s.titleKey,e[9]=o,e[10]=d):d=e[10];let x;e[11]!==d?(x=t.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),e[11]=d,e[12]=x):x=e[12];let f;e[13]!==s.hintKey||e[14]!==o?(f=o(s.hintKey),e[13]=s.hintKey,e[14]=o,e[15]=f):f=e[15];let j;e[16]!==f?(j=t.jsx("span",{className:"text-xs text-muted-foreground",children:f}),e[16]=f,e[17]=j):j=e[17];let m;e[18]!==x||e[19]!==j?(m=t.jsxs("span",{className:"flex flex-col gap-0.5 px-1 pb-1",children:[x,j]}),e[18]=x,e[19]=j,e[20]=m):m=e[20];let g;return e[21]!==r||e[22]!==h||e[23]!==m?(g=t.jsxs("button",{type:"button",onClick:r,className:"group flex flex-col gap-3 surface p-3 text-left focus-ring transition-[transform,background-color] duration-200 hover:-translate-y-0.5 hover:bg-accent motion-reduce:transition-none motion-reduce:hover:translate-y-0",children:[h,m]}),e[21]=r,e[22]=h,e[23]=m,e[24]=g):g=e[24],g}function Q(a){const e=y.c(8),{label:n,children:r,hint:o}=a;let s;e[0]!==n?(s=t.jsx(H,{children:n}),e[0]=n,e[1]=s):s=e[1];let c;e[2]!==o?(c=o&&t.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=c):c=e[3];let i;return e[4]!==r||e[5]!==s||e[6]!==c?(i=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[s,r,c]}),e[4]=r,e[5]=s,e[6]=c,e[7]=i):i=e[7],i}function he({open:a,onOpenChange:e,source:n="org_home"}){const r=S(),o=Z(),s=O(),[c,i]=w.useState(null),[u,h]=w.useState(""),[d,x]=w.useState(null),f=w.useRef(null),j=()=>{i(null),h(""),x(null)},m=()=>{e(!1),j()};if(c==="repository")return t.jsx(L,{open:!0,onOpenChange:p=>{p||m()},onImportComplete:({virtualMcpId:p})=>{p&&(C(p),s(p)),m()}});const g=async()=>{if(o.create.isPending)return;const p=u.trim();if(!p){x(r("projects.new.nameRequired"));return}try{const b=(await o.create.mutateAsync({title:p,description:null,status:"active",pinned:!1,connections:[],metadata:{instructions:null,project:{storeUrl:null},ui:{pinnedViews:null,layout:{defaultMainView:{type:"overview"},chatDefaultOpen:!0}}}}))?.id;N("project_created",{source:n,path:c}),m(),b&&(C(b),s(b)),$.success(r("projects.new.created",{title:p}))}catch{x(r("projects.new.failed"))}};return t.jsx(M,{open:a,onOpenChange:p=>{p?e(!0):m()},children:t.jsxs(K,{className:"sm:max-w-3xl",ref:f,onOpenAutoFocus:p=>{p.preventDefault(),f.current?.focus()},children:[t.jsxs(A,{children:[t.jsx(R,{children:r("projects.new.title")}),t.jsx(E,{children:r(c?"projects.new.step.folder.title":"projects.new.subtitle")})]}),c===null?t.jsx("div",{className:"grid grid-cols-1 gap-3 animate-in fade-in-0 duration-200 sm:grid-cols-2 motion-reduce:animate-none",children:G.map(p=>t.jsx(J,{path:p,onSelect:()=>{N("project_create_path_selected",{source:n,path:p}),i(p)}},p))}):t.jsxs("form",{className:"flex flex-col gap-4 animate-in fade-in-0 slide-in-from-right-2 duration-200 motion-reduce:animate-none",onSubmit:p=>{p.preventDefault(),x(null),g()},children:[t.jsx(Q,{label:r("projects.new.nameLabel"),children:t.jsx(T,{autoFocus:!0,value:u,onChange:p=>h(p.target.value),placeholder:r("projects.new.namePlaceholder")})}),d&&t.jsx("p",{className:"text-sm text-destructive",children:d}),t.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[t.jsxs(_,{type:"button",variant:"ghost",onClick:()=>j(),children:[t.jsx(B,{size:14}),r("projects.new.back")]}),t.jsx(_,{type:"submit",disabled:o.create.isPending,children:o.create.isPending?r("projects.new.creating"):r("projects.new.create")})]})]})]})})}function de(a){const e=y.c(11),{source:n,variant:r,size:o,label:s}=a,c=r===void 0?"default":r,i=o===void 0?"sm":o,u=S();let h;e[0]!==n?(h=()=>U(n),e[0]=n,e[1]=h):h=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(F,{size:14}),e[2]=d):d=e[2];let x;e[3]!==s||e[4]!==u?(x=s??u("projects.home.newProject"),e[3]=s,e[4]=u,e[5]=x):x=e[5];let f;return e[6]!==i||e[7]!==h||e[8]!==x||e[9]!==c?(f=t.jsxs(_,{size:i,variant:c,onClick:h,children:[d,x]}),e[6]=i,e[7]=h,e[8]=x,e[9]=c,e[10]=f):f=e[10],f}export{ie as E,de as N,he as a,pe as n,U as o,le as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,r as c,j as e,h as n}from"./index-
|
|
1
|
+
import{b as o,r as c,j as e,h as n}from"./index-DyYo9Tzb.js";import{h as u}from"./mcp-oauth-DSndhUBm.js";import"./auth-ClNhQHlU.js";function f(){const t=o(),[a,l]=c.useState(null),[r,i]=c.useState(!1);return c.useEffect(()=>{(async()=>{try{const s=await u();if(!s.success){l(s.error||t("routes.oauthCallback.authenticationFailed")),setTimeout(()=>{window.close()},3e3);return}i(!0),setTimeout(()=>{window.close()},1500)}catch(s){l(s instanceof Error?s.message:String(s)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!a&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{className:"size-8 text-primary"})}),a&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t(a?"routes.oauthCallback.authenticationFailedTitle":r?"routes.oauthCallback.authenticationSuccessfulTitle":"routes.oauthCallback.authenticationInProgressTitle")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:a?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:t("routes.oauthCallback.errorOccurred")}),e.jsx("p",{className:"text-destructive",children:a}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),t("routes.oauthCallback.windowClosingAutomatically")]})]}):r?e.jsxs("p",{children:[t("routes.oauthCallback.authenticationComplete"),e.jsx("br",{}),t("routes.oauthCallback.windowClosingAutomatically")]}):e.jsx("p",{children:t("routes.oauthCallback.processingAuthentication")})})]})]})})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as d,r as a,j as e,h}from"./index-
|
|
1
|
+
import{b as d,r as a,j as e,h}from"./index-DyYo9Tzb.js";function x(){const r=d(),[s,o]=a.useState("loading"),[l,u]=a.useState(null),c=a.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),i=t.get("code"),n=t.get("state");if(!i||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:i,stateToken:n},window.location.origin),o("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),u(t instanceof Error?t.message:String(t)),o("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(h,{className:"size-8 text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:r(s==="error"?"routes.oauthCallbackAiProvider.authFailed":s==="success"?"routes.oauthCallbackAiProvider.authSuccess":"routes.oauthCallbackAiProvider.authInProgress")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:r("routes.oauthCallbackAiProvider.errorOccurred")}),e.jsx("p",{className:"text-destructive",children:l}),e.jsx("p",{className:"mt-2",children:r("routes.oauthCallbackAiProvider.windowCloseAuto")})]}):s==="success"?e.jsx("p",{children:r("routes.oauthCallbackAiProvider.authCompleteCloseAuto")}):e.jsx("p",{children:r("routes.oauthCallbackAiProvider.processingAuth")})})]})]})})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ie,j as t,a as ye,h as ce,b as de,m as Ce,K as Oe,r as P,B as Ne,e as pe,x as ze,I as Le,l as ae,t as he}from"./index-CMKEBGKX.js";import{R as _e}from"./required-auth-layout-PhuA3Ewp.js";import{A as oe}from"./auth-split-layout-DyRJlWjB.js";import{O as Ee}from"./organization-choice-DbSR_Tq1.js";import{A as ve}from"./avatar-49aPXdv7.js";import{L as Ae}from"./label-8_hsm0_y.js";import{S as De}from"./switch-CWqn4x2S.js";import{t as Pe}from"./Building02-BbEppJaI.js";import{i as Re}from"./CheckCircle-Dlz5XR1a.js";import{t as Fe}from"./Globe04-rKrlqbJ3.js";import{i as Me}from"./Upload01-B9oMCz-6.js";import"./Plus-DXIMcQkQ.js";import"./User01-BgWUolo8.js";const $e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function xe(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function at(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(_e,{children:t.jsx(Te,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:o}=i;let a;e[0]!==o||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=n,e[2]=a):a=e[2];let f;e[3]!==b?(f=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:b}),e[3]=b,e[4]=f):f=e[4];let l;e[5]!==m?(l=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=l):l=e[6];let s;e[7]!==f||e[8]!==l?(s=t.jsxs("div",{className:"space-y-2",children:[f,l]}),e[7]=f,e[8]=l,e[9]=s):s=e[9];let j;return e[10]!==a||e[11]!==s?(j=t.jsxs("div",{className:"grid gap-10",children:[a,s]}),e[10]=a,e[11]=s,e[12]=j):j=e[12],j}function Te(){const i=ie.c(4),{data:e,isPending:b}=ye.useSession();if(b){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(ce,{className:"size-3.5 text-muted-foreground"})})}),i[0]=a):a=i[0],a}const m=e?.user?.email??"",n=e?.user?.name;let o;return i[1]!==n||i[2]!==m?(o=t.jsx(qe,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=o):o=i[3],o}function qe(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),o=b.split("@")[1]?.toLowerCase()??"",a=!!o&&!$e.has(o),f=o.split(".")[0]??"",l=f.charAt(0).toUpperCase()+f.slice(1);let s;e[0]!==l||e[1]!==a||e[2]!==m?(s=a?l:m?.split(" ")[0]??"",e[0]=l,e[1]=a,e[2]=m,e[3]=s):s=e[3];const j=s,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(o),queryFn:Be,enabled:a});let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=new Set,e[4]=g):g=e[4];const[_,M]=P.useState(g),[$,y]=P.useState(!1);if(v){let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=r):r=e[5],t.jsx(oe,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[r,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:o})})]})})}if(u){let r;e[6]!==w?(r=()=>w(),e[6]=w,e[7]=r):r=e[7];let d;e[8]!==n?(d=n("routes.onboarding.retry"),e[8]=n,e[9]=d):d=e[9];let h;return e[10]!==r||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:r,children:d}),e[10]=r,e[11]=d,e[12]=h):h=e[12],t.jsx(oe,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checkFailed",{domain:o})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Ke),A=N.some(Ie),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let r;e[16]!==m?(r=m?.split(" ")[0]??"",e[16]=m,e[17]=r):r=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==l||e[21]!==o||e[22]!==a||e[23]!==r||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:r,allowDomainClaim:!1,onBack:d}),e[20]=l,e[21]=o,e[22]=a,e[23]=r,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let r;e[26]!==p||e[27]!==N.length||e[28]!==n?(r=p?N.length===1?n("routes.onboarding.accessSingle"):n("routes.onboarding.accessMultiple"):n("routes.onboarding.requestAccess"),e[26]=p,e[27]=N.length,e[28]=n,e[29]=r):r=e[29];let d;e[30]!==p||e[31]!==n?(d=n(p?"routes.onboarding.emailMatchesOrg":"routes.onboarding.emailMatchesOrgApproval"),e[30]=p,e[31]=n,e[32]=d):d=e[32];let h;e[33]!==r||e[34]!==d?(h=t.jsx(fe,{title:r,description:d}),e[33]=r,e[34]=d,e[35]=h):h=e[35];let O;e[36]!==M?(O=R=>M(F=>new Set(F).add(R)),e[36]=M,e[37]=O):O=e[37];let C;e[38]!==N||e[39]!==o||e[40]!==_||e[41]!==O?(C=t.jsx(Ee,{organizations:N,domain:o,requestedSlugs:_,onRequestedSlug:O,onJoined:Ue}),e[38]=N,e[39]=o,e[40]=_,e[41]=O,e[42]=C):C=e[42];let z;e[43]!==y?(z=()=>y(!0),e[43]=y,e[44]=z):z=e[44];let E;e[45]!==n?(E=n("routes.onboarding.createNewOrg"),e[45]=n,e[46]=E):E=e[46];let k;e[47]!==E||e[48]!==z?(k=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:z,children:E}),e[47]=E,e[48]=z,e[49]=k):k=e[49];let L;return e[50]!==k||e[51]!==h||e[52]!==C?(L=t.jsx(oe,{children:t.jsxs("div",{className:"grid gap-10",children:[h,C,k]})}),e[50]=k,e[51]=h,e[52]=C,e[53]=L):L=e[53],L}let D;return e[54]!==j||e[55]!==l||e[56]!==o||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:j}),e[54]=j,e[55]=l,e[56]=o,e[57]=a,e[58]=D):D=e[58],D}function Ue(i,e){window.location.href=`/${e}`}function Ie(i){return i.joinMode==="auto"}function Ke(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Be(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function be(i){const e=ie.c(103),{isCorporateEmail:b,emailDomain:m,domainLabel:n,defaultName:o,allowDomainClaim:a,onBack:f}=i,l=a===void 0?!0:a,s=de(),j=b&&l?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(o),[u,w]=P.useState(j),[g,_]=P.useState(!0),[M,$]=P.useState(null);let y;e[0]!==g||e[1]!==u||e[2]!==c?(y=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.trim()||void 0,logo:u??void 0,claimDomain:g})}),S=await x.json();if(!x.ok||!S.success)throw new Error(S.error||"Failed to set up organization");return S},e[0]=g,e[1]=u,e[2]=c,e[3]=y):y=e[3];let N;e[4]!==g?(N=x=>{if(!x.slug)return;const S=we.filter(ke=>g||!ke.claimOnly).length,ne=Se*(S-1)+800;$(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},ne)},e[4]=g,e[5]=N):N=e[5];let A;e[6]!==y||e[7]!==N?(A={mutationFn:y,onSuccess:N},e[6]=y,e[7]=N,e[8]=A):A=e[8];const p=pe(A);let D;e[9]!==u||e[10]!==c?(D={mutationFn:async()=>{const x=c.trim(),S=xe(x);if(!S)throw new Error("Invalid organization name");const ne=await ye.organization.create({name:x,slug:S,...u?{logo:u}:{}});if(ne?.error)throw new Error(ne.error.message||"Failed to create organization");window.location.href=`/${ne?.data?.slug??S}`}},e[9]=u,e[10]=c,e[11]=D):D=e[11];const r=pe(D);if(p.isPending||M){let x;e[12]!==n||e[13]!==c?(x=c.trim()||n,e[12]=n,e[13]=c,e[14]=x):x=e[14];let S;return e[15]!==g||e[16]!==m||e[17]!==u||e[18]!==x?(S=t.jsx(oe,{children:t.jsx(Ge,{orgName:x,domain:m,claimDomain:g,logoUrl:u})}),e[15]=g,e[16]=m,e[17]=u,e[18]=x,e[19]=S):S=e[19],S}const d=r.isPending;let h;e[20]!==c?(h=xe(c.trim()),e[20]=c,e[21]=h):h=e[21];const O=!!h,C=p.error||r.error||null;let z;e[22]!==l||e[23]!==O||e[24]!==r||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&l?p.mutate():r.mutate())},e[22]=l,e[23]=O,e[24]=r,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==s?(k=s("routes.onboarding.welcomeTitle"),e[28]=s,e[29]=k):k=e[29];let L;e[30]!==s?(L=s("routes.onboarding.setupDescription"),e[30]=s,e[31]=L):L=e[31];let R;e[32]!==k||e[33]!==L?(R=t.jsx(fe,{title:k,description:L}),e[32]=k,e[33]=L,e[34]=R):R=e[34];let F;e[35]!==s?(F=s("routes.onboarding.orgAvatar"),e[35]=s,e[36]=F):F=e[36];let T;e[37]!==F?(T=t.jsx("p",{className:"text-sm font-medium",children:F}),e[37]=F,e[38]=T):T=e[38];let q;e[39]!==s?(q=s("routes.onboarding.optional"),e[39]=s,e[40]=q):q=e[40];let U;e[41]!==q?(U=t.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[41]=q,e[42]=U):U=e[42];let I;e[43]!==T||e[44]!==U?(I=t.jsxs("div",{className:"space-y-0.5",children:[T,U]}),e[43]=T,e[44]=U,e[45]=I):I=e[45];let K;e[46]!==o||e[47]!==c?(K=(c.trim()||o||"?").charAt(0).toUpperCase(),e[46]=o,e[47]=c,e[48]=K):K=e[48];const me=d||p.isPending;let B;e[49]!==u||e[50]!==K||e[51]!==me?(B=t.jsx(Je,{value:u,fallback:K,onChange:w,disabled:me}),e[49]=u,e[50]=K,e[51]=me,e[52]=B):B=e[52];let J;e[53]!==I||e[54]!==B?(J=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[I,B]}),e[53]=I,e[54]=B,e[55]=J):J=e[55];let G;e[56]!==s?(G=s("routes.onboarding.orgName"),e[56]=s,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ae,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let le;e[60]===Symbol.for("react.memo_cache_sentinel")?(le=x=>v(x.target.value),e[60]=le):le=e[60];let H;e[61]!==o||e[62]!==s?(H=o||s("routes.onboarding.myOrganizationPlaceholder"),e[61]=o,e[62]=s,e[63]=H):H=e[63];const ue=d||p.isPending;let Q;e[64]!==c||e[65]!==H||e[66]!==ue?(Q=t.jsx(Le,{id:"org-name",value:c,onChange:le,placeholder:H,disabled:ue,className:"h-10 max-w-[220px]"}),e[64]=c,e[65]=H,e[66]=ue,e[67]=Q):Q=e[67];let W;e[68]!==Y||e[69]!==Q?(W=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[Y,Q]}),e[68]=Y,e[69]=Q,e[70]=W):W=e[70];let V;e[71]!==l||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==s?(V=b&&l&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:s("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(De,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=l,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=s,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"surface divide-y divide-border",children:[J,W,V]}),e[79]=J,e[80]=W,e[81]=V,e[82]=X):X=e[82];let Z;e[83]!==C||e[84]!==s?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:s("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=s,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==s?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",s("routes.onboarding.creating")]}):s("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=s,e[89]=ee):ee=e[89];let te;e[90]!==ge||e[91]!==ee?(te=t.jsx(Ne,{type:"submit",size:"xl",className:"w-full",disabled:ge,children:ee}),e[90]=ge,e[91]=ee,e[92]=te):te=e[92];let se;e[93]!==f||e[94]!==s?(se=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:s("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=s,e[95]=se):se=e[95];let re;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==se?(re=t.jsx(oe,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,se]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=se,e[102]=re):re=e[102],re}function Je(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:o}=i,a=de(),f=P.useRef(null);let l;e[0]!==n||e[1]!==a?(l=M=>{const $=M.target.files?.[0];if(!$)return;if($.size>2097152){he.error(a("routes.onboarding.imageTooLarge")),f.current&&(f.current.value="");return}const y=new FileReader;y.onerror=()=>he.error(a("routes.onboarding.failedReadImage")),y.onloadend=()=>{y.result&&n(y.result),f.current&&(f.current.value="")},y.readAsDataURL($)},e[0]=n,e[1]=a,e[2]=l):l=e[2];const s=l;let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f.current?.click(),e[3]=j):j=e[3];let c;e[4]!==a?(c=a("routes.onboarding.uploadOrgLogo"),e[4]=a,e[5]=c):c=e[5];let v;e[6]!==o||e[7]!==s?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),e[6]=o,e[7]=s,e[8]=v):v=e[8];const u=b??void 0;let w;e[9]!==m||e[10]!==u?(w=t.jsx(ve,{url:u,fallback:m,shape:"square",size:"base"}),e[9]=m,e[10]=u,e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Me,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==o||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":c,children:[v,w,g]}),e[13]=o,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:Pe,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Fe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:ze,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0}],Se=1500,je=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Ge({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),o=we.filter(s=>b||!s.claimOnly),[a,f]=P.useState(0),l=P.useRef(!1);if(!l.current){l.current=!0;for(let s=1;s<o.length;s++)setTimeout(()=>f(s),Se*s)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(fe,{title:n("routes.onboarding.settingUp",{orgName:i}),description:n("routes.onboarding.gettingReady",{domain:e}),logoUrl:m??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:o.map((s,j)=>{const c=s.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(s.labelKey);return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:u||v?1:.4},children:[t.jsxs("span",{className:ae("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!u&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:u?{backgroundColor:w.bg,color:w.fg}:void 0,children:[t.jsx(Re,{size:16,className:ae("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",u?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(ce,{className:ae("absolute size-4","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0")}),t.jsx(c,{size:16,className:ae("absolute motion-safe:transition-opacity motion-safe:duration-200",!u&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:ae("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||u?"text-foreground":"text-muted-foreground"),children:g})]},s.labelKey)})})]})}export{at as default};
|
|
1
|
+
import{c as ie,j as t,a as ye,h as ce,b as de,m as Ce,K as Oe,r as P,B as Ne,e as pe,x as ze,I as Le,l as ae,t as he}from"./index-DyYo9Tzb.js";import{R as _e}from"./required-auth-layout-DZkKYp8M.js";import{A as oe}from"./auth-split-layout-d-6d2zKA.js";import{O as Ee}from"./organization-choice-C4lluOTa.js";import{A as ve}from"./avatar-CFIaQZRf.js";import{L as Ae}from"./label-I4hMcj8q.js";import{S as De}from"./switch-BhAC9EZR.js";import{t as Pe}from"./Building02-BHRxs6ob.js";import{i as Re}from"./CheckCircle-_6kE8J_Y.js";import{t as Fe}from"./Globe04-fNWMmp0g.js";import{i as Me}from"./Upload01-Bzv5xKwk.js";import"./Plus-BDzIUMmX.js";import"./User01-CWMwTWQs.js";const $e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function xe(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function at(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(_e,{children:t.jsx(Te,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:o}=i;let a;e[0]!==o||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=n,e[2]=a):a=e[2];let f;e[3]!==b?(f=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:b}),e[3]=b,e[4]=f):f=e[4];let l;e[5]!==m?(l=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=l):l=e[6];let s;e[7]!==f||e[8]!==l?(s=t.jsxs("div",{className:"space-y-2",children:[f,l]}),e[7]=f,e[8]=l,e[9]=s):s=e[9];let j;return e[10]!==a||e[11]!==s?(j=t.jsxs("div",{className:"grid gap-10",children:[a,s]}),e[10]=a,e[11]=s,e[12]=j):j=e[12],j}function Te(){const i=ie.c(4),{data:e,isPending:b}=ye.useSession();if(b){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(ce,{className:"size-3.5 text-muted-foreground"})})}),i[0]=a):a=i[0],a}const m=e?.user?.email??"",n=e?.user?.name;let o;return i[1]!==n||i[2]!==m?(o=t.jsx(qe,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=o):o=i[3],o}function qe(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),o=b.split("@")[1]?.toLowerCase()??"",a=!!o&&!$e.has(o),f=o.split(".")[0]??"",l=f.charAt(0).toUpperCase()+f.slice(1);let s;e[0]!==l||e[1]!==a||e[2]!==m?(s=a?l:m?.split(" ")[0]??"",e[0]=l,e[1]=a,e[2]=m,e[3]=s):s=e[3];const j=s,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(o),queryFn:Be,enabled:a});let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=new Set,e[4]=g):g=e[4];const[_,M]=P.useState(g),[$,y]=P.useState(!1);if(v){let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=r):r=e[5],t.jsx(oe,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[r,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:o})})]})})}if(u){let r;e[6]!==w?(r=()=>w(),e[6]=w,e[7]=r):r=e[7];let d;e[8]!==n?(d=n("routes.onboarding.retry"),e[8]=n,e[9]=d):d=e[9];let h;return e[10]!==r||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:r,children:d}),e[10]=r,e[11]=d,e[12]=h):h=e[12],t.jsx(oe,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checkFailed",{domain:o})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Ke),A=N.some(Ie),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let r;e[16]!==m?(r=m?.split(" ")[0]??"",e[16]=m,e[17]=r):r=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==l||e[21]!==o||e[22]!==a||e[23]!==r||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:r,allowDomainClaim:!1,onBack:d}),e[20]=l,e[21]=o,e[22]=a,e[23]=r,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let r;e[26]!==p||e[27]!==N.length||e[28]!==n?(r=p?N.length===1?n("routes.onboarding.accessSingle"):n("routes.onboarding.accessMultiple"):n("routes.onboarding.requestAccess"),e[26]=p,e[27]=N.length,e[28]=n,e[29]=r):r=e[29];let d;e[30]!==p||e[31]!==n?(d=n(p?"routes.onboarding.emailMatchesOrg":"routes.onboarding.emailMatchesOrgApproval"),e[30]=p,e[31]=n,e[32]=d):d=e[32];let h;e[33]!==r||e[34]!==d?(h=t.jsx(fe,{title:r,description:d}),e[33]=r,e[34]=d,e[35]=h):h=e[35];let O;e[36]!==M?(O=R=>M(F=>new Set(F).add(R)),e[36]=M,e[37]=O):O=e[37];let C;e[38]!==N||e[39]!==o||e[40]!==_||e[41]!==O?(C=t.jsx(Ee,{organizations:N,domain:o,requestedSlugs:_,onRequestedSlug:O,onJoined:Ue}),e[38]=N,e[39]=o,e[40]=_,e[41]=O,e[42]=C):C=e[42];let z;e[43]!==y?(z=()=>y(!0),e[43]=y,e[44]=z):z=e[44];let E;e[45]!==n?(E=n("routes.onboarding.createNewOrg"),e[45]=n,e[46]=E):E=e[46];let k;e[47]!==E||e[48]!==z?(k=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:z,children:E}),e[47]=E,e[48]=z,e[49]=k):k=e[49];let L;return e[50]!==k||e[51]!==h||e[52]!==C?(L=t.jsx(oe,{children:t.jsxs("div",{className:"grid gap-10",children:[h,C,k]})}),e[50]=k,e[51]=h,e[52]=C,e[53]=L):L=e[53],L}let D;return e[54]!==j||e[55]!==l||e[56]!==o||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:j}),e[54]=j,e[55]=l,e[56]=o,e[57]=a,e[58]=D):D=e[58],D}function Ue(i,e){window.location.href=`/${e}`}function Ie(i){return i.joinMode==="auto"}function Ke(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Be(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function be(i){const e=ie.c(103),{isCorporateEmail:b,emailDomain:m,domainLabel:n,defaultName:o,allowDomainClaim:a,onBack:f}=i,l=a===void 0?!0:a,s=de(),j=b&&l?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(o),[u,w]=P.useState(j),[g,_]=P.useState(!0),[M,$]=P.useState(null);let y;e[0]!==g||e[1]!==u||e[2]!==c?(y=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.trim()||void 0,logo:u??void 0,claimDomain:g})}),S=await x.json();if(!x.ok||!S.success)throw new Error(S.error||"Failed to set up organization");return S},e[0]=g,e[1]=u,e[2]=c,e[3]=y):y=e[3];let N;e[4]!==g?(N=x=>{if(!x.slug)return;const S=we.filter(ke=>g||!ke.claimOnly).length,ne=Se*(S-1)+800;$(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},ne)},e[4]=g,e[5]=N):N=e[5];let A;e[6]!==y||e[7]!==N?(A={mutationFn:y,onSuccess:N},e[6]=y,e[7]=N,e[8]=A):A=e[8];const p=pe(A);let D;e[9]!==u||e[10]!==c?(D={mutationFn:async()=>{const x=c.trim(),S=xe(x);if(!S)throw new Error("Invalid organization name");const ne=await ye.organization.create({name:x,slug:S,...u?{logo:u}:{}});if(ne?.error)throw new Error(ne.error.message||"Failed to create organization");window.location.href=`/${ne?.data?.slug??S}`}},e[9]=u,e[10]=c,e[11]=D):D=e[11];const r=pe(D);if(p.isPending||M){let x;e[12]!==n||e[13]!==c?(x=c.trim()||n,e[12]=n,e[13]=c,e[14]=x):x=e[14];let S;return e[15]!==g||e[16]!==m||e[17]!==u||e[18]!==x?(S=t.jsx(oe,{children:t.jsx(Ge,{orgName:x,domain:m,claimDomain:g,logoUrl:u})}),e[15]=g,e[16]=m,e[17]=u,e[18]=x,e[19]=S):S=e[19],S}const d=r.isPending;let h;e[20]!==c?(h=xe(c.trim()),e[20]=c,e[21]=h):h=e[21];const O=!!h,C=p.error||r.error||null;let z;e[22]!==l||e[23]!==O||e[24]!==r||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&l?p.mutate():r.mutate())},e[22]=l,e[23]=O,e[24]=r,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==s?(k=s("routes.onboarding.welcomeTitle"),e[28]=s,e[29]=k):k=e[29];let L;e[30]!==s?(L=s("routes.onboarding.setupDescription"),e[30]=s,e[31]=L):L=e[31];let R;e[32]!==k||e[33]!==L?(R=t.jsx(fe,{title:k,description:L}),e[32]=k,e[33]=L,e[34]=R):R=e[34];let F;e[35]!==s?(F=s("routes.onboarding.orgAvatar"),e[35]=s,e[36]=F):F=e[36];let T;e[37]!==F?(T=t.jsx("p",{className:"text-sm font-medium",children:F}),e[37]=F,e[38]=T):T=e[38];let q;e[39]!==s?(q=s("routes.onboarding.optional"),e[39]=s,e[40]=q):q=e[40];let U;e[41]!==q?(U=t.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[41]=q,e[42]=U):U=e[42];let I;e[43]!==T||e[44]!==U?(I=t.jsxs("div",{className:"space-y-0.5",children:[T,U]}),e[43]=T,e[44]=U,e[45]=I):I=e[45];let K;e[46]!==o||e[47]!==c?(K=(c.trim()||o||"?").charAt(0).toUpperCase(),e[46]=o,e[47]=c,e[48]=K):K=e[48];const me=d||p.isPending;let B;e[49]!==u||e[50]!==K||e[51]!==me?(B=t.jsx(Je,{value:u,fallback:K,onChange:w,disabled:me}),e[49]=u,e[50]=K,e[51]=me,e[52]=B):B=e[52];let J;e[53]!==I||e[54]!==B?(J=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[I,B]}),e[53]=I,e[54]=B,e[55]=J):J=e[55];let G;e[56]!==s?(G=s("routes.onboarding.orgName"),e[56]=s,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ae,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let le;e[60]===Symbol.for("react.memo_cache_sentinel")?(le=x=>v(x.target.value),e[60]=le):le=e[60];let H;e[61]!==o||e[62]!==s?(H=o||s("routes.onboarding.myOrganizationPlaceholder"),e[61]=o,e[62]=s,e[63]=H):H=e[63];const ue=d||p.isPending;let Q;e[64]!==c||e[65]!==H||e[66]!==ue?(Q=t.jsx(Le,{id:"org-name",value:c,onChange:le,placeholder:H,disabled:ue,className:"h-10 max-w-[220px]"}),e[64]=c,e[65]=H,e[66]=ue,e[67]=Q):Q=e[67];let W;e[68]!==Y||e[69]!==Q?(W=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[Y,Q]}),e[68]=Y,e[69]=Q,e[70]=W):W=e[70];let V;e[71]!==l||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==s?(V=b&&l&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:s("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(De,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=l,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=s,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"surface divide-y divide-border",children:[J,W,V]}),e[79]=J,e[80]=W,e[81]=V,e[82]=X):X=e[82];let Z;e[83]!==C||e[84]!==s?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:s("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=s,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==s?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",s("routes.onboarding.creating")]}):s("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=s,e[89]=ee):ee=e[89];let te;e[90]!==ge||e[91]!==ee?(te=t.jsx(Ne,{type:"submit",size:"xl",className:"w-full",disabled:ge,children:ee}),e[90]=ge,e[91]=ee,e[92]=te):te=e[92];let se;e[93]!==f||e[94]!==s?(se=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:s("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=s,e[95]=se):se=e[95];let re;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==se?(re=t.jsx(oe,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,se]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=se,e[102]=re):re=e[102],re}function Je(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:o}=i,a=de(),f=P.useRef(null);let l;e[0]!==n||e[1]!==a?(l=M=>{const $=M.target.files?.[0];if(!$)return;if($.size>2097152){he.error(a("routes.onboarding.imageTooLarge")),f.current&&(f.current.value="");return}const y=new FileReader;y.onerror=()=>he.error(a("routes.onboarding.failedReadImage")),y.onloadend=()=>{y.result&&n(y.result),f.current&&(f.current.value="")},y.readAsDataURL($)},e[0]=n,e[1]=a,e[2]=l):l=e[2];const s=l;let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f.current?.click(),e[3]=j):j=e[3];let c;e[4]!==a?(c=a("routes.onboarding.uploadOrgLogo"),e[4]=a,e[5]=c):c=e[5];let v;e[6]!==o||e[7]!==s?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),e[6]=o,e[7]=s,e[8]=v):v=e[8];const u=b??void 0;let w;e[9]!==m||e[10]!==u?(w=t.jsx(ve,{url:u,fallback:m,shape:"square",size:"base"}),e[9]=m,e[10]=u,e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Me,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==o||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":c,children:[v,w,g]}),e[13]=o,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:Pe,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Fe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:ze,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0}],Se=1500,je=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Ge({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),o=we.filter(s=>b||!s.claimOnly),[a,f]=P.useState(0),l=P.useRef(!1);if(!l.current){l.current=!0;for(let s=1;s<o.length;s++)setTimeout(()=>f(s),Se*s)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(fe,{title:n("routes.onboarding.settingUp",{orgName:i}),description:n("routes.onboarding.gettingReady",{domain:e}),logoUrl:m??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:o.map((s,j)=>{const c=s.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(s.labelKey);return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:u||v?1:.4},children:[t.jsxs("span",{className:ae("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!u&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:u?{backgroundColor:w.bg,color:w.fg}:void 0,children:[t.jsx(Re,{size:16,className:ae("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",u?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(ce,{className:ae("absolute size-4","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0")}),t.jsx(c,{size:16,className:ae("absolute motion-safe:transition-opacity motion-safe:duration-200",!u&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:ae("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||u?"text-foreground":"text-muted-foreground"),children:g})]},s.labelKey)})})]})}export{at as default};
|
package/dist/client/assets/{openai-conversation-D9oaPp7I.js → openai-conversation-uf-NaETi.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{e as J,f as B}from"./input-
|
|
1
|
+
import{e as J,f as B}from"./input-C2OmAhM5.js";import{aG as A,aH as _,d1 as C,aY as U,bW as W}from"./index-DyYo9Tzb.js";import"./usage-stats-BL4ux2To.js";import"./tool-namespace-B_9TZDnU.js";import"./form-MT3iZ1Vu.js";import"./label-I4hMcj8q.js";import"./utils-CVEq3hMx.js";import"./markdown-Djk34d4X.js";import"./use-copy-DURp1qxD.js";import"./Copy01-DHQGmb70.js";import"./ZoomOut-OMu4FTNj.js";import"./location-V0VwTJTt.js";import"./use-mobile-DIircfAX.js";import"./use-panel-navigate-D4lLfNFu.js";import"./thread-route-CLZvS5V9.js";import"./use-project-scope-B4y5G2Ei.js";import"./repository-binding-gq1GBtrT.js";import"./use-mcp-client-BqYCJLNH.js";import"./auth-ClNhQHlU.js";import"./tooltip-GaCwLmrY.js";import"./index-6KnUwzPl.js";import"./agent-icon-CkduijMR.js";import"./AlertCircle-CM8LBbRI.js";import"./Tool01-kEVQyvkb.js";import"./ArrowUp-BXMfywqx.js";import"./ArrowLeft-o6iMnbNE.js";import"./LinkBroken01-BGVU3ZYB.js";import"./ShoppingBag01-D8V6jyOF.js";import"./Building02-BHRxs6ob.js";import"./CheckCircle-_6kE8J_Y.js";import"./ChevronUp-CzyRtbYf.js";import"./ChevronSelectorVertical-Cxa072WE.js";import"./UserSquare-C9kie61X.js";import"./CreditCard01-h12_eEzi.js";import"./DotsVertical-Bq4P-tWv.js";import"./Image01-nc4SHYwM.js";import"./Globe04-fNWMmp0g.js";import"./SwitchHorizontal01-BkDZFUwe.js";import"./Key01-D-TFQCEV.js";import"./Link01-BXRKhx3s.js";import"./Minus-I9YJmaEA.js";import"./Monitor01-DKMgKH5T.js";import"./Sun-pq7DLIkN.js";import"./Play-DRKKkb6S.js";import"./Plus-BDzIUMmX.js";import"./SearchMd-DaDIzrN6.js";import"./Trash01-C0MTVRPf.js";import"./Upload01-Bzv5xKwk.js";import"./User01-CWMwTWQs.js";import"./Users01-wuFaBjJt.js";import"./XClose-BhvC0HDH.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-BTx6-qTi.js";import"./thread-intent-jHkZEAkC.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-FRqOQxvE.js";import"./task-board-DEUJ2XLS.js";import"./schema-CPwozgJP.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-BQpXrVMs.js";import"./autosend-B29qh5n2.js";import"./use-ai-providers-5JlPbZUZ.js";import"./use-organization-settings-CPceHw0I.js";import"./icon-button-Bt9yq8Xo.js";import"./file-type-icon-C1atr-sB.js";import"./shell-layout-B-nPBdqh.js";import"./avatar-CFIaQZRf.js";import"./use-clock-tick-BT2wKcdE.js";import"./command-BBdqXAPJ.js";import"./index-DnroRdaH.js";import"./integration-icon-DOchPlwn.js";import"./project-icon-COhPwkM1.js";import"./new-project-dialog-BT2t_SSj.js";import"./repository-import-picker-C73tcC8B.js";import"./use-navigate-to-agent-ORYVFAbZ.js";import"./repository-picker-B8wuJyRa.js";import"./useInfiniteQuery-D_Px4YIv.js";import"./infiniteQueryObserver-CuPmu1oh.js";import"./collection-search-cWsbRUjB.js";import"./use-debounced-value-upvagLL0.js";import"./required-auth-layout-DZkKYp8M.js";import"./use-org-sso-DN4ZiztH.js";import"./chat-draft-Bns-ELTf.js";import"./use-session-runtime-CqcbAAQE.js";import"./select-C-zh4izi.js";import"./index-BdQq_4o_.js";import"./tabs-B7U3KLHD.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-CKkvjPFp.js";import"./toggle-group-YVE3K8WT.js";import"./use-open-billing-url-DOXR78A2.js";import"./index-BMe2AVc3.js";import"./checkbox-1Jo3Rqz5.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-4xaDZJbI.js";import"./drawer-8XhEo4S9.js";import"./input-C_izEjEb.js";import"./suggestion-BreNkI7w.js";import"./use-mcp-prompts-DDgYwR7u.js";import"./use-org-fs-C7LGz1-C.js";import"./question-004-sINsf4GQ.js";import"./use-members-DjoUUKip.js";import"./use-org-auth-client-CIaaKZte.js";import"./feature-paywall-OwIX0f3G.js";import"./plan-ladder-a4C7BXTB.js";import"./add-connection-dialog-cxw9Vczu.js";import"./extract-connection-data-BJS9dJQe.js";import"./metadata-D72DunRR.js";import"./connection-DQvDlLfk.js";import"./url-slug-Q7mUdJTY.js";import"./connection-card-d-hDQNew.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Cv4TQOKa.js";import"./use-connection-RsX02h--.js";import"./schema-CTTxJoP_.js";import"./connection-form-helpers-BXv-epm5.js";import"./authenticate-and-persist-oauth-5jgv9Xa2.js";import"./mcp-oauth-7ZYfLtAb.js";import"./mcp-oauth-DSndhUBm.js";import"./collection-tabs-CD4jljvJ.js";import"./badge-BsRLQum1.js";import"./use-infinite-scroll-BwdSukxD.js";import"./useSuspenseInfiniteQuery-4o7EP3RX.js";import"./use-task-board-events-CzPazKvc.js";import"./use-chat-layout-state-BmbACNVo.js";class H{constructor(t,n=4e3){this.onDisconnect=t,this.graceMs=n}onDisconnect;graceMs;timer;report(t){if(t==="connected"){clearTimeout(this.timer),this.timer=void 0;return}if(t==="failed"||t==="closed"){clearTimeout(this.timer),this.timer=void 0,this.onDisconnect();return}t==="disconnected"&&!this.timer&&(this.timer=setTimeout(this.onDisconnect,this.graceMs))}dispose(){clearTimeout(this.timer),this.timer=void 0}}const X=A({type:W(["session.input_transcript.delta","session.output_transcript.delta"]),event_id:_(),delta:_(),start_ms:U().nonnegative(),end_ms:U().nonnegative()}),Y=A({type:C("session.delegation.created"),offset_ms:U().nonnegative(),delegation:A({id:_(),target:C("client")})});class ${constructor(t,n){this.send=t,this.callbacks=n}send;callbacks;closed=!1;fragments=[];seen=new Set;delegated=new Set;consumed=new Set;pending=new Map;contexts=new Map;awaitingContext=new Map;receive(t,n=Date.now()){if(this.closed)return;const r=X.safeParse(t);if(r.success){const e=r.data;if(this.seen.has(e.event_id))return;this.seen.add(e.event_id);const s=e.type==="session.input_transcript.delta"?"user":"agent";if(this.fragments.push({role:s,text:e.delta,start:e.start_ms,end:e.end_ms,arrivedAt:n,id:e.event_id}),this.fragments.sort((o,i)=>o.start-i.start),this.fragments.length>4e3){this.callbacks.onError();return}this.callbacks.onMessage({role:s,message:e.delta,event_id:e.event_id});return}const a=Y.safeParse(t);if(a.success){const{id:e}=a.data.delegation;if(this.delegated.has(e)||this.pending.has(e))return;if(this.delegated.size+this.pending.size>=40){this.callbacks.onError();return}this.pending.set(e,{offset:a.data.offset_ms,receivedAt:n});return}const m=A({type:C("session.thinking.appended"),client_event_id:_()}).safeParse(t);if(m.success){const e=m.data.client_event_id,s=this.awaitingContext.get(e);this.awaitingContext.delete(e),s&&(s.remaining.delete(e),s.remaining.size===0&&this.send({type:"session.commentary.append",event_id:crypto.randomUUID(),delegation_id:s.delegationId??null,content:"Studio has supplied the complete background result as context for this request. Briefly explain that result, including any failure or required approval. Acceptance or task creation alone does not mean the work completed."}));return}const p=A({type:_()}).safeParse(t);p.success&&p.data.type==="error"&&this.callbacks.onError()}tick(t=Date.now()){if(!this.closed)for(const[n,r]of this.pending){const a=this.fragments.filter(o=>o.start<r.offset),m=a.reduce((o,i)=>i.role==="user"?Math.max(o,i.arrivedAt):o,r.receivedAt);if(t-m<500)continue;const p=a.filter(o=>o.role==="user"&&!this.consumed.has(o.id));if(!p.length&&t-r.receivedAt<3e3)continue;if(this.pending.delete(n),this.delegated.add(n),!p.length){this.publishUpdate({delivery:"announce",delegationId:n,text:"No new transcribed request is available. No work was started. Ask the user to repeat the request."});continue}const e=p.map(o=>o.text).join("").trim(),s=[];for(const o of a){if(p.includes(o))continue;const i=s.at(-1);i?.role===o.role?i.text+=o.text:s.push({role:o.role,text:o.text})}if(e.length>J){this.publishUpdate({delivery:"announce",delegationId:n,text:"The spoken request is too long. No work was started. Ask the user to shorten it or continue in text."});continue}for(const o of p)this.consumed.add(o.id);this.callbacks.onDelegate({request:e,delegationId:n,transcript:B(s.map(({role:o,text:i})=>({role:o,text:i.trim()})).filter(({text:o})=>o))}).then(o=>{this.closed||this.publishUpdate({delivery:o.status==="rejected"?"announce":"context",delegationId:n,text:JSON.stringify(o)})}).catch(()=>{this.publishUpdate({delivery:"announce",delegationId:n,text:"Studio could not accept this request. Do not claim work started."})})}}publishUpdate(t){if(this.closed)return;if(t.contextId){if(this.contexts.get(t.contextId)===t.text)return;this.contexts.set(t.contextId,t.text)}const r=(t.contextId?`Updated ${t.contextId} data, superseding earlier values:
|
|
2
2
|
`:`Studio result data:
|
|
3
3
|
`)+t.text,a=new TextEncoder,m=t.delivery==="announce"&&a.encode(r).length>480,p={remaining:new Set,delegationId:t.delegationId};let e="",s=0;const o=()=>{if(!e)return;const i=crypto.randomUUID();m&&(p.remaining.add(i),this.awaitingContext.set(i,p)),this.send({type:t.delivery==="announce"&&!m?"session.commentary.append":"session.thinking.append",event_id:i,delegation_id:t.delegationId??null,content:e}),e="",s=0};for(const i of r){const v=a.encode(i).length;s+v>480&&o(),e+=i,s+=v}o()}close(){this.closed=!0,this.pending.clear(),this.awaitingContext.clear()}}async function go(E,t,n){n.throwIfAborted();const r=new RTCPeerConnection,a=r.createDataChannel("oai-events"),m=document.createElement("audio");m.autoplay=!0;let p,e,s,o,i=!1,v=!1,h,O,L=0,P=0,g,w,y=!1;const I=Promise.withResolvers(),x=Promise.withResolvers();x.promise.catch(()=>{});const b=new $(d=>{!i&&a.readyState==="open"&&a.send(JSON.stringify(d))},t),q=new H(()=>{i||t.onDisconnect()}),M=async()=>{if(!i){i=!0,q.dispose(),b.close(),clearInterval(O),n.removeEventListener("abort",T),a.close(),r.close();for(const d of p?.getTracks()??[])d.stop();m.pause(),m.srcObject=null,e&&e.state!=="closed"&&await e.close().catch(()=>{})}},T=()=>{M()};n.addEventListener("abort",T,{once:!0});const u=AbortSignal.any([n,AbortSignal.timeout(3e4)]),j=x.promise,z=()=>x.reject(u.reason);u.addEventListener("abort",z,{once:!0}),j.catch(()=>{}),a.onmessage=({data:d})=>{if(!(i||typeof d!="string"))try{const l=JSON.parse(d);typeof l=="object"&&l!==null&&"type"in l&&(l.type==="session.started"&&(v=!0,x.resolve()),l.type==="session.closed"&&(I.resolve(),h||t.onDisconnect())),h||b.receive(l)}catch{t.onError()}},a.onclose=()=>{x.reject(new Error("Voice connection closed")),I.resolve(),!i&&!h&&t.onDisconnect()},r.onconnectionstatechange=()=>{i||q.report(r.connectionState)},r.ontrack=({streams:d,track:l})=>{if(i)return;const D=d[0]??new MediaStream([l]);m.srcObject=D,e??=new AudioContext,s=e.createAnalyser(),s.fftSize=256,o=new Uint8Array(s.fftSize),e.createMediaStreamSource(D).connect(s),e.resume().catch(()=>t.onError()),m.play().catch(()=>t.onError())};function N(){if(!s||!o||i)return 0;s.getByteTimeDomainData(o);let d=0;for(const l of o)d+=((l-128)/128)**2;return Math.min(1,Math.sqrt(d/o.length)*4)}try{const d=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}).then(c=>{if(i||u.aborted){for(const f of c.getTracks())f.stop();throw new DOMException("Voice connection cancelled","AbortError")}return p=c,c}),l=await Promise.race([d,new Promise((c,f)=>u.addEventListener("abort",()=>f(u.reason),{once:!0}))]);e??=new AudioContext,g=e.createAnalyser(),g.fftSize=256,w=new Uint8Array(g.fftSize),e.createMediaStreamSource(l).connect(g),await e.resume();for(const c of l.getAudioTracks())r.addTrack(c,l);const D=await r.createOffer();await r.setLocalDescription(D),u.throwIfAborted(),r.iceGatheringState!=="complete"&&await new Promise((c,f)=>{const S=()=>{r.iceGatheringState==="complete"&&(G(),c())},k=()=>{G(),f(u.reason)},G=()=>{r.removeEventListener("icegatheringstatechange",S),u.removeEventListener("abort",k)};r.addEventListener("icegatheringstatechange",S),u.addEventListener("abort",k,{once:!0}),S(),u.aborted&&k()});const V=r.localDescription?.sdp;if(!V)throw new Error("Missing voice offer");const R=await E(V,u);return await r.setRemoteDescription({type:"answer",sdp:R.sdp}),await j,n.throwIfAborted(),u.removeEventListener("abort",z),n.removeEventListener("abort",T),t.onConnect(),O=setInterval(()=>{if(i||h)return;if(b.tick(),g&&w&&!y){g.getByteTimeDomainData(w);const f=w.reduce((S,k)=>S+((k-128)/128)**2,0)/w.length;Math.sqrt(f)>.025&&(P=Date.now())}t.onUserSpeaking(!y&&Date.now()-P<400),N()>.02&&(L=Date.now()),t.onModeChange({mode:Date.now()-L<400?"speaking":"listening"})},100),{endSession:()=>(h??=(async()=>{b.close();for(const c of p?.getTracks()??[])c.stop();if(m.pause(),v&&a.readyState==="open"){a.send(JSON.stringify({type:"session.close"}));let c;await Promise.race([I.promise,new Promise(f=>{c=setTimeout(f,3e3)})]),clearTimeout(c)}await M()})(),h),publishUpdate:c=>b.publishUpdate(c),setMicMuted:c=>{y=c;for(const f of p?.getAudioTracks()??[])f.enabled=!y;y&&t.onUserSpeaking(!1)},getOutputVolume:N}}catch(d){throw await M(),d}}export{go as startOpenAIConversation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a2 as f,m as S,K as y,o as v}from"./index-
|
|
1
|
+
import{c as a,a2 as f,m as S,K as y,o as v}from"./index-DyYo9Tzb.js";import{a as d}from"./use-project-native-view-presence-BvyTsGLr.js";function c(e,i){return y.optimisticProjectSidebarViews(e,i)}function l(e){return typeof e=="object"&&e!==null}function b(e,i){return e[1]===i&&e[3]==="collection"&&e[4]==="VIRTUAL_MCP"}function P(e,i){if(!l(e))return e;if("item"in e&&l(e.item)&&e.item.id===i.id)return{...e,item:i};if(!("structuredContent"in e)||!l(e.structuredContent))return e;const s=e.structuredContent.items;if(!Array.isArray(s))return e;let r=!1;const t=s.map(n=>!l(n)||n.id!==i.id?n:(r=!0,i));return r?{...e,structuredContent:{...e.structuredContent,items:t}}:e}function x(e,i,s){e.setQueriesData({predicate:r=>b(r.queryKey,i)},r=>P(r,s))}function A(e,i,s){const r=e.getQueriesData({predicate:t=>b(t.queryKey,i)&&t.queryKey[5]===s});for(const[,t]of r)if(t?.item?.id===s)return t.item;return null}function V(e,i,s){return e.getQueryData(c(i,s))??null}function j(e,i){if(i)return{sidebarViews:[...i.views],sidebarViewsVersion:d};const s=e?.sidebarViews;return{sidebarViews:s===null?null:s?[...s]:void 0,sidebarViewsVersion:e?.sidebarViewsVersion}}function K(e,i,s){return i?{sidebarViews:[...i.views],sidebarViewsVersion:d}:s===void 0?{sidebarViews:e.sidebarViews===null?null:e.sidebarViews?[...e.sidebarViews]:void 0,sidebarViewsVersion:e.sidebarViewsVersion}:j(s,null)}function p(e,i,s,r,t){const n=V(e,i,s),o={revision:(n?.revision??0)+1,views:[...r],rollbackViews:n?[...n.rollbackViews]:[...t]};return e.setQueryData(c(i,s),o),{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}}function C(e,i,s){const r=V(e,i,s);return r?{revision:r.revision,views:[...r.views],persistedViews:[...r.rollbackViews]}:null}function m(e,i){const s=new Set(e),r=new Set(i);return s.size===r.size&&[...s].every(t=>r.has(t))}function R(e){return e?!m(e.views,e.persistedViews):!1}function k(e,i,s,{snapshot:r,saved:t,authoritativeViews:n}){if(!r)return{settledLatest:!1,reconciledViews:null};const o=V(e,i,s);if(!o||r.revision>o.revision)return{settledLatest:!1,reconciledViews:null};const u=n!==void 0?[...n]:t?[...r.views]:null,w={...o,rollbackViews:u??o.rollbackViews};return w.rollbackViews!==o.rollbackViews&&e.setQueryData(c(i,s),w),r.revision!==o.revision?{settledLatest:!1,reconciledViews:null}:(e.setQueryData(c(i,s),null),{settledLatest:!0,reconciledViews:t?u&&!m(u,r.views)?u:null:[...w.rollbackViews]})}function _(e){const i=a.c(5),{org:s}=f(),r=e??"";let t;i[0]!==s.id||i[1]!==r?(t=c(s.id,r),i[0]=s.id,i[1]=r,i[2]=t):t=i[2];let n;i[3]!==t?(n={queryKey:t,queryFn:O,enabled:!1,staleTime:Number.POSITIVE_INFINITY},i[3]=t,i[4]=n):n=i[4];const{data:o}=S(n);return o?.views}async function O(){return null}function L(e){const i=a.c(4),{org:s}=f(),r=v();let t;return i[0]!==s||i[1]!==r||i[2]!==e?(t={stage:(n,o)=>p(r,s.id,e,n,o),snapshot:()=>C(r,s.id,e),settle:n=>k(r,s.id,e,n)},i[0]=s,i[1]=r,i[2]=e,i[3]=t):t=i[3],t}export{L as a,b,j as i,R as o,K as p,A as r,_ as u,x as w};
|