decocms 3.84.0 → 3.84.2
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-D7JULgSW.js → AlertCircle-W6j8H01c.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BoNegK2J.js → ArrowUpRight-CZSTSF18.js} +1 -1
- package/dist/client/assets/{CheckCircle-CubOqkhM.js → CheckCircle-CpqmJQQj.js} +1 -1
- package/dist/client/assets/{ChevronDown-bvcGltsD.js → ChevronDown-BkIuna_N.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CwoAKT1V.js → ChevronLeft-B4YPm5Tt.js} +1 -1
- package/dist/client/assets/{ChevronRight-JjxX5FP7.js → ChevronRight-B06KXNz0.js} +1 -1
- package/dist/client/assets/{ChevronUp-BHC7PPdP.js → ChevronUp-zqx6ltUB.js} +1 -1
- package/dist/client/assets/{DotsVertical-lhkCwVyZ.js → DotsVertical-CnakMMTn.js} +1 -1
- package/dist/client/assets/{Eye-DDlQv8dT.js → Eye-Bu6T1cA0.js} +1 -1
- package/dist/client/assets/{FilterLines-5NaQCp3e.js → FilterLines-Ckvl4OhL.js} +1 -1
- package/dist/client/assets/{Globe01-DPxNkWN3.js → Globe01-BonH0jIg.js} +1 -1
- package/dist/client/assets/{Globe04-CfOFRbjm.js → Globe04-by7Koucw.js} +1 -1
- package/dist/client/assets/{HardDrive-Cc6TayZG.js → HardDrive-i-7mfT2M.js} +1 -1
- package/dist/client/assets/{Key01-BnvBI-54.js → Key01-CSj8veNe.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BqPxwhfG.js → LayoutLeft-DmgR4QKJ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cuz2KimH.js → LinkExternal01-CwjMdvmW.js} +1 -1
- package/dist/client/assets/{Monitor01-Bg2cIqWO.js → Monitor01-CwV0BvWh.js} +1 -1
- package/dist/client/assets/{Palette-DqDQ3lBi.js → Palette-DDt_6p48.js} +1 -1
- package/dist/client/assets/{Play-DJY7X3Ac.js → Play-DkjtpYqH.js} +1 -1
- package/dist/client/assets/{Plus-BPXRSHah.js → Plus-Ce8glufj.js} +1 -1
- package/dist/client/assets/{SearchMd-BzO607jf.js → SearchMd-BT20-sda.js} +1 -1
- package/dist/client/assets/{Settings02-B7JvRibZ.js → Settings02-BPKyn9lz.js} +1 -1
- package/dist/client/assets/{Shield01-CpKySeSn.js → Shield01-CouVDS_l.js} +1 -1
- package/dist/client/assets/{Star01-Ctay-f61.js → Star01-DKVn-D_o.js} +1 -1
- package/dist/client/assets/{Stars01-BvSyxIB7.js → Stars01-BZYGWgaC.js} +1 -1
- package/dist/client/assets/{Stars02-0cy3Iac4.js → Stars02-DbeWjR8E.js} +1 -1
- package/dist/client/assets/{Sun-VAruoT-r.js → Sun-J6HGala1.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B1Fi_gZm.js → SwitchHorizontal01-rjvNMlJx.js} +1 -1
- package/dist/client/assets/{Tool01-BMBmO996.js → Tool01-DthaYcRg.js} +1 -1
- package/dist/client/assets/{Trash01-bpIqJEin.js → Trash01-DHwSI6yL.js} +1 -1
- package/dist/client/assets/{Upload01-DRwUypcB.js → Upload01-ClFoMfKj.js} +1 -1
- package/dist/client/assets/{User01-CNb4uOQF.js → User01-D736U4CX.js} +1 -1
- package/dist/client/assets/{Users01-Dznayvgx.js → Users01-Cl5hK_oE.js} +1 -1
- package/dist/client/assets/{Users03-3hrg8IdJ.js → Users03-CNrhCl5t.js} +1 -1
- package/dist/client/assets/{X-BmLEy_4s.js → X-BZrTCz0a.js} +1 -1
- package/dist/client/assets/{XCircle-lg1atJo8.js → XCircle-D--nsAyg.js} +1 -1
- package/dist/client/assets/{XClose-DgeTXvEe.js → XClose-C-_BT2hv.js} +1 -1
- package/dist/client/assets/{Zap-yzjfF5fD.js → Zap-C46ZuAed.js} +1 -1
- package/dist/client/assets/{ZapSquare-CB80bsBy.js → ZapSquare-9ESQMXmQ.js} +1 -1
- package/dist/client/assets/{ZoomOut-Da8en56C.js → ZoomOut-vLQBm0K1.js} +1 -1
- package/dist/client/assets/{access-gate-BK8VNoXv.js → access-gate-BmtH13PE.js} +1 -1
- package/dist/client/assets/{add-section-modal-CIpKj9LO.js → add-section-modal-B23NOl4c.js} +1 -1
- package/dist/client/assets/{agent-icon-_F0cs0c2.js → agent-icon-ysNW4XR3.js} +1 -1
- package/dist/client/assets/agents-list-DwLDYdu-.js +1 -0
- package/dist/client/assets/ai-providers-CsiXZOzc.js +1 -0
- package/dist/client/assets/{alert-Dj9lc9TR.js → alert-Gt3FhBIl.js} +1 -1
- package/dist/client/assets/{alert-dialog-DlpOAGY3.js → alert-dialog-CnUqNj3j.js} +1 -1
- package/dist/client/assets/app-editor-DMV0TdR1.js +1 -0
- package/dist/client/assets/{auth-CX0V_g3E.js → auth-DK93vS8p.js} +1 -1
- package/dist/client/assets/{auth-catchall-Czx8XBA8.js → auth-catchall-nyWRyl5X.js} +1 -1
- package/dist/client/assets/{auth-entry-BlZh1m7O.js → auth-entry-BUS40DT5.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D8DmmoYv.js → auth-split-layout-BhYYz27o.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Bb4qQGZD.js → authenticate-and-persist-oauth-C0aUigFl.js} +1 -1
- package/dist/client/assets/{automation-list-row-DikFLwfj.js → automation-list-row-SpQ0tnhR.js} +1 -1
- package/dist/client/assets/{automation-runs-z2Y1nDjt.js → automation-runs-CfMBDfe-.js} +1 -1
- package/dist/client/assets/automations-BzeXna8f.js +1 -0
- package/dist/client/assets/{avatar-DMMu0sLX.js → avatar-huYQCC56.js} +1 -1
- package/dist/client/assets/{badge-BIOaHIWt.js → badge-BZJsCOGK.js} +1 -1
- package/dist/client/assets/{block-document-xN8KRLYP.js → block-document-B6Eq8Frs.js} +1 -1
- package/dist/client/assets/brand-context-BPLyelUD.js +1 -0
- package/dist/client/assets/buckets-CM0Bz_-J.js +1 -0
- package/dist/client/assets/{capability-load-error-DRTuvJDl.js → capability-load-error-zdtgwIKk.js} +1 -1
- package/dist/client/assets/{card-CwFHuYuT.js → card-C_fehaiI.js} +1 -1
- package/dist/client/assets/category-editor-CJ6yX4lJ.js +1 -0
- package/dist/client/assets/{chat-context-dU2BBYFR.js → chat-context-DTOIbgGQ.js} +1 -1
- package/dist/client/assets/{checkbox-Cbr8t7kQ.js → checkbox-DnLV6Rmu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CVzhF-RY.js → cli-auth-success-DPR1hSD0.js} +1 -1
- package/dist/client/assets/collection-detail-Cim85wT-.js +1 -0
- package/dist/client/assets/{collection-display-button-CTjP_ikN.js → collection-display-button-rZhSqMZx.js} +1 -1
- package/dist/client/assets/{collection-search-DUL6ybNZ.js → collection-search-Dg7QZEAU.js} +1 -1
- package/dist/client/assets/{collection-tabs-D6_rF5iF.js → collection-tabs-Y0IGnWks.js} +1 -1
- package/dist/client/assets/{command-BDSPStF6.js → command-Mfe2Oxwx.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DaSLJRf_.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-CN-ahIvP.js → connect-desktop-dialog-Bbb_JMLy.js} +1 -1
- package/dist/client/assets/{connection-card-Cshe8IMI.js → connection-card-C13JH9Uu.js} +1 -1
- package/dist/client/assets/connection-detail-CctMbfAW.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DNsEuVwo.js → connection-form-helpers-BGeEr2Wd.js} +1 -1
- package/dist/client/assets/connections-BvYpKMlP.js +1 -0
- package/dist/client/assets/{context-menu-BgxmhhXb.js → context-menu-CFceWO3J.js} +1 -1
- package/dist/client/assets/{decopilot-CM0ZbqCj.js → decopilot-BnK3OJqu.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DStYMiox.js → decopilot-sse-pool-DmMr9kDP.js} +1 -1
- package/dist/client/assets/{dialog-YEMhf2fI.js → dialog-CsirvbzA.js} +1 -1
- package/dist/client/assets/{domain-settings-Dp98eSJW.js → domain-settings-CxaEIq74.js} +1 -1
- package/dist/client/assets/{drawer-CbS8-Awm.js → drawer-CSBs93NV.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B5yyPfJy.js → dropdown-menu-BzKQoihe.js} +1 -1
- package/dist/client/assets/{empty-state-BBWaUmc0.js → empty-state-BR0VX0WK.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DW6_hSwc.js → extract-connection-data-DQW44nI6.js} +1 -1
- package/dist/client/assets/file-explorer-Cpu1hkCX.js +2 -0
- package/dist/client/assets/{file-type-icon-CRFnZTrI.js → file-type-icon-i5WMuvux.js} +1 -1
- package/dist/client/assets/{files-BwRx28HU.js → files-kP6nL4Ar.js} +1 -1
- package/dist/client/assets/{form-uOBsFqj5.js → form-l-monXIg.js} +1 -1
- package/dist/client/assets/general-DsuHD_C8.js +1 -0
- package/dist/client/assets/{github-repo-picker-CQzVJw3M.js → github-repo-picker-PliDVstk.js} +1 -1
- package/dist/client/assets/{hooks-Bsl1fBrR.js → hooks-C_4SWVhQ.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-CMi4FLQI.js → import-from-deco-dialog-lunP-1iA.js} +1 -1
- package/dist/client/assets/{index-DwYMCCVI.js → index-AuDyOR_l.js} +1 -1
- package/dist/client/assets/index-BiNHmVvt.js +1 -0
- package/dist/client/assets/{index-_O-v3DMq.js → index-BwAdqdD1.js} +1 -1
- package/dist/client/assets/{index-DQbPuQyy.js → index-CKMrk_Wj.js} +1 -1
- package/dist/client/assets/{index-BbZOuhzX.js → index-CsTeQeDG.js} +1 -1
- package/dist/client/assets/{index-Bnzp0u27.js → index-CuYE42R8.js} +1 -1
- package/dist/client/assets/{index-Cl2voHhm.js → index-CyuLHyxd.js} +1 -1
- package/dist/client/assets/{index-CLUU6mBc.js → index-D-Zmah9i.js} +2 -2
- package/dist/client/assets/{index-Cczp3zRq.js → index-DXKg1FOG.js} +7 -7
- package/dist/client/assets/index-DnowKw0y.js +1 -0
- package/dist/client/assets/{index-CysG6elH.js → index-DvAiMz4l.js} +2 -2
- package/dist/client/assets/{index-CEhY-HWu.js → index-NjOyHlNQ.js} +1 -1
- package/dist/client/assets/{index-Da7zBgP3.js → index-Pat3pJAq.js} +4 -4
- package/dist/client/assets/{index-BVGtxGJp.js → index-k6rfQcrz.js} +1 -1
- package/dist/client/assets/{index-redirect-D9E-kRrz.js → index-redirect-DgeRdlIs.js} +1 -1
- package/dist/client/assets/{input-JrKcP8_P.js → input-Bmgjwfqa.js} +1 -1
- package/dist/client/assets/{integration-icon-BefRgu4d.js → integration-icon-D96bHHLQ.js} +1 -1
- package/dist/client/assets/{label-DamWvDSp.js → label-2loPtYA2.js} +1 -1
- package/dist/client/assets/{login-CsrgI9dD.js → login-Cg1Bcrl3.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DggY1DlO.js → mcp-oauth-BJ20JRuX.js} +1 -1
- package/dist/client/assets/{members-DkmZZg6p.js → members-DnMehg4W.js} +2 -2
- package/dist/client/assets/{monaco-editor-D7lo6yjy.js → monaco-editor-BR3HQipt.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B-0pMNdb.js → monitoring-stats-row-BG9ozr5G.js} +1 -1
- package/dist/client/assets/{oauth-callback-BdNMG3d8.js → oauth-callback-CzQGuv_J.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DRiOpOG0.js → oauth-callback-ai-provider-BOmB1YoX.js} +1 -1
- package/dist/client/assets/{onboarding-DpiL92Sf.js → onboarding-BdyoLRHB.js} +1 -1
- package/dist/client/assets/{org-install-BmVHa_cl.js → org-install-teVL7yA7.js} +1 -1
- package/dist/client/assets/{org-layout-D5M_L5al.js → org-layout-b5QfqYH-.js} +1 -1
- package/dist/client/assets/{organization-choice-CCRYa54g.js → organization-choice-BRL6qHcF.js} +1 -1
- package/dist/client/assets/{page-seo-form-C28dqfPj.js → page-seo-form-B4s6uf9y.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CUGGM6uP.js +1 -0
- package/dist/client/assets/{popover-BWJVGvw4.js → popover-hX7BP56v.js} +1 -1
- package/dist/client/assets/post-editor-CDf8xtN4.js +1 -0
- package/dist/client/assets/{preview-dialog-EpRi5xxw.js → preview-dialog-CKmwsLcm.js} +1 -1
- package/dist/client/assets/{primitives-BMQA8oJA.js → primitives-C__c5N9k.js} +1 -1
- package/dist/client/assets/profile-DfpVqWcb.js +1 -0
- package/dist/client/assets/project-app-view-BMvrgSd7.js +1 -0
- package/dist/client/assets/record-editor-DDtHcMLc.js +1 -0
- package/dist/client/assets/registry-Cv26vnnl.js +2 -0
- package/dist/client/assets/{registry-layout-DrMxvc62.js → registry-layout-BJfkIBEg.js} +2 -2
- package/dist/client/assets/{require-capability-DQB_sHm-.js → require-capability-ZPgb4VzJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CEA-lcqq.js → required-auth-layout-DcfPO8NY.js} +1 -1
- package/dist/client/assets/{reset-password-CAhEe0y_.js → reset-password-Bql8KNKZ.js} +1 -1
- package/dist/client/assets/roles-C0H77ep0.js +1 -0
- package/dist/client/assets/{save-status-ByqPY8sQ.js → save-status-CgcBkaA1.js} +1 -1
- package/dist/client/assets/{scroll-area-CDnhflx8.js → scroll-area-BOxtAecg.js} +1 -1
- package/dist/client/assets/{search-input-E5lbuSaQ.js → search-input-CSsG1WWu.js} +1 -1
- package/dist/client/assets/secrets-DE5NR_Qm.js +1 -0
- package/dist/client/assets/sections-editor-CX5GvsNV.js +2 -0
- package/dist/client/assets/select-Db6_lt9v.js +1 -0
- package/dist/client/assets/{select-model-D6u-jQT1.js → select-model-ByS9ATv_.js} +1 -1
- package/dist/client/assets/seo-editor-Crw2Qnmh.js +1 -0
- package/dist/client/assets/settings-layout-DDqL_VOP.js +1 -0
- package/dist/client/assets/{settings-section-CMKiU6m1.js → settings-section-t8sGp_fl.js} +1 -1
- package/dist/client/assets/{sheet-B0e56Uwi.js → sheet-B8bWDiH8.js} +1 -1
- package/dist/client/assets/{shell-controls-iDS_YYSh.js → shell-controls-Ctmv5J1D.js} +1 -1
- package/dist/client/assets/{shell-layout-DCRByz-Z.js → shell-layout-BfoUO_4d.js} +1 -1
- package/dist/client/assets/{shell-route-loading-CnU2JL57.js → shell-route-loading-CQesruOS.js} +1 -1
- package/dist/client/assets/{sidebar-muO-r9NM.js → sidebar-BV39sx2h.js} +1 -1
- package/dist/client/assets/{skeleton-D_Y0mVys.js → skeleton-zxfXmYH5.js} +1 -1
- package/dist/client/assets/{sortable.esm-DZfVcKsT.js → sortable.esm-C5FMmjf1.js} +1 -1
- package/dist/client/assets/sso-BuXh3sXC.js +1 -0
- package/dist/client/assets/store-Di_QFZpT.js +1 -0
- package/dist/client/assets/store-registry-CSY3xXq9.js +2 -0
- package/dist/client/assets/{studio-tools-Cxzj-LYh.js → studio-tools-CHs_rGSt.js} +1 -1
- package/dist/client/assets/{switch-DPUXI2pE.js → switch-DPrQb-8A.js} +1 -1
- package/dist/client/assets/{table-D7DRjfAO.js → table-7uXopK9g.js} +1 -1
- package/dist/client/assets/{tabs-CTiHAHkO.js → tabs-tj-mDk3G.js} +1 -1
- package/dist/client/assets/{task-status-CzPGYn0R.js → task-status-Bddx2ns0.js} +1 -1
- package/dist/client/assets/{textarea-rSIhk1As.js → textarea-Deq7M1bS.js} +1 -1
- package/dist/client/assets/{toggle-group-D0HpOa1A.js → toggle-group-DxOLsLVl.js} +1 -1
- package/dist/client/assets/{toolbar-CWstIAgU.js → toolbar-Dh-mBE0g.js} +1 -1
- package/dist/client/assets/tooltip-B5ZRtiWb.js +1 -0
- package/dist/client/assets/{types-DiVU1HF6.js → types-CCU1Qb1L.js} +1 -1
- package/dist/client/assets/{use-ai-providers-UVcAibrU.js → use-ai-providers-B-JdXq2R.js} +1 -1
- package/dist/client/assets/{use-automations-DyhWqZVe.js → use-automations-DcJ9X_Bn.js} +1 -1
- package/dist/client/assets/{use-capability-Dkucj2kh.js → use-capability-QYduHUWr.js} +1 -1
- package/dist/client/assets/{use-clock-tick-C8csRlSk.js → use-clock-tick-DjkJEP58.js} +1 -1
- package/dist/client/assets/{use-collections-Ce8iOx08.js → use-collections-CtF7H9Ec.js} +1 -1
- package/dist/client/assets/{use-connection-MqRKkZiS.js → use-connection-OMHbx8Fv.js} +1 -1
- package/dist/client/assets/{use-copy-BXiwiMZD.js → use-copy-CquNDC0j.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-EFJS-btq.js → use-create-virtual-mcp-BzfJqNI1.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-UYvEWk6q.js → use-debounced-autosave-CuwKz_M_.js} +1 -1
- package/dist/client/assets/{use-delete-connection-tf7cUWDI.js → use-delete-connection-D3Cw_l0k.js} +1 -1
- package/dist/client/assets/{use-file-configs-Caz1V2y2.js → use-file-configs-BzD_V3dx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D-1sc3vv.js → use-infinite-scroll-CcoPxc_B.js} +1 -1
- package/dist/client/assets/{use-join-requests-jqRgPged.js → use-join-requests-BJazSzky.js} +1 -1
- package/dist/client/assets/{use-mcp-client-QbDw5Kxr.js → use-mcp-client-D5s-JZx9.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CJoxcvaa.js → use-mcp-prompts-DOIkquNc.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CwE0F1Fa.js → use-mcp-tools-y5FOo2na.js} +1 -1
- package/dist/client/assets/{use-members-DqOAFyvD.js → use-members-C6JtLoz3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CHwphTrt.js → use-navigate-to-agent-Cf9Ptpjb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Cw-eW4eJ.js → use-org-auth-client-BIUXpGUn.js} +1 -1
- package/dist/client/assets/{use-org-sso-DYW-70GB.js → use-org-sso-D7NdIA39.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C929xbIg.js → use-organization-roles-m-GWZOmG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B7zELDxl.js → use-organization-settings-D4FIVwU9.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DSvlh2CW.js → use-registry-connections-BLPbAhR8.js} +1 -1
- package/dist/client/assets/{use-secrets-BGVjiXmA.js → use-secrets-m1q_icrm.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Bwl21Nte.js → use-status-sounds-CQVeaXb2.js} +1 -1
- package/dist/client/assets/{use-view-mode-DeBJ3OlV.js → use-view-mode-Bp7cldRg.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D3YjjDr2.js → use-virtual-mcp-SQ-AGFry.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bj9MLRnT.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-jXW8iBKH.js +1 -0
- package/dist/client/assets/variant-calendar-D8iInPbR.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BMm_SU4X.js → view-mode-toggle-C2-bvq7i.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +380 -380
- package/dist/server/server.js +246 -246
- package/package.json +1 -1
- package/dist/client/assets/agents-list-DjjL_a90.js +0 -1
- package/dist/client/assets/ai-providers-CljQzJuo.js +0 -1
- package/dist/client/assets/app-editor-DTsz2SiG.js +0 -1
- package/dist/client/assets/automations-h6AjBdGl.js +0 -1
- package/dist/client/assets/brand-context-B2j85pK0.js +0 -1
- package/dist/client/assets/buckets-OAl0L0y1.js +0 -1
- package/dist/client/assets/category-editor-DrrOt_5R.js +0 -1
- package/dist/client/assets/collection-detail-B3A3YP9y.js +0 -1
- package/dist/client/assets/commerce-onboarding-DtQQW42S.js +0 -1
- package/dist/client/assets/connection-detail-BxVpiSkZ.js +0 -1
- package/dist/client/assets/connections-B6wVut4v.js +0 -1
- package/dist/client/assets/file-explorer-B-BDqfr8.js +0 -2
- package/dist/client/assets/general-C-as289_.js +0 -1
- package/dist/client/assets/index-B5iWctwe.js +0 -1
- package/dist/client/assets/index-CCgrVLOE.js +0 -1
- package/dist/client/assets/index-iwyGvJw3.js +0 -1
- package/dist/client/assets/page-seo-sheet-C6YR_NxM.js +0 -1
- package/dist/client/assets/post-editor-BRqcUmQd.js +0 -1
- package/dist/client/assets/profile-Dk2P6dGP.js +0 -1
- package/dist/client/assets/project-app-view-TZf9g1ss.js +0 -1
- package/dist/client/assets/record-editor-ChJ6RVXx.js +0 -1
- package/dist/client/assets/registry-HmZZwFRK.js +0 -2
- package/dist/client/assets/roles-DSDcdczA.js +0 -1
- package/dist/client/assets/secrets-HQJKo8ct.js +0 -1
- package/dist/client/assets/sections-editor-LwvHy6hA.js +0 -2
- package/dist/client/assets/select-BRu_aocD.js +0 -1
- package/dist/client/assets/seo-editor-uydyhvcD.js +0 -1
- package/dist/client/assets/settings-layout-K84_EKqf.js +0 -1
- package/dist/client/assets/sso-GaI62zkx.js +0 -1
- package/dist/client/assets/store-ek5K_sQV.js +0 -1
- package/dist/client/assets/store-registry-2fFie2P8.js +0 -2
- package/dist/client/assets/tooltip-B7dbgru1.js +0 -1
- package/dist/client/assets/useInfiniteQuery-W7QqfcbQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-f7kozjC6.js +0 -1
- package/dist/client/assets/variant-calendar-C5R5bfKc.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as K,c as $,j as o,l as V,k as Se,K as Ie}from"./index-
|
|
1
|
+
import{r as K,c as $,j as o,l as V,k as Se,K as Ie}from"./index-Pat3pJAq.js";import{e as Be,C as $e,b as Ae,c as fe,K as Te,P as Le,s as Pe,l as De,S as _e,v as Ee,D as Ue,d as Re}from"./sortable.esm-C5FMmjf1.js";import{av as Oe,ay as ze,az as Fe,p as Ve,ab as Ke,aA as Me}from"./index-DXKg1FOG.js";import{ah as qe,l as Ge,N as Je,O as He,P as Xe}from"./agent-icon-ysNW4XR3.js";import{s as Qe}from"./Plus-Ce8glufj.js";import{e as me,a as We,b as Ye,C as Ze,d as et,c as tt}from"./command-Mfe2Oxwx.js";import{a as lt,b as st,P as ot}from"./popover-hX7BP56v.js";import{a as rt}from"./Eye-Bu6T1cA0.js";import{c as nt}from"./ZoomOut-vLQBm0K1.js";import{s as it}from"./Trash01-DHwSI6yL.js";import{b as at}from"./XCircle-D--nsAyg.js";import{d as ct,i as dt,E as ut}from"./scroll-area-BOxtAecg.js";import{i as ft}from"./index-CyuLHyxd.js";import{I as R,F as ue,T as re,s as I,p as ne,R as W,A as Y}from"./primitives-C__c5N9k.js";import{i as mt}from"./ChevronUp-zqx6ltUB.js";import{L as oe}from"./label-2loPtYA2.js";const ye=K.createContext(null);function vl(c){const e=$.c(7),{orgSlug:t,virtualMcpId:r,branch:l,children:i}=c;let d;e[0]!==l||e[1]!==t||e[2]!==r?(d={orgSlug:t,virtualMcpId:r,branch:l},e[0]=l,e[1]=t,e[2]=r,e[3]=d):d=e[3];let f;return e[4]!==i||e[5]!==d?(f=o.jsx(ye.Provider,{value:d,children:i}),e[4]=i,e[5]=d,e[6]=f):f=e[6],f}function pt(){return K.useContext(ye)}const pe={app:"Blocks",site:"Custom blocks"};function xt(c){const e=$.c(6),{iconName:t,iconUrl:r,alt:l}=c;let i;e[0]!==t?(i=Ge(t)??qe,e[0]=t,e[1]=i):i=e[1];const d=i;let f;return e[2]!==d||e[3]!==l||e[4]!==r?(f=o.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",children:r?o.jsx("img",{src:r,alt:l,className:"size-5 object-contain"}):o.jsx(d,{size:16,className:"text-muted-foreground"})}),e[2]=d,e[3]=l,e[4]=r,e[5]=f):f=e[5],f}function xe(c){const e=$.c(19),{type:t,onInsert:r}=c,l=`${t.title} ${t.resolveType} ${t.description??""}`;let i;e[0]!==r||e[1]!==t.resolveType?(i=()=>r(t.resolveType),e[0]=r,e[1]=t.resolveType,e[2]=i):i=e[2];let d;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(d=o.jsx(xt,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=d):d=e[6];let f;e[7]!==t.title?(f=o.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=f):f=e[8];let p;e[9]!==t.description?(p=t.description&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=p):p=e[10];let x;e[11]!==f||e[12]!==p?(x=o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f,p]}),e[11]=f,e[12]=p,e[13]=x):x=e[13];let u;return e[14]!==l||e[15]!==i||e[16]!==d||e[17]!==x?(u=o.jsxs(We,{value:l,onSelect:i,className:"flex items-center gap-2.5",children:[d,x]}),e[14]=l,e[15]=i,e[16]=d,e[17]=x,e[18]=u):u=e[18],u}function ge(c){const e=$.c(37),{blockTypes:t,onInsert:r,alwaysShow:l}=c,i=l===void 0?!1:l,[d,f]=K.useState(!1);let p,x;if(e[0]!==t){p=[],x=[];for(const T of t)(T.source==="site"?x:p).push(T);e[0]=t,e[1]=p,e[2]=x}else p=e[1],x=e[2];let u;e[3]!==r?(u=T=>{r(T),f(!1)},e[3]=r,e[4]=u):u=e[4];const h=u,s=p.length>0&&x.length>0,n=i?"h-10":"";let a;e[5]!==n?(a=V("group/insert relative flex h-6 items-center justify-center",n),e[5]=n,e[6]=a):a=e[6];const m=d||i?"opacity-100":"opacity-0 group-hover/insert:opacity-100";let g;e[7]!==m?(g=V("absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border transition-opacity",m),e[7]=m,e[8]=g):g=e[8];let b;e[9]!==g?(b=o.jsx("div",{className:g}),e[9]=g,e[10]=b):b=e[10];const y=d||i?"opacity-100":"opacity-0 group-hover/insert:opacity-100";let v;e[11]!==y?(v=V("relative z-10 flex h-6 w-6 items-center justify-center rounded-full border bg-background text-muted-foreground transition-all hover:border-primary hover:text-primary cursor-pointer",y),e[11]=y,e[12]=v):v=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(Qe,{size:14}),e[13]=k):k=e[13];let N;e[14]!==v?(N=o.jsx(lt,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":"Insert block",className:v,children:k})}),e[14]=v,e[15]=N):N=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Ye,{placeholder:"Search blocks…"}),e[16]=C):C=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(Ze,{children:"No blocks found."}),e[17]=j):j=e[17];let S;e[18]!==h||e[19]!==s||e[20]!==x?(S=x.length>0&&o.jsx(me,{heading:s?pe.site:void 0,children:x.map(T=>o.jsx(xe,{type:T,onInsert:h},T.resolveType))}),e[18]=h,e[19]=s,e[20]=x,e[21]=S):S=e[21];let B;e[22]!==p||e[23]!==h||e[24]!==s?(B=p.length>0&&o.jsx(me,{heading:s?pe.app:void 0,children:p.map(T=>o.jsx(xe,{type:T,onInsert:h},T.resolveType))}),e[22]=p,e[23]=h,e[24]=s,e[25]=B):B=e[25];let w;e[26]!==S||e[27]!==B?(w=o.jsx(st,{className:"w-80 p-0",align:"center",children:o.jsxs(et,{children:[C,o.jsxs(tt,{className:"max-h-80",children:[j,S,B]})]})}),e[26]=S,e[27]=B,e[28]=w):w=e[28];let A;e[29]!==d||e[30]!==N||e[31]!==w?(A=o.jsxs(ot,{open:d,onOpenChange:f,children:[N,w]}),e[29]=d,e[30]=N,e[31]=w,e[32]=A):A=e[32];let _;return e[33]!==A||e[34]!==a||e[35]!==b?(_=o.jsxs("div",{className:a,children:[b,A]}),e[33]=A,e[34]=a,e[35]=b,e[36]=_):_=e[36],_}function gt({html:c,placeholder:e,onChange:t}){const r=K.useRef(t);r.current=t;const l=ct({extensions:[dt.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),ft.configure({placeholder:e??"Write something…"})],content:c||"",editorProps:{attributes:{class:V("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0")}},onUpdate:({editor:i})=>{const d=i.getHTML();r.current(d==="<p></p>"?"":d)}});return l?o.jsxs("div",{className:"relative",children:[l.isFocused&&o.jsxs("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:[o.jsx(le,{active:l.isActive("bold"),label:"Bold",onClick:()=>l.chain().focus().toggleBold().run(),children:o.jsx(Je,{size:14})}),o.jsx(le,{active:l.isActive("italic"),label:"Italic",onClick:()=>l.chain().focus().toggleItalic().run(),children:o.jsx(He,{size:14})}),o.jsx(le,{active:l.isActive("underline"),label:"Underline",onClick:()=>l.chain().focus().toggleUnderline().run(),children:o.jsx(Xe,{size:14})}),o.jsx(le,{active:l.isActive("link"),label:"Link",onClick:()=>{const i=l.getAttributes("link").href,d=window.prompt("Link URL",i??"https://");d!==null&&(d===""?l.chain().focus().unsetLink().run():l.chain().focus().setLink({href:d}).run())},children:o.jsx(at,{size:14})})]}),o.jsx(ut,{editor:l,className:"text-[15px] text-foreground"})]}):null}function le(c){const e=$.c(8),{active:t,label:r,onClick:l,children:i}=c,d=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let f;e[0]!==d?(f=V("flex h-7 w-7 items-center justify-center rounded transition-colors cursor-pointer",d),e[0]=d,e[1]=f):f=e[1];let p;return e[2]!==t||e[3]!==i||e[4]!==r||e[5]!==l||e[6]!==f?(p=o.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:ht,onClick:l,className:f,children:i}),e[2]=t,e[3]=i,e[4]=r,e[5]=l,e[6]=f,e[7]=p):p=e[7],p}function ht(c){return c.preventDefault()}const bt=["1","2","3"],he={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function vt(c){const e=$.c(19),{text:t,level:r,onChange:l}=c,[i,d]=K.useState(!1),f=r||"2";let p;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==t?(p=i&&o.jsx(ue,{children:bt.map(g=>o.jsxs(re,{active:f===g,label:`Heading ${g}`,onClick:()=>l({text:t,level:g}),children:["H",g]},g))}),e[0]=i,e[1]=f,e[2]=l,e[3]=t,e[4]=p):p=e[4];let x;e[5]!==f||e[6]!==l?(x=g=>l({text:g,level:f}),e[5]=f,e[6]=l,e[7]=x):x=e[7];let u,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>d(!0),h=()=>d(!1),e[8]=u,e[9]=h):(u=e[8],h=e[9]);const s=he[f]??he[2];let n;e[10]!==s?(n=V("text-foreground",s),e[10]=s,e[11]=n):n=e[11];let a;e[12]!==x||e[13]!==n||e[14]!==t?(a=o.jsx(R,{value:t,onChange:x,onFocus:u,onBlur:h,placeholder:"Heading",className:n}),e[12]=x,e[13]=n,e[14]=t,e[15]=a):a=e[15];let m;return e[16]!==p||e[17]!==a?(m=o.jsxs("div",{className:"relative",children:[p,a]}),e[16]=p,e[17]=a,e[18]=m):m=e[18],m}function yt(c){const e=$.c(3),{quote:t,onChange:r}=c;let l;return e[0]!==r||e[1]!==t?(l=o.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:o.jsx(R,{value:t,onChange:r,placeholder:"Quote",className:"text-lg italic text-foreground/90"})}),e[0]=r,e[1]=t,e[2]=l):l=e[2],l}function jt(c){const e=$.c(15),{code:t,language:r,onChange:l}=c;let i;e[0]!==t||e[1]!==l?(i=u=>l({code:t,language:u.target.value}),e[0]=t,e[1]=l,e[2]=i):i=e[2];let d;e[3]!==r||e[4]!==i?(d=o.jsx("input",{value:r,onChange:i,placeholder:"language",className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[3]=r,e[4]=i,e[5]=d):d=e[5];let f;e[6]!==r||e[7]!==l?(f=u=>l({code:u,language:r}),e[6]=r,e[7]=l,e[8]=f):f=e[8];let p;e[9]!==t||e[10]!==f?(p=o.jsx(R,{value:t,onChange:f,placeholder:"Code",spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[9]=t,e[10]=f,e[11]=p):p=e[11];let x;return e[12]!==d||e[13]!==p?(x=o.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[d,p]}),e[12]=d,e[13]=p,e[14]=x):x=e[14],x}function Nt(c){const e=$.c(17),{items:t,style:r,onChange:l}=c,i=r==="ordered",d=t.length?t.split(`
|
|
2
2
|
`):[""],[f,p]=K.useState(!1),x=K.useRef([]);let u;e[0]!==l||e[1]!==r?(u=N=>l({items:N.join(`
|
|
3
3
|
`),style:r}),e[0]=l,e[1]=r,e[2]=u):u=e[2];const h=u,s=(N,C)=>requestAnimationFrame(()=>{const j=x.current[N];if(!j)return;j.focus();const S=C==="end"?j.value.length:0;j.setSelectionRange(S,S)}),n="relative";let a,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=()=>p(!0),m=N=>{N.currentTarget.contains(N.relatedTarget)||p(!1)},e[3]=a,e[4]=m):(a=e[3],m=e[4]);let g;e[5]!==f||e[6]!==t||e[7]!==l||e[8]!==i?(g=f&&o.jsxs(ue,{children:[o.jsx(re,{active:!i,label:"Bulleted",onClick:()=>l({items:t,style:"unordered"}),children:"•"}),o.jsx(re,{active:i,label:"Numbered",onClick:()=>l({items:t,style:"ordered"}),children:"1."})]}),e[5]=f,e[6]=t,e[7]=l,e[8]=i,e[9]=g):g=e[9];const b="space-y-1",y=d.map((N,C)=>o.jsxs("li",{className:"flex items-start gap-2.5",children:[o.jsx("span",{className:"min-w-5 shrink-0 select-none pt-px text-right text-[15px] leading-relaxed text-muted-foreground tabular-nums",children:i?`${C+1}.`:"•"}),o.jsx(R,{inputRef:j=>{x.current[C]=j},value:N,onChange:j=>{const S=[...d];S[C]=j,h(S)},onKeyDown:j=>{const S=j.currentTarget;if(j.key==="Enter"){j.preventDefault();const B=[...d];B.splice(C+1,0,""),h(B),s(C+1,"start")}else j.key==="Backspace"&&N===""&&d.length>1?(j.preventDefault(),h(d.filter((B,w)=>w!==C)),s(Math.max(0,C-1),"end")):j.key==="ArrowUp"&&S.selectionStart===0&&C>0?(j.preventDefault(),s(C-1,"end")):j.key==="ArrowDown"&&S.selectionEnd===N.length&&C<d.length-1&&(j.preventDefault(),s(C+1,"end"))},placeholder:"List item",className:"text-[15px] leading-relaxed text-foreground"})]},C));let v;e[10]!==y?(v=o.jsx("ul",{className:b,children:y}),e[10]=y,e[11]=v):v=e[11];let k;return e[12]!==a||e[13]!==m||e[14]!==g||e[15]!==v?(k=o.jsxs("div",{className:n,onFocus:a,onBlur:m,children:[g,v]}),e[12]=a,e[13]=m,e[14]=g,e[15]=v,e[16]=k):k=e[16],k}function Ct(c){const e=$.c(37),{block:t,onChange:r}=c;let l;e[0]!==t.size?(l=I(t.size)||"normal",e[0]=t.size,e[1]=l):l=e[1];const i=l;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"image-uri",title:"Image"},e[2]=d):d=e[2];let f;e[3]!==t||e[4]!==r?(f=v=>r({...t,url:v}),e[3]=t,e[4]=r,e[5]=f):f=e[5];let p;e[6]!==t.url||e[7]!==f?(p=o.jsx(Oe,{schema:d,value:t.url,onChange:f,path:"block-image-url",label:"Image"}),e[6]=t.url,e[7]=f,e[8]=p):p=e[8];let x;e[9]!==t.caption?(x=I(t.caption),e[9]=t.caption,e[10]=x):x=e[10];let u;e[11]!==t||e[12]!==r?(u=v=>r({...t,caption:v}),e[11]=t,e[12]=r,e[13]=u):u=e[13];let h;e[14]!==x||e[15]!==u?(h=o.jsx(R,{value:x,onChange:u,placeholder:"Add a caption…",className:"text-center text-sm italic text-muted-foreground"}),e[14]=x,e[15]=u,e[16]=h):h=e[16];let s;e[17]===Symbol.for("react.memo_cache_sentinel")?(s=["normal","full"],e[17]=s):s=e[17];let n;e[18]!==t||e[19]!==r||e[20]!==i?(n=o.jsx("div",{className:"flex items-center gap-1",children:s.map(v=>o.jsx("button",{type:"button",onClick:()=>r({...t,size:v}),className:V("rounded px-2 py-0.5 transition-colors cursor-pointer",i===v?"bg-accent text-accent-foreground":"hover:bg-muted"),children:v==="full"?"Full width":"Normal"},v))}),e[18]=t,e[19]=r,e[20]=i,e[21]=n):n=e[21];let a;e[22]!==t.alt?(a=I(t.alt),e[22]=t.alt,e[23]=a):a=e[23];let m;e[24]!==t||e[25]!==r?(m=v=>r({...t,alt:v.target.value}),e[24]=t,e[25]=r,e[26]=m):m=e[26];let g;e[27]!==a||e[28]!==m?(g=o.jsx("input",{value:a,onChange:m,placeholder:"Alt text (accessibility)",className:"flex-1 border-0 bg-transparent p-0 text-xs outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[27]=a,e[28]=m,e[29]=g):g=e[29];let b;e[30]!==g||e[31]!==n?(b=o.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[n,g]}),e[30]=g,e[31]=n,e[32]=b):b=e[32];let y;return e[33]!==b||e[34]!==p||e[35]!==h?(y=o.jsxs("div",{className:"space-y-2",children:[p,h,b]}),e[33]=b,e[34]=p,e[35]=h,e[36]=y):y=e[36],y}function kt(c){const e=c.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]{11})/);if(e)return`https://www.youtube.com/embed/${e[1]}`;const t=c.match(/vimeo\.com\/(\d+)/);return t?`https://player.vimeo.com/video/${t[1]}`:null}function wt(c){const e=$.c(21),{url:t,caption:r,onChange:l}=c;let i;e[0]!==t?(i=kt(t),e[0]=t,e[1]=i):i=e[1];const d=i;let f;e[2]!==r||e[3]!==d?(f=d?o.jsx("div",{className:"relative aspect-video overflow-hidden rounded-md border bg-muted",children:o.jsx("iframe",{src:d,title:r||"Video",className:"absolute inset-0 h-full w-full border-0",allowFullScreen:!0})}):o.jsx("div",{className:"flex aspect-video items-center justify-center rounded-md border border-dashed bg-muted/40 text-xs text-muted-foreground",children:"Paste a YouTube or Vimeo URL to preview"}),e[2]=r,e[3]=d,e[4]=f):f=e[4];let p;e[5]!==r||e[6]!==l?(p=n=>l({url:n.target.value,caption:r}),e[5]=r,e[6]=l,e[7]=p):p=e[7];let x;e[8]!==p||e[9]!==t?(x=o.jsx("input",{value:t,onChange:p,placeholder:"https://youtube.com/watch?v=…",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[8]=p,e[9]=t,e[10]=x):x=e[10];let u;e[11]!==l||e[12]!==t?(u=n=>l({url:t,caption:n}),e[11]=l,e[12]=t,e[13]=u):u=e[13];let h;e[14]!==r||e[15]!==u?(h=o.jsx(R,{value:r,onChange:u,placeholder:"Add a caption…",className:"text-center text-sm italic text-muted-foreground"}),e[14]=r,e[15]=u,e[16]=h):h=e[16];let s;return e[17]!==f||e[18]!==x||e[19]!==h?(s=o.jsxs("div",{className:"space-y-2",children:[f,x,h]}),e[17]=f,e[18]=x,e[19]=h,e[20]=s):s=e[20],s}function St(){const c=$.c(1);let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("div",{className:"flex items-center py-3","aria-label":"Divider",children:o.jsx("span",{className:"h-px flex-1 bg-border"})}),c[0]=e):e=c[0],e}function It(c){const e=$.c(16),{text:t,href:r,onChange:l}=c;let i;e[0]!==r||e[1]!==l?(i=h=>l({text:h.target.value,href:r}),e[0]=r,e[1]=l,e[2]=i):i=e[2];const d=Math.max(t.length||11,8);let f;e[3]!==i||e[4]!==d||e[5]!==t?(f=o.jsx("div",{className:"inline-flex items-center rounded-full bg-primary px-6 py-2 text-sm font-semibold text-primary-foreground",children:o.jsx("input",{value:t,onChange:i,placeholder:"Button label",size:d,className:"border-0 bg-transparent p-0 text-center text-sm font-semibold text-primary-foreground outline-none placeholder:text-primary-foreground/60 focus:ring-0"})}),e[3]=i,e[4]=d,e[5]=t,e[6]=f):f=e[6];let p;e[7]!==l||e[8]!==t?(p=h=>l({text:t,href:h.target.value}),e[7]=l,e[8]=t,e[9]=p):p=e[9];let x;e[10]!==r||e[11]!==p?(x=o.jsx("input",{value:r,onChange:p,placeholder:"https://destination-url.com",className:"w-full max-w-sm border-0 bg-transparent p-0 text-center text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[10]=r,e[11]=p,e[12]=x):x=e[12];let u;return e[13]!==f||e[14]!==x?(u=o.jsxs("div",{className:"flex flex-col items-center gap-2 py-2",children:[f,x]}),e[13]=f,e[14]=x,e[15]=u):u=e[15],u}const ae=[{value:"info",icon:"ℹ",color:"oklch(0.62 0.19 250)"},{value:"tip",icon:"✓",color:"oklch(0.65 0.17 150)"},{value:"warning",icon:"⚠",color:"oklch(0.75 0.15 75)"},{value:"product",icon:"★",color:"oklch(0.62 0.21 300)"}];function Bt(c){const e=$.c(45),{title:t,body:r,variant:l,onChange:i}=c,[d,f]=K.useState(!1);let p;e[0]!==l?(p=ae.find(w=>w.value===l)??ae[0],e[0]=l,e[1]=p):p=e[1];const x=p;let u,h;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>f(!0),h=w=>{w.currentTarget.contains(w.relatedTarget)||f(!1)},e[2]=u,e[3]=h):(u=e[2],h=e[3]);let s;e[4]!==r||e[5]!==d||e[6]!==i||e[7]!==t||e[8]!==x.value?(s=d&&o.jsx(ue,{children:ae.map(w=>o.jsx(re,{active:x.value===w.value,label:w.value,onClick:()=>i({title:t,body:r,variant:w.value}),children:o.jsx("span",{style:{color:w.color},children:w.icon})},w.value))}),e[4]=r,e[5]=d,e[6]=i,e[7]=t,e[8]=x.value,e[9]=s):s=e[9];const n=`3px solid ${x.color}`,a=`color-mix(in oklch, ${x.color} 8%, transparent)`;let m;e[10]!==n||e[11]!==a?(m={borderLeft:n,backgroundColor:a},e[10]=n,e[11]=a,e[12]=m):m=e[12];let g;e[13]!==x.color?(g={color:x.color},e[13]=x.color,e[14]=g):g=e[14];let b;e[15]!==x.icon?(b=o.jsx("span",{"aria-hidden":!0,className:"text-sm font-bold leading-none",children:x.icon}),e[15]=x.icon,e[16]=b):b=e[16];let y;e[17]!==r||e[18]!==i||e[19]!==l?(y=w=>i({title:w.target.value,body:r,variant:l}),e[17]=r,e[18]=i,e[19]=l,e[20]=y):y=e[20];let v;e[21]!==x.color?(v={color:x.color},e[21]=x.color,e[22]=v):v=e[22];let k;e[23]!==y||e[24]!==v||e[25]!==t?(k=o.jsx("input",{value:t,onChange:y,placeholder:"Callout title",className:"flex-1 border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none focus:ring-0",style:v}),e[23]=y,e[24]=v,e[25]=t,e[26]=k):k=e[26];let N;e[27]!==k||e[28]!==g||e[29]!==b?(N=o.jsxs("div",{className:"mb-1.5 flex items-center gap-2",style:g,children:[b,k]}),e[27]=k,e[28]=g,e[29]=b,e[30]=N):N=e[30];let C;e[31]!==i||e[32]!==t||e[33]!==l?(C=w=>i({title:t,body:w,variant:l}),e[31]=i,e[32]=t,e[33]=l,e[34]=C):C=e[34];let j;e[35]!==r||e[36]!==C?(j=o.jsx(R,{value:r,onChange:C,placeholder:"Callout text…",className:"text-[15px] leading-relaxed text-foreground"}),e[35]=r,e[36]=C,e[37]=j):j=e[37];let S;e[38]!==N||e[39]!==j||e[40]!==m?(S=o.jsxs("div",{className:"rounded-md py-4 pl-5 pr-4",style:m,children:[N,j]}),e[38]=N,e[39]=j,e[40]=m,e[41]=S):S=e[41];let B;return e[42]!==S||e[43]!==s?(B=o.jsxs("div",{className:"relative",onFocus:u,onBlur:h,children:[s,S]}),e[42]=S,e[43]=s,e[44]=B):B=e[44],B}function $t(c){const e=$.c(25),{value:t,label:r,description:l,onChange:i}=c;let d;e[0]!==l||e[1]!==r||e[2]!==i?(d=n=>i({value:n.target.value,label:r,description:l}),e[0]=l,e[1]=r,e[2]=i,e[3]=d):d=e[3];let f;e[4]!==d||e[5]!==t?(f=o.jsx("input",{value:t,onChange:d,placeholder:"42%",className:"w-full border-0 bg-transparent p-0 text-center text-4xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[4]=d,e[5]=t,e[6]=f):f=e[6];let p;e[7]!==l||e[8]!==i||e[9]!==t?(p=n=>i({value:t,label:n.target.value,description:l}),e[7]=l,e[8]=i,e[9]=t,e[10]=p):p=e[10];let x;e[11]!==r||e[12]!==p?(x=o.jsx("input",{value:r,onChange:p,placeholder:"Label",className:"w-full border-0 bg-transparent p-0 text-center text-xs font-semibold uppercase tracking-wide text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[11]=r,e[12]=p,e[13]=x):x=e[13];let u;e[14]!==r||e[15]!==i||e[16]!==t?(u=n=>i({value:t,label:r,description:n}),e[14]=r,e[15]=i,e[16]=t,e[17]=u):u=e[17];let h;e[18]!==l||e[19]!==u?(h=o.jsx(R,{value:l,onChange:u,placeholder:"Optional description",className:"max-w-md text-center text-sm text-muted-foreground"}),e[18]=l,e[19]=u,e[20]=h):h=e[20];let s;return e[21]!==f||e[22]!==x||e[23]!==h?(s=o.jsxs("div",{className:"flex flex-col items-center gap-1.5 border-y border-border/60 py-8 text-center",children:[f,x,h]}),e[21]=f,e[22]=x,e[23]=h,e[24]=s):s=e[24],s}function At(c){const e=$.c(19),{cards:t,onChange:r}=c;let l,i,d,f,p;if(e[0]!==t||e[1]!==r){i=ne(t);let s;e[7]!==r?(s=a=>r(JSON.stringify(a)),e[7]=r,e[8]=s):s=e[8],l=s;const n=(a,m)=>l(i.map((g,b)=>b===a?{...g,...m}:g));p="space-y-2",d="grid grid-cols-1 gap-3 sm:grid-cols-3",f=i.slice(0,3).map((a,m)=>o.jsxs("div",{className:"group/item relative flex flex-col gap-2 rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"absolute right-1 top-1",children:o.jsx(W,{label:"Remove card",onClick:()=>l(i.filter((g,b)=>b!==m))})}),o.jsx("input",{value:I(a.icon),onChange:g=>n(m,{icon:g.target.value}),placeholder:"🎴",className:"flex h-9 w-9 items-center justify-center rounded-md border bg-background text-center text-lg outline-none focus:ring-0"}),o.jsx("input",{value:I(a.title),onChange:g=>n(m,{title:g.target.value}),placeholder:"Card title",className:"border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx(R,{value:I(a.body),onChange:g=>n(m,{body:g}),placeholder:"Card body",className:"text-sm text-muted-foreground"})]},m)),e[0]=t,e[1]=r,e[2]=l,e[3]=i,e[4]=d,e[5]=f,e[6]=p}else l=e[2],i=e[3],d=e[4],f=e[5],p=e[6];let x;e[9]!==d||e[10]!==f?(x=o.jsx("div",{className:d,children:f}),e[9]=d,e[10]=f,e[11]=x):x=e[11];let u;e[12]!==l||e[13]!==i?(u=i.length<3&&o.jsx(Y,{label:"Add card",onClick:()=>l([...i,{title:"",body:""}])}),e[12]=l,e[13]=i,e[14]=u):u=e[14];let h;return e[15]!==p||e[16]!==x||e[17]!==u?(h=o.jsxs("div",{className:p,children:[x,u]}),e[15]=p,e[16]=x,e[17]=u,e[18]=h):h=e[18],h}function Tt(c){const e=$.c(27),{title:t,items:r,onChange:l}=c;let i,d,f,p,x;if(e[0]!==r||e[1]!==l||e[2]!==t){d=ne(r);let n;e[8]!==l||e[9]!==t?(n=m=>l({title:t,items:JSON.stringify(m)}),e[8]=l,e[9]=t,e[10]=n):n=e[10],i=n,p="space-y-2";let a;e[11]!==r||e[12]!==l?(a=m=>l({title:m.target.value,items:r}),e[11]=r,e[12]=l,e[13]=a):a=e[13],e[14]!==a||e[15]!==t?(x=o.jsx("input",{value:t,onChange:a,placeholder:"Checklist title (optional)",className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[14]=a,e[15]=t,e[16]=x):x=e[16],f=d.map((m,g)=>o.jsxs("li",{className:"group/item flex items-start gap-3 border-b border-border/50 py-2.5",children:[o.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center text-primary",children:o.jsx(mt,{size:15})}),o.jsx(R,{value:m,onChange:b=>i(d.map((y,v)=>v===g?b:y)),placeholder:"Checklist item",className:"text-[15px] text-foreground"}),o.jsx(W,{label:"Remove item",onClick:()=>i(d.filter((b,y)=>y!==g))})]},g)),e[0]=r,e[1]=l,e[2]=t,e[3]=i,e[4]=d,e[5]=f,e[6]=p,e[7]=x}else i=e[3],d=e[4],f=e[5],p=e[6],x=e[7];let u;e[17]!==f?(u=o.jsx("ul",{children:f}),e[17]=f,e[18]=u):u=e[18];let h;e[19]!==i||e[20]!==d?(h=o.jsx(Y,{label:"Add item",onClick:()=>i([...d,""])}),e[19]=i,e[20]=d,e[21]=h):h=e[21];let s;return e[22]!==p||e[23]!==x||e[24]!==u||e[25]!==h?(s=o.jsxs("div",{className:p,children:[x,u,h]}),e[22]=p,e[23]=x,e[24]=u,e[25]=h,e[26]=s):s=e[26],s}function Lt(c){const e=$.c(19),{stats:t,onChange:r}=c;let l,i,d,f,p;if(e[0]!==r||e[1]!==t){i=ne(t);let s;e[7]!==r?(s=a=>r(JSON.stringify(a)),e[7]=r,e[8]=s):s=e[8],l=s;const n=(a,m)=>l(i.map((g,b)=>b===a?{...g,...m}:g));p="space-y-2",d="grid grid-cols-1 gap-3 sm:grid-cols-3",f=i.slice(0,3).map((a,m)=>o.jsxs("div",{className:"group/item relative rounded-lg border p-5 text-center",children:[o.jsx("div",{className:"absolute right-1 top-1",children:o.jsx(W,{label:"Remove stat",onClick:()=>l(i.filter((g,b)=>b!==m))})}),o.jsx("input",{value:I(a.value),onChange:g=>n(m,{value:g.target.value}),placeholder:"99%",className:"w-full border-0 bg-transparent p-0 text-center text-3xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),o.jsx("input",{value:I(a.label),onChange:g=>n(m,{label:g.target.value}),placeholder:"Label",className:"mt-1 w-full border-0 bg-transparent p-0 text-center text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"})]},m)),e[0]=r,e[1]=t,e[2]=l,e[3]=i,e[4]=d,e[5]=f,e[6]=p}else l=e[2],i=e[3],d=e[4],f=e[5],p=e[6];let x;e[9]!==d||e[10]!==f?(x=o.jsx("div",{className:d,children:f}),e[9]=d,e[10]=f,e[11]=x):x=e[11];let u;e[12]!==l||e[13]!==i?(u=i.length<3&&o.jsx(Y,{label:"Add stat",onClick:()=>l([...i,{value:"",label:""}])}),e[12]=l,e[13]=i,e[14]=u):u=e[14];let h;return e[15]!==p||e[16]!==x||e[17]!==u?(h=o.jsxs("div",{className:p,children:[x,u]}),e[15]=p,e[16]=x,e[17]=u,e[18]=h):h=e[18],h}function Pt(c){const e=$.c(29),{title:t,steps:r,onChange:l}=c;let i,d,f,p,x,u;if(e[0]!==l||e[1]!==r||e[2]!==t){d=ne(r);let a;e[9]!==l||e[10]!==t?(a=b=>l({title:t,steps:JSON.stringify(b)}),e[9]=l,e[10]=t,e[11]=a):a=e[11],i=a;const m=(b,y)=>i(d.map((v,k)=>k===b?{...v,...y}:v));x="space-y-2";let g;e[12]!==l||e[13]!==r?(g=b=>l({title:b.target.value,steps:r}),e[12]=l,e[13]=r,e[14]=g):g=e[14],e[15]!==g||e[16]!==t?(u=o.jsx("input",{value:t,onChange:g,placeholder:"Steps title (optional)",className:"w-full border-0 bg-transparent p-0 text-lg font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[15]=g,e[16]=t,e[17]=u):u=e[17],f="space-y-3",p=d.map((b,y)=>o.jsxs("li",{className:"group/item flex gap-4",children:[o.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold text-muted-foreground",children:y+1}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-1 pt-0.5",children:[o.jsx("input",{value:I(b.title),onChange:v=>m(y,{title:v.target.value}),placeholder:"Step title",className:"w-full border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx(R,{value:I(b.description),onChange:v=>m(y,{description:v}),placeholder:"Step description",className:"text-sm text-muted-foreground"})]}),o.jsx(W,{label:"Remove step",onClick:()=>i(d.filter((v,k)=>k!==y))})]},y)),e[0]=l,e[1]=r,e[2]=t,e[3]=i,e[4]=d,e[5]=f,e[6]=p,e[7]=x,e[8]=u}else i=e[3],d=e[4],f=e[5],p=e[6],x=e[7],u=e[8];let h;e[18]!==f||e[19]!==p?(h=o.jsx("ol",{className:f,children:p}),e[18]=f,e[19]=p,e[20]=h):h=e[20];let s;e[21]!==i||e[22]!==d?(s=o.jsx(Y,{label:"Add step",onClick:()=>i([...d,{title:"",description:""}])}),e[21]=i,e[22]=d,e[23]=s):s=e[23];let n;return e[24]!==x||e[25]!==u||e[26]!==h||e[27]!==s?(n=o.jsxs("div",{className:x,children:[u,h,s]}),e[24]=x,e[25]=u,e[26]=h,e[27]=s,e[28]=n):n=e[28],n}function be(c,e){try{const t=JSON.parse(c||"{}");return{title:typeof t?.title=="string"?t.title:e,items:Array.isArray(t?.items)?t.items:[]}}catch{return{title:e,items:[]}}}function Dt(c){const e=$.c(7),{left:t,right:r,onChange:l}=c;let i;if(e[0]!==t||e[1]!==l||e[2]!==r){const d={left:be(t,"Option A"),right:be(r,"Option B")},f=(h,s)=>l({left:h==="left"?JSON.stringify(s):t,right:h==="right"?JSON.stringify(s):r});let p;e[4]!==f?(p=(h,s,n)=>{const a=s.items??[];return o.jsxs("div",{className:"space-y-2 rounded-lg border p-4",children:[o.jsx("input",{value:I(s.title),onChange:m=>f(h,{...s,title:m.target.value}),placeholder:"Column title",className:"w-full border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),o.jsx("ul",{className:"space-y-1.5",children:a.map((m,g)=>o.jsxs("li",{className:"group/item flex items-start gap-2",children:[o.jsx("span",{"aria-hidden":!0,className:"mt-0.5 shrink-0 text-sm font-bold",style:{color:n},children:"✓"}),o.jsx(R,{value:m,onChange:b=>f(h,{...s,items:a.map((y,v)=>v===g?b:y)}),placeholder:"Item",className:"text-sm text-foreground"}),o.jsx(W,{label:"Remove item",onClick:()=>f(h,{...s,items:a.filter((b,y)=>y!==g)})})]},g))}),o.jsx(Y,{label:"Add item",onClick:()=>f(h,{...s,items:[...a,""]})})]})},e[4]=f,e[5]=p):p=e[5];const x=p;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=V("grid grid-cols-1 gap-3 sm:grid-cols-2"),e[6]=u):u=e[6],i=o.jsxs("div",{className:u,children:[x("left",d.left,"oklch(0.65 0.17 150)"),x("right",d.right,"oklch(0.75 0.15 75)")]}),e[0]=t,e[1]=l,e[2]=r,e[3]=i}else i=e[3];return i}const _t="vtex/loaders/intelligentSearch/productList.ts";function G(c){return c&&typeof c=="object"&&!Array.isArray(c)?c:null}function Z(c){const e=G(G(c)?.props);return!e||!Array.isArray(e.ids)?[]:e.ids.map(t=>typeof t=="string"||typeof t=="number"?String(t):"").filter(Boolean)}function Et(c){const e=G(c)??{},t=je(c),r=G(e.props)??{},i={ids:Z(c)};return typeof r.hideUnavailableItems=="boolean"&&(i.hideUnavailableItems=r.hideUnavailableItems),{__resolveType:t,props:i}}function je(c){const e=G(c)??{};return typeof e.__resolveType=="string"?e.__resolveType:_t}function Ne(c,e){const t=G(c)??{},r=G(t.props)??{},l=je(c);return{...t,__resolveType:l,props:{...r,ids:e,simulationBehavior:r.simulationBehavior??"default"}}}function F(c){return c&&typeof c=="object"&&!Array.isArray(c)?c:null}function D(c){return typeof c=="string"?c:""}function se(c){return typeof c=="number"?String(c):D(c)}function Ut(c){const e=D(F(c)?.__resolveType),t=Z(c).join(",");return`${e}|${t}`}function Rt(c){const e=F(c.product);return e?{...c,...e}:c}function Ce(c){const e=F(c.product);if(e){const r=Ce(e);if(r)return r}const t=D(c.imageUrl)||D(c.thumbnailUrl);if(t)return t;for(const r of["image","images"]){const l=c[r];if(typeof l=="string"&&l)return l;if(Array.isArray(l))for(const i of l){if(typeof i=="string"&&i)return i;const d=F(i),f=D(d?.url)||D(d?.contentUrl);if(f)return f}}return null}function Ot(c){return/^\d{8,14}$/.test(c.trim())}function zt(c){for(const e of c){const t=e.trim();if(t&&!Ot(t))return t}return c.find(e=>e.trim())?.trim()??""}function Ft(c){const e=F(c.isVariantOf),t=F(c.product),r=t?F(t.isVariantOf):null;return zt([D(e?.name),D(r?.name),D(c.productName),t?D(t.productName):"",t?D(t.name):"",D(c.name),D(c.alternateName),D(F(c.brand)?.name)])}function ce(c){const e=F(c);if(!e)return null;const t=Rt(e),r=se(t.sku)||se(t.productID),l=se(t.inProductGroupWithID);return{id:r||l||se(t.productId)||D(t["@id"]),sku:r,groupId:l,name:Ft(t),imageUrl:Ce(t)}}function ve(c){return c.map(e=>e==null?null:ce(e))}function Vt(c){if(Array.isArray(c))return ve(c);const e=F(c);if(!e)return[];for(const r of["products","product","items","data","result"]){const l=e[r];if(Array.isArray(l))return ve(l);const i=ce(l);if(i)return[i]}const t=ce(c);return t?[t]:[]}function Kt(c){return[...new Set([c.id,c.sku,c.groupId].filter(Boolean))]}function Mt(c,e){const t=c.map(l=>l.trim()).filter(Boolean),r=new Map;for(const l of e)if(l)for(const i of Kt(l))r.set(i,l);return t.map((l,i)=>r.get(l)??e[i]??null)}async function qt(c,e){const t=await fetch(`/api/${c.orgSlug}/sandbox/${encodeURIComponent(c.virtualMcpId)}/${encodeURIComponent(c.branch)}/preview-invoke`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Et(e))});if(!t.ok)throw new Error(`Failed to resolve product loader: ${t.status}`);const r=await t.json();if(r&&typeof r=="object"&&!Array.isArray(r)&&"error"in r&&typeof r.error=="string")throw new Error(r.error);return r}function ke(c){const e=$.c(12),t=pt(),r=Z(c),l=Ut(c),i=t?`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`:"";let d;e[0]!==c||e[1]!==t?(d=async()=>{const n=await qt(t,c);return Vt(n)},e[0]=c,e[1]=t,e[2]=d):d=e[2];const f=Se({queryKey:Ie.sandboxInvoke(i,l),queryFn:d,enabled:!!t&&r.some(Jt),staleTime:6e4,retry:1});let p;e[3]!==f.data?(p=f.data??[],e[3]=f.data,e[4]=p):p=e[4];const x=p;let u;e[5]!==x?(u=x.filter(Gt),e[5]=x,e[6]=u):u=e[6];const h=Mt(r,x);let s;return e[7]!==f.isError||e[8]!==f.isLoading||e[9]!==u||e[10]!==h?(s={products:u,productsById:h,isLoading:f.isLoading,isError:f.isError},e[7]=f.isError,e[8]=f.isLoading,e[9]=u,e[10]=h,e[11]=s):s=e[11],s}function Gt(c){return c!==null}function Jt(c){return c.trim()}function we(c){const e=$.c(5),{preview:t,loading:r}=c;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"h-12 w-12 shrink-0 animate-pulse rounded-md bg-muted"}),e[0]=i):i=e[0],i}if(t?.imageUrl){let i;return e[1]!==t.imageUrl||e[2]!==t.name?(i=o.jsx("img",{src:t.imageUrl,alt:t.name,className:"h-12 w-12 shrink-0 rounded-md border object-cover"}),e[1]=t.imageUrl,e[2]=t.name,e[3]=i):i=e[3],i}let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-md border bg-muted text-[10px] text-muted-foreground",children:"No img"}),e[4]=l):l=e[4],l}function Ht(c){const e=$.c(26),{loader:t,ids:r,onChange:l,label:i}=c,{productsById:d,isLoading:f,isError:p}=ke(t);let x;e[0]!==r||e[1]!==l?(x=(y,v)=>l(r.map((k,N)=>N===y?v:k)),e[0]=r,e[1]=l,e[2]=x):x=e[2];const u=x;let h;e[3]!==i?(h=o.jsx(oe,{className:"text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=h):h=e[4];let s;e[5]!==p?(s=p&&o.jsx("p",{className:"text-xs text-destructive",children:"Could not load product details from VTEX."}),e[5]=p,e[6]=s):s=e[6];let n;e[7]!==r.length?(n=r.length===0&&o.jsx("p",{className:"text-xs text-muted-foreground",children:"No product IDs yet — add one below."}),e[7]=r.length,e[8]=n):n=e[8];let a;e[9]!==r||e[10]!==f||e[11]!==l||e[12]!==d||e[13]!==u?(a=r.map((y,v)=>{const k=d[v]??null;return o.jsxs("li",{className:"group/item flex items-center gap-3",children:[o.jsx(we,{preview:k,loading:f&&!!y}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[o.jsx("p",{className:V("truncate text-sm font-medium",k?.name?"text-foreground":"text-muted-foreground"),children:k?.name||(f&&y?"Loading product…":"Product")}),o.jsx("input",{value:y,onChange:N=>u(v,N.target.value),placeholder:"151331",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),o.jsx(W,{label:"Remove product ID",onClick:()=>l(r.filter((N,C)=>C!==v))})]},v)}),e[9]=r,e[10]=f,e[11]=l,e[12]=d,e[13]=u,e[14]=a):a=e[14];let m;e[15]!==a?(m=o.jsx("ul",{className:"space-y-2",children:a}),e[15]=a,e[16]=m):m=e[16];let g;e[17]!==r||e[18]!==l?(g=o.jsx(Y,{label:"Add product ID",onClick:()=>l([...r,""])}),e[17]=r,e[18]=l,e[19]=g):g=e[19];let b;return e[20]!==h||e[21]!==s||e[22]!==n||e[23]!==m||e[24]!==g?(b=o.jsxs("div",{className:"space-y-2",children:[h,s,n,m,g]}),e[20]=h,e[21]=s,e[22]=n,e[23]=m,e[24]=g,e[25]=b):b=e[25],b}function Xt(c){const e=$.c(49),{block:t,onChange:r}=c;let l;e[0]!==t.product?(l=Z(t.product),e[0]=t.product,e[1]=l):l=e[1];const d=l[0]??"",{productsById:f,isLoading:p,isError:x}=ke(t.product),u=f[0]??null;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Product card"}),e[2]=h):h=e[2];const s=p&&!!d;let n;e[3]!==u||e[4]!==s?(n=o.jsx(we,{preview:u,loading:s}),e[3]=u,e[4]=s,e[5]=n):n=e[5];const a=u?.name||(p&&d?"Loading product…":"Product preview");let m;e[6]!==a?(m=o.jsx("p",{className:"truncate text-sm font-medium",children:a}),e[6]=a,e[7]=m):m=e[7];let g;e[8]!==d?(g=d&&o.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:["ID ",d]}),e[8]=d,e[9]=g):g=e[9];let b;e[10]!==x?(b=x&&o.jsx("p",{className:"text-xs text-destructive",children:"Could not load product details from VTEX."}),e[10]=x,e[11]=b):b=e[11];let y;e[12]!==m||e[13]!==g||e[14]!==b?(y=o.jsxs("div",{className:"min-w-0 flex-1",children:[m,g,b]}),e[12]=m,e[13]=g,e[14]=b,e[15]=y):y=e[15];let v;e[16]!==n||e[17]!==y?(v=o.jsxs("div",{className:"flex items-center gap-3 rounded-md border bg-background p-3",children:[n,y]}),e[16]=n,e[17]=y,e[18]=v):v=e[18];let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(oe,{htmlFor:"product-card-cta",className:"text-xs text-muted-foreground",children:"CTA label"}),e[19]=k):k=e[19];let N;e[20]!==t.textCta?(N=I(t.textCta),e[20]=t.textCta,e[21]=N):N=e[21];let C;e[22]!==t||e[23]!==r?(C=E=>r({...t,textCta:E.target.value}),e[22]=t,e[23]=r,e[24]=C):C=e[24];let j;e[25]!==N||e[26]!==C?(j=o.jsxs("div",{className:"space-y-2",children:[k,o.jsx("input",{id:"product-card-cta",value:N,onChange:C,placeholder:"Ver produto",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),e[25]=N,e[26]=C,e[27]=j):j=e[27];let S;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(oe,{htmlFor:"product-card-slug",className:"text-xs text-muted-foreground",children:"Product slug"}),e[28]=S):S=e[28];let B;e[29]!==t.productSlug?(B=I(t.productSlug),e[29]=t.productSlug,e[30]=B):B=e[30];let w;e[31]!==t||e[32]!==r?(w=E=>r({...t,productSlug:E.target.value}),e[31]=t,e[32]=r,e[33]=w):w=e[33];let A;e[34]!==B||e[35]!==w?(A=o.jsxs("div",{className:"space-y-2",children:[S,o.jsx("input",{id:"product-card-slug",value:B,onChange:w,placeholder:"product-slug",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),e[34]=B,e[35]=w,e[36]=A):A=e[36];let _;e[37]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(oe,{htmlFor:"product-card-id",className:"text-xs text-muted-foreground",children:"VTEX product ID"}),e[37]=_):_=e[37];let T;e[38]!==t||e[39]!==r?(T=E=>r({...t,product:Ne(t.product,E.target.value?[E.target.value]:[])}),e[38]=t,e[39]=r,e[40]=T):T=e[40];let z;e[41]!==d||e[42]!==T?(z=o.jsxs("div",{className:"space-y-2",children:[_,o.jsx("input",{id:"product-card-id",value:d,onChange:T,placeholder:"151331",className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"})]}),e[41]=d,e[42]=T,e[43]=z):z=e[43];let O;return e[44]!==v||e[45]!==j||e[46]!==A||e[47]!==z?(O=o.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[h,v,j,A,z]}),e[44]=v,e[45]=j,e[46]=A,e[47]=z,e[48]=O):O=e[48],O}function Qt(c){const e=$.c(20),{block:t,onChange:r}=c;let l;e[0]!==t.products?(l=Z(t.products),e[0]=t.products,e[1]=l):l=e[1];const i=l;let d;e[2]!==t.title?(d=I(t.title),e[2]=t.title,e[3]=d):d=e[3];let f;e[4]!==t||e[5]!==r?(f=s=>r({...t,title:s.target.value}),e[4]=t,e[5]=r,e[6]=f):f=e[6];let p;e[7]!==d||e[8]!==f?(p=o.jsx("input",{value:d,onChange:f,placeholder:"Shelf title",className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[7]=d,e[8]=f,e[9]=p):p=e[9];let x;e[10]!==t||e[11]!==r?(x=s=>r({...t,products:Ne(t.products,s)}),e[10]=t,e[11]=r,e[12]=x):x=e[12];let u;e[13]!==t.products||e[14]!==i||e[15]!==x?(u=o.jsx(Ht,{loader:t.products,label:"VTEX product IDs",ids:i,onChange:x}),e[13]=t.products,e[14]=i,e[15]=x,e[16]=u):u=e[16];let h;return e[17]!==p||e[18]!==u?(h=o.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[p,u]}),e[17]=p,e[18]=u,e[19]=h):h=e[19],h}function Wt(c){const e=$.c(169),{block:t,meta:r,onChange:l}=c,i=t.__resolveType??"",d=ze(i);if(Fe(i))switch(d){case"Paragraph":{let s;e[0]!==t.html?(s=I(t.html),e[0]=t.html,e[1]=s):s=e[1];let n;e[2]!==t||e[3]!==l?(n=m=>l({...t,html:m}),e[2]=t,e[3]=l,e[4]=n):n=e[4];let a;return e[5]!==s||e[6]!==n?(a=o.jsx(gt,{html:s,placeholder:"Write something…",onChange:n}),e[5]=s,e[6]=n,e[7]=a):a=e[7],a}case"Heading":{let s;e[8]!==t.text?(s=I(t.text),e[8]=t.text,e[9]=s):s=e[9];let n;e[10]!==t.level?(n=I(t.level),e[10]=t.level,e[11]=n):n=e[11];let a;e[12]!==t||e[13]!==l?(a=g=>l({...t,...g}),e[12]=t,e[13]=l,e[14]=a):a=e[14];let m;return e[15]!==s||e[16]!==n||e[17]!==a?(m=o.jsx(vt,{text:s,level:n,onChange:a}),e[15]=s,e[16]=n,e[17]=a,e[18]=m):m=e[18],m}case"Quote":{let s;e[19]!==t.quote?(s=I(t.quote),e[19]=t.quote,e[20]=s):s=e[20];let n;e[21]!==t||e[22]!==l?(n=m=>l({...t,quote:m}),e[21]=t,e[22]=l,e[23]=n):n=e[23];let a;return e[24]!==s||e[25]!==n?(a=o.jsx(yt,{quote:s,onChange:n}),e[24]=s,e[25]=n,e[26]=a):a=e[26],a}case"Code":{let s;e[27]!==t.code?(s=I(t.code),e[27]=t.code,e[28]=s):s=e[28];let n;e[29]!==t.language?(n=I(t.language),e[29]=t.language,e[30]=n):n=e[30];let a;e[31]!==t||e[32]!==l?(a=g=>l({...t,...g}),e[31]=t,e[32]=l,e[33]=a):a=e[33];let m;return e[34]!==s||e[35]!==n||e[36]!==a?(m=o.jsx(jt,{code:s,language:n,onChange:a}),e[34]=s,e[35]=n,e[36]=a,e[37]=m):m=e[37],m}case"List":{let s;e[38]!==t.items?(s=I(t.items),e[38]=t.items,e[39]=s):s=e[39];let n;e[40]!==t.style?(n=I(t.style),e[40]=t.style,e[41]=n):n=e[41];let a;e[42]!==t||e[43]!==l?(a=g=>l({...t,...g}),e[42]=t,e[43]=l,e[44]=a):a=e[44];let m;return e[45]!==s||e[46]!==n||e[47]!==a?(m=o.jsx(Nt,{items:s,style:n,onChange:a}),e[45]=s,e[46]=n,e[47]=a,e[48]=m):m=e[48],m}case"BlockImage":{let s;return e[49]!==t||e[50]!==l?(s=o.jsx(Ct,{block:t,onChange:l}),e[49]=t,e[50]=l,e[51]=s):s=e[51],s}case"Video":{let s;e[52]!==t.url?(s=I(t.url),e[52]=t.url,e[53]=s):s=e[53];let n;e[54]!==t.caption?(n=I(t.caption),e[54]=t.caption,e[55]=n):n=e[55];let a;e[56]!==t||e[57]!==l?(a=g=>l({...t,...g}),e[56]=t,e[57]=l,e[58]=a):a=e[58];let m;return e[59]!==s||e[60]!==n||e[61]!==a?(m=o.jsx(wt,{url:s,caption:n,onChange:a}),e[59]=s,e[60]=n,e[61]=a,e[62]=m):m=e[62],m}case"Divider":{let s;return e[63]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(St,{}),e[63]=s):s=e[63],s}case"Cta":{let s;e[64]!==t.text?(s=I(t.text),e[64]=t.text,e[65]=s):s=e[65];let n;e[66]!==t.href?(n=I(t.href),e[66]=t.href,e[67]=n):n=e[67];let a;e[68]!==t||e[69]!==l?(a=g=>l({...t,...g}),e[68]=t,e[69]=l,e[70]=a):a=e[70];let m;return e[71]!==s||e[72]!==n||e[73]!==a?(m=o.jsx(It,{text:s,href:n,onChange:a}),e[71]=s,e[72]=n,e[73]=a,e[74]=m):m=e[74],m}case"Callout":{let s;e[75]!==t.title?(s=I(t.title),e[75]=t.title,e[76]=s):s=e[76];let n;e[77]!==t.body?(n=I(t.body),e[77]=t.body,e[78]=n):n=e[78];let a;e[79]!==t.variant?(a=I(t.variant),e[79]=t.variant,e[80]=a):a=e[80];let m;e[81]!==t||e[82]!==l?(m=b=>l({...t,...b}),e[81]=t,e[82]=l,e[83]=m):m=e[83];let g;return e[84]!==s||e[85]!==n||e[86]!==a||e[87]!==m?(g=o.jsx(Bt,{title:s,body:n,variant:a,onChange:m}),e[84]=s,e[85]=n,e[86]=a,e[87]=m,e[88]=g):g=e[88],g}case"Stat":{let s;e[89]!==t.value?(s=I(t.value),e[89]=t.value,e[90]=s):s=e[90];let n;e[91]!==t.label?(n=I(t.label),e[91]=t.label,e[92]=n):n=e[92];let a;e[93]!==t.description?(a=I(t.description),e[93]=t.description,e[94]=a):a=e[94];let m;e[95]!==t||e[96]!==l?(m=b=>l({...t,...b}),e[95]=t,e[96]=l,e[97]=m):m=e[97];let g;return e[98]!==s||e[99]!==n||e[100]!==a||e[101]!==m?(g=o.jsx($t,{value:s,label:n,description:a,onChange:m}),e[98]=s,e[99]=n,e[100]=a,e[101]=m,e[102]=g):g=e[102],g}case"StatGroup":{let s;e[103]!==t.stats?(s=I(t.stats),e[103]=t.stats,e[104]=s):s=e[104];let n;e[105]!==t||e[106]!==l?(n=m=>l({...t,stats:m}),e[105]=t,e[106]=l,e[107]=n):n=e[107];let a;return e[108]!==s||e[109]!==n?(a=o.jsx(Lt,{stats:s,onChange:n}),e[108]=s,e[109]=n,e[110]=a):a=e[110],a}case"CardGroup":{let s;e[111]!==t.cards?(s=typeof t.cards=="string"?t.cards:JSON.stringify(t.cards??[]),e[111]=t.cards,e[112]=s):s=e[112];let n;e[113]!==t||e[114]!==l?(n=m=>l({...t,cards:m}),e[113]=t,e[114]=l,e[115]=n):n=e[115];let a;return e[116]!==s||e[117]!==n?(a=o.jsx(At,{cards:s,onChange:n}),e[116]=s,e[117]=n,e[118]=a):a=e[118],a}case"Checklist":{let s;e[119]!==t.title?(s=I(t.title),e[119]=t.title,e[120]=s):s=e[120];let n;e[121]!==t.items?(n=I(t.items),e[121]=t.items,e[122]=n):n=e[122];let a;e[123]!==t||e[124]!==l?(a=g=>l({...t,...g}),e[123]=t,e[124]=l,e[125]=a):a=e[125];let m;return e[126]!==s||e[127]!==n||e[128]!==a?(m=o.jsx(Tt,{title:s,items:n,onChange:a}),e[126]=s,e[127]=n,e[128]=a,e[129]=m):m=e[129],m}case"Steps":{let s;e[130]!==t.title?(s=I(t.title),e[130]=t.title,e[131]=s):s=e[131];let n;e[132]!==t.steps?(n=I(t.steps),e[132]=t.steps,e[133]=n):n=e[133];let a;e[134]!==t||e[135]!==l?(a=g=>l({...t,...g}),e[134]=t,e[135]=l,e[136]=a):a=e[136];let m;return e[137]!==s||e[138]!==n||e[139]!==a?(m=o.jsx(Pt,{title:s,steps:n,onChange:a}),e[137]=s,e[138]=n,e[139]=a,e[140]=m):m=e[140],m}case"Comparison":{let s;e[141]!==t.left?(s=I(t.left),e[141]=t.left,e[142]=s):s=e[142];let n;e[143]!==t.right?(n=I(t.right),e[143]=t.right,e[144]=n):n=e[144];let a;e[145]!==t||e[146]!==l?(a=g=>l({...t,...g}),e[145]=t,e[146]=l,e[147]=a):a=e[147];let m;return e[148]!==s||e[149]!==n||e[150]!==a?(m=o.jsx(Dt,{left:s,right:n,onChange:a}),e[148]=s,e[149]=n,e[150]=a,e[151]=m):m=e[151],m}case"ProductCard":{let s;return e[152]!==t||e[153]!==l?(s=o.jsx(Xt,{block:t,onChange:l}),e[152]=t,e[153]=l,e[154]=s):s=e[154],s}case"ProductShelf":{let s;return e[155]!==t||e[156]!==l?(s=o.jsx(Qt,{block:t,onChange:l}),e[155]=t,e[156]=l,e[157]=s):s=e[157],s}}let p;e[158]!==r||e[159]!==i?(p=i?Ve(i,r):null,e[158]=r,e[159]=i,e[160]=p):p=e[160];const x=p;if(!x){const s=i?` (${i})`:"";let n;return e[161]!==s?(n=o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Unknown block type",s,"."]}),e[161]=s,e[162]=n):n=e[162],n}let u;e[163]!==l?(u=s=>l(s),e[163]=l,e[164]=u):u=e[164];let h;return e[165]!==t||e[166]!==x||e[167]!==u?(h=o.jsx(Ke,{schema:x,value:t,onChange:u,basePath:""}),e[165]=t,e[166]=x,e[167]=u,e[168]=h):h=e[168],h}function Yt(c){const e=$.c(33),{id:t,block:r,meta:l,onChange:i,onDelete:d,onDuplicate:f}=c;let p;e[0]!==t?(p={id:t},e[0]=t,e[1]=p):p=e[1];const{attributes:x,listeners:u,setNodeRef:h,transform:s,transition:n,isDragging:a}=Be(p);let m;e[2]!==s?(m=$e.Transform.toString(s),e[2]=s,e[3]=m):m=e[3];let g;e[4]!==m||e[5]!==n?(g={transform:m,transition:n},e[4]=m,e[5]=n,e[6]=g):g=e[6];const b=a&&"opacity-50";let y;e[7]!==b?(y=V("group/row relative rounded-md py-1.5 pl-12 pr-2 transition-colors hover:bg-muted/40",b),e[7]=b,e[8]=y):y=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(nt,{size:14}),e[9]=v):v=e[9];let k;e[10]!==x||e[11]!==u?(k=o.jsx("button",{type:"button","aria-label":"Drag to reorder",className:"absolute left-1 top-1.5 flex h-6 w-6 cursor-grab items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-foreground active:cursor-grabbing group-hover/row:opacity-100",...x,...u,children:v}),e[10]=x,e[11]=u,e[12]=k):k=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(rt,{size:14}),e[13]=N):N=e[13];let C;e[14]!==f?(C=o.jsx("button",{type:"button","aria-label":"Duplicate block",onClick:f,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer",children:N}),e[14]=f,e[15]=C):C=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(it,{size:14}),e[16]=j):j=e[16];let S;e[17]!==d?(S=o.jsx("button",{type:"button","aria-label":"Delete block",onClick:d,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-destructive cursor-pointer",children:j}),e[17]=d,e[18]=S):S=e[18];let B;e[19]!==S||e[20]!==C?(B=o.jsxs("div",{className:"absolute right-1 top-1 z-10 flex flex-row gap-0.5 rounded-md bg-background/80 opacity-0 backdrop-blur-sm transition-opacity group-hover/row:opacity-100",children:[C,S]}),e[19]=S,e[20]=C,e[21]=B):B=e[21];let w;e[22]!==r||e[23]!==l||e[24]!==i?(w=o.jsx(Wt,{block:r,meta:l,onChange:i}),e[22]=r,e[23]=l,e[24]=i,e[25]=w):w=e[25];let A;return e[26]!==h||e[27]!==B||e[28]!==w||e[29]!==g||e[30]!==y||e[31]!==k?(A=o.jsxs("div",{ref:h,style:g,className:y,children:[k,B,w]}),e[26]=h,e[27]=B,e[28]=w,e[29]=g,e[30]=y,e[31]=k,e[32]=A):A=e[32],A}function yl(c){return Array.isArray(c)?c:[]}function jl(c){const e=$.c(62),{value:t,onChange:r,meta:l,emptyMessage:i}=c,d=i===void 0?"No content yet. Use ⊕ to add your first block.":i;let f;e[0]!==l?(f=Me(l),e[0]=l,e[1]=f):f=e[1];const p=f;let x;e[2]!==t?(x=()=>t.map(ll),e[2]=t,e[3]=x):x=e[3];const[u,h]=K.useState(x);let s;e[4]!==u?(s=u.map(tl),e[4]=u,e[5]=s):s=e[5];const n=s;let a;e[6]!==u?(a=u.map(el),e[6]=u,e[7]=a):a=e[7];const m=a;let g;e[8]!==r?(g=L=>{h(L),r(L.map(Zt))},e[8]=r,e[9]=g):g=e[9];const b=g;let y;e[10]!==u||e[11]!==b?(y=(L,U)=>{const P=[...u];P.splice(L,0,{id:de(),block:{__resolveType:U}}),b(P)},e[10]=u,e[11]=b,e[12]=y):y=e[12];const v=y;let k;e[13]!==u||e[14]!==b?(k=(L,U)=>{b(u.map((P,M)=>M===L?{...P,block:U}:P))},e[13]=u,e[14]=b,e[15]=k):k=e[15];const N=k;let C;e[16]!==u||e[17]!==b?(C=L=>{b(u.filter((U,P)=>P!==L))},e[16]=u,e[17]=b,e[18]=C):C=e[18];const j=C;let S;e[19]!==u||e[20]!==b?(S=L=>{const U=u[L];if(!U)return;const P=[...u];P.splice(L+1,0,{id:de(),block:structuredClone(U.block)}),b(P)},e[19]=u,e[20]=b,e[21]=S):S=e[21];const B=S;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w={activationConstraint:{distance:6}},e[22]=w):w=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A={coordinateGetter:Pe},e[23]=A):A=e[23];const _=Ae(fe(Le,w),fe(Te,A));let T;e[24]!==u||e[25]!==b?(T=L=>{const{active:U,over:P}=L;if(!P||U.id===P.id)return;const M=u.findIndex(q=>q.id===String(U.id)),te=u.findIndex(q=>q.id===String(P.id));M===-1||te===-1||b(De(u,M,te))},e[24]=u,e[25]=b,e[26]=T):T=e[26];const z=T;let O;e[27]!==m.length||e[28]!==d?(O=m.length===0&&o.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:d}),e[27]=m.length,e[28]=d,e[29]=O):O=e[29];let E;e[30]!==v?(E=L=>v(0,L),e[30]=v,e[31]=E):E=e[31];const ie=m.length===0;let J;e[32]!==p||e[33]!==E||e[34]!==ie?(J=o.jsx(ge,{blockTypes:p,onInsert:E,alwaysShow:ie}),e[32]=p,e[33]=E,e[34]=ie,e[35]=J):J=e[35];let H;if(e[36]!==u||e[37]!==p||e[38]!==B||e[39]!==v||e[40]!==l||e[41]!==j||e[42]!==N){let L;e[44]!==p||e[45]!==B||e[46]!==v||e[47]!==l||e[48]!==j||e[49]!==N?(L=(U,P)=>{const{id:M,block:te}=U;return o.jsxs("div",{children:[o.jsx(Yt,{id:M,block:te,meta:l,onChange:q=>N(P,q),onDelete:()=>j(P),onDuplicate:()=>B(P)}),o.jsx(ge,{blockTypes:p,onInsert:q=>v(P+1,q)})]},M)},e[44]=p,e[45]=B,e[46]=v,e[47]=l,e[48]=j,e[49]=N,e[50]=L):L=e[50],H=u.map(L),e[36]=u,e[37]=p,e[38]=B,e[39]=v,e[40]=l,e[41]=j,e[42]=N,e[43]=H}else H=e[43];let X;e[51]!==n||e[52]!==J||e[53]!==H?(X=o.jsxs(_e,{items:n,strategy:Ee,children:[J,H]}),e[51]=n,e[52]=J,e[53]=H,e[54]=X):X=e[54];let Q;e[55]!==z||e[56]!==_||e[57]!==X?(Q=o.jsx(Ue,{sensors:_,collisionDetection:Re,onDragEnd:z,children:X}),e[55]=z,e[56]=_,e[57]=X,e[58]=Q):Q=e[58];let ee;return e[59]!==O||e[60]!==Q?(ee=o.jsxs("div",{className:"mt-2",children:[O,Q]}),e[59]=O,e[60]=Q,e[61]=ee):ee=e[61],ee}function Zt(c){return c.block}function el(c){return c.block}function tl(c){return c.id}function ll(c){return{id:de(),block:c}}function de(){return crypto.randomUUID()}export{jl as B,yl as a,vl as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as K,x as ze,w as Ie,m as Le,K as Oe,k as Ke,d as ge,j as n,B as Ae,s as H,t as L,r as Te,G as Ue,l as _e,ae as fe}from"./index-Pat3pJAq.js";import{t as Xe}from"./ChevronDown-BkIuna_N.js";import{i as He}from"./ChevronRight-B06KXNz0.js";import{s as qe,t as Me}from"./Star01-DKVn-D_o.js";import{n as Ve}from"./LinkExternal01-CwjMdvmW.js";import{s as Re}from"./Plus-Ce8glufj.js";import{s as Ge}from"./Trash01-DHwSI6yL.js";import{i as Qe}from"./Zap-C46ZuAed.js";import{c as Ye,b as Je,d as We,A as Ze,g as et,e as tt,a as st,f as nt}from"./alert-dialog-CnUqNj3j.js";import{I as ue}from"./input-Bmgjwfqa.js";import{T as lt}from"./textarea-Deq7M1bS.js";import{P as Ne}from"./index-AuDyOR_l.js";import{u as $e}from"./studio-tools-CHs_rGSt.js";import{u as ot}from"./use-debounced-autosave-CuwKz_M_.js";import{R as rt}from"./require-capability-ZPgb4VzJ.js";import"./sidebar-BV39sx2h.js";import"./LayoutLeft-DmgR4QKJ.js";import"./tooltip-B5ZRtiWb.js";import"./sheet-B8bWDiH8.js";import"./X-BZrTCz0a.js";import"./use-capability-QYduHUWr.js";import"./access-gate-BmtH13PE.js";import"./capability-load-error-zdtgwIKk.js";function we(t){const e=K.c(8),{title:s,children:o,className:l}=t;let r;e[0]!==l?(r=_e("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=r):r=e[1];let c;e[2]!==s?(c=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=c):c=e[3];let f;return e[4]!==o||e[5]!==r||e[6]!==c?(f=n.jsxs("div",{className:r,children:[c,o]}),e[4]=o,e[5]=r,e[6]=c,e[7]=f):f=e[7],f}function at(t){const e=K.c(25),{onExtract:s,isExtracting:o}=t,[l,r]=Te.useState("");let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Qe,{size:18,className:"text-primary"})}),e[0]=c):c=e[0];let f,g;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),g=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=f,e[2]=g):(f=e[1],g=e[2]);let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=m=>r(m.target.value),e[3]=b):b=e[3];let p;e[4]!==l||e[5]!==o||e[6]!==s?(p=m=>{m.key==="Enter"&&l.trim()&&!o&&s(l.trim())},e[4]=l,e[5]=o,e[6]=s,e[7]=p):p=e[7];let d;e[8]!==l||e[9]!==p?(d=n.jsx(ue,{placeholder:"acme.com",value:l,onChange:b,className:"max-w-xs",onKeyDown:p}),e[8]=l,e[9]=p,e[10]=d):d=e[10];let a;e[11]!==l||e[12]!==o?(a=!l.trim()||o,e[11]=l,e[12]=o,e[13]=a):a=e[13];let i;e[14]!==l||e[15]!==s?(i=()=>s(l.trim()),e[14]=l,e[15]=s,e[16]=i):i=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(qe,{size:14}),e[17]=u):u=e[17];const h=o?"Extracting...":"Extract";let x;e[18]!==h||e[19]!==a||e[20]!==i?(x=n.jsxs(Ae,{variant:"outline",disabled:a,onClick:i,children:[u,h]}),e[18]=h,e[19]=a,e[20]=i,e[21]=x):x=e[21];let v;return e[22]!==x||e[23]!==d?(v=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[c,n.jsxs("div",{className:"flex-1",children:[f,g,n.jsxs("div",{className:"mt-3 flex gap-2",children:[d,x]})]})]})}),e[22]=x,e[23]=d,e[24]=v):v=e[24],v}function it(t){const e=K.c(36),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s?(r=s.watch("domain"),e[0]=s,e[1]=r):r=e[1];const c=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),e[2]=f):f=e[2];let g;e[3]!==o||e[4]!==l?(g=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:_=>{y.onChange(_),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Acme Corp"})},e[3]=o,e[4]=l,e[5]=g):g=e[5];let b;e[6]!==s.control||e[7]!==g?(b=n.jsxs("div",{children:[f,n.jsx(fe,{control:s.control,name:"name",render:g})]}),e[6]=s.control,e[7]=g,e[8]=b):b=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{children:"Domain"}),e[9]=p):p=e[9];let d;e[10]!==c?(d=c&&n.jsxs("a",{href:`https://${c}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(Ve,{size:10}),"open"]}),e[10]=c,e[11]=d):d=e[11];let a;e[12]!==d?(a=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[p,d]}),e[12]=d,e[13]=a):a=e[13];let i;e[14]!==o||e[15]!==l?(i=D=>{const{field:y}=D;return n.jsx(ue,{...y,onChange:_=>{y.onChange(_),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"acme.com"})},e[14]=o,e[15]=l,e[16]=i):i=e[16];let u;e[17]!==s.control||e[18]!==i?(u=n.jsx(fe,{control:s.control,name:"domain",render:i}),e[17]=s.control,e[18]=i,e[19]=u):u=e[19];let h;e[20]!==a||e[21]!==u?(h=n.jsxs("div",{children:[a,u]}),e[20]=a,e[21]=u,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==b?(x=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[b,h]}),e[23]=h,e[24]=b,e[25]=x):x=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),e[26]=v):v=e[26];let m;e[27]!==o||e[28]!==l?(m=D=>{const{field:y}=D;return n.jsx(lt,{...y,onChange:_=>{y.onChange(_),o()},onBlur:()=>{y.onBlur(),l()},placeholder:"Brief description of what the company does...",rows:3})},e[27]=o,e[28]=l,e[29]=m):m=e[29];let C;e[30]!==s.control||e[31]!==m?(C=n.jsxs("div",{children:[v,n.jsx(fe,{control:s.control,name:"overview",render:m})]}),e[30]=s.control,e[31]=m,e[32]=C):C=e[32];let k;return e[33]!==x||e[34]!==C?(k=n.jsx(we,{title:"Company Overview",children:n.jsxs("div",{className:"space-y-3",children:[x,C]})}),e[33]=x,e[34]=C,e[35]=k):k=e[35],k}const ct={backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"};function Se(t){const e=K.c(22),{form:s,name:o,label:l,imgClassName:r,onFieldChange:c,onFieldCommit:f}=t,g=r===void 0?"h-full w-full object-contain p-3":r;let b;e[0]!==s||e[1]!==o?(b=s.watch(o),e[0]=s,e[1]=o,e[2]=b):b=e[2];const p=b;let d;e[3]!==g||e[4]!==l||e[5]!==p?(d=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:ct,children:p?n.jsx("img",{src:p,alt:l,className:g,loading:"lazy"}):n.jsxs("span",{className:"text-[10px] text-muted-foreground/70",children:["No ",l.toLowerCase()]})}),e[3]=g,e[4]=l,e[5]=p,e[6]=d):d=e[6];let a;e[7]!==l?(a=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[7]=l,e[8]=a):a=e[8];let i;e[9]!==c||e[10]!==f?(i=v=>{const{field:m}=v;return n.jsx(ue,{...m,onChange:C=>{m.onChange(C),c()},onBlur:()=>{m.onBlur(),f()},placeholder:"https://..."})},e[9]=c,e[10]=f,e[11]=i):i=e[11];let u;e[12]!==s.control||e[13]!==o||e[14]!==i?(u=n.jsx(fe,{control:s.control,name:o,render:i}),e[12]=s.control,e[13]=o,e[14]=i,e[15]=u):u=e[15];let h;e[16]!==a||e[17]!==u?(h=n.jsxs("div",{className:"flex-1",children:[a,u]}),e[16]=a,e[17]=u,e[18]=h):h=e[18];let x;return e[19]!==d||e[20]!==h?(x=n.jsxs("div",{className:"flex items-start gap-3",children:[d,h]}),e[19]=d,e[20]=h,e[21]=x):x=e[21],x}function dt(t){const e=K.c(4),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;return e[0]!==s||e[1]!==o||e[2]!==l?(r=n.jsx(we,{title:"Logos & Images",children:n.jsxs("div",{className:"space-y-3",children:[n.jsx(Se,{form:s,name:"logo",label:"Logo",onFieldChange:o,onFieldCommit:l}),n.jsx(Se,{form:s,name:"favicon",label:"Favicon",imgClassName:"h-12 w-12 object-contain",onFieldChange:o,onFieldCommit:l}),n.jsx(Se,{form:s,name:"ogImage",label:"SEO / OG image",imgClassName:"h-full w-full object-contain",onFieldChange:o,onFieldCommit:l})]})}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3],r}const mt=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function ft(t){const e=K.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=mt.map(f=>{const{key:g,label:b}=f,p=`fonts.${g}`,d=s.watch(p);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:b}),d&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:d},children:d})]}),n.jsx(fe,{control:s.control,name:p,render:a=>{const{field:i}=a;return n.jsx(ue,{...i,value:i.value??"",onChange:u=>{i.onChange(u),o()},onBlur:()=>{i.onBlur(),l()},placeholder:`Font family for ${b.toLowerCase()}`})}})]},g)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let c;return e[4]!==r?(c=n.jsx(we,{title:"Fonts",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=c):c=e[5],c}const ut=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function xt(t){const e=K.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=ut.map(f=>{const{key:g,label:b}=f,p=`colors.${g}`;return n.jsx(fe,{control:s.control,name:p,render:d=>{const{field:a}=d;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:a.value??"#000000",onChange:i=>{a.onChange(i.target.value),o()},onBlur:()=>{a.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(ue,{value:a.value??"",onChange:i=>{a.onChange(i.target.value),o()},onBlur:()=>{a.onBlur(),l()},placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:b})]})}},g)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let c;return e[4]!==r?(c=n.jsx(we,{title:"Colors",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=c):c=e[5],c}function gt(t){const e=K.c(127),{brand:s,onChanged:o}=t,l=$e(),[r,c]=Te.useState(s.isDefault??!1),[f,g]=Te.useState(!1),b=s.name??"",p=s.domain??"",d=s.overview??"",a=s.logo??"",i=s.favicon??"",u=s.ogImage??"";let h;e[0]!==s.fonts?(h=s.fonts??{},e[0]=s.fonts,e[1]=h):h=e[1];let x;e[2]!==s.colors?(x=s.colors??{},e[2]=s.colors,e[3]=x):x=e[3];let v;e[4]!==b||e[5]!==p||e[6]!==d||e[7]!==a||e[8]!==i||e[9]!==u||e[10]!==h||e[11]!==x?(v={values:{name:b,domain:p,overview:d,logo:a,favicon:i,ogImage:u,fonts:h,colors:x}},e[4]=b,e[5]=p,e[6]=d,e[7]=a,e[8]=i,e[9]=u,e[10]=h,e[11]=x,e[12]=v):v=e[12];const m=Ue(v);let C;e[13]!==s.id||e[14]!==l?(C={mutationFn:async j=>{const ve=Object.values(j.fonts).some(wt),Ce=Object.values(j.colors).some(_t);await l.call("BRAND_CONTEXT_UPDATE",{id:s.id,name:j.name,domain:j.domain,overview:j.overview,logo:j.logo||null,favicon:j.favicon||null,ogImage:j.ogImage||null,fonts:ve?j.fonts:null,colors:Ce?j.colors:null})},onError:Nt},e[13]=s.id,e[14]=l,e[15]=C):C=e[15];const k=ge(C);let D;e[16]!==s.id||e[17]!==m||e[18]!==o||e[19]!==k?(D={delayMs:500,save:async()=>{const j=m.control._formState.dirtyFields,ve=Object.keys(j);if(ve.length===0)return;const Ce=m.getValues(),Pe=m.control._defaultValues;m.reset(Ce,{keepValues:!0});try{await k.mutateAsync(Ce),H("brand_updated",{brand_id:s.id,fields:ve}),L.success("Brand context updated successfully"),o()}catch{m.reset(Pe,{keepValues:!0})}}},e[16]=s.id,e[17]=m,e[18]=o,e[19]=k,e[20]=D):D=e[20];const{schedule:y,flush:_}=ot(D);let $;e[21]!==s.id||e[22]!==l?($=async()=>{await l.call("BRAND_CONTEXT_DELETE",{id:s.id})},e[21]=s.id,e[22]=l,e[23]=$):$=e[23];let P;e[24]!==s.id||e[25]!==o?(P=()=>{H("brand_deleted",{brand_id:s.id}),g(!1),o(),L.success("Brand deleted")},e[24]=s.id,e[25]=o,e[26]=P):P=e[26];let q;e[27]!==$||e[28]!==P?(q={mutationFn:$,onSuccess:P,onError:Ct},e[27]=$,e[28]=P,e[29]=q):q=e[29];const{mutate:U,isPending:N}=ge(q);let A;e[30]!==s.id||e[31]!==s.isDefault||e[32]!==l?(A=async()=>{await l.call("BRAND_CONTEXT_UPDATE",{id:s.id,isDefault:!s.isDefault})},e[30]=s.id,e[31]=s.isDefault,e[32]=l,e[33]=A):A=e[33];let B;e[34]!==s.id||e[35]!==s.isDefault||e[36]!==o?(B=()=>{H(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),o(),L.success(s.isDefault?"Removed as default brand":"Set as default brand")},e[34]=s.id,e[35]=s.isDefault,e[36]=o,e[37]=B):B=e[37];let T;e[38]!==A||e[39]!==B?(T={mutationFn:A,onSuccess:B,onError:vt},e[38]=A,e[39]=B,e[40]=T):T=e[40];const{mutate:X}=ge(T),xe=s.isDefault?"border-primary/30":"border-border/60";let O;e[41]!==xe?(O=_e("rounded-2xl border bg-background",xe),e[41]=xe,e[42]=O):O=e[42];let z;e[43]!==r?(z=()=>c(!r),e[43]=r,e[44]=z):z=e[44];let E;e[45]!==r?(E=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:r?n.jsx(Xe,{size:14}):n.jsx(He,{size:14})}),e[45]=r,e[46]=E):E=e[46];let F;e[47]!==s.logo||e[48]!==s.name?(F=s.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:yt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[47]=s.logo,e[48]=s.name,e[49]=F):F=e[49];const I=s.name||"Untitled Brand";let S;e[50]!==I?(S=n.jsx("span",{className:"text-sm font-medium text-foreground",children:I}),e[50]=I,e[51]=S):S=e[51];let R;e[52]!==s.domain?(R=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[52]=s.domain,e[53]=R):R=e[53];let w;e[54]!==S||e[55]!==R?(w=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[S,R]}),e[54]=S,e[55]=R,e[56]=w):w=e[56];let M;e[57]!==s.colors||e[58]!==r?(M=!r&&s.colors&&Object.values(s.colors).some(jt)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(bt).map(pt)}),e[57]=s.colors,e[58]=r,e[59]=M):M=e[59];let V;e[60]!==s.fonts||e[61]!==r?(V=!r&&s.fonts&&Object.values(s.fonts).some(ht)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[60]=s.fonts,e[61]=r,e[62]=V):V=e[62];const De=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[63]!==De?(G=_e("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",De),e[63]=De,e[64]=G):G=e[64];let Q,Y;e[65]!==X?(Q=j=>{j.stopPropagation(),X()},Y=j=>{j.key==="Enter"&&(j.stopPropagation(),X())},e[65]=X,e[66]=Q,e[67]=Y):(Q=e[66],Y=e[67]);const ke=s.isDefault?"Unset as default":"Set as default",Be=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let J;e[68]!==Be?(J=_e(Be),e[68]=Be,e[69]=J):J=e[69];let W;e[70]!==J?(W=n.jsx(Me,{size:13,className:J}),e[70]=J,e[71]=W):W=e[71];let Z;e[72]!==G||e[73]!==Q||e[74]!==Y||e[75]!==ke||e[76]!==W?(Z=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:Q,onKeyDown:Y,title:ke,children:W}),e[72]=G,e[73]=Q,e[74]=Y,e[75]=ke,e[76]=W,e[77]=Z):Z=e[77];let he,pe;e[78]===Symbol.for("react.memo_cache_sentinel")?(he=j=>{j.stopPropagation(),g(!0)},pe=j=>{j.key==="Enter"&&(j.stopPropagation(),g(!0))},e[78]=he,e[79]=pe):(he=e[78],pe=e[79]);let be;e[80]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:he,onKeyDown:pe,title:"Delete brand",children:n.jsx(Ge,{size:13,className:"text-muted-foreground"})}),e[80]=be):be=e[80];let ee;e[81]!==z||e[82]!==E||e[83]!==F||e[84]!==w||e[85]!==M||e[86]!==V||e[87]!==Z?(ee=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:z,children:[E,F,w,M,V,Z,be]}),e[81]=z,e[82]=E,e[83]=F,e[84]=w,e[85]=M,e[86]=V,e[87]=Z,e[88]=ee):ee=e[88];let te;e[89]!==r||e[90]!==_||e[91]!==m||e[92]!==y?(te=r&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(it,{form:m,onFieldChange:y,onFieldCommit:_}),n.jsx(dt,{form:m,onFieldChange:y,onFieldCommit:_}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(xt,{form:m,onFieldChange:y,onFieldCommit:_}),n.jsx(ft,{form:m,onFieldChange:y,onFieldCommit:_})]})]}),e[89]=r,e[90]=_,e[91]=m,e[92]=y,e[93]=te):te=e[93];let se;e[94]!==N?(se=j=>{!j&&!N&&g(!1)},e[94]=N,e[95]=se):se=e[95];let je;e[96]===Symbol.for("react.memo_cache_sentinel")?(je=n.jsx(Ye,{children:"Delete brand?"}),e[96]=je):je=e[96];const Ee=s.name||"this brand";let ne;e[97]!==Ee?(ne=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:Ee}),". This action cannot be undone."]}),e[97]=Ee,e[98]=ne):ne=e[98];let le;e[99]!==s.isDefault?(le=s.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[99]=s.isDefault,e[100]=le):le=e[100];let oe;e[101]!==ne||e[102]!==le?(oe=n.jsxs(Je,{children:[je,n.jsx(We,{asChild:!0,children:n.jsxs("div",{children:[ne,le]})})]}),e[101]=ne,e[102]=le,e[103]=oe):oe=e[103];let re;e[104]!==N?(re=n.jsx(Ze,{disabled:N,children:"Cancel"}),e[104]=N,e[105]=re):re=e[105];let ae;e[106]!==U?(ae=j=>{j.preventDefault(),U()},e[106]=U,e[107]=ae):ae=e[107];const Fe=N?"Deleting...":"Delete";let ie;e[108]!==N||e[109]!==ae||e[110]!==Fe?(ie=n.jsx(et,{onClick:ae,disabled:N,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Fe}),e[108]=N,e[109]=ae,e[110]=Fe,e[111]=ie):ie=e[111];let ce;e[112]!==re||e[113]!==ie?(ce=n.jsxs(tt,{children:[re,ie]}),e[112]=re,e[113]=ie,e[114]=ce):ce=e[114];let de;e[115]!==oe||e[116]!==ce?(de=n.jsxs(st,{children:[oe,ce]}),e[115]=oe,e[116]=ce,e[117]=de):de=e[117];let me;e[118]!==f||e[119]!==se||e[120]!==de?(me=n.jsx(nt,{open:f,onOpenChange:se,children:de}),e[118]=f,e[119]=se,e[120]=de,e[121]=me):me=e[121];let ye;return e[122]!==O||e[123]!==ee||e[124]!==te||e[125]!==me?(ye=n.jsxs("div",{className:O,children:[ee,te,me]}),e[122]=O,e[123]=ee,e[124]=te,e[125]=me,e[126]=ye):ye=e[126],ye}function ht(t){return t}function pt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function bt(t){const[,e]=t;return e}function jt(t){return t}function yt(t){t.target.style.display="none"}function vt(){return L.error("Failed to update default brand")}function Ct(){return L.error("Failed to delete brand")}function Nt(){return L.error("Failed to save brand context")}function _t(t){return t?.trim()}function wt(t){return t?.trim()}function Dt(){const t=K.c(53),{brandExtractEnabled:e}=ze(),{org:s}=Ie(),o=$e(),l=Le();let r;t[0]!==s.id?(r=Oe.brandContext(s.id),t[0]=s.id,t[1]=r):r=t[1];let c;t[2]!==o?(c=async()=>{const{items:w}=await o.call("BRAND_CONTEXT_LIST",{includeArchived:!1});return w},t[2]=o,t[3]=c):c=t[3];let f;t[4]!==r||t[5]!==c?(f={queryKey:r,queryFn:c},t[4]=r,t[5]=c,t[6]=f):f=t[6];const{data:g}=Ke(f),p=(g===void 0?[]:g).filter(Et);let d;t[7]!==s.id||t[8]!==l?(d=()=>l.invalidateQueries({queryKey:Oe.brandContext(s.id),refetchType:"all"}),t[7]=s.id,t[8]=l,t[9]=d):d=t[9];const a=d;let i;t[10]!==o?(i=async()=>{await o.call("BRAND_CONTEXT_CREATE",{name:"New Brand",domain:"example.com",overview:""})},t[10]=o,t[11]=i):i=t[11];let u;t[12]!==a?(u=()=>{H("brand_created"),a(),L.success("Brand created")},t[12]=a,t[13]=u):u=t[13];let h;t[14]!==i||t[15]!==u?(h={mutationFn:i,onSuccess:u,onError:Bt},t[14]=i,t[15]=u,t[16]=h):h=t[16];const{mutate:x,isPending:v}=ge(h);let m;t[17]!==o?(m=async w=>{H("brand_extract_started",{domain:w}),await o.call("BRAND_CONTEXT_EXTRACT",{domain:w})},t[17]=o,t[18]=m):m=t[18];let C;t[19]!==a?(C=()=>{H("brand_extract_succeeded"),a(),L.success("Brand extracted successfully")},t[19]=a,t[20]=C):C=t[20];let k;t[21]!==m||t[22]!==C?(k={mutationFn:m,onSuccess:C,onError:kt},t[21]=m,t[22]=C,t[23]=k):k=t[23];const{mutate:D,isPending:y}=ge(k),_=Ne,$=Ne,P=Ne,q="flex flex-col gap-6";let U;t[24]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsxs("div",{children:[n.jsx(Ne.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),t[24]=U):U=t[24];let N;t[25]!==x?(N=()=>x(),t[25]=x,t[26]=N):N=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Re,{size:14}),t[27]=A):A=t[27];let B;t[28]!==v||t[29]!==N?(B=n.jsxs("div",{className:"flex items-center justify-between",children:[U,n.jsxs(Ae,{variant:"outline",onClick:N,disabled:v,children:[A,"Add Brand"]})]}),t[28]=v,t[29]=N,t[30]=B):B=t[30];let T;t[31]!==e||t[32]!==D||t[33]!==y?(T=e&&n.jsx(at,{onExtract:w=>D(w),isExtracting:y}),t[31]=e,t[32]=D,t[33]=y,t[34]=T):T=t[34];const X=p.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(Ae,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>x(),disabled:v,children:[n.jsx(Re,{size:14}),"Add your first brand"]})]}),xe="group space-y-3";let O;t[35]!==a?(O=w=>n.jsx(gt,{brand:w,onChanged:a},w.id),t[35]=a,t[36]=O):O=t[36];const z=p.map(O);let E;t[37]!==z?(E=n.jsx("div",{className:xe,children:z}),t[37]=z,t[38]=E):E=t[38];let F;t[39]!==B||t[40]!==T||t[41]!==X||t[42]!==E?(F=n.jsxs("div",{className:q,children:[B,T,X,E]}),t[39]=B,t[40]=T,t[41]=X,t[42]=E,t[43]=F):F=t[43];let I;t[44]!==P.Body||t[45]!==F?(I=n.jsx(P.Body,{children:F}),t[44]=P.Body,t[45]=F,t[46]=I):I=t[46];let S;t[47]!==$.Content||t[48]!==I?(S=n.jsx($.Content,{children:I}),t[47]=$.Content,t[48]=I,t[49]=S):S=t[49];let R;return t[50]!==_||t[51]!==S?(R=n.jsx(_,{children:S}),t[50]=_,t[51]=S,t[52]=R):R=t[52],R}function kt(t){H("brand_extract_failed",{error:t instanceof Error?t.message:"unknown"}),L.error(t instanceof Error?t.message:"Failed to extract brand")}function Bt(){return L.error("Failed to create brand")}function Et(t){return!t.archivedAt}function Zt(){const t=K.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(rt,{capability:"org:manage",area:"brand context",children:n.jsx(Dt,{})}),t[0]=e):e=t[0],e}export{Zt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as D,j as t,E as V,r as v,B as F,t as _}from"./index-Pat3pJAq.js";import{i as J}from"./AlertCircle-W6j8H01c.js";import{i as O}from"./HardDrive-i-7mfT2M.js";import{s as L}from"./Plus-Ce8glufj.js";import{s as Q}from"./Trash01-DHwSI6yL.js";import{A as X,g as Y,c as Z,b as ee,d as te,e as se,a as ie,f as re}from"./alert-dialog-CnUqNj3j.js";import{d as ne,c as le,D as ae,a as oe,b as ce,e as de}from"./dialog-CsirvbzA.js";import{I as N}from"./input-Bmgjwfqa.js";import{L as C}from"./label-2loPtYA2.js";import{d as me,b as ue,c as fe,S as pe,a as q}from"./select-Db6_lt9v.js";import{S as xe}from"./switch-DPrQb-8A.js";import{S as he}from"./skeleton-zxfXmYH5.js";import{T as ge}from"./textarea-Deq7M1bS.js";import{P}from"./index-AuDyOR_l.js";import{c as je}from"./settings-section-t8sGp_fl.js";import{u as ye,b as be,c as ve}from"./use-file-configs-BzD_V3dx.js";import{R as Se}from"./require-capability-ZPgb4VzJ.js";import"./X-BZrTCz0a.js";import"./tooltip-B5ZRtiWb.js";import"./ChevronUp-zqx6ltUB.js";import"./ChevronDown-BkIuna_N.js";import"./sidebar-BV39sx2h.js";import"./LayoutLeft-DmgR4QKJ.js";import"./sheet-B8bWDiH8.js";import"./card-C_fehaiI.js";import"./ArrowUpRight-CZSTSF18.js";import"./studio-tools-CHs_rGSt.js";import"./use-capability-QYduHUWr.js";import"./access-gate-BmtH13PE.js";import"./capability-load-error-zdtgwIKk.js";function Ce(s,e){if(!(s instanceof Error))return e;const i=s.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(i)try{const r=JSON.parse(i[0])[0];if(r?.message){const l=r.path?.join(".");return l?`${l}: ${r.message}`:r.message}}catch{}return s.message||e}function ke(s){const e=D.c(3),{error:i}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(J,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==i.message?(r=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load file configurations: ",i.message]})]}),e[1]=i.message,e[2]=r):r=e[2],r}function Ne(s){const e=D.c(44),{config:i,onDelete:n}=s;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(O,{size:16,className:"text-muted-foreground"})}),e[0]=r):r=e[0];let l;e[1]!==i.name?(l=t.jsx("span",{className:"font-medium text-sm truncate",children:i.name}),e[1]=i.name,e[2]=l):l=e[2];let o;e[3]!==i.credentialType?(o=i.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):i.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"Managed"}):null,e[3]=i.credentialType,e[4]=o):o=e[4];let g;e[5]!==i.bucket||e[6]!==i.region?(g=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[i.bucket," · ",i.region]}),e[5]=i.bucket,e[6]=i.region,e[7]=g):g=e[7];let c;e[8]!==l||e[9]!==o||e[10]!==g?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[l,o,g]}),e[8]=l,e[9]=o,e[10]=g,e[11]=c):c=e[11];let b;e[12]!==i.description?(b=i.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:i.description}):null,e[12]=i.description,e[13]=b):b=e[13];let j;e[14]!==i.endpoint||e[15]!==i.forcePathStyle?(j=i.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[i.endpoint,i.forcePathStyle?" (path-style)":""]}):null,e[14]=i.endpoint,e[15]=i.forcePathStyle,e[16]=j):j=e[16];let d;e[17]!==i.prefix?(d=i.prefix?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:["prefix: ",i.prefix]}):null,e[17]=i.prefix,e[18]=d):d=e[18];let m;e[19]!==i.publicUrlBase?(m=i.publicUrlBase?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:["public: ",i.publicUrlBase]}):null,e[19]=i.publicUrlBase,e[20]=m):m=e[20];let y;e[21]!==c||e[22]!==b||e[23]!==j||e[24]!==d||e[25]!==m?(y=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[r,t.jsxs("div",{className:"min-w-0",children:[c,b,j,d,m]})]}),e[21]=c,e[22]=b,e[23]=j,e[24]=d,e[25]=m,e[26]=y):y=e[26];let f;e[27]!==i.createdAt?(f=new Date(i.createdAt).toLocaleDateString(),e[27]=i.createdAt,e[28]=f):f=e[28];let u;e[29]!==f?(u=t.jsx("span",{className:"text-xs text-muted-foreground",children:f}),e[29]=f,e[30]=u):u=e[30];let p;e[31]!==i||e[32]!==n?(p=()=>n(i),e[31]=i,e[32]=n,e[33]=p):p=e[33];const x=`Delete ${i.name}`;let h;e[34]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Q,{size:14}),e[34]=h):h=e[34];let k;e[35]!==p||e[36]!==x?(k=t.jsx(F,{variant:"ghost",size:"sm",onClick:p,"aria-label":x,children:h}),e[35]=p,e[36]=x,e[37]=k):k=e[37];let S;e[38]!==u||e[39]!==k?(S=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u,k]}),e[38]=u,e[39]=k,e[40]=S):S=e[40];let A;return e[41]!==y||e[42]!==S?(A=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[y,S]}),e[41]=y,e[42]=S,e[43]=A):A=e[43],A}function Ae(s){const e=D.c(5),{onCreate:i}=s;let n,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(O,{size:20,className:"text-muted-foreground"})}),r=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No buckets configured"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Add an S3-compatible bucket (AWS S3, Cloudflare R2, Google Cloud Storage, MinIO). Access keys are encrypted at rest and never returned over the API."})]}),e[0]=n,e[1]=r):(n=e[0],r=e[1]);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(L,{size:14}),e[2]=l):l=e[2];let o;return e[3]!==i?(o=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[n,r,t.jsxs(F,{onClick:i,size:"sm",className:"mt-2",children:[l,"Add bucket"]})]}),e[3]=i,e[4]=o):o=e[4],o}function K({open:s,onOpenChange:e}){const[i,n]=v.useState(""),[r,l]=v.useState(""),[o,g]=v.useState(""),[c,b]=v.useState(""),[j,d]=v.useState(""),[m,y]=v.useState(!1),[f,u]=v.useState(""),[p,x]=v.useState(""),[h,k]=v.useState("static"),[S,A]=v.useState(""),[R,I]=v.useState(""),[T,U]=v.useState(""),[B,E]=v.useState(""),w=be();function $(){n(""),l(""),g(""),b(""),d(""),y(!1),u(""),x(""),k("static"),A(""),I(""),U(""),E("")}const z=h==="sts-session"?!!(T.trim()&&B.trim()):!!(S&&R);async function M(a){if(a.preventDefault(),!i.trim()||!o.trim()||!c.trim()||!z)return;const W=h==="sts-session"?{credentialType:"sts-session",refreshUrl:T.trim(),apiKey:B.trim()}:{credentialType:"static",accessKeyId:S,secretAccessKey:R};try{await w.mutateAsync({name:i.trim(),description:r.trim()||void 0,bucket:o.trim(),region:c.trim(),endpoint:j.trim()||void 0,forcePathStyle:m,prefix:f.trim()||void 0,publicUrlBase:p.trim()||void 0,...W}),_.success(`Bucket "${i.trim()}" added`),$(),e(!1)}catch(H){_.error(Ce(H,"Failed to add bucket"))}}const G=w.isPending||!i.trim()||!o.trim()||!c.trim()||!z;return t.jsx(ne,{open:s,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(ae,{children:[t.jsx(oe,{children:"Add S3 bucket"}),t.jsx(ce,{children:"Credentials are encrypted at rest and never returned over the API. For Cloudflare R2, Google Cloud Storage, or MinIO, set a custom endpoint."})]}),t.jsxs("form",{onSubmit:M,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-name",children:"Name"}),t.jsx(N,{id:"file-config-name",value:i,onChange:a=>n(a.target.value),placeholder:"production-uploads",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Unique within the organization."})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-bucket",children:"Bucket"}),t.jsx(N,{id:"file-config-bucket",value:o,onChange:a=>g(a.target.value),placeholder:"my-bucket",autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-region",children:"Region"}),t.jsx(N,{id:"file-config-region",value:c,onChange:a=>b(a.target.value),placeholder:"us-east-1",autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-endpoint",children:"Endpoint (optional)"}),t.jsx(N,{id:"file-config-endpoint",type:"url",value:j,onChange:a=>d(a.target.value),placeholder:"https://<account>.r2.cloudflarestorage.com",autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Required for non-AWS providers (R2, GCS, MinIO)."})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(C,{htmlFor:"file-config-path-style",className:"text-sm",children:"Force path-style URLs"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Required for Google Cloud Storage and most MinIO setups."})]}),t.jsx(xe,{id:"file-config-path-style",checked:m,onCheckedChange:y})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-prefix",children:"Key prefix (optional)"}),t.jsx(N,{id:"file-config-prefix",value:f,onChange:a=>u(a.target.value),placeholder:"tenants/acme/",autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"All object keys are written under this prefix. Useful for multi-tenant buckets or credentials scoped to a sub-path. A trailing slash is added automatically."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-public-url-base",children:"Public URL base (optional)"}),t.jsx(N,{id:"file-config-public-url-base",type:"url",value:p,onChange:a=>x(a.target.value),placeholder:"https://pub-xxxx.r2.dev or https://cdn.example.com",autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Host used to build public URLs returned by the picker (R2 dev domain, CDN, custom host). Leave blank to use the bucket's S3 host (AWS default)."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-credential-type",children:"Credentials"}),t.jsxs(me,{value:h,onValueChange:a=>k(a),children:[t.jsx(ue,{id:"file-config-credential-type",className:"w-full",children:t.jsx(fe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:"Static key pair (long-lived)"}),t.jsx(q,{value:"sts-session",children:"Temporary session (STS, auto-refreshed)"})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:h==="sts-session"?"Stores only a refresh endpoint + API key; short-lived credentials are fetched on demand and refreshed automatically.":"A long-lived access key ID and secret, used as-is."})]}),h==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-access-key",children:"Access key ID"}),t.jsx(N,{id:"file-config-access-key",value:S,onChange:a=>A(a.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-secret-key",children:"Secret access key"}),t.jsx(N,{id:"file-config-secret-key",type:"password",value:R,onChange:a=>I(a.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-refresh-url",children:"Refresh URL"}),t.jsx(N,{id:"file-config-refresh-url",type:"url",value:T,onChange:a=>U(a.target.value),placeholder:"https://admin.example.com/api/acme/s3-credentials",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Endpoint POSTed (with the API key below) to vend temporary credentials. Must return accessKeyId, secretAccessKey, sessionToken, and expiration."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-api-key",children:"API key"}),t.jsx(N,{id:"file-config-api-key",type:"password",value:B,onChange:a=>E(a.target.value),autoComplete:"new-password",required:!0}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Sent as the ",t.jsx("code",{children:"x-api-key"})," header on each refresh call."]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(C,{htmlFor:"file-config-description",children:"Description (optional)"}),t.jsx(ge,{id:"file-config-description",value:r,onChange:a=>l(a.target.value),rows:2,placeholder:"What is this bucket used for?"})]}),t.jsxs(de,{children:[t.jsx(F,{type:"button",variant:"outline",onClick:()=>{$(),e(!1)},disabled:w.isPending,children:"Cancel"}),t.jsx(F,{type:"submit",disabled:G,children:w.isPending?"Adding…":"Add bucket"})]})]})]})})}function De(s){const e=D.c(25),{config:i,onClose:n}=s,r=ve();let l;e[0]!==i||e[1]!==r||e[2]!==n?(l=async function(){if(i)try{await r.mutateAsync(i.id),_.success(`Bucket "${i.name}" removed`),n()}catch(k){const S=k;_.error(S instanceof Error?S.message:"Failed to remove bucket")}},e[0]=i,e[1]=r,e[2]=n,e[3]=l):l=e[3];const o=l,g=i!==null;let c;e[4]!==n?(c=h=>!h&&n(),e[4]=n,e[5]=c):c=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Z,{children:"Remove bucket configuration?"}),e[6]=b):b=e[6];const j=i?.name;let d;e[7]!==j?(d=t.jsxs(ee,{children:[b,t.jsxs(te,{children:["This deletes the encrypted credentials for"," ",t.jsx("span",{className:"font-medium",children:j}),". The bucket itself is not affected. This cannot be undone."]})]}),e[7]=j,e[8]=d):d=e[8];let m;e[9]!==r.isPending?(m=t.jsx(X,{disabled:r.isPending,children:"Cancel"}),e[9]=r.isPending,e[10]=m):m=e[10];const y=r.isPending?"Removing…":"Remove";let f;e[11]!==r.isPending||e[12]!==o||e[13]!==y?(f=t.jsx(Y,{onClick:o,disabled:r.isPending,children:y}),e[11]=r.isPending,e[12]=o,e[13]=y,e[14]=f):f=e[14];let u;e[15]!==m||e[16]!==f?(u=t.jsxs(se,{children:[m,f]}),e[15]=m,e[16]=f,e[17]=u):u=e[17];let p;e[18]!==u||e[19]!==d?(p=t.jsxs(ie,{children:[d,u]}),e[18]=u,e[19]=d,e[20]=p):p=e[20];let x;return e[21]!==p||e[22]!==g||e[23]!==c?(x=t.jsx(re,{open:g,onOpenChange:c,children:p}),e[21]=p,e[22]=g,e[23]=c,e[24]=x):x=e[24],x}function Fe(){const s=D.c(25),e=ye(),[i,n]=v.useState(!1),[r,l]=v.useState(null);if(e.length===0){let x;s[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ae,{onCreate:()=>n(!0)}),s[0]=x):x=s[0];let h;return s[1]!==i?(h=t.jsxs(t.Fragment,{children:[x,t.jsx(K,{open:i,onOpenChange:n})]}),s[1]=i,s[2]=h):h=s[2],h}const o=e.length===1?"":"s";let g;s[3]!==e.length||s[4]!==o?(g=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," bucket",o," configured"]}),s[3]=e.length,s[4]=o,s[5]=g):g=s[5];let c;s[6]===Symbol.for("react.memo_cache_sentinel")?(c=()=>n(!0),s[6]=c):c=s[6];let b;s[7]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsxs(F,{onClick:c,size:"sm",children:[t.jsx(L,{size:14}),"Add bucket"]}),s[7]=b):b=s[7];let j;s[8]!==g?(j=t.jsxs("div",{className:"flex items-center justify-between",children:[g,b]}),s[8]=g,s[9]=j):j=s[9];let d;if(s[10]!==e){let x;s[12]===Symbol.for("react.memo_cache_sentinel")?(x=h=>t.jsx(Ne,{config:h,onDelete:l},h.id),s[12]=x):x=s[12],d=e.map(x),s[10]=e,s[11]=d}else d=s[11];let m;s[13]!==d?(m=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:d})}),s[13]=d,s[14]=m):m=s[14];let y;s[15]!==i?(y=t.jsx(K,{open:i,onOpenChange:n}),s[15]=i,s[16]=y):y=s[16];let f;s[17]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),s[17]=f):f=s[17];let u;s[18]!==r?(u=t.jsx(De,{config:r,onClose:f}),s[18]=r,s[19]=u):u=s[19];let p;return s[20]!==j||s[21]!==m||s[22]!==y||s[23]!==u?(p=t.jsxs(t.Fragment,{children:[j,m,y,u]}),s[20]=j,s[21]=m,s[22]=y,s[23]=u,s[24]=p):p=s[24],p}function we(){const s=D.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(P.Title,{children:"Buckets"}),s[0]=e):e=s[0];let i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(P,{children:t.jsx(P.Content,{children:t.jsx(P.Body,{children:t.jsxs(je,{children:[e,t.jsx(V,{fallback:Pe,children:t.jsx(v.Suspense,{fallback:t.jsx(he,{className:"h-32 w-full"}),children:t.jsx(Fe,{})})})]})})})}),s[1]=i):i=s[1],i}function Pe(s){const{error:e}=s;return t.jsx(ke,{error:e??new Error("Failed to load file configs")})}function at(){const s=D.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Se,{capability:"file-configs:manage",area:"files",children:t.jsx(we,{})}),s[0]=e):e=s[0],e}export{at as default};
|
package/dist/client/assets/{capability-load-error-DRTuvJDl.js → capability-load-error-zdtgwIKk.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,m as o,w as c,j as t,a7 as m,B as u,K as x}from"./index-
|
|
1
|
+
import{c as n,m as o,w as c,j as t,a7 as m,B as u,K as x}from"./index-Pat3pJAq.js";function f(){const e=n.c(5),l=o(),{locator:a}=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(m,{size:28})}),e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Couldn't load your permissions"}),t.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:"Something went wrong checking your access. This is usually temporary."})]}),e[1]=i):i=e[1];let r;return e[2]!==a||e[3]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[s,i,t.jsx(u,{variant:"outline",size:"sm",onClick:()=>l.invalidateQueries({queryKey:x.myCapabilities(a)}),children:"Try again"})]}),e[2]=a,e[3]=l,e[4]=r):r=e[4],r}export{f as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l as n,j as c}from"./index-
|
|
1
|
+
import{c as o,l as n,j as c}from"./index-Pat3pJAq.js";function i(a){const e=o.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function f(a){const e=o.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as st,j as e,B as mt}from"./index-Pat3pJAq.js";import{i as lt}from"./XCircle-D--nsAyg.js";import{U as pt}from"./agent-icon-ysNW4XR3.js";import{I as tt}from"./input-Bmgjwfqa.js";import{L as et}from"./label-2loPtYA2.js";import{as as at,at as nt,aB as ct,au as ft}from"./index-DXKg1FOG.js";import{u as dt,s as M,I as gt}from"./primitives-C__c5N9k.js";import{S as ut}from"./save-status-CgcBkaA1.js";import{a as xt,B as ht,b as yt}from"./block-document-B6Eq8Frs.js";import"./AlertCircle-W6j8H01c.js";import"./Tool01-DthaYcRg.js";import"./SwitchHorizontal01-rjvNMlJx.js";import"./Settings02-BPKyn9lz.js";import"./ArrowUpRight-CZSTSF18.js";import"./ZapSquare-9ESQMXmQ.js";import"./Users03-CNrhCl5t.js";import"./CheckCircle-CpqmJQQj.js";import"./ChevronUp-zqx6ltUB.js";import"./ChevronDown-BkIuna_N.js";import"./ChevronLeft-B4YPm5Tt.js";import"./ChevronRight-B06KXNz0.js";import"./DotsVertical-CnakMMTn.js";import"./Stars02-DbeWjR8E.js";import"./Eye-Bu6T1cA0.js";import"./ZoomOut-vLQBm0K1.js";import"./Globe01-BonH0jIg.js";import"./FilterLines-Ckvl4OhL.js";import"./Star01-DKVn-D_o.js";import"./Globe04-by7Koucw.js";import"./HardDrive-i-7mfT2M.js";import"./Key01-CSj8veNe.js";import"./LayoutLeft-DmgR4QKJ.js";import"./LinkExternal01-CwjMdvmW.js";import"./Monitor01-CwV0BvWh.js";import"./Sun-J6HGala1.js";import"./Palette-DDt_6p48.js";import"./Play-DkjtpYqH.js";import"./Plus-Ce8glufj.js";import"./SearchMd-BT20-sda.js";import"./Shield01-CouVDS_l.js";import"./Stars01-BZYGWgaC.js";import"./Trash01-DHwSI6yL.js";import"./Upload01-ClFoMfKj.js";import"./User01-D736U4CX.js";import"./Users01-Cl5hK_oE.js";import"./XClose-C-_BT2hv.js";import"./X-BZrTCz0a.js";import"./Zap-C46ZuAed.js";import"./index-CyuLHyxd.js";import"./chat-context-DTOIbgGQ.js";import"./hooks-C_4SWVhQ.js";import"./use-mcp-client-D5s-JZx9.js";import"./auth-DK93vS8p.js";import"./decopilot-sse-pool-DmMr9kDP.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-SQ-AGFry.js";import"./use-collections-CtF7H9Ec.js";import"./use-ai-providers-B-JdXq2R.js";import"./studio-tools-CHs_rGSt.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-D4FIVwU9.js";import"./scroll-area-BOxtAecg.js";import"./use-clock-tick-DjkJEP58.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CquNDC0j.js";import"./tooltip-B5ZRtiWb.js";import"./file-type-icon-i5WMuvux.js";import"./dialog-CsirvbzA.js";import"./content-blocks-o63cs2vh.js";import"./types-CCU1Qb1L.js";import"./shell-layout-BfoUO_4d.js";import"./avatar-huYQCC56.js";import"./required-auth-layout-DcfPO8NY.js";import"./use-org-sso-D7NdIA39.js";import"./sheet-B8bWDiH8.js";import"./integration-icon-D96bHHLQ.js";import"./use-navigate-to-agent-Cf9Ptpjb.js";import"./use-connection-OMHbx8Fv.js";import"./use-mcp-prompts-DOIkquNc.js";import"./form-l-monXIg.js";import"./select-Db6_lt9v.js";import"./drawer-CSBs93NV.js";import"./collection-search-Dg7QZEAU.js";import"./tabs-tj-mDk3G.js";import"./toggle-group-DxOLsLVl.js";import"./sortable.esm-C5FMmjf1.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C13JH9Uu.js";import"./use-registry-connections-BLPbAhR8.js";import"./useInfiniteQuery-Bj9MLRnT.js";import"./use-infinite-scroll-CcoPxc_B.js";import"./extract-connection-data-DQW44nI6.js";import"./card-C_fehaiI.js";import"./collection-tabs-Y0IGnWks.js";import"./badge-BZJsCOGK.js";import"./textarea-Deq7M1bS.js";import"./connection-form-helpers-BGeEr2Wd.js";import"./authenticate-and-persist-oauth-C0aUigFl.js";import"./mcp-oauth-BJ20JRuX.js";import"./useSuspenseInfiniteQuery-jXW8iBKH.js";import"./connect-desktop-dialog-Bbb_JMLy.js";import"./decopilot-BnK3OJqu.js";import"./checkbox-DnLV6Rmu.js";import"./skeleton-zxfXmYH5.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-t8sGp_fl.js";import"./popover-hX7BP56v.js";import"./command-Mfe2Oxwx.js";import"./index-NjOyHlNQ.js";import"./dropdown-menu-BzKQoihe.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CQVeaXb2.js";import"./empty-state-BR0VX0WK.js";import"./toolbar-Dh-mBE0g.js";import"./preview-dialog-CKmwsLcm.js";import"./index-CsTeQeDG.js";import"./use-mcp-tools-y5FOo2na.js";import"./use-capability-QYduHUWr.js";import"./shell-route-loading-CQesruOS.js";import"./index-k6rfQcrz.js";import"./alert-dialog-CnUqNj3j.js";import"./switch-DPrQb-8A.js";import"./use-debounced-autosave-CuwKz_M_.js";import"./index-AuDyOR_l.js";import"./sidebar-BV39sx2h.js";import"./search-input-CSsG1WWu.js";import"./github-repo-picker-PliDVstk.js";import"./use-secrets-m1q_icrm.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-C2-bvq7i.js";import"./automation-runs-CfMBDfe-.js";import"./table-7uXopK9g.js";import"./use-members-C6JtLoz3.js";import"./use-org-auth-client-BIUXpGUn.js";import"./task-status-Bddx2ns0.js";import"./use-automations-DcJ9X_Bn.js";import"./use-file-configs-BzD_V3dx.js";import"./monaco-editor-BR3HQipt.js";import"./select-model-ByS9ATv_.js";import"./automation-list-row-SpQ0tnhR.js";function Yi(it){const t=st.c(87),{orgSlug:l,virtualMcpId:p,branch:a,blockKey:z,block:G,decofile:H,meta:O,onManagePosts:Q}=it;let F;t[0]!==a||t[1]!==l||t[2]!==p?(F={orgSlug:l,virtualMcpId:p,branch:a},t[0]=a,t[1]=l,t[2]=p,t[3]=F):F=t[3];const m=at(F);let U;t[4]!==G?(U=nt(G,"categories"),t[4]=G,t[5]=U):U=t[5];const ot=U;let D;t[6]!==z||t[7]!==m?(D=o=>{m.mutate({blockKey:z,data:ft(z,"categories",o)})},t[6]=z,t[7]=m,t[8]=D):D=t[8];const[i,V]=dt(ot,D);let L;t[9]!==i||t[10]!==V?(L=(o,rt)=>V({...i,[o]:rt}),t[9]=i,t[10]=V,t[11]=L):L=t[11];const r=L;let s,R;t[12]!==i.slug||t[13]!==H?(s=M(i.slug),R=s?ct(H).filter(o=>o.categorySlugs.includes(s)).length:0,t[12]=i.slug,t[13]=H,t[14]=s,t[15]=R):(s=t[14],R=t[15]);const T=R;let n;t[16]!==i.name?(n=M(i.name)||"Untitled category",t[16]=i.name,t[17]=n):n=t[17];let c;t[18]!==n?(c=e.jsx("span",{className:"truncate text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let f;t[20]!==m.isError||t[21]!==m.isPending?(f=e.jsx(ut,{isPending:m.isPending,isError:m.isError}),t[20]=m.isError,t[21]=m.isPending,t[22]=f):f=t[22];let d;t[23]!==c||t[24]!==f?(d=e.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,f]}),t[23]=c,t[24]=f,t[25]=d):d=t[25];let g;t[26]!==i.name?(g=M(i.name),t[26]=i.name,t[27]=g):g=t[27];let u;t[28]!==r?(u=o=>r("name",o),t[28]=r,t[29]=u):u=t[29];let x;t[30]!==g||t[31]!==u?(x=e.jsx(gt,{value:g,onChange:u,placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t[30]=g,t[31]=u,t[32]=x):x=t[32];let $;t[33]===Symbol.for("react.memo_cache_sentinel")?($=e.jsx(et,{htmlFor:"category-slug",children:"Slug"}),t[33]=$):$=t[33];let h;t[34]!==i.slug?(h=M(i.slug),t[34]=i.slug,t[35]=h):h=t[35];let y;t[36]!==r?(y=o=>r("slug",o.target.value),t[36]=r,t[37]=y):y=t[37];let j;t[38]!==h||t[39]!==y?(j=e.jsxs("div",{className:"mt-4 space-y-2",children:[$,e.jsx(tt,{id:"category-slug",value:h,onChange:y,placeholder:"my-category",className:"h-10"})]}),t[38]=h,t[39]=y,t[40]=j):j=t[40];let A;t[41]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(et,{htmlFor:"category-description",children:"Description"}),t[41]=A):A=t[41];let b;t[42]!==i.description?(b=M(i.description),t[42]=i.description,t[43]=b):b=t[43];let v;t[44]!==r?(v=o=>r("description",o.target.value),t[44]=r,t[45]=v):v=t[45];let N;t[46]!==b||t[47]!==v?(N=e.jsxs("div",{className:"mt-4 space-y-2",children:[A,e.jsx(tt,{id:"category-description",value:b,onChange:v,placeholder:"Short description for this category",className:"h-10"})]}),t[46]=b,t[47]=v,t[48]=N):N=t[48];let J;t[49]===Symbol.for("react.memo_cache_sentinel")?(J=e.jsx(pt,{size:16,className:"shrink-0 text-muted-foreground"}),t[49]=J):J=t[49];const X=T===1?"post":"posts";let S;t[50]!==T||t[51]!==X?(S=e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[J,e.jsxs("span",{className:"text-sm",children:[T," ",X," in this category"]})]}),t[50]=T,t[51]=X,t[52]=S):S=t[52];const Y=!s,Z=s?"Jump to the posts list filtered by this category":"Set a slug to manage this category's posts";let B;t[53]!==Q||t[54]!==s?(B=()=>Q(s),t[53]=Q,t[54]=s,t[55]=B):B=t[55];let K;t[56]===Symbol.for("react.memo_cache_sentinel")?(K=e.jsx(lt,{size:14}),t[56]=K):K=t[56];let k;t[57]!==Y||t[58]!==Z||t[59]!==B?(k=e.jsxs(mt,{type:"button",variant:"outline",size:"sm",disabled:Y,title:Z,onClick:B,children:["Manage posts",K]}),t[57]=Y,t[58]=Z,t[59]=B,t[60]=k):k=t[60];let _;t[61]!==S||t[62]!==k?(_=e.jsxs("div",{className:"mt-6 flex items-center justify-between gap-3 rounded-lg border bg-muted/30 px-4 py-3",children:[S,k]}),t[61]=S,t[62]=k,t[63]=_):_=t[63];let W;t[64]===Symbol.for("react.memo_cache_sentinel")?(W=e.jsx("div",{className:"mt-6 border-t"}),t[64]=W):W=t[64];let C;t[65]!==i.sections?(C=xt(i.sections),t[65]=i.sections,t[66]=C):C=t[66];let P;t[67]!==r?(P=o=>r("sections",o),t[67]=r,t[68]=P):P=t[68];let E;t[69]!==O||t[70]!==C||t[71]!==P?(E=e.jsx(ht,{value:C,onChange:P,meta:O,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."}),t[69]=O,t[70]=C,t[71]=P,t[72]=E):E=t[72];let w;t[73]!==x||t[74]!==j||t[75]!==N||t[76]!==_||t[77]!==E?(w=e.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-3xl px-8 py-8",children:[x,j,N,_,W,E]})}),t[73]=x,t[74]=j,t[75]=N,t[76]=_,t[77]=E,t[78]=w):w=t[78];let I;t[79]!==w||t[80]!==d?(I=e.jsxs("div",{className:"flex h-full flex-col",children:[d,w]}),t[79]=w,t[80]=d,t[81]=I):I=t[81];let q;return t[82]!==a||t[83]!==l||t[84]!==I||t[85]!==p?(q=e.jsx(yt,{orgSlug:l,virtualMcpId:p,branch:a,children:I}),t[82]=a,t[83]=l,t[84]=I,t[85]=p,t[86]=q):q=t[86],q}export{Yi as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as pe,l as Fe,bF as Ue,j as L,cv as qe,H as Me,m as Ee,w as re,K as ue,t as _e,v as ae,L as oe,b as we,u as Ae,e as Ke,r as h,s as Ve,a as We,I as He,aI as Qe}from"./index-
|
|
1
|
+
import{c as pe,l as Fe,bF as Ue,j as L,cv as qe,H as Me,m as Ee,w as re,K as ue,t as _e,v as ae,L as oe,b as we,u as Ae,e as Ke,r as h,s as Ve,a as We,I as He,aI as Qe}from"./index-Pat3pJAq.js";import{A as Re,a as Be,d as ze,e as Ge,f as Xe,u as Ze,w as Ye}from"./hooks-C_4SWVhQ.js";import{a as Je,u as et,S as tt}from"./use-mcp-client-D5s-JZx9.js";import{a as nt}from"./use-virtual-mcp-SQ-AGFry.js";import{u as st,b as de}from"./use-ai-providers-B-JdXq2R.js";import{n as at,k as ot}from"./tab-id-BptcWVWa.js";import{d as rt}from"./use-organization-settings-D4FIVwU9.js";const it={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.4-mini"]},ct={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.4"]},lt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.5"]},dt={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},ut={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},pt={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Pe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function ht(t){return Pe(t).includes("deepresearch")}const ft=["sonar","searchpreview","online"];function De(t){const e=Pe(t);return e.includes("deepresearch")?!1:ft.some(a=>e.includes(a))}function $e(t){return t.asyncResearch!==!0&&De(t.modelId)}function Oe(t){return t.asyncResearch===!0||ht(t.modelId)||De(t.modelId)}function ne(t,e,a,n){for(const s of a){const o=t.find(r=>r.modelId===s);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const s of a){const o=t.find(r=>r.modelId.includes(s));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(n){const s=t.find(n);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}return null}function mt(t,e){const a={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of t){const s=e[n.id]??[],o=n.providerId;a.chat.fast||(a.chat.fast=ne(s,n.id,it[o]??[])),a.chat.smart||(a.chat.smart=ne(s,n.id,ct[o]??[])),a.chat.thinking||(a.chat.thinking=ne(s,n.id,lt[o]??[])),a.image||(a.image=ne(s,n.id,dt[o]??[],r=>r.capabilities?.includes("image")===!0)),a.webSearch||(a.webSearch=ne(s,n.id,ut[o]??[],$e)),a.deepResearch||(a.deepResearch=ne(s,n.id,pt[o]??[],Oe))}return a}const gt=Ue("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Kt(t){const e=pe.c(10),{variant:a,size:n}=t;let s;e[0]!==n||e[1]!==a?(s=Fe(gt({variant:a,size:n})),e[0]=n,e[1]=a,e[2]=s):s=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=L.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=L.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let i;e[5]!==s?(i=L.jsxs("svg",{"aria-hidden":"true",className:s,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=s,e[6]=i):i=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=L.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=f):f=e[7];let g;return e[8]!==i?(g=L.jsxs("div",{role:"status",children:[i,f]}),e[8]=i,e[9]=g):g=e[9],g}function xt(t,e=[]){return t==="stop"?e.filter(s=>s.type==="text"&&s.text).map(s=>s.text).join(`
|
|
2
2
|
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}const Ie={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"decopilot-desktop":{harness:"decopilot",sandbox:"user-desktop"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function yt(t,e){if(!t)return null;const a=e?qe(e):null;if(t==="decopilot"&&a===null)return"decopilot";for(const[n,s]of Object.entries(Ie))if(s.harness===t&&s.sandbox===a)return n;return null}function It(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function St(t){const e=pe.c(10);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=a):a=e[0];const n=Me(a);let s;if(e[1]!==n?.params.appSlug||e[2]!==n?.params.collectionName||e[3]!==n?.params.itemId||e[4]!==t){s=[],t&&s.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`);let o;e[6]!==n?.params.appSlug||e[7]!==n?.params.collectionName||e[8]!==n?.params.itemId?(o=[],n?.params.appSlug&&o.push(`- Connection ID: ${n?.params.appSlug}`),n?.params.collectionName&&o.push(`- Collection: ${n?.params.collectionName}`),n?.params.itemId&&o.push(`- Item ID: ${n?.params.itemId}`),e[6]=n?.params.appSlug,e[7]=n?.params.collectionName,e[8]=n?.params.itemId,e[9]=o):o=e[9],o.length>0&&s.push(`### Current Resource
|
|
4
4
|
The user is viewing the following resource:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,bG as l,bH as b}from"./index-
|
|
1
|
+
import{c as n,l as d,j as c,bG as l,bH as b}from"./index-Pat3pJAq.js";import{i as m}from"./ChevronUp-zqx6ltUB.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-Pat3pJAq.js";import{A as u}from"./auth-split-layout-BhYYz27o.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as y,j as t,B as F,i as X,z as Ge,C as se,E as Pe,r as T,w as ie,G as Qe,l as V,bf as Ye,u as Xe,y as G,t as Ze,e as ae,b1 as ke}from"./index-Pat3pJAq.js";import{E as Ee}from"./empty-state-BR0VX0WK.js";import{u as et,a as Ae}from"./use-collections-CtF7H9Ec.js";import{u as ce}from"./use-mcp-client-D5s-JZx9.js";import{F as ne,a as tt,b as de,d as me}from"./form-l-monXIg.js";import{I as ue}from"./input-Bmgjwfqa.js";import{T as re}from"./textarea-Deq7M1bS.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-CKMrk_Wj.js";import{ag as rt,x as it,a5 as at,ah as ct,a1 as dt,ai as mt,M as be}from"./agent-icon-ysNW4XR3.js";import{g as ut,M as xt,a as Ne}from"./types-CCU1Qb1L.js";import{A as pt,a as ft,b as ht}from"./alert-Gt3FhBIl.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-Db6_lt9v.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-B5ZRtiWb.js";import{i as jt}from"./AlertCircle-W6j8H01c.js";import{s as bt}from"./Stars02-DbeWjR8E.js";import{a as Nt}from"./Eye-Bu6T1cA0.js";import{i as vt}from"./Play-DkjtpYqH.js";import{i as St}from"./ChevronRight-B06KXNz0.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./index-k6rfQcrz.js";import{a as Oe,u as Re}from"./use-connection-OMHbx8Fv.js";import{a as It}from"./use-mcp-tools-y5FOo2na.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-D96bHHLQ.js";import{f as Tt,h as Pt}from"./chat-context-DTOIbgGQ.js";import{b as kt}from"./shell-layout-BfoUO_4d.js";import{M as Et}from"./monaco-editor-BR3HQipt.js";import{n as At}from"./XCircle-D--nsAyg.js";import"./auth-DK93vS8p.js";import"./label-2loPtYA2.js";import"./index-AuDyOR_l.js";import"./sidebar-BV39sx2h.js";import"./LayoutLeft-DmgR4QKJ.js";import"./sheet-B8bWDiH8.js";import"./X-BZrTCz0a.js";import"./ZoomOut-vLQBm0K1.js";import"./Key01-CSj8veNe.js";import"./extract-connection-data-DQW44nI6.js";import"./use-registry-connections-BLPbAhR8.js";import"./use-organization-settings-D4FIVwU9.js";import"./studio-tools-CHs_rGSt.js";import"./Plus-Ce8glufj.js";import"./index-CuYE42R8.js";import"./index-NjOyHlNQ.js";import"./popover-hX7BP56v.js";import"./use-virtual-mcp-SQ-AGFry.js";import"./ChevronUp-zqx6ltUB.js";import"./SearchMd-BT20-sda.js";import"./Users03-CNrhCl5t.js";import"./use-create-virtual-mcp-BzfJqNI1.js";import"./use-navigate-to-agent-Cf9Ptpjb.js";import"./Tool01-DthaYcRg.js";import"./SwitchHorizontal01-rjvNMlJx.js";import"./Settings02-BPKyn9lz.js";import"./ArrowUpRight-CZSTSF18.js";import"./ZapSquare-9ESQMXmQ.js";import"./CheckCircle-CpqmJQQj.js";import"./ChevronDown-BkIuna_N.js";import"./ChevronLeft-B4YPm5Tt.js";import"./DotsVertical-CnakMMTn.js";import"./Globe01-BonH0jIg.js";import"./FilterLines-Ckvl4OhL.js";import"./Star01-DKVn-D_o.js";import"./Globe04-by7Koucw.js";import"./HardDrive-i-7mfT2M.js";import"./LinkExternal01-CwjMdvmW.js";import"./Monitor01-CwV0BvWh.js";import"./Sun-J6HGala1.js";import"./Palette-DDt_6p48.js";import"./Shield01-CouVDS_l.js";import"./Stars01-BZYGWgaC.js";import"./Trash01-DHwSI6yL.js";import"./Upload01-ClFoMfKj.js";import"./User01-D736U4CX.js";import"./Users01-Cl5hK_oE.js";import"./XClose-C-_BT2hv.js";import"./Zap-C46ZuAed.js";import"./mcp-oauth-BJ20JRuX.js";import"./badge-BZJsCOGK.js";import"./hooks-C_4SWVhQ.js";import"./decopilot-sse-pool-DmMr9kDP.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-B-JdXq2R.js";import"./tab-id-BptcWVWa.js";import"./avatar-huYQCC56.js";import"./dialog-CsirvbzA.js";import"./required-auth-layout-DcfPO8NY.js";import"./use-org-sso-D7NdIA39.js";import"./index-CsTeQeDG.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:Dt}),t.jsx(ne,{control:o.control,name:"description",render:zt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:le(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let E;e[18]!==i.description?(E=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function ze(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),A=Pt(),{setChatOpen:U}=kt(),D=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[De,Le]=T.useState(!1);O&&!De&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const z=u.trim();if(!z)return{};const B=JSON.parse(z);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([z,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const je=Number(h[z]);Number.isNaN(je)||(h[z]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(ze,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(D,d),onTeardown:()=>A?.clearAppContext(D),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Et,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Wt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let D;s[24]!==k?(D=t.jsx(q,{children:t.jsx(ze,{children:k})}),s[24]=k,s[25]=D):D=s[25];let _;s[26]!==U||s[27]!==D||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,D]})}),s[26]=U,s[27]=D,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function _n(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{_n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as s,l as M,B as V}from"./index-
|
|
1
|
+
import{c as B,j as s,l as M,B as V}from"./index-Pat3pJAq.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-BzKQoihe.js";import{a as L,n as O,d as R,i as A,c as F}from"./SwitchHorizontal01-rjvNMlJx.js";import{i as S}from"./ChevronUp-zqx6ltUB.js";import{T as I,a as K,c as P,b as W}from"./tooltip-B5ZRtiWb.js";import{V as q}from"./view-mode-toggle-C2-bvq7i.js";import{B as G}from"./badge-BZJsCOGK.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,i as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,i as w}from"./index-Pat3pJAq.js";import{i as C}from"./SearchMd-BT20-sda.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as m}from"./index-
|
|
1
|
+
import{c as f,l as u,j as m}from"./index-Pat3pJAq.js";import{B as g}from"./badge-BZJsCOGK.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,l as i,j as n}from"./index-
|
|
1
|
+
import{c as d,l as i,j as n}from"./index-Pat3pJAq.js";import{_ as m}from"./index-NjOyHlNQ.js";import{d as k,a as N,b as j,D as b,c as w}from"./dialog-CsirvbzA.js";import{i as y}from"./SearchMd-BT20-sda.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
|