decocms 4.85.0 → 4.86.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-BuBA0Jsv.js → AlertCircle-DriHvGW8.js} +1 -1
- package/dist/client/assets/{AreaChart-TRgmv_Wd.js → AreaChart-BU465nht.js} +1 -1
- package/dist/client/assets/{ArrowUp-CnE5bSlE.js → ArrowUp-BHLBiz0J.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BrarzgQo.js → ArrowUpRight-CsopTrXA.js} +1 -1
- package/dist/client/assets/{CheckCircle-DWHd0mHR.js → CheckCircle-BSSfIVDh.js} +1 -1
- package/dist/client/assets/{ChevronDown-CaTYG158.js → ChevronDown-DnuZlbXl.js} +1 -1
- package/dist/client/assets/{ChevronRight-CtQv00yi.js → ChevronRight-D8z61LL4.js} +1 -1
- package/dist/client/assets/{ChevronUp-BK_eRMNg.js → ChevronUp-SvG4tBeC.js} +1 -1
- package/dist/client/assets/{Copy01-Dek2eDIt.js → Copy01-8RoWdlIb.js} +1 -1
- package/dist/client/assets/{DotsVertical-DQtMIeGf.js → DotsVertical-ByzWfjph.js} +1 -1
- package/dist/client/assets/{Eye-QqRIRc86.js → Eye-BMB6Dsvc.js} +1 -1
- package/dist/client/assets/{FilterLines-CEYFlzZT.js → FilterLines-Cb5gzr5c.js} +1 -1
- package/dist/client/assets/{Globe01-Do6yFDh5.js → Globe01-C6g7oQ38.js} +1 -1
- package/dist/client/assets/{Globe04-0xKe5rNv.js → Globe04-CYEWS6xQ.js} +1 -1
- package/dist/client/assets/{HardDrive-DbMUTYVo.js → HardDrive-Dv77s3h5.js} +1 -1
- package/dist/client/assets/{Image01-Gbgj5Dc9.js → Image01-YE-JCd5P.js} +1 -1
- package/dist/client/assets/{Key01-Cyk64pQ7.js → Key01-C9Hax98L.js} +1 -1
- package/dist/client/assets/{LayoutLeft-VCtEggEP.js → LayoutLeft-CoMgIDfR.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BnPXNScW.js → LinkExternal01-BYMM_QSD.js} +1 -1
- package/dist/client/assets/{Monitor01-B29NhA0b.js → Monitor01-CDUuvvya.js} +1 -1
- package/dist/client/assets/{Package-DBDR5k7j.js → Package-BwfmB-wY.js} +1 -1
- package/dist/client/assets/{Palette-Bl_4RcxG.js → Palette-wIBeqOmX.js} +1 -1
- package/dist/client/assets/{Play-D6e-8I8N.js → Play-CmeXDhbv.js} +1 -1
- package/dist/client/assets/{Plus-D7w3kKcq.js → Plus-DErQhYMo.js} +1 -1
- package/dist/client/assets/{SearchLg-CIgwZ5Ai.js → SearchLg-BcyXaR5Z.js} +1 -1
- package/dist/client/assets/{SearchMd-BM6ErbnQ.js → SearchMd-B2xdLkpr.js} +1 -1
- package/dist/client/assets/{Settings02-C0f9EOYE.js → Settings02-BQIoToME.js} +1 -1
- package/dist/client/assets/{Shield01-Dk1FolLy.js → Shield01-BnV0ErmL.js} +1 -1
- package/dist/client/assets/{Star01-DKUM2OLa.js → Star01-BvPb97r4.js} +1 -1
- package/dist/client/assets/{Stars01-B1gJMGko.js → Stars01-Dq_ij1vd.js} +1 -1
- package/dist/client/assets/{Stars02-B29facrE.js → Stars02-D0dtbcP0.js} +1 -1
- package/dist/client/assets/{Sun-DFAu2We0.js → Sun-BNn7fIcF.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CeAkUsBa.js → SwitchHorizontal01-B5xg5r1q.js} +1 -1
- package/dist/client/assets/{Tool01-BQrdfNZF.js → Tool01-1JY4WdfO.js} +1 -1
- package/dist/client/assets/{Tool02-D0kXP67n.js → Tool02-CJRfU6-e.js} +1 -1
- package/dist/client/assets/{Trash01-DqNpHdoG.js → Trash01-D68y5OFq.js} +1 -1
- package/dist/client/assets/{TrendUp01-DOxQREkf.js → TrendUp01-Be3cv-nx.js} +1 -1
- package/dist/client/assets/{Upload01-B-T-ayBH.js → Upload01-CPQnKMdb.js} +1 -1
- package/dist/client/assets/{User01-BoN0oE28.js → User01-BErqEcB8.js} +1 -1
- package/dist/client/assets/{Users01-TRsNFQu1.js → Users01-CdOl2233.js} +1 -1
- package/dist/client/assets/{Users03-CfL51rat.js → Users03-01ZOLPet.js} +1 -1
- package/dist/client/assets/{X-Dq1NmIXA.js → X-DXgmI1I4.js} +1 -1
- package/dist/client/assets/{XCircle-_bqoZd7R.js → XCircle-DY497Rjn.js} +1 -1
- package/dist/client/assets/{XClose-CKYhL0Lj.js → XClose-C4EmtqAA.js} +1 -1
- package/dist/client/assets/{Zap-BmsJ5iwW.js → Zap-BPdmVchQ.js} +1 -1
- package/dist/client/assets/{ZapSquare-CG9hFqUQ.js → ZapSquare-DiXc_WiU.js} +1 -1
- package/dist/client/assets/{ZoomOut-BtIfQ9L_.js → ZoomOut-DO1ABQMU.js} +1 -1
- package/dist/client/assets/{access-gate-D3J5MBgf.js → access-gate-Du5lQEFN.js} +1 -1
- package/dist/client/assets/{add-section-modal-CFpSMrer.js → add-section-modal-Cj2upX49.js} +1 -1
- package/dist/client/assets/{agent-icon-DNM66yLw.js → agent-icon-D4a2yQAy.js} +1 -1
- package/dist/client/assets/{agents-list-CBZ8u6cY.js → agents-list-CbWCKvO8.js} +1 -1
- package/dist/client/assets/{ai-providers-BJmyf7TE.js → ai-providers-CTkmKKCc.js} +1 -1
- package/dist/client/assets/{alert-DHP4rB6t.js → alert-ZjKFCE6g.js} +1 -1
- package/dist/client/assets/{alert-dialog-CdnwIQoa.js → alert-dialog-C0dmYQwl.js} +1 -1
- package/dist/client/assets/{app-editor-B1fTEoLk.js → app-editor-C9vstOJe.js} +1 -1
- package/dist/client/assets/{auth-catchall-Cy84BgZt.js → auth-catchall-CTUsNjBA.js} +1 -1
- package/dist/client/assets/{auth-entry-C-4ysxno.js → auth-entry-DhkhuzaY.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DST2JI3L.js → auth-split-layout-BlG-p1RQ.js} +1 -1
- package/dist/client/assets/{auth-D4IsLayh.js → auth-z6bL2iLM.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BDVwL-5P.js → authenticate-and-persist-oauth-C7P5en8H.js} +1 -1
- package/dist/client/assets/{automation-list-row-LycYRahe.js → automation-list-row-Bu9C738j.js} +1 -1
- package/dist/client/assets/{automation-runs-iHNjJve8.js → automation-runs-B-V_i0FR.js} +1 -1
- package/dist/client/assets/{automations-DWMEb5XV.js → automations-Bnj3R1rO.js} +1 -1
- package/dist/client/assets/{autosend-GI84zBwG.js → autosend-DViO44x-.js} +1 -1
- package/dist/client/assets/{avatar-DxNdLp9n.js → avatar-f9PWmWko.js} +1 -1
- package/dist/client/assets/{badge-C_Mg4qdO.js → badge-D-j0sOs9.js} +1 -1
- package/dist/client/assets/{block-document-BgYUH0Gj.js → block-document-Bp1KtsqP.js} +1 -1
- package/dist/client/assets/{brand-context-CxuCY2eB.js → brand-context-Ce4eNHs8.js} +1 -1
- package/dist/client/assets/{buckets-8J8b9XAD.js → buckets-DFmFwZCi.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-X1tjFXbw.js → bulk-category-panel-CkjZ2spD.js} +1 -1
- package/dist/client/assets/{calendar-NxFpHFVI.js → calendar-CL1lHfJI.js} +1 -1
- package/dist/client/assets/{capability-load-error-C8u5zm-d.js → capability-load-error-DifNtXec.js} +1 -1
- package/dist/client/assets/{card-BwapKz9O.js → card-D4CJeQSR.js} +1 -1
- package/dist/client/assets/{category-editor-DfGVcvdd.js → category-editor-DPATJKY9.js} +1 -1
- package/dist/client/assets/{chat-context-BLLXmTl4.js → chat-context-0yEIHZ6c.js} +1 -1
- package/dist/client/assets/{checkbox-1Y8YBsgp.js → checkbox-JCl8QP8q.js} +1 -1
- package/dist/client/assets/{cli-auth-success-rn8mI1ql.js → cli-auth-success-BfTlukPl.js} +1 -1
- package/dist/client/assets/{collection-detail-DMV0EA2r.js → collection-detail-Bd8G9LY3.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bueecn1b.js → collection-display-button-DRoGXo78.js} +1 -1
- package/dist/client/assets/{collection-search-Dhd-MWF3.js → collection-search-C0RNwRHs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-4Zft-BMU.js → collection-table-wrapper-ByMEj5PE.js} +1 -1
- package/dist/client/assets/{collection-tabs-Ckjyxd1p.js → collection-tabs-Dhx2wMNU.js} +1 -1
- package/dist/client/assets/{command-5HpECQ45.js → command-DjqCY9Vi.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CWc5YZp-.js → commerce-onboarding-D5J7bOeb.js} +1 -1
- package/dist/client/assets/{companions-core-Bo0bVrKT.js → companions-core-Bn5T5Kw9.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-iR3nZqxF.js → connect-desktop-dialog-D_e_16jN.js} +1 -1
- package/dist/client/assets/{connection-card-DZ5MkuQN.js → connection-card-FP7DKtbx.js} +1 -1
- package/dist/client/assets/{connection-detail-DpZTjiG5.js → connection-detail-Cr17GhO0.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BFiV4qdo.js → connection-form-helpers-C7V7pVnH.js} +1 -1
- package/dist/client/assets/{connections-EHSi1V0k.js → connections-WWFvOY1G.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-De2yGYgR.js → decopilot-sse-pool-BNj5yLz-.js} +1 -1
- package/dist/client/assets/{dialog-CjySBreM.js → dialog-pxztKdM4.js} +1 -1
- package/dist/client/assets/{domain-settings-BQIgEw0y.js → domain-settings-IJTQ43bo.js} +1 -1
- package/dist/client/assets/{drawer-D7YMeoWn.js → drawer-eINF-fuO.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DzspVMJ0.js → dropdown-menu-CRae2C9x.js} +1 -1
- package/dist/client/assets/{empty-state-WSd899yx.js → empty-state-DvObzH8u.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C51wl0BG.js → extract-connection-data-CeFGCUkk.js} +1 -1
- package/dist/client/assets/{file-explorer-DFTt7C5O.js → file-explorer-3SJ4vb--.js} +1 -1
- package/dist/client/assets/{file-type-icon-BDBBjFMB.js → file-type-icon-zSQ0dOtZ.js} +1 -1
- package/dist/client/assets/{files-DUeNCS75.js → files-CjIuQ02f.js} +1 -1
- package/dist/client/assets/{form-BmW4fuGO.js → form--yMAb3ro.js} +1 -1
- package/dist/client/assets/{general-BsKr1FQw.js → general-B9pSq-fb.js} +1 -1
- package/dist/client/assets/{github-repo-picker-V4i8D2XC.js → github-repo-picker-Cgx6amzW.js} +1 -1
- package/dist/client/assets/{hooks-CMQCozcv.js → hooks-C8ac-vFI.js} +1 -1
- package/dist/client/assets/{index-Nowz8zhQ.js → index-32Z_4GES.js} +3 -3
- package/dist/client/assets/{index-DTx_Qy8J.js → index-3nwYTcZz.js} +1 -1
- package/dist/client/assets/{index-DAIdmZbY.js → index-BFiY8eXY.js} +1 -1
- package/dist/client/assets/{index-WCdcOzvL.js → index-BSVi3cEY.js} +1 -1
- package/dist/client/assets/{index-nTwrcETn.js → index-Bb03HxpV.js} +1 -1
- package/dist/client/assets/{index-oAhNLukB.js → index-BeXgUXox.js} +2 -2
- package/dist/client/assets/{index-CUb7wlJ8.js → index-BsOcdcPy.js} +1 -1
- package/dist/client/assets/{index-epHSLORM.js → index-CDvq8kTD.js} +1 -1
- package/dist/client/assets/{index-DOct7FuP.js → index-CmqIldWF.js} +1 -1
- package/dist/client/assets/{index-B6C0gko8.js → index-Cx9R0N8d.js} +1 -1
- package/dist/client/assets/{index-C8TDLlwD.js → index-CyCC6Kib.js} +5 -5
- package/dist/client/assets/{index-rE1MnkK8.js → index-SNB4eexL.js} +1 -1
- package/dist/client/assets/{index-DyFCoyav.js → index-ZgzVcEPr.js} +1 -1
- package/dist/client/assets/{index-redirect-GNpxbGgc.js → index-redirect-CiTCXVUI.js} +1 -1
- package/dist/client/assets/{index-Y3LEEFhF.js → index-xVsqSBJP.js} +1 -1
- package/dist/client/assets/{input-3fA4LMl8.js → input-DNRaDhXk.js} +1 -1
- package/dist/client/assets/{integration-icon-BG7JuGkc.js → integration-icon-Bj_L5G59.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BXC6ngjt.js → invite-member-dialog-DTrnC4Ns.js} +1 -1
- package/dist/client/assets/{label-BozT5Wux.js → label-DqJN0Zl6.js} +1 -1
- package/dist/client/assets/{layout-BMUCZgdp.js → layout-BkG06DbR.js} +1 -1
- package/dist/client/assets/{login-Ds9n15-r.js → login-C9VxLGwl.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C_YDrv5G.js → mcp-oauth-ClvvvmOF.js} +1 -1
- package/dist/client/assets/{members-BnZRqkig.js → members-CkIyByQ6.js} +1 -1
- package/dist/client/assets/{monaco-editor-C8cadNAl.js → monaco-editor-D20TtRkQ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bw9YPA0K.js → monitoring-stats-row-DZJthgJ6.js} +1 -1
- package/dist/client/assets/{multi-select-CapD1XSh.js → multi-select-DypU6S8g.js} +1 -1
- package/dist/client/assets/{oauth-callback-DNwFGb7P.js → oauth-callback-CU0eKEdH.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C9H6OX4i.js → oauth-callback-ai-provider-4FUqXMlc.js} +1 -1
- package/dist/client/assets/{onboarding-BY-_dwK9.js → onboarding-C98UvNP1.js} +1 -1
- package/dist/client/assets/{org-install-CRI575c9.js → org-install-DxjPueVj.js} +1 -1
- package/dist/client/assets/{org-layout-Bt2FFRkr.js → org-layout--0dYF5Rt.js} +1 -1
- package/dist/client/assets/{organization-choice-DK2xEd1R.js → organization-choice-BtDkbSqS.js} +1 -1
- package/dist/client/assets/{orgs-D4WtPn0R.js → orgs-Cau5_2Ta.js} +1 -1
- package/dist/client/assets/{page-seo-form-CR43XhbX.js → page-seo-form-DUIIg46E.js} +1 -1
- package/dist/client/assets/page-seo-sheet-ta7l_YbU.js +1 -0
- package/dist/client/assets/{popover-glgnbC3v.js → popover-RIaRL7oB.js} +1 -1
- package/dist/client/assets/{post-editor-D_a0vBUw.js → post-editor-CSFQcBXM.js} +1 -1
- package/dist/client/assets/{primitives-Bqb-P9p9.js → primitives-CcasBN-m.js} +1 -1
- package/dist/client/assets/{profile-D05-jYsT.js → profile-CGP5jgHZ.js} +1 -1
- package/dist/client/assets/project-app-view-DmcoaFOE.js +1 -0
- package/dist/client/assets/record-editor-Dd2x-h5p.js +1 -0
- package/dist/client/assets/redirect-editor-CNwZ4fIt.js +1 -0
- package/dist/client/assets/registry-BLbhzFCc.js +2 -0
- package/dist/client/assets/{registry-layout-Ca9AOhIi.js → registry-layout-DTfv4xqc.js} +1 -1
- package/dist/client/assets/{reports-BhAqntiK.js → reports-CGJDic-D.js} +1 -1
- package/dist/client/assets/{require-capability-BzM255fH.js → require-capability-Dl7MMUtS.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DWyZRHAX.js → required-auth-layout-BN9gLlS8.js} +1 -1
- package/dist/client/assets/{reset-password-KueqrNyi.js → reset-password-Btk86aOM.js} +1 -1
- package/dist/client/assets/{roles-V_W-b16k.js → roles-p1k02HxK.js} +1 -1
- package/dist/client/assets/{search-input-CAmKTdVO.js → search-input-DrcJxljH.js} +1 -1
- package/dist/client/assets/{secrets-BQS1Cy5k.js → secrets-tpvThXzx.js} +1 -1
- package/dist/client/assets/{sections-editor-xn8vK6Jw.js → sections-editor-BuHOy4hR.js} +1 -1
- package/dist/client/assets/{select-kVOB5VIG.js → select-B_NF3ir8.js} +1 -1
- package/dist/client/assets/{select-model-sLi2qZqk.js → select-model-CD-bNwFP.js} +1 -1
- package/dist/client/assets/{self-tool-result-8CBgukHQ.js → self-tool-result-CQ9Oidp5.js} +1 -1
- package/dist/client/assets/{seo-editor-CKX_ySqw.js → seo-editor-tD1KbIp4.js} +1 -1
- package/dist/client/assets/{settings-layout-CAAUqzKA.js → settings-layout-CIwY5Rcg.js} +1 -1
- package/dist/client/assets/{settings-section-rZYw3GPl.js → settings-section-qHo4Kia8.js} +1 -1
- package/dist/client/assets/{shell-controls-A9WwIVwo.js → shell-controls-DJ7fzt-b.js} +1 -1
- package/dist/client/assets/{shell-layout-DSs8OZmx.js → shell-layout-gqjfXR2N.js} +1 -1
- package/dist/client/assets/{sidebar-Crtkz15j.js → sidebar-ChQMKige.js} +1 -1
- package/dist/client/assets/{skeleton-DVIjD8wB.js → skeleton-TPY4BgOd.js} +1 -1
- package/dist/client/assets/{sso-_o-hrfrG.js → sso-DwXA1_HM.js} +1 -1
- package/dist/client/assets/{store-f35SoLKM.js → store-DrJy9eqh.js} +1 -1
- package/dist/client/assets/store-registry-Bsp3lSub.js +2 -0
- package/dist/client/assets/{studio-tools-cNhskad-.js → studio-tools-n8590dlO.js} +1 -1
- package/dist/client/assets/{switch-DN1QTibk.js → switch-Vi8KqJDK.js} +1 -1
- package/dist/client/assets/{table-Ct21uGNd.js → table-4z3VGMcV.js} +1 -1
- package/dist/client/assets/{tabs-ZEFnClG3.js → tabs-C1aAnItW.js} +1 -1
- package/dist/client/assets/{textarea-CG0ejtlq.js → textarea-BIQq3kPx.js} +1 -1
- package/dist/client/assets/{toggle-group-BNpN9wgb.js → toggle-group-Buak4Ijq.js} +1 -1
- package/dist/client/assets/{toolbar-Ct2W1jFL.js → toolbar-ChkgagFk.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CjIzIL2l.js → toolbar-icon-button-D0eZmrE1.js} +1 -1
- package/dist/client/assets/{tooltip-kEEnQetH.js → tooltip-CpOqB12v.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DpDocdYl.js → use-ai-providers-DcaGLvIS.js} +1 -1
- package/dist/client/assets/{use-automations-6e79e8UF.js → use-automations-CuxMc1af.js} +1 -1
- package/dist/client/assets/{use-autosave-BiUJpm1G.js → use-autosave-CKpQpnkI.js} +1 -1
- package/dist/client/assets/{use-capability-BGZRAGkX.js → use-capability-x8vfxJ7c.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D61HjXn8.js → use-clock-tick-BXhg46lH.js} +1 -1
- package/dist/client/assets/{use-collections-B2H96Cd_.js → use-collections-CRs3mssF.js} +1 -1
- package/dist/client/assets/{use-connection-DG2_wlO9.js → use-connection-TbmZTa2Q.js} +1 -1
- package/dist/client/assets/{use-copy-CEj_BXnX.js → use-copy-GJ89hYnU.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-COWok7dO.js → use-create-virtual-mcp-D4A9sXWT.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dxt60MrP.js → use-debounced-autosave-DxPGO2nZ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CIe40zbS.js → use-debounced-value-D3KV6ORm.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CZG61Wrf.js → use-deco-credits-FWA0HDvb.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CEvX3uWe.js → use-decopilot-events-BAuSsk9W.js} +1 -1
- package/dist/client/assets/{use-delete-connection-soRekaGu.js → use-delete-connection-DP2vl3YF.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BdMd9pt_.js → use-deployment-admin-DxJ9HX0C.js} +1 -1
- package/dist/client/assets/{use-file-configs-CXgDsXjp.js → use-file-configs-CuD4x2Qa.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CSE_8QuX.js → use-infinite-scroll-DDA5AXOs.js} +1 -1
- package/dist/client/assets/{use-join-requests-CdkUBYnP.js → use-join-requests-Bv2XJLBI.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CW7FG-gk.js → use-mcp-auth-status-DlG18-0i.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Yu2DyRiC.js → use-mcp-client-Y-YAGLhv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CyWp5ThJ.js → use-mcp-tools-UKnbu9YR.js} +1 -1
- package/dist/client/assets/{use-members-DC3RIu0l.js → use-members-DSdmplcs.js} +1 -1
- package/dist/client/assets/{use-mobile-CjC54hOz.js → use-mobile-Dfj2nxpB.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DfX34xvY.js → use-navigate-to-agent-DYHGQgra.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D6TN1GzE.js → use-org-auth-client-DSB0aKlT.js} +1 -1
- package/dist/client/assets/{use-org-sso-Dl_IgV2v.js → use-org-sso-e8s6CsXn.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CD_WbdmO.js → use-organization-roles-Bq0KJEFt.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DE6qHoOc.js → use-organization-settings-Bj1mes2i.js} +1 -1
- package/dist/client/assets/{use-registry-app-T_fO0rmd.js → use-registry-app-UpQczPyM.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BIXarfRN.js → use-registry-connections-HQz0dDkM.js} +1 -1
- package/dist/client/assets/{use-secrets-Dv2_bLFV.js → use-secrets-CyDme1l0.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C3Jkv53E.js → use-status-sounds-t_gRyaZh.js} +1 -1
- package/dist/client/assets/{use-view-mode-BWVy7VeD.js → use-view-mode-BE4pCHrP.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DzuTpn5m.js → use-virtual-mcp-1CuGEk-Q.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BYifa8Cc.js +1 -0
- package/dist/client/assets/{useRouterState-iy_zI9rp.js → useRouterState-B5TWQiWs.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CgX7veRN.js +1 -0
- package/dist/client/assets/{users-yf7J11su.js → users-BcJP-c4R.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dwk0n2rk.js → variant-calendar-Caqpyytx.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BtY2alMz.js → view-mode-toggle-DhFesbxw.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +457 -457
- package/dist/server/migrate.js +119 -119
- package/dist/server/server.js +299 -299
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-gsPUkeGa.js +0 -1
- package/dist/client/assets/project-app-view-DEhR9d1h.js +0 -1
- package/dist/client/assets/record-editor-Cxm0xgzF.js +0 -1
- package/dist/client/assets/redirect-editor-XsR9ltAa.js +0 -1
- package/dist/client/assets/registry-DG-0-1IE.js +0 -2
- package/dist/client/assets/store-registry-Bir458_t.js +0 -2
- package/dist/client/assets/useInfiniteQuery-62m_Pi3O.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-f7bTRUPV.js +0 -1
package/dist/client/assets/{monitoring-stats-row-Bw9YPA0K.js → monitoring-stats-row-DZJthgJ6.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as f,bB as he,bx as Yr,c as ur,l as ct,j as w}from"./index-
|
|
1
|
+
import{r as f,bB as he,bx as Yr,c as ur,l as ct,j as w}from"./index-32Z_4GES.js";import{w as Hr,e as ke,s as ve,i as V,f as fr,r as ge,h as nt,j as dr,J as it,k as M,m as L,n as de,o as Se,p as Ee,q as re,R as ut,L as pe,t as Vr,v as Pe,x as qr,y as Ur,z as Zr,B as Xr,D as Ne,E as Ve,F as Jr,G as Qr,H as ea,I as ta,K as ze,M as Ke,N as q,O as ft,P as dt,Z as We,Q as vr,S as pr,T as mr,U as Oe,V as yr,W as ee,Y as ra,_ as hr,$ as be,a0 as aa,a1 as ie,a2 as me,a3 as oe,a4 as ye,a5 as gr,a6 as br,a7 as xr,a8 as na,a9 as ia,aa as vt,ab as oa,ac as pt,ad as la,ae as sa,af as ca,ag as ua,ah as fa,ai as Or,aj as da,ak as va,al as pa,am as ma,an as ya,ao as Pr,ap as ha,aq as jr,ar as ga,as as Ar,at as ba,au as xa,av as mt,aw as Oa,ax as Pa,ay as ja,az as Aa,aA as $,aB as ka,aC as Ia,aD as wa,aE as Sa,aF as Ea,aG as Ta,aH as Ca,aI as Da,aJ as Ma,aK as Ba,aL as $a,aM as La,aN as _a,aO as Na,aP as za,X as yt,C as ht,A as Ka,b as Wa,c as gt}from"./AreaChart-BU465nht.js";const kr=Math.cos,Te=Math.sin,U=Math.sqrt,Ce=Math.PI,Re=2*Ce,ot={draw(t,e){const r=U(e/Ce);t.moveTo(r,0),t.arc(0,0,r,0,Re)}},Ra={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Ir=U(1/3),Fa=Ir*2,Ga={draw(t,e){const r=U(e/Fa),a=r*Ir;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ya={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ha=.8908130915292852,wr=Te(Ce/10)/Te(7*Ce/10),Va=Te(Re/10)*wr,qa=-kr(Re/10)*wr,Ua={draw(t,e){const r=U(e*Ha),a=Va*r,n=qa*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=Re*i/5,s=kr(l),d=Te(l);t.lineTo(d*r,-s*r),t.lineTo(s*a-d*n,d*a+s*n)}t.closePath()}},Ge=U(3),Za={draw(t,e){const r=-U(e/(Ge*3));t.moveTo(0,r*2),t.lineTo(-Ge*r,-r),t.lineTo(Ge*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,qe=1/U(12),Xa=(qe/2+1)*3,Ja={draw(t,e){const r=U(e/Xa),a=r/2,n=r*qe,i=a,l=r*qe+r,s=-i,d=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(s,d),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*s-Y*d,Y*s+G*d),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*s+Y*d,G*d-Y*s),t.closePath()}};function Qa(t,e){let r=null,a=Hr(n);t=typeof t=="function"?t:ke(t||ot),e=typeof e=="function"?e:ke(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:ke(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:ke(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var en="Invariant failed";function tn(t,e){throw new Error(en)}var rn=["type","size","sizeType"];function Ue(){return Ue=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ue.apply(null,arguments)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bt(Object(r),!0).forEach(function(a){an(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function an(t,e,r){return(e=nn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nn(t){var e=on(t,"string");return typeof e=="symbol"?e:e+""}function on(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ln(t,e){if(t==null)return{};var r,a,n=sn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function sn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Sr={symbolCircle:ot,symbolCross:Ra,symbolDiamond:Ga,symbolSquare:Ya,symbolStar:Ua,symbolTriangle:Za,symbolWye:Ja},cn=Math.PI/180,un=t=>{var e="symbol".concat(fr(t));return Sr[e]||ot},fn=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*cn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},dn=(t,e)=>{Sr["symbol".concat(fr(t))]=e},Er=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=ln(t,rn),i=xt(xt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var s=()=>{var v=un(l),m=Qa().type(v).size(fn(r,a,l)),y=m();if(y!==null)return y},{className:d,cx:o,cy:c}=i,u=ve(i);return V(o)&&V(c)&&V(r)?f.createElement("path",Ue({},u,{className:he("recharts-symbols",d),transform:"translate(".concat(o,", ").concat(c,")"),d:s()})):null};Er.registerSymbol=dn;var Ot=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},vn=["radius"],pn=["radius"],Pt,jt,At,kt,It,wt,St,Et,Tt,Ct;function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(a){mn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function mn(t,e,r){return(e=yn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yn(t){var e=hn(t,"string");return typeof e=="symbol"?e:e+""}function hn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},De.apply(null,arguments)}function Bt(t,e){if(t==null)return{};var r,a,n=gn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function X(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var $t=(t,e,r,a,n)=>{var i=de(r),l=de(a),s=Math.min(Math.abs(i)/2,Math.abs(l)/2),d=l>=0?1:-1,o=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(s>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>s?s:b}u=M(Pt||(Pt=X(["M",",",""])),t,e+d*v[0]),v[0]>0&&(u+=M(jt||(jt=X(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+o*v[0],e)),u+=M(At||(At=X(["L ",",",""])),t+r-o*v[1],e),v[1]>0&&(u+=M(kt||(kt=X(["A ",",",",0,0,",`,
|
|
2
2
|
`,",",""])),v[1],v[1],c,t+r,e+d*v[1])),u+=M(It||(It=X(["L ",",",""])),t+r,e+a-d*v[2]),v[2]>0&&(u+=M(wt||(wt=X(["A ",",",",0,0,",`,
|
|
3
3
|
`,",",""])),v[2],v[2],c,t+r-o*v[2],e+a)),u+=M(St||(St=X(["L ",",",""])),t+o*v[3],e+a),v[3]>0&&(u+=M(Et||(Et=X(["A ",",",",0,0,",`,
|
|
4
4
|
`,",",""])),v[3],v[3],c,t,e+a-d*v[3])),u+="Z"}else if(s>0&&n===+n&&n>0){var p=Math.min(s,n);u=M(Tt||(Tt=X(["M ",",",`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as he,r as te,l as xe,j as t,B as pe}from"./index-
|
|
1
|
+
import{c as he,r as te,l as xe,j as t,B as pe}from"./index-32Z_4GES.js";import{B as ce}from"./badge-D-j0sOs9.js";import{C as de}from"./checkbox-JCl8QP8q.js";import{t as me}from"./ChevronDown-DnuZlbXl.js";import{b as ge,C as ve,a as ue,c as je,e as Ce,d as be}from"./command-DjqCY9Vi.js";import{P as Ne,a as ye,b as we}from"./popover-RIaRL7oB.js";function Ke(o){const e=he.c(74),{options:n,onValueChange:i,defaultValue:P,placeholder:se,variant:le,animation:ae,maxCount:ne,modalPopover:ie,asChild:oe,className:G,disabled:re,onSearchChange:V}=o;let _;e[0]!==P?(_=P===void 0?[]:P,e[0]=P,e[1]=_):_=e[1];const d=_,L=se===void 0?"Select items":se,E=le===void 0?"default":le,O=ae===void 0?0:ae,k=ne===void 0?3:ne,q=ie===void 0?!1:ie,H=oe===void 0?!1:oe,Q=re===void 0?!1:re,[s,S]=te.useState(d),[U,B]=te.useState(!1);let D,I;e[2]!==d||e[3]!==s?(D=()=>{JSON.stringify(s)!==JSON.stringify(d)&&S(d)},I=[d,s],e[2]=d,e[3]=s,e[4]=D,e[5]=I):(D=e[4],I=e[5]),te.useEffect(D,I);let K;e[6]!==i||e[7]!==s?(K=l=>{if(l.key==="Enter")B(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const a=[...s];a.pop(),S(a),i(a)}},e[6]=i,e[7]=s,e[8]=K):K=e[8];const W=K;let T;e[9]!==i||e[10]!==s?(T=l=>{const a=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];S(a),i(a)},e[9]=i,e[10]=s,e[11]=T):T=e[11];const c=T;let $;e[12]!==i?($=()=>{S([]),i([])},e[12]=i,e[13]=$):$=e[13];const X=$;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{B(Ve)},e[14]=z):z=e[14];const fe=z;let A;e[15]!==X||e[16]!==i||e[17]!==n||e[18]!==s.length?(A=()=>{if(s.length===n.length)X();else{const l=n.map(Pe);S(l),i(l)}},e[15]=X,e[16]=i,e[17]=n,e[18]=s.length,e[19]=A):A=e[19];const r=A;let m;e[20]!==H?(m=H?{}:{variant:"outline"},e[20]=H,e[21]=m):m=e[21];let u;e[22]!==G?(u=xe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",G),e[22]=G,e[23]=u):u=e[23];let f;e[24]!==O||e[25]!==k||e[26]!==n||e[27]!==L||e[28]!==s||e[29]!==E?(f=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const a=n.find(ee=>ee.value===l),w=a?.icon;return t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${O}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:a?.label})]},l)}),s.length>k&&t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${O}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(me,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:L}),t.jsx(me,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=O,e[25]=k,e[26]=n,e[27]=L,e[28]=s,e[29]=E,e[30]=f):f=e[30];let h;e[31]!==Q||e[32]!==m||e[33]!==u||e[34]!==f?(h=t.jsx(Ne,{asChild:!0,children:t.jsx(pe,{ref:null,...m,onClick:fe,className:u,disabled:Q,children:f})}),e[31]=Q,e[32]=m,e[33]=u,e[34]=f,e[35]=h):h=e[35];let J;e[36]===Symbol.for("react.memo_cache_sentinel")?(J=()=>B(!1),e[36]=J):J=e[36];const Y=!V;let x;e[37]!==W||e[38]!==V?(x=t.jsx(ge,{placeholder:"Search...",onKeyDown:W,onValueChange:V,className:"rounded-t-xl"}),e[37]=W,e[38]=V,e[39]=x):x=e[39];let M;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ve,{children:"No results found."}),e[40]=M):M=e[40];let p;e[41]!==r?(p=()=>{r()},e[41]=r,e[42]=p):p=e[42];let g;e[43]!==r?(g=l=>{l.stopPropagation(),r()},e[43]=r,e[44]=g):g=e[44];const Z=s.length===n.length&&n.length>0;let v;e[45]!==Z||e[46]!==r?(v=t.jsx(de,{checked:Z,onCheckedChange:r,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Se}),e[45]=Z,e[46]=r,e[47]=v):v=e[47];let R;e[48]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{children:"(Select All)"}),e[48]=R):R=e[48];let j;e[49]!==g||e[50]!==v?(j=t.jsxs("div",{className:"flex items-center w-full",onClick:g,children:[v,R]}),e[49]=g,e[50]=v,e[51]=j):j=e[51];let C;e[52]!==p||e[53]!==j?(C=t.jsx(ue,{onSelect:p,className:"cursor-pointer",children:j},"all"),e[52]=p,e[53]=j,e[54]=C):C=e[54];let b;if(e[55]!==n||e[56]!==s||e[57]!==c){let l;e[59]!==s||e[60]!==c?(l=a=>{const w=s.includes(a.value);return t.jsx(ue,{onSelect:()=>{c(a)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ee=>{ee.stopPropagation(),c(a)},children:[t.jsx(de,{checked:w,onCheckedChange:()=>{c(a)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:ke}),a.icon&&t.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:a.label})]})},a.value)},e[59]=s,e[60]=c,e[61]=l):l=e[61],b=n.map(l),e[55]=n,e[56]=s,e[57]=c,e[58]=b}else b=e[58];let N;e[62]!==C||e[63]!==b?(N=t.jsxs(je,{className:"rounded-b-xl",children:[M,t.jsxs(Ce,{children:[C,b]})]}),e[62]=C,e[63]=b,e[64]=N):N=e[64];let y;e[65]!==Y||e[66]!==x||e[67]!==N?(y=t.jsx(ye,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:J,children:t.jsxs(be,{shouldFilter:Y,className:"rounded-xl",children:[x,N]})}),e[65]=Y,e[66]=x,e[67]=N,e[68]=y):y=e[68];let F;return e[69]!==U||e[70]!==q||e[71]!==h||e[72]!==y?(F=t.jsxs(we,{open:U,onOpenChange:B,modal:q,children:[h,y]}),e[69]=U,e[70]=q,e[71]=h,e[72]=y,e[73]=F):F=e[73],F}function ke(o){return o.stopPropagation()}function Se(o){return o.stopPropagation()}function Pe(o){return o.value}function Ve(o){return!o}export{Ke as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,i as n}from"./index-
|
|
1
|
+
import{r,j as e,i as n}from"./index-32Z_4GES.js";import{h as l}from"./mcp-oauth-ClvvvmOF.js";import"./auth-z6bL2iLM.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,i as d}from"./index-
|
|
1
|
+
import{r,j as e,i as d}from"./index-32Z_4GES.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-Nowz8zhQ.js";import{R as xe}from"./required-auth-layout-DWyZRHAX.js";import{A as J}from"./auth-split-layout-DST2JI3L.js";import{O as be}from"./organization-choice-DK2xEd1R.js";import{A as de}from"./avatar-DxNdLp9n.js";import{I as je}from"./input-3fA4LMl8.js";import{L as ye}from"./label-BozT5Wux.js";import{S as ve}from"./switch-DN1QTibk.js";import{t as Ne,a as Se}from"./Users03-CfL51rat.js";import{i as we}from"./CheckCircle-DWHd0mHR.js";import{t as ze}from"./Globe04-0xKe5rNv.js";import{a as ke}from"./Palette-Bl_4RcxG.js";import{i as Ce}from"./Upload01-B-T-ayBH.js";import"./User01-BoN0oE28.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
|
|
1
|
+
import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-32Z_4GES.js";import{R as xe}from"./required-auth-layout-BN9gLlS8.js";import{A as J}from"./auth-split-layout-BlG-p1RQ.js";import{O as be}from"./organization-choice-BtDkbSqS.js";import{A as de}from"./avatar-f9PWmWko.js";import{I as je}from"./input-DNRaDhXk.js";import{L as ye}from"./label-DqJN0Zl6.js";import{S as ve}from"./switch-Vi8KqJDK.js";import{t as Ne,a as Se}from"./Users03-01ZOLPet.js";import{i as we}from"./CheckCircle-BSSfIVDh.js";import{t as ze}from"./Globe04-CYEWS6xQ.js";import{a as ke}from"./Palette-wIBeqOmX.js";import{i as Ce}from"./Upload01-CPQnKMdb.js";import"./User01-BErqEcB8.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-
|
|
1
|
+
import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-32Z_4GES.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,j as r,O as s}from"./index-
|
|
1
|
+
import{c as o,j as r,O as s}from"./index-32Z_4GES.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
|
package/dist/client/assets/{organization-choice-DK2xEd1R.js → organization-choice-BtDkbSqS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-
|
|
1
|
+
import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-32Z_4GES.js";import{A as $}from"./avatar-f9PWmWko.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-
|
|
1
|
+
import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-32Z_4GES.js";import{P as T}from"./index-BFiY8eXY.js";import{C as V}from"./collection-table-wrapper-ByMEj5PE.js";import{E as $}from"./empty-state-DvObzH8u.js";import{S as U}from"./search-input-DrcJxljH.js";import{I as H}from"./input-DNRaDhXk.js";import{L as J}from"./label-DqJN0Zl6.js";import{u as W}from"./use-debounced-value-D3KV6ORm.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-pxztKdM4.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-B_NF3ir8.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-ChQMKige.js";import"./LayoutLeft-CoMgIDfR.js";import"./use-mobile-Dfj2nxpB.js";import"./X-DXgmI1I4.js";import"./tooltip-CpOqB12v.js";import"./table-4z3VGMcV.js";import"./ArrowUp-BHLBiz0J.js";import"./SearchMd-B2xdLkpr.js";import"./ChevronUp-SvG4tBeC.js";import"./ChevronDown-DnuZlbXl.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function ke(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-Nowz8zhQ.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-C8TDLlwD.js";import{L as Y}from"./label-BozT5Wux.js";import{S as $}from"./switch-DN1QTibk.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-kVOB5VIG.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
|
|
1
|
+
import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-32Z_4GES.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-CyCC6Kib.js";import{L as Y}from"./label-DqJN0Zl6.js";import{S as $}from"./switch-Vi8KqJDK.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-B_NF3ir8.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as it,r as E,j as e,i as rt}from"./index-32Z_4GES.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-ChQMKige.js";import{m as nt}from"./automation-runs-B-V_i0FR.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DUIIg46E.js";import{r as xt}from"./index-CyCC6Kib.js";import"./LayoutLeft-CoMgIDfR.js";import"./use-mobile-Dfj2nxpB.js";import"./X-DXgmI1I4.js";import"./tooltip-CpOqB12v.js";import"./select-B_NF3ir8.js";import"./ChevronUp-SvG4tBeC.js";import"./ChevronDown-DnuZlbXl.js";import"./useInfiniteQuery-BYifa8Cc.js";import"./use-infinite-scroll-DDA5AXOs.js";import"./use-connection-TbmZTa2Q.js";import"./use-collections-CRs3mssF.js";import"./use-mcp-client-Y-YAGLhv.js";import"./auth-z6bL2iLM.js";import"./use-virtual-mcp-1CuGEk-Q.js";import"./card-D4CJeQSR.js";import"./table-4z3VGMcV.js";import"./empty-state-DvObzH8u.js";import"./use-members-DSdmplcs.js";import"./use-org-auth-client-DSB0aKlT.js";import"./use-clock-tick-BXhg46lH.js";import"./AlertCircle-DriHvGW8.js";import"./CheckCircle-BSSfIVDh.js";import"./DotsVertical-ByzWfjph.js";import"./agent-icon-D4a2yQAy.js";import"./Tool01-1JY4WdfO.js";import"./ArrowUp-BHLBiz0J.js";import"./Settings02-BQIoToME.js";import"./Tool02-CJRfU6-e.js";import"./XCircle-DY497Rjn.js";import"./ArrowUpRight-CsopTrXA.js";import"./TrendUp01-Be3cv-nx.js";import"./ZapSquare-DiXc_WiU.js";import"./ZoomOut-DO1ABQMU.js";import"./Users03-01ZOLPet.js";import"./ChevronRight-D8z61LL4.js";import"./Stars02-D0dtbcP0.js";import"./Copy01-8RoWdlIb.js";import"./Globe01-C6g7oQ38.js";import"./Eye-BMB6Dsvc.js";import"./FilterLines-Cb5gzr5c.js";import"./Star01-BvPb97r4.js";import"./Globe04-CYEWS6xQ.js";import"./SwitchHorizontal01-B5xg5r1q.js";import"./HardDrive-Dv77s3h5.js";import"./Image01-YE-JCd5P.js";import"./Key01-C9Hax98L.js";import"./LinkExternal01-BYMM_QSD.js";import"./Monitor01-CDUuvvya.js";import"./Sun-BNn7fIcF.js";import"./Package-BwfmB-wY.js";import"./Palette-wIBeqOmX.js";import"./Play-CmeXDhbv.js";import"./Plus-DErQhYMo.js";import"./SearchLg-BcyXaR5Z.js";import"./SearchMd-B2xdLkpr.js";import"./Shield01-BnV0ErmL.js";import"./Stars01-Dq_ij1vd.js";import"./Trash01-D68y5OFq.js";import"./Upload01-CPQnKMdb.js";import"./User01-BErqEcB8.js";import"./Users01-CdOl2233.js";import"./XClose-C4EmtqAA.js";import"./Zap-BPdmVchQ.js";import"./use-automations-CuxMc1af.js";import"./studio-tools-n8590dlO.js";import"./useSuspenseInfiniteQuery-CgX7veRN.js";import"./avatar-f9PWmWko.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-GJ89hYnU.js";import"./file-type-icon-zSQ0dOtZ.js";import"./dialog-pxztKdM4.js";import"./tab-id-BijBBRwE.js";import"./hooks-C8ac-vFI.js";import"./decopilot-sse-pool-BNj5yLz-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-0yEIHZ6c.js";import"./autosend-DViO44x-.js";import"./use-ai-providers-DcaGLvIS.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BAuSsk9W.js";import"./use-organization-settings-Bj1mes2i.js";import"./monaco-editor-D20TtRkQ.js";import"./index-BsOcdcPy.js";import"./index-SNB4eexL.js";import"./calendar-CL1lHfJI.js";import"./shell-layout-gqjfXR2N.js";import"./required-auth-layout-BN9gLlS8.js";import"./use-org-sso-e8s6CsXn.js";import"./integration-icon-Bj_L5G59.js";import"./use-navigate-to-agent-DYHGQgra.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BU465nht.js";import"./form--yMAb3ro.js";import"./label-DqJN0Zl6.js";import"./input-DNRaDhXk.js";import"./switch-Vi8KqJDK.js";import"./drawer-eINF-fuO.js";import"./collection-search-C0RNwRHs.js";import"./index-BeXgUXox.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-UpQczPyM.js";import"./use-mcp-tools-UKnbu9YR.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-C7P5en8H.js";import"./mcp-oauth-ClvvvmOF.js";import"./extract-connection-data-CeFGCUkk.js";import"./dropdown-menu-CRae2C9x.js";import"./popover-RIaRL7oB.js";import"./command-DjqCY9Vi.js";import"./index-BSVi3cEY.js";import"./tabs-C1aAnItW.js";import"./toggle-group-Buak4Ijq.js";import"./use-deco-credits-FWA0HDvb.js";import"./connection-card-FP7DKtbx.js";import"./use-registry-connections-HQz0dDkM.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BIQq3kPx.js";import"./connection-form-helpers-C7V7pVnH.js";import"./collection-tabs-Dhx2wMNU.js";import"./badge-D-j0sOs9.js";import"./connect-desktop-dialog-D_e_16jN.js";import"./select-model-CD-bNwFP.js";import"./checkbox-JCl8QP8q.js";import"./skeleton-TPY4BgOd.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-qHo4Kia8.js";import"./index-xVsqSBJP.js";import"./alert-dialog-C0dmYQwl.js";import"./toolbar-ChkgagFk.js";import"./use-debounced-value-D3KV6ORm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-t_gRyaZh.js";import"./use-capability-x8vfxJ7c.js";import"./toolbar-icon-button-D0eZmrE1.js";import"./use-debounced-autosave-DxPGO2nZ.js";import"./index-BFiY8eXY.js";import"./search-input-DrcJxljH.js";import"./use-mcp-auth-status-DlG18-0i.js";import"./github-repo-picker-Cgx6amzW.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CyDme1l0.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Bn5T5Kw9.js";import"./use-file-configs-CuD4x2Qa.js";import"./automation-list-row-Bu9C738j.js";function fi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const q=F,z=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,A=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==z?(l=e.jsx(mt,{className:"text-sm font-semibold",children:z}),t[13]=z,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==A||t[37]!==_?(S=!o||!T&&!A?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=M,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=A,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==q||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:q,children:f}),t[42]=q,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{fi as SeoSheet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-
|
|
1
|
+
import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-32Z_4GES.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...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()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(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(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(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-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,j as t,B as le}from"./index-Nowz8zhQ.js";import{i as ae}from"./AlertCircle-BuBA0Jsv.js";import{n as me}from"./LinkExternal01-BnPXNScW.js";import{aL as pe,h as ne}from"./agent-icon-DNM66yLw.js";import{I as te}from"./input-3fA4LMl8.js";import{L as X}from"./label-BozT5Wux.js";import{M as ce}from"./multi-select-CapD1XSh.js";import{b as ie,c as de,T as se,a as fe}from"./tabs-ZEFnClG3.js";import{T as ue}from"./textarea-CG0ejtlq.js";import{v as xe,w as he,x as ge,o as ve,y as je,z as be,I as ye,A as Ce,B as Ne,C as ke}from"./index-C8TDLlwD.js";import{b as Se,T as Pe,a as we}from"./tooltip-kEEnQetH.js";import{b as _e,a as Be,B as Te}from"./block-document-BgYUH0Gj.js";import{u as Ee}from"./use-autosave-BiUJpm1G.js";import{s as T,E as Fe,R as Re,A as Ae}from"./primitives-Bqb-P9p9.js";import"./Tool01-BQrdfNZF.js";import"./ArrowUp-CnE5bSlE.js";import"./Settings02-C0f9EOYE.js";import"./Tool02-D0kXP67n.js";import"./XCircle-_bqoZd7R.js";import"./ArrowUpRight-BrarzgQo.js";import"./TrendUp01-DOxQREkf.js";import"./ZapSquare-CG9hFqUQ.js";import"./ZoomOut-BtIfQ9L_.js";import"./Users03-CfL51rat.js";import"./CheckCircle-DWHd0mHR.js";import"./ChevronUp-BK_eRMNg.js";import"./ChevronDown-CaTYG158.js";import"./ChevronRight-CtQv00yi.js";import"./DotsVertical-DQtMIeGf.js";import"./Stars02-B29facrE.js";import"./Copy01-Dek2eDIt.js";import"./Globe01-Do6yFDh5.js";import"./Eye-QqRIRc86.js";import"./FilterLines-CEYFlzZT.js";import"./Star01-DKUM2OLa.js";import"./Globe04-0xKe5rNv.js";import"./SwitchHorizontal01-CeAkUsBa.js";import"./HardDrive-DbMUTYVo.js";import"./Image01-Gbgj5Dc9.js";import"./Key01-Cyk64pQ7.js";import"./LayoutLeft-VCtEggEP.js";import"./Monitor01-B29NhA0b.js";import"./Sun-DFAu2We0.js";import"./Package-DBDR5k7j.js";import"./Palette-Bl_4RcxG.js";import"./Play-D6e-8I8N.js";import"./Plus-D7w3kKcq.js";import"./SearchLg-CIgwZ5Ai.js";import"./SearchMd-BM6ErbnQ.js";import"./Shield01-Dk1FolLy.js";import"./Stars01-B1gJMGko.js";import"./Trash01-DqNpHdoG.js";import"./Upload01-B-T-ayBH.js";import"./User01-BoN0oE28.js";import"./Users01-TRsNFQu1.js";import"./XClose-CKYhL0Lj.js";import"./X-Dq1NmIXA.js";import"./Zap-BmsJ5iwW.js";import"./badge-C_Mg4qdO.js";import"./checkbox-1Y8YBsgp.js";import"./command-5HpECQ45.js";import"./index-WCdcOzvL.js";import"./dialog-CjySBreM.js";import"./popover-glgnbC3v.js";import"./chat-context-BLLXmTl4.js";import"./autosend-GI84zBwG.js";import"./hooks-CMQCozcv.js";import"./use-mcp-client-Yu2DyRiC.js";import"./auth-D4IsLayh.js";import"./decopilot-sse-pool-De2yGYgR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-cNhskad-.js";import"./use-virtual-mcp-DzuTpn5m.js";import"./use-collections-B2H96Cd_.js";import"./use-ai-providers-DpDocdYl.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CEvX3uWe.js";import"./use-organization-settings-DE6qHoOc.js";import"./automation-runs-iHNjJve8.js";import"./select-kVOB5VIG.js";import"./useInfiniteQuery-62m_Pi3O.js";import"./use-infinite-scroll-CSE_8QuX.js";import"./use-connection-DG2_wlO9.js";import"./card-BwapKz9O.js";import"./sidebar-Crtkz15j.js";import"./use-mobile-CjC54hOz.js";import"./table-Ct21uGNd.js";import"./empty-state-WSd899yx.js";import"./use-members-DC3RIu0l.js";import"./use-org-auth-client-D6TN1GzE.js";import"./use-clock-tick-D61HjXn8.js";import"./use-automations-6e79e8UF.js";import"./useSuspenseInfiniteQuery-f7bTRUPV.js";import"./avatar-DxNdLp9n.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CEj_BXnX.js";import"./file-type-icon-BDBBjFMB.js";import"./monaco-editor-C8cadNAl.js";import"./index-CUb7wlJ8.js";import"./index-rE1MnkK8.js";import"./calendar-NxFpHFVI.js";import"./shell-layout-DSs8OZmx.js";import"./required-auth-layout-DWyZRHAX.js";import"./use-org-sso-Dl_IgV2v.js";import"./integration-icon-BG7JuGkc.js";import"./use-navigate-to-agent-DfX34xvY.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-TRgmv_Wd.js";import"./form-BmW4fuGO.js";import"./drawer-D7YMeoWn.js";import"./collection-search-Dhd-MWF3.js";import"./index-oAhNLukB.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-T_fO0rmd.js";import"./use-mcp-tools-CyWp5ThJ.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-BDVwL-5P.js";import"./mcp-oauth-C_YDrv5G.js";import"./extract-connection-data-C51wl0BG.js";import"./dropdown-menu-DzspVMJ0.js";import"./toggle-group-BNpN9wgb.js";import"./use-deco-credits-CZG61Wrf.js";import"./connection-card-DZ5MkuQN.js";import"./use-registry-connections-BIXarfRN.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-BFiV4qdo.js";import"./collection-tabs-Ckjyxd1p.js";import"./connect-desktop-dialog-iR3nZqxF.js";import"./select-model-sLi2qZqk.js";import"./skeleton-DVIjD8wB.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-rZYw3GPl.js";import"./index-Y3LEEFhF.js";import"./alert-dialog-CdnwIQoa.js";import"./toolbar-Ct2W1jFL.js";import"./use-debounced-value-CIe40zbS.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C3Jkv53E.js";import"./use-capability-BGZRAGkX.js";import"./toolbar-icon-button-CjIzIL2l.js";import"./use-debounced-autosave-Dxt60MrP.js";import"./index-DAIdmZbY.js";import"./search-input-CAmKTdVO.js";import"./use-mcp-auth-status-CW7FG-gk.js";import"./switch-DN1QTibk.js";import"./github-repo-picker-V4i8D2XC.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-Dv2_bLFV.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Bo0bVrKT.js";import"./use-file-configs-CXgDsXjp.js";import"./automation-list-row-LycYRahe.js";function Le(j){return Array.isArray(j)?j.map(e=>({key:T(e?.key),value:T(e?.value)})):[]}function As(j){const e=Y.c(82),{orgSlug:s,virtualMcpId:r,branch:i,blockKey:f,block:m,decofile:a,meta:c,previewBaseUrl:h}=j;let x;e[0]!==i||e[1]!==s||e[2]!==r?(x={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=x):x=e[3];const l=xe(x);let p;e[4]!==m?(p=he(m,"posts"),e[4]=m,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==l?(n=E=>{l.mutate({blockKey:f,data:je(f,"posts",be(E))})},e[6]=f,e[7]=l,e[8]=n):n=e[8];const[o,N]=Ee(d,n);let k;e[9]!==o||e[10]!==N?(k=(E,re)=>N({...o,[E]:re}),e[9]=o,e[10]=N,e[11]=k):k=e[11];const b=k;let S;e[12]!==a||e[13]!==o||e[14]!==h?(S=_e({decofile:a,post:o,previewBaseUrl:h}),e[12]=a,e[13]=o,e[14]=h,e[15]=S):S=e[15];const y=S;let g,v,P,w;e[16]!==o?(v=ge(o),g=v.length>0,P=v.length===1?"field":"fields",w=v.join(", "),e[16]=o,e[17]=g,e[18]=v,e[19]=P,e[20]=w):(g=e[17],v=e[18],P=e[19],w=e[20]);const _=`Missing required ${P}: ${w}`;let C;e[21]!==o.title?(C=T(o.title)||"Untitled post",e[21]=o.title,e[22]=C):C=e[22];let B;e[23]!==C?(B=t.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[23]=C,e[24]=B):B=e[24];let u;e[25]!==g||e[26]!==v||e[27]!==_?(u=g&&t.jsxs(Se,{children:[t.jsx(Pe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(ae,{size:14}),v.length," ",v.length===1?"issue":"issues"]})}),t.jsx(we,{side:"bottom",children:_})]}),e[25]=g,e[26]=v,e[27]=_,e[28]=u):u=e[28];let F;e[29]!==l.isError||e[30]!==l.isPending?(F=t.jsx(ve,{isPending:l.isPending,isError:l.isError}),e[29]=l.isError,e[30]=l.isPending,e[31]=F):F=e[31];const Z=!y||g,ee=g?_:y?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let R;e[32]!==g||e[33]!==y?(R=()=>{y&&!g&&window.open(y,"_blank","noopener,noreferrer")},e[32]=g,e[33]=y,e[34]=R):R=e[34];let H;e[35]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(me,{size:14}),e[35]=H):H=e[35];let A;e[36]!==Z||e[37]!==ee||e[38]!==R?(A=t.jsxs(le,{type:"button",variant:"outline",size:"sm",disabled:Z,title:ee,onClick:R,children:[H,"See preview"]}),e[36]=Z,e[37]=ee,e[38]=R,e[39]=A):A=e[39];let L;e[40]!==u||e[41]!==F||e[42]!==A?(L=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[u,F,A]}),e[40]=u,e[41]=F,e[42]=A,e[43]=L):L=e[43];let $;e[44]!==L||e[45]!==B?($=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[B,L]}),e[44]=L,e[45]=B,e[46]=$):$=e[46];let M;e[47]!==o.title?(M=T(o.title),e[47]=o.title,e[48]=M):M=e[48];let I;e[49]!==b?(I=E=>b("title",E),e[49]=b,e[50]=I):I=e[50];let U;e[51]!==M||e[52]!==I?(U=t.jsx(Fe,{value:M,onChange:I,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[51]=M,e[52]=I,e[53]=U):U=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsxs(ie,{value:"content",children:[t.jsx(pe,{}),"Content"]}),e[54]=J):J=e[54];let Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsxs(de,{children:[J,t.jsxs(ie,{value:"settings",children:[t.jsx(ne,{}),"Settings"]})]}),e[55]=Q):Q=e[55];let V;e[56]!==o.sections?(V=Be(o.sections),e[56]=o.sections,e[57]=V):V=e[57];let z;e[58]!==b?(z=E=>b("sections",E),e[58]=b,e[59]=z):z=e[59];let D;e[60]!==i||e[61]!==s||e[62]!==r?(D={orgSlug:s,virtualMcpId:r,branch:i},e[60]=i,e[61]=s,e[62]=r,e[63]=D):D=e[63];let q;e[64]!==c||e[65]!==V||e[66]!==z||e[67]!==D?(q=t.jsx(se,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Te,{value:V,onChange:z,meta:c,sandboxRef:D,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[64]=c,e[65]=V,e[66]=z,e[67]=D,e[68]=q):q=e[68];let K;e[69]!==a||e[70]!==o||e[71]!==b?(K=t.jsx(se,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx($e,{post:o,decofile:a,onChange:b})})}),e[69]=a,e[70]=o,e[71]=b,e[72]=K):K=e[72];let O;e[73]!==q||e[74]!==K?(O=t.jsxs(fe,{defaultValue:"content",className:"mt-6 gap-4",children:[Q,q,K]}),e[73]=q,e[74]=K,e[75]=O):O=e[75];let G;e[76]!==U||e[77]!==O?(G=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,O]})}),e[76]=U,e[77]=O,e[78]=G):G=e[78];let W;return e[79]!==$||e[80]!==G?(W=t.jsxs("div",{className:"flex h-full flex-col",children:[$,G]}),e[79]=$,e[80]=G,e[81]=W):W=e[81],W}function $e(j){const e=Y.c(57),{post:s,decofile:r,onChange:i}=j;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let m;e[1]!==s.excerpt?(m=T(s.excerpt),e[1]=s.excerpt,e[2]=m):m=e[2];let a;e[3]!==i?(a=u=>i("excerpt",u.target.value),e[3]=i,e[4]=a):a=e[4];let c;e[5]!==m||e[6]!==a?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(ue,{id:"post-excerpt",value:m,onChange:a,rows:2})]}),e[5]=m,e[6]=a,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(X,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==s.slug?(x=T(s.slug),e[9]=s.slug,e[10]=x):x=e[10];let l;e[11]!==i?(l=u=>i("slug",u.target.value),e[11]=i,e[12]=l):l=e[12];let p;e[13]!==x||e[14]!==l?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(te,{id:"post-slug",value:x,onChange:l,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=l,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==s.date?(n=T(s.date),e[17]=s.date,e[18]=n):n=e[18];let o;e[19]!==i?(o=u=>i("date",u),e[19]=i,e[20]=o):o=e[20];let N;e[21]!==n||e[22]!==o?(N=t.jsx(ke,{schema:d,value:n,onChange:o,path:"post-date",label:"Date"}),e[21]=n,e[22]=o,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==p?(k=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=k):k=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={type:"string",format:"image-uri",title:"Cover image"},e[27]=b):b=e[27];let S;e[28]!==i?(S=u=>i("image",u),e[28]=i,e[29]=S):S=e[29];let y;e[30]!==s.image||e[31]!==S?(y=t.jsx(ye,{schema:b,value:s.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=s.image,e[31]=S,e[32]=y):y=e[32];let g;e[33]!==i?(g=u=>i("authors",u),e[33]=i,e[34]=g):g=e[34];let v;e[35]!==r||e[36]!==s.authors||e[37]!==g?(v=t.jsx(oe,{label:"Authors",decofile:r,kind:"authors",valueField:"email",toRef:Ie,selected:s.authors,onChange:g}),e[35]=r,e[36]=s.authors,e[37]=g,e[38]=v):v=e[38];let P;e[39]!==i?(P=u=>i("categories",u),e[39]=i,e[40]=P):P=e[40];let w;e[41]!==r||e[42]!==s.categories||e[43]!==P?(w=t.jsx(oe,{label:"Categories",decofile:r,kind:"categories",valueField:"slug",toRef:Me,selected:s.categories,onChange:P}),e[41]=r,e[42]=s.categories,e[43]=P,e[44]=w):w=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let C;e[47]!==s.extraProps||e[48]!==_?(C=t.jsx(Ue,{value:s.extraProps,onChange:_}),e[47]=s.extraProps,e[48]=_,e[49]=C):C=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==v||e[53]!==w||e[54]!==C||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,k,y,v,w,C]}),e[50]=k,e[51]=y,e[52]=v,e[53]=w,e[54]=C,e[55]=c,e[56]=B):B=e[56],B}function Me(j){return{name:T(j.name),slug:T(j.slug)}}function Ie(j){return{...j}}function Ue(j){const e=Y.c(15),{value:s,onChange:r}=j;let i,f,m,a;if(e[0]!==r||e[1]!==s){i=Le(s);const x=(l,p)=>r(i.map((d,n)=>n===l?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(X,{children:"Extra props"}),e[6]=m):m=e[6],a=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((l,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(te,{value:l.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(te,{value:l.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(Re,{label:"Remove prop",onClick:()=>r(i.filter((d,n)=>n!==p))})]},p))}),e[0]=r,e[1]=s,e[2]=i,e[3]=f,e[4]=m,e[5]=a}else i=e[2],f=e[3],m=e[4],a=e[5];let c;e[7]!==i||e[8]!==r?(c=t.jsx(Ae,{label:"Add prop",onClick:()=>r([...i,{key:"",value:""}])}),e[7]=i,e[8]=r,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==m||e[12]!==a||e[13]!==c?(h=t.jsxs("div",{className:f,children:[m,a,c]}),e[10]=f,e[11]=m,e[12]=a,e[13]=c,e[14]=h):h=e[14],h}function oe(j){const e=Y.c(17),{label:s,decofile:r,kind:i,valueField:f,toRef:m,selected:a,onChange:c}=j;let h;e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==m||e[4]!==f?(h=Ce({records:Ne(r,i),selected:a,valueField:f,toRef:m}),e[0]=r,e[1]=i,e[2]=a,e[3]=m,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:l,refsForValues:p}=h;let d;e[6]!==s?(d=t.jsx(X,{children:s}),e[6]=s,e[7]=d):d=e[7];let n;e[8]!==s||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==l?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",s.toLowerCase()," yet — create some in the"," ",s.toLowerCase()," collection."]}):t.jsx(ce,{options:x,defaultValue:l,onValueChange:N=>c(p(N)),placeholder:`Select ${s.toLowerCase()}`,maxCount:4}),e[8]=s,e[9]=c,e[10]=x,e[11]=p,e[12]=l,e[13]=n):n=e[13];let o;return e[14]!==d||e[15]!==n?(o=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=o):o=e[16],o}export{As as PostEditor};
|
|
1
|
+
import{c as Y,j as t,B as le}from"./index-32Z_4GES.js";import{i as ae}from"./AlertCircle-DriHvGW8.js";import{n as me}from"./LinkExternal01-BYMM_QSD.js";import{aL as pe,h as ne}from"./agent-icon-D4a2yQAy.js";import{I as te}from"./input-DNRaDhXk.js";import{L as X}from"./label-DqJN0Zl6.js";import{M as ce}from"./multi-select-DypU6S8g.js";import{b as ie,c as de,T as se,a as fe}from"./tabs-C1aAnItW.js";import{T as ue}from"./textarea-BIQq3kPx.js";import{v as xe,w as he,x as ge,o as ve,y as je,z as be,I as ye,A as Ce,B as Ne,C as ke}from"./index-CyCC6Kib.js";import{b as Se,T as Pe,a as we}from"./tooltip-CpOqB12v.js";import{b as _e,a as Be,B as Te}from"./block-document-Bp1KtsqP.js";import{u as Ee}from"./use-autosave-CKpQpnkI.js";import{s as T,E as Fe,R as Re,A as Ae}from"./primitives-CcasBN-m.js";import"./Tool01-1JY4WdfO.js";import"./ArrowUp-BHLBiz0J.js";import"./Settings02-BQIoToME.js";import"./Tool02-CJRfU6-e.js";import"./XCircle-DY497Rjn.js";import"./ArrowUpRight-CsopTrXA.js";import"./TrendUp01-Be3cv-nx.js";import"./ZapSquare-DiXc_WiU.js";import"./ZoomOut-DO1ABQMU.js";import"./Users03-01ZOLPet.js";import"./CheckCircle-BSSfIVDh.js";import"./ChevronUp-SvG4tBeC.js";import"./ChevronDown-DnuZlbXl.js";import"./ChevronRight-D8z61LL4.js";import"./DotsVertical-ByzWfjph.js";import"./Stars02-D0dtbcP0.js";import"./Copy01-8RoWdlIb.js";import"./Globe01-C6g7oQ38.js";import"./Eye-BMB6Dsvc.js";import"./FilterLines-Cb5gzr5c.js";import"./Star01-BvPb97r4.js";import"./Globe04-CYEWS6xQ.js";import"./SwitchHorizontal01-B5xg5r1q.js";import"./HardDrive-Dv77s3h5.js";import"./Image01-YE-JCd5P.js";import"./Key01-C9Hax98L.js";import"./LayoutLeft-CoMgIDfR.js";import"./Monitor01-CDUuvvya.js";import"./Sun-BNn7fIcF.js";import"./Package-BwfmB-wY.js";import"./Palette-wIBeqOmX.js";import"./Play-CmeXDhbv.js";import"./Plus-DErQhYMo.js";import"./SearchLg-BcyXaR5Z.js";import"./SearchMd-B2xdLkpr.js";import"./Shield01-BnV0ErmL.js";import"./Stars01-Dq_ij1vd.js";import"./Trash01-D68y5OFq.js";import"./Upload01-CPQnKMdb.js";import"./User01-BErqEcB8.js";import"./Users01-CdOl2233.js";import"./XClose-C4EmtqAA.js";import"./X-DXgmI1I4.js";import"./Zap-BPdmVchQ.js";import"./badge-D-j0sOs9.js";import"./checkbox-JCl8QP8q.js";import"./command-DjqCY9Vi.js";import"./index-BSVi3cEY.js";import"./dialog-pxztKdM4.js";import"./popover-RIaRL7oB.js";import"./chat-context-0yEIHZ6c.js";import"./autosend-DViO44x-.js";import"./hooks-C8ac-vFI.js";import"./use-mcp-client-Y-YAGLhv.js";import"./auth-z6bL2iLM.js";import"./decopilot-sse-pool-BNj5yLz-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-n8590dlO.js";import"./use-virtual-mcp-1CuGEk-Q.js";import"./use-collections-CRs3mssF.js";import"./use-ai-providers-DcaGLvIS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BAuSsk9W.js";import"./use-organization-settings-Bj1mes2i.js";import"./automation-runs-B-V_i0FR.js";import"./select-B_NF3ir8.js";import"./useInfiniteQuery-BYifa8Cc.js";import"./use-infinite-scroll-DDA5AXOs.js";import"./use-connection-TbmZTa2Q.js";import"./card-D4CJeQSR.js";import"./sidebar-ChQMKige.js";import"./use-mobile-Dfj2nxpB.js";import"./table-4z3VGMcV.js";import"./empty-state-DvObzH8u.js";import"./use-members-DSdmplcs.js";import"./use-org-auth-client-DSB0aKlT.js";import"./use-clock-tick-BXhg46lH.js";import"./use-automations-CuxMc1af.js";import"./useSuspenseInfiniteQuery-CgX7veRN.js";import"./avatar-f9PWmWko.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-GJ89hYnU.js";import"./file-type-icon-zSQ0dOtZ.js";import"./monaco-editor-D20TtRkQ.js";import"./index-BsOcdcPy.js";import"./index-SNB4eexL.js";import"./calendar-CL1lHfJI.js";import"./shell-layout-gqjfXR2N.js";import"./required-auth-layout-BN9gLlS8.js";import"./use-org-sso-e8s6CsXn.js";import"./integration-icon-Bj_L5G59.js";import"./use-navigate-to-agent-DYHGQgra.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BU465nht.js";import"./form--yMAb3ro.js";import"./drawer-eINF-fuO.js";import"./collection-search-C0RNwRHs.js";import"./index-BeXgUXox.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-UpQczPyM.js";import"./use-mcp-tools-UKnbu9YR.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-C7P5en8H.js";import"./mcp-oauth-ClvvvmOF.js";import"./extract-connection-data-CeFGCUkk.js";import"./dropdown-menu-CRae2C9x.js";import"./toggle-group-Buak4Ijq.js";import"./use-deco-credits-FWA0HDvb.js";import"./connection-card-FP7DKtbx.js";import"./use-registry-connections-HQz0dDkM.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-C7V7pVnH.js";import"./collection-tabs-Dhx2wMNU.js";import"./connect-desktop-dialog-D_e_16jN.js";import"./select-model-CD-bNwFP.js";import"./skeleton-TPY4BgOd.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-qHo4Kia8.js";import"./index-xVsqSBJP.js";import"./alert-dialog-C0dmYQwl.js";import"./toolbar-ChkgagFk.js";import"./use-debounced-value-D3KV6ORm.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-t_gRyaZh.js";import"./use-capability-x8vfxJ7c.js";import"./toolbar-icon-button-D0eZmrE1.js";import"./use-debounced-autosave-DxPGO2nZ.js";import"./index-BFiY8eXY.js";import"./search-input-DrcJxljH.js";import"./use-mcp-auth-status-DlG18-0i.js";import"./switch-Vi8KqJDK.js";import"./github-repo-picker-Cgx6amzW.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CyDme1l0.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Bn5T5Kw9.js";import"./use-file-configs-CuD4x2Qa.js";import"./automation-list-row-Bu9C738j.js";function Le(j){return Array.isArray(j)?j.map(e=>({key:T(e?.key),value:T(e?.value)})):[]}function As(j){const e=Y.c(82),{orgSlug:s,virtualMcpId:r,branch:i,blockKey:f,block:m,decofile:a,meta:c,previewBaseUrl:h}=j;let x;e[0]!==i||e[1]!==s||e[2]!==r?(x={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=x):x=e[3];const l=xe(x);let p;e[4]!==m?(p=he(m,"posts"),e[4]=m,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==l?(n=E=>{l.mutate({blockKey:f,data:je(f,"posts",be(E))})},e[6]=f,e[7]=l,e[8]=n):n=e[8];const[o,N]=Ee(d,n);let k;e[9]!==o||e[10]!==N?(k=(E,re)=>N({...o,[E]:re}),e[9]=o,e[10]=N,e[11]=k):k=e[11];const b=k;let S;e[12]!==a||e[13]!==o||e[14]!==h?(S=_e({decofile:a,post:o,previewBaseUrl:h}),e[12]=a,e[13]=o,e[14]=h,e[15]=S):S=e[15];const y=S;let g,v,P,w;e[16]!==o?(v=ge(o),g=v.length>0,P=v.length===1?"field":"fields",w=v.join(", "),e[16]=o,e[17]=g,e[18]=v,e[19]=P,e[20]=w):(g=e[17],v=e[18],P=e[19],w=e[20]);const _=`Missing required ${P}: ${w}`;let C;e[21]!==o.title?(C=T(o.title)||"Untitled post",e[21]=o.title,e[22]=C):C=e[22];let B;e[23]!==C?(B=t.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[23]=C,e[24]=B):B=e[24];let u;e[25]!==g||e[26]!==v||e[27]!==_?(u=g&&t.jsxs(Se,{children:[t.jsx(Pe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(ae,{size:14}),v.length," ",v.length===1?"issue":"issues"]})}),t.jsx(we,{side:"bottom",children:_})]}),e[25]=g,e[26]=v,e[27]=_,e[28]=u):u=e[28];let F;e[29]!==l.isError||e[30]!==l.isPending?(F=t.jsx(ve,{isPending:l.isPending,isError:l.isError}),e[29]=l.isError,e[30]=l.isPending,e[31]=F):F=e[31];const Z=!y||g,ee=g?_:y?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let R;e[32]!==g||e[33]!==y?(R=()=>{y&&!g&&window.open(y,"_blank","noopener,noreferrer")},e[32]=g,e[33]=y,e[34]=R):R=e[34];let H;e[35]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(me,{size:14}),e[35]=H):H=e[35];let A;e[36]!==Z||e[37]!==ee||e[38]!==R?(A=t.jsxs(le,{type:"button",variant:"outline",size:"sm",disabled:Z,title:ee,onClick:R,children:[H,"See preview"]}),e[36]=Z,e[37]=ee,e[38]=R,e[39]=A):A=e[39];let L;e[40]!==u||e[41]!==F||e[42]!==A?(L=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[u,F,A]}),e[40]=u,e[41]=F,e[42]=A,e[43]=L):L=e[43];let $;e[44]!==L||e[45]!==B?($=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[B,L]}),e[44]=L,e[45]=B,e[46]=$):$=e[46];let M;e[47]!==o.title?(M=T(o.title),e[47]=o.title,e[48]=M):M=e[48];let I;e[49]!==b?(I=E=>b("title",E),e[49]=b,e[50]=I):I=e[50];let U;e[51]!==M||e[52]!==I?(U=t.jsx(Fe,{value:M,onChange:I,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[51]=M,e[52]=I,e[53]=U):U=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsxs(ie,{value:"content",children:[t.jsx(pe,{}),"Content"]}),e[54]=J):J=e[54];let Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsxs(de,{children:[J,t.jsxs(ie,{value:"settings",children:[t.jsx(ne,{}),"Settings"]})]}),e[55]=Q):Q=e[55];let V;e[56]!==o.sections?(V=Be(o.sections),e[56]=o.sections,e[57]=V):V=e[57];let z;e[58]!==b?(z=E=>b("sections",E),e[58]=b,e[59]=z):z=e[59];let D;e[60]!==i||e[61]!==s||e[62]!==r?(D={orgSlug:s,virtualMcpId:r,branch:i},e[60]=i,e[61]=s,e[62]=r,e[63]=D):D=e[63];let q;e[64]!==c||e[65]!==V||e[66]!==z||e[67]!==D?(q=t.jsx(se,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Te,{value:V,onChange:z,meta:c,sandboxRef:D,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[64]=c,e[65]=V,e[66]=z,e[67]=D,e[68]=q):q=e[68];let K;e[69]!==a||e[70]!==o||e[71]!==b?(K=t.jsx(se,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx($e,{post:o,decofile:a,onChange:b})})}),e[69]=a,e[70]=o,e[71]=b,e[72]=K):K=e[72];let O;e[73]!==q||e[74]!==K?(O=t.jsxs(fe,{defaultValue:"content",className:"mt-6 gap-4",children:[Q,q,K]}),e[73]=q,e[74]=K,e[75]=O):O=e[75];let G;e[76]!==U||e[77]!==O?(G=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,O]})}),e[76]=U,e[77]=O,e[78]=G):G=e[78];let W;return e[79]!==$||e[80]!==G?(W=t.jsxs("div",{className:"flex h-full flex-col",children:[$,G]}),e[79]=$,e[80]=G,e[81]=W):W=e[81],W}function $e(j){const e=Y.c(57),{post:s,decofile:r,onChange:i}=j;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let m;e[1]!==s.excerpt?(m=T(s.excerpt),e[1]=s.excerpt,e[2]=m):m=e[2];let a;e[3]!==i?(a=u=>i("excerpt",u.target.value),e[3]=i,e[4]=a):a=e[4];let c;e[5]!==m||e[6]!==a?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(ue,{id:"post-excerpt",value:m,onChange:a,rows:2})]}),e[5]=m,e[6]=a,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(X,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==s.slug?(x=T(s.slug),e[9]=s.slug,e[10]=x):x=e[10];let l;e[11]!==i?(l=u=>i("slug",u.target.value),e[11]=i,e[12]=l):l=e[12];let p;e[13]!==x||e[14]!==l?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(te,{id:"post-slug",value:x,onChange:l,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=l,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==s.date?(n=T(s.date),e[17]=s.date,e[18]=n):n=e[18];let o;e[19]!==i?(o=u=>i("date",u),e[19]=i,e[20]=o):o=e[20];let N;e[21]!==n||e[22]!==o?(N=t.jsx(ke,{schema:d,value:n,onChange:o,path:"post-date",label:"Date"}),e[21]=n,e[22]=o,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==p?(k=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=k):k=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={type:"string",format:"image-uri",title:"Cover image"},e[27]=b):b=e[27];let S;e[28]!==i?(S=u=>i("image",u),e[28]=i,e[29]=S):S=e[29];let y;e[30]!==s.image||e[31]!==S?(y=t.jsx(ye,{schema:b,value:s.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=s.image,e[31]=S,e[32]=y):y=e[32];let g;e[33]!==i?(g=u=>i("authors",u),e[33]=i,e[34]=g):g=e[34];let v;e[35]!==r||e[36]!==s.authors||e[37]!==g?(v=t.jsx(oe,{label:"Authors",decofile:r,kind:"authors",valueField:"email",toRef:Ie,selected:s.authors,onChange:g}),e[35]=r,e[36]=s.authors,e[37]=g,e[38]=v):v=e[38];let P;e[39]!==i?(P=u=>i("categories",u),e[39]=i,e[40]=P):P=e[40];let w;e[41]!==r||e[42]!==s.categories||e[43]!==P?(w=t.jsx(oe,{label:"Categories",decofile:r,kind:"categories",valueField:"slug",toRef:Me,selected:s.categories,onChange:P}),e[41]=r,e[42]=s.categories,e[43]=P,e[44]=w):w=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let C;e[47]!==s.extraProps||e[48]!==_?(C=t.jsx(Ue,{value:s.extraProps,onChange:_}),e[47]=s.extraProps,e[48]=_,e[49]=C):C=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==v||e[53]!==w||e[54]!==C||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,k,y,v,w,C]}),e[50]=k,e[51]=y,e[52]=v,e[53]=w,e[54]=C,e[55]=c,e[56]=B):B=e[56],B}function Me(j){return{name:T(j.name),slug:T(j.slug)}}function Ie(j){return{...j}}function Ue(j){const e=Y.c(15),{value:s,onChange:r}=j;let i,f,m,a;if(e[0]!==r||e[1]!==s){i=Le(s);const x=(l,p)=>r(i.map((d,n)=>n===l?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(X,{children:"Extra props"}),e[6]=m):m=e[6],a=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((l,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(te,{value:l.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(te,{value:l.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(Re,{label:"Remove prop",onClick:()=>r(i.filter((d,n)=>n!==p))})]},p))}),e[0]=r,e[1]=s,e[2]=i,e[3]=f,e[4]=m,e[5]=a}else i=e[2],f=e[3],m=e[4],a=e[5];let c;e[7]!==i||e[8]!==r?(c=t.jsx(Ae,{label:"Add prop",onClick:()=>r([...i,{key:"",value:""}])}),e[7]=i,e[8]=r,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==m||e[12]!==a||e[13]!==c?(h=t.jsxs("div",{className:f,children:[m,a,c]}),e[10]=f,e[11]=m,e[12]=a,e[13]=c,e[14]=h):h=e[14],h}function oe(j){const e=Y.c(17),{label:s,decofile:r,kind:i,valueField:f,toRef:m,selected:a,onChange:c}=j;let h;e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==m||e[4]!==f?(h=Ce({records:Ne(r,i),selected:a,valueField:f,toRef:m}),e[0]=r,e[1]=i,e[2]=a,e[3]=m,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:l,refsForValues:p}=h;let d;e[6]!==s?(d=t.jsx(X,{children:s}),e[6]=s,e[7]=d):d=e[7];let n;e[8]!==s||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==l?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",s.toLowerCase()," yet — create some in the"," ",s.toLowerCase()," collection."]}):t.jsx(ce,{options:x,defaultValue:l,onValueChange:N=>c(p(N)),placeholder:`Select ${s.toLowerCase()}`,maxCount:4}),e[8]=s,e[9]=c,e[10]=x,e[11]=p,e[12]=l,e[13]=n):n=e[13];let o;return e[14]!==d||e[15]!==n?(o=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=o):o=e[16],o}export{As as PostEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as h,j as a}from"./index-
|
|
1
|
+
import{c as f,l as h,j as a}from"./index-32Z_4GES.js";import{k as y}from"./agent-icon-D4a2yQAy.js";import{s as v}from"./Plus-DErQhYMo.js";import{s as j}from"./Trash01-D68y5OFq.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,j as t,a as D,M as R,ah as U,U as q,p as N,t as T}from"./index-
|
|
1
|
+
import{c as V,j as t,a as D,M as R,ah as U,U as q,p as N,t as T}from"./index-32Z_4GES.js";import{P as L}from"./index-BFiY8eXY.js";import{A as B}from"./avatar-f9PWmWko.js";import{S as I}from"./switch-Vi8KqJDK.js";import{S as G,a as Y,d as $,c as K}from"./select-B_NF3ir8.js";import{a as M,T as z}from"./toggle-group-Buak4Ijq.js";import{I as O}from"./input-DNRaDhXk.js";import{i as H}from"./Monitor01-CDUuvvya.js";import{n as J,a as Q}from"./Sun-BNn7fIcF.js";import{i as W}from"./Play-CmeXDhbv.js";import{u as X}from"./use-debounced-autosave-DxPGO2nZ.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-CmqIldWF.js";import{c as te,b as A,S as E,a as F}from"./settings-section-qHo4Kia8.js";import"./sidebar-ChQMKige.js";import"./LayoutLeft-CoMgIDfR.js";import"./use-mobile-Dfj2nxpB.js";import"./X-DXgmI1I4.js";import"./tooltip-CpOqB12v.js";import"./User01-BErqEcB8.js";import"./ChevronUp-SvG4tBeC.js";import"./ChevronDown-DnuZlbXl.js";import"./card-D4CJeQSR.js";import"./ArrowUpRight-CsopTrXA.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const r=n.getValues(),f=n.control._defaultValues;n.reset(r,{keepValues:!0});try{await D.updateUser({name:r.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:d}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(B,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==d||e[8]!==x?(l=g=>{const{field:r}=g;return t.jsx(O,{id:"display-name",...r,onChange:f=>{r.onChange(f),x()},onBlur:()=>{r.onBlur(),d()},onKeyDown:f=>{f.key==="Enter"&&d()},placeholder:"Your name",className:"w-[280px]"})},e[7]=d,e[8]=x,e[9]=l):l=e[9];let m;e[10]!==n.control||e[11]!==l?(m=t.jsx(A,{title:"Display name",action:t.jsx(U,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=m):m=e[12];const b=v?.email;let a;e[13]!==b?(a=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=a):a=e[14];let u;return e[15]!==i||e[16]!==m||e[17]!==a?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,m,a]})}),e[15]=i,e[16]=m,e[17]=a,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=q();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(ae);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=v):v=e[1];const p=v;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(J,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(M,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==s.enableNotifications?(d=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=d):d=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==d||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:d,action:j}),e[16]=d,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let m;e[22]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=m):m=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let a;e[25]!==s.enableSounds||e[26]!==b?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[m,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=a):a=e[27];let u;e[28]!==a||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:a}),e[28]=a,e[29]=l,e[30]=u):u=e[30];let g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=e[32];let r;e[33]!==s.toolApprovalLevel?(r={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=r):r=e[34];let f;e[35]!==r?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:r})}),e[35]=r,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==g||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function Te(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(re,{}),e[0]=s):s=e[0],s}export{Te as default};
|