decocms 4.600.0 → 4.602.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CShy6yDX.js → AlertCircle-B4BiejsA.js} +1 -1
- package/dist/client/assets/{AreaChart-BGct6q9f.js → AreaChart-KuZY2lVT.js} +1 -1
- package/dist/client/assets/{ArrowLeft-WKtVHs-Z.js → ArrowLeft-DpoZP_fX.js} +1 -1
- package/dist/client/assets/{ArrowRight-FtSbCfTm.js → ArrowRight-waHzto0g.js} +1 -1
- package/dist/client/assets/{ArrowUp-DEEf-mtS.js → ArrowUp-C2dE69W7.js} +1 -1
- package/dist/client/assets/{BookOpen01-2E_0y9OX.js → BookOpen01-Det9naRR.js} +1 -1
- package/dist/client/assets/{CartesianChart-UZ4xQJUQ.js → CartesianChart-BN-yZqL0.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CENUMi_W.js → CategoricalChart-D9Euwg-G.js} +1 -1
- package/dist/client/assets/{CheckCircle-DZKYp081.js → CheckCircle-BNEuJPHU.js} +1 -1
- package/dist/client/assets/{ChevronDown-DZmwX-ra.js → ChevronDown-_sr4up4D.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BBSQj61f.js → ChevronSelectorVertical-Ddl6sDao.js} +1 -1
- package/dist/client/assets/{ChevronUp-up6pfAf9.js → ChevronUp-CK7Ad_mD.js} +1 -1
- package/dist/client/assets/{CreditCard01-BPmia42q.js → CreditCard01-DaUYIK4F.js} +1 -1
- package/dist/client/assets/{Eye-BuU02LHf.js → Eye-CYtkFg_6.js} +1 -1
- package/dist/client/assets/{File02-C19wgG-g.js → File02-Dj9EXPDT.js} +1 -1
- package/dist/client/assets/{Fingerprint04-D5Hh-Z6T.js → Fingerprint04-kauf3nbZ.js} +1 -1
- package/dist/client/assets/{Globe04-BStLKLZ2.js → Globe04-YQZG_Qbl.js} +1 -1
- package/dist/client/assets/{Image01-DPsmXJM9.js → Image01-ChEwjYSJ.js} +1 -1
- package/dist/client/assets/{Key01-7I5yC-jW.js → Key01-DPAOwUET.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DUAhH4Wy.js → LayoutLeft-DUieRSDJ.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DGLo0pdz.js → LinkBroken01-jFeLEleD.js} +1 -1
- package/dist/client/assets/{MessageCircle01-BSvG5u-_.js → MessageCircle01-Cf5Qa_r1.js} +1 -1
- package/dist/client/assets/{Minus-BWHpZUKs.js → Minus-DVAnrb98.js} +1 -1
- package/dist/client/assets/{Monitor01-docIVUl5.js → Monitor01-D5to20Na.js} +1 -1
- package/dist/client/assets/{Play-2z1E087w.js → Play-DBG3GXxW.js} +1 -1
- package/dist/client/assets/{Plus-D8wmiIrv.js → Plus-BEFFoW2D.js} +1 -1
- package/dist/client/assets/{ReferenceLine-C2TsGNU_.js → ReferenceLine-B0MbZ3gg.js} +1 -1
- package/dist/client/assets/{SearchMd-DL0DTMXc.js → SearchMd-BVX4smTx.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BvzxucRv.js → ShoppingBag01-Bvm3sWvz.js} +1 -1
- package/dist/client/assets/{Sun-BiUlQLmT.js → Sun-D2fDzKM6.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C2pVU_4J.js → SwitchHorizontal01-CgqtVqHH.js} +1 -1
- package/dist/client/assets/{Tool01-Cvtzb7gx.js → Tool01-B97c8idL.js} +1 -1
- package/dist/client/assets/{Tooltip-B1SzrgTJ.js → Tooltip-Dc_sC0mP.js} +1 -1
- package/dist/client/assets/{Trash01-9RQC1f5G.js → Trash01-Bi3fjf_i.js} +1 -1
- package/dist/client/assets/{Upload01-3Gw-mR9u.js → Upload01-B0N1cyeo.js} +1 -1
- package/dist/client/assets/{UserCheck01-BsbnQ5ut.js → UserCheck01-CjBhJIbn.js} +1 -1
- package/dist/client/assets/{UserSquare-B3Bg0K9g.js → UserSquare-D0WQA2_a.js} +1 -1
- package/dist/client/assets/{Users01-w98WkMA8.js → Users01-CNLWTh0g.js} +1 -1
- package/dist/client/assets/{XClose-rn7BTPbt.js → XClose-CUoBDo4j.js} +1 -1
- package/dist/client/assets/{Zap-DuqrcICg.js → Zap-D5Q1SF5c.js} +1 -1
- package/dist/client/assets/{access-gate-DW6dT6hG.js → access-gate-B0i3LdD3.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-41qDOna8.js → add-connection-dialog-QaQFm_sJ.js} +1 -1
- package/dist/client/assets/agent-app-CfZ2_qAg.js +1 -0
- package/dist/client/assets/{agent-assets-kUGQRLuY.js → agent-assets-Ci2UQ3kI.js} +1 -1
- package/dist/client/assets/{agent-automation-D56n8lJY.js → agent-automation-Nh9VJD4K.js} +3 -3
- package/dist/client/assets/{agent-automations-BAB9lGNM.js → agent-automations-BqhkNuFU.js} +1 -1
- package/dist/client/assets/agent-blog-Dqo7yXQe.js +2 -0
- package/dist/client/assets/agent-blog-post-DRqbdGm9.js +2 -0
- package/dist/client/assets/agent-business-case-CAQgqun2.js +1 -0
- package/dist/client/assets/{agent-calendar-Df_iHtIm.js → agent-calendar-C_2UFnlZ.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DfwZEM8H.js → agent-capabilities-O4jivf-X.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DX3x7-FY.js → agent-connect-sources-e12r6R6U.js} +1 -1
- package/dist/client/assets/agent-deck-B7f0cKPF.js +1 -0
- package/dist/client/assets/{agent-e2e-Dcub2PY1.js → agent-e2e-JJXAQruo.js} +1 -1
- package/dist/client/assets/agent-experiments-BBLc6sXg.js +1 -0
- package/dist/client/assets/agent-file-D8sDhpVS.js +1 -0
- package/dist/client/assets/{agent-hosting-DOle-P9z.js → agent-hosting-_9l_P5l2.js} +1 -1
- package/dist/client/assets/{agent-icon-BmlBo_mr.js → agent-icon-y2SKybSP.js} +1 -1
- package/dist/client/assets/agent-library-DEBDdT7D.js +1 -0
- package/dist/client/assets/agent-library-file-DL3_cgBw.js +1 -0
- package/dist/client/assets/agent-overview-jQZh1dQH.js +1 -0
- package/dist/client/assets/{agent-releases-CVqZP5oT.js → agent-releases-DNsRG5FD.js} +2 -2
- package/dist/client/assets/agent-settings-C47TLRPM.js +1 -0
- package/dist/client/assets/{agent-site-editor-CloXRQ-i.js → agent-site-editor-B7tCcSvo.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DPz3ZIvH.js +2 -0
- package/dist/client/assets/agent-site-editor-content-COxClvme.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CAin8bHi.js +1 -0
- package/dist/client/assets/agent-view-DkUvvSxM.js +1 -0
- package/dist/client/assets/{agent-view-guard-BsUiX4Ya.js → agent-view-guard-CHMCp4na.js} +1 -1
- package/dist/client/assets/ai-providers-DSfUDWX0.js +1 -0
- package/dist/client/assets/{alert-B0-bUkHo.js → alert-565fy8M1.js} +1 -1
- package/dist/client/assets/{analytics-sections-C_a4Zs81.js → analytics-sections-CEmkg_2B.js} +1 -1
- package/dist/client/assets/{api-keys-Drrcn4S1.js → api-keys-Bz1LryNm.js} +1 -1
- package/dist/client/assets/api-keys-dDDIaFES.js +1 -0
- package/dist/client/assets/app-editor-eBT6vuSI.js +1 -0
- package/dist/client/assets/{asset-utils-lEJDqLJA.js → asset-utils-BDk7TImr.js} +1 -1
- package/dist/client/assets/{auth-MiTZGjji.js → auth-D7Uu7n_e.js} +1 -1
- package/dist/client/assets/{auth-catchall-BrFXd0V5.js → auth-catchall-C_afKPwz.js} +1 -1
- package/dist/client/assets/{auth-entry-uafFmpu3.js → auth-entry-CrTd5O-K.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cuozobog.js → auth-split-layout-n4Rc1SQ7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BMCgWPAs.js → authenticate-and-persist-oauth-C7CYUnX8.js} +1 -1
- package/dist/client/assets/{automation-list-row-DjLl_-Ic.js → automation-list-row-CUaTcT3h.js} +1 -1
- package/dist/client/assets/{automation-runs-B1vurEol.js → automation-runs-C6tWYqF5.js} +1 -1
- package/dist/client/assets/{automations-DO8SymUj.js → automations-f99KCPWc.js} +1 -1
- package/dist/client/assets/{badge-PmwnY4hy.js → badge-CdntSWLw.js} +1 -1
- package/dist/client/assets/{block-document-C4GUR02r.js → block-document-dwVjY8ei.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CEy6ana7.js → blocks-preview-workspace-context-Dn_RDSoz.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-jg37ZdSd.js → blocks-tab-states-clMxtmY8.js} +1 -1
- package/dist/client/assets/{blog-preview-url-D3OQhPrj.js → blog-preview-url-BxEndwKO.js} +1 -1
- package/dist/client/assets/{blog-schema-LnsH0S5I.js → blog-schema-C2rs0u9l.js} +1 -1
- package/dist/client/assets/{blog-source-gate-votguItQ.js → blog-source-gate-BXEDNt3_.js} +1 -1
- package/dist/client/assets/{blog-view-gate-LkoX3aVt.js → blog-view-gate-BEqdtyeU.js} +1 -1
- package/dist/client/assets/{buckets-9o7-FCAF.js → buckets-CYYLsl9x.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DTfd4sR5.js → build-improve-prompt-doc-DkcwrW0T.js} +1 -1
- package/dist/client/assets/{calendar-Dw9g3jCh.js → calendar-CQCK8RMi.js} +1 -1
- package/dist/client/assets/{capability-load-error-DREzOdAI.js → capability-load-error-xI_9h3pT.js} +1 -1
- package/dist/client/assets/category-editor-C7K4UFzc.js +1 -0
- package/dist/client/assets/{category-tree-CT1N50Br.js → category-tree-k_En3Ghr.js} +1 -1
- package/dist/client/assets/{chart-Bv3hFD74.js → chart-ymFJV291.js} +2 -2
- package/dist/client/assets/chat-context-3o15fH-n.js +44 -0
- package/dist/client/assets/{chat-draft-9D8O6IhX.js → chat-draft-DkTLJIsD.js} +1 -1
- package/dist/client/assets/{checkbox-B1JBiKHt.js → checkbox-DG0VRyZt.js} +1 -1
- package/dist/client/assets/{choose-editor-DyATHiiR.js → choose-editor-BuYE419X.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BDHfhdbq.js → cli-auth-success-kFD_vr-8.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CAjj_23i.js +1 -0
- package/dist/client/assets/{cms-store-drafts-46Bd4H4I.js → cms-store-drafts-JEUeezAR.js} +1 -1
- package/dist/client/assets/{collapsible-MMZS4bUW.js → collapsible-CUOhSps5.js} +1 -1
- package/dist/client/assets/collection-detail-BpgRZNNv.js +1 -0
- package/dist/client/assets/{collection-display-button-CNU2B9PT.js → collection-display-button-DmC5C_DJ.js} +1 -1
- package/dist/client/assets/{collection-search-RaF1TESZ.js → collection-search-gjXSkcT8.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DkHLZ70L.js → collection-table-wrapper-CzCDnwLo.js} +1 -1
- package/dist/client/assets/{collection-tabs-DQ1qcrf-.js → collection-tabs-COt6y1YG.js} +1 -1
- package/dist/client/assets/{combobox-1zkSCtBC.js → combobox-CH-LlA2d.js} +1 -1
- package/dist/client/assets/{command-lFozjt-f.js → command-BvXS_hwC.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Cx6ucwDV.js → companion-mcps-section-hLgHegzh.js} +1 -1
- package/dist/client/assets/{config-ENUSei4z.js → config-Bn2m6WJs.js} +1 -1
- package/dist/client/assets/{connect-D5WcJbVU.js → connect-D3u8EgEX.js} +3 -3
- package/dist/client/assets/{connect-key-C6BV1Iwv.js → connect-key-txW2Hv5F.js} +1 -1
- package/dist/client/assets/{connect-layout-DjV0E6Nl.js → connect-layout-BkGodyIz.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-D2l3M31x.js → connect-source-dialog-Fx070D3z.js} +1 -1
- package/dist/client/assets/{connection-BjfhQTvi.js → connection-D4RX46wh.js} +1 -1
- package/dist/client/assets/{connection-card-CDIRX7rw.js → connection-card-DTpr3C0a.js} +1 -1
- package/dist/client/assets/{connection-detail-BIzjJxFf.js → connection-detail-CKts1Pg1.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-qS_yNMNY.js → connection-form-helpers-Bk5WpOzS.js} +1 -1
- package/dist/client/assets/{connection-slug-C1NpnAPZ.js → connection-slug-BuWfvd-P.js} +1 -1
- package/dist/client/assets/{connections-D27uBCQp.js → connections-qrxxtSxS.js} +1 -1
- package/dist/client/assets/{content-changes-D1-8LQ7K.js → content-changes-Dwsp4uvc.js} +1 -1
- package/dist/client/assets/{content-tab-7Dmz1NiK.js → content-tab-BoA46Vo_.js} +3 -3
- package/dist/client/assets/{context-DTrpa-1Y.js → context-D6GeU9Zr.js} +1 -1
- package/dist/client/assets/{context-menu-C3x16EIQ.js → context-menu-C28rrpwS.js} +1 -1
- package/dist/client/assets/{context-shell-BFCtTuzW.js → context-shell-BhsO74A1.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-D9cS-x9o.js → create-organization-dialog-WTgE1zLj.js} +1 -1
- package/dist/client/assets/{daily-pulse-Bi3n0TDe.js → daily-pulse-D5hqtiss.js} +1 -1
- package/dist/client/assets/{delete-copy-Bq1Zqo6Q.js → delete-copy-B6vUu2FZ.js} +1 -1
- package/dist/client/assets/{device-hint-DxfHiV8Q.js → device-hint-BDXdRFQX.js} +1 -1
- package/dist/client/assets/{discover-MaWSe6AZ.js → discover-BPJ5kKLU.js} +1 -1
- package/dist/client/assets/{domain-settings-RGqBkuzr.js → domain-settings-DAwNAh0_.js} +1 -1
- package/dist/client/assets/{drawer-BaaFg3R1.js → drawer-Co6CTMtJ.js} +1 -1
- package/dist/client/assets/{editor-BJ1E4lJs.js → editor-Dzcpm7rQ.js} +1 -1
- package/dist/client/assets/{editor-classes-BYet6QQd.js → editor-classes-BO4PtG02.js} +1 -1
- package/dist/client/assets/{empty-state-eYKU8nO4.js → empty-state-BfnU_rAm.js} +1 -1
- package/dist/client/assets/{empty-state-csW-GeIV.js → empty-state-BlV47Moy.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-C-ZtNaMR.js → experiments-tab-choice-BVnYtxf9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D3bUe5Lp.js → extract-connection-data-CTwhrI6L.js} +1 -1
- package/dist/client/assets/{feature-gate-D1Gwsg7S.js → feature-gate-CRmt1R7b.js} +1 -1
- package/dist/client/assets/{feature-paywall-Cvsy56pL.js → feature-paywall-B2EmZsmT.js} +1 -1
- package/dist/client/assets/file-explorer-Bc2WuOJf.js +2 -0
- package/dist/client/assets/{file-preview-B4NZQa3r.js → file-preview-XajyFvxK.js} +1 -1
- package/dist/client/assets/{file-share-button-D_zlUria.js → file-share-button-DDpEu_Ts.js} +1 -1
- package/dist/client/assets/{file-type-icon-DH9FvqO6.js → file-type-icon-zloL09QV.js} +1 -1
- package/dist/client/assets/{folder-icon-CH-z3EGp.js → folder-icon-Cu1TcGzz.js} +1 -1
- package/dist/client/assets/{form-DoeHcF5c.js → form-CDXejFhy.js} +1 -1
- package/dist/client/assets/{frame-navigation-B-UfCzDd.js → frame-navigation-DKa5FPxb.js} +1 -1
- package/dist/client/assets/{gateway-client-CJDxmxSa.js → gateway-client-D6U4MBNC.js} +1 -1
- package/dist/client/assets/{general-DG60NVm4.js → general-CQTaUkvR.js} +1 -1
- package/dist/client/assets/{github-icon-Dv1ygj1J.js → github-icon-QoDNyjsW.js} +1 -1
- package/dist/client/assets/{held-block-view-BLxhK7ER.js → held-block-view-D9gMtmL4.js} +1 -1
- package/dist/client/assets/{home-C7A8b1LY.js → home--jqwm4Ku.js} +1 -1
- package/dist/client/assets/{home-overview-CnKi_Tkp.js → home-overview-CqfgDa-3.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-C0aDIUim.js → hosted-reconcile-Dgr_RAK2.js} +1 -1
- package/dist/client/assets/{icon-button-A0UAzKos.js → icon-button-BZOKf7Ue.js} +1 -1
- package/dist/client/assets/{index-CImiuf_8.js → index-0O8gsl-7.js} +1 -1
- package/dist/client/assets/{index-CymE2fVz.js → index-AYfJDRJw.js} +1 -1
- package/dist/client/assets/{index-D4jxMGCU.js → index-B26-jaFe.js} +1 -1
- package/dist/client/assets/{index-DigLw4F8.js → index-BcNAVbXw.js} +1 -1
- package/dist/client/assets/{index-Cs4d-rU4.js → index-C08yFDSB.js} +1 -1
- package/dist/client/assets/{index-CgEIJt8V.js → index-C75j3Sf-.js} +1 -1
- package/dist/client/assets/{index-B9iPbSrA.js → index-CGuDb95W.js} +1 -1
- package/dist/client/assets/{index-BDMu6bQ3.js → index-CMosAuta.js} +1 -1
- package/dist/client/assets/{index-Bm1kfakF.js → index-CUTEHf7n.js} +41 -41
- package/dist/client/assets/{index-PdC0-xb_.js → index-Cd1_o-mb.js} +1 -1
- package/dist/client/assets/{index-BMXIYEr-.js → index-CfzIzecT.js} +1 -1
- package/dist/client/assets/{index-DeObvrTG.js → index-CnTDG57D.js} +1 -1
- package/dist/client/assets/{index-I8YXcNLQ.js → index-Cu54PMEU.js} +1 -1
- package/dist/client/assets/{index-CJbm-bjr.js → index-D2ZLBdth.js} +1 -1
- package/dist/client/assets/{index-Cwm5p5sk.js → index-Dc3vpBAe.js} +1 -1
- package/dist/client/assets/index-DqzmkMvh.css +1 -0
- package/dist/client/assets/{index-QSfgjCsF.js → index-dYHd0KJA.js} +1 -1
- package/dist/client/assets/{index-redirect-DqxacVKg.js → index-redirect-CjNUMjXF.js} +1 -1
- package/dist/client/assets/{index-hXnS3gm2.js → index-teg9xGJw.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-DBJgsShk.js → infiniteQueryObserver-DN-l8Mqm.js} +1 -1
- package/dist/client/assets/{infra-billing-DWspnPMo.js → infra-billing-DJ_xLQlG.js} +1 -1
- package/dist/client/assets/{input-Cpkj1oOu.js → input-IAYjK7lR.js} +3 -3
- package/dist/client/assets/{input-Ml5iKJtl.js → input-e3Q-tVUa.js} +1 -1
- package/dist/client/assets/{integration-icon-BhUObfAr.js → integration-icon-BRVzdEXf.js} +1 -1
- package/dist/client/assets/{item-actions-SpeTllYG.js → item-actions-B4eKhNFa.js} +1 -1
- package/dist/client/assets/{jira-icon-Bq7voeGz.js → jira-icon-BnOlExTt.js} +1 -1
- package/dist/client/assets/{label-D53IaeZS.js → label-qad8ROdP.js} +1 -1
- package/dist/client/assets/{layout-WvgScUGb.js → layout-D0Rywy_R.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-CwPoX24t.js → legacy-admin-welcome-dialog-CXj5rtpz.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-jZOIaudw.js → legacy-agents-deep-JA5mOvHG.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BQJ5rRXx.js → legacy-main-redirect-BOQhVVaF.js} +1 -1
- package/dist/client/assets/{library-tab-C3WzWO1U.js → library-tab-LAu1Ggsf.js} +3 -3
- package/dist/client/assets/library-umU-1FuW.js +1 -0
- package/dist/client/assets/{login-C7zMUKPM.js → login-M7zYPzKO.js} +1 -1
- package/dist/client/assets/{markdown-CQMqqgOz.js → markdown-BhLg-Zjp.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BfqxDRa0.js → mcp-app-renderer-DrwYcKK7.js} +2 -2
- package/dist/client/assets/{mcp-oauth-B05XNx5F.js → mcp-oauth-CAZv4B3x.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CSRaHoLv.js → mcp-oauth-CqsxDqXO.js} +1 -1
- package/dist/client/assets/{members-BxAeAlCx.js → members-Bs-E2Sob.js} +1 -1
- package/dist/client/assets/{memory-Cg_NtjT-.js → memory-CSe1SzIo.js} +2 -2
- package/dist/client/assets/{mock-board-CYcWUp7f.js → mock-board-DVrSNZfW.js} +3 -3
- package/dist/client/assets/{monaco-editor-qCqkYYEk.js → monaco-editor-Cmq9PYT5.js} +1 -1
- package/dist/client/assets/{monitoring-DyDWdk8h.js → monitoring-D2aojvYm.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-DPFWESTC.js → monitoring-stats-row-BoP1mTEb.js} +1 -1
- package/dist/client/assets/{multi-select-CGtuxiXI.js → multi-select-C_FYq5kZ.js} +1 -1
- package/dist/client/assets/{mustache-BAZPoSXi.js → mustache-8wbk5neB.js} +1 -1
- package/dist/client/assets/{named-rule-step-DILtKyLq.js → named-rule-step-D4anrrdN.js} +1 -1
- package/dist/client/assets/{named-rule-view-QDNMCidz.js → named-rule-view-f0iw3ATx.js} +1 -1
- package/dist/client/assets/{new-project-dialog-D__ZumnI.js → new-project-dialog-CVc657qA.js} +1 -1
- package/dist/client/assets/{new-project-store-f5bwc2gs.js → new-project-store-ehAJK4hL.js} +1 -1
- package/dist/client/assets/{oauth-callback-ya17MbDE.js → oauth-callback-B9em2Y8Z.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BlkxqI4_.js → oauth-callback-ai-provider-Cb2kYh4X.js} +1 -1
- package/dist/client/assets/{oauth-consent-C3E6FGHS.js → oauth-consent-wow8JHEK.js} +1 -1
- package/dist/client/assets/{onboarding-DtaTP4Sy.js → onboarding-BHjqSyxW.js} +1 -1
- package/dist/client/assets/{openai-conversation-BIGlcpdW.js → openai-conversation-DQ21FiVA.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-ClE6sl2t.js → optimistic-project-sidebar-views-D735mKes.js} +1 -1
- package/dist/client/assets/{order-monitor-day-R_omMSFk.js → order-monitor-day-D8KmCDvZ.js} +1 -1
- package/dist/client/assets/{organization-choice-IgtHSfgl.js → organization-choice-e20yr5bu.js} +1 -1
- package/dist/client/assets/{orgs-BMnJ-Ls_.js → orgs-DC1K_oci.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CpFPP6tw.js → own-accounts-section-DZjXH8uG.js} +1 -1
- package/dist/client/assets/{pair-CXG2-VJv.js → pair-B6XGEO8o.js} +1 -1
- package/dist/client/assets/{parse-sections-C11X_OB5.js → parse-sections-Cd3eqhNU.js} +2 -2
- package/dist/client/assets/plan-BG9a6OTV.js +1 -0
- package/dist/client/assets/{plan-ladder-CXooBnF6.js → plan-ladder-uOWkvedM.js} +1 -1
- package/dist/client/assets/plan-page-BxOjjyOQ.js +2 -0
- package/dist/client/assets/{plan-usage-card-kjpt_e_z.js → plan-usage-card-EE0IInE1.js} +2 -2
- package/dist/client/assets/{popover-BCGMbo55.js → popover-t4wJ-TtS.js} +1 -1
- package/dist/client/assets/post-calendar-VNdLJQb0.js +1 -0
- package/dist/client/assets/{post-editor-x_K_37Vg.js → post-editor-zOtVODsc.js} +2 -2
- package/dist/client/assets/{preview-content-awbhTKCR.js → preview-content-Bhl5Jk0E.js} +1 -1
- package/dist/client/assets/{preview-dialog-DOw3u2PH.js → preview-dialog-Denmgj-d.js} +1 -1
- package/dist/client/assets/{preview-panel-BpuuhbyF.js → preview-panel-JUqjzsve.js} +1 -1
- package/dist/client/assets/{preview-tab-DM5oCQbO.js → preview-tab-COr6U59M.js} +3 -3
- package/dist/client/assets/{primitives-DAv3J-jo.js → primitives-Dq7WtxY4.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-DDwjDVDo.js → product-picker-dialog-DkguIJb9.js} +1 -1
- package/dist/client/assets/{profile-ChH9A8z7.js → profile-Clqb7jMX.js} +1 -1
- package/dist/client/assets/project-app-view-CY3LztLj.js +1 -0
- package/dist/client/assets/{project-apps-DCKpFUfg.js → project-apps-BZHu6ziG.js} +1 -1
- package/dist/client/assets/{project-icon-CsOvQIQK.js → project-icon-4S0TtqeC.js} +1 -1
- package/dist/client/assets/{project-index-BaWNSq-B.js → project-index-CbwxAZlc.js} +1 -1
- package/dist/client/assets/project-reports-By6qiMKj.js +1 -0
- package/dist/client/assets/project-tasks-DhoozPsk.js +1 -0
- package/dist/client/assets/{projects-OuyJtgOF.js → projects-Df_L915V.js} +1 -1
- package/dist/client/assets/{projects-empty-state-shLgi5wv.js → projects-empty-state-Di4qGPL3.js} +1 -1
- package/dist/client/assets/{prompts-UYNIaDow.js → prompts-CCfcFfEL.js} +1 -1
- package/dist/client/assets/record-editor-BYF0WYdX.js +1 -0
- package/dist/client/assets/redirect-editor-CIZjHsWK.js +1 -0
- package/dist/client/assets/{reports-DaGALH9V.js → reports-C6sfy-vt.js} +1 -1
- package/dist/client/assets/reports-Dkc8wRTo.js +1 -0
- package/dist/client/assets/{reports-onboarding-p4RwpY5O.js → reports-onboarding-CvX7O5fR.js} +1 -1
- package/dist/client/assets/reports-tab-CqA9qzwy.js +2 -0
- package/dist/client/assets/repositories-B6GGh3Gl.js +1 -0
- package/dist/client/assets/{repositories-n9UiobdG.js → repositories-DwI8wNdv.js} +1 -1
- package/dist/client/assets/{repository-binding-BmnG5TxR.js → repository-binding-DyxjotEQ.js} +1 -1
- package/dist/client/assets/{repository-picker-De0GPaRE.js → repository-picker-Diifpqm3.js} +1 -1
- package/dist/client/assets/{require-capability-cZNhHutj.js → require-capability-GNq4582r.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BMBpLakt.js → required-auth-layout-CVH6Kpuo.js} +1 -1
- package/dist/client/assets/{reset-password-CCMxEq5y.js → reset-password-Cv2a-_UY.js} +1 -1
- package/dist/client/assets/{resizable-BkhiAkWq.js → resizable-DtQVeM4U.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-lwbzvlmp.js → resolve-tab-icon-Dd4QQOMZ.js} +1 -1
- package/dist/client/assets/{review-settings-DcjQ3GtR.js → review-settings-BFzl2biB.js} +1 -1
- package/dist/client/assets/{role-color-CfQEBoLM.js → role-color-DuywbXFk.js} +1 -1
- package/dist/client/assets/roles-BXlx9LX-.js +1 -0
- package/dist/client/assets/{route-BtgxUay9.js → route-BzAiKNmd.js} +1 -1
- package/dist/client/assets/{route-C1HkaVBq.js → route-CI04i3RU.js} +1 -1
- package/dist/client/assets/route-CiYCzoQC.js +1 -0
- package/dist/client/assets/{route-page-header-9bvdq0CA.js → route-page-header-Dyzw28fO.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CvaJsg00.js → sandbox-git-api-BHkz0_nl.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-o-we4sh6.js → sandbox-lifecycle-context-D6WWTBdt.js} +1 -1
- package/dist/client/assets/{save-status-0_77vPF7.js → save-status-Cgw9Hlp4.js} +1 -1
- package/dist/client/assets/schema-AdvpV9XD.js +1 -0
- package/dist/client/assets/{schema-CYjzEKQK.js → schema-rfxhIdnI.js} +1 -1
- package/dist/client/assets/{scroll-area-BZSqU8Qg.js → scroll-area-CRlFqWco.js} +1 -1
- package/dist/client/assets/{search-input-CI2JAJKY.js → search-input-DaJb5UpE.js} +1 -1
- package/dist/client/assets/{search-toggle-6GIYvZRS.js → search-toggle-MXPrTy3O.js} +1 -1
- package/dist/client/assets/{secret-picker-k-Y5Do9o.js → secret-picker-Ct5n_id9.js} +1 -1
- package/dist/client/assets/{secrets-BRBBIxrl.js → secrets-DrDOFUSP.js} +1 -1
- package/dist/client/assets/{section-array-field-BQH3eI8l.js → section-array-field-ZEOag6le.js} +1 -1
- package/dist/client/assets/{sections-s9nF0BmL.js → sections-D3dG_Sv7.js} +1 -1
- package/dist/client/assets/sections-editor-DhtnmFJg.js +1 -0
- package/dist/client/assets/{select-UUQ-q9oo.js → select-CXHAcNGT.js} +1 -1
- package/dist/client/assets/{select-model-CpkygQiY.js → select-model-BGmlexh2.js} +1 -1
- package/dist/client/assets/{seo-editor-CQojRSno.js → seo-editor-D6SXZS-u.js} +1 -1
- package/dist/client/assets/{separator-fkDDGet3.js → separator-BmldSaZv.js} +1 -1
- package/dist/client/assets/{session-runtime-B0EpXuIX.js → session-runtime-DRkG9ReZ.js} +1 -1
- package/dist/client/assets/settings-tab-DLt79LWg.js +1 -0
- package/dist/client/assets/{sheet-DrryPrKH.js → sheet-DwYwF5Xe.js} +1 -1
- package/dist/client/assets/{shell-layout-Dtm12Wiy.js → shell-layout-bVoP9kOD.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DA0WDizP.js → site-draft-actions-Dd2WZL1s.js} +1 -1
- package/dist/client/assets/{site-draft-view-C0I4KoVa.js → site-draft-view-CHYH9tQq.js} +1 -1
- package/dist/client/assets/site-editor-aI9Dau3o.js +1 -0
- package/dist/client/assets/{site-editor-toast-B7mzcNQB.js → site-editor-toast-BCn8hYHZ.js} +1 -1
- package/dist/client/assets/{skills-Cg9456cq.js → skills-CX729VjK.js} +1 -1
- package/dist/client/assets/{slider-DF5FWaon.js → slider-BdrBFFmy.js} +1 -1
- package/dist/client/assets/{sortable.esm-DRtCp0fn.js → sortable.esm-Dv7GaG48.js} +1 -1
- package/dist/client/assets/{sso-Bn1iRDvY.js → sso-CipUmxZh.js} +1 -1
- package/dist/client/assets/{suggestion-BoJJdGmd.js → suggestion-7L8A3fQy.js} +2 -2
- package/dist/client/assets/{super-agent-icon-7GRKjx3U.js → super-agent-icon-VCx3p9dd.js} +1 -1
- package/dist/client/assets/{switch-yJM06fNp.js → switch-CQr_229Y.js} +1 -1
- package/dist/client/assets/{synced-repos-BPhtaX5V.js → synced-repos-BdIctOIX.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BT3JJJNz.js → tab-icon-glyph-C6KuwbV2.js} +1 -1
- package/dist/client/assets/{table-BUt8Jhjr.js → table-5d9iQpdi.js} +1 -1
- package/dist/client/assets/{tabs-Ba6hhIKT.js → tabs-DEsdaVKa.js} +1 -1
- package/dist/client/assets/{task-board-DjHmGwky.js → task-board-ZELaPSpv.js} +1 -1
- package/dist/client/assets/{task-key-ftrd3J5s.js → task-key-ChxtLgH2.js} +2 -2
- package/dist/client/assets/{task-route-BdeGqsQi.js → task-route-hUi3-h4J.js} +1 -1
- package/dist/client/assets/{task-status-CovP2RlP.js → task-status-Dofkb2xp.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Q6SzQXrL.js → taskboard-analytics-Bj-GjLdA.js} +1 -1
- package/dist/client/assets/tasks-BWiWGgqJ.js +1 -0
- package/dist/client/assets/{tasks-BIyvx17R.js → tasks-DsqIy_fY.js} +3 -3
- package/dist/client/assets/{textarea-CicBpiIo.js → textarea-J2V-aUg9.js} +1 -1
- package/dist/client/assets/thread-analytics-3idb3D-k.js +1 -0
- package/dist/client/assets/{thread-button-CJVwoCA8.js → thread-button-8lhq8YVG.js} +1 -1
- package/dist/client/assets/{thread-intent-DLUS-yM4.js → thread-intent-C-4a46Zs.js} +1 -1
- package/dist/client/assets/thread-route-BazgFB6Z.js +1 -0
- package/dist/client/assets/{thread-route-C6dcoLI6.js → thread-route-hABZCF2d.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B4TTQtO5.js → thread-sheet-body-BeKCfAHB.js} +1 -1
- package/dist/client/assets/{time-range-picker-C-5Xj0CY.js → time-range-picker-Bs9UQrVS.js} +1 -1
- package/dist/client/assets/{toggle-group-Bu2eVQ6i.js → toggle-group-BSy9ppTS.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DFPQZxq0.js → tool-set-selector-CtmnThz8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CoaihmDC.js → toolbar-icon-button-C4Or2Ut1.js} +1 -1
- package/dist/client/assets/{tooltip-gcbYZwxC.js → tooltip-BtQY7me6.js} +1 -1
- package/dist/client/assets/{tooltipContext-BI8jp9W6.js → tooltipContext-BbkLIEo5.js} +1 -1
- package/dist/client/assets/{track-BGZHpowk.js → track-PksxcDl8.js} +1 -1
- package/dist/client/assets/{types-BKngmNWD.js → types-B29zOSVo.js} +1 -1
- package/dist/client/assets/{url-slug-CG2qSdoJ.js → url-slug-5tJR8vZd.js} +1 -1
- package/dist/client/assets/{usage-stats-DkZP-2zt.js → usage-stats-DJ1VHc0T.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BUfnZicu.js → use-ai-providers-Dya2oYuM.js} +1 -1
- package/dist/client/assets/{use-api-keys-426flCmW.js → use-api-keys-B_9Rq7TJ.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule--HLtI2IB.js → use-apply-named-rule-7lCiFUZu.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-CuHn_eJY.js +1 -0
- package/dist/client/assets/{use-automations-C74OL6eb.js → use-automations-BpMr2z_i.js} +1 -1
- package/dist/client/assets/{use-autosave-CMUdyxJ4.js → use-autosave-Dg5clSHS.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-ovX-kkwX.js +1 -0
- package/dist/client/assets/use-blog-view-CpUCE6TS.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DhGUOMf7.js → use-chat-layout-state-B6O7bs0d.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DdLu6VIE.js → use-cms-publish-actions-B7gEo4o7.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B4AtsSIo.js → use-connect-companion-DgHT9TTS.js} +1 -1
- package/dist/client/assets/{use-connection-C16q1hbs.js → use-connection-BAk2dsuv.js} +1 -1
- package/dist/client/assets/{use-content-sync-CMZxOD36.js → use-content-sync-4eASTxdJ.js} +1 -1
- package/dist/client/assets/{use-copy-thUFz6-q.js → use-copy-DPZUA7Gr.js} +1 -1
- package/dist/client/assets/{use-current-view-B8GTnEcc.js → use-current-view-SFKgOLYn.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BjihwHBG.js → use-date-fns-locale-Bd88zbns.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DjWPUIqZ.js → use-debounced-autosave-CQQwGbl2.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Ct5qlSK6.js → use-debounced-value-C75ZQTZG.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CITBTX5W.js → use-deco-credits-DzCgvsqG.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B21Nf-wv.js → use-decopilot-events-B93IJnco.js} +1 -1
- package/dist/client/assets/{use-delete-block-G59MfiPh.js → use-delete-block-CtnkMpgb.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BXABDK3t.js → use-delete-connection-B_EqAmPm.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CDJQzcvO.js → use-deployment-admin-DYC3wY2X.js} +1 -1
- package/dist/client/assets/{use-entitlements-BTRsFtoM.js → use-entitlements-DH1D5a0L.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CLjoICho.js → use-fast-preview-draft-url-CY0fb2LM.js} +1 -1
- package/dist/client/assets/{use-file-configs-BEgiTgol.js → use-file-configs-BiSZZuuf.js} +1 -1
- package/dist/client/assets/{use-id-selection-pbpvy7_O.js → use-id-selection-VNg6UPHp.js} +1 -1
- package/dist/client/assets/{use-in-settings-nBmDr90L.js → use-in-settings-Dv_cwy92.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BIxNjpZM.js → use-inbox-feed-Cdppe1Es.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll--ksdfdkO.js → use-infinite-scroll-BGl4Rgru.js} +1 -1
- package/dist/client/assets/{use-join-requests-CWuAJdLz.js → use-join-requests-CWbWtDgg.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-CCz7Ktbi.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DisQ75Y2.js → use-mcp-auth-status-Ca77VI4X.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BRvedH7Y.js → use-mcp-client-BVU34o8K.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DR7oy3B2.js → use-mcp-prompts-CCB1WHsd.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DRmOHWPJ.js → use-mcp-tools-DagGRrIt.js} +1 -1
- package/dist/client/assets/{use-mobile-pXMsiqcl.js → use-mobile-LSpSJcPd.js} +1 -1
- package/dist/client/assets/{use-move-blocks-D3Ec5QNN.js → use-move-blocks-C_L5dYiU.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DBjH_n7x.js → use-navigate-to-agent-fspVUy0_.js} +1 -1
- package/dist/client/assets/{use-never-published-COSddoQh.js → use-never-published-Ch6taPxS.js} +1 -1
- package/dist/client/assets/{use-org-fs-oHVbnEW1.js → use-org-fs-CYycA4iA.js} +1 -1
- package/dist/client/assets/{use-org-notice-D-samRAE.js → use-org-notice-B0u21Cu1.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-ClN29sI7.js → use-org-repo-syncs-BHsdmb-p.js} +1 -1
- package/dist/client/assets/{use-org-sso-CjTvJs1C.js → use-org-sso-DZUFYVRN.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Cubqq6kD.js → use-organization-settings-C-YWM0uD.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-W20lHVA4.js → use-panel-navigate-Dcxy731-.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-hAPOMUof.js → use-project-native-view-presence-tfOMrkxo.js} +1 -1
- package/dist/client/assets/{use-project-scope-BN_bspzD.js → use-project-scope-3Q37Eln5.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DjB0LrH3.js → use-recent-apps-BJuzSKH-.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DCVHCEGO.js → use-reports-diagnostic-C7haZBH4.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-Fh4ab2J1.js → use-sandbox-events-p6STSWE5.js} +1 -1
- package/dist/client/assets/{use-secrets-C96B2z29.js → use-secrets-GgVI8oKj.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BkoRzP8R.js → use-section-preview-base-M6_vC4eP.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CtO1E2x2.js → use-sidebar-collapsed-BjLeIURU.js} +1 -1
- package/dist/client/assets/{use-tags-ClTM1Evw.js → use-tags-B4229aWw.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-MV1dC8F0.js → use-task-board-analytics---dDdKFB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BpzSYDBi.js → use-task-board-item-prs-WHlIf_av.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DPgZ__oW.js → use-task-board-items-BFsmDyZa.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CVIyeU-9.js → use-task-board-prompts-Dwu6_vIJ.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BJWRQyNZ.js → use-task-metadata-CUi2_x3B.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DhPZgS9-.js → use-thread-outputs-DYau24LH.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-Bp1qVtwW.js → use-view-draft-kind-DECgwRep.js} +1 -1
- package/dist/client/assets/{use-voice-input-BpwMnzE1.js → use-voice-input-Ta8CFXyw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dmz76p-1.js +1 -0
- package/dist/client/assets/{useQueries-YIrWWF7m.js → useQueries-CcshDhiG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BnvO_4S5.js +1 -0
- package/dist/client/assets/{users-C0Fg7osF.js → users-BFBeKe01.js} +1 -1
- package/dist/client/assets/{utils-BdqUM1fA.js → utils-VRJjHnOC.js} +1 -1
- package/dist/client/assets/{variant-calendar-Crwy1Gij.js → variant-calendar-y7ldyxeY.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CiDkHVMl.js → variant-matcher-override-ZGKfLyll.js} +1 -1
- package/dist/client/assets/{view-header-Br4cuG1F.js → view-header-BZr0Ea-N.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BOnfjRXy.js → virtual-mcp-BNBTH_8N.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-hh2syLPB.js → watch-sse-pool-BqAScN4r.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +893 -862
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BE36cFAC.js +0 -1
- package/dist/client/assets/agent-blog-post-4NG_W-ic.js +0 -2
- package/dist/client/assets/agent-blog-wzJ7xZUr.js +0 -2
- package/dist/client/assets/agent-deck-CaQ-cUn9.js +0 -1
- package/dist/client/assets/agent-experiments-BIjkBrDb.js +0 -1
- package/dist/client/assets/agent-file-Dft8zwWy.js +0 -1
- package/dist/client/assets/agent-library-Bp6rWEFG.js +0 -1
- package/dist/client/assets/agent-library-file-CFX46C1f.js +0 -1
- package/dist/client/assets/agent-overview-Scs4YPy1.js +0 -1
- package/dist/client/assets/agent-settings-H4zJXShv.js +0 -1
- package/dist/client/assets/agent-site-editor-code-68kgy3y_.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CBaeiU7Y.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Cao70n6T.js +0 -1
- package/dist/client/assets/agent-view-CqlrAct7.js +0 -1
- package/dist/client/assets/ai-providers-4GV0vhZ4.js +0 -1
- package/dist/client/assets/api-keys-B3ujQmM7.js +0 -1
- package/dist/client/assets/app-editor-COdhXw4U.js +0 -1
- package/dist/client/assets/category-editor-U2mE2Uq7.js +0 -1
- package/dist/client/assets/chat-context-B0mIAvmD.js +0 -44
- package/dist/client/assets/cms-settings-editor-BApbMHHr.js +0 -1
- package/dist/client/assets/collection-detail-DDWfF_wY.js +0 -1
- package/dist/client/assets/file-explorer-Dt6KMNM7.js +0 -2
- package/dist/client/assets/index-MLo7YobU.css +0 -1
- package/dist/client/assets/library-xWw2qc62.js +0 -1
- package/dist/client/assets/plan-CZZdqjy4.js +0 -1
- package/dist/client/assets/post-calendar-DgNCVo3o.js +0 -1
- package/dist/client/assets/project-app-view-pWp3ZiTC.js +0 -1
- package/dist/client/assets/project-reports-BFGfWfOY.js +0 -1
- package/dist/client/assets/project-tasks-B0qy6YyK.js +0 -1
- package/dist/client/assets/record-editor-tWo5ViDa.js +0 -1
- package/dist/client/assets/redirect-editor-BKqLWwnk.js +0 -1
- package/dist/client/assets/reports-CRTbYefZ.js +0 -1
- package/dist/client/assets/reports-tab-DHgzfmh-.js +0 -2
- package/dist/client/assets/repositories-D2EXyFhB.js +0 -1
- package/dist/client/assets/roles-BBqkj6Ec.js +0 -1
- package/dist/client/assets/route-COQ-KuwC.js +0 -1
- package/dist/client/assets/schema-BUUxEy3p.js +0 -1
- package/dist/client/assets/sections-editor-B3aKAu_5.js +0 -1
- package/dist/client/assets/settings-tab-CcZ_HjR5.js +0 -1
- package/dist/client/assets/site-editor-CyQYsqmX.js +0 -1
- package/dist/client/assets/tasks-D7SUrwDU.js +0 -1
- package/dist/client/assets/thread-analytics-CLjMgoaY.js +0 -1
- package/dist/client/assets/thread-route-Cj0uYV4E.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CiVsfxtO.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BjtFyGqs.js +0 -1
- package/dist/client/assets/use-blog-view-C8xBHbun.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BKwmMvsf.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DHgrT3Au.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BwwCJ1MU.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,j as i}from"./index-CUTEHf7n.js";import{ChatLayout as p}from"./index-CfzIzecT.js";import{C as e,P as a}from"./plan-page-BxOjjyOQ.js";import{u as n}from"./use-organization-settings-C-YWM0uD.js";import"./use-mobile-LSpSJcPd.js";import"./tooltip-BtQY7me6.js";import"./index-C08yFDSB.js";import"./MessageCircle01-Cf5Qa_r1.js";import"./XClose-CUoBDo4j.js";import"./thread-button-8lhq8YVG.js";import"./use-sidebar-collapsed-BjLeIURU.js";import"./sheet-DwYwF5Xe.js";import"./use-chat-layout-state-B6O7bs0d.js";import"./use-panel-navigate-Dcxy731-.js";import"./thread-route-hABZCF2d.js";import"./use-project-scope-3Q37Eln5.js";import"./repository-binding-DyxjotEQ.js";import"./use-mcp-client-BVU34o8K.js";import"./auth-D7Uu7n_e.js";import"./toolbar-icon-button-C4Or2Ut1.js";import"./use-in-settings-Dv_cwy92.js";import"./resizable-DtQVeM4U.js";import"./route-page-header-Dyzw28fO.js";import"./LayoutLeft-DUieRSDJ.js";import"./use-current-view-SFKgOLYn.js";import"./agent-icon-y2SKybSP.js";import"./AlertCircle-B4BiejsA.js";import"./UserCheck01-CjBhJIbn.js";import"./Tool01-B97c8idL.js";import"./ArrowUp-C2dE69W7.js";import"./ArrowLeft-DpoZP_fX.js";import"./ArrowRight-waHzto0g.js";import"./BookOpen01-Det9naRR.js";import"./Globe04-YQZG_Qbl.js";import"./CheckCircle-BNEuJPHU.js";import"./ChevronDown-_sr4up4D.js";import"./ChevronSelectorVertical-Ddl6sDao.js";import"./ChevronUp-CK7Ad_mD.js";import"./UserSquare-D0WQA2_a.js";import"./LinkBroken01-jFeLEleD.js";import"./CreditCard01-DaUYIK4F.js";import"./File02-Dj9EXPDT.js";import"./SwitchHorizontal01-CgqtVqHH.js";import"./Eye-CYtkFg_6.js";import"./Fingerprint04-kauf3nbZ.js";import"./Image01-ChEwjYSJ.js";import"./Key01-DPAOwUET.js";import"./Minus-DVAnrb98.js";import"./Monitor01-D5to20Na.js";import"./Sun-D2fDzKM6.js";import"./Play-DBG3GXxW.js";import"./Plus-BEFFoW2D.js";import"./SearchMd-BVX4smTx.js";import"./ShoppingBag01-Bvm3sWvz.js";import"./Trash01-Bi3fjf_i.js";import"./Upload01-B0N1cyeo.js";import"./Users01-CNLWTh0g.js";import"./Zap-D5Q1SF5c.js";import"./badge-CdntSWLw.js";import"./chat-context-3o15fH-n.js";import"./use-view-draft-kind-DECgwRep.js";import"./use-blog-view-CpUCE6TS.js";import"./thread-intent-C-4a46Zs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BqAScN4r.js";import"./task-board-ZELaPSpv.js";import"./schema-AdvpV9XD.js";import"./session-runtime-DRkG9ReZ.js";import"./use-entitlements-DH1D5a0L.js";import"./use-ai-providers-Dya2oYuM.js";import"./use-decopilot-events-B93IJnco.js";import"./use-org-fs-CYycA4iA.js";import"./useInfiniteQuery-Dmz76p-1.js";import"./infiniteQueryObserver-DN-l8Mqm.js";import"./index-D2ZLBdth.js";import"./input-IAYjK7lR.js";import"./usage-stats-DJ1VHc0T.js";import"./utils-CVEq3hMx.js";import"./markdown-BhLg-Zjp.js";import"./use-copy-DPZUA7Gr.js";import"./gateway-client-D6U4MBNC.js";import"./form-CDXejFhy.js";import"./label-qad8ROdP.js";import"./icon-button-BZOKf7Ue.js";import"./file-type-icon-zloL09QV.js";import"./chat-draft-DkTLJIsD.js";import"./use-voice-input-Ta8CFXyw.js";import"./popover-t4wJ-TtS.js";import"./drawer-Co6CTMtJ.js";import"./index-B26-jaFe.js";import"./checkbox-DG0VRyZt.js";import"./select-CXHAcNGT.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-DEsdaVKa.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DzCgvsqG.js";import"./toggle-group-BSy9ppTS.js";import"./input-e3Q-tVUa.js";import"./suggestion-7L8A3fQy.js";import"./use-mcp-prompts-CCB1WHsd.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-B2EmZsmT.js";import"./plan-ladder-uOWkvedM.js";import"./add-connection-dialog-QaQFm_sJ.js";import"./collection-search-gjXSkcT8.js";import"./extract-connection-data-CTwhrI6L.js";import"./metadata-D72DunRR.js";import"./connection-D4RX46wh.js";import"./url-slug-5tJR8vZd.js";import"./connection-card-DTpr3C0a.js";import"./connection-slug-BuWfvd-P.js";import"./integration-icon-BRVzdEXf.js";import"./textarea-J2V-aUg9.js";import"./use-connection-BAk2dsuv.js";import"./schema-rfxhIdnI.js";import"./connection-form-helpers-Bk5WpOzS.js";import"./authenticate-and-persist-oauth-C7CYUnX8.js";import"./mcp-oauth-CAZv4B3x.js";import"./mcp-oauth-CqsxDqXO.js";import"./collection-tabs-COt6y1YG.js";import"./use-infinite-scroll-BGl4Rgru.js";import"./useSuspenseInfiniteQuery-BnvO_4S5.js";import"./use-task-board-items-BFsmDyZa.js";import"./pair-B6XGEO8o.js";import"./collapsible-CUOhSps5.js";import"./task-key-ChxtLgH2.js";import"./config-Bn2m6WJs.js";import"./task-route-hUi3-h4J.js";import"./project-index-CbwxAZlc.js";import"./shell-layout-bVoP9kOD.js";import"./use-deployment-admin-DYC3wY2X.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-B0u21Cu1.js";import"./command-BvXS_hwC.js";import"./index-dYHd0KJA.js";import"./project-icon-4S0TtqeC.js";import"./use-navigate-to-agent-fspVUy0_.js";import"./use-debounced-value-C75ZQTZG.js";import"./new-project-dialog-CVc657qA.js";import"./repository-picker-Diifpqm3.js";import"./github-icon-QoDNyjsW.js";import"./new-project-store-ehAJK4hL.js";import"./legacy-admin-welcome-dialog-CXj5rtpz.js";import"./required-auth-layout-CVH6Kpuo.js";import"./use-org-sso-DZUFYVRN.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DrwYcKK7.js";import"./types-B29zOSVo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-DYau24LH.js";import"./content-changes-Dwsp4uvc.js";import"./agent-capabilities-O4jivf-X.js";import"./use-date-fns-locale-Bd88zbns.js";function mr(){const o=m.c(2),r=n("plan_page_enabled");let t;return o[0]!==r?(t=i.jsx(p.Content,{children:r?i.jsx(a,{}):i.jsx(e,{kind:"plan"})}),o[0]=r,o[1]=t):t=o[1],t}export{mr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-
|
|
1
|
+
import{c as f,a6 as g,am as P,K as _,i as y,m as h,j as d}from"./index-CUTEHf7n.js";import{u as A}from"./use-entitlements-DH1D5a0L.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as $,b as A,j as s,n as B,m as K,a as Y,eu as U,au as Q,aH as Z,aI as M,r as q,B as z,E as G,t as ee}from"./index-CUTEHf7n.js";import{o as te,bp as se,a as le,aq as ae}from"./agent-icon-y2SKybSP.js";import{i as F,s as ie}from"./UserSquare-D0WQA2_a.js";import{B as H}from"./badge-CdntSWLw.js";import{a7 as ne,c as R,a8 as ce,a9 as oe,aa as O,ab as re,ac as de,ad as me}from"./chat-context-3o15fH-n.js";import"./index-D2ZLBdth.js";import{u as fe,f as pe}from"./use-date-fns-locale-Bd88zbns.js";import{u as ue}from"./use-org-fs-CYycA4iA.js";import{i as xe}from"./ArrowRight-waHzto0g.js";import{T as J}from"./textarea-J2V-aUg9.js";import{g as W,h as he}from"./use-organization-settings-C-YWM0uD.js";import{P as X}from"./schema-AdvpV9XD.js";const ge={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:F,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:te,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:se,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function je(t){const e=$.c(4),{className:c}=t;let a;e[0]!==c?(a=K("block h-2 rounded-full bg-muted",c),e[0]=c,e[1]=a):a=e[1];let l;return e[2]!==a?(l=s.jsx("span",{className:a}),e[2]=a,e[3]=l):l=e[3],l}const be=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function ve(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-5",children:be.map(Ne)}),t[0]=e):e=t[0],e}function Ne(t){return s.jsxs("div",{className:"flex flex-col gap-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:s.jsx(F,{size:14})}),s.jsx(je,{className:t.title}),s.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:t.value})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:K("h-full rounded-full",t.fill,t.tone)})})]},t.value)}function We(t){const e=$.c(30),{kind:c}=t,a=A(),l=ge[c];let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=x):x=e[0];let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[x,s.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:s.jsx(ve,{})})]}),e[1]=g):g=e[1];let i;e[2]!==a?(i=a("home.comingSoon.badge"),e[2]=a,e[3]=i):i=e[3];let o;e[4]!==i?(o=s.jsx(H,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let r;e[6]!==l.heading||e[7]!==a?(r=a(l.heading),e[6]=l.heading,e[7]=a,e[8]=r):r=e[8];let d;e[9]!==r?(d=s.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:r}),e[9]=r,e[10]=d):d=e[10];let n;e[11]!==l.description||e[12]!==a?(n=a(l.description),e[11]=l.description,e[12]=a,e[13]=n):n=e[13];let m;e[14]!==n?(m=s.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:n}),e[14]=n,e[15]=m):m=e[15];let u;e[16]!==o||e[17]!==d||e[18]!==m?(u=s.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,d,m]}),e[16]=o,e[17]=d,e[18]=m,e[19]=u):u=e[19];let f;if(e[20]!==l.points||e[21]!==a){let j;e[23]!==a?(j=b=>{const{Icon:v,labelKey:y,tone:I}=b;return s.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[s.jsx("span",{className:K("flex size-9 shrink-0 items-center justify-center rounded-lg",I),children:s.jsx(v,{size:18})}),s.jsx("span",{className:"text-sm text-foreground",children:a(y)})]},y)},e[23]=a,e[24]=j):j=e[24],f=l.points.map(j),e[20]=l.points,e[21]=a,e[22]=f}else f=e[22];let p;e[25]!==f?(p=s.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:f}),e[25]=f,e[26]=p):p=e[26];let h;return e[27]!==p||e[28]!==u?(h=s.jsx(B,{children:s.jsx(B.Content,{children:s.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[g,u,p]})})}),e[27]=p,e[28]=u,e[29]=h):h=e[29],h}const ye=20,Se={framing:"plan.case.status.framing",building:"plan.case.status.building",ready:"plan.case.status.ready"};function Pe(t){const e=$.c(28),{entry:c,threadId:a}=t,l=A(),x=fe(),{openTask:g}=R(),i=ce(c.path),o=i.data?.value;let r;e[0]!==c.path||e[1]!==g||e[2]!==a?(r=()=>g(a,{tabId:U(c.path)}),e[0]=c.path,e[1]=g,e[2]=a,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{className:"size-4 shrink-0 text-muted-foreground"}),e[4]=d):d=e[4];let n;e[5]!==i.isPending||e[6]!==l||e[7]!==o?.title?(n=o?.title??(i.isPending?"…":l("plan.cases.unreadable")),e[5]=i.isPending,e[6]=l,e[7]=o?.title,e[8]=n):n=e[8];let m;e[9]!==n?(m=s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:n}),e[9]=n,e[10]=m):m=e[10];let u;e[11]!==c.updatedAt||e[12]!==x||e[13]!==l?(u=l("plan.cases.updated",{when:pe(new Date(c.updatedAt),{addSuffix:!0,locale:x})}),e[11]=c.updatedAt,e[12]=x,e[13]=l,e[14]=u):u=e[14];let f;e[15]!==u?(f=s.jsx("span",{className:"text-xs text-muted-foreground",children:u}),e[15]=u,e[16]=f):f=e[16];let p;e[17]!==m||e[18]!==f?(p=s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[m,f]}),e[17]=m,e[18]=f,e[19]=p):p=e[19];let h;e[20]!==l||e[21]!==o?(h=o&&s.jsx(H,{variant:o.status==="ready"?"success":"agent",children:l(Se[o.status])}),e[20]=l,e[21]=o,e[22]=h):h=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Q,{className:"size-4 shrink-0 text-muted-foreground"}),e[23]=j):j=e[23];let b;return e[24]!==r||e[25]!==p||e[26]!==h?(b=s.jsx("li",{children:s.jsxs("button",{type:"button",onClick:r,className:"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left hover:bg-accent focus-ring",children:[d,p,h,j]})}),e[24]=r,e[25]=p,e[26]=h,e[27]=b):b=e[27],b}function _e(){const t=$.c(28),e=A(),{data:c}=Y.useSession(),a=c?.user?.id,l=ue("home",ne);let x,g,i,o,r;if(t[0]!==l.data||t[1]!==e||t[2]!==a){r=Symbol.for("react.early_return_sentinel");e:{let m;t[8]!==a?(m=b=>{const v=oe(b.path);return b.kind==="file"&&v&&(!b.createdBy||b.createdBy===a)?[{entry:b,threadId:v}]:[]},t[8]=a,t[9]=m):m=t[9];const u=(l.data??[]).flatMap(m).toSorted(we).slice(0,ye);if(u.length===0){r=null;break e}i="flex flex-col gap-3";let f;t[10]!==e?(f=e("plan.cases.heading"),t[10]=e,t[11]=f):f=t[11];let p;t[12]!==f?(p=s.jsx("h2",{className:"text-xl font-medium text-foreground",children:f}),t[12]=f,t[13]=p):p=t[13];let h;t[14]!==e?(h=e("plan.cases.description"),t[14]=e,t[15]=h):h=t[15];let j;t[16]!==h?(j=s.jsx("p",{className:"text-sm text-muted-foreground",children:h}),t[16]=h,t[17]=j):j=t[17],t[18]!==p||t[19]!==j?(o=s.jsxs("div",{className:"flex flex-col gap-1",children:[p,j]}),t[18]=p,t[19]=j,t[20]=o):o=t[20],x="-mx-3 flex flex-col",g=u.map(Ce)}t[0]=l.data,t[1]=e,t[2]=a,t[3]=x,t[4]=g,t[5]=i,t[6]=o,t[7]=r}else x=t[3],g=t[4],i=t[5],o=t[6],r=t[7];if(r!==Symbol.for("react.early_return_sentinel"))return r;let d;t[21]!==x||t[22]!==g?(d=s.jsx("ul",{className:x,children:g}),t[21]=x,t[22]=g,t[23]=d):d=t[23];let n;return t[24]!==i||t[25]!==o||t[26]!==d?(n=s.jsxs("section",{className:i,children:[o,d]}),t[24]=i,t[25]=o,t[26]=d,t[27]=n):n=t[27],n}function Ce(t){const{entry:e,threadId:c}=t;return s.jsx(Pe,{entry:e,threadId:c},e.path)}function we(t,e){return e.entry.updatedAt.localeCompare(t.entry.updatedAt)}function ke(t,e){const c=e.idea.trim(),a=e.objective?.trim(),l=e.casePath;return a?t("plan.prompt.withObjective",{idea:c,objective:a,casePath:l}):t("plan.prompt.withoutObjective",{idea:c,casePath:l})}const V="studio:plan-case-seed:",Ie=Z({title:M().min(1).max(O.title),objective:M().max(O.text).nullable(),request:M().min(1).max(O.text)});function Ee(t){const e=t.trim().split(`
|
|
2
|
+
`)[0]??"";return e.length>O.title?`${e.slice(0,O.title-1)}…`:e}function Te(t,e,c){const a=c.request.trim().slice(0,O.text),l={title:Ee(a),objective:c.objective?.trim().slice(0,O.text)||null,request:a};try{t.setItem(V+e,JSON.stringify(l))}catch{}}function Xe(t,e){let c;try{c=t.getItem(V+e)}catch{return null}if(!c)return null;let a;try{a=JSON.parse(c)}catch{return null}const l=Ie.safeParse(a);return l.success?re(l.data):null}const $e=[{label:"plan.idea.topic.shipping",prompt:"plan.idea.topic.shippingPrompt"},{label:"plan.idea.topic.pdp",prompt:"plan.idea.topic.pdpPrompt"},{label:"plan.idea.topic.checkout",prompt:"plan.idea.topic.checkoutPrompt"},{label:"plan.idea.topic.search",prompt:"plan.idea.topic.searchPrompt"},{label:"plan.idea.topic.performance",prompt:"plan.idea.topic.performancePrompt"},{label:"plan.idea.topic.paidMedia",prompt:"plan.idea.topic.paidMediaPrompt"}];function ze(){const t=$.c(54),e=A(),{createTaskWithMessage:c}=R(),a=W(),[l,x]=q.useState("");let g;t[0]!==l?(g=l.trim(),t[0]=l,t[1]=g):g=t[1];const i=g.length>0;let o;t[2]!==c||t[3]!==l||t[4]!==a||t[5]!==i||t[6]!==e?(o=N=>{if(N.preventDefault(),!i)return;G("plan_idea_submitted",{has_objective:!!a});const D=crypto.randomUUID(),L=de(D);Te(sessionStorage,L,{objective:a?.statement,request:l}),c({id:D,tabId:U(L),message:{parts:[{type:"text",text:ke(e,{idea:l,objective:a?.statement,casePath:me(L)})}]}}),x("")},t[2]=c,t[3]=l,t[4]=a,t[5]=i,t[6]=e,t[7]=o):o=t[7];const r=o;let d;t[8]!==e?(d=e("plan.idea.heading"),t[8]=e,t[9]=d):d=t[9];let n;t[10]!==d?(n=s.jsx("h2",{className:"text-xl font-medium text-foreground",children:d}),t[10]=d,t[11]=n):n=t[11];let m;t[12]!==e?(m=e("plan.idea.description"),t[12]=e,t[13]=m):m=t[13];let u;t[14]!==m?(u=s.jsx("p",{className:"text-sm text-pretty text-muted-foreground",children:m}),t[14]=m,t[15]=u):u=t[15];let f;t[16]!==n||t[17]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-1",children:[n,u]}),t[16]=n,t[17]=u,t[18]=f):f=t[18];let p;t[19]!==e?(p=e("plan.idea.label"),t[19]=e,t[20]=p):p=t[20];let h;t[21]!==e?(h=e("plan.idea.placeholder"),t[21]=e,t[22]=h):h=t[22];let j;t[23]===Symbol.for("react.memo_cache_sentinel")?(j=N=>x(N.target.value),t[23]=j):j=t[23];let b;t[24]!==r?(b=N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)&&r(N)},t[24]=r,t[25]=b):b=t[25];let v;t[26]!==l||t[27]!==b||t[28]!==p||t[29]!==h?(v=s.jsx(J,{"aria-label":p,placeholder:h,value:l,onChange:j,onKeyDown:b,className:"min-h-32 text-[15px]"}),t[26]=l,t[27]=b,t[28]=p,t[29]=h,t[30]=v):v=t[30];const y=!i;let I;t[31]!==e?(I=e("plan.idea.submit"),t[31]=e,t[32]=I):I=t[32];let k;t[33]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(xe,{}),t[33]=k):k=t[33];let S;t[34]!==y||t[35]!==I?(S=s.jsx("div",{className:"flex justify-end",children:s.jsxs(z,{type:"submit",disabled:y,children:[I,k]})}),t[34]=y,t[35]=I,t[36]=S):S=t[36];let E;t[37]!==r||t[38]!==v||t[39]!==S?(E=s.jsxs("form",{onSubmit:r,className:"flex flex-col gap-3",children:[v,S]}),t[37]=r,t[38]=v,t[39]=S,t[40]=E):E=t[40];let P;t[41]!==e?(P=e("plan.idea.startWith"),t[41]=e,t[42]=P):P=t[42];let _;t[43]!==P?(_=s.jsx("span",{className:"mr-1 text-meta",children:P}),t[43]=P,t[44]=_):_=t[44];let C;t[45]!==e?(C=$e.map(N=>s.jsx(z,{type:"button",variant:"outline",size:"sm",onClick:()=>x(D=>D||e(N.prompt)),children:e(N.label)},N.label)),t[45]=e,t[46]=C):C=t[46];let w;t[47]!==_||t[48]!==C?(w=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_,C]}),t[47]=_,t[48]=C,t[49]=w):w=t[49];let T;return t[50]!==E||t[51]!==w||t[52]!==f?(T=s.jsxs("section",{className:"flex flex-col gap-4",children:[f,E,w]}),t[50]=E,t[51]=w,t[52]=f,t[53]=T):T=t[53],T}function Oe(t){const e=$.c(49),{initial:c,onDone:a}=t,l=A(),[x,g]=q.useState(c),i=he();let o;e[0]!==x?(o=x.trim(),e[0]=x,e[1]=o):o=e[1];const r=o;let d;e[2]!==a||e[3]!==i||e[4]!==l?(d=N=>i.mutate(N,{onSuccess:a,onError:()=>ee.error(l("plan.objective.saveError"))}),e[2]=a,e[3]=i,e[4]=l,e[5]=d):d=e[5];const n=d;let m;e[6]!==r||e[7]!==n?(m=N=>{N.preventDefault(),r&&n(r)},e[6]=r,e[7]=n,e[8]=m):m=e[8];const u=m;let f;e[9]!==l?(f=l("plan.objective.label"),e[9]=l,e[10]=f):f=e[10];let p;e[11]!==l?(p=l("plan.objective.placeholder"),e[11]=l,e[12]=p):p=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=N=>g(N.target.value),e[13]=h):h=e[13];let j;e[14]!==x||e[15]!==f||e[16]!==p?(j=s.jsx(J,{"aria-label":f,placeholder:p,value:x,maxLength:X,onChange:h,className:"min-h-20 text-base",autoFocus:!0}),e[14]=x,e[15]=f,e[16]=p,e[17]=j):j=e[17];let b;e[18]!==l?(b=l("plan.objective.hint"),e[18]=l,e[19]=b):b=e[19];let v;e[20]!==b?(v=s.jsx("span",{className:"text-meta",children:b}),e[20]=b,e[21]=v):v=e[21];let y;e[22]!==c||e[23]!==i.isPending||e[24]!==l||e[25]!==n?(y=c&&s.jsx(z,{type:"button",variant:"ghost",size:"sm",disabled:i.isPending,onClick:()=>n(null),children:l("plan.objective.clear")}),e[22]=c,e[23]=i.isPending,e[24]=l,e[25]=n,e[26]=y):y=e[26];const I=i.isPending;let k;e[27]!==l?(k=l("plan.objective.cancel"),e[27]=l,e[28]=k):k=e[28];let S;e[29]!==a||e[30]!==i.isPending||e[31]!==k?(S=s.jsx(z,{type:"button",variant:"outline",size:"sm",disabled:I,onClick:a,children:k}),e[29]=a,e[30]=i.isPending,e[31]=k,e[32]=S):S=e[32];const E=!r||i.isPending;let P;e[33]!==l?(P=l("plan.objective.save"),e[33]=l,e[34]=P):P=e[34];let _;e[35]!==E||e[36]!==P?(_=s.jsx(z,{type:"submit",size:"sm",disabled:E,children:P}),e[35]=E,e[36]=P,e[37]=_):_=e[37];let C;e[38]!==y||e[39]!==S||e[40]!==_?(C=s.jsxs("div",{className:"ml-auto flex gap-2",children:[y,S,_]}),e[38]=y,e[39]=S,e[40]=_,e[41]=C):C=e[41];let w;e[42]!==C||e[43]!==v?(w=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v,C]}),e[42]=C,e[43]=v,e[44]=w):w=e[44];let T;return e[45]!==u||e[46]!==w||e[47]!==j?(T=s.jsxs("form",{onSubmit:u,className:"flex flex-col gap-2",children:[j,w]}),e[45]=u,e[46]=w,e[47]=j,e[48]=T):T=e[48],T}function Ae(){const t=$.c(16),e=A(),c=W(),{createTaskWithMessage:a}=R(),[l,x]=q.useState(!1),g=c?.statement??"";let i;t[0]!==a||t[1]!==e?(i=()=>{G("plan_objective_suggest_clicked"),a({message:{parts:[{type:"text",text:e("plan.prompt.suggestObjective",{max:X})}]}})},t[0]=a,t[1]=e,t[2]=i):i=t[2];const o=i;let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(F,{size:13}),t[3]=r):r=t[3];let d;t[4]!==e?(d=e("plan.objective.eyebrow"),t[4]=e,t[5]=d):d=t[5];let n;t[6]!==d?(n=s.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:[r,d]}),t[6]=d,t[7]=n):n=t[7];let m;t[8]!==l||t[9]!==g||t[10]!==o||t[11]!==e?(m=l?s.jsx(Oe,{initial:g,onDone:()=>x(!1)}):g?s.jsxs("div",{className:"flex flex-col items-start gap-3",children:[s.jsx("p",{className:"max-w-[720px] text-2xl leading-snug font-medium text-balance text-foreground",children:g}),s.jsxs(z,{variant:"outline",size:"sm",onClick:()=>x(!0),children:[s.jsx(ae,{}),e("plan.objective.edit")]})]}):s.jsxs("div",{className:"flex flex-col items-start gap-3",children:[s.jsx("p",{className:"max-w-[560px] text-base text-pretty text-muted-foreground",children:e("plan.objective.empty")}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(z,{variant:"outline",size:"sm",onClick:o,children:[s.jsx(ie,{}),e("plan.objective.suggest")]}),s.jsx(z,{variant:"outline",size:"sm",onClick:()=>x(!0),children:e("plan.objective.write")})]})]}),t[8]=l,t[9]=g,t[10]=o,t[11]=e,t[12]=m):m=t[12];let u;return t[13]!==n||t[14]!==m?(u=s.jsxs("section",{className:"flex flex-col gap-3",children:[n,m]}),t[13]=n,t[14]=m,t[15]=u):u=t[15],u}function Ve(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(B,{children:s.jsx(B.Content,{children:s.jsxs(B.Container,{width:"standard",className:"flex flex-col gap-12",children:[s.jsx(Ae,{}),s.jsx(ze,{}),s.jsx(_e,{})]})})}),t[0]=e):e=t[0],e}export{We as C,Ve as P,Xe as r};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as Y,j as s,dX as me,
|
|
1
|
+
import{r as Y,j as s,dX as me,hT as ye,c as G,m as X,b_ as Pe,b as q,a6 as se,am as Z,q as _e,e as ae,J as ge,B as V,I as Se,t as W,K as ee,aJ as we,aK as Ee,aL as Ae,aM as Ie,b9 as Ue,aN as Te,aO as De,aP as $e,gi as le,gW as ne,i as xe,e0 as pe,b6 as Re,as as Be,au as Le,L as ke,gH as He}from"./index-CUTEHf7n.js";import{s as Oe}from"./Plus-BEFFoW2D.js";import{B as Fe}from"./badge-CdntSWLw.js";import{a as Me,b as ze,P as Ve}from"./popover-t4wJ-TtS.js";import{a as ce,T as Ge}from"./toggle-group-BSy9ppTS.js";import{g as Ke}from"./use-ai-providers-Dya2oYuM.js";import{u as ie,d as he,a as qe}from"./use-entitlements-DH1D5a0L.js";import{u as Qe,P as Ye}from"./plan-ladder-uOWkvedM.js";var re="Progress",oe=100,[Xe]=ye(re),[Ze,Je]=Xe(re),ve=Y.forwardRef((e,t)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:l=We,...c}=e;(a||a===0)&&!de(a)&&console.error(et(`${a}`,"Progress"));const i=de(a)?a:oe;o!==null&&!ue(o,i)&&console.error(tt(`${o}`,"Progress"));const r=ue(o,i)?o:null,u=te(r)?l(r,i):void 0;return s.jsx(Ze,{scope:n,value:r,max:i,children:s.jsx(me.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":te(r)?r:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ne(r,i),"data-value":r??void 0,"data-max":i,...c,ref:t})})});ve.displayName=re;var be="ProgressIndicator",je=Y.forwardRef((e,t)=>{const{__scopeProgress:n,...o}=e,a=Je(be,n);return s.jsx(me.div,{"data-state":Ne(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:t})});je.displayName=be;function We(e,t){return`${Math.round(e/t*100)}%`}function Ne(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function te(e){return typeof e=="number"}function de(e){return te(e)&&!isNaN(e)&&e>0}function ue(e,t){return te(e)&&!isNaN(e)&&e<=t&&e>=0}function et(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oe}\`.`}function tt(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
2
|
- a positive number
|
|
3
3
|
- less than the value passed to \`max\` (or ${oe} if no \`max\` prop is set)
|
|
4
4
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
5
|
|
|
6
|
-
Defaulting to \`null\`.`}var st=ve,lt=je;const nt=Pe("h-full w-full flex-1 rounded-full transition-transform duration-200 ease-[var(--ease-out-cubic)]",{variants:{tone:{default:"bg-brand-purple",warning:"bg-warning",dark:"bg-primary"}},defaultVariants:{tone:"default"}});function at(e){const t=G.c(18);let n,o,a,l;t[0]!==e?({className:n,value:l,tone:a,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=a,t[4]=l):(n=t[1],o=t[2],a=t[3],l=t[4]);const c=Math.min(100,Math.max(0,l??0));let i;t[5]!==n?(i=X("bg-muted relative h-1 w-full overflow-hidden rounded-full",n),t[5]=n,t[6]=i):i=t[6];let r;t[7]!==a?(r=nt({tone:a}),t[7]=a,t[8]=r):r=t[8];const u=`translateX(-${100-c}%)`;let m;t[9]!==u?(m={transform:u},t[9]=u,t[10]=m):m=t[10];let g;t[11]!==r||t[12]!==m?(g=s.jsx(lt,{"data-slot":"progress-indicator",className:r,style:m}),t[11]=r,t[12]=m,t[13]=g):g=t[13];let d;return t[14]!==o||t[15]!==i||t[16]!==g?(d=s.jsx(st,{"data-slot":"progress",className:i,...o,children:g}),t[14]=o,t[15]=i,t[16]=g,t[17]=d):d=t[17],d}const it={usd:[10,20,100],brl:[50,100,500]};function Ce(){const e=G.c(30),t=q(),n=Z(),[o]=ge(),[a,l]=Y.useState(!1);let c;e[0]!==t?(c=x=>{W.error(t("settings.decoCreditsHero.topUpFailed",{message:x.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:i,isPending:r}=ae({mutationFn:async x=>{const{url:E}=await n.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:x,currency:f});return E},onSuccess:rt,onError:c}),[u,m]=Y.useState(""),[g,d]=Y.useState(o.language==="pt-BR"?"brl":"usd"),f=g,h=parseFloat(u),C=!isNaN(h)&&h>=1,p=f==="brl"?"R$":"$";let _;e[2]!==d?(_=x=>{x&&d(x)},e[2]=d,e[3]=_):_=e[3];let b,w;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ce,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),w=s.jsx(ce,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=b,e[5]=w):(b=e[4],w=e[5]);let j;e[6]!==f||e[7]!==_?(j=s.jsxs(Ge,{type:"single",variant:"outline",size:"sm",value:f,onValueChange:_,children:[b,w]}),e[6]=f,e[7]=_,e[8]=j):j=e[8];let y;e[9]!==f||e[10]!==p||e[11]!==a||e[12]!==r||e[13]!==t||e[14]!==i?(y=!a&&s.jsxs(s.Fragment,{children:[it[f].map(x=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:r,onClick:()=>i(x*100),children:[p,x]},x)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>l(!0),disabled:r,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=p,e[11]=a,e[12]=r,e[13]=t,e[14]=i,e[15]=y):y=e[15];let N;e[16]!==p||e[17]!==u||e[18]!==h||e[19]!==a||e[20]!==C||e[21]!==r||e[22]!==m||e[23]!==t||e[24]!==i?(N=a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:p}),s.jsx(Se,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:u,onChange:x=>m(x.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!C||r,onClick:()=>i(Math.round(h*100)),children:r?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{l(!1),m("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=p,e[17]=u,e[18]=h,e[19]=a,e[20]=C,e[21]=r,e[22]=m,e[23]=t,e[24]=i,e[25]=N):N=e[25];let P;return e[26]!==j||e[27]!==y||e[28]!==N?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,y,N]})}),e[26]=j,e[27]=y,e[28]=N,e[29]=P):P=e[29],P}function rt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ot(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ct(e){const t=G.c(38),{enabled:n}=e,o=q(),{org:a}=se(),l=Z();let c;t[0]!==a.id?(c=ee.aiProviderCredits(a.id,"deco"),t[0]=a.id,t[1]=c):c=t[1];let i;t[2]!==l?(i=async()=>{try{return await l.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=l,t[3]=i):i=t[3];let r;t[4]!==n||t[5]!==c||t[6]!==i?(r={queryKey:c,enabled:n,staleTime:6e4,queryFn:i},t[4]=n,t[5]=c,t[6]=i,t[7]=r):r=t[7];const{data:u,isLoading:m,refetch:g,isFetching:d}=xe(r);if(!n)return null;const f=u?.balanceCents!=null?u.balanceCents/100:null;let h;t[8]!==f?(h=f!=null?`$${f.toFixed(2)}`:"—",t[8]=f,t[9]=h):h=t[9];const C=h;let p;t[10]!==f||t[11]!==C||t[12]!==d||t[13]!==m?(p=m||d?s.jsx(pe,{className:"h-9 w-24"}):s.jsx("span",{className:X("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&ot(f)),children:C}),t[10]=f,t[11]=C,t[12]=d,t[13]=m,t[14]=p):p=t[14];let _;t[15]!==g?(_=()=>g(),t[15]=g,t[16]=_):_=t[16];let b;t[17]!==o?(b=o("settings.decoCreditsHero.refreshBalance"),t[17]=o,t[18]=b):b=t[18];const w=d&&"animate-spin";let j;t[19]!==w?(j=X("size-3.5",w),t[19]=w,t[20]=j):j=t[20];let y;t[21]!==j?(y=s.jsx($e,{className:j}),t[21]=j,t[22]=y):y=t[22];let N;t[23]!==d||t[24]!==y||t[25]!==_||t[26]!==b?(N=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:_,disabled:d,className:"text-muted-foreground hover:text-foreground","aria-label":b,children:y}),t[23]=d,t[24]=y,t[25]=_,t[26]=b,t[27]=N):N=t[27];let P;t[28]!==N||t[29]!==p?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[p,N]}),t[28]=N,t[29]=p,t[30]=P):P=t[30];let x;t[31]!==o?(x=o("settings.decoCreditsHero.availableBalance"),t[31]=o,t[32]=x):x=t[32];let E;t[33]!==x?(E=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),t[33]=x,t[34]=E):E=t[34];let I;return t[35]!==P||t[36]!==E?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,E]}),t[35]=P,t[36]=E,t[37]=I):I=t[37],I}function _t(){const e=G.c(74),t=q(),{org:n}=se(),o=Z(),a=_e(),l=Ke();let c;e[0]!==l?(c=l.find(dt),e[0]=l,e[1]=c):c=e[1];const i=c,r=ie(),u=he("credits"),[m,g]=Y.useState(!1);let d;e[2]!==i||e[3]!==o?(d=async()=>{i&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[2]=i,e[3]=o,e[4]=d):d=e[4];let f;e[5]!==n||e[6]!==a||e[7]!==t?(f=()=>{a.invalidateQueries({queryKey:ee.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:ee.aiProviders(n.id)}),W.success(t("settings.decoCreditsHero.disconnectSuccess")),g(!1)},e[5]=n,e[6]=a,e[7]=t,e[8]=f):f=e[8];let h;e[9]!==t?(h=K=>{W.error(t("settings.decoCreditsHero.disconnectError",{message:K.message}))},e[9]=t,e[10]=h):h=e[10];let C;e[11]!==d||e[12]!==f||e[13]!==h?(C={mutationFn:d,onSuccess:f,onError:h},e[11]=d,e[12]=f,e[13]=h,e[14]=C):C=e[14];const{mutate:p,isPending:_}=ae(C);if(!i)return null;let b;e[15]!==t?(b=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=b):b=e[16];let w;e[17]!==t?(w=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=w):w=e[18];let j;e[19]!==w?(j=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:w,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=w,e[20]=j):j=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=()=>g(!0),e[21]=y):y=e[21];let N;e[22]!==t?(N=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=N):N=e[23];let P;e[24]!==_||e[25]!==N?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:y,disabled:_,children:N}),e[24]=_,e[25]=N,e[26]=P):P=e[26];let x;e[27]!==P||e[28]!==j?(x=s.jsxs("div",{className:"flex items-center justify-between",children:[j,P]}),e[27]=P,e[28]=j,e[29]=x):x=e[29];let E;e[30]!==t?(E=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=E):E=e[31];let I;e[32]!==E?(I=s.jsx(we,{children:E}),e[32]=E,e[33]=I):I=e[33];let U;e[34]!==t?(U=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=U):U=e[35];let D;e[36]!==U?(D=s.jsx(Ee,{children:U}),e[36]=U,e[37]=D):D=e[37];let T;e[38]!==I||e[39]!==D?(T=s.jsxs(Ae,{children:[I,D]}),e[38]=I,e[39]=D,e[40]=T):T=e[40];let O;e[41]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=O):O=e[42];let R;e[43]!==O?(R=s.jsx(Ie,{children:O}),e[43]=O,e[44]=R):R=e[44];let z;e[45]!==p?(z=()=>p(),e[45]=p,e[46]=z):z=e[46];let $;e[47]!==t?($=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=$):$=e[48];let B;e[49]!==z||e[50]!==$?(B=s.jsx(Ue,{onClick:z,variant:"destructive",children:$}),e[49]=z,e[50]=$,e[51]=B):B=e[51];let L;e[52]!==R||e[53]!==B?(L=s.jsxs(De,{children:[R,B]}),e[52]=R,e[53]=B,e[54]=L):L=e[54];let k;e[55]!==T||e[56]!==L?(k=s.jsxs(Te,{children:[T,L]}),e[55]=T,e[56]=L,e[57]=k):k=e[57];let F;e[58]!==m||e[59]!==k?(F=s.jsx(Re,{open:m,onOpenChange:g,children:k}),e[58]=m,e[59]=k,e[60]=F):F=e[60];const v=!r;let S;e[61]!==v?(S=s.jsx(ct,{enabled:v}),e[61]=v,e[62]=S):S=e[62];let A;e[63]!==u||e[64]!==t?(A=u?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ce,{})]}):null,e[63]=u,e[64]=t,e[65]=A):A=e[65];let H;e[66]!==x||e[67]!==F||e[68]!==S||e[69]!==A?(H=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[x,F,S,A]})}),e[66]=x,e[67]=F,e[68]=S,e[69]=A,e[70]=H):H=e[70];let M;return e[71]!==H||e[72]!==b?(M=s.jsx(ne,{title:b,children:H}),e[71]=H,e[72]=b,e[73]=M):M=e[73],M}function dt(e){return e.providerId==="deco"}function ut(e,t){const n=G.c(9),o=Z(),a=q();let l;n[0]!==o||n[1]!==e?(l=async r=>{const{url:u}=await o.call(e,e==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return u},n[0]=o,n[1]=e,n[2]=l):l=n[2];let c;n[3]!==t||n[4]!==a?(c=r=>W.error(a(t,{message:r.message})),n[3]=t,n[4]=a,n[5]=c):c=n[5];let i;return n[6]!==l||n[7]!==c?(i={mutationFn:l,onSuccess:ft,onError:c},n[6]=l,n[7]=c,n[8]=i):i=n[8],ae(i)}function ft(e){return window.open(e,"_blank","noopener,noreferrer")}const mt={ok:"text-foreground",warn:"text-warning",exhausted:"text-destructive",spent:"text-muted-foreground"},gt={ok:"[&>[data-slot=progress-indicator]]:bg-brand-purple",warn:"[&>[data-slot=progress-indicator]]:bg-warning",exhausted:"[&>[data-slot=progress-indicator]]:bg-destructive",spent:"[&>[data-slot=progress-indicator]]:bg-muted-foreground/40"};function fe(e){const t=G.c(22),{label:n,badge:o,value:a,unit:l,valueClassName:c,bar:i,footer:r}=e;let u;t[0]!==n?(u=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),t[0]=n,t[1]=u):u=t[1];let m;t[2]!==o||t[3]!==u?(m=s.jsxs("div",{className:"flex h-5 items-center gap-2",children:[u,o]}),t[2]=o,t[3]=u,t[4]=m):m=t[4];let g;t[5]!==c?(g=X("text-4xl font-semibold leading-none tracking-tight tabular-nums",c),t[5]=c,t[6]=g):g=t[6];let d;t[7]!==g||t[8]!==a?(d=s.jsx("span",{className:g,children:a}),t[7]=g,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==l?(f=l&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),t[10]=l,t[11]=f):f=t[11];let h;t[12]!==d||t[13]!==f?(h=s.jsxs("div",{className:"flex items-baseline gap-2",children:[d,f]}),t[12]=d,t[13]=f,t[14]=h):h=t[14];let C;t[15]!==i||t[16]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[i,r]}),t[15]=i,t[16]=r,t[17]=C):C=t[17];let p;return t[18]!==m||t[19]!==h||t[20]!==C?(p=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[m,h,C]}),t[18]=m,t[19]=h,t[20]=C,t[21]=p):p=t[21],p}function xt(){const e=G.c(8),t=q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{size:14}),e[0]=n):n=e[0];let o;e[1]!==t?(o=t("settings.decoCreditsHero.addCredits"),e[1]=t,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx(Me,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"sm",className:"w-fit",children:[n,o]})}),e[3]=o,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ze,{align:"start",className:"w-auto",children:s.jsx(Ce,{})}),e[5]=l):l=e[5];let c;return e[6]!==a?(c=s.jsxs(Ve,{children:[a,l]}),e[6]=a,e[7]=c):c=e[7],c}function pt(){const e=G.c(15),t=q(),{org:n}=se(),o=Z();let a;e[0]!==n.id?(a=ee.orgBillingAccount(n.id),e[0]=n.id,e[1]=a):a=e[1];let l;e[2]!==o?(l=()=>o.call("ORGANIZATION_BILLING_GET",{}),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={queryKey:a,staleTime:6e4,queryFn:l},e[4]=a,e[5]=l,e[6]=c):c=e[6];const{data:i}=xe(c),{mutate:r,isPending:u}=ut("ORGANIZATION_BILLING_PORTAL","settings.planUsage.portalFailed");if(!i?.hasBillingAccount)return null;let m;e[7]!==r?(m=()=>r(),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==t?(g=t("settings.planUsage.manageBilling"),e[9]=t,e[10]=g):g=e[10];let d;return e[11]!==u||e[12]!==m||e[13]!==g?(d=s.jsx(V,{variant:"outline",size:"sm",disabled:u,onClick:m,children:g}),e[11]=u,e[12]=m,e[13]=g,e[14]=d):d=e[14],d}function St(){const e=G.c(9),t=q(),{org:n}=se(),o=ie(),{granted:a}=Be("monitoring:view");if(!o||!a)return null;let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={tab:"overview"},e[2]=c):c=e[2];let i;e[3]!==t?(i=t("settings.planUsage.aiUsage"),e[3]=t,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{size:14}),e[5]=r):r=e[5];let u;return e[6]!==l||e[7]!==i?(u=s.jsx(V,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(ke,{to:"/$org/settings/monitor",params:l,search:c,children:[i,r]})}),e[6]=l,e[7]=i,e[8]=u):u=e[8],u}function wt(){const e=G.c(71),t=q(),[n]=ge(),o=ie(),a=he("credits"),{data:l,isLoading:c,isError:i,refetch:r}=qe(),{data:u}=Qe();let m;e[0]!==l?.plan||e[1]!==u?(m=u?.findIndex(v=>v.id===l?.plan.id)??-1,e[0]=l?.plan,e[1]=u,e[2]=m):m=e[2];const g=m;if(!o)return null;if(c){let v;e[3]!==t?(v=t("settings.planUsage.title"),e[3]=t,e[4]=v):v=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(le,{children:s.jsx("div",{className:"px-5 py-5",children:s.jsx(pe,{className:"h-24 w-full"})})}),e[5]=S):S=e[5];let A;return e[6]!==v?(A=s.jsx(ne,{title:v,children:S}),e[6]=v,e[7]=A):A=e[7],A}if(i||!l){let v;e[8]!==t?(v=t("settings.planUsage.title"),e[8]=t,e[9]=v):v=e[9];let S;e[10]!==t?(S=t("settings.planUsage.loadFailed"),e[10]=t,e[11]=S):S=e[11];let A;e[12]!==S?(A=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=A):A=e[13];let H;e[14]!==r?(H=()=>r(),e[14]=r,e[15]=H):H=e[15];let M;e[16]!==t?(M=t("settings.planUsage.retry"),e[16]=t,e[17]=M):M=e[17];let K;e[18]!==H||e[19]!==M?(K=s.jsx(V,{variant:"outline",size:"sm",onClick:H,children:M}),e[18]=H,e[19]=M,e[20]=K):K=e[20];let Q;e[21]!==A||e[22]!==K?(Q=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex items-center justify-between gap-3",children:[A,K]})}),e[21]=A,e[22]=K,e[23]=Q):Q=e[23];let J;return e[24]!==v||e[25]!==Q?(J=s.jsx(ne,{title:v,children:Q}),e[24]=v,e[25]=Q,e[26]=J):J=e[26],J}if(l.plan.id==="free")return null;let d;if(e[27]!==l.usage){const v=l.usage?Math.round(l.usage.percent*100):null;d=v!==null&&Number.isFinite(v)?Math.min(100,Math.max(0,v)):null,e[27]=l.usage,e[28]=d}else d=e[28];const f=d,h=l.usage?.state??"ok",C=l.features.chat,p=l.credits?.remainingUsd??null;let _;e[29]!==n?(_=v=>{if(!v)return null;const S=new Date(v);return Number.isNaN(S.getTime())?null:S.toLocaleDateString(n.language,{day:"numeric",month:"short"})},e[29]=n,e[30]=_):_=e[30];const b=_;let w;e[31]!==l.periodStart||e[32]!==b?(w=b(l.periodStart),e[31]=l.periodStart,e[32]=b,e[33]=w):w=e[33];const j=w;let y;e[34]!==l.periodEnd||e[35]!==b?(y=b(l.periodEnd),e[34]=l.periodEnd,e[35]=b,e[36]=y):y=e[36];const N=y;let P;e[37]!==N||e[38]!==j?(P=j&&N?{start:j,end:N}:null,e[37]=N,e[38]=j,e[39]=P):P=e[39];const x=P,E=h==="exhausted"&&p!==null&&p>0,I=E?"spent":h;let U;e[40]!==g?(U=g>=0&&s.jsx(Ye,{index:g,className:"size-6"}),e[40]=g,e[41]=U):U=e[41];let D;e[42]!==l.plan.name?(D=s.jsx("span",{className:"text-sm font-medium",children:l.plan.name}),e[42]=l.plan.name,e[43]=D):D=e[43];let T;e[44]!==U||e[45]!==D?(T=s.jsxs("div",{className:"flex items-center gap-2",children:[U,D]}),e[44]=U,e[45]=D,e[46]=T):T=e[46];let O;e[47]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pt,{}),e[47]=O):O=e[47];let R;e[48]!==T?(R=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[T,O]}),e[48]=T,e[49]=R):R=e[49];const z=a&&"sm:grid-cols-[minmax(0,1fr)_minmax(0,15rem)]";let $;e[50]!==z?($=X("grid gap-x-8 gap-y-6",z),e[50]=z,e[51]=$):$=e[51];let B;e[52]!==I||e[53]!==C||e[54]!==f||e[55]!==x||e[56]!==t?(B=C?s.jsx(fe,{label:t("settings.planUsage.included"),value:f===null?t("settings.planUsage.usageUnavailable"):`${f}%`,unit:f!==null?t("settings.planUsage.used"):void 0,valueClassName:mt[I],bar:f===null?s.jsx("div",{className:"h-3 w-full rounded-full bg-muted/60","aria-hidden":"true"}):s.jsx(at,{value:f,"aria-label":t("settings.planUsage.included"),className:X("h-3 bg-muted [&>[data-slot=progress-indicator]]:rounded-full",gt[I])}),footer:x?s.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-meta",children:[s.jsx("span",{children:x.start}),s.jsx("span",{children:x.end})]}):s.jsx("span",{className:"text-meta",children:t("settings.planUsage.periodHint")})}):s.jsx("p",{className:"text-sm text-muted-foreground self-center",children:t("settings.planUsage.noAiIncluded")}),e[52]=I,e[53]=C,e[54]=f,e[55]=x,e[56]=t,e[57]=B):B=e[57];let L;e[58]!==a||e[59]!==p||e[60]!==E||e[61]!==n||e[62]!==t?(L=a&&s.jsx(fe,{label:t("settings.planUsage.credits"),badge:E?s.jsx(Fe,{variant:"success",size:"sm",children:t("settings.planUsage.creditsInUse")}):null,value:p===null?"—":p.toLocaleString(n.language,{style:"currency",currency:"USD"}),valueClassName:p!==null&&p>0?"text-foreground":"text-muted-foreground",footer:s.jsx(xt,{})}),e[58]=a,e[59]=p,e[60]=E,e[61]=n,e[62]=t,e[63]=L):L=e[63];let k;e[64]!==$||e[65]!==B||e[66]!==L?(k=s.jsxs("div",{className:$,children:[B,L]}),e[64]=$,e[65]=B,e[66]=L,e[67]=k):k=e[67];let F;return e[68]!==R||e[69]!==k?(F=s.jsxs(He,{className:"p-6 gap-6",children:[R,k]}),e[68]=R,e[69]=k,e[70]=F):F=e[70],F}export{St as A,_t as D,wt as P,ut as u};
|
|
6
|
+
Defaulting to \`null\`.`}var st=ve,lt=je;const nt=Pe("h-full w-full flex-1 rounded-full transition-transform duration-200 ease-[var(--ease-out-cubic)]",{variants:{tone:{default:"bg-brand-purple",warning:"bg-warning",dark:"bg-primary"}},defaultVariants:{tone:"default"}});function at(e){const t=G.c(18);let n,o,a,l;t[0]!==e?({className:n,value:l,tone:a,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=a,t[4]=l):(n=t[1],o=t[2],a=t[3],l=t[4]);const c=Math.min(100,Math.max(0,l??0));let i;t[5]!==n?(i=X("bg-muted relative h-1 w-full overflow-hidden rounded-full",n),t[5]=n,t[6]=i):i=t[6];let r;t[7]!==a?(r=nt({tone:a}),t[7]=a,t[8]=r):r=t[8];const u=`translateX(-${100-c}%)`;let m;t[9]!==u?(m={transform:u},t[9]=u,t[10]=m):m=t[10];let g;t[11]!==r||t[12]!==m?(g=s.jsx(lt,{"data-slot":"progress-indicator",className:r,style:m}),t[11]=r,t[12]=m,t[13]=g):g=t[13];let d;return t[14]!==o||t[15]!==i||t[16]!==g?(d=s.jsx(st,{"data-slot":"progress",className:i,...o,children:g}),t[14]=o,t[15]=i,t[16]=g,t[17]=d):d=t[17],d}const it={usd:[10,20,100],brl:[50,100,500]};function Ce(){const e=G.c(30),t=q(),n=Z(),[o]=ge(),[a,l]=Y.useState(!1);let c;e[0]!==t?(c=x=>{W.error(t("settings.decoCreditsHero.topUpFailed",{message:x.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:i,isPending:r}=ae({mutationFn:async x=>{const{url:E}=await n.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:x,currency:f});return E},onSuccess:rt,onError:c}),[u,m]=Y.useState(""),[g,d]=Y.useState(o.language==="pt-BR"?"brl":"usd"),f=g,h=parseFloat(u),C=!isNaN(h)&&h>=1,p=f==="brl"?"R$":"$";let _;e[2]!==d?(_=x=>{x&&d(x)},e[2]=d,e[3]=_):_=e[3];let b,w;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ce,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),w=s.jsx(ce,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=b,e[5]=w):(b=e[4],w=e[5]);let j;e[6]!==f||e[7]!==_?(j=s.jsxs(Ge,{type:"single",variant:"outline",size:"sm",value:f,onValueChange:_,children:[b,w]}),e[6]=f,e[7]=_,e[8]=j):j=e[8];let y;e[9]!==f||e[10]!==p||e[11]!==a||e[12]!==r||e[13]!==t||e[14]!==i?(y=!a&&s.jsxs(s.Fragment,{children:[it[f].map(x=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:r,onClick:()=>i(x*100),children:[p,x]},x)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>l(!0),disabled:r,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=p,e[11]=a,e[12]=r,e[13]=t,e[14]=i,e[15]=y):y=e[15];let N;e[16]!==p||e[17]!==u||e[18]!==h||e[19]!==a||e[20]!==C||e[21]!==r||e[22]!==m||e[23]!==t||e[24]!==i?(N=a&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:p}),s.jsx(Se,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:u,onChange:x=>m(x.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!C||r,onClick:()=>i(Math.round(h*100)),children:r?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{l(!1),m("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=p,e[17]=u,e[18]=h,e[19]=a,e[20]=C,e[21]=r,e[22]=m,e[23]=t,e[24]=i,e[25]=N):N=e[25];let P;return e[26]!==j||e[27]!==y||e[28]!==N?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,y,N]})}),e[26]=j,e[27]=y,e[28]=N,e[29]=P):P=e[29],P}function rt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function ot(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function ct(e){const t=G.c(38),{enabled:n}=e,o=q(),{org:a}=se(),l=Z();let c;t[0]!==a.id?(c=ee.aiProviderCredits(a.id,"deco"),t[0]=a.id,t[1]=c):c=t[1];let i;t[2]!==l?(i=async()=>{try{return await l.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=l,t[3]=i):i=t[3];let r;t[4]!==n||t[5]!==c||t[6]!==i?(r={queryKey:c,enabled:n,staleTime:6e4,queryFn:i},t[4]=n,t[5]=c,t[6]=i,t[7]=r):r=t[7];const{data:u,isLoading:m,refetch:g,isFetching:d}=xe(r);if(!n)return null;const f=u?.balanceCents!=null?u.balanceCents/100:null;let h;t[8]!==f?(h=f!=null?`$${f.toFixed(2)}`:"—",t[8]=f,t[9]=h):h=t[9];const C=h;let p;t[10]!==f||t[11]!==C||t[12]!==d||t[13]!==m?(p=m||d?s.jsx(pe,{className:"h-9 w-24"}):s.jsx("span",{className:X("text-3xl font-semibold tabular-nums tracking-tight",f!=null&&ot(f)),children:C}),t[10]=f,t[11]=C,t[12]=d,t[13]=m,t[14]=p):p=t[14];let _;t[15]!==g?(_=()=>g(),t[15]=g,t[16]=_):_=t[16];let b;t[17]!==o?(b=o("settings.decoCreditsHero.refreshBalance"),t[17]=o,t[18]=b):b=t[18];const w=d&&"animate-spin";let j;t[19]!==w?(j=X("size-3.5",w),t[19]=w,t[20]=j):j=t[20];let y;t[21]!==j?(y=s.jsx(Re,{className:j}),t[21]=j,t[22]=y):y=t[22];let N;t[23]!==d||t[24]!==y||t[25]!==_||t[26]!==b?(N=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:_,disabled:d,className:"text-muted-foreground hover:text-foreground","aria-label":b,children:y}),t[23]=d,t[24]=y,t[25]=_,t[26]=b,t[27]=N):N=t[27];let P;t[28]!==N||t[29]!==p?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[p,N]}),t[28]=N,t[29]=p,t[30]=P):P=t[30];let x;t[31]!==o?(x=o("settings.decoCreditsHero.availableBalance"),t[31]=o,t[32]=x):x=t[32];let E;t[33]!==x?(E=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),t[33]=x,t[34]=E):E=t[34];let I;return t[35]!==P||t[36]!==E?(I=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,E]}),t[35]=P,t[36]=E,t[37]=I):I=t[37],I}function _t(){const e=G.c(74),t=q(),{org:n}=se(),o=Z(),a=_e(),l=Ke();let c;e[0]!==l?(c=l.find(dt),e[0]=l,e[1]=c):c=e[1];const i=c,r=ie(),u=he("credits"),[m,g]=Y.useState(!1);let d;e[2]!==i||e[3]!==o?(d=async()=>{i&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[2]=i,e[3]=o,e[4]=d):d=e[4];let f;e[5]!==n||e[6]!==a||e[7]!==t?(f=()=>{a.invalidateQueries({queryKey:ee.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:ee.aiProviders(n.id)}),W.success(t("settings.decoCreditsHero.disconnectSuccess")),g(!1)},e[5]=n,e[6]=a,e[7]=t,e[8]=f):f=e[8];let h;e[9]!==t?(h=K=>{W.error(t("settings.decoCreditsHero.disconnectError",{message:K.message}))},e[9]=t,e[10]=h):h=e[10];let C;e[11]!==d||e[12]!==f||e[13]!==h?(C={mutationFn:d,onSuccess:f,onError:h},e[11]=d,e[12]=f,e[13]=h,e[14]=C):C=e[14];const{mutate:p,isPending:_}=ae(C);if(!i)return null;let b;e[15]!==t?(b=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=b):b=e[16];let w;e[17]!==t?(w=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=w):w=e[18];let j;e[19]!==w?(j=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:w,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=w,e[20]=j):j=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=()=>g(!0),e[21]=y):y=e[21];let N;e[22]!==t?(N=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=N):N=e[23];let P;e[24]!==_||e[25]!==N?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:y,disabled:_,children:N}),e[24]=_,e[25]=N,e[26]=P):P=e[26];let x;e[27]!==P||e[28]!==j?(x=s.jsxs("div",{className:"flex items-center justify-between",children:[j,P]}),e[27]=P,e[28]=j,e[29]=x):x=e[29];let E;e[30]!==t?(E=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=E):E=e[31];let I;e[32]!==E?(I=s.jsx(we,{children:E}),e[32]=E,e[33]=I):I=e[33];let U;e[34]!==t?(U=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=U):U=e[35];let T;e[36]!==U?(T=s.jsx(Ee,{children:U}),e[36]=U,e[37]=T):T=e[37];let D;e[38]!==I||e[39]!==T?(D=s.jsxs(Ae,{children:[I,T]}),e[38]=I,e[39]=T,e[40]=D):D=e[40];let O;e[41]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=O):O=e[42];let $;e[43]!==O?($=s.jsx(Ie,{children:O}),e[43]=O,e[44]=$):$=e[44];let z;e[45]!==p?(z=()=>p(),e[45]=p,e[46]=z):z=e[46];let R;e[47]!==t?(R=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=R):R=e[48];let B;e[49]!==z||e[50]!==R?(B=s.jsx(Ue,{onClick:z,variant:"destructive",children:R}),e[49]=z,e[50]=R,e[51]=B):B=e[51];let L;e[52]!==$||e[53]!==B?(L=s.jsxs(Te,{children:[$,B]}),e[52]=$,e[53]=B,e[54]=L):L=e[54];let k;e[55]!==D||e[56]!==L?(k=s.jsxs(De,{children:[D,L]}),e[55]=D,e[56]=L,e[57]=k):k=e[57];let F;e[58]!==m||e[59]!==k?(F=s.jsx($e,{open:m,onOpenChange:g,children:k}),e[58]=m,e[59]=k,e[60]=F):F=e[60];const v=!r;let S;e[61]!==v?(S=s.jsx(ct,{enabled:v}),e[61]=v,e[62]=S):S=e[62];let A;e[63]!==u||e[64]!==t?(A=u?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(Ce,{})]}):null,e[63]=u,e[64]=t,e[65]=A):A=e[65];let H;e[66]!==x||e[67]!==F||e[68]!==S||e[69]!==A?(H=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[x,F,S,A]})}),e[66]=x,e[67]=F,e[68]=S,e[69]=A,e[70]=H):H=e[70];let M;return e[71]!==H||e[72]!==b?(M=s.jsx(ne,{title:b,children:H}),e[71]=H,e[72]=b,e[73]=M):M=e[73],M}function dt(e){return e.providerId==="deco"}function ut(e,t){const n=G.c(9),o=Z(),a=q();let l;n[0]!==o||n[1]!==e?(l=async r=>{const{url:u}=await o.call(e,e==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return u},n[0]=o,n[1]=e,n[2]=l):l=n[2];let c;n[3]!==t||n[4]!==a?(c=r=>W.error(a(t,{message:r.message})),n[3]=t,n[4]=a,n[5]=c):c=n[5];let i;return n[6]!==l||n[7]!==c?(i={mutationFn:l,onSuccess:ft,onError:c},n[6]=l,n[7]=c,n[8]=i):i=n[8],ae(i)}function ft(e){return window.open(e,"_blank","noopener,noreferrer")}const mt={ok:"text-foreground",warn:"text-warning",exhausted:"text-destructive",spent:"text-muted-foreground"},gt={ok:"[&>[data-slot=progress-indicator]]:bg-brand-purple",warn:"[&>[data-slot=progress-indicator]]:bg-warning",exhausted:"[&>[data-slot=progress-indicator]]:bg-destructive",spent:"[&>[data-slot=progress-indicator]]:bg-muted-foreground/40"};function fe(e){const t=G.c(22),{label:n,badge:o,value:a,unit:l,valueClassName:c,bar:i,footer:r}=e;let u;t[0]!==n?(u=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),t[0]=n,t[1]=u):u=t[1];let m;t[2]!==o||t[3]!==u?(m=s.jsxs("div",{className:"flex h-5 items-center gap-2",children:[u,o]}),t[2]=o,t[3]=u,t[4]=m):m=t[4];let g;t[5]!==c?(g=X("text-4xl font-semibold leading-none tracking-tight tabular-nums",c),t[5]=c,t[6]=g):g=t[6];let d;t[7]!==g||t[8]!==a?(d=s.jsx("span",{className:g,children:a}),t[7]=g,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==l?(f=l&&s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),t[10]=l,t[11]=f):f=t[11];let h;t[12]!==d||t[13]!==f?(h=s.jsxs("div",{className:"flex items-baseline gap-2",children:[d,f]}),t[12]=d,t[13]=f,t[14]=h):h=t[14];let C;t[15]!==i||t[16]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[i,r]}),t[15]=i,t[16]=r,t[17]=C):C=t[17];let p;return t[18]!==m||t[19]!==h||t[20]!==C?(p=s.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[m,h,C]}),t[18]=m,t[19]=h,t[20]=C,t[21]=p):p=t[21],p}function xt(){const e=G.c(8),t=q();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oe,{size:14}),e[0]=n):n=e[0];let o;e[1]!==t?(o=t("settings.decoCreditsHero.addCredits"),e[1]=t,e[2]=o):o=e[2];let a;e[3]!==o?(a=s.jsx(Me,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"sm",className:"w-fit",children:[n,o]})}),e[3]=o,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ze,{align:"start",className:"w-auto",children:s.jsx(Ce,{})}),e[5]=l):l=e[5];let c;return e[6]!==a?(c=s.jsxs(Ve,{children:[a,l]}),e[6]=a,e[7]=c):c=e[7],c}function pt(){const e=G.c(15),t=q(),{org:n}=se(),o=Z();let a;e[0]!==n.id?(a=ee.orgBillingAccount(n.id),e[0]=n.id,e[1]=a):a=e[1];let l;e[2]!==o?(l=()=>o.call("ORGANIZATION_BILLING_GET",{}),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={queryKey:a,staleTime:6e4,queryFn:l},e[4]=a,e[5]=l,e[6]=c):c=e[6];const{data:i}=xe(c),{mutate:r,isPending:u}=ut("ORGANIZATION_BILLING_PORTAL","settings.planUsage.portalFailed");if(!i?.hasBillingAccount)return null;let m;e[7]!==r?(m=()=>r(),e[7]=r,e[8]=m):m=e[8];let g;e[9]!==t?(g=t("settings.planUsage.manageBilling"),e[9]=t,e[10]=g):g=e[10];let d;return e[11]!==u||e[12]!==m||e[13]!==g?(d=s.jsx(V,{variant:"outline",size:"sm",disabled:u,onClick:m,children:g}),e[11]=u,e[12]=m,e[13]=g,e[14]=d):d=e[14],d}function St(){const e=G.c(9),t=q(),{org:n}=se(),o=ie(),{granted:a}=Be("monitoring:view");if(!o||!a)return null;let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={tab:"overview"},e[2]=c):c=e[2];let i;e[3]!==t?(i=t("settings.planUsage.aiUsage"),e[3]=t,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{size:14}),e[5]=r):r=e[5];let u;return e[6]!==l||e[7]!==i?(u=s.jsx(V,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs(ke,{to:"/$org/settings/monitor",params:l,search:c,children:[i,r]})}),e[6]=l,e[7]=i,e[8]=u):u=e[8],u}function wt(){const e=G.c(71),t=q(),[n]=ge(),o=ie(),a=he("credits"),{data:l,isLoading:c,isError:i,refetch:r}=qe(),{data:u}=Qe();let m;e[0]!==l?.plan||e[1]!==u?(m=u?.findIndex(v=>v.id===l?.plan.id)??-1,e[0]=l?.plan,e[1]=u,e[2]=m):m=e[2];const g=m;if(!o)return null;if(c){let v;e[3]!==t?(v=t("settings.planUsage.title"),e[3]=t,e[4]=v):v=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(le,{children:s.jsx("div",{className:"px-5 py-5",children:s.jsx(pe,{className:"h-24 w-full"})})}),e[5]=S):S=e[5];let A;return e[6]!==v?(A=s.jsx(ne,{title:v,children:S}),e[6]=v,e[7]=A):A=e[7],A}if(i||!l){let v;e[8]!==t?(v=t("settings.planUsage.title"),e[8]=t,e[9]=v):v=e[9];let S;e[10]!==t?(S=t("settings.planUsage.loadFailed"),e[10]=t,e[11]=S):S=e[11];let A;e[12]!==S?(A=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=A):A=e[13];let H;e[14]!==r?(H=()=>r(),e[14]=r,e[15]=H):H=e[15];let M;e[16]!==t?(M=t("settings.planUsage.retry"),e[16]=t,e[17]=M):M=e[17];let K;e[18]!==H||e[19]!==M?(K=s.jsx(V,{variant:"outline",size:"sm",onClick:H,children:M}),e[18]=H,e[19]=M,e[20]=K):K=e[20];let Q;e[21]!==A||e[22]!==K?(Q=s.jsx(le,{children:s.jsxs("div",{className:"px-5 py-5 flex items-center justify-between gap-3",children:[A,K]})}),e[21]=A,e[22]=K,e[23]=Q):Q=e[23];let J;return e[24]!==v||e[25]!==Q?(J=s.jsx(ne,{title:v,children:Q}),e[24]=v,e[25]=Q,e[26]=J):J=e[26],J}if(l.plan.id==="free")return null;let d;if(e[27]!==l.usage){const v=l.usage?Math.round(l.usage.percent*100):null;d=v!==null&&Number.isFinite(v)?Math.min(100,Math.max(0,v)):null,e[27]=l.usage,e[28]=d}else d=e[28];const f=d,h=l.usage?.state??"ok",C=l.features.chat,p=l.credits?.remainingUsd??null;let _;e[29]!==n?(_=v=>{if(!v)return null;const S=new Date(v);return Number.isNaN(S.getTime())?null:S.toLocaleDateString(n.language,{day:"numeric",month:"short"})},e[29]=n,e[30]=_):_=e[30];const b=_;let w;e[31]!==l.periodStart||e[32]!==b?(w=b(l.periodStart),e[31]=l.periodStart,e[32]=b,e[33]=w):w=e[33];const j=w;let y;e[34]!==l.periodEnd||e[35]!==b?(y=b(l.periodEnd),e[34]=l.periodEnd,e[35]=b,e[36]=y):y=e[36];const N=y;let P;e[37]!==N||e[38]!==j?(P=j&&N?{start:j,end:N}:null,e[37]=N,e[38]=j,e[39]=P):P=e[39];const x=P,E=h==="exhausted"&&p!==null&&p>0,I=E?"spent":h;let U;e[40]!==g?(U=g>=0&&s.jsx(Ye,{index:g,className:"size-6"}),e[40]=g,e[41]=U):U=e[41];let T;e[42]!==l.plan.name?(T=s.jsx("span",{className:"text-sm font-medium",children:l.plan.name}),e[42]=l.plan.name,e[43]=T):T=e[43];let D;e[44]!==U||e[45]!==T?(D=s.jsxs("div",{className:"flex items-center gap-2",children:[U,T]}),e[44]=U,e[45]=T,e[46]=D):D=e[46];let O;e[47]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(pt,{}),e[47]=O):O=e[47];let $;e[48]!==D?($=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[D,O]}),e[48]=D,e[49]=$):$=e[49];const z=a&&"sm:grid-cols-[minmax(0,1fr)_minmax(0,15rem)]";let R;e[50]!==z?(R=X("grid gap-x-8 gap-y-6",z),e[50]=z,e[51]=R):R=e[51];let B;e[52]!==I||e[53]!==C||e[54]!==f||e[55]!==x||e[56]!==t?(B=C?s.jsx(fe,{label:t("settings.planUsage.included"),value:f===null?t("settings.planUsage.usageUnavailable"):`${f}%`,unit:f!==null?t("settings.planUsage.used"):void 0,valueClassName:mt[I],bar:f===null?s.jsx("div",{className:"h-3 w-full rounded-full bg-muted/60","aria-hidden":"true"}):s.jsx(at,{value:f,"aria-label":t("settings.planUsage.included"),className:X("h-3 bg-muted [&>[data-slot=progress-indicator]]:rounded-full",gt[I])}),footer:x?s.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-meta",children:[s.jsx("span",{children:x.start}),s.jsx("span",{children:x.end})]}):s.jsx("span",{className:"text-meta",children:t("settings.planUsage.periodHint")})}):s.jsx("p",{className:"text-sm text-muted-foreground self-center",children:t("settings.planUsage.noAiIncluded")}),e[52]=I,e[53]=C,e[54]=f,e[55]=x,e[56]=t,e[57]=B):B=e[57];let L;e[58]!==a||e[59]!==p||e[60]!==E||e[61]!==n||e[62]!==t?(L=a&&s.jsx(fe,{label:t("settings.planUsage.credits"),badge:E?s.jsx(Fe,{variant:"success",size:"sm",children:t("settings.planUsage.creditsInUse")}):null,value:p===null?"—":p.toLocaleString(n.language,{style:"currency",currency:"USD"}),valueClassName:p!==null&&p>0?"text-foreground":"text-muted-foreground",footer:s.jsx(xt,{})}),e[58]=a,e[59]=p,e[60]=E,e[61]=n,e[62]=t,e[63]=L):L=e[63];let k;e[64]!==R||e[65]!==B||e[66]!==L?(k=s.jsxs("div",{className:R,children:[B,L]}),e[64]=R,e[65]=B,e[66]=L,e[67]=k):k=e[67];let F;return e[68]!==$||e[69]!==k?(F=s.jsxs(He,{className:"p-6 gap-6",children:[$,k]}),e[68]=$,e[69]=k,e[70]=F):F=e[70],F}export{St as A,_t as D,wt as P,ut as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-
|
|
1
|
+
import{r as l,c4 as _,j as c,c6 as j,c7 as x,c5 as w,c1 as z,c2 as G,c3 as H,cb as E,ck as K,e1 as b,cf as U,ch as V,cl as W,cg as Z,ci as q,cj as B,cm as J,cn as Q,c9 as X,c as R,m as Y}from"./index-CUTEHf7n.js";var A="Popover",[N]=K(A,[E]),m=E(),[ee,P]=N(A),F=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,i=m(e),u=l.useRef(null),[f,v]=l.useState(!1),[g,p]=z({prop:r,defaultProp:n??!1,onChange:s,caller:A});return c.jsx(G,{...i,children:c.jsx(ee,{scope:e,contentId:H(),triggerRef:u,open:g,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(d=>!d),[p]),hasCustomAnchor:f,onCustomAnchorAdd:l.useCallback(()=>v(!0),[]),onCustomAnchorRemove:l.useCallback(()=>v(!1),[]),modal:a,children:o})})};F.displayName=A;var y="PopoverAnchor",S=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(y,o),s=m(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(w,{...s,...r,ref:e})});S.displayName=y;var D="PopoverTrigger",M=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(D,o),s=m(o),a=_(e,n.triggerRef),i=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":L(n.open),...r,ref:a,onClick:x(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(w,{asChild:!0,...s,children:i})});M.displayName=D;var O="PopoverPortal",[oe,te]=N(O,{forceMount:void 0}),k=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=P(O,e);return c.jsx(oe,{scope:e,forceMount:o,children:c.jsx(b,{present:o||s.open,children:c.jsx(X,{asChild:!0,container:n,children:r})})})};k.displayName=O;var h="PopoverContent",T=l.forwardRef((t,e)=>{const o=te(h,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=P(h,t.__scopePopover);return c.jsx(b,{present:r||s.open,children:s.modal?c.jsx(ne,{...n,ref:e}):c.jsx(se,{...n,ref:e})})});T.displayName=h;var re=W("PopoverContent.RemoveScroll"),ne=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(null),n=_(e,r),s=l.useRef(!1);return l.useEffect(()=>{const a=r.current;if(a)return U(a)},[]),c.jsx(V,{as:re,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:x(t.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,f=i.button===2||u;s.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:x(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),se=l.forwardRef((t,e)=>{const o=P(h,t.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(I,{...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 a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=l.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,...g}=t,p=P(h,o),d=m(o);return Z(),c.jsx(q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:v,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(J,{"data-state":L(p.open),role:"dialog",id:p.contentId,...d,...g,ref:e,style:{...g.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)"}})})})}),$="PopoverClose",ae=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P($,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:x(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=$;var ce="PopoverArrow",ie=l.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=m(o);return c.jsx(Q,{...n,...r,ref:e})});ie.displayName=ce;function L(t){return t?"open":"closed"}var le=F,pe=S,de=M,ue=k,fe=T;function ge(t){const e=R.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=c.jsx(le,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.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=c.jsx(de,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function he(t){const e=R.c(19);let o,r,n,s,a,i;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,variant:i,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a,e[6]=i):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5],i=e[6]);const u=s===void 0?"center":s,f=a===void 0?4:a,v=i===void 0?"default":i,g=v==="glass"?"glass rounded-[0.875rem] px-3.5 py-3":"bg-popover border p-4 shadow-md";let p;e[7]!==o||e[8]!==g?(p=Y("notranslate 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-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden outline-hidden",g,o),e[7]=o,e[8]=g,e[9]=p):p=e[9];let d;e[10]!==u||e[11]!==n||e[12]!==f||e[13]!==p||e[14]!==v?(d=c.jsx(fe,{"data-slot":"popover-content",align:u,sideOffset:f,translate:"no","data-variant":v,className:p,...n}),e[10]=u,e[11]=n,e[12]=f,e[13]=p,e[14]=v,e[15]=d):d=e[15];let C;return e[16]!==r||e[17]!==d?(C=c.jsx(ue,{container:r,children:d}),e[16]=r,e[17]=d,e[18]=C):C=e[18],C}function xe(t){const e=R.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=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ge as P,Pe as a,he as b,xe as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as it,b as pt,r as at,J as jt,j as e,m as et,B as tt,au as Ct}from"./index-CUTEHf7n.js";import{F as Nt}from"./agent-icon-y2SKybSP.js";import{b as Dt}from"./UserCheck01-CjBhJIbn.js";import{s as kt}from"./Plus-BEFFoW2D.js";import{S as St}from"./scroll-area-CRlFqWco.js";import{c as wt,s as Tt,b as ct,a as dt}from"./date-utils-CrvIKg-s.js";import{N as zt}from"./category-tree-k_En3Ghr.js";import{g as Et,d as Pt}from"./item-actions-B4eKhNFa.js";import"./AlertCircle-B4BiejsA.js";import"./Tool01-B97c8idL.js";import"./ArrowUp-C2dE69W7.js";import"./ArrowLeft-DpoZP_fX.js";import"./ArrowRight-waHzto0g.js";import"./BookOpen01-Det9naRR.js";import"./Globe04-YQZG_Qbl.js";import"./CheckCircle-BNEuJPHU.js";import"./ChevronDown-_sr4up4D.js";import"./ChevronSelectorVertical-Ddl6sDao.js";import"./ChevronUp-CK7Ad_mD.js";import"./UserSquare-D0WQA2_a.js";import"./LinkBroken01-jFeLEleD.js";import"./CreditCard01-DaUYIK4F.js";import"./File02-Dj9EXPDT.js";import"./MessageCircle01-Cf5Qa_r1.js";import"./SwitchHorizontal01-CgqtVqHH.js";import"./Eye-CYtkFg_6.js";import"./Fingerprint04-kauf3nbZ.js";import"./Image01-ChEwjYSJ.js";import"./Key01-DPAOwUET.js";import"./LayoutLeft-DUieRSDJ.js";import"./Minus-DVAnrb98.js";import"./Monitor01-D5to20Na.js";import"./Sun-D2fDzKM6.js";import"./Play-DBG3GXxW.js";import"./SearchMd-BVX4smTx.js";import"./ShoppingBag01-Bvm3sWvz.js";import"./Trash01-Bi3fjf_i.js";import"./Upload01-B0N1cyeo.js";import"./Users01-CNLWTh0g.js";import"./XClose-CUoBDo4j.js";import"./Zap-D5Q1SF5c.js";import"./index-BdQq_4o_.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-B6XGEO8o.js";import"./collapsible-CUOhSps5.js";import"./use-copy-DPZUA7Gr.js";import"./usage-stats-DJ1VHc0T.js";import"./utils-CVEq3hMx.js";import"./markdown-BhLg-Zjp.js";import"./chat-context-3o15fH-n.js";import"./use-panel-navigate-Dcxy731-.js";import"./thread-route-hABZCF2d.js";import"./use-project-scope-3Q37Eln5.js";import"./repository-binding-DyxjotEQ.js";import"./use-mcp-client-BVU34o8K.js";import"./auth-D7Uu7n_e.js";import"./use-view-draft-kind-DECgwRep.js";import"./use-blog-view-CpUCE6TS.js";import"./use-organization-settings-C-YWM0uD.js";import"./schema-AdvpV9XD.js";import"./task-board-ZELaPSpv.js";import"./thread-intent-C-4a46Zs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BqAScN4r.js";import"./session-runtime-DRkG9ReZ.js";import"./use-entitlements-DH1D5a0L.js";import"./use-ai-providers-Dya2oYuM.js";import"./use-current-view-SFKgOLYn.js";import"./use-in-settings-Dv_cwy92.js";import"./use-decopilot-events-B93IJnco.js";import"./use-org-fs-CYycA4iA.js";import"./useInfiniteQuery-Dmz76p-1.js";import"./infiniteQueryObserver-DN-l8Mqm.js";import"./use-mobile-LSpSJcPd.js";import"./tooltip-BtQY7me6.js";import"./index-C08yFDSB.js";import"./gateway-client-D6U4MBNC.js";import"./form-CDXejFhy.js";import"./label-qad8ROdP.js";import"./task-key-ChxtLgH2.js";import"./use-task-board-items-BFsmDyZa.js";import"./config-Bn2m6WJs.js";import"./task-route-hUi3-h4J.js";import"./project-index-CbwxAZlc.js";import"./shell-layout-bVoP9kOD.js";import"./use-deployment-admin-DYC3wY2X.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-B0u21Cu1.js";import"./command-BvXS_hwC.js";import"./index-dYHd0KJA.js";import"./integration-icon-BRVzdEXf.js";import"./project-icon-4S0TtqeC.js";import"./use-navigate-to-agent-fspVUy0_.js";import"./use-debounced-value-C75ZQTZG.js";import"./new-project-dialog-CVc657qA.js";import"./repository-picker-Diifpqm3.js";import"./github-icon-QoDNyjsW.js";import"./collection-search-gjXSkcT8.js";import"./new-project-store-ehAJK4hL.js";import"./legacy-admin-welcome-dialog-CXj5rtpz.js";import"./drawer-Co6CTMtJ.js";import"./required-auth-layout-CVH6Kpuo.js";import"./use-org-sso-DZUFYVRN.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DrwYcKK7.js";import"./types-B29zOSVo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-DwYwF5Xe.js";import"./use-connection-BAk2dsuv.js";import"./use-mcp-prompts-CCB1WHsd.js";import"./use-thread-outputs-DYau24LH.js";import"./file-type-icon-zloL09QV.js";import"./section-array-field-ZEOag6le.js";import"./blocks-tab-states-clMxtmY8.js";import"./site-editor-toast-BCn8hYHZ.js";import"./content-changes-Dwsp4uvc.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-p6STSWE5.js";import"./use-blocks-v8-project-ovX-kkwX.js";import"./use-voice-input-Ta8CFXyw.js";import"./popover-t4wJ-TtS.js";import"./index-B26-jaFe.js";import"./checkbox-DG0VRyZt.js";import"./select-CXHAcNGT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-VRJjHnOC.js";import"./sandbox-git-api-BHkz0_nl.js";import"./empty-state-BfnU_rAm.js";import"./badge-CdntSWLw.js";import"./empty-state-BlV47Moy.js";import"./delete-copy-B6vUu2FZ.js";import"./use-never-published-Ch6taPxS.js";import"./hosted-reconcile-Dgr_RAK2.js";import"./search-input-DaJb5UpE.js";import"./tabs-DEsdaVKa.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-BiSZZuuf.js";import"./asset-utils-BDk7TImr.js";import"./index-Dc3vpBAe.js";import"./match-site-slug-config-B47_xZCi.js";import"./textarea-J2V-aUg9.js";import"./primitives-Dq7WtxY4.js";import"./use-move-blocks-C_L5dYiU.js";import"./monaco-editor-Cmq9PYT5.js";import"./editor-Dzcpm7rQ.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-secondary-hover hover:text-accent-foreground";function jo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[j,C]=at.useState(null),[rt]=jt(),[n,f]=at.useState(It),p=rt.language;let N;t[0]!==n||t[1]!==p?(N=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=N):N=t[2];const y=N;let x,u,l,c,v,k,S,w,T,z;if(t[3]!==n||t[4]!==b||t[5]!==j||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=Et(zt(b)),st=wt(n),bt=Tt(new Date);u="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let I;t[25]!==r?(I=r("sandbox.postCalendar.today"),t[25]=r,t[26]=I):I=t[26];let H;t[27]!==I?(H=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:I}),t[27]=I,t[28]=H):H=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let U;t[30]!==r?(U=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=U):U=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let _;t[33]!==U?(_=e.jsx(tt,{variant:"ghost",size:"icon",onClick:Q,"aria-label":U,children:V}),t[33]=U,t[34]=_):_=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let $;t[36]!==r?($=r("sandbox.postCalendar.next"),t[36]=r,t[37]=$):$=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Ct,{size:16}),t[38]=Y):Y=t[38];let F;t[39]!==$?(F=e.jsx(tt,{variant:"ghost",size:"icon",onClick:X,"aria-label":$,children:Y}),t[39]=$,t[40]=F):F=t[40];let O;t[41]!==y?(O=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=O):O=t[42];let B;t[43]!==r?(B=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=B):B=t[44];let R;t[45]!==B?(R=e.jsx(mt,{className:ft,label:B}),t[45]=B,t[46]=R):R=t[46];let A;t[47]!==r?(A=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=A):A=t[48];let K;t[49]!==A?(K=e.jsx(mt,{className:xt,label:A}),t[49]=A,t[50]=K):K=t[50];let W;t[51]!==R||t[52]!==K?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[R,K]}),t[51]=R,t[52]=K,t[53]=W):W=t[53],t[54]!==H||t[55]!==_||t[56]!==F||t[57]!==O||t[58]!==W?(l=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[H,_,F,O,W]}),t[54]=H,t[55]=_,t[56]=F,t[57]=O,t[58]=W,t[59]=l):l=t[59],z="relative flex-1 min-h-0",x=St,T="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(a=>e.jsx("div",{className:"px-2 text-2xs text-muted-foreground",children:ut.format(a)},a.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(a=>{const yt=a.getMonth()===n.getMonth(),vt=ht.get(Pt(a))??[];return e.jsxs("div",{onDragOver:g=>{j&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const lt=g.dataTransfer.getData("text/plain");C(null),lt&&i(lt,a)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",j&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",a.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:a.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon-xs",className:"opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(a),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(a)}),children:e.jsx(kt,{size:14})})]}),vt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:C},g.post.key))]},a.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",v=e.jsx("p",{className:"px-1 text-2xs font-medium text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Nt,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(a=>e.jsx(nt,{entry:a,active:a.post.key===d,draggable:!1,onSelect:o,onDragStateChange:C},a.post.key)),t[3]=n,t[4]=b,t[5]=j,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=l,t[17]=c,t[18]=v,t[19]=k,t[20]=S,t[21]=w,t[22]=T,t[23]=z}else x=t[14],u=t[15],l=t[16],c=t[17],v=t[18],k=t[19],S=t[20],w=t[21],T=t[22],z=t[23];let E;t[64]!==c||t[65]!==v||t[66]!==k?(E=e.jsxs("div",{className:c,children:[v,k]}),t[64]=c,t[65]=v,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==T?(L=e.jsx(x,{className:T,children:P}),t[72]=x,t[73]=P,t[74]=T,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==z?(M=e.jsx("div",{className:z,children:L}),t[76]=L,t[77]=z,t[78]=M):M=t[78];let q;return t[79]!==u||t[80]!==l||t[81]!==M?(q=e.jsxs("div",{className:u,children:[l,M]}),t[79]=u,t[80]=l,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function It(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,j=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let C;t[0]!==D||t[1]!==j?(C=D(j),t[0]=D,t[1]=j,t[2]=C):C=t[2];const rt=C;let n;t[3]!==i||t[4]!==s.key?(n=v=>{v.dataTransfer.setData("text/plain",s.key),v.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const N=`${s.title} · ${rt}`,y=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let l;t[11]!==y||t[12]!==x||t[13]!==u?(l=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,x,u),t[11]=y,t[12]=x,t[13]=u,t[14]=l):l=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==l||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==N?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:N,className:l,children:s.title}),t[15]=o,t[16]=s.title,t[17]=l,t[18]=n,t[19]=f,t[20]=p,t[21]=N,t[22]=c):c=t[22],c}export{jo as PostCalendar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as ee,am as it,r as K,j as t,B as Le,D as lt,v as at,w as nt,x as rt,aU as ct,aY as dt,m as Be,y as mt,t as we,c as se,bu as pt,a9 as ut,aP as ft,aO as xt,aL as ht,aJ as gt,aK as bt,aN as jt,aM as vt,b9 as yt,h as St,ba as kt,I as Ae}from"./index-
|
|
2
|
-
`)}function Vs(l){return l.replace(/&/g,"&").replace(/"/g,""")}function Gs(l,e){const s=l.slice(0,e);return s.lastIndexOf("<a")>s.lastIndexOf("</a")}function Ws(l,e,s){const a=e.trim();if(!a||!s)return{blocks:l,applied:!1};for(let o=0;o<l.length;o++){const n=l[o];if(!n||typeof n.html!="string")continue;const d=n.html,{text:c,chars:i}=et(d);let m=c.indexOf(a);for(;m>=0;){const g=i[m],x=i[m+a.length-1];if(g&&x){const h=g.start,r=x.end,u=d.slice(h,r);if(!u.includes("<")&&!Gs(d,h)){const p=d.slice(0,h)+`<a href="${Vs(s)}">${u}</a>`+d.slice(r),f=l.slice();return f[o]={...n,html:p},{blocks:f,applied:!0}}}m=c.indexOf(a,m+1)}}return{blocks:l,applied:!1}}function Ys(l,e){let s=l,a=0;for(const o of e){const n=Ws(s,o.quote,o.href);n.applied&&(s=n.blocks,a++)}return{blocks:s,applied:a}}function Ks({virtualMcpId:l,decofile:e,sections:s,currentKey:a,meta:o,hasAi:n,onApply:d}){const c=ee(),i=it(),[m,g]=K.useState(!1),[x,h]=K.useState(!1),[r,u]=K.useState([]),[p,f]=K.useState(new Set),S=xs(e,o),C=Xt(e).filter(j=>j.key!==a&&j.slug),w=async()=>{h(!0);try{const j=Hs(s),_=await i.call("BLOG_SITE_GROUND",{virtualMcpId:l,purpose:"link"}).catch(E=>{console.warn("[linkSuggest] grounding failed",E)}),k=await i.call("BLOG_LINK_SUGGEST",{virtualMcpId:l,body:j,posts:C.map(E=>({title:E.title,slug:E.slug})),grounding:_?{report:_.report,outcome:_.outcome}:void 0}),P=[],b=new Set;for(const E of k.suggestions){const T=C.find(z=>z.slug===E.slug);if(!T||!S)continue;const A=hs(S,{category:T.categorySlugs[0]??"",slug:T.slug});if(!A||!j.includes(E.quote))continue;const F=`${E.quote}→${T.slug}`;b.has(F)||(b.add(F),P.push({quote:E.quote,href:A,title:T.title}))}u(P),f(new Set(P.map((E,T)=>T))),g(!0),P.length===0&&we.info(c("sandbox.linkSuggest.none"))}catch(j){we.error(j instanceof Error?j.message:c("sandbox.linkSuggest.failed"))}finally{h(!1)}},N=j=>f(_=>{const k=new Set(_);return k.has(j)?k.delete(j):k.add(j),k}),q=()=>{const j=r.filter((P,b)=>p.has(b)).map(P=>({quote:P.quote,href:P.href})),{blocks:_,applied:k}=Ys(s,j);d(_),g(!1),we.success(c("sandbox.linkSuggest.applied",{count:String(k)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:x||!n||C.length===0,title:n?C.length===0?c("sandbox.linkSuggest.noCandidates"):c("sandbox.linkSuggest.hint"):c("sandbox.autonomous.noAiProvider"),onClick:()=>{w()},children:[x?t.jsx(Lt,{size:14,className:"animate-spin"}):t.jsx(Ct,{size:14}),c("sandbox.linkSuggest.button")]}),t.jsx(lt,{open:m,onOpenChange:g,children:t.jsxs(at,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(nt,{children:[t.jsx(rt,{children:c("sandbox.linkSuggest.title")}),t.jsx(ct,{children:c("sandbox.linkSuggest.description")})]}),r.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:c("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:r.map((j,_)=>{const k=p.has(_);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>N(_),"aria-pressed":k,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-accent",children:[t.jsx("span",{className:Be("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",k?"border-primary bg-primary text-primary-foreground":"border-input"),children:k&&t.jsx(dt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",j.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",j.title]})]})]})},`${j.quote}-${j.href}`)})}),t.jsx(mt,{children:t.jsx(Le,{type:"button",disabled:p.size===0,onClick:q,children:c("sandbox.linkSuggest.apply",{count:String(p.size)})})})]})})]})}const Qs={unit:"pt",initial:12,min:6,max:96},Js=["outline-none min-h-80 px-4 py-3 text-[15px] leading-relaxed text-foreground","[&>*:first-child]:mt-0 [&_p]:my-3","[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-3xl [&_h1]:font-bold","[&_h2]:mb-3 [&_h2]:mt-6 [&_h2]:text-2xl [&_h2]:font-bold","[&_h3]:mb-2 [&_h3]:mt-5 [&_h3]:text-xl [&_h3]:font-bold","[&_h4]:mb-2 [&_h4]:mt-4 [&_h4]:text-lg [&_h4]:font-bold","[&_h5]:mb-2 [&_h5]:mt-4 [&_h5]:text-base [&_h5]:font-bold","[&_h6]:mb-2 [&_h6]:mt-4 [&_h6]:text-sm [&_h6]:font-bold","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6 [&_li>p]:my-1","[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm","[&_img]:inline-block [&_img]:h-auto [&_img]:max-w-full","[&_img.ProseMirror-selectednode]:outline-2 [&_img.ProseMirror-selectednode]:outline-primary","[&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_td>p]:my-0 [&_th>p]:my-0","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2","[&_strong]:font-bold",$s],Zs=["[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"];function Xs({editor:l,virtualMcpId:e}){const s=ws(e),a=Ds(),o=Bs(a.data?.configs??[],pt(s),s?.metadata?.assetStorageConfigId)?.id,n=ee(),[d,c]=K.useState(!1),[i,m]=K.useState(null),[g,x]=K.useState(null),h=p=>{l.chain().setImage({src:p}).run()},r=()=>{m(null),x(null)},u=()=>{const p=(i??"").trim(),f=Ke(p);if(!f&&p){x(p.toLowerCase().startsWith("data:")?n("sandbox.postEditor.legacyImageDataUrl"):n("sectionsEditor.imageField.unsafeUrl"));return}f&&h(f),r()};return t.jsxs("div",{className:"flex items-center gap-0.5",children:[t.jsx(Ue,{active:d,label:n("sandbox.postEditor.legacyInsertImage"),onClick:()=>c(!0),children:t.jsx(Fs,{size:14})}),t.jsx(Ue,{active:i!==null,label:n("sandbox.postEditor.legacyInsertImageUrl"),onClick:()=>i===null?m(""):u(),children:t.jsx(As,{size:14})}),i!==null&&t.jsx(qt,{draft:i,notice:g,label:n("sandbox.postEditor.legacyInsertImageUrl"),placeholder:n("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:p=>{x(null),m(p)},onCommit:u,onCancel:r}),t.jsx(Cs,{open:d,onOpenChange:c,mode:"image",lockedConfigId:o,onSelect:p=>{const f=Ke(p);f&&h(f)}})]})}function eo(l){const e=se.c(22),{editor:s,virtualMcpId:a}=l,o=ee(),[n,d]=K.useState(!1);let c;e[0]!==s?(c={editor:s,selector:to},e[0]=s,e[1]=c):c=e[1];const i=zs(c);let m;e[2]!==s||e[3]!==n||e[4]!==i.highlight?(m=t.jsx(Vt,{editor:s,mark:"highlight",currentColor:i.highlight,open:n,onOpenChange:d}),e[2]=s,e[3]=n,e[4]=i.highlight,e[5]=m):m=e[5];const g=i.codeBlock;let x;e[6]!==o?(x=o("sandbox.postEditor.legacyCodeBlock"),e[6]=o,e[7]=x):x=e[7];let h;e[8]!==s?(h=()=>s.chain().focus().toggleCodeBlock().run(),e[8]=s,e[9]=h):h=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(_t,{size:14}),e[10]=r):r=e[10];let u;e[11]!==i.codeBlock||e[12]!==x||e[13]!==h?(u=t.jsx(Ue,{active:g,label:x,onClick:h,children:r}),e[11]=i.codeBlock,e[12]=x,e[13]=h,e[14]=u):u=e[14];let p;e[15]!==s||e[16]!==a?(p=t.jsx(Xs,{editor:s,virtualMcpId:a}),e[15]=s,e[16]=a,e[17]=p):p=e[17];let f;return e[18]!==m||e[19]!==u||e[20]!==p?(f=t.jsxs(t.Fragment,{children:[m,u,p]}),e[18]=m,e[19]=u,e[20]=p,e[21]=f):f=e[21],f}function to(l){const{editor:e}=l;return{highlight:e.isActive("highlight")?e.getAttributes("highlight").color??null:null,codeBlock:e.isActive("codeBlock")}}function so({value:l,onChange:e,decofile:s,sandboxRef:a}){const o=ee(),n=K.useRef(e);n.current=e;const d=Is({extensions:[...js(),Rs.configure({placeholder:o("sandbox.postEditor.legacyContentPlaceholder")})],content:l,editorProps:{attributes:{class:Be(Js)}},onUpdate:({editor:i})=>{n.current(bs(i.getHTML()))}}),c=$t({decofile:s,sandboxRef:a});return d?t.jsxs("div",{className:"rounded-[var(--studio-surface-radius,var(--radius-md))] border shadow-edge border-input",children:[t.jsx(Ht,{editor:d,fontSize:Qs,linkSources:c,extras:t.jsx(eo,{editor:d,virtualMcpId:a?.virtualMcpId})}),t.jsx(Os,{editor:d,className:Be("max-h-[70vh] overflow-y-auto",Zs)})]}):null}function oo(l){return Array.isArray(l)?l.map(e=>({key:B(e?.key),value:B(e?.value)})):[]}function io({orgSlug:l,virtualMcpId:e,branch:s,blockKey:a,block:o,decofile:n,meta:d,previewBaseUrl:c,move:i,onClose:m,expanded:g,onToggleExpand:x,onDeleted:h}){const r=ee(),u=Et()?.taskId??null,p=_s({orgSlug:l,virtualMcpId:e,branch:s},{holdsCopy:!0}),f=Es({orgSlug:l,virtualMcpId:e,branch:s}),S=qs(e,s),C=S.kind==="protocol"&&S.source==="github",w=Ps({orgSlug:l,virtualMcpId:e,branch:s}),N=ks().length>0,q=vs(),j=ys(e),_=Ts({orgSlug:l,virtualMcpId:e,branch:s}),k=es(o,"posts"),P=v=>{const X=p.shown(v);return X?{[v]:X}:{}},[b,E,T,A]=Ls(k,v=>{p.mutate({blockKey:a,data:ts(a,ss(v))})},{isSaving:p.isPending,onSeed:()=>p.hold(a)}),[F,z]=K.useState(a);F!==a&&(z(a),T(k));const M=v=>{T(b),i.apply(a,v,b,()=>P(a))},D=(v,X)=>E({...b,[v]:X}),U=Kt("posts",d,Jt),R=Wt({orgSlug:l,virtualMcpId:e,branch:s},n),Q=R.save,[H,V]=K.useState(0),I=gs({decofile:n,post:b,previewBaseUrl:c,draftPointer:_,meta:d}),G=os(n,"posts",a,B(b.title)),J=is(b),[W,$]=K.useState(!1),Y=async()=>{T(b);try{const v=await f.mutateAsync({blockKey:a,shown:()=>p.shown(a)});if($(!1),Ns(v))return;we.success(r("sandbox.postEditor.deletePostSuccess",{title:B(b.title)})),h?.(),m?.()}catch(v){we.error(v instanceof Error?v.message:r("sandbox.postEditor.deletePostFailed"))}},O=ls(b),L=O.length>0,Z=O.length===1?r("sandbox.postEditor.missingFieldSingular",{fields:Ye(O,r)}):r("sandbox.postEditor.missingFieldPlural",{fields:Ye(O,r)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(zt,{isPending:p.isPending||R.isPending||A,isError:p.isError||R.isError}),L&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Oe,{size:14}),O.length," ",O.length===1?r("sandbox.postEditor.issueSingular"):r("sandbox.postEditor.issuePlural")]})}),t.jsx(Me,{side:"bottom",children:Z})]})]}),(x||m)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[x&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:x,title:r(g?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:g?t.jsx(Pt,{size:16}):t.jsx(Nt,{size:16})}),m&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:m,title:r("sandbox.postBoard.close"),children:t.jsx(Bt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(ms,{value:B(b.title),onChange:v=>D("title",v),placeholder:r("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),G&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(Ft,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(It,{children:[t.jsxs(Ge,{value:"content",children:[t.jsx(Tt,{}),r("sandbox.postEditor.contentTab")]}),t.jsxs(Ge,{value:"settings",children:[t.jsx(wt,{}),r("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[J&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx(Le,{type:"button",variant:"ghost-destructive",size:"sm",className:"px-2","aria-label":r("sandbox.postEditor.deletePost"),onClick:()=>$(!0),children:t.jsx(Dt,{size:14})})}),t.jsx(Me,{side:"bottom",children:r("sandbox.postEditor.deletePost")})]}),q&&!j&&t.jsx(Ks,{decofile:n,virtualMcpId:e,sections:Ie(b.sections),currentKey:a,meta:d,hasAi:N,onApply:v=>{D("sections",v),V(X=>X+1)}}),m&&t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:!I,title:r(I?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{I&&window.open(I,"_blank","noopener,noreferrer")},children:[t.jsx(ut,{size:14}),r("sandbox.postEditor.seePreview")]})]})]}),t.jsx(We,{value:"content",children:j?t.jsxs("div",{className:"space-y-3",children:[Ie(b.sections).length>0&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.legacySectionsNotice",{count:Ie(b.sections).length})]}),t.jsx(so,{value:B(b.content),onChange:v=>D("content",v),decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u}})]}):t.jsx("div",{className:"surface p-8",children:t.jsx(Mt,{value:Ie(b.sections),onChange:v=>D("sections",v),meta:d,decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},previewBaseUrl:c,onSaveReferencedBlock:Q,emptyMessage:r("sandbox.postEditor.noContentYet")},H)})}),t.jsx(We,{value:"settings",children:t.jsxs("div",{className:"surface p-6",children:[t.jsx(ao,{post:b,decofile:n,onChange:D,blockKey:a,move:i,onMoveStatus:M}),t.jsx(Qt,{schema:U,value:b,onChange:E,basePath:"post",meta:d,decofile:n,sandbox:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},onSaveReferencedBlock:Q})]})})]})]})}),t.jsx(ft,{open:W,onOpenChange:v=>{!v&&!f.isPending&&$(!1)},children:t.jsxs(xt,{children:[t.jsxs(ht,{children:[t.jsx(gt,{children:r("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(bt,{children:r(Ss("post",C,{neverPublished:w(a)}),{title:B(b.title)||r("sandbox.postBoard.untitled")})})]}),t.jsxs(jt,{children:[t.jsx(vt,{disabled:f.isPending,children:r("sandbox.postEditor.deletePostCancel")}),t.jsx(yt,{onClick:v=>{v.preventDefault(),Y()},disabled:f.isPending,className:Be(kt({variant:"destructive"})),children:f.isPending?t.jsxs(t.Fragment,{children:[t.jsx(St,{className:"size-3.5"}),r("sandbox.postEditor.deletingPost")]}):r("sandbox.postEditor.deletePost")})]})]})})]})}function lo(l){const e=se.c(15),{blockKey:s,post:a,move:o,onMoveStatus:n}=l,d=ee();let c;e[0]!==a?(c=Ze(a),e[0]=a,e[1]=c):c=e[1];const i=c;let m,g;if(e[2]!==s||e[3]!==i||e[4]!==o||e[5]!==n||e[6]!==a||e[7]!==d){let h;e[10]!==i?(h=u=>u!=="generating"||i==="generating",e[10]=i,e[11]=h):h=e[11];const r=ds.filter(h);m="flex flex-wrap gap-1.5",g=r.map(u=>{const p=u===i,f=p?null:o.refuse(s,u,a);return t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!f,"aria-pressed":p,onClick:()=>n(u),className:Be("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",p?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-accent",f&&"cursor-not-allowed opacity-50"),children:d(fs[u])})})}),f&&t.jsx(Me,{side:"bottom",children:o.reasonText(f)})]},u)}),e[2]=s,e[3]=i,e[4]=o,e[5]=n,e[6]=a,e[7]=d,e[8]=m,e[9]=g}else m=e[8],g=e[9];let x;return e[12]!==m||e[13]!==g?(x=t.jsx("div",{className:m,children:g}),e[12]=m,e[13]=g,e[14]=x):x=e[14],x}function ao(l){const e=se.c(166),{post:s,decofile:a,onChange:o,blockKey:n,move:d,onMoveStatus:c}=l,i=ee();let m;e[0]!==s?(m=Ze(s),e[0]=s,e[1]=m):m=e[1];const x=m==="scheduled";let h;e[2]!==s.slug?(h=B(s.slug),e[2]=s.slug,e[3]=h):h=e[3];const r=h,[u,p]=K.useState(r),[f,S]=K.useState(null),[C,w]=K.useState(r);C!==r&&(w(r),p(r));let N;e[4]!==n||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==u||e[9]!==i?(N=()=>{const y=ns(u);if(p(y),y===r)return;if(!y){S(null),o("slug","");return}const He=Xe(a,"posts").filter(ot=>ot.key!==n).map(co).filter(Boolean);if(!He.includes(y)){S(null),o("slug",y);return}const ze=rs(y,He),Ve=i("sandbox.postEditor.slugDeduped",{slug:ze});p(ze),S(Ve),we.info(Ve),o("slug",ze)},e[4]=n,e[5]=r,e[6]=a,e[7]=o,e[8]=u,e[9]=i,e[10]=N):N=e[10];const q=N;let j;e[11]!==i?(j=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=j):j=e[12];let _;e[13]!==j?(_=t.jsx(te,{children:j}),e[13]=j,e[14]=_):_=e[14];let k;e[15]!==n||e[16]!==d||e[17]!==c||e[18]!==s?(k=t.jsx(lo,{blockKey:n,post:s,move:d,onMoveStatus:c}),e[15]=n,e[16]=d,e[17]=c,e[18]=s,e[19]=k):k=e[19];let P;e[20]!==_||e[21]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[_,k]}),e[20]=_,e[21]=k,e[22]=P):P=e[22];let b;e[23]!==x||e[24]!==o||e[25]!==s.scheduledDatetime||e[26]!==i?(b=x&&t.jsx(Re,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:B(s.scheduledDatetime),onChange:y=>o("scheduledDatetime",y),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=x,e[24]=o,e[25]=s.scheduledDatetime,e[26]=i,e[27]=b):b=e[27];let E;e[28]!==P||e[29]!==b?(E=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[P,b]}),e[28]=P,e[29]=b,e[30]=E):E=e[30];let T;e[31]!==i?(T=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=T):T=e[32];let A;e[33]!==T?(A=t.jsx(te,{htmlFor:"post-excerpt",children:T}),e[33]=T,e[34]=A):A=e[34];let F;e[35]!==s.excerpt?(F=B(s.excerpt),e[35]=s.excerpt,e[36]=F):F=e[36];let z;e[37]!==o?(z=y=>o("excerpt",y.target.value),e[37]=o,e[38]=z):z=e[38];let M;e[39]!==F||e[40]!==z?(M=t.jsx(Je,{id:"post-excerpt",value:F,onChange:z,rows:2}),e[39]=F,e[40]=z,e[41]=M):M=e[41];let D;e[42]!==A||e[43]!==M?(D=t.jsxs("div",{className:"space-y-2",children:[A,M]}),e[42]=A,e[43]=M,e[44]=D):D=e[44];let U;e[45]!==i?(U=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=U):U=e[46];let R;e[47]!==U?(R=t.jsx(te,{htmlFor:"post-slug",children:U}),e[47]=U,e[48]=R):R=e[48];let Q;e[49]===Symbol.for("react.memo_cache_sentinel")?(Q=y=>{S(null),p(cs(y.target.value))},e[49]=Q):Q=e[49];let H;e[50]!==i?(H=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=H):H=e[51];let V;e[52]!==q||e[53]!==u||e[54]!==H?(V=t.jsx(Ae,{id:"post-slug",value:u,onChange:Q,onBlur:q,placeholder:H,maxLength:80,className:"h-10"}),e[52]=q,e[53]=u,e[54]=H,e[55]=V):V=e[55];let I;e[56]!==f?(I=f&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),f]}),e[56]=f,e[57]=I):I=e[57];let G;e[58]!==R||e[59]!==V||e[60]!==I?(G=t.jsxs("div",{className:"space-y-2",children:[R,V,I]}),e[58]=R,e[59]=V,e[60]=I,e[61]=G):G=e[61];let J;e[62]!==i?(J=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=J):J=e[63];let W;e[64]!==J?(W={type:"string",format:"date",title:J},e[64]=J,e[65]=W):W=e[65];let $;e[66]!==s.date?($=B(s.date),e[66]=s.date,e[67]=$):$=e[67];let Y;e[68]!==o?(Y=y=>o("date",y),e[68]=o,e[69]=Y):Y=e[69];let O;e[70]!==i?(O=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=O):O=e[71];let L;e[72]!==W||e[73]!==$||e[74]!==Y||e[75]!==O?(L=t.jsx(Re,{schema:W,value:$,onChange:Y,path:"post-date",label:O}),e[72]=W,e[73]=$,e[74]=Y,e[75]=O,e[76]=L):L=e[76];let Z;e[77]!==i?(Z=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=Z):Z=e[78];let v;e[79]!==Z?(v={type:"integer",title:Z},e[79]=Z,e[80]=v):v=e[80];const X=typeof s.readTime=="number"?s.readTime:void 0;let oe;e[81]!==o?(oe=y=>o("readTime",y),e[81]=o,e[82]=oe):oe=e[82];let ie;e[83]!==i?(ie=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=ie):ie=e[84];let le;e[85]!==v||e[86]!==X||e[87]!==oe||e[88]!==ie?(le=t.jsx(Yt,{schema:v,value:X,onChange:oe,path:"post-read-time",label:ie}),e[85]=v,e[86]=X,e[87]=oe,e[88]=ie,e[89]=le):le=e[89];let ae;e[90]!==G||e[91]!==L||e[92]!==le?(ae=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[G,L,le]}),e[90]=G,e[91]=L,e[92]=le,e[93]=ae):ae=e[93];const tt=s.image,st=s.mobileImage;let ne,re;e[94]!==o?(ne=y=>o("image",y),re=y=>o("mobileImage",y),e[94]=o,e[95]=ne,e[96]=re):(ne=e[95],re=e[96]);let ce;e[97]!==s.alt?(ce=B(s.alt),e[97]=s.alt,e[98]=ce):ce=e[98];let de;e[99]!==i?(de=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=de):de=e[100];let me;e[101]!==s.image||e[102]!==s.mobileImage||e[103]!==ne||e[104]!==re||e[105]!==ce||e[106]!==de?(me=t.jsx(Ut,{value:tt,mobileValue:st,onChange:ne,onMobileChange:re,alt:ce,label:de}),e[101]=s.image,e[102]=s.mobileImage,e[103]=ne,e[104]=re,e[105]=ce,e[106]=de,e[107]=me):me=e[107];let pe;e[108]!==i?(pe=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=pe):pe=e[109];let ue;e[110]!==i?(ue=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=ue):ue=e[111];let fe;e[112]!==pe||e[113]!==ue?(fe={type:"string",title:pe,description:ue},e[112]=pe,e[113]=ue,e[114]=fe):fe=e[114];let xe;e[115]!==s.alt?(xe=B(s.alt),e[115]=s.alt,e[116]=xe):xe=e[116];let he;e[117]!==o?(he=y=>o("alt",y),e[117]=o,e[118]=he):he=e[118];let ge;e[119]!==i?(ge=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=ge):ge=e[120];let be;e[121]!==fe||e[122]!==xe||e[123]!==he||e[124]!==ge?(be=t.jsx(Re,{schema:fe,value:xe,onChange:he,path:"post-alt",label:ge}),e[121]=fe,e[122]=xe,e[123]=he,e[124]=ge,e[125]=be):be=e[125];let je;e[126]!==me||e[127]!==be?(je=t.jsxs("div",{className:"space-y-2",children:[me,be]}),e[126]=me,e[127]=be,e[128]=je):je=e[128];let ve;e[129]!==i?(ve=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=ve):ve=e[130];let ye;e[131]!==o?(ye=y=>o("authors",y),e[131]=o,e[132]=ye):ye=e[132];let Se;e[133]!==a||e[134]!==s.authors||e[135]!==ve||e[136]!==ye?(Se=t.jsx(Qe,{label:ve,decofile:a,kind:"authors",valueField:"email",toRef:ro,selected:s.authors,onChange:ye}),e[133]=a,e[134]=s.authors,e[135]=ve,e[136]=ye,e[137]=Se):Se=e[137];let ke;e[138]!==i?(ke=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=ke):ke=e[139];let Ee;e[140]!==o?(Ee=y=>o("categories",y),e[140]=o,e[141]=Ee):Ee=e[141];let Ce;e[142]!==a||e[143]!==s.categories||e[144]!==ke||e[145]!==Ee?(Ce=t.jsx(Qe,{label:ke,decofile:a,kind:"categories",valueField:"slug",toRef:no,selected:s.categories,onChange:Ee}),e[142]=a,e[143]=s.categories,e[144]=ke,e[145]=Ee,e[146]=Ce):Ce=e[146];let _e;e[147]!==o?(_e=y=>o("extraProps",y),e[147]=o,e[148]=_e):_e=e[148];let Pe;e[149]!==s.extraProps||e[150]!==_e?(Pe=t.jsx(po,{value:s.extraProps,onChange:_e}),e[149]=s.extraProps,e[150]=_e,e[151]=Pe):Pe=e[151];let Ne;e[152]!==o?(Ne=y=>o("seo",y),e[152]=o,e[153]=Ne):Ne=e[153];let Te;e[154]!==s.seo||e[155]!==Ne?(Te=t.jsx(mo,{value:s.seo,onChange:Ne}),e[154]=s.seo,e[155]=Ne,e[156]=Te):Te=e[156];let Fe;return e[157]!==D||e[158]!==ae||e[159]!==je||e[160]!==Se||e[161]!==Ce||e[162]!==Pe||e[163]!==Te||e[164]!==E?(Fe=t.jsxs("div",{className:"space-y-5",children:[E,D,ae,je,Se,Ce,Pe,Te]}),e[157]=D,e[158]=ae,e[159]=je,e[160]=Se,e[161]=Ce,e[162]=Pe,e[163]=Te,e[164]=E,e[165]=Fe):Fe=e[165],Fe}function no(l){return{name:B(l.name),slug:B(l.slug)}}function ro(l){return{...l}}function co(l){return B(l.payload.slug)}function mo(l){const e=se.c(93),{value:s,onChange:a}=l,o=ee();let n;e[0]!==s?(n=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=n):n=e[1];const d=n;let c;e[2]!==a||e[3]!==d?(c=(L,Z)=>a({...d,[L]:Z}),e[2]=a,e[3]=d,e[4]=c):c=e[4];const i=c;let m;e[5]!==o?(m=o("sandbox.postEditor.seoSectionLabel"),e[5]=o,e[6]=m):m=e[6];let g;e[7]!==m?(g=t.jsx("p",{className:"text-sm font-medium",children:m}),e[7]=m,e[8]=g):g=e[8];let x;e[9]!==o?(x=o("sandbox.postEditor.seoSectionHint"),e[9]=o,e[10]=x):x=e[10];let h;e[11]!==x?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[11]=x,e[12]=h):h=e[12];let r;e[13]!==g||e[14]!==h?(r=t.jsxs("div",{className:"space-y-1",children:[g,h]}),e[13]=g,e[14]=h,e[15]=r):r=e[15];let u;e[16]!==o?(u=o("sandbox.postEditor.seoTitleLabel"),e[16]=o,e[17]=u):u=e[17];let p;e[18]!==u?(p=t.jsx(te,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=p):p=e[19];let f;e[20]!==d.title?(f=B(d.title),e[20]=d.title,e[21]=f):f=e[21];let S;e[22]!==i?(S=L=>i("title",L.target.value),e[22]=i,e[23]=S):S=e[23];let C;e[24]!==f||e[25]!==S?(C=t.jsx(Ae,{id:"post-seo-title",value:f,onChange:S,className:"h-10"}),e[24]=f,e[25]=S,e[26]=C):C=e[26];let w;e[27]!==C||e[28]!==p?(w=t.jsxs("div",{className:"space-y-2",children:[p,C]}),e[27]=C,e[28]=p,e[29]=w):w=e[29];let N;e[30]!==o?(N=o("sandbox.postEditor.seoDescriptionLabel"),e[30]=o,e[31]=N):N=e[31];let q;e[32]!==N?(q=t.jsx(te,{htmlFor:"post-seo-description",children:N}),e[32]=N,e[33]=q):q=e[33];let j;e[34]!==d.description?(j=B(d.description),e[34]=d.description,e[35]=j):j=e[35];let _;e[36]!==i?(_=L=>i("description",L.target.value),e[36]=i,e[37]=_):_=e[37];let k;e[38]!==j||e[39]!==_?(k=t.jsx(Je,{id:"post-seo-description",value:j,onChange:_,rows:2}),e[38]=j,e[39]=_,e[40]=k):k=e[40];let P;e[41]!==q||e[42]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[q,k]}),e[41]=q,e[42]=k,e[43]=P):P=e[43];let b;e[44]!==o?(b=o("sandbox.postEditor.seoImageLabel"),e[44]=o,e[45]=b):b=e[45];let E;e[46]!==b?(E={type:"string",format:"image-uri",title:b},e[46]=b,e[47]=E):E=e[47];const T=d.image;let A;e[48]!==i?(A=L=>i("image",L),e[48]=i,e[49]=A):A=e[49];let F;e[50]!==o?(F=o("sandbox.postEditor.seoImageLabel"),e[50]=o,e[51]=F):F=e[51];let z;e[52]!==d.image||e[53]!==E||e[54]!==A||e[55]!==F?(z=t.jsx(Rt,{schema:E,value:T,onChange:A,path:"post-seo-image",label:F}),e[52]=d.image,e[53]=E,e[54]=A,e[55]=F,e[56]=z):z=e[56];let M;e[57]!==o?(M=o("sandbox.postEditor.seoCanonicalLabel"),e[57]=o,e[58]=M):M=e[58];let D;e[59]!==M?(D=t.jsx(te,{htmlFor:"post-seo-canonical",children:M}),e[59]=M,e[60]=D):D=e[60];let U;e[61]!==d.canonical?(U=B(d.canonical),e[61]=d.canonical,e[62]=U):U=e[62];let R;e[63]!==i?(R=L=>i("canonical",L.target.value),e[63]=i,e[64]=R):R=e[64];let Q;e[65]!==o?(Q=o("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=o,e[66]=Q):Q=e[66];let H;e[67]!==U||e[68]!==R||e[69]!==Q?(H=t.jsx(Ae,{id:"post-seo-canonical",value:U,onChange:R,placeholder:Q,className:"h-10"}),e[67]=U,e[68]=R,e[69]=Q,e[70]=H):H=e[70];let V;e[71]!==D||e[72]!==H?(V=t.jsxs("div",{className:"space-y-2",children:[D,H]}),e[71]=D,e[72]=H,e[73]=V):V=e[73];let I;e[74]!==o?(I=o("sandbox.postEditor.seoNoIndexingLabel"),e[74]=o,e[75]=I):I=e[75];let G;e[76]!==I?(G=t.jsx(te,{htmlFor:"post-seo-no-indexing",children:I}),e[76]=I,e[77]=G):G=e[77];const J=d.noIndexing===!0;let W;e[78]!==i?(W=L=>i("noIndexing",L),e[78]=i,e[79]=W):W=e[79];let $;e[80]!==J||e[81]!==W?($=t.jsx(Ot,{id:"post-seo-no-indexing",checked:J,onCheckedChange:W}),e[80]=J,e[81]=W,e[82]=$):$=e[82];let Y;e[83]!==G||e[84]!==$?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[G,$]}),e[83]=G,e[84]=$,e[85]=Y):Y=e[85];let O;return e[86]!==w||e[87]!==P||e[88]!==z||e[89]!==V||e[90]!==Y||e[91]!==r?(O=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[r,w,P,z,V,Y]}),e[86]=w,e[87]=P,e[88]=z,e[89]=V,e[90]=Y,e[91]=r,e[92]=O):O=e[92],O}function po(l){const e=se.c(24),{value:s,onChange:a}=l,o=ee();let n,d,c,i;if(e[0]!==a||e[1]!==o||e[2]!==s){n=oo(s);const r=(p,f)=>a(n.map((S,C)=>C===p?{...S,...f}:S));d="space-y-2";let u;e[7]!==o?(u=o("sandbox.postEditor.extraPropsLabel"),e[7]=o,e[8]=u):u=e[8],e[9]!==u?(c=t.jsx(te,{children:u}),e[9]=u,e[10]=c):c=e[10],i=n.length>0&&t.jsx("ul",{className:"space-y-2",children:n.map((p,f)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(Ae,{value:p.key,onChange:S=>r(f,{key:S.target.value}),placeholder:o("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(Ae,{value:p.value,onChange:S=>r(f,{value:S.target.value}),placeholder:o("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(ps,{label:o("sandbox.postEditor.removePropLabel"),onClick:()=>a(n.filter((S,C)=>C!==f))})]},f))}),e[0]=a,e[1]=o,e[2]=s,e[3]=n,e[4]=d,e[5]=c,e[6]=i}else n=e[3],d=e[4],c=e[5],i=e[6];let m;e[11]!==o?(m=o("sandbox.postEditor.addPropLabel"),e[11]=o,e[12]=m):m=e[12];let g;e[13]!==n||e[14]!==a?(g=()=>a([...n,{key:"",value:""}]),e[13]=n,e[14]=a,e[15]=g):g=e[15];let x;e[16]!==m||e[17]!==g?(x=t.jsx(us,{label:m,onClick:g}),e[16]=m,e[17]=g,e[18]=x):x=e[18];let h;return e[19]!==d||e[20]!==c||e[21]!==i||e[22]!==x?(h=t.jsxs("div",{className:d,children:[c,i,x]}),e[19]=d,e[20]=c,e[21]=i,e[22]=x,e[23]=h):h=e[23],h}function Qe(l){const e=se.c(24),{label:s,decofile:a,kind:o,valueField:n,toRef:d,selected:c,onChange:i}=l,m=ee();let g;e[0]!==a||e[1]!==o||e[2]!==c||e[3]!==d||e[4]!==n?(g=as({records:Xe(a,o),selected:c,valueField:n,toRef:d}),e[0]=a,e[1]=o,e[2]=c,e[3]=d,e[4]=n,e[5]=g):g=e[5];const{options:x,selectedValues:h,refsForValues:r}=g;let u;e[6]!==o||e[7]!==m?(u=m(o==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=o,e[7]=m,e[8]=u):u=e[8];const p=u;let f;e[9]!==o||e[10]!==m?(f=m(o==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=o,e[10]=m,e[11]=f):f=e[11];const S=f;let C;e[12]!==s?(C=t.jsx(te,{children:s}),e[12]=s,e[13]=C):C=e[13];let w;e[14]!==p||e[15]!==i||e[16]!==x||e[17]!==r||e[18]!==S||e[19]!==h?(w=x.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:p}):t.jsx(At,{options:x,defaultValue:h,onValueChange:q=>i(r(q)),placeholder:S,maxCount:4}),e[14]=p,e[15]=i,e[16]=x,e[17]=r,e[18]=S,e[19]=h,e[20]=w):w=e[20];let N;return e[21]!==C||e[22]!==w?(N=t.jsxs("div",{className:"space-y-2",children:[C,w]}),e[21]=C,e[22]=w,e[23]=N):N=e[23],N}function ha(l){const e=se.c(10),s=l.block!==void 0;let a;e[0]!==l?(a=t.jsx(io,{...l}),e[0]=l,e[1]=a):a=e[1];let o;return e[2]!==l.blockKey||e[3]!==l.branch||e[4]!==l.decofile||e[5]!==l.orgSlug||e[6]!==l.virtualMcpId||e[7]!==s||e[8]!==a?(o=t.jsx(Gt,{listing:l.decofile,orgSlug:l.orgSlug,virtualMcpId:l.virtualMcpId,branch:l.branch,blockKey:l.blockKey,present:s,children:a}),e[2]=l.blockKey,e[3]=l.branch,e[4]=l.decofile,e[5]=l.orgSlug,e[6]=l.virtualMcpId,e[7]=s,e[8]=a,e[9]=o):o=e[9],o}export{ha as PostEditor};
|
|
1
|
+
import{b as ee,am as it,r as K,j as t,B as Le,D as lt,v as at,w as nt,x as rt,aU as ct,aY as dt,m as Be,y as mt,t as we,c as se,bu as pt,a9 as ut,aP as ft,aO as xt,aL as ht,aJ as gt,aK as bt,aN as jt,aM as vt,b9 as yt,h as St,ba as kt,I as Ae}from"./index-CUTEHf7n.js";import{u as Et}from"./chat-context-3o15fH-n.js";import{i as Oe}from"./AlertCircle-B4BiejsA.js";import{aF as Ct,bC as _t,_ as Pt,ao as Nt}from"./agent-icon-y2SKybSP.js";import{e as Tt}from"./UserSquare-D0WQA2_a.js";import{i as Lt,a as wt}from"./UserCheck01-CjBhJIbn.js";import{s as Dt}from"./Trash01-Bi3fjf_i.js";import{s as Bt}from"./XClose-CUoBDo4j.js";import{L as te}from"./label-qad8ROdP.js";import{M as At}from"./multi-select-C_FYq5kZ.js";import{b as Ft,a as It,T as Ge,c as We}from"./tabs-DEsdaVKa.js";import{S as Ot}from"./switch-CQr_229Y.js";import{T as Je}from"./textarea-J2V-aUg9.js";import{S as zt,I as Rt}from"./save-status-Cgw9Hlp4.js";import{u as $t,I as qt,a as Ie,B as Mt,R as Ut}from"./block-document-dwVjY8ei.js";import{R as Ht,e as Vt,H as Gt,u as Wt,f as Re,N as Yt}from"./held-block-view-D9gMtmL4.js";import{b as Kt,C as Qt,K as Jt}from"./blog-schema-C2rs0u9l.js";import{a6 as Zt,N as Xt,a as es,d as ts,f as ss,a7 as os,a8 as is,a9 as ls,m as Ye,p as Ze,aa as as,I as Xe,a3 as ns,a2 as rs,ab as cs,Q as ds}from"./category-tree-k_En3Ghr.js";import{s as B,E as ms,R as ps,A as us,a as fs}from"./primitives-Dq7WtxY4.js";import{c as $e,T as qe,a as Me}from"./tooltip-BtQY7me6.js";import{f as xs,d as hs,b as gs}from"./blog-preview-url-BxEndwKO.js";import{e as bs,f as js,g as Ke,u as vs,a as ys,d as Ss}from"./delete-copy-B6vUu2FZ.js";import{u as ks}from"./use-ai-providers-Dya2oYuM.js";import{u as Es}from"./use-delete-block-CtnkMpgb.js";import{F as Cs,u as _s,a as Ps,k as Ns}from"./use-never-published-Ch6taPxS.js";import{u as Ts}from"./use-fast-preview-draft-url-CY0fb2LM.js";import{u as Ls}from"./use-autosave-Dg5clSHS.js";import{b as ws}from"./repository-binding-DyxjotEQ.js";import{u as Ds}from"./use-file-configs-BiSZZuuf.js";import{m as Bs}from"./match-site-slug-config-B47_xZCi.js";import{a as As}from"./Image01-ChEwjYSJ.js";import{e as Fs}from"./Tool01-B97c8idL.js";import{a as Is,E as Os,u as zs}from"./usage-stats-DJ1VHc0T.js";import{s as Rs}from"./suggestion-7L8A3fQy.js";import{E as $s,T as Ue}from"./editor-classes-BO4PtG02.js";import{u as qs}from"./site-editor-toast-BCn8hYHZ.js";import"./use-panel-navigate-Dcxy731-.js";import"./thread-route-hABZCF2d.js";import"./use-project-scope-3Q37Eln5.js";import"./use-view-draft-kind-DECgwRep.js";import"./use-blog-view-CpUCE6TS.js";import"./use-organization-settings-C-YWM0uD.js";import"./schema-AdvpV9XD.js";import"./task-board-ZELaPSpv.js";import"./thread-intent-C-4a46Zs.js";import"./use-mcp-client-BVU34o8K.js";import"./auth-D7Uu7n_e.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BqAScN4r.js";import"./session-runtime-DRkG9ReZ.js";import"./use-entitlements-DH1D5a0L.js";import"./use-current-view-SFKgOLYn.js";import"./use-in-settings-Dv_cwy92.js";import"./use-decopilot-events-B93IJnco.js";import"./use-org-fs-CYycA4iA.js";import"./useInfiniteQuery-Dmz76p-1.js";import"./infiniteQueryObserver-DN-l8Mqm.js";import"./ArrowUp-C2dE69W7.js";import"./ArrowLeft-DpoZP_fX.js";import"./ArrowRight-waHzto0g.js";import"./BookOpen01-Det9naRR.js";import"./Globe04-YQZG_Qbl.js";import"./CheckCircle-BNEuJPHU.js";import"./ChevronDown-_sr4up4D.js";import"./ChevronSelectorVertical-Ddl6sDao.js";import"./ChevronUp-CK7Ad_mD.js";import"./LinkBroken01-jFeLEleD.js";import"./CreditCard01-DaUYIK4F.js";import"./File02-Dj9EXPDT.js";import"./MessageCircle01-Cf5Qa_r1.js";import"./SwitchHorizontal01-CgqtVqHH.js";import"./Eye-CYtkFg_6.js";import"./Fingerprint04-kauf3nbZ.js";import"./Key01-DPAOwUET.js";import"./LayoutLeft-DUieRSDJ.js";import"./Minus-DVAnrb98.js";import"./Monitor01-D5to20Na.js";import"./Sun-D2fDzKM6.js";import"./Play-DBG3GXxW.js";import"./Plus-BEFFoW2D.js";import"./SearchMd-BVX4smTx.js";import"./ShoppingBag01-Bvm3sWvz.js";import"./Upload01-B0N1cyeo.js";import"./Users01-CNLWTh0g.js";import"./Zap-D5Q1SF5c.js";import"./badge-CdntSWLw.js";import"./checkbox-DG0VRyZt.js";import"./command-BvXS_hwC.js";import"./index-dYHd0KJA.js";import"./popover-t4wJ-TtS.js";import"./active-indicator-CCMhAsc_.js";import"./toggle-group-BSy9ppTS.js";import"./asset-utils-BDk7TImr.js";import"./task-key-ChxtLgH2.js";import"./sortable.esm-Dv7GaG48.js";import"./product-picker-dialog-DkguIJb9.js";import"./index-C75j3Sf-.js";import"./index-Dc3vpBAe.js";import"./blocks-tab-states-clMxtmY8.js";import"./sandbox-url-D3mC8qhT.js";import"./use-voice-input-Ta8CFXyw.js";import"./drawer-Co6CTMtJ.js";import"./use-mobile-LSpSJcPd.js";import"./index-B26-jaFe.js";import"./select-CXHAcNGT.js";import"./index-BdQq_4o_.js";import"./index-C08yFDSB.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./empty-state-BfnU_rAm.js";import"./utils-VRJjHnOC.js";import"./calendar-CQCK8RMi.js";import"./section-array-field-ZEOag6le.js";import"./named-rule-step-D4anrrdN.js";import"./slider-BdrBFFmy.js";import"./index-CGuDb95W.js";import"./tooltipContext-BbkLIEo5.js";import"./CategoricalChart-D9Euwg-G.js";import"./index-CnTDG57D.js";import"./combobox-CH-LlA2d.js";import"./scroll-area-CRlFqWco.js";import"./hosted-reconcile-Dgr_RAK2.js";import"./collapsible-CUOhSps5.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-B6XGEO8o.js";import"./use-copy-DPZUA7Gr.js";import"./use-task-board-items-BFsmDyZa.js";import"./config-Bn2m6WJs.js";import"./task-route-hUi3-h4J.js";import"./project-index-CbwxAZlc.js";import"./utils-CVEq3hMx.js";import"./shell-layout-bVoP9kOD.js";import"./use-deployment-admin-DYC3wY2X.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-B0u21Cu1.js";import"./integration-icon-BRVzdEXf.js";import"./project-icon-4S0TtqeC.js";import"./use-navigate-to-agent-fspVUy0_.js";import"./use-debounced-value-C75ZQTZG.js";import"./new-project-dialog-CVc657qA.js";import"./repository-picker-Diifpqm3.js";import"./github-icon-QoDNyjsW.js";import"./collection-search-gjXSkcT8.js";import"./new-project-store-ehAJK4hL.js";import"./legacy-admin-welcome-dialog-CXj5rtpz.js";import"./required-auth-layout-CVH6Kpuo.js";import"./use-org-sso-DZUFYVRN.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DrwYcKK7.js";import"./types-B29zOSVo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./gateway-client-D6U4MBNC.js";import"./markdown-BhLg-Zjp.js";import"./sheet-DwYwF5Xe.js";import"./use-connection-BAk2dsuv.js";import"./use-mcp-prompts-CCB1WHsd.js";import"./use-thread-outputs-DYau24LH.js";import"./file-type-icon-zloL09QV.js";import"./use-move-blocks-C_L5dYiU.js";import"./sandbox-git-api-BHkz0_nl.js";import"./search-input-DaJb5UpE.js";import"./form-CDXejFhy.js";import"./content-changes-Dwsp4uvc.js";import"./use-sandbox-events-p6STSWE5.js";import"./use-blocks-v8-project-ovX-kkwX.js";const De=l=>typeof l=="string"?l:"",Ms={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"};function et(l){const e=[];let s=0,a=!1;for(;s<l.length;){if(l[s]==="<"){const c=l.indexOf(">",s);s=c<0?l.length:c+1;continue}let o=l[s]??"",n=s+1;if(l[s]==="&"){const c=l.indexOf(";",s);if(c>=0&&c-s<=10){const i=Ms[l.slice(s,c+1).toLowerCase()];i!==void 0&&(o=i,n=c+1)}}const d=s;if(s=n,/\s/.test(o)){if(a){const c=e[e.length-1];c&&(c.end=n);continue}e.push({ch:" ",start:d,end:n}),a=!0}else e.push({ch:o,start:d,end:n}),a=!1}return{text:e.map(o=>o.ch).join(""),chars:e}}function Us(l){return et(l).text.trim()}function Hs(l){const e=[];for(const s of l)switch(Zt(De(s.__resolveType))){case"Paragraph":e.push(Us(De(s.html)));break;case"Heading":e.push(De(s.text));break;case"Quote":e.push(De(s.quote));break;case"List":e.push(De(s.items));break}return e.filter(Boolean).join(`
|
|
2
|
+
`)}function Vs(l){return l.replace(/&/g,"&").replace(/"/g,""")}function Gs(l,e){const s=l.slice(0,e);return s.lastIndexOf("<a")>s.lastIndexOf("</a")}function Ws(l,e,s){const a=e.trim();if(!a||!s)return{blocks:l,applied:!1};for(let o=0;o<l.length;o++){const n=l[o];if(!n||typeof n.html!="string")continue;const d=n.html,{text:c,chars:i}=et(d);let m=c.indexOf(a);for(;m>=0;){const g=i[m],x=i[m+a.length-1];if(g&&x){const h=g.start,r=x.end,u=d.slice(h,r);if(!u.includes("<")&&!Gs(d,h)){const p=d.slice(0,h)+`<a href="${Vs(s)}">${u}</a>`+d.slice(r),f=l.slice();return f[o]={...n,html:p},{blocks:f,applied:!0}}}m=c.indexOf(a,m+1)}}return{blocks:l,applied:!1}}function Ys(l,e){let s=l,a=0;for(const o of e){const n=Ws(s,o.quote,o.href);n.applied&&(s=n.blocks,a++)}return{blocks:s,applied:a}}function Ks({virtualMcpId:l,decofile:e,sections:s,currentKey:a,meta:o,hasAi:n,onApply:d}){const c=ee(),i=it(),[m,g]=K.useState(!1),[x,h]=K.useState(!1),[r,u]=K.useState([]),[p,f]=K.useState(new Set),S=xs(e,o),C=Xt(e).filter(j=>j.key!==a&&j.slug),w=async()=>{h(!0);try{const j=Hs(s),_=await i.call("BLOG_SITE_GROUND",{virtualMcpId:l,purpose:"link"}).catch(E=>{console.warn("[linkSuggest] grounding failed",E)}),k=await i.call("BLOG_LINK_SUGGEST",{virtualMcpId:l,body:j,posts:C.map(E=>({title:E.title,slug:E.slug})),grounding:_?{report:_.report,outcome:_.outcome}:void 0}),P=[],b=new Set;for(const E of k.suggestions){const T=C.find(z=>z.slug===E.slug);if(!T||!S)continue;const A=hs(S,{category:T.categorySlugs[0]??"",slug:T.slug});if(!A||!j.includes(E.quote))continue;const F=`${E.quote}→${T.slug}`;b.has(F)||(b.add(F),P.push({quote:E.quote,href:A,title:T.title}))}u(P),f(new Set(P.map((E,T)=>T))),g(!0),P.length===0&&we.info(c("sandbox.linkSuggest.none"))}catch(j){we.error(j instanceof Error?j.message:c("sandbox.linkSuggest.failed"))}finally{h(!1)}},N=j=>f(_=>{const k=new Set(_);return k.has(j)?k.delete(j):k.add(j),k}),q=()=>{const j=r.filter((P,b)=>p.has(b)).map(P=>({quote:P.quote,href:P.href})),{blocks:_,applied:k}=Ys(s,j);d(_),g(!1),we.success(c("sandbox.linkSuggest.applied",{count:String(k)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:x||!n||C.length===0,title:n?C.length===0?c("sandbox.linkSuggest.noCandidates"):c("sandbox.linkSuggest.hint"):c("sandbox.autonomous.noAiProvider"),onClick:()=>{w()},children:[x?t.jsx(Lt,{size:14,className:"animate-spin"}):t.jsx(Ct,{size:14}),c("sandbox.linkSuggest.button")]}),t.jsx(lt,{open:m,onOpenChange:g,children:t.jsxs(at,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(nt,{children:[t.jsx(rt,{children:c("sandbox.linkSuggest.title")}),t.jsx(ct,{children:c("sandbox.linkSuggest.description")})]}),r.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:c("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:r.map((j,_)=>{const k=p.has(_);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>N(_),"aria-pressed":k,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-accent",children:[t.jsx("span",{className:Be("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",k?"border-primary bg-primary text-primary-foreground":"border-input"),children:k&&t.jsx(dt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",j.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",j.title]})]})]})},`${j.quote}-${j.href}`)})}),t.jsx(mt,{children:t.jsx(Le,{type:"button",disabled:p.size===0,onClick:q,children:c("sandbox.linkSuggest.apply",{count:String(p.size)})})})]})})]})}const Qs={unit:"pt",initial:12,min:6,max:96},Js=["outline-none min-h-80 px-4 py-3 text-[15px] leading-relaxed text-foreground","[&>*:first-child]:mt-0 [&_p]:my-3","[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-3xl [&_h1]:font-bold","[&_h2]:mb-3 [&_h2]:mt-6 [&_h2]:text-2xl [&_h2]:font-bold","[&_h3]:mb-2 [&_h3]:mt-5 [&_h3]:text-xl [&_h3]:font-bold","[&_h4]:mb-2 [&_h4]:mt-4 [&_h4]:text-lg [&_h4]:font-bold","[&_h5]:mb-2 [&_h5]:mt-4 [&_h5]:text-base [&_h5]:font-bold","[&_h6]:mb-2 [&_h6]:mt-4 [&_h6]:text-sm [&_h6]:font-bold","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-6 [&_li>p]:my-1","[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm","[&_img]:inline-block [&_img]:h-auto [&_img]:max-w-full","[&_img.ProseMirror-selectednode]:outline-2 [&_img.ProseMirror-selectednode]:outline-primary","[&_table]:my-3 [&_table]:w-full [&_table]:border-collapse [&_td>p]:my-0 [&_th>p]:my-0","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2","[&_strong]:font-bold",$s],Zs=["[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none"];function Xs({editor:l,virtualMcpId:e}){const s=ws(e),a=Ds(),o=Bs(a.data?.configs??[],pt(s),s?.metadata?.assetStorageConfigId)?.id,n=ee(),[d,c]=K.useState(!1),[i,m]=K.useState(null),[g,x]=K.useState(null),h=p=>{l.chain().setImage({src:p}).run()},r=()=>{m(null),x(null)},u=()=>{const p=(i??"").trim(),f=Ke(p);if(!f&&p){x(p.toLowerCase().startsWith("data:")?n("sandbox.postEditor.legacyImageDataUrl"):n("sectionsEditor.imageField.unsafeUrl"));return}f&&h(f),r()};return t.jsxs("div",{className:"flex items-center gap-0.5",children:[t.jsx(Ue,{active:d,label:n("sandbox.postEditor.legacyInsertImage"),onClick:()=>c(!0),children:t.jsx(Fs,{size:14})}),t.jsx(Ue,{active:i!==null,label:n("sandbox.postEditor.legacyInsertImageUrl"),onClick:()=>i===null?m(""):u(),children:t.jsx(As,{size:14})}),i!==null&&t.jsx(qt,{draft:i,notice:g,label:n("sandbox.postEditor.legacyInsertImageUrl"),placeholder:n("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:p=>{x(null),m(p)},onCommit:u,onCancel:r}),t.jsx(Cs,{open:d,onOpenChange:c,mode:"image",lockedConfigId:o,onSelect:p=>{const f=Ke(p);f&&h(f)}})]})}function eo(l){const e=se.c(22),{editor:s,virtualMcpId:a}=l,o=ee(),[n,d]=K.useState(!1);let c;e[0]!==s?(c={editor:s,selector:to},e[0]=s,e[1]=c):c=e[1];const i=zs(c);let m;e[2]!==s||e[3]!==n||e[4]!==i.highlight?(m=t.jsx(Vt,{editor:s,mark:"highlight",currentColor:i.highlight,open:n,onOpenChange:d}),e[2]=s,e[3]=n,e[4]=i.highlight,e[5]=m):m=e[5];const g=i.codeBlock;let x;e[6]!==o?(x=o("sandbox.postEditor.legacyCodeBlock"),e[6]=o,e[7]=x):x=e[7];let h;e[8]!==s?(h=()=>s.chain().focus().toggleCodeBlock().run(),e[8]=s,e[9]=h):h=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(_t,{size:14}),e[10]=r):r=e[10];let u;e[11]!==i.codeBlock||e[12]!==x||e[13]!==h?(u=t.jsx(Ue,{active:g,label:x,onClick:h,children:r}),e[11]=i.codeBlock,e[12]=x,e[13]=h,e[14]=u):u=e[14];let p;e[15]!==s||e[16]!==a?(p=t.jsx(Xs,{editor:s,virtualMcpId:a}),e[15]=s,e[16]=a,e[17]=p):p=e[17];let f;return e[18]!==m||e[19]!==u||e[20]!==p?(f=t.jsxs(t.Fragment,{children:[m,u,p]}),e[18]=m,e[19]=u,e[20]=p,e[21]=f):f=e[21],f}function to(l){const{editor:e}=l;return{highlight:e.isActive("highlight")?e.getAttributes("highlight").color??null:null,codeBlock:e.isActive("codeBlock")}}function so({value:l,onChange:e,decofile:s,sandboxRef:a}){const o=ee(),n=K.useRef(e);n.current=e;const d=Is({extensions:[...js(),Rs.configure({placeholder:o("sandbox.postEditor.legacyContentPlaceholder")})],content:l,editorProps:{attributes:{class:Be(Js)}},onUpdate:({editor:i})=>{n.current(bs(i.getHTML()))}}),c=$t({decofile:s,sandboxRef:a});return d?t.jsxs("div",{className:"rounded-[var(--studio-surface-radius,var(--radius-md))] border shadow-edge border-input",children:[t.jsx(Ht,{editor:d,fontSize:Qs,linkSources:c,extras:t.jsx(eo,{editor:d,virtualMcpId:a?.virtualMcpId})}),t.jsx(Os,{editor:d,className:Be("max-h-[70vh] overflow-y-auto",Zs)})]}):null}function oo(l){return Array.isArray(l)?l.map(e=>({key:B(e?.key),value:B(e?.value)})):[]}function io({orgSlug:l,virtualMcpId:e,branch:s,blockKey:a,block:o,decofile:n,meta:d,previewBaseUrl:c,move:i,onClose:m,expanded:g,onToggleExpand:x,onDeleted:h}){const r=ee(),u=Et()?.taskId??null,p=_s({orgSlug:l,virtualMcpId:e,branch:s},{holdsCopy:!0}),f=Es({orgSlug:l,virtualMcpId:e,branch:s}),S=qs(e,s),C=S.kind==="protocol"&&S.source==="github",w=Ps({orgSlug:l,virtualMcpId:e,branch:s}),N=ks().length>0,q=vs(),j=ys(e),_=Ts({orgSlug:l,virtualMcpId:e,branch:s}),k=es(o,"posts"),P=v=>{const X=p.shown(v);return X?{[v]:X}:{}},[b,E,T,A]=Ls(k,v=>{p.mutate({blockKey:a,data:ts(a,ss(v))})},{isSaving:p.isPending,onSeed:()=>p.hold(a)}),[F,z]=K.useState(a);F!==a&&(z(a),T(k));const M=v=>{T(b),i.apply(a,v,b,()=>P(a))},D=(v,X)=>E({...b,[v]:X}),U=Kt("posts",d,Jt),R=Wt({orgSlug:l,virtualMcpId:e,branch:s},n),Q=R.save,[H,V]=K.useState(0),I=gs({decofile:n,post:b,previewBaseUrl:c,draftPointer:_,meta:d}),G=os(n,"posts",a,B(b.title)),J=is(b),[W,$]=K.useState(!1),Y=async()=>{T(b);try{const v=await f.mutateAsync({blockKey:a,shown:()=>p.shown(a)});if($(!1),Ns(v))return;we.success(r("sandbox.postEditor.deletePostSuccess",{title:B(b.title)})),h?.(),m?.()}catch(v){we.error(v instanceof Error?v.message:r("sandbox.postEditor.deletePostFailed"))}},O=ls(b),L=O.length>0,Z=O.length===1?r("sandbox.postEditor.missingFieldSingular",{fields:Ye(O,r)}):r("sandbox.postEditor.missingFieldPlural",{fields:Ye(O,r)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(zt,{isPending:p.isPending||R.isPending||A,isError:p.isError||R.isError}),L&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(Oe,{size:14}),O.length," ",O.length===1?r("sandbox.postEditor.issueSingular"):r("sandbox.postEditor.issuePlural")]})}),t.jsx(Me,{side:"bottom",children:Z})]})]}),(x||m)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[x&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:x,title:r(g?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:g?t.jsx(Pt,{size:16}):t.jsx(Nt,{size:16})}),m&&t.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:m,title:r("sandbox.postBoard.close"),children:t.jsx(Bt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(ms,{value:B(b.title),onChange:v=>D("title",v),placeholder:r("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),G&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(Ft,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(It,{children:[t.jsxs(Ge,{value:"content",children:[t.jsx(Tt,{}),r("sandbox.postEditor.contentTab")]}),t.jsxs(Ge,{value:"settings",children:[t.jsx(wt,{}),r("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[J&&t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx(Le,{type:"button",variant:"ghost-destructive",size:"sm",className:"px-2","aria-label":r("sandbox.postEditor.deletePost"),onClick:()=>$(!0),children:t.jsx(Dt,{size:14})})}),t.jsx(Me,{side:"bottom",children:r("sandbox.postEditor.deletePost")})]}),q&&!j&&t.jsx(Ks,{decofile:n,virtualMcpId:e,sections:Ie(b.sections),currentKey:a,meta:d,hasAi:N,onApply:v=>{D("sections",v),V(X=>X+1)}}),m&&t.jsxs(Le,{type:"button",variant:"outline",size:"sm",disabled:!I,title:r(I?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{I&&window.open(I,"_blank","noopener,noreferrer")},children:[t.jsx(ut,{size:14}),r("sandbox.postEditor.seePreview")]})]})]}),t.jsx(We,{value:"content",children:j?t.jsxs("div",{className:"space-y-3",children:[Ie(b.sections).length>0&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),r("sandbox.postEditor.legacySectionsNotice",{count:Ie(b.sections).length})]}),t.jsx(so,{value:B(b.content),onChange:v=>D("content",v),decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u}})]}):t.jsx("div",{className:"surface p-8",children:t.jsx(Mt,{value:Ie(b.sections),onChange:v=>D("sections",v),meta:d,decofile:n,sandboxRef:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},previewBaseUrl:c,onSaveReferencedBlock:Q,emptyMessage:r("sandbox.postEditor.noContentYet")},H)})}),t.jsx(We,{value:"settings",children:t.jsxs("div",{className:"surface p-6",children:[t.jsx(ao,{post:b,decofile:n,onChange:D,blockKey:a,move:i,onMoveStatus:M}),t.jsx(Qt,{schema:U,value:b,onChange:E,basePath:"post",meta:d,decofile:n,sandbox:{orgSlug:l,virtualMcpId:e,branch:s,threadId:u},onSaveReferencedBlock:Q})]})})]})]})}),t.jsx(ft,{open:W,onOpenChange:v=>{!v&&!f.isPending&&$(!1)},children:t.jsxs(xt,{children:[t.jsxs(ht,{children:[t.jsx(gt,{children:r("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(bt,{children:r(Ss("post",C,{neverPublished:w(a)}),{title:B(b.title)||r("sandbox.postBoard.untitled")})})]}),t.jsxs(jt,{children:[t.jsx(vt,{disabled:f.isPending,children:r("sandbox.postEditor.deletePostCancel")}),t.jsx(yt,{onClick:v=>{v.preventDefault(),Y()},disabled:f.isPending,className:Be(kt({variant:"destructive"})),children:f.isPending?t.jsxs(t.Fragment,{children:[t.jsx(St,{className:"size-3.5"}),r("sandbox.postEditor.deletingPost")]}):r("sandbox.postEditor.deletePost")})]})]})})]})}function lo(l){const e=se.c(15),{blockKey:s,post:a,move:o,onMoveStatus:n}=l,d=ee();let c;e[0]!==a?(c=Ze(a),e[0]=a,e[1]=c):c=e[1];const i=c;let m,g;if(e[2]!==s||e[3]!==i||e[4]!==o||e[5]!==n||e[6]!==a||e[7]!==d){let h;e[10]!==i?(h=u=>u!=="generating"||i==="generating",e[10]=i,e[11]=h):h=e[11];const r=ds.filter(h);m="flex flex-wrap gap-1.5",g=r.map(u=>{const p=u===i,f=p?null:o.refuse(s,u,a);return t.jsxs($e,{children:[t.jsx(qe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!f,"aria-pressed":p,onClick:()=>n(u),className:Be("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",p?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-accent",f&&"cursor-not-allowed opacity-50"),children:d(fs[u])})})}),f&&t.jsx(Me,{side:"bottom",children:o.reasonText(f)})]},u)}),e[2]=s,e[3]=i,e[4]=o,e[5]=n,e[6]=a,e[7]=d,e[8]=m,e[9]=g}else m=e[8],g=e[9];let x;return e[12]!==m||e[13]!==g?(x=t.jsx("div",{className:m,children:g}),e[12]=m,e[13]=g,e[14]=x):x=e[14],x}function ao(l){const e=se.c(166),{post:s,decofile:a,onChange:o,blockKey:n,move:d,onMoveStatus:c}=l,i=ee();let m;e[0]!==s?(m=Ze(s),e[0]=s,e[1]=m):m=e[1];const x=m==="scheduled";let h;e[2]!==s.slug?(h=B(s.slug),e[2]=s.slug,e[3]=h):h=e[3];const r=h,[u,p]=K.useState(r),[f,S]=K.useState(null),[C,w]=K.useState(r);C!==r&&(w(r),p(r));let N;e[4]!==n||e[5]!==r||e[6]!==a||e[7]!==o||e[8]!==u||e[9]!==i?(N=()=>{const y=ns(u);if(p(y),y===r)return;if(!y){S(null),o("slug","");return}const He=Xe(a,"posts").filter(ot=>ot.key!==n).map(co).filter(Boolean);if(!He.includes(y)){S(null),o("slug",y);return}const ze=rs(y,He),Ve=i("sandbox.postEditor.slugDeduped",{slug:ze});p(ze),S(Ve),we.info(Ve),o("slug",ze)},e[4]=n,e[5]=r,e[6]=a,e[7]=o,e[8]=u,e[9]=i,e[10]=N):N=e[10];const q=N;let j;e[11]!==i?(j=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=j):j=e[12];let _;e[13]!==j?(_=t.jsx(te,{children:j}),e[13]=j,e[14]=_):_=e[14];let k;e[15]!==n||e[16]!==d||e[17]!==c||e[18]!==s?(k=t.jsx(lo,{blockKey:n,post:s,move:d,onMoveStatus:c}),e[15]=n,e[16]=d,e[17]=c,e[18]=s,e[19]=k):k=e[19];let P;e[20]!==_||e[21]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[_,k]}),e[20]=_,e[21]=k,e[22]=P):P=e[22];let b;e[23]!==x||e[24]!==o||e[25]!==s.scheduledDatetime||e[26]!==i?(b=x&&t.jsx(Re,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:B(s.scheduledDatetime),onChange:y=>o("scheduledDatetime",y),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=x,e[24]=o,e[25]=s.scheduledDatetime,e[26]=i,e[27]=b):b=e[27];let E;e[28]!==P||e[29]!==b?(E=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[P,b]}),e[28]=P,e[29]=b,e[30]=E):E=e[30];let T;e[31]!==i?(T=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=T):T=e[32];let A;e[33]!==T?(A=t.jsx(te,{htmlFor:"post-excerpt",children:T}),e[33]=T,e[34]=A):A=e[34];let F;e[35]!==s.excerpt?(F=B(s.excerpt),e[35]=s.excerpt,e[36]=F):F=e[36];let z;e[37]!==o?(z=y=>o("excerpt",y.target.value),e[37]=o,e[38]=z):z=e[38];let M;e[39]!==F||e[40]!==z?(M=t.jsx(Je,{id:"post-excerpt",value:F,onChange:z,rows:2}),e[39]=F,e[40]=z,e[41]=M):M=e[41];let D;e[42]!==A||e[43]!==M?(D=t.jsxs("div",{className:"space-y-2",children:[A,M]}),e[42]=A,e[43]=M,e[44]=D):D=e[44];let U;e[45]!==i?(U=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=U):U=e[46];let R;e[47]!==U?(R=t.jsx(te,{htmlFor:"post-slug",children:U}),e[47]=U,e[48]=R):R=e[48];let Q;e[49]===Symbol.for("react.memo_cache_sentinel")?(Q=y=>{S(null),p(cs(y.target.value))},e[49]=Q):Q=e[49];let H;e[50]!==i?(H=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=H):H=e[51];let V;e[52]!==q||e[53]!==u||e[54]!==H?(V=t.jsx(Ae,{id:"post-slug",value:u,onChange:Q,onBlur:q,placeholder:H,maxLength:80,className:"h-10"}),e[52]=q,e[53]=u,e[54]=H,e[55]=V):V=e[55];let I;e[56]!==f?(I=f&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(Oe,{size:14,className:"mt-px shrink-0"}),f]}),e[56]=f,e[57]=I):I=e[57];let G;e[58]!==R||e[59]!==V||e[60]!==I?(G=t.jsxs("div",{className:"space-y-2",children:[R,V,I]}),e[58]=R,e[59]=V,e[60]=I,e[61]=G):G=e[61];let J;e[62]!==i?(J=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=J):J=e[63];let W;e[64]!==J?(W={type:"string",format:"date",title:J},e[64]=J,e[65]=W):W=e[65];let $;e[66]!==s.date?($=B(s.date),e[66]=s.date,e[67]=$):$=e[67];let Y;e[68]!==o?(Y=y=>o("date",y),e[68]=o,e[69]=Y):Y=e[69];let O;e[70]!==i?(O=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=O):O=e[71];let L;e[72]!==W||e[73]!==$||e[74]!==Y||e[75]!==O?(L=t.jsx(Re,{schema:W,value:$,onChange:Y,path:"post-date",label:O}),e[72]=W,e[73]=$,e[74]=Y,e[75]=O,e[76]=L):L=e[76];let Z;e[77]!==i?(Z=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=Z):Z=e[78];let v;e[79]!==Z?(v={type:"integer",title:Z},e[79]=Z,e[80]=v):v=e[80];const X=typeof s.readTime=="number"?s.readTime:void 0;let oe;e[81]!==o?(oe=y=>o("readTime",y),e[81]=o,e[82]=oe):oe=e[82];let ie;e[83]!==i?(ie=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=ie):ie=e[84];let le;e[85]!==v||e[86]!==X||e[87]!==oe||e[88]!==ie?(le=t.jsx(Yt,{schema:v,value:X,onChange:oe,path:"post-read-time",label:ie}),e[85]=v,e[86]=X,e[87]=oe,e[88]=ie,e[89]=le):le=e[89];let ae;e[90]!==G||e[91]!==L||e[92]!==le?(ae=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[G,L,le]}),e[90]=G,e[91]=L,e[92]=le,e[93]=ae):ae=e[93];const tt=s.image,st=s.mobileImage;let ne,re;e[94]!==o?(ne=y=>o("image",y),re=y=>o("mobileImage",y),e[94]=o,e[95]=ne,e[96]=re):(ne=e[95],re=e[96]);let ce;e[97]!==s.alt?(ce=B(s.alt),e[97]=s.alt,e[98]=ce):ce=e[98];let de;e[99]!==i?(de=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=de):de=e[100];let me;e[101]!==s.image||e[102]!==s.mobileImage||e[103]!==ne||e[104]!==re||e[105]!==ce||e[106]!==de?(me=t.jsx(Ut,{value:tt,mobileValue:st,onChange:ne,onMobileChange:re,alt:ce,label:de}),e[101]=s.image,e[102]=s.mobileImage,e[103]=ne,e[104]=re,e[105]=ce,e[106]=de,e[107]=me):me=e[107];let pe;e[108]!==i?(pe=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=pe):pe=e[109];let ue;e[110]!==i?(ue=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=ue):ue=e[111];let fe;e[112]!==pe||e[113]!==ue?(fe={type:"string",title:pe,description:ue},e[112]=pe,e[113]=ue,e[114]=fe):fe=e[114];let xe;e[115]!==s.alt?(xe=B(s.alt),e[115]=s.alt,e[116]=xe):xe=e[116];let he;e[117]!==o?(he=y=>o("alt",y),e[117]=o,e[118]=he):he=e[118];let ge;e[119]!==i?(ge=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=ge):ge=e[120];let be;e[121]!==fe||e[122]!==xe||e[123]!==he||e[124]!==ge?(be=t.jsx(Re,{schema:fe,value:xe,onChange:he,path:"post-alt",label:ge}),e[121]=fe,e[122]=xe,e[123]=he,e[124]=ge,e[125]=be):be=e[125];let je;e[126]!==me||e[127]!==be?(je=t.jsxs("div",{className:"space-y-2",children:[me,be]}),e[126]=me,e[127]=be,e[128]=je):je=e[128];let ve;e[129]!==i?(ve=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=ve):ve=e[130];let ye;e[131]!==o?(ye=y=>o("authors",y),e[131]=o,e[132]=ye):ye=e[132];let Se;e[133]!==a||e[134]!==s.authors||e[135]!==ve||e[136]!==ye?(Se=t.jsx(Qe,{label:ve,decofile:a,kind:"authors",valueField:"email",toRef:ro,selected:s.authors,onChange:ye}),e[133]=a,e[134]=s.authors,e[135]=ve,e[136]=ye,e[137]=Se):Se=e[137];let ke;e[138]!==i?(ke=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=ke):ke=e[139];let Ee;e[140]!==o?(Ee=y=>o("categories",y),e[140]=o,e[141]=Ee):Ee=e[141];let Ce;e[142]!==a||e[143]!==s.categories||e[144]!==ke||e[145]!==Ee?(Ce=t.jsx(Qe,{label:ke,decofile:a,kind:"categories",valueField:"slug",toRef:no,selected:s.categories,onChange:Ee}),e[142]=a,e[143]=s.categories,e[144]=ke,e[145]=Ee,e[146]=Ce):Ce=e[146];let _e;e[147]!==o?(_e=y=>o("extraProps",y),e[147]=o,e[148]=_e):_e=e[148];let Pe;e[149]!==s.extraProps||e[150]!==_e?(Pe=t.jsx(po,{value:s.extraProps,onChange:_e}),e[149]=s.extraProps,e[150]=_e,e[151]=Pe):Pe=e[151];let Ne;e[152]!==o?(Ne=y=>o("seo",y),e[152]=o,e[153]=Ne):Ne=e[153];let Te;e[154]!==s.seo||e[155]!==Ne?(Te=t.jsx(mo,{value:s.seo,onChange:Ne}),e[154]=s.seo,e[155]=Ne,e[156]=Te):Te=e[156];let Fe;return e[157]!==D||e[158]!==ae||e[159]!==je||e[160]!==Se||e[161]!==Ce||e[162]!==Pe||e[163]!==Te||e[164]!==E?(Fe=t.jsxs("div",{className:"space-y-5",children:[E,D,ae,je,Se,Ce,Pe,Te]}),e[157]=D,e[158]=ae,e[159]=je,e[160]=Se,e[161]=Ce,e[162]=Pe,e[163]=Te,e[164]=E,e[165]=Fe):Fe=e[165],Fe}function no(l){return{name:B(l.name),slug:B(l.slug)}}function ro(l){return{...l}}function co(l){return B(l.payload.slug)}function mo(l){const e=se.c(93),{value:s,onChange:a}=l,o=ee();let n;e[0]!==s?(n=s&&typeof s=="object"&&!Array.isArray(s)?s:{},e[0]=s,e[1]=n):n=e[1];const d=n;let c;e[2]!==a||e[3]!==d?(c=(L,Z)=>a({...d,[L]:Z}),e[2]=a,e[3]=d,e[4]=c):c=e[4];const i=c;let m;e[5]!==o?(m=o("sandbox.postEditor.seoSectionLabel"),e[5]=o,e[6]=m):m=e[6];let g;e[7]!==m?(g=t.jsx("p",{className:"text-sm font-medium",children:m}),e[7]=m,e[8]=g):g=e[8];let x;e[9]!==o?(x=o("sandbox.postEditor.seoSectionHint"),e[9]=o,e[10]=x):x=e[10];let h;e[11]!==x?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[11]=x,e[12]=h):h=e[12];let r;e[13]!==g||e[14]!==h?(r=t.jsxs("div",{className:"space-y-1",children:[g,h]}),e[13]=g,e[14]=h,e[15]=r):r=e[15];let u;e[16]!==o?(u=o("sandbox.postEditor.seoTitleLabel"),e[16]=o,e[17]=u):u=e[17];let p;e[18]!==u?(p=t.jsx(te,{htmlFor:"post-seo-title",children:u}),e[18]=u,e[19]=p):p=e[19];let f;e[20]!==d.title?(f=B(d.title),e[20]=d.title,e[21]=f):f=e[21];let S;e[22]!==i?(S=L=>i("title",L.target.value),e[22]=i,e[23]=S):S=e[23];let C;e[24]!==f||e[25]!==S?(C=t.jsx(Ae,{id:"post-seo-title",value:f,onChange:S,className:"h-10"}),e[24]=f,e[25]=S,e[26]=C):C=e[26];let w;e[27]!==C||e[28]!==p?(w=t.jsxs("div",{className:"space-y-2",children:[p,C]}),e[27]=C,e[28]=p,e[29]=w):w=e[29];let N;e[30]!==o?(N=o("sandbox.postEditor.seoDescriptionLabel"),e[30]=o,e[31]=N):N=e[31];let q;e[32]!==N?(q=t.jsx(te,{htmlFor:"post-seo-description",children:N}),e[32]=N,e[33]=q):q=e[33];let j;e[34]!==d.description?(j=B(d.description),e[34]=d.description,e[35]=j):j=e[35];let _;e[36]!==i?(_=L=>i("description",L.target.value),e[36]=i,e[37]=_):_=e[37];let k;e[38]!==j||e[39]!==_?(k=t.jsx(Je,{id:"post-seo-description",value:j,onChange:_,rows:2}),e[38]=j,e[39]=_,e[40]=k):k=e[40];let P;e[41]!==q||e[42]!==k?(P=t.jsxs("div",{className:"space-y-2",children:[q,k]}),e[41]=q,e[42]=k,e[43]=P):P=e[43];let b;e[44]!==o?(b=o("sandbox.postEditor.seoImageLabel"),e[44]=o,e[45]=b):b=e[45];let E;e[46]!==b?(E={type:"string",format:"image-uri",title:b},e[46]=b,e[47]=E):E=e[47];const T=d.image;let A;e[48]!==i?(A=L=>i("image",L),e[48]=i,e[49]=A):A=e[49];let F;e[50]!==o?(F=o("sandbox.postEditor.seoImageLabel"),e[50]=o,e[51]=F):F=e[51];let z;e[52]!==d.image||e[53]!==E||e[54]!==A||e[55]!==F?(z=t.jsx(Rt,{schema:E,value:T,onChange:A,path:"post-seo-image",label:F}),e[52]=d.image,e[53]=E,e[54]=A,e[55]=F,e[56]=z):z=e[56];let M;e[57]!==o?(M=o("sandbox.postEditor.seoCanonicalLabel"),e[57]=o,e[58]=M):M=e[58];let D;e[59]!==M?(D=t.jsx(te,{htmlFor:"post-seo-canonical",children:M}),e[59]=M,e[60]=D):D=e[60];let U;e[61]!==d.canonical?(U=B(d.canonical),e[61]=d.canonical,e[62]=U):U=e[62];let R;e[63]!==i?(R=L=>i("canonical",L.target.value),e[63]=i,e[64]=R):R=e[64];let Q;e[65]!==o?(Q=o("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=o,e[66]=Q):Q=e[66];let H;e[67]!==U||e[68]!==R||e[69]!==Q?(H=t.jsx(Ae,{id:"post-seo-canonical",value:U,onChange:R,placeholder:Q,className:"h-10"}),e[67]=U,e[68]=R,e[69]=Q,e[70]=H):H=e[70];let V;e[71]!==D||e[72]!==H?(V=t.jsxs("div",{className:"space-y-2",children:[D,H]}),e[71]=D,e[72]=H,e[73]=V):V=e[73];let I;e[74]!==o?(I=o("sandbox.postEditor.seoNoIndexingLabel"),e[74]=o,e[75]=I):I=e[75];let G;e[76]!==I?(G=t.jsx(te,{htmlFor:"post-seo-no-indexing",children:I}),e[76]=I,e[77]=G):G=e[77];const J=d.noIndexing===!0;let W;e[78]!==i?(W=L=>i("noIndexing",L),e[78]=i,e[79]=W):W=e[79];let $;e[80]!==J||e[81]!==W?($=t.jsx(Ot,{id:"post-seo-no-indexing",checked:J,onCheckedChange:W}),e[80]=J,e[81]=W,e[82]=$):$=e[82];let Y;e[83]!==G||e[84]!==$?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[G,$]}),e[83]=G,e[84]=$,e[85]=Y):Y=e[85];let O;return e[86]!==w||e[87]!==P||e[88]!==z||e[89]!==V||e[90]!==Y||e[91]!==r?(O=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[r,w,P,z,V,Y]}),e[86]=w,e[87]=P,e[88]=z,e[89]=V,e[90]=Y,e[91]=r,e[92]=O):O=e[92],O}function po(l){const e=se.c(24),{value:s,onChange:a}=l,o=ee();let n,d,c,i;if(e[0]!==a||e[1]!==o||e[2]!==s){n=oo(s);const r=(p,f)=>a(n.map((S,C)=>C===p?{...S,...f}:S));d="space-y-2";let u;e[7]!==o?(u=o("sandbox.postEditor.extraPropsLabel"),e[7]=o,e[8]=u):u=e[8],e[9]!==u?(c=t.jsx(te,{children:u}),e[9]=u,e[10]=c):c=e[10],i=n.length>0&&t.jsx("ul",{className:"space-y-2",children:n.map((p,f)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(Ae,{value:p.key,onChange:S=>r(f,{key:S.target.value}),placeholder:o("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(Ae,{value:p.value,onChange:S=>r(f,{value:S.target.value}),placeholder:o("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(ps,{label:o("sandbox.postEditor.removePropLabel"),onClick:()=>a(n.filter((S,C)=>C!==f))})]},f))}),e[0]=a,e[1]=o,e[2]=s,e[3]=n,e[4]=d,e[5]=c,e[6]=i}else n=e[3],d=e[4],c=e[5],i=e[6];let m;e[11]!==o?(m=o("sandbox.postEditor.addPropLabel"),e[11]=o,e[12]=m):m=e[12];let g;e[13]!==n||e[14]!==a?(g=()=>a([...n,{key:"",value:""}]),e[13]=n,e[14]=a,e[15]=g):g=e[15];let x;e[16]!==m||e[17]!==g?(x=t.jsx(us,{label:m,onClick:g}),e[16]=m,e[17]=g,e[18]=x):x=e[18];let h;return e[19]!==d||e[20]!==c||e[21]!==i||e[22]!==x?(h=t.jsxs("div",{className:d,children:[c,i,x]}),e[19]=d,e[20]=c,e[21]=i,e[22]=x,e[23]=h):h=e[23],h}function Qe(l){const e=se.c(24),{label:s,decofile:a,kind:o,valueField:n,toRef:d,selected:c,onChange:i}=l,m=ee();let g;e[0]!==a||e[1]!==o||e[2]!==c||e[3]!==d||e[4]!==n?(g=as({records:Xe(a,o),selected:c,valueField:n,toRef:d}),e[0]=a,e[1]=o,e[2]=c,e[3]=d,e[4]=n,e[5]=g):g=e[5];const{options:x,selectedValues:h,refsForValues:r}=g;let u;e[6]!==o||e[7]!==m?(u=m(o==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=o,e[7]=m,e[8]=u):u=e[8];const p=u;let f;e[9]!==o||e[10]!==m?(f=m(o==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=o,e[10]=m,e[11]=f):f=e[11];const S=f;let C;e[12]!==s?(C=t.jsx(te,{children:s}),e[12]=s,e[13]=C):C=e[13];let w;e[14]!==p||e[15]!==i||e[16]!==x||e[17]!==r||e[18]!==S||e[19]!==h?(w=x.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:p}):t.jsx(At,{options:x,defaultValue:h,onValueChange:q=>i(r(q)),placeholder:S,maxCount:4}),e[14]=p,e[15]=i,e[16]=x,e[17]=r,e[18]=S,e[19]=h,e[20]=w):w=e[20];let N;return e[21]!==C||e[22]!==w?(N=t.jsxs("div",{className:"space-y-2",children:[C,w]}),e[21]=C,e[22]=w,e[23]=N):N=e[23],N}function ga(l){const e=se.c(10),s=l.block!==void 0;let a;e[0]!==l?(a=t.jsx(io,{...l}),e[0]=l,e[1]=a):a=e[1];let o;return e[2]!==l.blockKey||e[3]!==l.branch||e[4]!==l.decofile||e[5]!==l.orgSlug||e[6]!==l.virtualMcpId||e[7]!==s||e[8]!==a?(o=t.jsx(Gt,{listing:l.decofile,orgSlug:l.orgSlug,virtualMcpId:l.virtualMcpId,branch:l.branch,blockKey:l.blockKey,present:s,children:a}),e[2]=l.blockKey,e[3]=l.branch,e[4]=l.decofile,e[5]=l.orgSlug,e[6]=l.virtualMcpId,e[7]=s,e[8]=a,e[9]=o):o=e[9],o}export{ga as PostEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,b as D,d as ne,f as re,ag as oe,j as t,B as Q,a9 as ce,n as de,x as W,m as X}from"./index-
|
|
1
|
+
import{c as O,b as D,d as ne,f as re,ag as oe,j as t,B as Q,a9 as ce,n as de,x as W,m as X}from"./index-CUTEHf7n.js";import{I as ae}from"./icon-button-BZOKf7Ue.js";import{c as Y,T as Z,a as ee}from"./tooltip-BtQY7me6.js";import{k as fe,aw as me,_ as xe}from"./agent-icon-y2SKybSP.js";import{a as he}from"./MessageCircle01-Cf5Qa_r1.js";import{s as pe}from"./XClose-CUoBDo4j.js";import{F as te,t as V,H as ue}from"./file-share-button-DDpEu_Ts.js";import{f as je,F as be,a as ge}from"./file-preview-XajyFvxK.js";import{F as se}from"./file-type-icon-zloL09QV.js";import{c as ve,a as we,e as ye}from"./use-org-fs-CYycA4iA.js";import{O as Pe,J as Ce}from"./chat-context-3o15fH-n.js";function Ne(j){const e=O.c(13),{previewPath:l}=j,m=D(),r=ne(),p=re({strict:!1}).org??"";let s;e[0]!==l?(s=l.split("/").slice(0,-1).join("/"),e[0]=l,e[1]=s):s=e[1];const o=s;let a;e[2]!==r||e[3]!==p||e[4]!==o||e[5]!==l?(a=()=>{r({to:oe.library,params:{org:p},search:{path:o||void 0,preview:l}})},e[2]=r,e[3]=p,e[4]=o,e[5]=l,e[6]=a):a=e[6];const c=a;let b;e[7]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(fe,{size:14}),e[7]=b):b=e[7];let u;e[8]!==m?(u=m("library.seeInLibrary.label"),e[8]=m,e[9]=u):u=e[9];let x;return e[10]!==c||e[11]!==u?(x=t.jsxs(Q,{variant:"ghost",size:"sm",onClick:c,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:[b,u]}),e[10]=c,e[11]=u,e[12]=x):x=e[12],x}const ke=j=>/\.html?$/i.test(j);function le(j){switch(j){case"dialog":return"h-11 py-1 pr-12 pl-2";case"panel":return"h-9 px-2";case"aside":return"h-12 gap-2 px-1.5";default:return j}}function Fe(j){const e=O.c(12),{expanded:l,onToggle:m,placement:r}=j,p=D();let s;e[0]!==r?(s=V(r),e[0]=r,e[1]=s):s=e[1];const o=l?"library.previewContent.collapse":"library.previewContent.expand";let a;e[2]!==p||e[3]!==o?(a=p(o),e[2]=p,e[3]=o,e[4]=a):a=e[4];let c;e[5]!==l?(c=l?t.jsx(xe,{size:14}):t.jsx(he,{size:14}),e[5]=l,e[6]=c):c=e[6];let b;return e[7]!==m||e[8]!==s||e[9]!==a||e[10]!==c?(b=t.jsx(ae,{...s,label:a,tooltipSide:"bottom",onClick:m,children:c}),e[7]=m,e[8]=s,e[9]=a,e[10]=c,e[11]=b):b=e[11],b}function ie(j){const e=O.c(9),{onClose:l,placement:m}=j,r=m===void 0?"bar":m,p=D();let s;e[0]!==r?(s=V(r),e[0]=r,e[1]=s):s=e[1];let o;e[2]!==p?(o=p("library.previewContent.close"),e[2]=p,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(pe,{size:14}),e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==s||e[7]!==o?(c=t.jsx(ae,{...s,label:o,tooltipSide:"bottom",onClick:l,children:a}),e[5]=l,e[6]=s,e[7]=o,e[8]=c):c=e[8],c}function Oe(j){const e=O.c(92),{previewPath:l,onClose:m,expand:r,showSeeInLibrary:p,variant:s}=j,o=p===void 0?!1:p,a=D();let c;e[0]!==l?(c=Pe(l),e[0]=l,e[1]=c):c=e[1];const b=c,{volume:u,dirPath:x}=b,{data:f,isPending:A}=ve(u,x),H=we(u??"");let w,y,n,d,h,i,P,B;if(e[2]!==H||e[3]!==f||e[4]!==r||e[5]!==x||e[6]!==l||e[7]!==o||e[8]!==s){d=Ce(x),h=s==="dialog",i=r?.expanded?"topbar":s==="aside"?"aside":"bar";let g;e[17]!==i?(g=V(i),e[17]=i,e[18]=g):g=e[18],w=g;let T;e[19]!==r||e[20]!==i?(T=r?.onToggle&&t.jsx(Fe,{expanded:r.expanded,onToggle:r.onToggle,placement:i}),e[19]=r,e[20]=i,e[21]=T):T=e[21],y=T;let v;e[22]!==l||e[23]!==o?(v=o?t.jsx(Ne,{previewPath:l}):null,e[22]=l,e[23]=o,e[24]=v):v=e[24],P=v,n=f&&f.kind==="file"?{key:l,filename:d,size:f.size,downloadUrl:H(f.path)}:null,B=n&&f&&ke(d),e[2]=H,e[3]=f,e[4]=r,e[5]=x,e[6]=l,e[7]=o,e[8]=s,e[9]=w,e[10]=y,e[11]=n,e[12]=d,e[13]=h,e[14]=i,e[15]=P,e[16]=B}else w=e[9],y=e[10],n=e[11],d=e[12],h=e[13],i=e[14],P=e[15],B=e[16];if(B){let g;e[25]!==d||e[26]!==h?(g=h&&t.jsx(W,{className:"sr-only",children:d}),e[25]=d,e[26]=h,e[27]=g):g=e[27];const T=n.downloadUrl;let v;e[28]!==f?(v=ye(f),e[28]=f,e[29]=v):v=e[29];let z;e[30]!==s?(z=s==="panel"?void 0:le(s),e[30]=s,e[31]=z):z=e[31];const R=u==="home"?x:void 0,J=u??"",q=f.shareMode??"private",G=f.effectivePublic??!1,K=window.location.origin+n.downloadUrl;let S;e[32]!==x||e[33]!==i||e[34]!==q||e[35]!==G||e[36]!==K||e[37]!==J?(S=t.jsx(te,{volume:J,path:x,shareMode:q,effectivePublic:G,url:K,placement:i}),e[32]=x,e[33]=i,e[34]=q,e[35]=G,e[36]=K,e[37]=J,e[38]=S):S=e[38];let U;e[39]!==y||e[40]!==h||e[41]!==m||e[42]!==i?(U=!h&&t.jsxs(t.Fragment,{children:[y,t.jsx(ie,{onClose:m,placement:i})]}),e[39]=y,e[40]=h,e[41]=m,e[42]=i,e[43]=U):U=e[43];let I;e[44]!==P||e[45]!==S||e[46]!==U?(I=t.jsxs(t.Fragment,{children:[S,P,U]}),e[44]=P,e[45]=S,e[46]=U,e[47]=I):I=e[47];let L;e[48]!==n.downloadUrl||e[49]!==d||e[50]!==i||e[51]!==l||e[52]!==I||e[53]!==v||e[54]!==z||e[55]!==R?(L=t.jsx(ue,{readUrl:T,marker:v,toolbarClassName:z,title:d,placement:i,savePath:R,trailing:I},l),e[48]=n.downloadUrl,e[49]=d,e[50]=i,e[51]=l,e[52]=I,e[53]=v,e[54]=z,e[55]=R,e[56]=L):L=e[56];let E;return e[57]!==L||e[58]!==g?(E=t.jsxs(t.Fragment,{children:[g,L]}),e[57]=L,e[58]=g,e[59]=E):E=e[59],E}let C;e[60]!==w||e[61]!==f?.effectivePublic||e[62]!==f?.shareMode||e[63]!==n||e[64]!==x||e[65]!==i||e[66]!==a||e[67]!==u?(C=n&&t.jsxs(t.Fragment,{children:[t.jsx(te,{volume:u??"",path:x,shareMode:f?.shareMode??"private",effectivePublic:f?.effectivePublic??!1,url:window.location.origin+n.downloadUrl,placement:i}),t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:w.variant,size:w.size,asChild:!0,children:t.jsx("a",{href:n.downloadUrl,download:n.filename,children:t.jsx(me,{size:14})})})}),t.jsx(ee,{side:"bottom",children:a("library.previewContent.download")})]}),t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(Q,{variant:w.variant,size:w.size,onClick:()=>window.open(n.downloadUrl,"_blank","noopener"),children:t.jsx(ce,{size:14})})}),t.jsx(ee,{side:"bottom",children:a("library.previewContent.openInNewTab")})]})]}),e[60]=w,e[61]=f?.effectivePublic,e[62]=f?.shareMode,e[63]=n,e[64]=x,e[65]=i,e[66]=a,e[67]=u,e[68]=C):C=e[68];let N;e[69]!==y||e[70]!==h||e[71]!==m||e[72]!==i?(N=!h&&t.jsxs(t.Fragment,{children:[y,t.jsx(ie,{onClose:m,placement:i})]}),e[69]=y,e[70]=h,e[71]=m,e[72]=i,e[73]=N):N=e[73];let $;e[74]!==C||e[75]!==N?($=t.jsxs(t.Fragment,{children:[C,N]}),e[74]=C,e[75]=N,e[76]=$):$=e[76];const M=$;let k;e[77]!==M||e[78]!==n||e[79]!==d||e[80]!==h||e[81]!==i||e[82]!==s?(k=i==="topbar"?t.jsx(de.Actions,{children:M}):t.jsxs("div",{className:X("flex shrink-0 items-center gap-1 border-b border-border/60",le(s)),children:[t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[t.jsx(se,{filename:d,className:"h-4.5 w-3.5 shrink-0"}),h?t.jsx(W,{className:"truncate text-xs font-medium text-foreground",children:d}):t.jsx("span",{className:X("truncate font-medium text-foreground",i==="aside"?"text-sm":"text-xs"),children:d}),n&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:je(n.size)})]}),M]}),e[77]=M,e[78]=n,e[79]=d,e[80]=h,e[81]=i,e[82]=s,e[83]=k):k=e[83];let F;e[84]!==n||e[85]!==d||e[86]!==A||e[87]!==a?(F=t.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:n?t.jsx(be,{file:n}):A?t.jsx(ge,{}):t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[t.jsx(se,{filename:d,className:"h-7.5 w-6"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("library.previewContent.fileNotAvailable")})]})}),e[84]=n,e[85]=d,e[86]=A,e[87]=a,e[88]=F):F=e[88];let _;return e[89]!==k||e[90]!==F?(_=t.jsxs(t.Fragment,{children:[k,F]}),e[89]=k,e[90]=F,e[91]=_):_=e[91],_}export{Oe as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as l,v as x,D as f}from"./index-
|
|
1
|
+
import{c as p,j as l,v as x,D as f}from"./index-CUTEHf7n.js";import{L as h}from"./preview-content-Bhl5Jk0E.js";function g(c){const e=p.c(9),{previewPath:r,onClose:o,showSeeInLibrary:n}=c,a=n===void 0?!1:n;let i;e[0]!==o?(i=m=>{m||o()},e[0]=o,e[1]=i):i=e[1];let s;e[2]!==o||e[3]!==r||e[4]!==a?(s=l.jsx(x,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"top-2 right-3",children:l.jsx(h,{previewPath:r,onClose:o,showSeeInLibrary:a,variant:"dialog"})}),e[2]=o,e[3]=r,e[4]=a,e[5]=s):s=e[5];let t;return e[6]!==i||e[7]!==s?(t=l.jsx(f,{open:!0,onOpenChange:i,children:s}),e[6]=i,e[7]=s,e[8]=t):t=e[8],t}export{g as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,j as c}from"./index-
|
|
1
|
+
import{c as p,j as c}from"./index-CUTEHf7n.js";import{L as x}from"./preview-content-Bhl5Jk0E.js";function u(f){const e=p.c(6),{previewPath:i,onClose:o,showSeeInLibrary:n,expand:a,variant:l}=f,s=n===void 0?!1:n,t=l===void 0?"panel":l;let r;return e[0]!==a||e[1]!==o||e[2]!==i||e[3]!==s||e[4]!==t?(r=c.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:c.jsx(x,{previewPath:i,onClose:o,showSeeInLibrary:s,expand:a,variant:t})}),e[0]=a,e[1]=o,e[2]=i,e[3]=s,e[4]=t,e[5]=r):r=e[5],r}export{u as L};
|