decocms 4.321.6 → 4.322.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CG7tfapy.js → AlertCircle-BFh6TEUY.js} +1 -1
- package/dist/client/assets/{AreaChart-CZiIuPwc.js → AreaChart-B156ZU4R.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Dexv6rHk.js → ArrowLeft-Cy_3-ZN_.js} +1 -1
- package/dist/client/assets/{ArrowUp-CxKA4POx.js → ArrowUp-C7FSaCXO.js} +1 -1
- package/dist/client/assets/{Check-Jn0qXgT0.js → Check-BG3Vn7Kp.js} +1 -1
- package/dist/client/assets/{CheckCircle-BnpxIwzg.js → CheckCircle-s46bCx17.js} +1 -1
- package/dist/client/assets/{ChevronRight-CKftPemQ.js → ChevronRight-BwMQ5MKg.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BPOo032l.js → ChevronSelectorVertical-in5gYEeG.js} +1 -1
- package/dist/client/assets/{ChevronUp-BCwuiyHj.js → ChevronUp-jmQP_hvc.js} +1 -1
- package/dist/client/assets/{Copy01-jXW2eGyY.js → Copy01-Bdnnn7C6.js} +1 -1
- package/dist/client/assets/{CreditCard01-Zn4AjX46.js → CreditCard01-Cy0jatNj.js} +1 -1
- package/dist/client/assets/{DotsVertical-C65YDOa_.js → DotsVertical-DI-Q43eH.js} +1 -1
- package/dist/client/assets/{Download01-BpcIjY9x.js → Download01-LWgG7Jcv.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-3KuuNxaa.js → ErrorBarContext-Da6V2z6P.js} +1 -1
- package/dist/client/assets/{Eye-DvBjB5D4.js → Eye-DHXiKp7G.js} +1 -1
- package/dist/client/assets/{GitBranch01-Bde_Ik_K.js → GitBranch01-C6qDPwlx.js} +1 -1
- package/dist/client/assets/{Globe01-D2uoGclE.js → Globe01-GgL_adnC.js} +1 -1
- package/dist/client/assets/{HardDrive-CBqO3DS3.js → HardDrive-CMRpNYav.js} +1 -1
- package/dist/client/assets/{Image01-0uExgWAI.js → Image01-B-drTenX.js} +1 -1
- package/dist/client/assets/{Key01-BiKWCM1S.js → Key01-BdjDTSqW.js} +1 -1
- package/dist/client/assets/{Link01-C7a_h6ys.js → Link01-BR1GQeuR.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D_IXdPPU.js → LinkExternal01-BMWbQxLZ.js} +1 -1
- package/dist/client/assets/{Monitor01-CKYtARge.js → Monitor01-CR7dvepe.js} +1 -1
- package/dist/client/assets/{Package-D0PXqO6P.js → Package-afgN0oSF.js} +1 -1
- package/dist/client/assets/{Palette-CQVEzzhe.js → Palette-CByTlmX2.js} +1 -1
- package/dist/client/assets/{Play-CONIoWIl.js → Play-CDB8Q2Om.js} +1 -1
- package/dist/client/assets/{Plus-D7VA57q5.js → Plus-CTP-uL3y.js} +1 -1
- package/dist/client/assets/{SearchMd-C1loDEwy.js → SearchMd-W2WgbmqN.js} +1 -1
- package/dist/client/assets/{Sector-DWJi3JDL.js → Sector-CUITAKRp.js} +1 -1
- package/dist/client/assets/{Settings02-DfFNQquZ.js → Settings02-Bi_PzlFZ.js} +1 -1
- package/dist/client/assets/{Share07-8oXDBqwk.js → Share07-CHSaeI5o.js} +1 -1
- package/dist/client/assets/{Shield01-CrPC_5gY.js → Shield01-DyfAWDpg.js} +1 -1
- package/dist/client/assets/{Stars01-BTmtR5If.js → Stars01-CGBUJYMv.js} +1 -1
- package/dist/client/assets/{Sun-N_eYVUUU.js → Sun-CTjY6RAZ.js} +1 -1
- package/dist/client/assets/{Tool01-CtOHcy0Y.js → Tool01-B6a7U5lG.js} +1 -1
- package/dist/client/assets/{Tool02-DHxIusmd.js → Tool02-CR20QR2y.js} +1 -1
- package/dist/client/assets/{Trash01-CHla-FrA.js → Trash01-yJ8y8j2_.js} +1 -1
- package/dist/client/assets/{TrendUp01-BctNF4vg.js → TrendUp01-CNAJXRtI.js} +1 -1
- package/dist/client/assets/{Upload01-VP9EBYtl.js → Upload01-Dy1NGSul.js} +1 -1
- package/dist/client/assets/{User01-8XeMepHg.js → User01-CVxyVwbY.js} +1 -1
- package/dist/client/assets/{UserSquare-BEv1iIj5.js → UserSquare-xcIM5-JC.js} +1 -1
- package/dist/client/assets/{Users01-CvPFHBcf.js → Users01-VSrTGZJb.js} +1 -1
- package/dist/client/assets/{Users03-cesUeOsp.js → Users03-CYRLwNE5.js} +1 -1
- package/dist/client/assets/{XCircle-DZJkY1-f.js → XCircle-CKXn3iPc.js} +1 -1
- package/dist/client/assets/{XClose-mJWP0IZB.js → XClose-CDEX3-4N.js} +1 -1
- package/dist/client/assets/{Zap-JQtzyV8B.js → Zap-OIziD9g8.js} +1 -1
- package/dist/client/assets/{ZoomOut-D8t79aO2.js → ZoomOut-DWUSIuvF.js} +1 -1
- package/dist/client/assets/{access-gate-DhjnuxYh.js → access-gate-H5PezdBP.js} +1 -1
- package/dist/client/assets/{agent-icon-Dsw04fQF.js → agent-icon-DARgLSxq.js} +1 -1
- package/dist/client/assets/{agents-list-BazgXeqr.js → agents-list-DAgLTxl_.js} +1 -1
- package/dist/client/assets/{ai-providers-C59crxe5.js → ai-providers-CwxF4yPj.js} +1 -1
- package/dist/client/assets/{alert-CctLdkUH.js → alert-CKIXehAq.js} +1 -1
- package/dist/client/assets/{alert-dialog-BU3enZKF.js → alert-dialog-DpkF1K4F.js} +1 -1
- package/dist/client/assets/{analytics-tab-BAIQskOJ.js → analytics-tab-C7h4DPzu.js} +1 -1
- package/dist/client/assets/{api-keys-CwZoIgmV.js → api-keys-9lXh4MCl.js} +1 -1
- package/dist/client/assets/api-keys-CJor8arv.js +1 -0
- package/dist/client/assets/{app-editor-Bvzl_qDB.js → app-editor-BBpdXNSV.js} +1 -1
- package/dist/client/assets/{auth-Ctf1zdSk.js → auth-CshbPpTp.js} +1 -1
- package/dist/client/assets/{auth-catchall-DfbKNMqE.js → auth-catchall-Cd8Wgncd.js} +1 -1
- package/dist/client/assets/{auth-entry-BsXiAQoR.js → auth-entry-DMcq6cQA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BwXlZwBP.js → auth-split-layout-ClYVDVxg.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-UjkEE9k3.js → authenticate-and-persist-oauth-BPubDltn.js} +1 -1
- package/dist/client/assets/{automation-list-row-CakAIrvQ.js → automation-list-row-CJX9V7jh.js} +1 -1
- package/dist/client/assets/{automation-runs-BP4svOKv.js → automation-runs-DLJI5rf1.js} +1 -1
- package/dist/client/assets/{automations-47G1qGwp.js → automations-DLYI8BeB.js} +1 -1
- package/dist/client/assets/{avatar-ayySA21l.js → avatar-WzHUoTUh.js} +1 -1
- package/dist/client/assets/{badge-BJg3YTbr.js → badge-7fQBDgDe.js} +1 -1
- package/dist/client/assets/{block-document-DOFjntDc.js → block-document-Cvr6OxhG.js} +1 -1
- package/dist/client/assets/{breadcrumb-B5Tcv0Uh.js → breadcrumb-D4piRrZH.js} +1 -1
- package/dist/client/assets/{buckets-DCKwVcGS.js → buckets-z637cL3u.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BWY_YPZV.js → bulk-category-panel-Bzsswi92.js} +1 -1
- package/dist/client/assets/{capability-load-error-BERy8yZe.js → capability-load-error-BKql4BI5.js} +1 -1
- package/dist/client/assets/{cards-D9Ttj2cE.js → cards-C3g8tkUT.js} +1 -1
- package/dist/client/assets/{category-editor-BPZKWEN1.js → category-editor-CsLbvWH6.js} +1 -1
- package/dist/client/assets/{cdn-tab-BU_7vQmo.js → cdn-tab-KckVMvGy.js} +1 -1
- package/dist/client/assets/{chart-DxN2Cs4Z.js → chart-fBY_srkz.js} +1 -1
- package/dist/client/assets/{chat-context-ffF_r7RU.js → chat-context-DPqEEc9f.js} +1 -1
- package/dist/client/assets/{checkbox-DmweFMZg.js → checkbox-3oQrEvGP.js} +1 -1
- package/dist/client/assets/{choose-editor-ChPKiRJQ.js → choose-editor-CbT66sUn.js} +1 -1
- package/dist/client/assets/{cli-auth-success-3b6OvqFq.js → cli-auth-success-B6uPW0VA.js} +1 -1
- package/dist/client/assets/{client-icons-DX-H77xu.js → client-icons-Cnbbkc7W.js} +1 -1
- package/dist/client/assets/{collection-detail-CDYBCwYK.js → collection-detail-C92KlR48.js} +1 -1
- package/dist/client/assets/{collection-display-button-COCZggWW.js → collection-display-button-PLjgnT2G.js} +1 -1
- package/dist/client/assets/{collection-search-DUFT-3aZ.js → collection-search-gGFk2HPW.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CSMTQGj2.js → collection-table-wrapper-B4fEHlr5.js} +1 -1
- package/dist/client/assets/{collection-tabs-aHnkLK94.js → collection-tabs-Bpa6FEms.js} +1 -1
- package/dist/client/assets/{command-CEQjEkRa.js → command-DLIIEfkn.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BVWKpNBX.js → commerce-onboarding-DixxZKEM.js} +1 -1
- package/dist/client/assets/{connect-C6lph8Iz.js → connect-BV5ijMRE.js} +1 -1
- package/dist/client/assets/{connect-layout-CS-AhNLB.js → connect-layout-jipJMUWp.js} +1 -1
- package/dist/client/assets/{connection-qt8m11-c.js → connection-12jrWX_j.js} +1 -1
- package/dist/client/assets/{connection-card-Bwgx5OMm.js → connection-card-wVN_xP8k.js} +1 -1
- package/dist/client/assets/{connection-detail-DCF5hqwD.js → connection-detail-jWrdsEH1.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cs1EiOkG.js → connection-form-helpers-Bv_kk9q-.js} +1 -1
- package/dist/client/assets/{connections-C_jYcs4m.js → connections-01Bc0pqo.js} +1 -1
- package/dist/client/assets/{create-organization-dialog--WflCODd.js → create-organization-dialog-CQKjHxHG.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Cp5pr9Ve.js → decopilot-sse-pool-Cw1UG3Sc.js} +1 -1
- package/dist/client/assets/{dialog-DDd8wUS7.js → dialog-COSD0NUP.js} +1 -1
- package/dist/client/assets/{domain-settings-b-Gf934e.js → domain-settings-Daq41FWy.js} +1 -1
- package/dist/client/assets/{drawer-CxFI5tCn.js → drawer-B-0cZvSN.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C3Gdadki.js → dropdown-menu-D6zVAeEA.js} +1 -1
- package/dist/client/assets/{e2e-tab-9O9jlog6.js → e2e-tab-imliLT98.js} +1 -1
- package/dist/client/assets/{editor-B0M9C5II.js → editor-DHk1J_pU.js} +1 -1
- package/dist/client/assets/{empty-state-Cs8gUH2e.js → empty-state-LOYIyQeP.js} +1 -1
- package/dist/client/assets/{empty-state-L8hCXC--.js → empty-state-waVAb3Lq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C2Ocp5Tk.js → extract-connection-data-D2-kt2Di.js} +1 -1
- package/dist/client/assets/{file-explorer-DTbMKDAB.js → file-explorer-CK6_Yme8.js} +1 -1
- package/dist/client/assets/{file-type-icon-C5mq72Tm.js → file-type-icon-CvNFwXGZ.js} +1 -1
- package/dist/client/assets/{folder-icon-Dt2zI1nQ.js → folder-icon-DtBDHDAV.js} +1 -1
- package/dist/client/assets/{form-DR4f8DO7.js → form-dg8wWUUl.js} +1 -1
- package/dist/client/assets/{general-uVPlw24q.js → general-BDh8qTJI.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Dyu49H5P.js → github-repo-picker-CLzLOKLP.js} +1 -1
- package/dist/client/assets/{hooks-J2gbnuVW.js → hooks-CO5LzwYA.js} +1 -1
- package/dist/client/assets/{hosting-tab-StoCQBLo.js → hosting-tab-BOKL06-8.js} +1 -1
- package/dist/client/assets/{index-B7iA3R9e.js → index-B7AGKee5.js} +1 -1
- package/dist/client/assets/{index-DH6qLcGa.js → index-BPrzfReW.js} +44 -44
- package/dist/client/assets/{index-DNghV_Kw.js → index-C2fX6l4k.js} +1 -1
- package/dist/client/assets/{index-DahqZ1Pw.js → index-CEFN9z5s.js} +1 -1
- package/dist/client/assets/{index-DaThHROC.js → index-IeiScoY9.js} +1 -1
- package/dist/client/assets/{index-hsED2j2G.js → index-XmiQpXkR.js} +1 -1
- package/dist/client/assets/{index-CAw6g9tV.js → index-bAk-APf5.js} +4 -4
- package/dist/client/assets/{index-CP6R9dTL.js → index-g1EjsHvx.js} +1 -1
- package/dist/client/assets/{index--9Kt6-Xb.js → index-nl3LA8yd.js} +1 -1
- package/dist/client/assets/{index-DU91evk-.js → index-rCe5dvs6.js} +1 -1
- package/dist/client/assets/{index-redirect-1FO2ZwBa.js → index-redirect-R0b-vyg0.js} +1 -1
- package/dist/client/assets/{infra-billing-HsGxVjhH.js → infra-billing-DhTiwqCe.js} +1 -1
- package/dist/client/assets/{input-CRq9rZYf.js → input-BxBJoxld.js} +1 -1
- package/dist/client/assets/{integration-icon-gY5UnY38.js → integration-icon-ca4bn4bg.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-RPIPoLmq.js → invite-member-dialog-DP0j0jeW.js} +1 -1
- package/dist/client/assets/{label-ByckMHtZ.js → label-x4aLqYXX.js} +1 -1
- package/dist/client/assets/{layout-C0m5fUEQ.js → layout-SEREZvyT.js} +1 -1
- package/dist/client/assets/{login-nfCx3aQb.js → login-BHrq22LN.js} +1 -1
- package/dist/client/assets/{markdown-C1VdpJ5j.js → markdown-DzVp99N_.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DwPFIejs.js → mcp-oauth-tHYob4zj.js} +1 -1
- package/dist/client/assets/{members-BA8vVu_F.js → members-C26Bj7-4.js} +1 -1
- package/dist/client/assets/{monaco-editor-DhRI2q0D.js → monaco-editor-64XQUTUi.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DLrfuurv.js → monitoring-stats-row-BzOBuywI.js} +1 -1
- package/dist/client/assets/{multi-select-BFhmckl1.js → multi-select-DdpsgAGE.js} +1 -1
- package/dist/client/assets/{oauth-callback-CWLRFYZ2.js → oauth-callback-C8-fq4DJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-RePfP1QM.js → oauth-callback-ai-provider-BAxPD_V7.js} +1 -1
- package/dist/client/assets/{onboarding-BneVgO60.js → onboarding-wZyV9O10.js} +1 -1
- package/dist/client/assets/org-layout-DmoCuADd.js +1 -0
- package/dist/client/assets/{organization-choice-BqV4sYyS.js → organization-choice-DO4eTPl3.js} +1 -1
- package/dist/client/assets/{orgs-DEjfIaJ0.js → orgs-CeNFJeS7.js} +1 -1
- package/dist/client/assets/{page-seo-form-D-Eqo-mJ.js → page-seo-form-BBjFo5AE.js} +1 -1
- package/dist/client/assets/{popover-BIPtCsqc.js → popover-CdW5c_Z7.js} +1 -1
- package/dist/client/assets/{post-calendar-Chm7CCue.js → post-calendar-DNNmAfHQ.js} +1 -1
- package/dist/client/assets/{post-editor-vBEo0v-g.js → post-editor-DIVquuZ9.js} +1 -1
- package/dist/client/assets/{primitives-CmYrjVpf.js → primitives-De4B6r8N.js} +1 -1
- package/dist/client/assets/{profile-Ce2FGBxd.js → profile-C8trltw-.js} +1 -1
- package/dist/client/assets/{project-app-view-lSJv2DSd.js → project-app-view-CAlo_5Z9.js} +1 -1
- package/dist/client/assets/{prompts-Dt2G3dg0.js → prompts-DO4nVKFa.js} +1 -1
- package/dist/client/assets/record-editor-0YOjHBTw.js +1 -0
- package/dist/client/assets/redirect-editor-D6LOyTM3.js +1 -0
- package/dist/client/assets/registry-jwoE6qLq.js +2 -0
- package/dist/client/assets/{registry-layout-D1fFgR3o.js → registry-layout-CDIveMjB.js} +1 -1
- package/dist/client/assets/{reports-DILtNiYy.js → reports-CpaYMZYR.js} +1 -1
- package/dist/client/assets/{require-capability-DMuYJppW.js → require-capability-B7d4swyh.js} +1 -1
- package/dist/client/assets/{required-auth-layout-632Nlbdk.js → required-auth-layout-DV-GqLBv.js} +1 -1
- package/dist/client/assets/{reset-password-Dt0s206r.js → reset-password-xJnjLU-U.js} +1 -1
- package/dist/client/assets/{review-settings-BSEiFN9m.js → review-settings-BNZJYiX8.js} +1 -1
- package/dist/client/assets/{roles-Ca_cW6OU.js → roles-C7XL9PkN.js} +1 -1
- package/dist/client/assets/{schema-BoK0jTZh.js → schema-E_m7zGJD.js} +1 -1
- package/dist/client/assets/{scroll-area-BI805ul_.js → scroll-area-3kuQ0Nhy.js} +1 -1
- package/dist/client/assets/{search-input-CFyqYOfd.js → search-input-DoJXMwA2.js} +1 -1
- package/dist/client/assets/{secrets-hJRzyq6I.js → secrets-Wc8j9HUp.js} +1 -1
- package/dist/client/assets/{sections-editor-CVFGArcx.js → sections-editor-8747lBan.js} +1 -1
- package/dist/client/assets/{select-Bnv10Fl8.js → select-Ctx0Qcgv.js} +1 -1
- package/dist/client/assets/{select-model-NQ0mnVuK.js → select-model-KFI__HgY.js} +1 -1
- package/dist/client/assets/{self-tool-result-Dc4tPK9T.js → self-tool-result-DXNSHG38.js} +1 -1
- package/dist/client/assets/{seo-editor-DlfpOYSl.js → seo-editor-1GQRnSqg.js} +1 -1
- package/dist/client/assets/settings-layout-CjNpAmg_.js +1 -0
- package/dist/client/assets/{settings-sidebar-BGOdVjou.js → settings-sidebar-vVjDs-7c.js} +1 -1
- package/dist/client/assets/{shell-controls-B8r3Mj0T.js → shell-controls-BSHT_MR5.js} +1 -1
- package/dist/client/assets/{shell-layout-X5sLDjab.js → shell-layout-l1Gm-tJn.js} +1 -1
- package/dist/client/assets/{skill-preview-DL4gp0ne.js → skill-preview-BkiTiDHj.js} +1 -1
- package/dist/client/assets/{skills-BLjeFnB6.js → skills-l47vigny.js} +1 -1
- package/dist/client/assets/{sso-DmCj3IPC.js → sso-rHR7nF8_.js} +1 -1
- package/dist/client/assets/{store-h_GKYo0A.js → store-CeQ0Y_Xf.js} +1 -1
- package/dist/client/assets/store-registry-DoxOHqVj.js +2 -0
- package/dist/client/assets/{switch-DlPMc1e_.js → switch-DraJj2E9.js} +1 -1
- package/dist/client/assets/{synced-repos-BhYGq1he.js → synced-repos--BjjC0nx.js} +1 -1
- package/dist/client/assets/{table-D_mk2-gB.js → table-BUHK-A3h.js} +1 -1
- package/dist/client/assets/{tabs-xquvO62b.js → tabs-B6Mjn8C6.js} +1 -1
- package/dist/client/assets/{task-board-DHq8t-_N.js → task-board-BmKB4lF8.js} +1 -1
- package/dist/client/assets/{task-route-DWU-0q6w.js → task-route-DHrjIm3g.js} +1 -1
- package/dist/client/assets/{tasks-68OUM7rF.js → tasks-DPwvJeAw.js} +1 -1
- package/dist/client/assets/{textarea-BClvRA4H.js → textarea-C7UedtOg.js} +1 -1
- package/dist/client/assets/{thread-intent-C3PV-LRn.js → thread-intent-H_zkqJcz.js} +1 -1
- package/dist/client/assets/{thread-route-CxY5TjeM.js → thread-route-qLctIrGd.js} +1 -1
- package/dist/client/assets/{toggle-group-d_5STaVP.js → toggle-group-DcHnU3L8.js} +1 -1
- package/dist/client/assets/{toolbar-D-SXcT0t.js → toolbar-BEWEKrNh.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DSBvSnFI.js → toolbar-icon-button-f5UpsrA6.js} +1 -1
- package/dist/client/assets/{track-Cc1S4yMy.js → track-BFb_BaD6.js} +1 -1
- package/dist/client/assets/{types-B2KcVByH.js → types-CvhaS_hy.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CiO6eVCB.js → use-ai-providers-qE2jQSo1.js} +1 -1
- package/dist/client/assets/{use-automations-VoPscQxA.js → use-automations-mdHjr-f3.js} +1 -1
- package/dist/client/assets/{use-autosave-D-iSKxnB.js → use-autosave-BIq1ImEz.js} +1 -1
- package/dist/client/assets/{use-connection-GI8Focwr.js → use-connection-7Sig4i8K.js} +1 -1
- package/dist/client/assets/{use-copy-C0nulXNR.js → use-copy-DRj9t8CV.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D-L0PRaI.js → use-create-virtual-mcp-BFFeOFL6.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DJCeP_ec.js → use-debounced-autosave-y4fld8H7.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CozflcUh.js → use-debounced-value-Ctprm4qQ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Bs4lGo6F.js → use-decopilot-events-BE4in05H.js} +1 -1
- package/dist/client/assets/{use-delete-connection-T3Xjf9fU.js → use-delete-connection-vAlnTiZs.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-R-YLZcXi.js → use-deployment-admin-BiSRlBZ1.js} +1 -1
- package/dist/client/assets/{use-destination-route-C5lOfatk.js → use-destination-route-4A2Bffaf.js} +1 -1
- package/dist/client/assets/{use-file-configs-CjjmtK39.js → use-file-configs-VIigmq0D.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DHeLsiAD.js → use-infinite-scroll-B2R5PMHr.js} +1 -1
- package/dist/client/assets/{use-join-requests-DP9WJAb0.js → use-join-requests-Co4cU2vH.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Dj0-A5Wa.js → use-mcp-auth-status-bq6Xrdt7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BJohqqSd.js → use-mcp-client-BUxvKIrW.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DW-tAvJg.js → use-mcp-prompts-DFXnShzZ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-vt3UNphZ.js → use-mcp-tools-f0V6MJE7.js} +1 -1
- package/dist/client/assets/{use-members-C7ip6O59.js → use-members-DGfGap1O.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-wxTo_2Wv.js → use-navigate-to-agent-M1gdGbUP.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DVDqxM9c.js → use-org-auth-client-DQWwJyea.js} +1 -1
- package/dist/client/assets/{use-org-sso-3md051eT.js → use-org-sso-DHVAkt5A.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C7--at-2.js → use-organization-roles-CQUjMYzd.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Dh58cpUx.js → use-organization-settings-CM18cXNb.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-9qdFpFC-.js → use-panel-navigate-CNCa5Lk5.js} +1 -1
- package/dist/client/assets/{use-project-scope-NvD131m4.js → use-project-scope-D6ij7-Ra.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DtpIh4N8.js → use-registry-connections-B6moevh3.js} +1 -1
- package/dist/client/assets/{use-secrets-N0I1WQgn.js → use-secrets-xKN5AuQo.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DWl2Cfr4.js → use-section-preview-base-CFAkUMFn.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BpKA8nWD.js → use-status-sounds-CtUSzGTf.js} +1 -1
- package/dist/client/assets/{use-tags-EBwNPMg8.js → use-tags-DB045qF9.js} +1 -1
- package/dist/client/assets/{use-view-mode-CGTPphEX.js → use-view-mode-FpWqGIGn.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B2TPjUHz.js → use-virtual-mcp-BcNfR3JK.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bbvon05j.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BW3CJqhS.js +1 -0
- package/dist/client/assets/{users-BPvwZmZl.js → users-Baqowk2w.js} +1 -1
- package/dist/client/assets/{variant-calendar-CodpU1lu.js → variant-calendar-CQSp5ncz.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Ct7J-xLH.js → view-mode-toggle-eCFeorgT.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +482 -482
- package/dist/server/server.js +321 -321
- package/package.json +1 -1
- package/dist/client/assets/api-keys-8w-9P3dp.js +0 -1
- package/dist/client/assets/org-layout-CpgEGfxv.js +0 -1
- package/dist/client/assets/record-editor-BC2iQPGE.js +0 -1
- package/dist/client/assets/redirect-editor-C7uuK_jN.js +0 -1
- package/dist/client/assets/registry-DwUHQ8Lv.js +0 -2
- package/dist/client/assets/settings-layout-CypSCfpP.js +0 -1
- package/dist/client/assets/store-registry-Cre8_0ZD.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Nq5i14p1.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ByY64uZl.js +0 -1
|
@@ -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,l as ae,t as he}from"./index-CAw6g9tV.js";import{R as ze}from"./required-auth-layout-632Nlbdk.js";import{A as se}from"./auth-split-layout-BwXlZwBP.js";import{O as Le}from"./organization-choice-BqV4sYyS.js";import{A as ve}from"./avatar-ayySA21l.js";import{I as _e}from"./input-CRq9rZYf.js";import{L as Ee}from"./label-ByckMHtZ.js";import{S as Ae}from"./switch-DlPMc1e_.js";import{t as De,a as Pe,b as Re}from"./Users03-cesUeOsp.js";import{i as Fe}from"./CheckCircle-BnpxIwzg.js";import{a as Me}from"./Palette-CQVEzzhe.js";import{i as $e}from"./Upload01-VP9EBYtl.js";import"./Plus-D7VA57q5.js";import"./User01-8XeMepHg.js";const Te=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 lt(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(qe,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:s}=i;let a;e[0]!==s||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:s??"?",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]=s,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 r;e[5]!==m?(r=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=r):r=e[6];let o;e[7]!==f||e[8]!==r?(o=t.jsxs("div",{className:"space-y-2",children:[f,r]}),e[7]=f,e[8]=r,e[9]=o):o=e[9];let j;return e[10]!==a||e[11]!==o?(j=t.jsxs("div",{className:"grid gap-10",children:[a,o]}),e[10]=a,e[11]=o,e[12]=j):j=e[12],j}function qe(){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(se,{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 s;return i[1]!==n||i[2]!==m?(s=t.jsx(Ue,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=s):s=i[3],s}function Ue(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),s=b.split("@")[1]?.toLowerCase()??"",a=!!s&&!Te.has(s),f=s.split(".")[0]??"",r=f.charAt(0).toUpperCase()+f.slice(1);let o;e[0]!==r||e[1]!==a||e[2]!==m?(o=a?r:m?.split(" ")[0]??"",e[0]=r,e[1]=a,e[2]=m,e[3]=o):o=e[3];const j=o,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(s),queryFn:Je,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 l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=l):l=e[5],t.jsx(se,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:s})})]})})}if(u){let l;e[6]!==w?(l=()=>w(),e[6]=w,e[7]=l):l=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]!==l||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:l,children:d}),e[10]=l,e[11]=d,e[12]=h):h=e[12],t.jsx(se,{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:s})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Be),A=N.some(Ke),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let l;e[16]!==m?(l=m?.split(" ")[0]??"",e[16]=m,e[17]=l):l=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==r||e[21]!==s||e[22]!==a||e[23]!==l||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:l,allowDomainClaim:!1,onBack:d}),e[20]=r,e[21]=s,e[22]=a,e[23]=l,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let l;e[26]!==p||e[27]!==N.length||e[28]!==n?(l=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]=l):l=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]!==l||e[34]!==d?(h=t.jsx(fe,{title:l,description:d}),e[33]=l,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]!==s||e[40]!==_||e[41]!==O?(C=t.jsx(Le,{organizations:N,domain:s,requestedSlugs:_,onRequestedSlug:O,onJoined:Ie}),e[38]=N,e[39]=s,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(se,{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]!==r||e[56]!==s||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:j}),e[54]=j,e[55]=r,e[56]=s,e[57]=a,e[58]=D):D=e[58],D}function Ie(i,e){window.location.href=`/${e}`}function Ke(i){return i.joinMode==="auto"}function Be(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 Je(){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:s,allowDomainClaim:a,onBack:f}=i,r=a===void 0?!0:a,o=de(),j=b&&r?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(s),[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 l=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(se,{children:t.jsx(Ye,{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=l.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||l.error||null;let z;e[22]!==r||e[23]!==O||e[24]!==l||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&r?p.mutate():l.mutate())},e[22]=r,e[23]=O,e[24]=l,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==o?(k=o("routes.onboarding.welcomeTitle"),e[28]=o,e[29]=k):k=e[29];let L;e[30]!==o?(L=o("routes.onboarding.setupDescription"),e[30]=o,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]!==o?(F=o("routes.onboarding.orgAvatar"),e[35]=o,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]!==o?(q=o("routes.onboarding.optional"),e[39]=o,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]!==s||e[47]!==c?(K=(c.trim()||s||"?").charAt(0).toUpperCase(),e[46]=s,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(Ge,{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]!==o?(G=o("routes.onboarding.orgName"),e[56]=o,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ee,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let re;e[60]===Symbol.for("react.memo_cache_sentinel")?(re=x=>v(x.target.value),e[60]=re):re=e[60];let H;e[61]!==s||e[62]!==o?(H=s||o("routes.onboarding.myOrganizationPlaceholder"),e[61]=s,e[62]=o,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(_e,{id:"org-name",value:c,onChange:re,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]!==r||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==o?(V=b&&r&&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:o("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(Ae,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=r,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=o,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 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]!==o?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:o("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=o,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==o?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",o("routes.onboarding.creating")]}):o("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=o,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 oe;e[93]!==f||e[94]!==o?(oe=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:o("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=o,e[95]=oe):oe=e[95];let le;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==oe?(le=t.jsx(se,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,oe]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=oe,e[102]=le):le=e[102],le}function Ge(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:s}=i,a=de(),f=P.useRef(null);let r;e[0]!==n||e[1]!==a?(r=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]=r):r=e[2];const o=r;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]!==s||e[7]!==o?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[6]=s,e[7]=o,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($e,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==s||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:s,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]=s,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:De,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Pe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:Re,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0},{icon:Me,labelKey:"routes.onboarding.step.extractingBrand",claimOnly:!1}],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 Ye({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),s=we.filter(o=>b||!o.claimOnly),[a,f]=P.useState(0),r=P.useRef(!1);if(!r.current){r.current=!0;for(let o=1;o<s.length;o++)setTimeout(()=>f(o),Se*o)}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:s.map((o,j)=>{const c=o.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(o.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(Fe,{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})]},o.labelKey)})})]})}export{lt 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,l as ae,t as he}from"./index-bAk-APf5.js";import{R as ze}from"./required-auth-layout-DV-GqLBv.js";import{A as se}from"./auth-split-layout-ClYVDVxg.js";import{O as Le}from"./organization-choice-DO4eTPl3.js";import{A as ve}from"./avatar-WzHUoTUh.js";import{I as _e}from"./input-BxBJoxld.js";import{L as Ee}from"./label-x4aLqYXX.js";import{S as Ae}from"./switch-DraJj2E9.js";import{t as De,a as Pe,b as Re}from"./Users03-CYRLwNE5.js";import{i as Fe}from"./CheckCircle-s46bCx17.js";import{a as Me}from"./Palette-CByTlmX2.js";import{i as $e}from"./Upload01-Dy1NGSul.js";import"./Plus-CTP-uL3y.js";import"./User01-CVxyVwbY.js";const Te=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 lt(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(qe,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:s}=i;let a;e[0]!==s||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:s??"?",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]=s,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 r;e[5]!==m?(r=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=r):r=e[6];let o;e[7]!==f||e[8]!==r?(o=t.jsxs("div",{className:"space-y-2",children:[f,r]}),e[7]=f,e[8]=r,e[9]=o):o=e[9];let j;return e[10]!==a||e[11]!==o?(j=t.jsxs("div",{className:"grid gap-10",children:[a,o]}),e[10]=a,e[11]=o,e[12]=j):j=e[12],j}function qe(){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(se,{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 s;return i[1]!==n||i[2]!==m?(s=t.jsx(Ue,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=s):s=i[3],s}function Ue(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),s=b.split("@")[1]?.toLowerCase()??"",a=!!s&&!Te.has(s),f=s.split(".")[0]??"",r=f.charAt(0).toUpperCase()+f.slice(1);let o;e[0]!==r||e[1]!==a||e[2]!==m?(o=a?r:m?.split(" ")[0]??"",e[0]=r,e[1]=a,e[2]=m,e[3]=o):o=e[3];const j=o,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(s),queryFn:Je,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 l;return e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=l):l=e[5],t.jsx(se,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:s})})]})})}if(u){let l;e[6]!==w?(l=()=>w(),e[6]=w,e[7]=l):l=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]!==l||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:l,children:d}),e[10]=l,e[11]=d,e[12]=h):h=e[12],t.jsx(se,{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:s})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Be),A=N.some(Ke),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let l;e[16]!==m?(l=m?.split(" ")[0]??"",e[16]=m,e[17]=l):l=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==r||e[21]!==s||e[22]!==a||e[23]!==l||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:l,allowDomainClaim:!1,onBack:d}),e[20]=r,e[21]=s,e[22]=a,e[23]=l,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let l;e[26]!==p||e[27]!==N.length||e[28]!==n?(l=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]=l):l=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]!==l||e[34]!==d?(h=t.jsx(fe,{title:l,description:d}),e[33]=l,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]!==s||e[40]!==_||e[41]!==O?(C=t.jsx(Le,{organizations:N,domain:s,requestedSlugs:_,onRequestedSlug:O,onJoined:Ie}),e[38]=N,e[39]=s,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(se,{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]!==r||e[56]!==s||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:s,domainLabel:r,defaultName:j}),e[54]=j,e[55]=r,e[56]=s,e[57]=a,e[58]=D):D=e[58],D}function Ie(i,e){window.location.href=`/${e}`}function Ke(i){return i.joinMode==="auto"}function Be(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 Je(){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:s,allowDomainClaim:a,onBack:f}=i,r=a===void 0?!0:a,o=de(),j=b&&r?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(s),[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 l=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(se,{children:t.jsx(Ye,{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=l.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||l.error||null;let z;e[22]!==r||e[23]!==O||e[24]!==l||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&r?p.mutate():l.mutate())},e[22]=r,e[23]=O,e[24]=l,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==o?(k=o("routes.onboarding.welcomeTitle"),e[28]=o,e[29]=k):k=e[29];let L;e[30]!==o?(L=o("routes.onboarding.setupDescription"),e[30]=o,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]!==o?(F=o("routes.onboarding.orgAvatar"),e[35]=o,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]!==o?(q=o("routes.onboarding.optional"),e[39]=o,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]!==s||e[47]!==c?(K=(c.trim()||s||"?").charAt(0).toUpperCase(),e[46]=s,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(Ge,{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]!==o?(G=o("routes.onboarding.orgName"),e[56]=o,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ee,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let re;e[60]===Symbol.for("react.memo_cache_sentinel")?(re=x=>v(x.target.value),e[60]=re):re=e[60];let H;e[61]!==s||e[62]!==o?(H=s||o("routes.onboarding.myOrganizationPlaceholder"),e[61]=s,e[62]=o,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(_e,{id:"org-name",value:c,onChange:re,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]!==r||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==o?(V=b&&r&&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:o("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(Ae,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=r,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=o,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 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]!==o?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:o("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=o,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==o?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",o("routes.onboarding.creating")]}):o("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=o,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 oe;e[93]!==f||e[94]!==o?(oe=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:o("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=o,e[95]=oe):oe=e[95];let le;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==oe?(le=t.jsx(se,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,oe]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=oe,e[102]=le):le=e[102],le}function Ge(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:s}=i,a=de(),f=P.useRef(null);let r;e[0]!==n||e[1]!==a?(r=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]=r):r=e[2];const o=r;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]!==s||e[7]!==o?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[6]=s,e[7]=o,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($e,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==s||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:s,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]=s,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:De,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Pe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:Re,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0},{icon:Me,labelKey:"routes.onboarding.step.extractingBrand",claimOnly:!1}],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 Ye({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),s=we.filter(o=>b||!o.claimOnly),[a,f]=P.useState(0),r=P.useRef(!1);if(!r.current){r.current=!0;for(let o=1;o<s.length;o++)setTimeout(()=>f(o),Se*o)}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:s.map((o,j)=>{const c=o.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(o.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(Fe,{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})]},o.labelKey)})})]})}export{lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as w,b as z,G as g,j as a,H as _,r as j,I as D,J as I,M as O,O as L,R as A,U as M}from"./index-bAk-APf5.js";import{S as T}from"./index-nl3LA8yd.js";import{u as H}from"./settings-sidebar-vVjDs-7c.js";import"./task-route-DHrjIm3g.js";import"./thread-route-qLctIrGd.js";import"./dialog-COSD0NUP.js";import"./Check-BG3Vn7Kp.js";import"./Copy01-Bdnnn7C6.js";import"./Download01-LWgG7Jcv.js";import"./use-destination-route-4A2Bffaf.js";import"./constants-DNuUCxmW.js";import"./ChevronUp-jmQP_hvc.js";import"./agent-icon-DARgLSxq.js";import"./AlertCircle-BFh6TEUY.js";import"./Tool01-B6a7U5lG.js";import"./ArrowUp-C7FSaCXO.js";import"./ArrowLeft-Cy_3-ZN_.js";import"./Tool02-CR20QR2y.js";import"./XCircle-CKXn3iPc.js";import"./TrendUp01-CNAJXRtI.js";import"./ZoomOut-DWUSIuvF.js";import"./Users03-CYRLwNE5.js";import"./CheckCircle-s46bCx17.js";import"./ChevronRight-BwMQ5MKg.js";import"./ChevronSelectorVertical-in5gYEeG.js";import"./DotsVertical-DI-Q43eH.js";import"./UserSquare-xcIM5-JC.js";import"./CreditCard01-Cy0jatNj.js";import"./Settings02-Bi_PzlFZ.js";import"./Eye-DHXiKp7G.js";import"./Share07-CHSaeI5o.js";import"./GitBranch01-C6qDPwlx.js";import"./Globe01-GgL_adnC.js";import"./XClose-CDEX3-4N.js";import"./HardDrive-CMRpNYav.js";import"./Image01-B-drTenX.js";import"./Key01-BdjDTSqW.js";import"./Link01-BR1GQeuR.js";import"./LinkExternal01-BMWbQxLZ.js";import"./Monitor01-CR7dvepe.js";import"./Sun-CTjY6RAZ.js";import"./Package-afgN0oSF.js";import"./Palette-CByTlmX2.js";import"./Play-CDB8Q2Om.js";import"./Plus-CTP-uL3y.js";import"./SearchMd-W2WgbmqN.js";import"./Shield01-DyfAWDpg.js";import"./Stars01-CGBUJYMv.js";import"./Trash01-yJ8y8j2_.js";import"./Upload01-Dy1NGSul.js";import"./User01-CVxyVwbY.js";import"./Users01-VSrTGZJb.js";import"./Zap-OIziD9g8.js";import"./use-virtual-mcp-BcNfR3JK.js";import"./use-mcp-client-BUxvKIrW.js";import"./auth-CshbPpTp.js";import"./github-repo-BpKUwJal.js";import"./toolbar-icon-button-f5UpsrA6.js";import"./popover-CdW5c_Z7.js";import"./drawer-B-0cZvSN.js";import"./github-repo-picker-CLzLOKLP.js";import"./collection-search-gGFk2HPW.js";import"./use-debounced-value-Ctprm4qQ.js";import"./use-connection-7Sig4i8K.js";import"./authenticate-and-persist-oauth-BPubDltn.js";import"./mcp-oauth-tHYob4zj.js";import"./use-mcp-tools-f0V6MJE7.js";import"./extract-connection-data-D2-kt2Di.js";import"./metadata-dUsYcpuu.js";import"./connection-12jrWX_j.js";import"./use-navigate-to-agent-M1gdGbUP.js";import"./hooks-CO5LzwYA.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Cw1UG3Sc.js";import"./task-board-BmKB4lF8.js";import"./schema-E_m7zGJD.js";import"./thread-intent-H_zkqJcz.js";import"./slugify-CEUa2lfQ.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./use-project-scope-D6ij7-Ra.js";import"./shell-layout-l1Gm-tJn.js";import"./avatar-WzHUoTUh.js";import"./use-panel-navigate-CNCa5Lk5.js";import"./command-DLIIEfkn.js";import"./index-rCe5dvs6.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-DV-GqLBv.js";import"./use-organization-settings-CM18cXNb.js";import"./use-org-sso-DHVAkt5A.js";import"./connection-card-wVN_xP8k.js";import"./use-registry-connections-B6moevh3.js";import"./useInfiniteQuery-Bbvon05j.js";import"./use-infinite-scroll-B2R5PMHr.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-ca4bn4bg.js";import"./form-dg8wWUUl.js";import"./label-x4aLqYXX.js";import"./input-BxBJoxld.js";import"./select-Ctx0Qcgv.js";import"./textarea-C7UedtOg.js";import"./connection-form-helpers-Bv_kk9q-.js";import"./collection-tabs-Bpa6FEms.js";import"./badge-7fQBDgDe.js";import"./useSuspenseInfiniteQuery-BW3CJqhS.js";import"./use-ai-providers-qE2jQSo1.js";import"./use-decopilot-events-BE4in05H.js";import"./dropdown-menu-D6zVAeEA.js";import"./get-initials-D-f_fDFw.js";import"./use-deployment-admin-BiSRlBZ1.js";import"./invite-member-dialog-DP0j0jeW.js";import"./use-org-auth-client-DQWwJyea.js";import"./use-organization-roles-CQUjMYzd.js";import"./scroll-area-3kuQ0Nhy.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-file-configs-VIigmq0D.js";import"./site-slug-uya6Wp4-.js";import"./create-organization-dialog-CQKjHxHG.js";import"./alert-dialog-DpkF1K4F.js";import"./use-join-requests-Co4cU2vH.js";function N(t){const e=w.c(11),{onPointerDown:o,onDoubleClick:l}=t,i=z(),{isMobile:b}=g(),c=H();if(b||c)return null;let s;e[0]!==i?(s=i("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=i,e[1]=s):s=e[1];let r;e[2]!==i?(r=i("sidebar.sidebarResizeHandle.title"),e[2]=i,e[3]=r):r=e[3];let p,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},m=a.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=p,e[5]=m):(p=e[4],m=e[5]);let n;return e[6]!==l||e[7]!==o||e[8]!==s||e[9]!==r?(n=a.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":s,title:r,onPointerDown:o,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:p,children:m}),e[6]=l,e[7]=o,e[8]=s,e[9]=r,e[10]=n):n=e[10],n}const v=240,W=400,C="sidebar.width";function S(t){return Math.max(v,Math.min(W,t))}function X(){const t=w.c(11),[e,o]=_(C,$),l=j.useRef(null);let i;t[0]!==o||t[1]!==e?(i=m=>{m.preventDefault();const n=m.clientX,d=S(e),f=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),u=f?Array.from(f.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const y of u)y.style.transition="none";const h=y=>{const x=S(d+(y.clientX-n));f?.style.setProperty("--sidebar-width",`${x}px`)},R=y=>{const x=S(d+(y.clientX-n));o(x);for(const E of u)E.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",R),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",R)},t[0]=o,t[1]=e,t[2]=i):i=t[2];const b=i;let c;t[3]!==o?(c=()=>{o(v)},t[3]=o,t[4]=c):c=t[4];const s=c;let r;t[5]!==e?(r=S(e),t[5]=e,t[6]=r):r=t[6];let p;return t[7]!==b||t[8]!==s||t[9]!==r?(p={width:r,wrapperRef:l,onStartResize:b,resetWidth:s},t[7]=b,t[8]=s,t[9]=r,t[10]=p):p=t[10],p}function $(t){return typeof t=="number"?S(t):v}const P="3.125rem";function rr(){const t=w.c(16),e=D();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=I.sidebarOpen(),t[0]=o):o=t[0];const[l,i]=_(o,!0),{width:b,wrapperRef:c,onStartResize:s,resetWidth:r}=X(),p=`${b}px`;let m;t[1]!==p?(m={"--sidebar-width":p,"--sidebar-width-icon":P},t[1]=p,t[2]=m):m=t[2];const n=m;let d;t[3]!==e||t[4]!==s||t[5]!==r?(d=!e&&a.jsxs(a.Fragment,{children:[a.jsx(T,{}),a.jsx(N,{onPointerDown:s,onDoubleClick:r})]}),t[3]=e,t[4]=s,t[5]=r,t[6]=d):d=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(O,{className:"flex flex-col min-h-0",style:{background:"transparent",containerType:"inline-size"},children:a.jsx(L,{})}),t[7]=f):f=t[7];let u;t[8]!==n||t[9]!==d||t[10]!==c?(u=a.jsx("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:a.jsxs(A,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:n,children:[d,f]})}),t[8]=n,t[9]=d,t[10]=c,t[11]=u):u=t[11];let h;return t[12]!==i||t[13]!==l||t[14]!==u?(h=a.jsx(M,{open:l,onOpenChange:i,children:u}),t[12]=i,t[13]=l,t[14]=u,t[15]=h):h=t[15],h}export{rr as default};
|
package/dist/client/assets/{organization-choice-BqV4sYyS.js → organization-choice-DO4eTPl3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,r as H,e as A,j as s,B as L,h as B}from"./index-
|
|
1
|
+
import{c as G,r as H,e as A,j as s,B as L,h as B}from"./index-bAk-APf5.js";import{A as I}from"./avatar-WzHUoTUh.js";import{s as K}from"./Plus-CTP-uL3y.js";async function T(i,e,p){const o=await fetch(i,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),l=await o.json();if(!o.ok||!l.success)throw new Error(l.error||p);return l}function Z(i){const e=G.c(45),{organizations:p,domain:o,requestedSlugs:l,onRequestedSlug:C,onSelected:h,onJoined:c,onRequestCompleted:M,selectLabel:O,onCreateNew:S,createNewLabel:P}=i,j=O===void 0?"Select":O,_=P===void 0?"Create new organization":P;let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=new Set,e[0]=N):N=e[0];const[J,U]=H.useState(N);let v;e[1]!==C?(v=r=>{U(t=>new Set(t).add(r)),C?.(r)},e[1]=C,e[2]=v):v=e[2];const E=v;let z;e[3]!==c?(z={mutationFn:V,onSuccess:r=>{const{organization:t,slug:x}=r;c?.(t,x)}},e[3]=c,e[4]=z):z=e[4];const n=A(z);let R;e[5]!==E||e[6]!==c||e[7]!==M?(R={mutationFn:Q,onSuccess:r=>{const{organization:t,slug:x,alreadyMember:F}=r;if(F&&x){c?.(t,x);return}E(t.slug),M?.(t)}},e[5]=E,e[6]=c,e[7]=M,e[8]=R):R=e[8];const a=A(R);let u;e[9]!==l?(u=l??[],e[9]=l,e[10]=u):u=e[10];let y;e[11]!==J||e[12]!==u?(y=new Set([...u,...J]),e[11]=J,e[12]=u,e[13]=y):y=e[13];const b=y,q=n.variables?.slug??null,w=a.variables?.slug??null;let d;e[14]!==_||e[15]!==S?(d=S&&s.jsxs("button",{type:"button",onClick:S,className:"rounded-xl border border-dashed border-border p-4 flex items-center justify-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:border-foreground/40 transition-colors",children:[s.jsx(K,{size:16}),_]}),e[14]=_,e[15]=S,e[16]=d):d=e[16];let m;if(e[17]!==o||e[18]!==b||e[19]!==n||e[20]!==h||e[21]!==p||e[22]!==q||e[23]!==w||e[24]!==a||e[25]!==j){let r;e[27]!==o||e[28]!==b||e[29]!==n||e[30]!==h||e[31]!==q||e[32]!==w||e[33]!==a||e[34]!==j?(r=t=>{const x=n.isPending&&q===t.slug,F=a.isPending&&w===t.slug,$=b.has(t.slug),D=t.logo??(o?`https://www.google.com/s2/favicons?domain=${o}&sz=128`:null);return s.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[s.jsx(I,{url:D??void 0,fallback:t.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:t.name}),o&&s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",o]})]}),t.joinMode==="auto"?s.jsx(L,{size:"default",onClick:()=>n.mutate(t),disabled:n.isPending,children:x?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Joining..."]}):"Join"}):t.joinMode==="request"?$?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):s.jsx(L,{size:"default",variant:"outline",onClick:()=>a.mutate(t),disabled:a.isPending,children:F?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Requesting..."]}):"Request to join"}):s.jsx(L,{size:"default",onClick:()=>h?.(t),children:j})]},t.id)},e[27]=o,e[28]=b,e[29]=n,e[30]=h,e[31]=q,e[32]=w,e[33]=a,e[34]=j,e[35]=r):r=e[35],m=p.map(r),e[17]=o,e[18]=b,e[19]=n,e[20]=h,e[21]=p,e[22]=q,e[23]=w,e[24]=a,e[25]=j,e[26]=m}else m=e[26];let g;e[36]!==n.error?(g=n.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[36]=n.error,e[37]=g):g=e[37];let f;e[38]!==a.error?(f=a.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[38]=a.error,e[39]=f):f=e[39];let k;return e[40]!==m||e[41]!==g||e[42]!==f||e[43]!==d?(k=s.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g,f]}),e[40]=m,e[41]=g,e[42]=f,e[43]=d,e[44]=k):k=e[44],k}async function Q(i){const e=await T("/api/auth/custom/domain-request-join",i.slug,"Failed to request access");return{organization:i,slug:e.slug,alreadyMember:e.alreadyMember}}async function V(i){const e=await T("/api/auth/custom/domain-join",i.slug,"Failed to join organization");return{organization:i,slug:e.slug??i.slug}}export{Z as O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Te,b as De,r as M,m as Be,j as n,P as Ie,K as Ne,n as Ue,e as Le,t as ie,B as I}from"./index-CAw6g9tV.js";import{C as ms}from"./collection-table-wrapper-CSMTQGj2.js";import{E as ts}from"./empty-state-L8hCXC--.js";import{S as us}from"./search-input-CFyqYOfd.js";import{I as Ve}from"./input-CRq9rZYf.js";import{L as fs}from"./label-ByckMHtZ.js";import{u as gs}from"./use-debounced-value-CozflcUh.js";import{D as Qe,a as Ge,b as He,c as Ye,d as We,e as Xe}from"./dialog-DDd8wUS7.js";import{S as hs,a as xs,b as ps,c as js,d as ys}from"./select-Bnv10Fl8.js";import{S as vs}from"./switch-DlPMc1e_.js";import{B as Ce}from"./badge-BJg3YTbr.js";import{O as Ss,D as bs}from"./schema-BoK0jTZh.js";import{S as Ns}from"./site-slug-uya6Wp4-.js";import{a as we}from"./admin-fetch-CCSvjTk1.js";import{f as ws}from"./format-time-BnbuEtat.js";import"./table-D_mk2-gB.js";import"./ArrowUp-CxKA4POx.js";import"./SearchMd-C1loDEwy.js";import"./Check-Jn0qXgT0.js";import"./ChevronUp-BCwuiyHj.js";import"./differenceInSeconds-NQ4PDo0z.js";const Cs=["owner","admin","user"],as=Object.entries(Ss.shape).map(([t,e])=>({key:t,description:e.description??"",defaultOn:bs.has(t)})),ns=new Set(as.map(t=>t.key)),is=/^(?=.{1,64}$)[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function _s(t){const e={};for(const[i,s]of Object.entries(t)){if(typeof s!="boolean")return null;e[i]=s}return e}function Es(t){const e=Te.c(133),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(null),[P,R]=M.useState(!1),[b,_]=M.useState(""),[k,p]=M.useState(null),[r,o]=M.useState(!1),[x,E]=M.useState(""),[N,f]=M.useState(null),F=Ue();let j;e[0]!==i.id?(j=Ne.deploymentAdminOrgFlags(i.id),e[0]=i.id,e[1]=j):j=e[1];let w;e[2]!==i.id?(w=()=>we(`/api/_admin/orgs/${i.id}/flags`),e[2]=i.id,e[3]=w):w=e[3];let h;e[4]!==S||e[5]!==j||e[6]!==w?(h={queryKey:j,queryFn:w,enabled:S},e[4]=S,e[5]=j,e[6]=w,e[7]=h):h=e[7];const{data:u,isLoading:C,isFetching:A,isError:d}=Be(h),y=C||A;let z;e[8]!==u?.effective?(z=u?.effective??{},e[8]=u?.effective,e[9]=z):z=e[9];const B=z;let Z;e[10]!==u?.flags?(Z=u?.flags??{},e[10]=u?.flags,e[11]=Z):Z=e[11];const c=a??Z;let q;e[12]!==i.id?(q=ne=>we(`/api/_admin/orgs/${i.id}/flags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)}),e[12]=i.id,e[13]=q):q=e[13];let G;e[14]!==s?(G=ne=>{ie.error(ne instanceof Error?ne.message:s("admin.orgs.failedSaveFlags"))},e[14]=s,e[15]=G):G=e[15];const g=Le({mutationFn:q,onSuccess:()=>{ie.success(s("admin.orgs.flagsSaved",{org:i.name})),F.invalidateQueries({queryKey:Ne.deploymentAdminOrgFlags(i.id)}),J(),O(!1)},onError:G}),J=()=>{K(null),R(!1),_(""),p(null),o(!1),E(""),f(null)};let L;e[16]!==J?(L=ne=>{O(ne),ne||J()},e[16]=J,e[17]=L):L=e[17];const v=L;let T,D,H,U,V,ee,Y,W,Q,se;if(e[18]!==c||e[19]!==a||e[20]!==B||e[21]!==v||e[22]!==y||e[23]!==d||e[24]!==r||e[25]!==x||e[26]!==g||e[27]!==b||e[28]!==k||e[29]!==S||e[30]!==i.name||e[31]!==P||e[32]!==s){const ne=new Set(ns),Ze=as.map(Os);for(const m of Object.keys(c))ne.has(m)||(ne.add(m),Ze.push({key:m,description:"",defaultOn:!1,known:!1}));let Ee;e[43]!==c?(Ee=(m,te)=>K({...c,[m]:te}),e[43]=c,e[44]=Ee):Ee=e[44];const Oe=Ee;let Pe;e[45]!==c||e[46]!==b||e[47]!==Oe||e[48]!==s?(Pe=()=>{const m=b.trim();if(!is.test(m)){p(s("admin.orgs.invalidFlagKey"));return}if(ns.has(m)||m in c){p(s("admin.orgs.duplicateFlagKey"));return}Oe(m,!0),_(""),p(null),R(!1)},e[45]=c,e[46]=b,e[47]=Oe,e[48]=s,e[49]=Pe):Pe=e[49];const es=Pe;let ke;e[50]!==c||e[51]!==r?(ke=()=>{r||(E(JSON.stringify(c,null,2)),f(null),o(!0))},e[50]=c,e[51]=r,e[52]=ke):ke=e[52];const $e=ke;let fe,ae;e[53]!==r||e[54]!==x||e[55]!==s?(fe=()=>{if(!r)return;const m=ae();if(!m){f(s("admin.orgs.invalidJson"));return}K(m),f(null),o(!1)},ae=()=>{let m;try{m=JSON.parse(x)}catch{return null}if(!m||typeof m!="object"||Array.isArray(m))return null;const te=Object.entries(m);for(const[Ae,Me]of te)if(!is.test(Ae)||typeof Me!="boolean")return null;return Object.fromEntries(te)},e[53]=r,e[54]=x,e[55]=s,e[56]=fe,e[57]=ae):(fe=e[56],ae=e[57]);let Fe;e[58]!==c||e[59]!==a||e[60]!==v||e[61]!==r||e[62]!==g||e[63]!==ae||e[64]!==s?(Fe=()=>{const m=r?ae():_s(c);if(!m){f(s(r?"admin.orgs.invalidJson":"admin.orgs.invalidStoredValue"));return}if(f(null),a===null){v(!1);return}g.mutate({flags:m,mode:"replace"})},e[58]=c,e[59]=a,e[60]=v,e[61]=r,e[62]=g,e[63]=ae,e[64]=s,e[65]=Fe):Fe=e[65],H=Fe,D=Qe,Y=S,W=v;let ge;e[66]!==s?(ge=s("admin.orgs.flags"),e[66]=s,e[67]=ge):ge=e[67],e[68]!==ge?(Q=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:ge})}),e[68]=ge,e[69]=Q):Q=e[69],T=He,se="sm:max-w-2xl";let he;e[70]!==i.name||e[71]!==s?(he=s("admin.orgs.flagsFor",{org:i.name}),e[70]=i.name,e[71]=s,e[72]=he):he=e[72],e[73]!==he?(U=n.jsx(Ye,{children:n.jsx(We,{children:he})}),e[73]=he,e[74]=U):U=e[74];let xe;e[75]!==s?(xe=s("admin.orgs.flagsDescription"),e[75]=s,e[76]=xe):xe=e[76];let pe;e[77]!==xe?(pe=n.jsx("p",{className:"text-sm text-muted-foreground",children:xe}),e[77]=xe,e[78]=pe):pe=e[78];const Re=r?"outline":"secondary";let je;e[79]!==s?(je=s("admin.orgs.flagsViewToggles"),e[79]=s,e[80]=je):je=e[80];let ye;e[81]!==fe||e[82]!==d||e[83]!==Re||e[84]!==je?(ye=n.jsx(I,{variant:Re,size:"sm",onClick:fe,disabled:d,children:je}),e[81]=fe,e[82]=d,e[83]=Re,e[84]=je,e[85]=ye):ye=e[85];const qe=r?"secondary":"outline",Je=y||d;let ve;e[86]!==s?(ve=s("admin.orgs.flagsViewJson"),e[86]=s,e[87]=ve):ve=e[87];let Se;e[88]!==$e||e[89]!==qe||e[90]!==Je||e[91]!==ve?(Se=n.jsx(I,{variant:qe,size:"sm",onClick:$e,disabled:Je,children:ve}),e[88]=$e,e[89]=qe,e[90]=Je,e[91]=ve,e[92]=Se):Se=e[92];let be;e[93]!==ye||e[94]!==Se?(be=n.jsxs("div",{className:"flex shrink-0 gap-1",children:[ye,Se]}),e[93]=ye,e[94]=Se,e[95]=be):be=e[95],e[96]!==pe||e[97]!==be?(V=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[pe,be]}),e[96]=pe,e[97]=be,e[98]=V):V=e[98],ee=d?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadFlags")}):r?n.jsxs("div",{className:"space-y-2",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.jsonReplaceHint")}),n.jsx("textarea",{"aria-label":s("admin.orgs.jsonEditorLabel"),value:x,spellCheck:!1,disabled:g.isPending,onChange:m=>{E(m.target.value),f(null)},className:"h-64 w-full rounded-md border border-border bg-background p-3 font-mono text-sm text-foreground"})]}):n.jsxs("div",{className:"max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[Ze.map(m=>{const{key:te,description:Ae,defaultOn:Me,known:rs}=m,ze=c[te],os=typeof ze=="boolean"?ze:B[te]??!1,ss=ze===void 0,ds=!ss&&typeof ze!="boolean";return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(vs,{"aria-label":te,checked:os,disabled:y||g.isPending,onCheckedChange:cs=>Oe(te,cs)}),n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("code",{className:"text-sm font-medium text-foreground",children:te}),Me?n.jsx(Ce,{variant:"secondary",size:"default",children:s("admin.orgs.flagDefaultOn")}):null,rs?null:n.jsx(Ce,{variant:"warning",size:"default",children:s("admin.orgs.flagCustom")}),ss?n.jsx(Ce,{variant:"outline",size:"default",children:s("admin.orgs.flagUnset")}):null,ds?n.jsx(Ce,{variant:"destructive",size:"default",children:s("admin.orgs.flagInvalid")}):null]}),Ae?n.jsx("p",{className:"text-sm text-muted-foreground",children:Ae}):null]})]},te)}),P?n.jsxs("div",{className:"space-y-1 border-t border-border pt-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{autoFocus:!0,"aria-label":s("admin.orgs.customFlagKeyLabel"),value:b,placeholder:s("admin.orgs.customFlagKeyPlaceholder"),onChange:m=>{_(m.target.value),p(null)},onKeyDown:m=>{m.key==="Enter"&&es()},className:"font-mono"}),n.jsx(I,{variant:"outline",onClick:es,children:s("admin.orgs.add")})]}),k?n.jsx("p",{className:"text-sm text-destructive",children:k}):null]}):n.jsx(I,{variant:"outline",size:"sm",disabled:y,onClick:()=>R(!0),children:s("admin.orgs.addCustomFlag")})]}),e[18]=c,e[19]=a,e[20]=B,e[21]=v,e[22]=y,e[23]=d,e[24]=r,e[25]=x,e[26]=g,e[27]=b,e[28]=k,e[29]=S,e[30]=i.name,e[31]=P,e[32]=s,e[33]=T,e[34]=D,e[35]=H,e[36]=U,e[37]=V,e[38]=ee,e[39]=Y,e[40]=W,e[41]=Q,e[42]=se}else T=e[33],D=e[34],H=e[35],U=e[36],V=e[37],ee=e[38],Y=e[39],W=e[40],Q=e[41],se=e[42];let l;e[99]!==N?(l=N?n.jsx("p",{className:"text-sm text-destructive",children:N}):null,e[99]=N,e[100]=l):l=e[100];let $;e[101]!==v?($=()=>v(!1),e[101]=v,e[102]=$):$=e[102];const le=g.isPending;let re;e[103]!==s?(re=s("admin.orgs.cancel"),e[103]=s,e[104]=re):re=e[104];let oe;e[105]!==g.isPending||e[106]!==$||e[107]!==re?(oe=n.jsx(I,{variant:"outline",onClick:$,disabled:le,children:re}),e[105]=g.isPending,e[106]=$,e[107]=re,e[108]=oe):oe=e[108];const Ke=y||d||g.isPending;let de;e[109]!==g.isPending||e[110]!==s?(de=g.isPending?s("admin.orgs.saving"):s("admin.orgs.save"),e[109]=g.isPending,e[110]=s,e[111]=de):de=e[111];let ce;e[112]!==H||e[113]!==Ke||e[114]!==de?(ce=n.jsx(I,{onClick:H,disabled:Ke,children:de}),e[112]=H,e[113]=Ke,e[114]=de,e[115]=ce):ce=e[115];let me;e[116]!==oe||e[117]!==ce?(me=n.jsxs(Xe,{children:[oe,ce]}),e[116]=oe,e[117]=ce,e[118]=me):me=e[118];let ue;e[119]!==T||e[120]!==U||e[121]!==V||e[122]!==ee||e[123]!==l||e[124]!==me||e[125]!==se?(ue=n.jsxs(T,{className:se,children:[U,V,ee,l,me]}),e[119]=T,e[120]=U,e[121]=V,e[122]=ee,e[123]=l,e[124]=me,e[125]=se,e[126]=ue):ue=e[126];let _e;return e[127]!==D||e[128]!==Y||e[129]!==W||e[130]!==Q||e[131]!==ue?(_e=n.jsxs(D,{open:Y,onOpenChange:W,children:[Q,ue]}),e[127]=D,e[128]=Y,e[129]=W,e[130]=Q,e[131]=ue,e[132]=_e):_e=e[132],_e}function Os(t){return{...t,known:!0}}class ls extends Error{constructor(e,i,s){super("owned_by_other_org"),this.slug=e,this.ownerName=i,this.ownerSlug=s,this.name="SiteConflictError"}slug;ownerName;ownerSlug}function Ps(t){const e=Te.c(82),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState(null),[b,_]=M.useState(null),k=Ue();let p;e[0]!==i.id?(p=Ne.deploymentAdminOrgSites(i.id),e[0]=i.id,e[1]=p):p=e[1];let r;e[2]!==i.id?(r=()=>we(`/api/_admin/orgs/${i.id}/sites`),e[2]=i.id,e[3]=r):r=e[3];let o;e[4]!==S||e[5]!==p||e[6]!==r?(o={queryKey:p,queryFn:r,enabled:S},e[4]=S,e[5]=p,e[6]=r,e[7]=o):o=e[7];const{data:x,isLoading:E,isError:N}=Be(o);let f;e[8]!==x?.sites?(f=x?.sites??[],e[8]=x?.sites,e[9]=f):f=e[9];const F=f;let j;e[10]!==i.id||e[11]!==k?(j=()=>k.invalidateQueries({queryKey:Ne.deploymentAdminOrgSites(i.id)}),e[10]=i.id,e[11]=k,e[12]=j):j=e[12];const w=j;let h;e[13]!==i.id?(h=async l=>{const $=await fetch(`/api/_admin/orgs/${i.id}/sites`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),le=await $.json().catch(ks);if($.status===409&&le.error==="owned_by_other_org")throw new ls(l.slug,le.ownerOrganizationName??null,le.ownerOrganizationSlug??null);if(!$.ok)throw new Error(le.error||`Request failed (HTTP ${$.status})`);return le},e[13]=i.id,e[14]=h):h=e[14];let u;e[15]!==w||e[16]!==i.name||e[17]!==s?(u=(l,$)=>{ie.success($.reassign?s("admin.orgs.siteReassigned",{slug:$.slug,org:i.name}):s("admin.orgs.siteAdded",{slug:$.slug,org:i.name})),w(),K(""),R(null),_(null)},e[15]=w,e[16]=i.name,e[17]=s,e[18]=u):u=e[18];let C;e[19]!==s?(C=l=>{if(l instanceof ls){_({slug:l.slug,ownerName:l.ownerName,ownerSlug:l.ownerSlug});return}ie.error(l instanceof Error?l.message:s("admin.orgs.failedAddSite"))},e[19]=s,e[20]=C):C=e[20];let A;e[21]!==h||e[22]!==u||e[23]!==C?(A={mutationFn:h,onSuccess:u,onError:C},e[21]=h,e[22]=u,e[23]=C,e[24]=A):A=e[24];const d=Le(A);let y;e[25]!==i.id?(y=l=>we(`/api/_admin/orgs/${i.id}/sites/${encodeURIComponent(l)}`,{method:"DELETE"}),e[25]=i.id,e[26]=y):y=e[26];let z;e[27]!==w||e[28]!==i.name||e[29]!==s?(z=(l,$)=>{ie.success(s("admin.orgs.siteRemoved",{slug:$,org:i.name})),w()},e[27]=w,e[28]=i.name,e[29]=s,e[30]=z):z=e[30];let B;e[31]!==s?(B=l=>{ie.error(l instanceof Error?l.message:s("admin.orgs.failedRemoveSite"))},e[31]=s,e[32]=B):B=e[32];let Z;e[33]!==y||e[34]!==z||e[35]!==B?(Z={mutationFn:y,onSuccess:z,onError:B},e[33]=y,e[34]=z,e[35]=B,e[36]=Z):Z=e[36];const X=Le(Z),c=d.isPending||X.isPending;let q;e[37]===Symbol.for("react.memo_cache_sentinel")?(q=l=>{O(l),l||(K(""),R(null),_(null))},e[37]=q):q=e[37];const G=q;let g;e[38]!==d||e[39]!==a||e[40]!==s?(g=()=>{const l=a.trim().toLowerCase();if(!Ns.test(l)){R(s("admin.orgs.invalidSiteSlug"));return}R(null),_(null),d.mutate({slug:l})},e[38]=d,e[39]=a,e[40]=s,e[41]=g):g=e[41];const J=g;let L;e[42]!==s?(L=s("admin.orgs.sites"),e[42]=s,e[43]=L):L=e[43];let v;e[44]!==L?(v=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:L})}),e[44]=L,e[45]=v):v=e[45];let T;e[46]!==i.name||e[47]!==s?(T=s("admin.orgs.sitesFor",{org:i.name}),e[46]=i.name,e[47]=s,e[48]=T):T=e[48];let D;e[49]!==T?(D=n.jsx(Ye,{children:n.jsx(We,{children:T})}),e[49]=T,e[50]=D):D=e[50];let H;e[51]!==s?(H=s("admin.orgs.sitesDescription"),e[51]=s,e[52]=H):H=e[52];let U;e[53]!==H?(U=n.jsx("p",{className:"text-sm text-muted-foreground",children:H}),e[53]=H,e[54]=U):U=e[54];let V;e[55]!==P||e[56]!==d||e[57]!==c||e[58]!==b||e[59]!==J||e[60]!==N||e[61]!==E||e[62]!==a||e[63]!==X||e[64]!==F||e[65]!==s?(V=N?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadSites")}):n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"max-h-[45vh] space-y-2 overflow-y-auto pr-1",children:E?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.loading")}):F.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.noSites")}):F.map(l=>n.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("code",{className:"truncate text-sm font-medium text-foreground",children:l.slug}),n.jsx(Ce,{variant:"outline",size:"default",children:l.source})]}),n.jsx(I,{variant:"ghost",size:"sm",disabled:c,onClick:()=>X.mutate(l.slug),children:s("admin.orgs.remove")})]},l.slug))}),n.jsxs("div",{className:"space-y-1 border-t border-border pt-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{value:a,placeholder:s("admin.orgs.siteSlugPlaceholder"),disabled:d.isPending,onChange:l=>{K(l.target.value),R(null),_(null)},onKeyDown:l=>{l.key==="Enter"&&J()},className:"font-mono"}),n.jsx(I,{variant:"outline",disabled:!a.trim()||d.isPending,onClick:J,children:s("admin.orgs.add")})]}),P?n.jsx("p",{className:"text-sm text-destructive",children:P}):null,b?n.jsxs("div",{className:"space-y-2 rounded-md border border-warning/50 bg-warning/10 p-3",children:[n.jsx("p",{className:"text-sm text-foreground",children:s("admin.orgs.siteReassignWarning",{slug:b.slug,owner:b.ownerName||b.ownerSlug||s("admin.orgs.anotherOrg")})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(I,{variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>_(null),children:s("admin.orgs.cancel")}),n.jsx(I,{variant:"destructive",size:"sm",disabled:d.isPending,onClick:()=>d.mutate({slug:b.slug,reassign:!0}),children:s("admin.orgs.reassignConfirm")})]})]}):null]})]}),e[55]=P,e[56]=d,e[57]=c,e[58]=b,e[59]=J,e[60]=N,e[61]=E,e[62]=a,e[63]=X,e[64]=F,e[65]=s,e[66]=V):V=e[66];let ee;e[67]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>G(!1),e[67]=ee):ee=e[67];let Y;e[68]!==s?(Y=s("admin.orgs.close"),e[68]=s,e[69]=Y):Y=e[69];let W;e[70]!==c||e[71]!==Y?(W=n.jsx(Xe,{children:n.jsx(I,{variant:"outline",onClick:ee,disabled:c,children:Y})}),e[70]=c,e[71]=Y,e[72]=W):W=e[72];let Q;e[73]!==D||e[74]!==U||e[75]!==V||e[76]!==W?(Q=n.jsxs(He,{className:"sm:max-w-lg",children:[D,U,V,W]}),e[73]=D,e[74]=U,e[75]=V,e[76]=W,e[77]=Q):Q=e[77];let se;return e[78]!==S||e[79]!==v||e[80]!==Q?(se=n.jsxs(Qe,{open:S,onOpenChange:G,children:[v,Q]}),e[78]=S,e[79]=v,e[80]=Q,e[81]=se):se=e[81],se}function ks(){return{}}function Fs(t){const e=Te.c(75),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState("user"),b=Ue();let _;e[0]!==a||e[1]!==i.id||e[2]!==P?(_=()=>we(`/api/_admin/orgs/${i.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:P})}),e[0]=a,e[1]=i.id,e[2]=P,e[3]=_):_=e[3];let k;e[4]!==a||e[5]!==i.name||e[6]!==b||e[7]!==s?(k=()=>{ie.success(s("admin.orgs.memberAdded",{email:a.trim(),org:i.name})),b.invalidateQueries({queryKey:Ne.deploymentAdminOrgsList()}),O(!1),K(""),R("user")},e[4]=a,e[5]=i.name,e[6]=b,e[7]=s,e[8]=k):k=e[8];let p;e[9]!==s?(p=D=>{ie.error(D instanceof Error?D.message:s("admin.orgs.failedAddMember"))},e[9]=s,e[10]=p):p=e[10];let r;e[11]!==_||e[12]!==k||e[13]!==p?(r={mutationFn:_,onSuccess:k,onError:p},e[11]=_,e[12]=k,e[13]=p,e[14]=r):r=e[14];const o=Le(r);let x;e[15]!==s?(x=s("admin.orgs.addMember"),e[15]=s,e[16]=x):x=e[16];let E;e[17]!==x?(E=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:x})}),e[17]=x,e[18]=E):E=e[18];let N;e[19]!==i.name||e[20]!==s?(N=s("admin.orgs.addMemberTo",{org:i.name}),e[19]=i.name,e[20]=s,e[21]=N):N=e[21];let f;e[22]!==N?(f=n.jsx(Ye,{children:n.jsx(We,{children:N})}),e[22]=N,e[23]=f):f=e[23];let F;e[24]!==s?(F=s("admin.orgs.email"),e[24]=s,e[25]=F):F=e[25];let j;e[26]!==F?(j=n.jsx(fs,{htmlFor:"admin-add-member-email",children:F}),e[26]=F,e[27]=j):j=e[27];let w;e[28]===Symbol.for("react.memo_cache_sentinel")?(w=D=>K(D.target.value),e[28]=w):w=e[28];let h;e[29]!==s?(h=s("admin.orgs.emailPlaceholder"),e[29]=s,e[30]=h):h=e[30];let u;e[31]!==a||e[32]!==o.isPending||e[33]!==h?(u=n.jsx(Ve,{id:"admin-add-member-email",type:"email",value:a,onChange:w,placeholder:h,disabled:o.isPending}),e[31]=a,e[32]=o.isPending,e[33]=h,e[34]=u):u=e[34];let C;e[35]!==j||e[36]!==u?(C=n.jsxs("div",{className:"space-y-2",children:[j,u]}),e[35]=j,e[36]=u,e[37]=C):C=e[37];let A;e[38]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(xs,{className:"w-full",children:n.jsx(ps,{})}),e[38]=A):A=e[38];let d;e[39]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(js,{children:Cs.map(As)}),e[39]=d):d=e[39];let y;e[40]!==o.isPending||e[41]!==P?(y=n.jsxs(hs,{value:P,onValueChange:R,disabled:o.isPending,children:[A,d]}),e[40]=o.isPending,e[41]=P,e[42]=y):y=e[42];let z;e[43]!==C||e[44]!==y?(z=n.jsxs("div",{className:"space-y-4",children:[C,y]}),e[43]=C,e[44]=y,e[45]=z):z=e[45];let B;e[46]===Symbol.for("react.memo_cache_sentinel")?(B=()=>O(!1),e[46]=B):B=e[46];const Z=o.isPending;let X;e[47]!==s?(X=s("admin.orgs.cancel"),e[47]=s,e[48]=X):X=e[48];let c;e[49]!==o.isPending||e[50]!==X?(c=n.jsx(I,{variant:"outline",onClick:B,disabled:Z,children:X}),e[49]=o.isPending,e[50]=X,e[51]=c):c=e[51];let q;e[52]!==o?(q=()=>o.mutate(),e[52]=o,e[53]=q):q=e[53];let G;e[54]!==a||e[55]!==o.isPending?(G=!a.trim()||o.isPending,e[54]=a,e[55]=o.isPending,e[56]=G):G=e[56];let g;e[57]!==o.isPending||e[58]!==s?(g=o.isPending?s("admin.orgs.adding"):s("admin.orgs.addMember"),e[57]=o.isPending,e[58]=s,e[59]=g):g=e[59];let J;e[60]!==q||e[61]!==G||e[62]!==g?(J=n.jsx(I,{onClick:q,disabled:G,children:g}),e[60]=q,e[61]=G,e[62]=g,e[63]=J):J=e[63];let L;e[64]!==c||e[65]!==J?(L=n.jsxs(Xe,{children:[c,J]}),e[64]=c,e[65]=J,e[66]=L):L=e[66];let v;e[67]!==z||e[68]!==L||e[69]!==f?(v=n.jsxs(He,{className:"sm:max-w-md",children:[f,z,L]}),e[67]=z,e[68]=L,e[69]=f,e[70]=v):v=e[70];let T;return e[71]!==S||e[72]!==v||e[73]!==E?(T=n.jsxs(Qe,{open:S,onOpenChange:O,children:[E,v]}),e[71]=S,e[72]=v,e[73]=E,e[74]=T):T=e[74],T}function As(t){return n.jsx(ys,{value:t,children:n.jsx("span",{className:"capitalize",children:t})},t)}function it(){const t=Te.c(45),e=De(),[i,s]=M.useState("");let S;t[0]!==i?(S=i.trim(),t[0]=i,t[1]=S):S=t[1];const O=gs(S,300);let a;t[2]!==O?(a=Ne.deploymentAdminOrgs(O),t[2]=O,t[3]=a):a=t[3];let K;t[4]!==O?(K=()=>{const y=new URLSearchParams({limit:"100"});return O&&y.set("search",O),we(`/api/_admin/orgs?${y}`)},t[4]=O,t[5]=K):K=t[5];let P;t[6]!==a||t[7]!==K?(P={queryKey:a,queryFn:K},t[6]=a,t[7]=K,t[8]=P):P=t[8];const{data:R,isLoading:b,isError:_}=Be(P);let k;t[9]!==R?.organizations?(k=R?.organizations??[],t[9]=R?.organizations,t[10]=k):k=t[10];const p=k;let r;t[11]!==e?(r=e("admin.orgs.organization"),t[11]=e,t[12]=r):r=t[12];let o;t[13]!==r?(o={id:"name",header:r,render:Ds,cellClassName:"flex-1 min-w-0"},t[13]=r,t[14]=o):o=t[14];let x;t[15]!==e?(x=e("admin.orgs.members"),t[15]=e,t[16]=x):x=t[16];let E;t[17]!==x?(E={id:"members",header:x,render:Ts,cellClassName:"w-24 shrink-0"},t[17]=x,t[18]=E):E=t[18];let N;t[19]!==e?(N=e("admin.orgs.created"),t[19]=e,t[20]=N):N=t[20];let f;t[21]!==N?(f={id:"created",header:N,render:Ls,cellClassName:"w-48 shrink-0"},t[21]=N,t[22]=f):f=t[22];let F;t[23]===Symbol.for("react.memo_cache_sentinel")?(F={id:"actions",header:"",render:zs,cellClassName:"w-auto shrink-0"},t[23]=F):F=t[23];let j;t[24]!==f||t[25]!==o||t[26]!==E?(j=[o,E,f,F],t[24]=f,t[25]=o,t[26]=E,t[27]=j):j=t[27];const w=j;let h;t[28]!==e?(h=e("admin.orgs.searchPlaceholder"),t[28]=e,t[29]=h):h=t[29];let u;t[30]!==i||t[31]!==h?(u=n.jsx(us,{value:i,onChange:s,placeholder:h,className:"w-full md:w-[375px]"}),t[30]=i,t[31]=h,t[32]=u):u=t[32];let C;t[33]!==O||t[34]!==_||t[35]!==e?(C=_?n.jsx(ts,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):n.jsx(ts,{title:e("admin.orgs.noOrgsFound"),description:O?e("admin.orgs.noOrgsMatchSearch",{search:O}):e("admin.orgs.noOrgsYet")}),t[33]=O,t[34]=_,t[35]=e,t[36]=C):C=t[36];let A;t[37]!==w||t[38]!==b||t[39]!==p||t[40]!==C?(A=n.jsx(ms,{columns:w,data:p,isLoading:b,emptyState:C}),t[37]=w,t[38]=b,t[39]=p,t[40]=C,t[41]=A):A=t[41];let d;return t[42]!==u||t[43]!==A?(d=n.jsx(Ie,{children:n.jsx(Ie.Content,{children:n.jsx(Ie.Body,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[u,A]})})})}),t[42]=u,t[43]=A,t[44]=d):d=t[44],d}function zs(t){return n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsx(Es,{org:t}),n.jsx(Ps,{org:t}),n.jsx(Fs,{org:t})]})}function Ls(t){return n.jsx("span",{className:"text-sm text-foreground",children:ws(t.createdAt)})}function Ts(t){return n.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function Ds(t){return n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),n.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{it as default};
|
|
1
|
+
import{c as Te,b as De,r as M,m as Be,j as n,P as Ie,K as Ne,n as Ue,e as Le,t as ie,B as I}from"./index-bAk-APf5.js";import{C as ms}from"./collection-table-wrapper-B4fEHlr5.js";import{E as ts}from"./empty-state-waVAb3Lq.js";import{S as us}from"./search-input-DoJXMwA2.js";import{I as Ve}from"./input-BxBJoxld.js";import{L as fs}from"./label-x4aLqYXX.js";import{u as gs}from"./use-debounced-value-Ctprm4qQ.js";import{D as Qe,a as Ge,b as He,c as Ye,d as We,e as Xe}from"./dialog-COSD0NUP.js";import{S as hs,a as xs,b as ps,c as js,d as ys}from"./select-Ctx0Qcgv.js";import{S as vs}from"./switch-DraJj2E9.js";import{B as Ce}from"./badge-7fQBDgDe.js";import{O as Ss,D as bs}from"./schema-E_m7zGJD.js";import{S as Ns}from"./site-slug-uya6Wp4-.js";import{a as we}from"./admin-fetch-CCSvjTk1.js";import{f as ws}from"./format-time-BnbuEtat.js";import"./table-BUHK-A3h.js";import"./ArrowUp-C7FSaCXO.js";import"./SearchMd-W2WgbmqN.js";import"./Check-BG3Vn7Kp.js";import"./ChevronUp-jmQP_hvc.js";import"./differenceInSeconds-NQ4PDo0z.js";const Cs=["owner","admin","user"],as=Object.entries(Ss.shape).map(([t,e])=>({key:t,description:e.description??"",defaultOn:bs.has(t)})),ns=new Set(as.map(t=>t.key)),is=/^(?=.{1,64}$)[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;function _s(t){const e={};for(const[i,s]of Object.entries(t)){if(typeof s!="boolean")return null;e[i]=s}return e}function Es(t){const e=Te.c(133),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(null),[P,R]=M.useState(!1),[b,_]=M.useState(""),[k,p]=M.useState(null),[r,o]=M.useState(!1),[x,E]=M.useState(""),[N,f]=M.useState(null),F=Ue();let j;e[0]!==i.id?(j=Ne.deploymentAdminOrgFlags(i.id),e[0]=i.id,e[1]=j):j=e[1];let w;e[2]!==i.id?(w=()=>we(`/api/_admin/orgs/${i.id}/flags`),e[2]=i.id,e[3]=w):w=e[3];let h;e[4]!==S||e[5]!==j||e[6]!==w?(h={queryKey:j,queryFn:w,enabled:S},e[4]=S,e[5]=j,e[6]=w,e[7]=h):h=e[7];const{data:u,isLoading:C,isFetching:A,isError:d}=Be(h),y=C||A;let z;e[8]!==u?.effective?(z=u?.effective??{},e[8]=u?.effective,e[9]=z):z=e[9];const B=z;let Z;e[10]!==u?.flags?(Z=u?.flags??{},e[10]=u?.flags,e[11]=Z):Z=e[11];const c=a??Z;let q;e[12]!==i.id?(q=ne=>we(`/api/_admin/orgs/${i.id}/flags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)}),e[12]=i.id,e[13]=q):q=e[13];let G;e[14]!==s?(G=ne=>{ie.error(ne instanceof Error?ne.message:s("admin.orgs.failedSaveFlags"))},e[14]=s,e[15]=G):G=e[15];const g=Le({mutationFn:q,onSuccess:()=>{ie.success(s("admin.orgs.flagsSaved",{org:i.name})),F.invalidateQueries({queryKey:Ne.deploymentAdminOrgFlags(i.id)}),J(),O(!1)},onError:G}),J=()=>{K(null),R(!1),_(""),p(null),o(!1),E(""),f(null)};let L;e[16]!==J?(L=ne=>{O(ne),ne||J()},e[16]=J,e[17]=L):L=e[17];const v=L;let T,D,H,U,V,ee,Y,W,Q,se;if(e[18]!==c||e[19]!==a||e[20]!==B||e[21]!==v||e[22]!==y||e[23]!==d||e[24]!==r||e[25]!==x||e[26]!==g||e[27]!==b||e[28]!==k||e[29]!==S||e[30]!==i.name||e[31]!==P||e[32]!==s){const ne=new Set(ns),Ze=as.map(Os);for(const m of Object.keys(c))ne.has(m)||(ne.add(m),Ze.push({key:m,description:"",defaultOn:!1,known:!1}));let Ee;e[43]!==c?(Ee=(m,te)=>K({...c,[m]:te}),e[43]=c,e[44]=Ee):Ee=e[44];const Oe=Ee;let Pe;e[45]!==c||e[46]!==b||e[47]!==Oe||e[48]!==s?(Pe=()=>{const m=b.trim();if(!is.test(m)){p(s("admin.orgs.invalidFlagKey"));return}if(ns.has(m)||m in c){p(s("admin.orgs.duplicateFlagKey"));return}Oe(m,!0),_(""),p(null),R(!1)},e[45]=c,e[46]=b,e[47]=Oe,e[48]=s,e[49]=Pe):Pe=e[49];const es=Pe;let ke;e[50]!==c||e[51]!==r?(ke=()=>{r||(E(JSON.stringify(c,null,2)),f(null),o(!0))},e[50]=c,e[51]=r,e[52]=ke):ke=e[52];const $e=ke;let fe,ae;e[53]!==r||e[54]!==x||e[55]!==s?(fe=()=>{if(!r)return;const m=ae();if(!m){f(s("admin.orgs.invalidJson"));return}K(m),f(null),o(!1)},ae=()=>{let m;try{m=JSON.parse(x)}catch{return null}if(!m||typeof m!="object"||Array.isArray(m))return null;const te=Object.entries(m);for(const[Ae,Me]of te)if(!is.test(Ae)||typeof Me!="boolean")return null;return Object.fromEntries(te)},e[53]=r,e[54]=x,e[55]=s,e[56]=fe,e[57]=ae):(fe=e[56],ae=e[57]);let Fe;e[58]!==c||e[59]!==a||e[60]!==v||e[61]!==r||e[62]!==g||e[63]!==ae||e[64]!==s?(Fe=()=>{const m=r?ae():_s(c);if(!m){f(s(r?"admin.orgs.invalidJson":"admin.orgs.invalidStoredValue"));return}if(f(null),a===null){v(!1);return}g.mutate({flags:m,mode:"replace"})},e[58]=c,e[59]=a,e[60]=v,e[61]=r,e[62]=g,e[63]=ae,e[64]=s,e[65]=Fe):Fe=e[65],H=Fe,D=Qe,Y=S,W=v;let ge;e[66]!==s?(ge=s("admin.orgs.flags"),e[66]=s,e[67]=ge):ge=e[67],e[68]!==ge?(Q=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:ge})}),e[68]=ge,e[69]=Q):Q=e[69],T=He,se="sm:max-w-2xl";let he;e[70]!==i.name||e[71]!==s?(he=s("admin.orgs.flagsFor",{org:i.name}),e[70]=i.name,e[71]=s,e[72]=he):he=e[72],e[73]!==he?(U=n.jsx(Ye,{children:n.jsx(We,{children:he})}),e[73]=he,e[74]=U):U=e[74];let xe;e[75]!==s?(xe=s("admin.orgs.flagsDescription"),e[75]=s,e[76]=xe):xe=e[76];let pe;e[77]!==xe?(pe=n.jsx("p",{className:"text-sm text-muted-foreground",children:xe}),e[77]=xe,e[78]=pe):pe=e[78];const Re=r?"outline":"secondary";let je;e[79]!==s?(je=s("admin.orgs.flagsViewToggles"),e[79]=s,e[80]=je):je=e[80];let ye;e[81]!==fe||e[82]!==d||e[83]!==Re||e[84]!==je?(ye=n.jsx(I,{variant:Re,size:"sm",onClick:fe,disabled:d,children:je}),e[81]=fe,e[82]=d,e[83]=Re,e[84]=je,e[85]=ye):ye=e[85];const qe=r?"secondary":"outline",Je=y||d;let ve;e[86]!==s?(ve=s("admin.orgs.flagsViewJson"),e[86]=s,e[87]=ve):ve=e[87];let Se;e[88]!==$e||e[89]!==qe||e[90]!==Je||e[91]!==ve?(Se=n.jsx(I,{variant:qe,size:"sm",onClick:$e,disabled:Je,children:ve}),e[88]=$e,e[89]=qe,e[90]=Je,e[91]=ve,e[92]=Se):Se=e[92];let be;e[93]!==ye||e[94]!==Se?(be=n.jsxs("div",{className:"flex shrink-0 gap-1",children:[ye,Se]}),e[93]=ye,e[94]=Se,e[95]=be):be=e[95],e[96]!==pe||e[97]!==be?(V=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[pe,be]}),e[96]=pe,e[97]=be,e[98]=V):V=e[98],ee=d?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadFlags")}):r?n.jsxs("div",{className:"space-y-2",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.jsonReplaceHint")}),n.jsx("textarea",{"aria-label":s("admin.orgs.jsonEditorLabel"),value:x,spellCheck:!1,disabled:g.isPending,onChange:m=>{E(m.target.value),f(null)},className:"h-64 w-full rounded-md border border-border bg-background p-3 font-mono text-sm text-foreground"})]}):n.jsxs("div",{className:"max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[Ze.map(m=>{const{key:te,description:Ae,defaultOn:Me,known:rs}=m,ze=c[te],os=typeof ze=="boolean"?ze:B[te]??!1,ss=ze===void 0,ds=!ss&&typeof ze!="boolean";return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(vs,{"aria-label":te,checked:os,disabled:y||g.isPending,onCheckedChange:cs=>Oe(te,cs)}),n.jsxs("div",{className:"min-w-0 space-y-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("code",{className:"text-sm font-medium text-foreground",children:te}),Me?n.jsx(Ce,{variant:"secondary",size:"default",children:s("admin.orgs.flagDefaultOn")}):null,rs?null:n.jsx(Ce,{variant:"warning",size:"default",children:s("admin.orgs.flagCustom")}),ss?n.jsx(Ce,{variant:"outline",size:"default",children:s("admin.orgs.flagUnset")}):null,ds?n.jsx(Ce,{variant:"destructive",size:"default",children:s("admin.orgs.flagInvalid")}):null]}),Ae?n.jsx("p",{className:"text-sm text-muted-foreground",children:Ae}):null]})]},te)}),P?n.jsxs("div",{className:"space-y-1 border-t border-border pt-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{autoFocus:!0,"aria-label":s("admin.orgs.customFlagKeyLabel"),value:b,placeholder:s("admin.orgs.customFlagKeyPlaceholder"),onChange:m=>{_(m.target.value),p(null)},onKeyDown:m=>{m.key==="Enter"&&es()},className:"font-mono"}),n.jsx(I,{variant:"outline",onClick:es,children:s("admin.orgs.add")})]}),k?n.jsx("p",{className:"text-sm text-destructive",children:k}):null]}):n.jsx(I,{variant:"outline",size:"sm",disabled:y,onClick:()=>R(!0),children:s("admin.orgs.addCustomFlag")})]}),e[18]=c,e[19]=a,e[20]=B,e[21]=v,e[22]=y,e[23]=d,e[24]=r,e[25]=x,e[26]=g,e[27]=b,e[28]=k,e[29]=S,e[30]=i.name,e[31]=P,e[32]=s,e[33]=T,e[34]=D,e[35]=H,e[36]=U,e[37]=V,e[38]=ee,e[39]=Y,e[40]=W,e[41]=Q,e[42]=se}else T=e[33],D=e[34],H=e[35],U=e[36],V=e[37],ee=e[38],Y=e[39],W=e[40],Q=e[41],se=e[42];let l;e[99]!==N?(l=N?n.jsx("p",{className:"text-sm text-destructive",children:N}):null,e[99]=N,e[100]=l):l=e[100];let $;e[101]!==v?($=()=>v(!1),e[101]=v,e[102]=$):$=e[102];const le=g.isPending;let re;e[103]!==s?(re=s("admin.orgs.cancel"),e[103]=s,e[104]=re):re=e[104];let oe;e[105]!==g.isPending||e[106]!==$||e[107]!==re?(oe=n.jsx(I,{variant:"outline",onClick:$,disabled:le,children:re}),e[105]=g.isPending,e[106]=$,e[107]=re,e[108]=oe):oe=e[108];const Ke=y||d||g.isPending;let de;e[109]!==g.isPending||e[110]!==s?(de=g.isPending?s("admin.orgs.saving"):s("admin.orgs.save"),e[109]=g.isPending,e[110]=s,e[111]=de):de=e[111];let ce;e[112]!==H||e[113]!==Ke||e[114]!==de?(ce=n.jsx(I,{onClick:H,disabled:Ke,children:de}),e[112]=H,e[113]=Ke,e[114]=de,e[115]=ce):ce=e[115];let me;e[116]!==oe||e[117]!==ce?(me=n.jsxs(Xe,{children:[oe,ce]}),e[116]=oe,e[117]=ce,e[118]=me):me=e[118];let ue;e[119]!==T||e[120]!==U||e[121]!==V||e[122]!==ee||e[123]!==l||e[124]!==me||e[125]!==se?(ue=n.jsxs(T,{className:se,children:[U,V,ee,l,me]}),e[119]=T,e[120]=U,e[121]=V,e[122]=ee,e[123]=l,e[124]=me,e[125]=se,e[126]=ue):ue=e[126];let _e;return e[127]!==D||e[128]!==Y||e[129]!==W||e[130]!==Q||e[131]!==ue?(_e=n.jsxs(D,{open:Y,onOpenChange:W,children:[Q,ue]}),e[127]=D,e[128]=Y,e[129]=W,e[130]=Q,e[131]=ue,e[132]=_e):_e=e[132],_e}function Os(t){return{...t,known:!0}}class ls extends Error{constructor(e,i,s){super("owned_by_other_org"),this.slug=e,this.ownerName=i,this.ownerSlug=s,this.name="SiteConflictError"}slug;ownerName;ownerSlug}function Ps(t){const e=Te.c(82),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState(null),[b,_]=M.useState(null),k=Ue();let p;e[0]!==i.id?(p=Ne.deploymentAdminOrgSites(i.id),e[0]=i.id,e[1]=p):p=e[1];let r;e[2]!==i.id?(r=()=>we(`/api/_admin/orgs/${i.id}/sites`),e[2]=i.id,e[3]=r):r=e[3];let o;e[4]!==S||e[5]!==p||e[6]!==r?(o={queryKey:p,queryFn:r,enabled:S},e[4]=S,e[5]=p,e[6]=r,e[7]=o):o=e[7];const{data:x,isLoading:E,isError:N}=Be(o);let f;e[8]!==x?.sites?(f=x?.sites??[],e[8]=x?.sites,e[9]=f):f=e[9];const F=f;let j;e[10]!==i.id||e[11]!==k?(j=()=>k.invalidateQueries({queryKey:Ne.deploymentAdminOrgSites(i.id)}),e[10]=i.id,e[11]=k,e[12]=j):j=e[12];const w=j;let h;e[13]!==i.id?(h=async l=>{const $=await fetch(`/api/_admin/orgs/${i.id}/sites`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),le=await $.json().catch(ks);if($.status===409&&le.error==="owned_by_other_org")throw new ls(l.slug,le.ownerOrganizationName??null,le.ownerOrganizationSlug??null);if(!$.ok)throw new Error(le.error||`Request failed (HTTP ${$.status})`);return le},e[13]=i.id,e[14]=h):h=e[14];let u;e[15]!==w||e[16]!==i.name||e[17]!==s?(u=(l,$)=>{ie.success($.reassign?s("admin.orgs.siteReassigned",{slug:$.slug,org:i.name}):s("admin.orgs.siteAdded",{slug:$.slug,org:i.name})),w(),K(""),R(null),_(null)},e[15]=w,e[16]=i.name,e[17]=s,e[18]=u):u=e[18];let C;e[19]!==s?(C=l=>{if(l instanceof ls){_({slug:l.slug,ownerName:l.ownerName,ownerSlug:l.ownerSlug});return}ie.error(l instanceof Error?l.message:s("admin.orgs.failedAddSite"))},e[19]=s,e[20]=C):C=e[20];let A;e[21]!==h||e[22]!==u||e[23]!==C?(A={mutationFn:h,onSuccess:u,onError:C},e[21]=h,e[22]=u,e[23]=C,e[24]=A):A=e[24];const d=Le(A);let y;e[25]!==i.id?(y=l=>we(`/api/_admin/orgs/${i.id}/sites/${encodeURIComponent(l)}`,{method:"DELETE"}),e[25]=i.id,e[26]=y):y=e[26];let z;e[27]!==w||e[28]!==i.name||e[29]!==s?(z=(l,$)=>{ie.success(s("admin.orgs.siteRemoved",{slug:$,org:i.name})),w()},e[27]=w,e[28]=i.name,e[29]=s,e[30]=z):z=e[30];let B;e[31]!==s?(B=l=>{ie.error(l instanceof Error?l.message:s("admin.orgs.failedRemoveSite"))},e[31]=s,e[32]=B):B=e[32];let Z;e[33]!==y||e[34]!==z||e[35]!==B?(Z={mutationFn:y,onSuccess:z,onError:B},e[33]=y,e[34]=z,e[35]=B,e[36]=Z):Z=e[36];const X=Le(Z),c=d.isPending||X.isPending;let q;e[37]===Symbol.for("react.memo_cache_sentinel")?(q=l=>{O(l),l||(K(""),R(null),_(null))},e[37]=q):q=e[37];const G=q;let g;e[38]!==d||e[39]!==a||e[40]!==s?(g=()=>{const l=a.trim().toLowerCase();if(!Ns.test(l)){R(s("admin.orgs.invalidSiteSlug"));return}R(null),_(null),d.mutate({slug:l})},e[38]=d,e[39]=a,e[40]=s,e[41]=g):g=e[41];const J=g;let L;e[42]!==s?(L=s("admin.orgs.sites"),e[42]=s,e[43]=L):L=e[43];let v;e[44]!==L?(v=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:L})}),e[44]=L,e[45]=v):v=e[45];let T;e[46]!==i.name||e[47]!==s?(T=s("admin.orgs.sitesFor",{org:i.name}),e[46]=i.name,e[47]=s,e[48]=T):T=e[48];let D;e[49]!==T?(D=n.jsx(Ye,{children:n.jsx(We,{children:T})}),e[49]=T,e[50]=D):D=e[50];let H;e[51]!==s?(H=s("admin.orgs.sitesDescription"),e[51]=s,e[52]=H):H=e[52];let U;e[53]!==H?(U=n.jsx("p",{className:"text-sm text-muted-foreground",children:H}),e[53]=H,e[54]=U):U=e[54];let V;e[55]!==P||e[56]!==d||e[57]!==c||e[58]!==b||e[59]!==J||e[60]!==N||e[61]!==E||e[62]!==a||e[63]!==X||e[64]!==F||e[65]!==s?(V=N?n.jsx("p",{className:"text-sm text-destructive",children:s("admin.orgs.failedLoadSites")}):n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"max-h-[45vh] space-y-2 overflow-y-auto pr-1",children:E?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.loading")}):F.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:s("admin.orgs.noSites")}):F.map(l=>n.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border p-2",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("code",{className:"truncate text-sm font-medium text-foreground",children:l.slug}),n.jsx(Ce,{variant:"outline",size:"default",children:l.source})]}),n.jsx(I,{variant:"ghost",size:"sm",disabled:c,onClick:()=>X.mutate(l.slug),children:s("admin.orgs.remove")})]},l.slug))}),n.jsxs("div",{className:"space-y-1 border-t border-border pt-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ve,{value:a,placeholder:s("admin.orgs.siteSlugPlaceholder"),disabled:d.isPending,onChange:l=>{K(l.target.value),R(null),_(null)},onKeyDown:l=>{l.key==="Enter"&&J()},className:"font-mono"}),n.jsx(I,{variant:"outline",disabled:!a.trim()||d.isPending,onClick:J,children:s("admin.orgs.add")})]}),P?n.jsx("p",{className:"text-sm text-destructive",children:P}):null,b?n.jsxs("div",{className:"space-y-2 rounded-md border border-warning/50 bg-warning/10 p-3",children:[n.jsx("p",{className:"text-sm text-foreground",children:s("admin.orgs.siteReassignWarning",{slug:b.slug,owner:b.ownerName||b.ownerSlug||s("admin.orgs.anotherOrg")})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(I,{variant:"outline",size:"sm",disabled:d.isPending,onClick:()=>_(null),children:s("admin.orgs.cancel")}),n.jsx(I,{variant:"destructive",size:"sm",disabled:d.isPending,onClick:()=>d.mutate({slug:b.slug,reassign:!0}),children:s("admin.orgs.reassignConfirm")})]})]}):null]})]}),e[55]=P,e[56]=d,e[57]=c,e[58]=b,e[59]=J,e[60]=N,e[61]=E,e[62]=a,e[63]=X,e[64]=F,e[65]=s,e[66]=V):V=e[66];let ee;e[67]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>G(!1),e[67]=ee):ee=e[67];let Y;e[68]!==s?(Y=s("admin.orgs.close"),e[68]=s,e[69]=Y):Y=e[69];let W;e[70]!==c||e[71]!==Y?(W=n.jsx(Xe,{children:n.jsx(I,{variant:"outline",onClick:ee,disabled:c,children:Y})}),e[70]=c,e[71]=Y,e[72]=W):W=e[72];let Q;e[73]!==D||e[74]!==U||e[75]!==V||e[76]!==W?(Q=n.jsxs(He,{className:"sm:max-w-lg",children:[D,U,V,W]}),e[73]=D,e[74]=U,e[75]=V,e[76]=W,e[77]=Q):Q=e[77];let se;return e[78]!==S||e[79]!==v||e[80]!==Q?(se=n.jsxs(Qe,{open:S,onOpenChange:G,children:[v,Q]}),e[78]=S,e[79]=v,e[80]=Q,e[81]=se):se=e[81],se}function ks(){return{}}function Fs(t){const e=Te.c(75),{org:i}=t,s=De(),[S,O]=M.useState(!1),[a,K]=M.useState(""),[P,R]=M.useState("user"),b=Ue();let _;e[0]!==a||e[1]!==i.id||e[2]!==P?(_=()=>we(`/api/_admin/orgs/${i.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:P})}),e[0]=a,e[1]=i.id,e[2]=P,e[3]=_):_=e[3];let k;e[4]!==a||e[5]!==i.name||e[6]!==b||e[7]!==s?(k=()=>{ie.success(s("admin.orgs.memberAdded",{email:a.trim(),org:i.name})),b.invalidateQueries({queryKey:Ne.deploymentAdminOrgsList()}),O(!1),K(""),R("user")},e[4]=a,e[5]=i.name,e[6]=b,e[7]=s,e[8]=k):k=e[8];let p;e[9]!==s?(p=D=>{ie.error(D instanceof Error?D.message:s("admin.orgs.failedAddMember"))},e[9]=s,e[10]=p):p=e[10];let r;e[11]!==_||e[12]!==k||e[13]!==p?(r={mutationFn:_,onSuccess:k,onError:p},e[11]=_,e[12]=k,e[13]=p,e[14]=r):r=e[14];const o=Le(r);let x;e[15]!==s?(x=s("admin.orgs.addMember"),e[15]=s,e[16]=x):x=e[16];let E;e[17]!==x?(E=n.jsx(Ge,{asChild:!0,children:n.jsx(I,{variant:"outline",size:"sm",children:x})}),e[17]=x,e[18]=E):E=e[18];let N;e[19]!==i.name||e[20]!==s?(N=s("admin.orgs.addMemberTo",{org:i.name}),e[19]=i.name,e[20]=s,e[21]=N):N=e[21];let f;e[22]!==N?(f=n.jsx(Ye,{children:n.jsx(We,{children:N})}),e[22]=N,e[23]=f):f=e[23];let F;e[24]!==s?(F=s("admin.orgs.email"),e[24]=s,e[25]=F):F=e[25];let j;e[26]!==F?(j=n.jsx(fs,{htmlFor:"admin-add-member-email",children:F}),e[26]=F,e[27]=j):j=e[27];let w;e[28]===Symbol.for("react.memo_cache_sentinel")?(w=D=>K(D.target.value),e[28]=w):w=e[28];let h;e[29]!==s?(h=s("admin.orgs.emailPlaceholder"),e[29]=s,e[30]=h):h=e[30];let u;e[31]!==a||e[32]!==o.isPending||e[33]!==h?(u=n.jsx(Ve,{id:"admin-add-member-email",type:"email",value:a,onChange:w,placeholder:h,disabled:o.isPending}),e[31]=a,e[32]=o.isPending,e[33]=h,e[34]=u):u=e[34];let C;e[35]!==j||e[36]!==u?(C=n.jsxs("div",{className:"space-y-2",children:[j,u]}),e[35]=j,e[36]=u,e[37]=C):C=e[37];let A;e[38]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(xs,{className:"w-full",children:n.jsx(ps,{})}),e[38]=A):A=e[38];let d;e[39]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(js,{children:Cs.map(As)}),e[39]=d):d=e[39];let y;e[40]!==o.isPending||e[41]!==P?(y=n.jsxs(hs,{value:P,onValueChange:R,disabled:o.isPending,children:[A,d]}),e[40]=o.isPending,e[41]=P,e[42]=y):y=e[42];let z;e[43]!==C||e[44]!==y?(z=n.jsxs("div",{className:"space-y-4",children:[C,y]}),e[43]=C,e[44]=y,e[45]=z):z=e[45];let B;e[46]===Symbol.for("react.memo_cache_sentinel")?(B=()=>O(!1),e[46]=B):B=e[46];const Z=o.isPending;let X;e[47]!==s?(X=s("admin.orgs.cancel"),e[47]=s,e[48]=X):X=e[48];let c;e[49]!==o.isPending||e[50]!==X?(c=n.jsx(I,{variant:"outline",onClick:B,disabled:Z,children:X}),e[49]=o.isPending,e[50]=X,e[51]=c):c=e[51];let q;e[52]!==o?(q=()=>o.mutate(),e[52]=o,e[53]=q):q=e[53];let G;e[54]!==a||e[55]!==o.isPending?(G=!a.trim()||o.isPending,e[54]=a,e[55]=o.isPending,e[56]=G):G=e[56];let g;e[57]!==o.isPending||e[58]!==s?(g=o.isPending?s("admin.orgs.adding"):s("admin.orgs.addMember"),e[57]=o.isPending,e[58]=s,e[59]=g):g=e[59];let J;e[60]!==q||e[61]!==G||e[62]!==g?(J=n.jsx(I,{onClick:q,disabled:G,children:g}),e[60]=q,e[61]=G,e[62]=g,e[63]=J):J=e[63];let L;e[64]!==c||e[65]!==J?(L=n.jsxs(Xe,{children:[c,J]}),e[64]=c,e[65]=J,e[66]=L):L=e[66];let v;e[67]!==z||e[68]!==L||e[69]!==f?(v=n.jsxs(He,{className:"sm:max-w-md",children:[f,z,L]}),e[67]=z,e[68]=L,e[69]=f,e[70]=v):v=e[70];let T;return e[71]!==S||e[72]!==v||e[73]!==E?(T=n.jsxs(Qe,{open:S,onOpenChange:O,children:[E,v]}),e[71]=S,e[72]=v,e[73]=E,e[74]=T):T=e[74],T}function As(t){return n.jsx(ys,{value:t,children:n.jsx("span",{className:"capitalize",children:t})},t)}function it(){const t=Te.c(45),e=De(),[i,s]=M.useState("");let S;t[0]!==i?(S=i.trim(),t[0]=i,t[1]=S):S=t[1];const O=gs(S,300);let a;t[2]!==O?(a=Ne.deploymentAdminOrgs(O),t[2]=O,t[3]=a):a=t[3];let K;t[4]!==O?(K=()=>{const y=new URLSearchParams({limit:"100"});return O&&y.set("search",O),we(`/api/_admin/orgs?${y}`)},t[4]=O,t[5]=K):K=t[5];let P;t[6]!==a||t[7]!==K?(P={queryKey:a,queryFn:K},t[6]=a,t[7]=K,t[8]=P):P=t[8];const{data:R,isLoading:b,isError:_}=Be(P);let k;t[9]!==R?.organizations?(k=R?.organizations??[],t[9]=R?.organizations,t[10]=k):k=t[10];const p=k;let r;t[11]!==e?(r=e("admin.orgs.organization"),t[11]=e,t[12]=r):r=t[12];let o;t[13]!==r?(o={id:"name",header:r,render:Ds,cellClassName:"flex-1 min-w-0"},t[13]=r,t[14]=o):o=t[14];let x;t[15]!==e?(x=e("admin.orgs.members"),t[15]=e,t[16]=x):x=t[16];let E;t[17]!==x?(E={id:"members",header:x,render:Ts,cellClassName:"w-24 shrink-0"},t[17]=x,t[18]=E):E=t[18];let N;t[19]!==e?(N=e("admin.orgs.created"),t[19]=e,t[20]=N):N=t[20];let f;t[21]!==N?(f={id:"created",header:N,render:Ls,cellClassName:"w-48 shrink-0"},t[21]=N,t[22]=f):f=t[22];let F;t[23]===Symbol.for("react.memo_cache_sentinel")?(F={id:"actions",header:"",render:zs,cellClassName:"w-auto shrink-0"},t[23]=F):F=t[23];let j;t[24]!==f||t[25]!==o||t[26]!==E?(j=[o,E,f,F],t[24]=f,t[25]=o,t[26]=E,t[27]=j):j=t[27];const w=j;let h;t[28]!==e?(h=e("admin.orgs.searchPlaceholder"),t[28]=e,t[29]=h):h=t[29];let u;t[30]!==i||t[31]!==h?(u=n.jsx(us,{value:i,onChange:s,placeholder:h,className:"w-full md:w-[375px]"}),t[30]=i,t[31]=h,t[32]=u):u=t[32];let C;t[33]!==O||t[34]!==_||t[35]!==e?(C=_?n.jsx(ts,{title:e("admin.orgs.failedLoadOrgs"),description:e("admin.orgs.failedLoadOrgsDescription")}):n.jsx(ts,{title:e("admin.orgs.noOrgsFound"),description:O?e("admin.orgs.noOrgsMatchSearch",{search:O}):e("admin.orgs.noOrgsYet")}),t[33]=O,t[34]=_,t[35]=e,t[36]=C):C=t[36];let A;t[37]!==w||t[38]!==b||t[39]!==p||t[40]!==C?(A=n.jsx(ms,{columns:w,data:p,isLoading:b,emptyState:C}),t[37]=w,t[38]=b,t[39]=p,t[40]=C,t[41]=A):A=t[41];let d;return t[42]!==u||t[43]!==A?(d=n.jsx(Ie,{children:n.jsx(Ie.Content,{children:n.jsx(Ie.Body,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[u,A]})})})}),t[42]=u,t[43]=A,t[44]=d):d=t[44],d}function zs(t){return n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsx(Es,{org:t}),n.jsx(Ps,{org:t}),n.jsx(Fs,{org:t})]})}function Ls(t){return n.jsx("span",{className:"text-sm text-foreground",children:ws(t.createdAt)})}function Ts(t){return n.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function Ds(t){return n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),n.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{it as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,n as D,K as k,b as A,j as i}from"./index-
|
|
1
|
+
import{c as w,n as D,K as k,b as A,j as i}from"./index-bAk-APf5.js";import{bq as P,d as $,br as O,aA as N,bs as I,bt as Q,bu as q}from"./index-BPrzfReW.js";import{L}from"./label-x4aLqYXX.js";import{S as K}from"./switch-DraJj2E9.js";import{d as Y,a as z,b as M,c as U,S as W}from"./select-Ctx0Qcgv.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function G(c,e,t,d){if(c.kind==="page"){if(!_(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:P(d,h)}}return _(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function le(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function oe(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,r=D(),a=`${t}/${d}/${h}`;let m;e[0]!==h||e[1]!==t||e[2]!==d?(m={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=m):m=e[3];let l;e[4]!==f?(l={onSaved:f},e[4]=f,e[5]=l):l=e[5];const{save:n,flush:u,isPending:p}=$(m,l);let y;e[6]!==a||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const x=r.getQueryData(k.decofile(a))?.[s.blockKey];return G(o,s,x,v)})},e[6]=a,e[7]=r,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let S;e[12]!==a||e[13]!==r||e[14]!==s||e[15]!==n||e[16]!==o?(S=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const x=r.getQueryData(k.decofile(a))?.[s.blockKey];return _(x)?{...x,seo:v}:null})},e[12]=a,e[13]=r,e[14]=s,e[15]=n,e[16]=o,e[17]=S):S=e[17];const b=S;let j;return e[18]!==u||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:u,isPending:p},e[18]=u,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const H="https://deco.cx/docs/en/performance/edge-async-render";function J(c){const e=w.c(23),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=A();let f;e[0]!==t?(f=N(t),e[0]=t,e[1]=f):f=e[1];const r=f;let a;e[2]!==t?(a=O(t),e[2]=t,e[3]=a):a=e[3];const m=a;let l;e[4]!==s?(l=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=l):l=e[5];let n;e[6]!==l?(n=i.jsx(L,{htmlFor:"seo-enable",className:"text-sm font-medium",children:l}),e[6]=l,e[7]=n):n=e[7];let u;e[8]!==r||e[9]!==d?(u=i.jsx(K,{id:"seo-enable",checked:r,onCheckedChange:d}),e[8]=r,e[9]=d,e[10]=u):u=e[10];let p;e[11]!==n||e[12]!==u?(p=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n,u]}),e[11]=n,e[12]=u,e[13]=p):p=e[13];let y;e[14]!==m||e[15]!==o||e[16]!==r||e[17]!==h||e[18]!==s?(y=r&&i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:s("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:H,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:s("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(K,{id:"seo-async-render",checked:m,onCheckedChange:h,className:"shrink-0"})]})]}),e[14]=m,e[15]=o,e[16]=r,e[17]=h,e[18]=s,e[19]=y):y=e[19];let g;return e[20]!==p||e[21]!==y?(g=i.jsxs("div",{className:"space-y-4",children:[p,y]}),e[20]=p,e[21]=y,e[22]=g):g=e[22],g}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=A();if(t.length<=1)return null;let s;e[0]!==o?(s=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=s):s=e[1];let f;e[2]!==s?(f=i.jsx(L,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let r;e[4]!==o?(r=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=r):r=e[5];let a;e[6]!==r?(a=i.jsx(z,{className:"w-full",children:i.jsx(M,{placeholder:r})}),e[6]=r,e[7]=a):a=e[7];let m;e[8]!==t?(m=t.filter(Z).map(X),e[8]=t,e[9]=m):m=e[9];let l;e[10]!==m?(l=i.jsx(U,{children:m}),e[10]=m,e[11]=l):l=e[11];let n;e[12]!==h||e[13]!==a||e[14]!==l||e[15]!==d?(n=i.jsxs(W,{value:d,onValueChange:h,children:[a,l]}),e[12]=h,e[13]=a,e[14]=l,e[15]=d,e[16]=n):n=e[16];let u;return e[17]!==f||e[18]!==n?(u=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=u):u=e[19],u}function X(c){return i.jsx(Y,{value:c.resolveType,children:c.title},c.resolveType)}function Z(c){return c.resolveType.length>0}function re(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:r,siteDefaultSeo:a,onBreadcrumbChange:m,onPersistRaw:l,onInnerChange:n,onClearForm:u,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==u||e[3]!==l?(g=C=>{if(C){const F=q(h);l(F),u(),p();return}l(null),u(),p()},e[0]=h,e[1]=p,e[2]=u,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==l||e[6]!==t?(b=C=>{const F=I(C,t);l(F)},e[5]=l,e[6]=t,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let x;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(x=N(t)&&o&&s&&f&&f.length>0&&i.jsx(V,{options:f,value:s,onChange:T}),e[11]=s,e[12]=T,e[13]=t,e[14]=o,e[15]=f,e[16]=x):x=e[16];let R;e[17]!==s||e[18]!==r||e[19]!==d||e[20]!==m||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==a?(R=N(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:r,onChange:C=>n(C),onBreadcrumbChange:m,siteDefaultSeo:a}),e[17]=s,e[18]=r,e[19]=d,e[20]=m,e[21]=n,e[22]=t,e[23]=o,e[24]=a,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==S||e[29]!==t||e[30]!==x||e[31]!==R?(E=i.jsxs(J,{rawSeo:t,onEnableChange:S,onAsyncRenderChange:j,children:[y,x,R]}),e[26]=y,e[27]=j,e[28]=S,e[29]=t,e[30]=x,e[31]=R,e[32]=E):E=e[32],E}export{re as P,le as a,G as b,oe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,br as H,j as a,e2 as L,bv as z,bs as O,bo as b,bu as P,e3 as _,cH as j,e4 as G,e5 as w,e7 as K,e9 as q,bq as U,ec as V,e8 as W,ea as Z,eb as B,ed as J,ee as Q,c as C,l as X}from"./index-
|
|
1
|
+
import{r as i,br as H,j as a,e2 as L,bv as z,bs as O,bo as b,bu as P,e3 as _,cH as j,e4 as G,e5 as w,e7 as K,e9 as q,bq as U,ec as V,e8 as W,ea as Z,eb as B,ed as J,ee as Q,c as C,l as X}from"./index-bAk-APf5.js";var m="Popover",[E]=U(m,[w]),g=w(),[Y,d]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=H({prop:r,defaultProp:n??!1,onChange:s,caller:m});return a.jsx(L,{...p,children:a.jsx(Y,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(R=>!R),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=g(o),c=O(e,n.triggerRef),p=a.jsx(b.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var A="PopoverPortal",[ee,oe]=E(A,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(A,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(j,{present:o||s.open,children:a.jsx(G,{asChild:!0,container:n,children:r})})})};M.displayName=A;var v="PopoverContent",T=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(j,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});T.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return K(c)},[]),a.jsx(q,{as:te,allowPinchZoom:!0,children:a.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),R=g(o);return W(),a.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(B,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(J,{"data-state":$(f.open),role:"dialog",id:f.contentId,...R,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(I,o);return a.jsx(b.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=T;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as nt,b as ct,r as ft,v as wt,l as Z,j as e,B as at}from"./index-CAw6g9tV.js";import{i as Tt}from"./AlertCircle-CG7tfapy.js";import{au as zt,y as Et}from"./agent-icon-Dsw04fQF.js";import{i as At}from"./ChevronRight-CKftPemQ.js";import{s as Pt}from"./Plus-D7VA57q5.js";import{a as _t,b as Mt,A as It}from"./alert-CctLdkUH.js";import{S as Lt}from"./scroll-area-BI805ul_.js";import{B as Ut,bC as Ot,a5 as $t,bx as Ht,by as Rt,bD as Bt,bw as bt,bA as ht,bE as Ft,bF as Kt}from"./index-DH6qLcGa.js";import"./Tool01-CtOHcy0Y.js";import"./ArrowUp-CxKA4POx.js";import"./ArrowLeft-Dexv6rHk.js";import"./Tool02-DHxIusmd.js";import"./XCircle-DZJkY1-f.js";import"./TrendUp01-BctNF4vg.js";import"./ZoomOut-D8t79aO2.js";import"./Users03-cesUeOsp.js";import"./CheckCircle-BnpxIwzg.js";import"./Check-Jn0qXgT0.js";import"./ChevronUp-BCwuiyHj.js";import"./ChevronSelectorVertical-BPOo032l.js";import"./DotsVertical-C65YDOa_.js";import"./UserSquare-BEv1iIj5.js";import"./Copy01-jXW2eGyY.js";import"./CreditCard01-Zn4AjX46.js";import"./Download01-BpcIjY9x.js";import"./Settings02-DfFNQquZ.js";import"./Eye-DvBjB5D4.js";import"./Share07-8oXDBqwk.js";import"./GitBranch01-Bde_Ik_K.js";import"./Globe01-D2uoGclE.js";import"./XClose-mJWP0IZB.js";import"./HardDrive-CBqO3DS3.js";import"./Image01-0uExgWAI.js";import"./Key01-BiKWCM1S.js";import"./Link01-C7a_h6ys.js";import"./LinkExternal01-D_IXdPPU.js";import"./Monitor01-CKYtARge.js";import"./Sun-N_eYVUUU.js";import"./Package-D0PXqO6P.js";import"./Palette-CQVEzzhe.js";import"./Play-CONIoWIl.js";import"./SearchMd-C1loDEwy.js";import"./Shield01-CrPC_5gY.js";import"./Stars01-BTmtR5If.js";import"./Trash01-CHla-FrA.js";import"./Upload01-VP9EBYtl.js";import"./User01-8XeMepHg.js";import"./Users01-CvPFHBcf.js";import"./Zap-JQtzyV8B.js";import"./select-Bnv10Fl8.js";import"./chat-context-ffF_r7RU.js";import"./use-panel-navigate-9qdFpFC-.js";import"./use-destination-route-C5lOfatk.js";import"./thread-route-CxY5TjeM.js";import"./dialog-DDd8wUS7.js";import"./constants-DNuUCxmW.js";import"./thread-intent-C3PV-LRn.js";import"./slugify-CEUa2lfQ.js";import"./hooks-J2gbnuVW.js";import"./use-mcp-client-BJohqqSd.js";import"./auth-Ctf1zdSk.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Cp5pr9Ve.js";import"./task-board-DHq8t-_N.js";import"./schema-BoK0jTZh.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-B2TPjUHz.js";import"./use-ai-providers-CiO6eVCB.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Bs4lGo6F.js";import"./use-organization-settings-Dh58cpUx.js";import"./automation-runs-BP4svOKv.js";import"./useInfiniteQuery-Nq5i14p1.js";import"./use-infinite-scroll-DHeLsiAD.js";import"./use-connection-GI8Focwr.js";import"./table-D_mk2-gB.js";import"./empty-state-L8hCXC--.js";import"./use-members-C7ip6O59.js";import"./use-org-auth-client-DVDqxM9c.js";import"./use-automations-VoPscQxA.js";import"./useSuspenseInfiniteQuery-ByY64uZl.js";import"./avatar-ayySA21l.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0nulXNR.js";import"./markdown-C1VdpJ5j.js";import"./monaco-editor-DhRI2q0D.js";import"./editor-B0M9C5II.js";import"./types-B2KcVByH.js";import"./shell-layout-X5sLDjab.js";import"./use-project-scope-NvD131m4.js";import"./github-repo-BpKUwJal.js";import"./command-CEQjEkRa.js";import"./index-DU91evk-.js";import"./required-auth-layout-632Nlbdk.js";import"./use-org-sso-3md051eT.js";import"./integration-icon-gY5UnY38.js";import"./use-navigate-to-agent-wxTo_2Wv.js";import"./use-mcp-prompts-DW-tAvJg.js";import"./form-DR4f8DO7.js";import"./label-ByckMHtZ.js";import"./input-CRq9rZYf.js";import"./file-type-icon-C5mq72Tm.js";import"./drawer-CxFI5tCn.js";import"./collection-search-DUFT-3aZ.js";import"./use-mcp-tools-vt3UNphZ.js";import"./tabs-xquvO62b.js";import"./toggle-group-d_5STaVP.js";import"./task-route-DWU-0q6w.js";import"./toolbar-icon-button-DSBvSnFI.js";import"./popover-BIPtCsqc.js";import"./github-repo-picker-Dyu49H5P.js";import"./use-debounced-value-CozflcUh.js";import"./authenticate-and-persist-oauth-UjkEE9k3.js";import"./mcp-oauth-DwPFIejs.js";import"./extract-connection-data-C2Ocp5Tk.js";import"./metadata-dUsYcpuu.js";import"./connection-qt8m11-c.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-Bwgx5OMm.js";import"./use-registry-connections-DtpIh4N8.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BClvRA4H.js";import"./connection-form-helpers-Cs1EiOkG.js";import"./collection-tabs-aHnkLK94.js";import"./badge-BJg3YTbr.js";import"./dropdown-menu-C3Gdadki.js";import"./get-initials-D-f_fDFw.js";import"./select-model-NQ0mnVuK.js";import"./checkbox-DmweFMZg.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Dt2zI1nQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BpKA8nWD.js";import"./toolbar-D-SXcT0t.js";import"./use-file-configs-CjjmtK39.js";import"./site-slug-uya6Wp4-.js";import"./skill-preview-DL4gp0ne.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-BU3enZKF.js";import"./use-debounced-autosave-DJCeP_ec.js";import"./search-input-CFyqYOfd.js";import"./use-mcp-auth-status-Dj0-A5Wa.js";import"./switch-DlPMc1e_.js";import"./use-secrets-N0I1WQgn.js";import"./client-icons-DX-H77xu.js";import"./connect-layout-CS-AhNLB.js";import"./self-tool-result-Dc4tPK9T.js";import"./track-Cc1S4yMy.js";import"./use-tags-EBwNPMg8.js";import"./breadcrumb-B5Tcv0Uh.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CakAIrvQ.js";import"./site-error--i37Vnuw.js";import"./cards-D9Ttj2cE.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Wt(f){const t=nt.c(17),{support:x}=f,s=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(Tt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==s||t[2]!==a?(c=s(a),t[1]=s,t[2]=a,t[3]=c):c=t[3];let i;t[4]!==c?(i=e.jsx(_t,{children:c}),t[4]=c,t[5]=i):i=t[5];let d;t[6]!==o||t[7]!==s?(d=o?s("sandbox.postCalendar.unsupportedRuntimeDescription"):s("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=s,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let n;t[11]!==o?(n=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:Kt}),t[11]=o,t[12]=n):n=t[12];let m;return t[13]!==i||t[14]!==r||t[15]!==n?(m=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[i,r,n]})]})}),t[13]=i,t[14]=r,t[15]=n,t[16]=m):m=t[16],m}function Wo(f){const t=nt.c(94),{decofile:x,support:s,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:i}=f,d=i===void 0?!1:i,r=ct();let n;t[0]!==s?(n=Ut(s),t[0]=s,t[1]=n):n=t[1];const m=n,[g,y]=ft.useState(null),[N]=wt(),[b,w]=ft.useState(Vt),h=N.language;let D;t[2]!==b||t[3]!==h?(D=new Intl.DateTimeFormat(h,{month:"long",year:"numeric"}).format(b),t[2]=b,t[3]=h,t[4]=D):D=t[4];const u=D;let j,C,T,z,k,E,A,P,_,M,S;if(t[5]!==m||t[6]!==b||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==h||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const vt=new Intl.DateTimeFormat(h,{weekday:"short"}),Ct=new Intl.DateTimeFormat(h,{dateStyle:"long"}),{byDay:Nt,undated:mt}=Ot($t(x)),dt=Ht(b),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(bt(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>w(qt),t[39]=it):it=t[39];let K;t[40]!==r?(K=r("sandbox.postCalendar.next"),t[40]=r,t[41]=K):K=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(At,{size:16}),t[42]=st):st=t[42];let W;t[43]!==K?(W=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":K,children:st}),t[43]=K,t[44]=W):W=t[44];let q;t[45]!==u?(q=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=q):q=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:yt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==W||t[61]!==q||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,W,q,X]}),t[58]=R,t[59]=F,t[60]=W,t[61]=q,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!m&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],C=!m,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===b.getMonth(),St=Nt.get(Bt(p))??[];return e.jsxs("div",{onDragOver:v=>{g&&(v.preventDefault(),v.dataTransfer.dropEffect="move")},onDrop:v=>{v.preventDefault();const ut=v.dataTransfer.getData("text/plain");y(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),m&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(p)}),children:e.jsx(Pt,{size:14})})]}),St.map(v=>e.jsx(gt,{entry:v,active:v.post.key===o,draggable:m&&v.scheduled,onSelect:l,onDragStateChange:y},v.post.key))]},p.getTime())})}),lt]}),E="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",A=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),P=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(zt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:y},p.post.key)),t[5]=m,t[6]=b,t[7]=x,t[8]=g,t[9]=d,t[10]=h,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=C,t[19]=T,t[20]=z,t[21]=k,t[22]=E,t[23]=A,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],C=t[18],T=t[19],z=t[20],k=t[21],E=t[22],A=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==E||t[71]!==A||t[72]!==P?(I=e.jsxs("div",{className:E,children:[A,P]}),t[70]=E,t[71]=A,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==C||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:C,children:L}),t[78]=j,t[79]=C,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==m||t[84]!==s?(O=!m&&e.jsx(Wt,{support:s}),t[83]=m,t[84]=s,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function qt(f){return ht(f,1)}function Gt(f){return ht(f,-1)}function Vt(){return bt(new Date)}function xt(f){const t=nt.c(7),{className:x,label:s}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==s||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,s]}),t[4]=s,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=nt.c(23),{entry:x,active:s,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:i,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let n;t[0]!==c||t[1]!==r?(n=c(r),t[0]=c,t[1]=r,t[2]=n):n=t[2];const m=n;let g;t[3]!==a||t[4]!==i.key?(g=C=>{C.dataTransfer.setData("text/plain",i.key),C.dataTransfer.effectAllowed="move",a(i.key)},t[3]=a,t[4]=i.key,t[5]=g):g=t[5];let y;t[6]!==a?(y=()=>a(null),t[6]=a,t[7]=y):y=t[7];let N;t[8]!==l||t[9]!==i.key?(N=()=>l(i.key),t[8]=l,t[9]=i.key,t[10]=N):N=t[10];const b=`${i.title} · ${m}`,w=d?jt:yt,h=o&&"cursor-grab active:cursor-grabbing",D=s&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==h||t[13]!==D?(u=Z("w-full truncate rounded-md border px-2 py-1 text-left text-xs font-medium transition-colors",w,h,D),t[11]=w,t[12]=h,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==i.title||t[17]!==u||t[18]!==g||t[19]!==y||t[20]!==N||t[21]!==b?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:y,onClick:N,title:b,className:u,children:i.title}),t[15]=o,t[16]=i.title,t[17]=u,t[18]=g,t[19]=y,t[20]=N,t[21]=b,t[22]=j):j=t[22],j}export{Wo as PostCalendar};
|
|
1
|
+
import{c as nt,b as ct,r as ft,v as wt,l as Z,j as e,B as at}from"./index-bAk-APf5.js";import{i as Tt}from"./AlertCircle-BFh6TEUY.js";import{au as zt,y as Et}from"./agent-icon-DARgLSxq.js";import{i as At}from"./ChevronRight-BwMQ5MKg.js";import{s as Pt}from"./Plus-CTP-uL3y.js";import{a as _t,b as Mt,A as It}from"./alert-CKIXehAq.js";import{S as Lt}from"./scroll-area-3kuQ0Nhy.js";import{B as Ut,bC as Ot,a5 as $t,bx as Ht,by as Rt,bD as Bt,bw as bt,bA as ht,bE as Ft,bF as Kt}from"./index-BPrzfReW.js";import"./Tool01-B6a7U5lG.js";import"./ArrowUp-C7FSaCXO.js";import"./ArrowLeft-Cy_3-ZN_.js";import"./Tool02-CR20QR2y.js";import"./XCircle-CKXn3iPc.js";import"./TrendUp01-CNAJXRtI.js";import"./ZoomOut-DWUSIuvF.js";import"./Users03-CYRLwNE5.js";import"./CheckCircle-s46bCx17.js";import"./Check-BG3Vn7Kp.js";import"./ChevronUp-jmQP_hvc.js";import"./ChevronSelectorVertical-in5gYEeG.js";import"./DotsVertical-DI-Q43eH.js";import"./UserSquare-xcIM5-JC.js";import"./Copy01-Bdnnn7C6.js";import"./CreditCard01-Cy0jatNj.js";import"./Download01-LWgG7Jcv.js";import"./Settings02-Bi_PzlFZ.js";import"./Eye-DHXiKp7G.js";import"./Share07-CHSaeI5o.js";import"./GitBranch01-C6qDPwlx.js";import"./Globe01-GgL_adnC.js";import"./XClose-CDEX3-4N.js";import"./HardDrive-CMRpNYav.js";import"./Image01-B-drTenX.js";import"./Key01-BdjDTSqW.js";import"./Link01-BR1GQeuR.js";import"./LinkExternal01-BMWbQxLZ.js";import"./Monitor01-CR7dvepe.js";import"./Sun-CTjY6RAZ.js";import"./Package-afgN0oSF.js";import"./Palette-CByTlmX2.js";import"./Play-CDB8Q2Om.js";import"./SearchMd-W2WgbmqN.js";import"./Shield01-DyfAWDpg.js";import"./Stars01-CGBUJYMv.js";import"./Trash01-yJ8y8j2_.js";import"./Upload01-Dy1NGSul.js";import"./User01-CVxyVwbY.js";import"./Users01-VSrTGZJb.js";import"./Zap-OIziD9g8.js";import"./select-Ctx0Qcgv.js";import"./chat-context-DPqEEc9f.js";import"./use-panel-navigate-CNCa5Lk5.js";import"./use-destination-route-4A2Bffaf.js";import"./thread-route-qLctIrGd.js";import"./dialog-COSD0NUP.js";import"./constants-DNuUCxmW.js";import"./thread-intent-H_zkqJcz.js";import"./slugify-CEUa2lfQ.js";import"./hooks-CO5LzwYA.js";import"./use-mcp-client-BUxvKIrW.js";import"./auth-CshbPpTp.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Cw1UG3Sc.js";import"./task-board-BmKB4lF8.js";import"./schema-E_m7zGJD.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BcNfR3JK.js";import"./use-ai-providers-qE2jQSo1.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BE4in05H.js";import"./use-organization-settings-CM18cXNb.js";import"./automation-runs-DLJI5rf1.js";import"./useInfiniteQuery-Bbvon05j.js";import"./use-infinite-scroll-B2R5PMHr.js";import"./use-connection-7Sig4i8K.js";import"./table-BUHK-A3h.js";import"./empty-state-waVAb3Lq.js";import"./use-members-DGfGap1O.js";import"./use-org-auth-client-DQWwJyea.js";import"./use-automations-mdHjr-f3.js";import"./useSuspenseInfiniteQuery-BW3CJqhS.js";import"./avatar-WzHUoTUh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DRj9t8CV.js";import"./markdown-DzVp99N_.js";import"./monaco-editor-64XQUTUi.js";import"./editor-DHk1J_pU.js";import"./types-CvhaS_hy.js";import"./shell-layout-l1Gm-tJn.js";import"./use-project-scope-D6ij7-Ra.js";import"./github-repo-BpKUwJal.js";import"./command-DLIIEfkn.js";import"./index-rCe5dvs6.js";import"./required-auth-layout-DV-GqLBv.js";import"./use-org-sso-DHVAkt5A.js";import"./integration-icon-ca4bn4bg.js";import"./use-navigate-to-agent-M1gdGbUP.js";import"./use-mcp-prompts-DFXnShzZ.js";import"./form-dg8wWUUl.js";import"./label-x4aLqYXX.js";import"./input-BxBJoxld.js";import"./file-type-icon-CvNFwXGZ.js";import"./drawer-B-0cZvSN.js";import"./collection-search-gGFk2HPW.js";import"./use-mcp-tools-f0V6MJE7.js";import"./tabs-B6Mjn8C6.js";import"./toggle-group-DcHnU3L8.js";import"./task-route-DHrjIm3g.js";import"./toolbar-icon-button-f5UpsrA6.js";import"./popover-CdW5c_Z7.js";import"./github-repo-picker-CLzLOKLP.js";import"./use-debounced-value-Ctprm4qQ.js";import"./authenticate-and-persist-oauth-BPubDltn.js";import"./mcp-oauth-tHYob4zj.js";import"./extract-connection-data-D2-kt2Di.js";import"./metadata-dUsYcpuu.js";import"./connection-12jrWX_j.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-wVN_xP8k.js";import"./use-registry-connections-B6moevh3.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-C7UedtOg.js";import"./connection-form-helpers-Bv_kk9q-.js";import"./collection-tabs-Bpa6FEms.js";import"./badge-7fQBDgDe.js";import"./dropdown-menu-D6zVAeEA.js";import"./get-initials-D-f_fDFw.js";import"./select-model-KFI__HgY.js";import"./checkbox-3oQrEvGP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-DtBDHDAV.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CtUSzGTf.js";import"./toolbar-BEWEKrNh.js";import"./use-file-configs-VIigmq0D.js";import"./site-slug-uya6Wp4-.js";import"./skill-preview-BkiTiDHj.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-DpkF1K4F.js";import"./use-debounced-autosave-y4fld8H7.js";import"./search-input-DoJXMwA2.js";import"./use-mcp-auth-status-bq6Xrdt7.js";import"./switch-DraJj2E9.js";import"./use-secrets-xKN5AuQo.js";import"./client-icons-Cnbbkc7W.js";import"./connect-layout-jipJMUWp.js";import"./self-tool-result-DXNSHG38.js";import"./track-BFb_BaD6.js";import"./use-tags-DB045qF9.js";import"./breadcrumb-D4piRrZH.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CJX9V7jh.js";import"./site-error--i37Vnuw.js";import"./cards-C3g8tkUT.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Wt(f){const t=nt.c(17),{support:x}=f,s=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(Tt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==s||t[2]!==a?(c=s(a),t[1]=s,t[2]=a,t[3]=c):c=t[3];let i;t[4]!==c?(i=e.jsx(_t,{children:c}),t[4]=c,t[5]=i):i=t[5];let d;t[6]!==o||t[7]!==s?(d=o?s("sandbox.postCalendar.unsupportedRuntimeDescription"):s("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=s,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let n;t[11]!==o?(n=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:Kt}),t[11]=o,t[12]=n):n=t[12];let m;return t[13]!==i||t[14]!==r||t[15]!==n?(m=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[i,r,n]})]})}),t[13]=i,t[14]=r,t[15]=n,t[16]=m):m=t[16],m}function Wo(f){const t=nt.c(94),{decofile:x,support:s,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:i}=f,d=i===void 0?!1:i,r=ct();let n;t[0]!==s?(n=Ut(s),t[0]=s,t[1]=n):n=t[1];const m=n,[g,y]=ft.useState(null),[N]=wt(),[b,w]=ft.useState(Vt),h=N.language;let D;t[2]!==b||t[3]!==h?(D=new Intl.DateTimeFormat(h,{month:"long",year:"numeric"}).format(b),t[2]=b,t[3]=h,t[4]=D):D=t[4];const u=D;let j,C,T,z,k,E,A,P,_,M,S;if(t[5]!==m||t[6]!==b||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==h||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const vt=new Intl.DateTimeFormat(h,{weekday:"short"}),Ct=new Intl.DateTimeFormat(h,{dateStyle:"long"}),{byDay:Nt,undated:mt}=Ot($t(x)),dt=Ht(b),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(bt(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>w(qt),t[39]=it):it=t[39];let K;t[40]!==r?(K=r("sandbox.postCalendar.next"),t[40]=r,t[41]=K):K=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(At,{size:16}),t[42]=st):st=t[42];let W;t[43]!==K?(W=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":K,children:st}),t[43]=K,t[44]=W):W=t[44];let q;t[45]!==u?(q=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=q):q=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:yt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==W||t[61]!==q||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,W,q,X]}),t[58]=R,t[59]=F,t[60]=W,t[61]=q,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!m&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],C=!m,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===b.getMonth(),St=Nt.get(Bt(p))??[];return e.jsxs("div",{onDragOver:v=>{g&&(v.preventDefault(),v.dataTransfer.dropEffect="move")},onDrop:v=>{v.preventDefault();const ut=v.dataTransfer.getData("text/plain");y(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),m&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Ct.format(p)}),children:e.jsx(Pt,{size:14})})]}),St.map(v=>e.jsx(gt,{entry:v,active:v.post.key===o,draggable:m&&v.scheduled,onSelect:l,onDragStateChange:y},v.post.key))]},p.getTime())})}),lt]}),E="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",A=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:mt.length})}),P=mt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(zt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):mt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:y},p.post.key)),t[5]=m,t[6]=b,t[7]=x,t[8]=g,t[9]=d,t[10]=h,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=C,t[19]=T,t[20]=z,t[21]=k,t[22]=E,t[23]=A,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],C=t[18],T=t[19],z=t[20],k=t[21],E=t[22],A=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==E||t[71]!==A||t[72]!==P?(I=e.jsxs("div",{className:E,children:[A,P]}),t[70]=E,t[71]=A,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==C||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:C,children:L}),t[78]=j,t[79]=C,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==m||t[84]!==s?(O=!m&&e.jsx(Wt,{support:s}),t[83]=m,t[84]=s,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function qt(f){return ht(f,1)}function Gt(f){return ht(f,-1)}function Vt(){return bt(new Date)}function xt(f){const t=nt.c(7),{className:x,label:s}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==s||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,s]}),t[4]=s,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=nt.c(23),{entry:x,active:s,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:i,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let n;t[0]!==c||t[1]!==r?(n=c(r),t[0]=c,t[1]=r,t[2]=n):n=t[2];const m=n;let g;t[3]!==a||t[4]!==i.key?(g=C=>{C.dataTransfer.setData("text/plain",i.key),C.dataTransfer.effectAllowed="move",a(i.key)},t[3]=a,t[4]=i.key,t[5]=g):g=t[5];let y;t[6]!==a?(y=()=>a(null),t[6]=a,t[7]=y):y=t[7];let N;t[8]!==l||t[9]!==i.key?(N=()=>l(i.key),t[8]=l,t[9]=i.key,t[10]=N):N=t[10];const b=`${i.title} · ${m}`,w=d?jt:yt,h=o&&"cursor-grab active:cursor-grabbing",D=s&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==h||t[13]!==D?(u=Z("w-full truncate rounded-md border px-2 py-1 text-left text-xs font-medium transition-colors",w,h,D),t[11]=w,t[12]=h,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==i.title||t[17]!==u||t[18]!==g||t[19]!==y||t[20]!==N||t[21]!==b?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:y,onClick:N,title:b,className:u,children:i.title}),t[15]=o,t[16]=i.title,t[17]=u,t[18]=g,t[19]=y,t[20]=N,t[21]=b,t[22]=j):j=t[22],j}export{Wo as PostCalendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as he,b as be,j as t,a4 as Pe,a1 as ke,a2 as Ne,B as Te}from"./index-CAw6g9tV.js";import{b as Be}from"./chat-context-ffF_r7RU.js";import{i as Ie}from"./AlertCircle-CG7tfapy.js";import{n as Ae}from"./LinkExternal01-D_IXdPPU.js";import{bm as Re,o as De}from"./agent-icon-Dsw04fQF.js";import{I as ue}from"./input-CRq9rZYf.js";import{L as xe}from"./label-ByckMHtZ.js";import{M as $e}from"./multi-select-BFhmckl1.js";import{b as je,c as _e,T as ve,a as Me}from"./tabs-xquvO62b.js";import{S as Se}from"./switch-DlPMc1e_.js";import{T as Le}from"./textarea-BClvRA4H.js";import{e as Ve,t as ze,v as Ue,w as Ye,x as we,j as He,y as qe,z as Je,A as Ke,B as Oe,C as Ge,D as Ee,E as ge,F as Qe,H as We,I as Xe,J as Fe}from"./index-DH6qLcGa.js";import{b as Ze,a as et,B as tt}from"./block-document-DOFjntDc.js";import{u as st}from"./use-autosave-D-iSKxnB.js";import{s as Q,E as lt,R as it,A as ot}from"./primitives-CmYrjVpf.js";import"./use-panel-navigate-9qdFpFC-.js";import"./use-destination-route-C5lOfatk.js";import"./thread-route-CxY5TjeM.js";import"./dialog-DDd8wUS7.js";import"./Check-Jn0qXgT0.js";import"./Copy01-jXW2eGyY.js";import"./Download01-BpcIjY9x.js";import"./constants-DNuUCxmW.js";import"./thread-intent-C3PV-LRn.js";import"./slugify-CEUa2lfQ.js";import"./hooks-J2gbnuVW.js";import"./use-mcp-client-BJohqqSd.js";import"./auth-Ctf1zdSk.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Cp5pr9Ve.js";import"./task-board-DHq8t-_N.js";import"./schema-BoK0jTZh.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-B2TPjUHz.js";import"./use-ai-providers-CiO6eVCB.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Bs4lGo6F.js";import"./use-organization-settings-Dh58cpUx.js";import"./Tool01-CtOHcy0Y.js";import"./ArrowUp-CxKA4POx.js";import"./ArrowLeft-Dexv6rHk.js";import"./Tool02-DHxIusmd.js";import"./XCircle-DZJkY1-f.js";import"./TrendUp01-BctNF4vg.js";import"./ZoomOut-D8t79aO2.js";import"./Users03-cesUeOsp.js";import"./CheckCircle-BnpxIwzg.js";import"./ChevronUp-BCwuiyHj.js";import"./ChevronRight-CKftPemQ.js";import"./ChevronSelectorVertical-BPOo032l.js";import"./DotsVertical-C65YDOa_.js";import"./UserSquare-BEv1iIj5.js";import"./CreditCard01-Zn4AjX46.js";import"./Settings02-DfFNQquZ.js";import"./Eye-DvBjB5D4.js";import"./Share07-8oXDBqwk.js";import"./GitBranch01-Bde_Ik_K.js";import"./Globe01-D2uoGclE.js";import"./XClose-mJWP0IZB.js";import"./HardDrive-CBqO3DS3.js";import"./Image01-0uExgWAI.js";import"./Key01-BiKWCM1S.js";import"./Link01-C7a_h6ys.js";import"./Monitor01-CKYtARge.js";import"./Sun-N_eYVUUU.js";import"./Package-D0PXqO6P.js";import"./Palette-CQVEzzhe.js";import"./Play-CONIoWIl.js";import"./Plus-D7VA57q5.js";import"./SearchMd-C1loDEwy.js";import"./Shield01-CrPC_5gY.js";import"./Stars01-BTmtR5If.js";import"./Trash01-CHla-FrA.js";import"./Upload01-VP9EBYtl.js";import"./User01-8XeMepHg.js";import"./Users01-CvPFHBcf.js";import"./Zap-JQtzyV8B.js";import"./badge-BJg3YTbr.js";import"./checkbox-DmweFMZg.js";import"./command-CEQjEkRa.js";import"./index-DU91evk-.js";import"./popover-BIPtCsqc.js";import"./automation-runs-BP4svOKv.js";import"./useInfiniteQuery-Nq5i14p1.js";import"./use-infinite-scroll-DHeLsiAD.js";import"./use-connection-GI8Focwr.js";import"./table-D_mk2-gB.js";import"./empty-state-L8hCXC--.js";import"./use-members-C7ip6O59.js";import"./use-org-auth-client-DVDqxM9c.js";import"./use-automations-VoPscQxA.js";import"./useSuspenseInfiniteQuery-ByY64uZl.js";import"./avatar-ayySA21l.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0nulXNR.js";import"./markdown-C1VdpJ5j.js";import"./monaco-editor-DhRI2q0D.js";import"./editor-B0M9C5II.js";import"./types-B2KcVByH.js";import"./shell-layout-X5sLDjab.js";import"./use-project-scope-NvD131m4.js";import"./github-repo-BpKUwJal.js";import"./required-auth-layout-632Nlbdk.js";import"./use-org-sso-3md051eT.js";import"./integration-icon-gY5UnY38.js";import"./use-navigate-to-agent-wxTo_2Wv.js";import"./use-mcp-prompts-DW-tAvJg.js";import"./form-DR4f8DO7.js";import"./file-type-icon-C5mq72Tm.js";import"./drawer-CxFI5tCn.js";import"./collection-search-DUFT-3aZ.js";import"./use-mcp-tools-vt3UNphZ.js";import"./select-Bnv10Fl8.js";import"./toggle-group-d_5STaVP.js";import"./task-route-DWU-0q6w.js";import"./toolbar-icon-button-DSBvSnFI.js";import"./github-repo-picker-Dyu49H5P.js";import"./use-debounced-value-CozflcUh.js";import"./authenticate-and-persist-oauth-UjkEE9k3.js";import"./mcp-oauth-DwPFIejs.js";import"./extract-connection-data-C2Ocp5Tk.js";import"./metadata-dUsYcpuu.js";import"./connection-qt8m11-c.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-Bwgx5OMm.js";import"./use-registry-connections-DtpIh4N8.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-Cs1EiOkG.js";import"./collection-tabs-aHnkLK94.js";import"./dropdown-menu-C3Gdadki.js";import"./get-initials-D-f_fDFw.js";import"./select-model-NQ0mnVuK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-Dt2zI1nQ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BpKA8nWD.js";import"./toolbar-D-SXcT0t.js";import"./use-file-configs-CjjmtK39.js";import"./site-slug-uya6Wp4-.js";import"./skill-preview-DL4gp0ne.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-BU3enZKF.js";import"./use-debounced-autosave-DJCeP_ec.js";import"./scroll-area-BI805ul_.js";import"./search-input-CFyqYOfd.js";import"./use-mcp-auth-status-Dj0-A5Wa.js";import"./use-secrets-N0I1WQgn.js";import"./client-icons-DX-H77xu.js";import"./connect-layout-CS-AhNLB.js";import"./self-tool-result-Dc4tPK9T.js";import"./track-Cc1S4yMy.js";import"./use-tags-EBwNPMg8.js";import"./breadcrumb-B5Tcv0Uh.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CakAIrvQ.js";import"./site-error--i37Vnuw.js";import"./cards-D9Ttj2cE.js";function at(V){return Array.isArray(V)?V.map(e=>({key:Q(e?.key),value:Q(e?.value)})):[]}function pi(V){const e=he.c(126),{orgSlug:s,virtualMcpId:d,branch:i,blockKey:o,block:p,decofile:l,meta:r,previewBaseUrl:c}=V,a=be(),m=Be()?.taskId??null;let x;e[0]!==i||e[1]!==s||e[2]!==d?(x={orgSlug:s,virtualMcpId:d,branch:i},e[0]=i,e[1]=s,e[2]=d,e[3]=x):x=e[3];const f=Ve(x);let u;e[4]!==i||e[5]!==r||e[6]!==s||e[7]!==d?(u={orgSlug:s,virtualMcpId:d,branch:i,meta:r},e[4]=i,e[5]=r,e[6]=s,e[7]=d,e[8]=u):u=e[8];const C=ze(u);let b;e[9]!==i||e[10]!==s||e[11]!==d?(b={orgSlug:s,virtualMcpId:d,branch:i},e[9]=i,e[10]=s,e[11]=d,e[12]=b):b=e[12];const g=Ue(b);let j;e[13]!==p?(j=Ye(p,"posts"),e[13]=p,e[14]=j):j=e[14];const k=j;let y;e[15]!==o||e[16]!==f?(y=G=>{f.mutate({blockKey:o,data:qe(o,"posts",Je(G))})},e[15]=o,e[16]=f,e[17]=y):y=e[17];const[n,S]=st(k,y);let z;e[18]!==n||e[19]!==S?(z=(G,h)=>S({...n,[G]:h}),e[18]=n,e[19]=S,e[20]=z):z=e[20];const P=z;let U;e[21]!==l||e[22]!==g||e[23]!==n||e[24]!==c?(U=Ze({decofile:l,post:n,previewBaseUrl:c,draftPointer:g}),e[21]=l,e[22]=g,e[23]=n,e[24]=c,e[25]=U):U=e[25];const N=U;let v,L,Y;e[26]!==n||e[27]!==a?(L=we(n),v=L.length>0,Y=L.length===1?a("sandbox.postEditor.missingFieldSingular",{fields:L.join(", ")}):a("sandbox.postEditor.missingFieldPlural",{fields:L.join(", ")}),e[26]=n,e[27]=a,e[28]=v,e[29]=L,e[30]=Y):(v=e[28],L=e[29],Y=e[30]);const w=Y;let F;e[31]!==n.title||e[32]!==a?(F=Q(n.title)||a("sandbox.postEditor.untitledPost"),e[31]=n.title,e[32]=a,e[33]=F):F=e[33];let T;e[34]!==F?(T=t.jsx("span",{className:"truncate text-sm font-medium",children:F}),e[34]=F,e[35]=T):T=e[35];let B;e[36]!==v||e[37]!==L||e[38]!==w||e[39]!==a?(B=v&&t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Ie,{size:14}),L.length," ",L.length===1?a("sandbox.postEditor.issueSingular"):a("sandbox.postEditor.issuePlural")]})}),t.jsx(Ne,{side:"bottom",children:w})]}),e[36]=v,e[37]=L,e[38]=w,e[39]=a,e[40]=B):B=e[40];let I;e[41]!==f.isError||e[42]!==f.isPending?(I=t.jsx(He,{isPending:f.isPending,isError:f.isError}),e[41]=f.isError,e[42]=f.isPending,e[43]=I):I=e[43];const J=!N||v;let A;e[44]!==v||e[45]!==w||e[46]!==N||e[47]!==a?(A=v?w:a(N?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[44]=v,e[45]=w,e[46]=N,e[47]=a,e[48]=A):A=e[48];let R;e[49]!==v||e[50]!==N?(R=()=>{N&&!v&&window.open(N,"_blank","noopener,noreferrer")},e[49]=v,e[50]=N,e[51]=R):R=e[51];let H;e[52]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ae,{size:14}),e[52]=H):H=e[52];let D;e[53]!==a?(D=a("sandbox.postEditor.seePreview"),e[53]=a,e[54]=D):D=e[54];let $;e[55]!==J||e[56]!==A||e[57]!==R||e[58]!==D?($=t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:J,title:A,onClick:R,children:[H,D]}),e[55]=J,e[56]=A,e[57]=R,e[58]=D,e[59]=$):$=e[59];let K;e[60]!==B||e[61]!==I||e[62]!==$?(K=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[B,I,$]}),e[60]=B,e[61]=I,e[62]=$,e[63]=K):K=e[63];let O;e[64]!==T||e[65]!==K?(O=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[T,K]}),e[64]=T,e[65]=K,e[66]=O):O=e[66];let _;e[67]!==n.title?(_=Q(n.title),e[67]=n.title,e[68]=_):_=e[68];let M;e[69]!==P?(M=G=>P("title",G),e[69]=P,e[70]=M):M=e[70];let q;e[71]!==a?(q=a("sandbox.postEditor.postTitlePlaceholder"),e[71]=a,e[72]=q):q=e[72];let E;e[73]!==_||e[74]!==M||e[75]!==q?(E=t.jsx(lt,{value:_,onChange:M,placeholder:q,className:"py-1 text-4xl font-bold text-foreground"}),e[73]=_,e[74]=M,e[75]=q,e[76]=E):E=e[76];let W;e[77]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Re,{}),e[77]=W):W=e[77];let X;e[78]!==a?(X=a("sandbox.postEditor.contentTab"),e[78]=a,e[79]=X):X=e[79];let Z;e[80]!==X?(Z=t.jsxs(je,{value:"content",children:[W,X]}),e[80]=X,e[81]=Z):Z=e[81];let me;e[82]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(De,{}),e[82]=me):me=e[82];let ee;e[83]!==a?(ee=a("sandbox.postEditor.settingsTab"),e[83]=a,e[84]=ee):ee=e[84];let te;e[85]!==ee?(te=t.jsxs(je,{value:"settings",children:[me,ee]}),e[85]=ee,e[86]=te):te=e[86];let se;e[87]!==Z||e[88]!==te?(se=t.jsxs(_e,{children:[Z,te]}),e[87]=Z,e[88]=te,e[89]=se):se=e[89];let le;e[90]!==n.sections?(le=et(n.sections),e[90]=n.sections,e[91]=le):le=e[91];let ie;e[92]!==P?(ie=G=>P("sections",G),e[92]=P,e[93]=ie):ie=e[93];let oe;e[94]!==i||e[95]!==s||e[96]!==m||e[97]!==d?(oe={orgSlug:s,virtualMcpId:d,branch:i,threadId:m},e[94]=i,e[95]=s,e[96]=m,e[97]=d,e[98]=oe):oe=e[98];let ae;e[99]!==a?(ae=a("sandbox.postEditor.noContentYet"),e[99]=a,e[100]=ae):ae=e[100];let re;e[101]!==r||e[102]!==le||e[103]!==ie||e[104]!==oe||e[105]!==ae?(re=t.jsx(ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(tt,{value:le,onChange:ie,meta:r,sandboxRef:oe,emptyMessage:ae})})}),e[101]=r,e[102]=le,e[103]=ie,e[104]=oe,e[105]=ae,e[106]=re):re=e[106];let ne;e[107]!==n||e[108]!==S?(ne=G=>S({...n,...G}),e[107]=n,e[108]=S,e[109]=ne):ne=e[109];let de;e[110]!==l||e[111]!==n||e[112]!==P||e[113]!==C||e[114]!==ne?(de=t.jsx(ve,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(rt,{post:n,decofile:l,support:C,onChange:P,onPatch:ne})})}),e[110]=l,e[111]=n,e[112]=P,e[113]=C,e[114]=ne,e[115]=de):de=e[115];let pe;e[116]!==se||e[117]!==re||e[118]!==de?(pe=t.jsxs(Me,{defaultValue:"content",className:"mt-6 gap-4",children:[se,re,de]}),e[116]=se,e[117]=re,e[118]=de,e[119]=pe):pe=e[119];let ce;e[120]!==E||e[121]!==pe?(ce=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[E,pe]})}),e[120]=E,e[121]=pe,e[122]=ce):ce=e[122];let fe;return e[123]!==O||e[124]!==ce?(fe=t.jsxs("div",{className:"flex h-full flex-col",children:[O,ce]}),e[123]=O,e[124]=ce,e[125]=fe):fe=e[125],fe}function Ce(V){const e=he.c(18),{id:s,label:d,checked:i,blocked:o,blockedReason:p,className:l,onCheckedChange:r}=V;let c;e[0]!==s||e[1]!==d?(c=t.jsx(xe,{htmlFor:s,children:d}),e[0]=s,e[1]=d,e[2]=c):c=e[2];let a;e[3]!==o||e[4]!==i||e[5]!==l||e[6]!==s||e[7]!==r?(a=t.jsx(ke,{asChild:!0,children:t.jsx("span",{children:t.jsx(Se,{id:s,className:l,checked:i,disabled:o,onCheckedChange:r})})}),e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=r,e[8]=a):a=e[8];let m;e[9]!==o||e[10]!==p?(m=o&&t.jsx(Ne,{side:"bottom",children:p}),e[9]=o,e[10]=p,e[11]=m):m=e[11];let x;e[12]!==a||e[13]!==m?(x=t.jsxs(Pe,{children:[a,m]}),e[12]=a,e[13]=m,e[14]=x):x=e[14];let f;return e[15]!==c||e[16]!==x?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c,x]}),e[15]=c,e[16]=x,e[17]=f):f=e[17],f}function rt(V){const e=he.c(142),{post:s,decofile:d,support:i,onChange:o,onPatch:p}=V,l=be();let r;e[0]!==i?(r=Ke(i),e[0]=i,e[1]=r):r=e[1];const c=r;let a;e[2]!==i?(a=Oe(i),e[2]=i,e[3]=a):a=e[3];const m=a;let x;e[4]!==s?(x=Ge(s),e[4]=s,e[5]=x):x=e[5];const f=x,u=m&&f==="scheduled";let C;if(e[6]!==s||e[7]!==l){const h=we(s);C=h.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:h.join(", ")}):l("sandbox.postEditor.missingFieldPlural",{fields:h.join(", ")}),e[6]=s,e[7]=l,e[8]=C}else C=e[8];const b=C;let g;e[9]!==p||e[10]!==s?(g=h=>p(Xe(s,h,new Date)),e[9]=p,e[10]=s,e[11]=g):g=e[11];const j=g;let k;e[12]!==c||e[13]!==m||e[14]!==u||e[15]!==b||e[16]!==o||e[17]!==s||e[18]!==j||e[19]!==f||e[20]!==l?(k=c&&t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[m&&t.jsx(Ce,{id:"post-scheduled",label:l("sandbox.postEditor.schedulingLabel"),checked:u,blocked:Ee(s,"scheduled"),blockedReason:b,onCheckedChange:h=>j(h?"scheduled":"draft")}),u?t.jsx(ge,{schema:{type:"string",format:"date-time",title:l("sandbox.postEditor.scheduledDatetimeLabel"),description:l("sandbox.postEditor.scheduledDatetimeDescription")},value:Q(s.scheduledDatetime),onChange:h=>o("scheduledDatetime",h),path:"post-scheduled-datetime",label:l("sandbox.postEditor.scheduledDatetimeLabel")}):t.jsx(Ce,{id:"post-published",label:l("sandbox.postEditor.publishedLabel"),className:"data-[state=checked]:bg-success",checked:f==="published",blocked:Ee(s,"published"),blockedReason:b,onCheckedChange:h=>j(h?"published":"draft")})]}),e[12]=c,e[13]=m,e[14]=u,e[15]=b,e[16]=o,e[17]=s,e[18]=j,e[19]=f,e[20]=l,e[21]=k):k=e[21];let y;e[22]!==l?(y=l("sandbox.postEditor.excerptLabel"),e[22]=l,e[23]=y):y=e[23];let n;e[24]!==y?(n=t.jsx(xe,{htmlFor:"post-excerpt",children:y}),e[24]=y,e[25]=n):n=e[25];let S;e[26]!==s.excerpt?(S=Q(s.excerpt),e[26]=s.excerpt,e[27]=S):S=e[27];let z;e[28]!==o?(z=h=>o("excerpt",h.target.value),e[28]=o,e[29]=z):z=e[29];let P;e[30]!==z||e[31]!==S?(P=t.jsx(Le,{id:"post-excerpt",value:S,onChange:z,rows:2}),e[30]=z,e[31]=S,e[32]=P):P=e[32];let U;e[33]!==P||e[34]!==n?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[33]=P,e[34]=n,e[35]=U):U=e[35];let N;e[36]!==l?(N=l("sandbox.postEditor.slugLabel"),e[36]=l,e[37]=N):N=e[37];let v;e[38]!==N?(v=t.jsx(xe,{htmlFor:"post-slug",children:N}),e[38]=N,e[39]=v):v=e[39];let L;e[40]!==s.slug?(L=Q(s.slug),e[40]=s.slug,e[41]=L):L=e[41];let Y;e[42]!==o?(Y=h=>o("slug",h.target.value),e[42]=o,e[43]=Y):Y=e[43];let w;e[44]!==l?(w=l("sandbox.postEditor.slugPlaceholder"),e[44]=l,e[45]=w):w=e[45];let F;e[46]!==L||e[47]!==Y||e[48]!==w?(F=t.jsx(ue,{id:"post-slug",value:L,onChange:Y,placeholder:w,className:"h-10"}),e[46]=L,e[47]=Y,e[48]=w,e[49]=F):F=e[49];let T;e[50]!==v||e[51]!==F?(T=t.jsxs("div",{className:"space-y-2",children:[v,F]}),e[50]=v,e[51]=F,e[52]=T):T=e[52];let B;e[53]!==l?(B=l("sandbox.postEditor.dateLabel"),e[53]=l,e[54]=B):B=e[54];let I;e[55]!==B?(I={type:"string",format:"date",title:B},e[55]=B,e[56]=I):I=e[56];let J;e[57]!==s.date?(J=Q(s.date),e[57]=s.date,e[58]=J):J=e[58];let A;e[59]!==o?(A=h=>o("date",h),e[59]=o,e[60]=A):A=e[60];let R;e[61]!==l?(R=l("sandbox.postEditor.dateLabel"),e[61]=l,e[62]=R):R=e[62];let H;e[63]!==I||e[64]!==J||e[65]!==A||e[66]!==R?(H=t.jsx(ge,{schema:I,value:J,onChange:A,path:"post-date",label:R}),e[63]=I,e[64]=J,e[65]=A,e[66]=R,e[67]=H):H=e[67];let D;e[68]!==T||e[69]!==H?(D=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T,H]}),e[68]=T,e[69]=H,e[70]=D):D=e[70];let $;e[71]!==l?($=l("sandbox.postEditor.coverImageLabel"),e[71]=l,e[72]=$):$=e[72];let K;e[73]!==$?(K={type:"string",format:"image-uri",title:$},e[73]=$,e[74]=K):K=e[74];const O=s.image;let _;e[75]!==o?(_=h=>o("image",h),e[75]=o,e[76]=_):_=e[76];let M;e[77]!==l?(M=l("sandbox.postEditor.coverImageLabel"),e[77]=l,e[78]=M):M=e[78];let q;e[79]!==s.image||e[80]!==K||e[81]!==_||e[82]!==M?(q=t.jsx(Fe,{schema:K,value:O,onChange:_,path:"post-image",label:M}),e[79]=s.image,e[80]=K,e[81]=_,e[82]=M,e[83]=q):q=e[83];let E;e[84]!==l?(E=l("sandbox.postEditor.coverAltLabel"),e[84]=l,e[85]=E):E=e[85];let W;e[86]!==l?(W=l("sandbox.postEditor.coverAltDescription"),e[86]=l,e[87]=W):W=e[87];let X;e[88]!==E||e[89]!==W?(X={type:"string",title:E,description:W},e[88]=E,e[89]=W,e[90]=X):X=e[90];let Z;e[91]!==s.alt?(Z=Q(s.alt),e[91]=s.alt,e[92]=Z):Z=e[92];let me;e[93]!==o?(me=h=>o("alt",h),e[93]=o,e[94]=me):me=e[94];let ee;e[95]!==l?(ee=l("sandbox.postEditor.coverAltLabel"),e[95]=l,e[96]=ee):ee=e[96];let te;e[97]!==X||e[98]!==Z||e[99]!==me||e[100]!==ee?(te=t.jsx(ge,{schema:X,value:Z,onChange:me,path:"post-alt",label:ee}),e[97]=X,e[98]=Z,e[99]=me,e[100]=ee,e[101]=te):te=e[101];let se;e[102]!==q||e[103]!==te?(se=t.jsxs("div",{className:"space-y-2",children:[q,te]}),e[102]=q,e[103]=te,e[104]=se):se=e[104];let le;e[105]!==l?(le=l("sandbox.postEditor.authorsLabel"),e[105]=l,e[106]=le):le=e[106];let ie;e[107]!==o?(ie=h=>o("authors",h),e[107]=o,e[108]=ie):ie=e[108];let oe;e[109]!==d||e[110]!==s.authors||e[111]!==le||e[112]!==ie?(oe=t.jsx(ye,{label:le,decofile:d,kind:"authors",valueField:"email",toRef:dt,selected:s.authors,onChange:ie}),e[109]=d,e[110]=s.authors,e[111]=le,e[112]=ie,e[113]=oe):oe=e[113];let ae;e[114]!==l?(ae=l("sandbox.postEditor.categoriesLabel"),e[114]=l,e[115]=ae):ae=e[115];let re;e[116]!==o?(re=h=>o("categories",h),e[116]=o,e[117]=re):re=e[117];let ne;e[118]!==d||e[119]!==s.categories||e[120]!==ae||e[121]!==re?(ne=t.jsx(ye,{label:ae,decofile:d,kind:"categories",valueField:"slug",toRef:nt,selected:s.categories,onChange:re}),e[118]=d,e[119]=s.categories,e[120]=ae,e[121]=re,e[122]=ne):ne=e[122];let de;e[123]!==o?(de=h=>o("extraProps",h),e[123]=o,e[124]=de):de=e[124];let pe;e[125]!==s.extraProps||e[126]!==de?(pe=t.jsx(ct,{value:s.extraProps,onChange:de}),e[125]=s.extraProps,e[126]=de,e[127]=pe):pe=e[127];let ce;e[128]!==o?(ce=h=>o("seo",h),e[128]=o,e[129]=ce):ce=e[129];let fe;e[130]!==s.seo||e[131]!==ce?(fe=t.jsx(pt,{value:s.seo,onChange:ce}),e[130]=s.seo,e[131]=ce,e[132]=fe):fe=e[132];let G;return e[133]!==U||e[134]!==D||e[135]!==se||e[136]!==oe||e[137]!==ne||e[138]!==pe||e[139]!==fe||e[140]!==k?(G=t.jsxs("div",{className:"space-y-5",children:[k,U,D,se,oe,ne,pe,fe]}),e[133]=U,e[134]=D,e[135]=se,e[136]=oe,e[137]=ne,e[138]=pe,e[139]=fe,e[140]=k,e[141]=G):G=e[141],G}function nt(V){return{name:Q(V.name),slug:Q(V.slug)}}function dt(V){return{...V}}function pt(V){const e=he.c(93),{value:s,onChange:d}=V,i=be();let o;e[0]!==s?(o=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=o):o=e[1];const p=o;let l;e[2]!==d||e[3]!==p?(l=(E,W)=>d({...p,[E]:W}),e[2]=d,e[3]=p,e[4]=l):l=e[4];const r=l;let c;e[5]!==i?(c=i("sandbox.postEditor.seoSectionLabel"),e[5]=i,e[6]=c):c=e[6];let a;e[7]!==c?(a=t.jsx("p",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=a):a=e[8];let m;e[9]!==i?(m=i("sandbox.postEditor.seoSectionHint"),e[9]=i,e[10]=m):m=e[10];let x;e[11]!==m?(x=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[11]=m,e[12]=x):x=e[12];let f;e[13]!==a||e[14]!==x?(f=t.jsxs("div",{className:"space-y-1",children:[a,x]}),e[13]=a,e[14]=x,e[15]=f):f=e[15];let u;e[16]!==i?(u=i("sandbox.postEditor.seoTitleLabel"),e[16]=i,e[17]=u):u=e[17];let C;e[18]!==u?(C=t.jsx(xe,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=C):C=e[19];let b;e[20]!==p.title?(b=Q(p.title),e[20]=p.title,e[21]=b):b=e[21];let g;e[22]!==r?(g=E=>r("title",E.target.value),e[22]=r,e[23]=g):g=e[23];let j;e[24]!==b||e[25]!==g?(j=t.jsx(ue,{id:"post-seo-title",value:b,onChange:g,className:"h-10"}),e[24]=b,e[25]=g,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==C?(k=t.jsxs("div",{className:"space-y-2",children:[C,j]}),e[27]=j,e[28]=C,e[29]=k):k=e[29];let y;e[30]!==i?(y=i("sandbox.postEditor.seoDescriptionLabel"),e[30]=i,e[31]=y):y=e[31];let n;e[32]!==y?(n=t.jsx(xe,{htmlFor:"post-seo-description",children:y}),e[32]=y,e[33]=n):n=e[33];let S;e[34]!==p.description?(S=Q(p.description),e[34]=p.description,e[35]=S):S=e[35];let z;e[36]!==r?(z=E=>r("description",E.target.value),e[36]=r,e[37]=z):z=e[37];let P;e[38]!==S||e[39]!==z?(P=t.jsx(Le,{id:"post-seo-description",value:S,onChange:z,rows:2}),e[38]=S,e[39]=z,e[40]=P):P=e[40];let U;e[41]!==n||e[42]!==P?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[41]=n,e[42]=P,e[43]=U):U=e[43];let N;e[44]!==i?(N=i("sandbox.postEditor.seoImageLabel"),e[44]=i,e[45]=N):N=e[45];let v;e[46]!==N?(v={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=v):v=e[47];const L=p.image;let Y;e[48]!==r?(Y=E=>r("image",E),e[48]=r,e[49]=Y):Y=e[49];let w;e[50]!==i?(w=i("sandbox.postEditor.seoImageLabel"),e[50]=i,e[51]=w):w=e[51];let F;e[52]!==p.image||e[53]!==v||e[54]!==Y||e[55]!==w?(F=t.jsx(Fe,{schema:v,value:L,onChange:Y,path:"post-seo-image",label:w}),e[52]=p.image,e[53]=v,e[54]=Y,e[55]=w,e[56]=F):F=e[56];let T;e[57]!==i?(T=i("sandbox.postEditor.seoCanonicalLabel"),e[57]=i,e[58]=T):T=e[58];let B;e[59]!==T?(B=t.jsx(xe,{htmlFor:"post-seo-canonical",children:T}),e[59]=T,e[60]=B):B=e[60];let I;e[61]!==p.canonical?(I=Q(p.canonical),e[61]=p.canonical,e[62]=I):I=e[62];let J;e[63]!==r?(J=E=>r("canonical",E.target.value),e[63]=r,e[64]=J):J=e[64];let A;e[65]!==i?(A=i("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=i,e[66]=A):A=e[66];let R;e[67]!==I||e[68]!==J||e[69]!==A?(R=t.jsx(ue,{id:"post-seo-canonical",value:I,onChange:J,placeholder:A,className:"h-10"}),e[67]=I,e[68]=J,e[69]=A,e[70]=R):R=e[70];let H;e[71]!==B||e[72]!==R?(H=t.jsxs("div",{className:"space-y-2",children:[B,R]}),e[71]=B,e[72]=R,e[73]=H):H=e[73];let D;e[74]!==i?(D=i("sandbox.postEditor.seoNoIndexingLabel"),e[74]=i,e[75]=D):D=e[75];let $;e[76]!==D?($=t.jsx(xe,{htmlFor:"post-seo-no-indexing",children:D}),e[76]=D,e[77]=$):$=e[77];const K=p.noIndexing===!0;let O;e[78]!==r?(O=E=>r("noIndexing",E),e[78]=r,e[79]=O):O=e[79];let _;e[80]!==K||e[81]!==O?(_=t.jsx(Se,{id:"post-seo-no-indexing",checked:K,onCheckedChange:O}),e[80]=K,e[81]=O,e[82]=_):_=e[82];let M;e[83]!==$||e[84]!==_?(M=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,_]}),e[83]=$,e[84]=_,e[85]=M):M=e[85];let q;return e[86]!==k||e[87]!==U||e[88]!==F||e[89]!==H||e[90]!==M||e[91]!==f?(q=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[f,k,U,F,H,M]}),e[86]=k,e[87]=U,e[88]=F,e[89]=H,e[90]=M,e[91]=f,e[92]=q):q=e[92],q}function ct(V){const e=he.c(24),{value:s,onChange:d}=V,i=be();let o,p,l,r;if(e[0]!==d||e[1]!==i||e[2]!==s){o=at(s);const f=(C,b)=>d(o.map((g,j)=>j===C?{...g,...b}:g));p="space-y-2";let u;e[7]!==i?(u=i("sandbox.postEditor.extraPropsLabel"),e[7]=i,e[8]=u):u=e[8],e[9]!==u?(l=t.jsx(xe,{children:u}),e[9]=u,e[10]=l):l=e[10],r=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((C,b)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(ue,{value:C.key,onChange:g=>f(b,{key:g.target.value}),placeholder:i("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(ue,{value:C.value,onChange:g=>f(b,{value:g.target.value}),placeholder:i("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(it,{label:i("sandbox.postEditor.removePropLabel"),onClick:()=>d(o.filter((g,j)=>j!==b))})]},b))}),e[0]=d,e[1]=i,e[2]=s,e[3]=o,e[4]=p,e[5]=l,e[6]=r}else o=e[3],p=e[4],l=e[5],r=e[6];let c;e[11]!==i?(c=i("sandbox.postEditor.addPropLabel"),e[11]=i,e[12]=c):c=e[12];let a;e[13]!==o||e[14]!==d?(a=()=>d([...o,{key:"",value:""}]),e[13]=o,e[14]=d,e[15]=a):a=e[15];let m;e[16]!==c||e[17]!==a?(m=t.jsx(ot,{label:c,onClick:a}),e[16]=c,e[17]=a,e[18]=m):m=e[18];let x;return e[19]!==p||e[20]!==l||e[21]!==r||e[22]!==m?(x=t.jsxs("div",{className:p,children:[l,r,m]}),e[19]=p,e[20]=l,e[21]=r,e[22]=m,e[23]=x):x=e[23],x}function ye(V){const e=he.c(24),{label:s,decofile:d,kind:i,valueField:o,toRef:p,selected:l,onChange:r}=V,c=be();let a;e[0]!==d||e[1]!==i||e[2]!==l||e[3]!==p||e[4]!==o?(a=Qe({records:We(d,i),selected:l,valueField:o,toRef:p}),e[0]=d,e[1]=i,e[2]=l,e[3]=p,e[4]=o,e[5]=a):a=e[5];const{options:m,selectedValues:x,refsForValues:f}=a;let u;e[6]!==i||e[7]!==c?(u=c(i==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=i,e[7]=c,e[8]=u):u=e[8];const C=u;let b;e[9]!==i||e[10]!==c?(b=c(i==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=i,e[10]=c,e[11]=b):b=e[11];const g=b;let j;e[12]!==s?(j=t.jsx(xe,{children:s}),e[12]=s,e[13]=j):j=e[13];let k;e[14]!==C||e[15]!==r||e[16]!==m||e[17]!==f||e[18]!==g||e[19]!==x?(k=m.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:C}):t.jsx($e,{options:m,defaultValue:x,onValueChange:n=>r(f(n)),placeholder:g,maxCount:4}),e[14]=C,e[15]=r,e[16]=m,e[17]=f,e[18]=g,e[19]=x,e[20]=k):k=e[20];let y;return e[21]!==j||e[22]!==k?(y=t.jsxs("div",{className:"space-y-2",children:[j,k]}),e[21]=j,e[22]=k,e[23]=y):y=e[23],y}export{pi as PostEditor};
|
|
1
|
+
import{c as he,b as be,j as t,a4 as Pe,a1 as ke,a2 as Ne,B as Te}from"./index-bAk-APf5.js";import{b as Be}from"./chat-context-DPqEEc9f.js";import{i as Ie}from"./AlertCircle-BFh6TEUY.js";import{n as Ae}from"./LinkExternal01-BMWbQxLZ.js";import{bm as Re,o as De}from"./agent-icon-DARgLSxq.js";import{I as ue}from"./input-BxBJoxld.js";import{L as xe}from"./label-x4aLqYXX.js";import{M as $e}from"./multi-select-DdpsgAGE.js";import{b as je,c as _e,T as ve,a as Me}from"./tabs-B6Mjn8C6.js";import{S as Se}from"./switch-DraJj2E9.js";import{T as Le}from"./textarea-C7UedtOg.js";import{e as Ve,t as ze,v as Ue,w as Ye,x as we,j as He,y as qe,z as Je,A as Ke,B as Oe,C as Ge,D as Ee,E as ge,F as Qe,H as We,I as Xe,J as Fe}from"./index-BPrzfReW.js";import{b as Ze,a as et,B as tt}from"./block-document-Cvr6OxhG.js";import{u as st}from"./use-autosave-BIq1ImEz.js";import{s as Q,E as lt,R as it,A as ot}from"./primitives-De4B6r8N.js";import"./use-panel-navigate-CNCa5Lk5.js";import"./use-destination-route-4A2Bffaf.js";import"./thread-route-qLctIrGd.js";import"./dialog-COSD0NUP.js";import"./Check-BG3Vn7Kp.js";import"./Copy01-Bdnnn7C6.js";import"./Download01-LWgG7Jcv.js";import"./constants-DNuUCxmW.js";import"./thread-intent-H_zkqJcz.js";import"./slugify-CEUa2lfQ.js";import"./hooks-CO5LzwYA.js";import"./use-mcp-client-BUxvKIrW.js";import"./auth-CshbPpTp.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Cw1UG3Sc.js";import"./task-board-BmKB4lF8.js";import"./schema-E_m7zGJD.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BcNfR3JK.js";import"./use-ai-providers-qE2jQSo1.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BE4in05H.js";import"./use-organization-settings-CM18cXNb.js";import"./Tool01-B6a7U5lG.js";import"./ArrowUp-C7FSaCXO.js";import"./ArrowLeft-Cy_3-ZN_.js";import"./Tool02-CR20QR2y.js";import"./XCircle-CKXn3iPc.js";import"./TrendUp01-CNAJXRtI.js";import"./ZoomOut-DWUSIuvF.js";import"./Users03-CYRLwNE5.js";import"./CheckCircle-s46bCx17.js";import"./ChevronUp-jmQP_hvc.js";import"./ChevronRight-BwMQ5MKg.js";import"./ChevronSelectorVertical-in5gYEeG.js";import"./DotsVertical-DI-Q43eH.js";import"./UserSquare-xcIM5-JC.js";import"./CreditCard01-Cy0jatNj.js";import"./Settings02-Bi_PzlFZ.js";import"./Eye-DHXiKp7G.js";import"./Share07-CHSaeI5o.js";import"./GitBranch01-C6qDPwlx.js";import"./Globe01-GgL_adnC.js";import"./XClose-CDEX3-4N.js";import"./HardDrive-CMRpNYav.js";import"./Image01-B-drTenX.js";import"./Key01-BdjDTSqW.js";import"./Link01-BR1GQeuR.js";import"./Monitor01-CR7dvepe.js";import"./Sun-CTjY6RAZ.js";import"./Package-afgN0oSF.js";import"./Palette-CByTlmX2.js";import"./Play-CDB8Q2Om.js";import"./Plus-CTP-uL3y.js";import"./SearchMd-W2WgbmqN.js";import"./Shield01-DyfAWDpg.js";import"./Stars01-CGBUJYMv.js";import"./Trash01-yJ8y8j2_.js";import"./Upload01-Dy1NGSul.js";import"./User01-CVxyVwbY.js";import"./Users01-VSrTGZJb.js";import"./Zap-OIziD9g8.js";import"./badge-7fQBDgDe.js";import"./checkbox-3oQrEvGP.js";import"./command-DLIIEfkn.js";import"./index-rCe5dvs6.js";import"./popover-CdW5c_Z7.js";import"./automation-runs-DLJI5rf1.js";import"./useInfiniteQuery-Bbvon05j.js";import"./use-infinite-scroll-B2R5PMHr.js";import"./use-connection-7Sig4i8K.js";import"./table-BUHK-A3h.js";import"./empty-state-waVAb3Lq.js";import"./use-members-DGfGap1O.js";import"./use-org-auth-client-DQWwJyea.js";import"./use-automations-mdHjr-f3.js";import"./useSuspenseInfiniteQuery-BW3CJqhS.js";import"./avatar-WzHUoTUh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DRj9t8CV.js";import"./markdown-DzVp99N_.js";import"./monaco-editor-64XQUTUi.js";import"./editor-DHk1J_pU.js";import"./types-CvhaS_hy.js";import"./shell-layout-l1Gm-tJn.js";import"./use-project-scope-D6ij7-Ra.js";import"./github-repo-BpKUwJal.js";import"./required-auth-layout-DV-GqLBv.js";import"./use-org-sso-DHVAkt5A.js";import"./integration-icon-ca4bn4bg.js";import"./use-navigate-to-agent-M1gdGbUP.js";import"./use-mcp-prompts-DFXnShzZ.js";import"./form-dg8wWUUl.js";import"./file-type-icon-CvNFwXGZ.js";import"./drawer-B-0cZvSN.js";import"./collection-search-gGFk2HPW.js";import"./use-mcp-tools-f0V6MJE7.js";import"./select-Ctx0Qcgv.js";import"./toggle-group-DcHnU3L8.js";import"./task-route-DHrjIm3g.js";import"./toolbar-icon-button-f5UpsrA6.js";import"./github-repo-picker-CLzLOKLP.js";import"./use-debounced-value-Ctprm4qQ.js";import"./authenticate-and-persist-oauth-BPubDltn.js";import"./mcp-oauth-tHYob4zj.js";import"./extract-connection-data-D2-kt2Di.js";import"./metadata-dUsYcpuu.js";import"./connection-12jrWX_j.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-wVN_xP8k.js";import"./use-registry-connections-B6moevh3.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-Bv_kk9q-.js";import"./collection-tabs-Bpa6FEms.js";import"./dropdown-menu-D6zVAeEA.js";import"./get-initials-D-f_fDFw.js";import"./select-model-KFI__HgY.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-DtBDHDAV.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CtUSzGTf.js";import"./toolbar-BEWEKrNh.js";import"./use-file-configs-VIigmq0D.js";import"./site-slug-uya6Wp4-.js";import"./skill-preview-BkiTiDHj.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-DpkF1K4F.js";import"./use-debounced-autosave-y4fld8H7.js";import"./scroll-area-3kuQ0Nhy.js";import"./search-input-DoJXMwA2.js";import"./use-mcp-auth-status-bq6Xrdt7.js";import"./use-secrets-xKN5AuQo.js";import"./client-icons-Cnbbkc7W.js";import"./connect-layout-jipJMUWp.js";import"./self-tool-result-DXNSHG38.js";import"./track-BFb_BaD6.js";import"./use-tags-DB045qF9.js";import"./breadcrumb-D4piRrZH.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-CJX9V7jh.js";import"./site-error--i37Vnuw.js";import"./cards-C3g8tkUT.js";function at(V){return Array.isArray(V)?V.map(e=>({key:Q(e?.key),value:Q(e?.value)})):[]}function pi(V){const e=he.c(126),{orgSlug:s,virtualMcpId:d,branch:i,blockKey:o,block:p,decofile:l,meta:r,previewBaseUrl:c}=V,a=be(),m=Be()?.taskId??null;let x;e[0]!==i||e[1]!==s||e[2]!==d?(x={orgSlug:s,virtualMcpId:d,branch:i},e[0]=i,e[1]=s,e[2]=d,e[3]=x):x=e[3];const f=Ve(x);let u;e[4]!==i||e[5]!==r||e[6]!==s||e[7]!==d?(u={orgSlug:s,virtualMcpId:d,branch:i,meta:r},e[4]=i,e[5]=r,e[6]=s,e[7]=d,e[8]=u):u=e[8];const C=ze(u);let b;e[9]!==i||e[10]!==s||e[11]!==d?(b={orgSlug:s,virtualMcpId:d,branch:i},e[9]=i,e[10]=s,e[11]=d,e[12]=b):b=e[12];const g=Ue(b);let j;e[13]!==p?(j=Ye(p,"posts"),e[13]=p,e[14]=j):j=e[14];const k=j;let y;e[15]!==o||e[16]!==f?(y=G=>{f.mutate({blockKey:o,data:qe(o,"posts",Je(G))})},e[15]=o,e[16]=f,e[17]=y):y=e[17];const[n,S]=st(k,y);let z;e[18]!==n||e[19]!==S?(z=(G,h)=>S({...n,[G]:h}),e[18]=n,e[19]=S,e[20]=z):z=e[20];const P=z;let U;e[21]!==l||e[22]!==g||e[23]!==n||e[24]!==c?(U=Ze({decofile:l,post:n,previewBaseUrl:c,draftPointer:g}),e[21]=l,e[22]=g,e[23]=n,e[24]=c,e[25]=U):U=e[25];const N=U;let v,L,Y;e[26]!==n||e[27]!==a?(L=we(n),v=L.length>0,Y=L.length===1?a("sandbox.postEditor.missingFieldSingular",{fields:L.join(", ")}):a("sandbox.postEditor.missingFieldPlural",{fields:L.join(", ")}),e[26]=n,e[27]=a,e[28]=v,e[29]=L,e[30]=Y):(v=e[28],L=e[29],Y=e[30]);const w=Y;let F;e[31]!==n.title||e[32]!==a?(F=Q(n.title)||a("sandbox.postEditor.untitledPost"),e[31]=n.title,e[32]=a,e[33]=F):F=e[33];let T;e[34]!==F?(T=t.jsx("span",{className:"truncate text-sm font-medium",children:F}),e[34]=F,e[35]=T):T=e[35];let B;e[36]!==v||e[37]!==L||e[38]!==w||e[39]!==a?(B=v&&t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Ie,{size:14}),L.length," ",L.length===1?a("sandbox.postEditor.issueSingular"):a("sandbox.postEditor.issuePlural")]})}),t.jsx(Ne,{side:"bottom",children:w})]}),e[36]=v,e[37]=L,e[38]=w,e[39]=a,e[40]=B):B=e[40];let I;e[41]!==f.isError||e[42]!==f.isPending?(I=t.jsx(He,{isPending:f.isPending,isError:f.isError}),e[41]=f.isError,e[42]=f.isPending,e[43]=I):I=e[43];const J=!N||v;let A;e[44]!==v||e[45]!==w||e[46]!==N||e[47]!==a?(A=v?w:a(N?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),e[44]=v,e[45]=w,e[46]=N,e[47]=a,e[48]=A):A=e[48];let R;e[49]!==v||e[50]!==N?(R=()=>{N&&!v&&window.open(N,"_blank","noopener,noreferrer")},e[49]=v,e[50]=N,e[51]=R):R=e[51];let H;e[52]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ae,{size:14}),e[52]=H):H=e[52];let D;e[53]!==a?(D=a("sandbox.postEditor.seePreview"),e[53]=a,e[54]=D):D=e[54];let $;e[55]!==J||e[56]!==A||e[57]!==R||e[58]!==D?($=t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:J,title:A,onClick:R,children:[H,D]}),e[55]=J,e[56]=A,e[57]=R,e[58]=D,e[59]=$):$=e[59];let K;e[60]!==B||e[61]!==I||e[62]!==$?(K=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[B,I,$]}),e[60]=B,e[61]=I,e[62]=$,e[63]=K):K=e[63];let O;e[64]!==T||e[65]!==K?(O=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[T,K]}),e[64]=T,e[65]=K,e[66]=O):O=e[66];let _;e[67]!==n.title?(_=Q(n.title),e[67]=n.title,e[68]=_):_=e[68];let M;e[69]!==P?(M=G=>P("title",G),e[69]=P,e[70]=M):M=e[70];let q;e[71]!==a?(q=a("sandbox.postEditor.postTitlePlaceholder"),e[71]=a,e[72]=q):q=e[72];let E;e[73]!==_||e[74]!==M||e[75]!==q?(E=t.jsx(lt,{value:_,onChange:M,placeholder:q,className:"py-1 text-4xl font-bold text-foreground"}),e[73]=_,e[74]=M,e[75]=q,e[76]=E):E=e[76];let W;e[77]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Re,{}),e[77]=W):W=e[77];let X;e[78]!==a?(X=a("sandbox.postEditor.contentTab"),e[78]=a,e[79]=X):X=e[79];let Z;e[80]!==X?(Z=t.jsxs(je,{value:"content",children:[W,X]}),e[80]=X,e[81]=Z):Z=e[81];let me;e[82]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(De,{}),e[82]=me):me=e[82];let ee;e[83]!==a?(ee=a("sandbox.postEditor.settingsTab"),e[83]=a,e[84]=ee):ee=e[84];let te;e[85]!==ee?(te=t.jsxs(je,{value:"settings",children:[me,ee]}),e[85]=ee,e[86]=te):te=e[86];let se;e[87]!==Z||e[88]!==te?(se=t.jsxs(_e,{children:[Z,te]}),e[87]=Z,e[88]=te,e[89]=se):se=e[89];let le;e[90]!==n.sections?(le=et(n.sections),e[90]=n.sections,e[91]=le):le=e[91];let ie;e[92]!==P?(ie=G=>P("sections",G),e[92]=P,e[93]=ie):ie=e[93];let oe;e[94]!==i||e[95]!==s||e[96]!==m||e[97]!==d?(oe={orgSlug:s,virtualMcpId:d,branch:i,threadId:m},e[94]=i,e[95]=s,e[96]=m,e[97]=d,e[98]=oe):oe=e[98];let ae;e[99]!==a?(ae=a("sandbox.postEditor.noContentYet"),e[99]=a,e[100]=ae):ae=e[100];let re;e[101]!==r||e[102]!==le||e[103]!==ie||e[104]!==oe||e[105]!==ae?(re=t.jsx(ve,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(tt,{value:le,onChange:ie,meta:r,sandboxRef:oe,emptyMessage:ae})})}),e[101]=r,e[102]=le,e[103]=ie,e[104]=oe,e[105]=ae,e[106]=re):re=e[106];let ne;e[107]!==n||e[108]!==S?(ne=G=>S({...n,...G}),e[107]=n,e[108]=S,e[109]=ne):ne=e[109];let de;e[110]!==l||e[111]!==n||e[112]!==P||e[113]!==C||e[114]!==ne?(de=t.jsx(ve,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(rt,{post:n,decofile:l,support:C,onChange:P,onPatch:ne})})}),e[110]=l,e[111]=n,e[112]=P,e[113]=C,e[114]=ne,e[115]=de):de=e[115];let pe;e[116]!==se||e[117]!==re||e[118]!==de?(pe=t.jsxs(Me,{defaultValue:"content",className:"mt-6 gap-4",children:[se,re,de]}),e[116]=se,e[117]=re,e[118]=de,e[119]=pe):pe=e[119];let ce;e[120]!==E||e[121]!==pe?(ce=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[E,pe]})}),e[120]=E,e[121]=pe,e[122]=ce):ce=e[122];let fe;return e[123]!==O||e[124]!==ce?(fe=t.jsxs("div",{className:"flex h-full flex-col",children:[O,ce]}),e[123]=O,e[124]=ce,e[125]=fe):fe=e[125],fe}function Ce(V){const e=he.c(18),{id:s,label:d,checked:i,blocked:o,blockedReason:p,className:l,onCheckedChange:r}=V;let c;e[0]!==s||e[1]!==d?(c=t.jsx(xe,{htmlFor:s,children:d}),e[0]=s,e[1]=d,e[2]=c):c=e[2];let a;e[3]!==o||e[4]!==i||e[5]!==l||e[6]!==s||e[7]!==r?(a=t.jsx(ke,{asChild:!0,children:t.jsx("span",{children:t.jsx(Se,{id:s,className:l,checked:i,disabled:o,onCheckedChange:r})})}),e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=r,e[8]=a):a=e[8];let m;e[9]!==o||e[10]!==p?(m=o&&t.jsx(Ne,{side:"bottom",children:p}),e[9]=o,e[10]=p,e[11]=m):m=e[11];let x;e[12]!==a||e[13]!==m?(x=t.jsxs(Pe,{children:[a,m]}),e[12]=a,e[13]=m,e[14]=x):x=e[14];let f;return e[15]!==c||e[16]!==x?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c,x]}),e[15]=c,e[16]=x,e[17]=f):f=e[17],f}function rt(V){const e=he.c(142),{post:s,decofile:d,support:i,onChange:o,onPatch:p}=V,l=be();let r;e[0]!==i?(r=Ke(i),e[0]=i,e[1]=r):r=e[1];const c=r;let a;e[2]!==i?(a=Oe(i),e[2]=i,e[3]=a):a=e[3];const m=a;let x;e[4]!==s?(x=Ge(s),e[4]=s,e[5]=x):x=e[5];const f=x,u=m&&f==="scheduled";let C;if(e[6]!==s||e[7]!==l){const h=we(s);C=h.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:h.join(", ")}):l("sandbox.postEditor.missingFieldPlural",{fields:h.join(", ")}),e[6]=s,e[7]=l,e[8]=C}else C=e[8];const b=C;let g;e[9]!==p||e[10]!==s?(g=h=>p(Xe(s,h,new Date)),e[9]=p,e[10]=s,e[11]=g):g=e[11];const j=g;let k;e[12]!==c||e[13]!==m||e[14]!==u||e[15]!==b||e[16]!==o||e[17]!==s||e[18]!==j||e[19]!==f||e[20]!==l?(k=c&&t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[m&&t.jsx(Ce,{id:"post-scheduled",label:l("sandbox.postEditor.schedulingLabel"),checked:u,blocked:Ee(s,"scheduled"),blockedReason:b,onCheckedChange:h=>j(h?"scheduled":"draft")}),u?t.jsx(ge,{schema:{type:"string",format:"date-time",title:l("sandbox.postEditor.scheduledDatetimeLabel"),description:l("sandbox.postEditor.scheduledDatetimeDescription")},value:Q(s.scheduledDatetime),onChange:h=>o("scheduledDatetime",h),path:"post-scheduled-datetime",label:l("sandbox.postEditor.scheduledDatetimeLabel")}):t.jsx(Ce,{id:"post-published",label:l("sandbox.postEditor.publishedLabel"),className:"data-[state=checked]:bg-success",checked:f==="published",blocked:Ee(s,"published"),blockedReason:b,onCheckedChange:h=>j(h?"published":"draft")})]}),e[12]=c,e[13]=m,e[14]=u,e[15]=b,e[16]=o,e[17]=s,e[18]=j,e[19]=f,e[20]=l,e[21]=k):k=e[21];let y;e[22]!==l?(y=l("sandbox.postEditor.excerptLabel"),e[22]=l,e[23]=y):y=e[23];let n;e[24]!==y?(n=t.jsx(xe,{htmlFor:"post-excerpt",children:y}),e[24]=y,e[25]=n):n=e[25];let S;e[26]!==s.excerpt?(S=Q(s.excerpt),e[26]=s.excerpt,e[27]=S):S=e[27];let z;e[28]!==o?(z=h=>o("excerpt",h.target.value),e[28]=o,e[29]=z):z=e[29];let P;e[30]!==z||e[31]!==S?(P=t.jsx(Le,{id:"post-excerpt",value:S,onChange:z,rows:2}),e[30]=z,e[31]=S,e[32]=P):P=e[32];let U;e[33]!==P||e[34]!==n?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[33]=P,e[34]=n,e[35]=U):U=e[35];let N;e[36]!==l?(N=l("sandbox.postEditor.slugLabel"),e[36]=l,e[37]=N):N=e[37];let v;e[38]!==N?(v=t.jsx(xe,{htmlFor:"post-slug",children:N}),e[38]=N,e[39]=v):v=e[39];let L;e[40]!==s.slug?(L=Q(s.slug),e[40]=s.slug,e[41]=L):L=e[41];let Y;e[42]!==o?(Y=h=>o("slug",h.target.value),e[42]=o,e[43]=Y):Y=e[43];let w;e[44]!==l?(w=l("sandbox.postEditor.slugPlaceholder"),e[44]=l,e[45]=w):w=e[45];let F;e[46]!==L||e[47]!==Y||e[48]!==w?(F=t.jsx(ue,{id:"post-slug",value:L,onChange:Y,placeholder:w,className:"h-10"}),e[46]=L,e[47]=Y,e[48]=w,e[49]=F):F=e[49];let T;e[50]!==v||e[51]!==F?(T=t.jsxs("div",{className:"space-y-2",children:[v,F]}),e[50]=v,e[51]=F,e[52]=T):T=e[52];let B;e[53]!==l?(B=l("sandbox.postEditor.dateLabel"),e[53]=l,e[54]=B):B=e[54];let I;e[55]!==B?(I={type:"string",format:"date",title:B},e[55]=B,e[56]=I):I=e[56];let J;e[57]!==s.date?(J=Q(s.date),e[57]=s.date,e[58]=J):J=e[58];let A;e[59]!==o?(A=h=>o("date",h),e[59]=o,e[60]=A):A=e[60];let R;e[61]!==l?(R=l("sandbox.postEditor.dateLabel"),e[61]=l,e[62]=R):R=e[62];let H;e[63]!==I||e[64]!==J||e[65]!==A||e[66]!==R?(H=t.jsx(ge,{schema:I,value:J,onChange:A,path:"post-date",label:R}),e[63]=I,e[64]=J,e[65]=A,e[66]=R,e[67]=H):H=e[67];let D;e[68]!==T||e[69]!==H?(D=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T,H]}),e[68]=T,e[69]=H,e[70]=D):D=e[70];let $;e[71]!==l?($=l("sandbox.postEditor.coverImageLabel"),e[71]=l,e[72]=$):$=e[72];let K;e[73]!==$?(K={type:"string",format:"image-uri",title:$},e[73]=$,e[74]=K):K=e[74];const O=s.image;let _;e[75]!==o?(_=h=>o("image",h),e[75]=o,e[76]=_):_=e[76];let M;e[77]!==l?(M=l("sandbox.postEditor.coverImageLabel"),e[77]=l,e[78]=M):M=e[78];let q;e[79]!==s.image||e[80]!==K||e[81]!==_||e[82]!==M?(q=t.jsx(Fe,{schema:K,value:O,onChange:_,path:"post-image",label:M}),e[79]=s.image,e[80]=K,e[81]=_,e[82]=M,e[83]=q):q=e[83];let E;e[84]!==l?(E=l("sandbox.postEditor.coverAltLabel"),e[84]=l,e[85]=E):E=e[85];let W;e[86]!==l?(W=l("sandbox.postEditor.coverAltDescription"),e[86]=l,e[87]=W):W=e[87];let X;e[88]!==E||e[89]!==W?(X={type:"string",title:E,description:W},e[88]=E,e[89]=W,e[90]=X):X=e[90];let Z;e[91]!==s.alt?(Z=Q(s.alt),e[91]=s.alt,e[92]=Z):Z=e[92];let me;e[93]!==o?(me=h=>o("alt",h),e[93]=o,e[94]=me):me=e[94];let ee;e[95]!==l?(ee=l("sandbox.postEditor.coverAltLabel"),e[95]=l,e[96]=ee):ee=e[96];let te;e[97]!==X||e[98]!==Z||e[99]!==me||e[100]!==ee?(te=t.jsx(ge,{schema:X,value:Z,onChange:me,path:"post-alt",label:ee}),e[97]=X,e[98]=Z,e[99]=me,e[100]=ee,e[101]=te):te=e[101];let se;e[102]!==q||e[103]!==te?(se=t.jsxs("div",{className:"space-y-2",children:[q,te]}),e[102]=q,e[103]=te,e[104]=se):se=e[104];let le;e[105]!==l?(le=l("sandbox.postEditor.authorsLabel"),e[105]=l,e[106]=le):le=e[106];let ie;e[107]!==o?(ie=h=>o("authors",h),e[107]=o,e[108]=ie):ie=e[108];let oe;e[109]!==d||e[110]!==s.authors||e[111]!==le||e[112]!==ie?(oe=t.jsx(ye,{label:le,decofile:d,kind:"authors",valueField:"email",toRef:dt,selected:s.authors,onChange:ie}),e[109]=d,e[110]=s.authors,e[111]=le,e[112]=ie,e[113]=oe):oe=e[113];let ae;e[114]!==l?(ae=l("sandbox.postEditor.categoriesLabel"),e[114]=l,e[115]=ae):ae=e[115];let re;e[116]!==o?(re=h=>o("categories",h),e[116]=o,e[117]=re):re=e[117];let ne;e[118]!==d||e[119]!==s.categories||e[120]!==ae||e[121]!==re?(ne=t.jsx(ye,{label:ae,decofile:d,kind:"categories",valueField:"slug",toRef:nt,selected:s.categories,onChange:re}),e[118]=d,e[119]=s.categories,e[120]=ae,e[121]=re,e[122]=ne):ne=e[122];let de;e[123]!==o?(de=h=>o("extraProps",h),e[123]=o,e[124]=de):de=e[124];let pe;e[125]!==s.extraProps||e[126]!==de?(pe=t.jsx(ct,{value:s.extraProps,onChange:de}),e[125]=s.extraProps,e[126]=de,e[127]=pe):pe=e[127];let ce;e[128]!==o?(ce=h=>o("seo",h),e[128]=o,e[129]=ce):ce=e[129];let fe;e[130]!==s.seo||e[131]!==ce?(fe=t.jsx(pt,{value:s.seo,onChange:ce}),e[130]=s.seo,e[131]=ce,e[132]=fe):fe=e[132];let G;return e[133]!==U||e[134]!==D||e[135]!==se||e[136]!==oe||e[137]!==ne||e[138]!==pe||e[139]!==fe||e[140]!==k?(G=t.jsxs("div",{className:"space-y-5",children:[k,U,D,se,oe,ne,pe,fe]}),e[133]=U,e[134]=D,e[135]=se,e[136]=oe,e[137]=ne,e[138]=pe,e[139]=fe,e[140]=k,e[141]=G):G=e[141],G}function nt(V){return{name:Q(V.name),slug:Q(V.slug)}}function dt(V){return{...V}}function pt(V){const e=he.c(93),{value:s,onChange:d}=V,i=be();let o;e[0]!==s?(o=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=o):o=e[1];const p=o;let l;e[2]!==d||e[3]!==p?(l=(E,W)=>d({...p,[E]:W}),e[2]=d,e[3]=p,e[4]=l):l=e[4];const r=l;let c;e[5]!==i?(c=i("sandbox.postEditor.seoSectionLabel"),e[5]=i,e[6]=c):c=e[6];let a;e[7]!==c?(a=t.jsx("p",{className:"text-sm font-medium",children:c}),e[7]=c,e[8]=a):a=e[8];let m;e[9]!==i?(m=i("sandbox.postEditor.seoSectionHint"),e[9]=i,e[10]=m):m=e[10];let x;e[11]!==m?(x=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[11]=m,e[12]=x):x=e[12];let f;e[13]!==a||e[14]!==x?(f=t.jsxs("div",{className:"space-y-1",children:[a,x]}),e[13]=a,e[14]=x,e[15]=f):f=e[15];let u;e[16]!==i?(u=i("sandbox.postEditor.seoTitleLabel"),e[16]=i,e[17]=u):u=e[17];let C;e[18]!==u?(C=t.jsx(xe,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=C):C=e[19];let b;e[20]!==p.title?(b=Q(p.title),e[20]=p.title,e[21]=b):b=e[21];let g;e[22]!==r?(g=E=>r("title",E.target.value),e[22]=r,e[23]=g):g=e[23];let j;e[24]!==b||e[25]!==g?(j=t.jsx(ue,{id:"post-seo-title",value:b,onChange:g,className:"h-10"}),e[24]=b,e[25]=g,e[26]=j):j=e[26];let k;e[27]!==j||e[28]!==C?(k=t.jsxs("div",{className:"space-y-2",children:[C,j]}),e[27]=j,e[28]=C,e[29]=k):k=e[29];let y;e[30]!==i?(y=i("sandbox.postEditor.seoDescriptionLabel"),e[30]=i,e[31]=y):y=e[31];let n;e[32]!==y?(n=t.jsx(xe,{htmlFor:"post-seo-description",children:y}),e[32]=y,e[33]=n):n=e[33];let S;e[34]!==p.description?(S=Q(p.description),e[34]=p.description,e[35]=S):S=e[35];let z;e[36]!==r?(z=E=>r("description",E.target.value),e[36]=r,e[37]=z):z=e[37];let P;e[38]!==S||e[39]!==z?(P=t.jsx(Le,{id:"post-seo-description",value:S,onChange:z,rows:2}),e[38]=S,e[39]=z,e[40]=P):P=e[40];let U;e[41]!==n||e[42]!==P?(U=t.jsxs("div",{className:"space-y-2",children:[n,P]}),e[41]=n,e[42]=P,e[43]=U):U=e[43];let N;e[44]!==i?(N=i("sandbox.postEditor.seoImageLabel"),e[44]=i,e[45]=N):N=e[45];let v;e[46]!==N?(v={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=v):v=e[47];const L=p.image;let Y;e[48]!==r?(Y=E=>r("image",E),e[48]=r,e[49]=Y):Y=e[49];let w;e[50]!==i?(w=i("sandbox.postEditor.seoImageLabel"),e[50]=i,e[51]=w):w=e[51];let F;e[52]!==p.image||e[53]!==v||e[54]!==Y||e[55]!==w?(F=t.jsx(Fe,{schema:v,value:L,onChange:Y,path:"post-seo-image",label:w}),e[52]=p.image,e[53]=v,e[54]=Y,e[55]=w,e[56]=F):F=e[56];let T;e[57]!==i?(T=i("sandbox.postEditor.seoCanonicalLabel"),e[57]=i,e[58]=T):T=e[58];let B;e[59]!==T?(B=t.jsx(xe,{htmlFor:"post-seo-canonical",children:T}),e[59]=T,e[60]=B):B=e[60];let I;e[61]!==p.canonical?(I=Q(p.canonical),e[61]=p.canonical,e[62]=I):I=e[62];let J;e[63]!==r?(J=E=>r("canonical",E.target.value),e[63]=r,e[64]=J):J=e[64];let A;e[65]!==i?(A=i("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=i,e[66]=A):A=e[66];let R;e[67]!==I||e[68]!==J||e[69]!==A?(R=t.jsx(ue,{id:"post-seo-canonical",value:I,onChange:J,placeholder:A,className:"h-10"}),e[67]=I,e[68]=J,e[69]=A,e[70]=R):R=e[70];let H;e[71]!==B||e[72]!==R?(H=t.jsxs("div",{className:"space-y-2",children:[B,R]}),e[71]=B,e[72]=R,e[73]=H):H=e[73];let D;e[74]!==i?(D=i("sandbox.postEditor.seoNoIndexingLabel"),e[74]=i,e[75]=D):D=e[75];let $;e[76]!==D?($=t.jsx(xe,{htmlFor:"post-seo-no-indexing",children:D}),e[76]=D,e[77]=$):$=e[77];const K=p.noIndexing===!0;let O;e[78]!==r?(O=E=>r("noIndexing",E),e[78]=r,e[79]=O):O=e[79];let _;e[80]!==K||e[81]!==O?(_=t.jsx(Se,{id:"post-seo-no-indexing",checked:K,onCheckedChange:O}),e[80]=K,e[81]=O,e[82]=_):_=e[82];let M;e[83]!==$||e[84]!==_?(M=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,_]}),e[83]=$,e[84]=_,e[85]=M):M=e[85];let q;return e[86]!==k||e[87]!==U||e[88]!==F||e[89]!==H||e[90]!==M||e[91]!==f?(q=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[f,k,U,F,H,M]}),e[86]=k,e[87]=U,e[88]=F,e[89]=H,e[90]=M,e[91]=f,e[92]=q):q=e[92],q}function ct(V){const e=he.c(24),{value:s,onChange:d}=V,i=be();let o,p,l,r;if(e[0]!==d||e[1]!==i||e[2]!==s){o=at(s);const f=(C,b)=>d(o.map((g,j)=>j===C?{...g,...b}:g));p="space-y-2";let u;e[7]!==i?(u=i("sandbox.postEditor.extraPropsLabel"),e[7]=i,e[8]=u):u=e[8],e[9]!==u?(l=t.jsx(xe,{children:u}),e[9]=u,e[10]=l):l=e[10],r=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((C,b)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(ue,{value:C.key,onChange:g=>f(b,{key:g.target.value}),placeholder:i("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(ue,{value:C.value,onChange:g=>f(b,{value:g.target.value}),placeholder:i("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(it,{label:i("sandbox.postEditor.removePropLabel"),onClick:()=>d(o.filter((g,j)=>j!==b))})]},b))}),e[0]=d,e[1]=i,e[2]=s,e[3]=o,e[4]=p,e[5]=l,e[6]=r}else o=e[3],p=e[4],l=e[5],r=e[6];let c;e[11]!==i?(c=i("sandbox.postEditor.addPropLabel"),e[11]=i,e[12]=c):c=e[12];let a;e[13]!==o||e[14]!==d?(a=()=>d([...o,{key:"",value:""}]),e[13]=o,e[14]=d,e[15]=a):a=e[15];let m;e[16]!==c||e[17]!==a?(m=t.jsx(ot,{label:c,onClick:a}),e[16]=c,e[17]=a,e[18]=m):m=e[18];let x;return e[19]!==p||e[20]!==l||e[21]!==r||e[22]!==m?(x=t.jsxs("div",{className:p,children:[l,r,m]}),e[19]=p,e[20]=l,e[21]=r,e[22]=m,e[23]=x):x=e[23],x}function ye(V){const e=he.c(24),{label:s,decofile:d,kind:i,valueField:o,toRef:p,selected:l,onChange:r}=V,c=be();let a;e[0]!==d||e[1]!==i||e[2]!==l||e[3]!==p||e[4]!==o?(a=Qe({records:We(d,i),selected:l,valueField:o,toRef:p}),e[0]=d,e[1]=i,e[2]=l,e[3]=p,e[4]=o,e[5]=a):a=e[5];const{options:m,selectedValues:x,refsForValues:f}=a;let u;e[6]!==i||e[7]!==c?(u=c(i==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=i,e[7]=c,e[8]=u):u=e[8];const C=u;let b;e[9]!==i||e[10]!==c?(b=c(i==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=i,e[10]=c,e[11]=b):b=e[11];const g=b;let j;e[12]!==s?(j=t.jsx(xe,{children:s}),e[12]=s,e[13]=j):j=e[13];let k;e[14]!==C||e[15]!==r||e[16]!==m||e[17]!==f||e[18]!==g||e[19]!==x?(k=m.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:C}):t.jsx($e,{options:m,defaultValue:x,onValueChange:n=>r(f(n)),placeholder:g,maxCount:4}),e[14]=C,e[15]=r,e[16]=m,e[17]=f,e[18]=g,e[19]=x,e[20]=k):k=e[20];let y;return e[21]!==j||e[22]!==k?(y=t.jsxs("div",{className:"space-y-2",children:[j,k]}),e[21]=j,e[22]=k,e[23]=y):y=e[23],y}export{pi as PostEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as h,j as a}from"./index-
|
|
1
|
+
import{c as f,l as h,j as a}from"./index-bAk-APf5.js";import{l as y}from"./agent-icon-DARgLSxq.js";import{s as v}from"./Plus-CTP-uL3y.js";import{s as j}from"./Trash01-yJ8y8j2_.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
|