decocms 4.356.1 → 4.356.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-CdtdSQig.js → AlertCircle-DeXfw3DH.js} +1 -1
- package/dist/client/assets/{AreaChart-n_0F8HaQ.js → AreaChart-CPv7DteK.js} +1 -1
- package/dist/client/assets/{ArrowLeft-dqbBqIhW.js → ArrowLeft-BsRBcR7k.js} +1 -1
- package/dist/client/assets/{ArrowRight-NtiFMpcp.js → ArrowRight-Br4r7pwg.js} +1 -1
- package/dist/client/assets/{ArrowUp-DGC5Ysun.js → ArrowUp-eSS406es.js} +1 -1
- package/dist/client/assets/{Check-BNS9txQN.js → Check-BBi_O2LB.js} +1 -1
- package/dist/client/assets/{CheckCircle-9ZidWDkT.js → CheckCircle-DQQm8ch4.js} +1 -1
- package/dist/client/assets/{ChevronRight-C30dh3Q9.js → ChevronRight-B22Moez_.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DUpFY0CP.js → ChevronSelectorVertical-DRZ4gkV3.js} +1 -1
- package/dist/client/assets/{ChevronUp-Bn_2AScF.js → ChevronUp-DSVxpGju.js} +1 -1
- package/dist/client/assets/{Copy01-BeDMVNpZ.js → Copy01-Cc8n0Ba4.js} +1 -1
- package/dist/client/assets/{CreditCard01-Bcjbvush.js → CreditCard01-Cv5ITpta.js} +1 -1
- package/dist/client/assets/{DotsVertical-DYacfr5R.js → DotsVertical-CIP9Nl0k.js} +1 -1
- package/dist/client/assets/{Download01-C8nV35i3.js → Download01-BMiKF4vk.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CAh5kYv-.js → ErrorBarContext-DZns3SAi.js} +1 -1
- package/dist/client/assets/{Eye-mJ7L05mA.js → Eye-BoL3xwzV.js} +1 -1
- package/dist/client/assets/{GitBranch01-C4bNuLp7.js → GitBranch01-CoEwe3ey.js} +1 -1
- package/dist/client/assets/{Globe01-DdZU4lRb.js → Globe01-D_tKhOLC.js} +1 -1
- package/dist/client/assets/{HardDrive-CQCLSLgd.js → HardDrive-CeTPrLdV.js} +1 -1
- package/dist/client/assets/{Image01-whwxbNfN.js → Image01-D2YbNIYT.js} +1 -1
- package/dist/client/assets/{Key01-CHvc20yr.js → Key01-DKCA1Tnq.js} +1 -1
- package/dist/client/assets/{Link01-G-sA1km9.js → Link01-DQ70lFlQ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CYc-bJpZ.js → LinkExternal01-B8GzK7ER.js} +1 -1
- package/dist/client/assets/{Monitor01-BwrTu8m8.js → Monitor01-Yeg984fl.js} +1 -1
- package/dist/client/assets/{Package-C0Uo1zbM.js → Package-CxCTcL6L.js} +1 -1
- package/dist/client/assets/{Palette-BTAlw5uu.js → Palette-ajTtDJW6.js} +1 -1
- package/dist/client/assets/{Play-B1ibbngi.js → Play-0ktNAbPi.js} +1 -1
- package/dist/client/assets/{Plus-xsC4rta_.js → Plus-C0NWoh9T.js} +1 -1
- package/dist/client/assets/{SearchLg-Dh00DEpq.js → SearchLg-BgA05EHK.js} +1 -1
- package/dist/client/assets/{SearchMd-DTNbT_Jp.js → SearchMd-oWTKVUjk.js} +1 -1
- package/dist/client/assets/{Sector-B_5cEmnA.js → Sector-pi459LuN.js} +1 -1
- package/dist/client/assets/{Settings02-CfZasyPL.js → Settings02-BgDAmtwC.js} +1 -1
- package/dist/client/assets/{Share07-FqMjFNzn.js → Share07-cIietouI.js} +1 -1
- package/dist/client/assets/{Shield01-DS94z539.js → Shield01-DJKVjmYu.js} +1 -1
- package/dist/client/assets/{Stars01-DGM_bOpf.js → Stars01-BtEjDnlJ.js} +1 -1
- package/dist/client/assets/{Sun-DG9wzk9T.js → Sun-Bj1wxgQu.js} +1 -1
- package/dist/client/assets/{Tool01-CNf-_No9.js → Tool01-36BH9Lfu.js} +1 -1
- package/dist/client/assets/{Tool02-CHwib-_Q.js → Tool02-BB0DnTeE.js} +1 -1
- package/dist/client/assets/{Trash01-nvYAyX_8.js → Trash01-BZPG63MT.js} +1 -1
- package/dist/client/assets/{TrendUp01-hJGiREai.js → TrendUp01-CV5BO_Jc.js} +1 -1
- package/dist/client/assets/{Upload01-ChJHhip5.js → Upload01-DP0vQQKt.js} +1 -1
- package/dist/client/assets/{User01-j821_8QG.js → User01-xnVK2xE4.js} +1 -1
- package/dist/client/assets/{UserSquare-B7dos4Q0.js → UserSquare-Brq8ZOAk.js} +1 -1
- package/dist/client/assets/{Users01-f_U-E4Da.js → Users01-DKKqtuHP.js} +1 -1
- package/dist/client/assets/{Users03-CW2csHHv.js → Users03-BSbySSqf.js} +1 -1
- package/dist/client/assets/{XCircle-ByT94gBW.js → XCircle-BUI7KQFj.js} +1 -1
- package/dist/client/assets/{XClose-CW7Aosm2.js → XClose-DHKiEI8G.js} +1 -1
- package/dist/client/assets/{Zap-iz6Sr9Zm.js → Zap-DjgdzPMR.js} +1 -1
- package/dist/client/assets/{ZoomOut-LBFAX-2d.js → ZoomOut-CoETMI1M.js} +1 -1
- package/dist/client/assets/{access-gate-CMRv-yhU.js → access-gate-Bgk1AnfB.js} +1 -1
- package/dist/client/assets/{agent-icon-DTmpIuMC.js → agent-icon-DLDeYH2t.js} +1 -1
- package/dist/client/assets/{agents-list-D8SXzjAn.js → agents-list-CqtTKQzs.js} +1 -1
- package/dist/client/assets/{ai-providers-CQxtaVne.js → ai-providers-DCaQTiKv.js} +1 -1
- package/dist/client/assets/{alert-Ce2RpXgI.js → alert-CNSpeELR.js} +1 -1
- package/dist/client/assets/{alert-dialog-BsPnDtVm.js → alert-dialog-WdxFSf6L.js} +1 -1
- package/dist/client/assets/{analytics-tab-BlKUJvnc.js → analytics-tab-CssCadJy.js} +1 -1
- package/dist/client/assets/{api-keys-3CxS24_z.js → api-keys-Bcr3KsKD.js} +1 -1
- package/dist/client/assets/api-keys-CKDQ6ZZm.js +1 -0
- package/dist/client/assets/app-editor-DmqwClEO.js +1 -0
- package/dist/client/assets/{auth-DH4v3z1c.js → auth-4merKc2Y.js} +1 -1
- package/dist/client/assets/{auth-catchall-CpNWneoU.js → auth-catchall-B1qBOKqF.js} +1 -1
- package/dist/client/assets/{auth-entry-BO0TuUqZ.js → auth-entry-Bt75RjYj.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DI4XB-M1.js → auth-split-layout-LyPcuvle.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B97IaQ9E.js → authenticate-and-persist-oauth-C_0G8We7.js} +1 -1
- package/dist/client/assets/{automation-list-row-M2WgmeMl.js → automation-list-row-Dtyl4ZTk.js} +1 -1
- package/dist/client/assets/{automation-runs-CrifgXMR.js → automation-runs-lWWesVU8.js} +1 -1
- package/dist/client/assets/{automations-DczWpUlS.js → automations-C0v3rm7l.js} +1 -1
- package/dist/client/assets/{autosend-D5361h5J.js → autosend-BFGLO-gB.js} +1 -1
- package/dist/client/assets/{avatar-CPNsUn9l.js → avatar-BtvgpUQu.js} +1 -1
- package/dist/client/assets/{badge-C2WoE480.js → badge-CCYpKX1i.js} +1 -1
- package/dist/client/assets/{block-document-BBml7QbO.js → block-document-7bZFXtf8.js} +1 -1
- package/dist/client/assets/{breadcrumb-CntvxA6J.js → breadcrumb-B_F00hJ0.js} +1 -1
- package/dist/client/assets/{buckets-BsNOgFUC.js → buckets-CfJroiA6.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-rlSmtRJV.js → bulk-category-panel-BU1ehTbM.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dq3gqh_a.js → capability-load-error-BjPQlnzK.js} +1 -1
- package/dist/client/assets/{cards-C9-pQzRL.js → cards-CKmKiyPa.js} +1 -1
- package/dist/client/assets/{category-editor-Cj2cuPrG.js → category-editor-DZPnXSAP.js} +1 -1
- package/dist/client/assets/{cdn-tab-BnyUK91z.js → cdn-tab-Cg_sACr9.js} +1 -1
- package/dist/client/assets/{chart-6g6GnqHP.js → chart-DxXcgb-l.js} +1 -1
- package/dist/client/assets/{chat-context-DWo9Tu9r.js → chat-context-Clr-423u.js} +1 -1
- package/dist/client/assets/{checkbox-D9H5aqpt.js → checkbox-PM3x_Kcj.js} +1 -1
- package/dist/client/assets/{choose-editor-V6xLcAYV.js → choose-editor-heCsSWeI.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cq1BuDna.js → cli-auth-success-rOLNt-3A.js} +1 -1
- package/dist/client/assets/{client-icons-wMqmeeR9.js → client-icons-BZmO2UXc.js} +1 -1
- package/dist/client/assets/{collection-detail-DmuDA7lc.js → collection-detail-DBEmZFI0.js} +1 -1
- package/dist/client/assets/{collection-display-button-DFyjz6l6.js → collection-display-button-BwyJZxph.js} +1 -1
- package/dist/client/assets/{collection-search-CmxVMMgl.js → collection-search-DeO0gmSf.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DR_5blS-.js → collection-table-wrapper-DOovcnf4.js} +1 -1
- package/dist/client/assets/{collection-tabs-Divxg_x2.js → collection-tabs-CY5Bqhy2.js} +1 -1
- package/dist/client/assets/{command-BPI8gOmi.js → command-CBtKGmqK.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CVmLywUw.js → commerce-onboarding-B5D4nByp.js} +1 -1
- package/dist/client/assets/{connect-CxvtlYlq.js → connect-Doi_tja8.js} +1 -1
- package/dist/client/assets/{connect-layout-DkREAgO0.js → connect-layout-CeFJG4VK.js} +1 -1
- package/dist/client/assets/{connection-D8oXR41O.js → connection-Dmw4Hb04.js} +1 -1
- package/dist/client/assets/{connection-card-KMjZdOwe.js → connection-card-BREXoLfM.js} +1 -1
- package/dist/client/assets/{connection-detail-Dx0TyDM_.js → connection-detail-DgPMIV20.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BqsPs5qs.js → connection-form-helpers-4XZDlMn9.js} +1 -1
- package/dist/client/assets/{connections-CZFYOQGi.js → connections-BXmPZo8e.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CPAuu521.js → create-organization-dialog-WxIvOpxq.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Cyfcjtz2.js → decopilot-sse-pool-Dry_70zj.js} +1 -1
- package/dist/client/assets/{dialog-2jttB-KX.js → dialog-Ukm5OPV3.js} +1 -1
- package/dist/client/assets/{domain-settings-BBg58zVm.js → domain-settings-B3a9n29q.js} +1 -1
- package/dist/client/assets/{drawer-BdyJoaFA.js → drawer-PQWkdkQv.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C1fYSQGV.js → dropdown-menu-D-LKq1Ty.js} +1 -1
- package/dist/client/assets/{e2e-tab-rIj5sQ61.js → e2e-tab-qEAdDnpX.js} +1 -1
- package/dist/client/assets/{editor-eTaXiljY.js → editor-DX3E4m2N.js} +1 -1
- package/dist/client/assets/{empty-state-gsNGdr_1.js → empty-state-BPA0C1qI.js} +1 -1
- package/dist/client/assets/{empty-state-5GFv5LO_.js → empty-state-BZ-FN_XV.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D45FORRs.js → extract-connection-data-CsuagmF_.js} +1 -1
- package/dist/client/assets/{file-explorer-BNNnyz9w.js → file-explorer-DB1F5n7M.js} +1 -1
- package/dist/client/assets/{file-type-icon-VgyPkUqz.js → file-type-icon-C9IcryLg.js} +1 -1
- package/dist/client/assets/{folder-icon-VEtMBCBf.js → folder-icon-DdLT4yvh.js} +1 -1
- package/dist/client/assets/{form-_gWD2rxP.js → form-Dmuwki82.js} +1 -1
- package/dist/client/assets/{general-BEsWRbs4.js → general-CIreeDs-.js} +1 -1
- package/dist/client/assets/{github-icon-Cgt9rZs9.js → github-icon-ezyF0naS.js} +1 -1
- package/dist/client/assets/{hooks-BwLEGt_X.js → hooks-DtmH-v5J.js} +1 -1
- package/dist/client/assets/{index-B4hzzcEv.js → index-BbheWoga.js} +1 -1
- package/dist/client/assets/{index-ZmtXUxEb.js → index-BeLnnvSe.js} +1 -1
- package/dist/client/assets/{index-iIsYKWiq.js → index-BmG8Sp_S.js} +1 -1
- package/dist/client/assets/{index-BFFJW35r.js → index-BtkX21YJ.js} +1 -1
- package/dist/client/assets/{index-G-txExsa.js → index-BvC6wQ3u.js} +1 -1
- package/dist/client/assets/{index-HSSIuqk1.js → index-CZKKQKZ2.js} +6 -6
- package/dist/client/assets/{index-P2ZyWnSg.js → index-CbVbTbTk.js} +1 -1
- package/dist/client/assets/{index-DVOqYnNc.css → index-DI-Rfi_G.css} +1 -1
- package/dist/client/assets/{index-B_9W4UXC.js → index-DXamwEeh.js} +1 -1
- package/dist/client/assets/{index-uZrkYGDx.js → index-DZBPDZBP.js} +1 -1
- package/dist/client/assets/{index-B_J9NJG-.js → index-DyDU6mRE.js} +1 -1
- package/dist/client/assets/{index-CHLYwzdG.js → index-VAoEJtvI.js} +2 -2
- package/dist/client/assets/{index-ChZbvTz1.js → index-axgrMiAg.js} +1 -1
- package/dist/client/assets/{index-redirect-wUCoHR0F.js → index-redirect-DRoP793V.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BrVIUj-a.js → infiniteQueryObserver-6JlvsRry.js} +1 -1
- package/dist/client/assets/{infra-billing-CEIj149Y.js → infra-billing-CR9gl2nb.js} +1 -1
- package/dist/client/assets/{input-Bor7FWk2.js → input-DV0zc4Ex.js} +1 -1
- package/dist/client/assets/{integration-icon-BxN3_HAp.js → integration-icon-BtFJcxte.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BYNS-LSy.js → invite-member-dialog-DLcDeLv2.js} +1 -1
- package/dist/client/assets/{label-B6W74l06.js → label-phMabfYY.js} +1 -1
- package/dist/client/assets/{layout-CVhvQNgm.js → layout-BZiRqiD1.js} +1 -1
- package/dist/client/assets/{login-BowMQ2ci.js → login-tafdJ0GU.js} +1 -1
- package/dist/client/assets/{markdown-D08okHMm.js → markdown-Dyz-XGHR.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Dpm55onW.js → mcp-app-renderer-D4iYl8Q6.js} +1 -1
- package/dist/client/assets/{mcp-oauth-rC9izRug.js → mcp-oauth-HGr7KetU.js} +1 -1
- package/dist/client/assets/{members-DJINzCzo.js → members-Dda4vV6K.js} +1 -1
- package/dist/client/assets/{monaco-editor-Q72XS9Vh.js → monaco-editor-CpW797C4.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CE5O_ci9.js → monitoring-stats-row-COXJ6OC9.js} +1 -1
- package/dist/client/assets/{multi-select-C30XbNms.js → multi-select-BEZmqCq8.js} +1 -1
- package/dist/client/assets/{oauth-callback-IBWGm2OF.js → oauth-callback-VaoJoH3L.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BGlz_5BX.js → oauth-callback-ai-provider-BOabmvTh.js} +1 -1
- package/dist/client/assets/{onboarding-YPzqB9fZ.js → onboarding-Cx70GM9x.js} +1 -1
- package/dist/client/assets/{org-layout-DQPfOQyb.js → org-layout-DUsfZHZX.js} +1 -1
- package/dist/client/assets/{organization-choice-DKnQKZLu.js → organization-choice-DjZc_C8s.js} +1 -1
- package/dist/client/assets/{orgs-BbV8JNVh.js → orgs-CCiKAUHs.js} +1 -1
- package/dist/client/assets/{page-seo-form-BSgPLY12.js → page-seo-form-BdHxsJ3p.js} +1 -1
- package/dist/client/assets/{popover-CoyhS0Zo.js → popover-BOH_aFJY.js} +1 -1
- package/dist/client/assets/{post-calendar-PNNIVNv8.js → post-calendar-HMKXq8oA.js} +1 -1
- package/dist/client/assets/{post-editor-CjfaO9es.js → post-editor-7cdQaaVS.js} +1 -1
- package/dist/client/assets/{primitives-E26NwSAP.js → primitives-CxHVSImV.js} +1 -1
- package/dist/client/assets/{profile-CttakKim.js → profile-D6ZFleYd.js} +1 -1
- package/dist/client/assets/{project-app-view-DWSYlHp-.js → project-app-view-Bn173P1O.js} +1 -1
- package/dist/client/assets/{project-icon-BieGWeu1.js → project-icon-CB1uAMSA.js} +1 -1
- package/dist/client/assets/{prompts-DwrtWCKM.js → prompts-DVOSYHsE.js} +1 -1
- package/dist/client/assets/record-editor-DNaHoNP6.js +1 -0
- package/dist/client/assets/redirect-editor-DEoFWs8b.js +1 -0
- package/dist/client/assets/registry-BDZ1llIl.js +2 -0
- package/dist/client/assets/{registry-layout-YBtFVFQ-.js → registry-layout-BAQxWmbc.js} +1 -1
- package/dist/client/assets/{reports-Hge430tN.js → reports-M4BwGqtT.js} +1 -1
- package/dist/client/assets/{repositories-CRxqhIhP.js → repositories-C_T063XN.js} +1 -1
- package/dist/client/assets/{repository-import-picker-CmVLSKNp.js → repository-import-picker-CjGR_K5h.js} +1 -1
- package/dist/client/assets/{repository-picker-DW1NV7Q9.js → repository-picker-_m9oBn7c.js} +1 -1
- package/dist/client/assets/{require-capability-DJzV6B0p.js → require-capability-BxxlOj94.js} +1 -1
- package/dist/client/assets/{required-auth-layout-y3urEuqz.js → required-auth-layout-CyVuDQYT.js} +1 -1
- package/dist/client/assets/{reset-password-DYJQsvw9.js → reset-password-DkBsWuQv.js} +1 -1
- package/dist/client/assets/{review-settings-FdOPz2_P.js → review-settings-setigNEQ.js} +1 -1
- package/dist/client/assets/{roles-BHMyl4Dd.js → roles-DFecADSy.js} +1 -1
- package/dist/client/assets/{schema-BrEmHGLr.js → schema-DWDPSE-2.js} +1 -1
- package/dist/client/assets/{scroll-area-DNJBSl34.js → scroll-area-BZJillcg.js} +1 -1
- package/dist/client/assets/{search-input-Dc633quU.js → search-input-D1Iyu2yo.js} +1 -1
- package/dist/client/assets/{secrets-TVsrFjAq.js → secrets-CAOsPRvP.js} +1 -1
- package/dist/client/assets/{sections-editor-Cys6s3J9.js → sections-editor-CJjfsV28.js} +1 -1
- package/dist/client/assets/{select-2RQKSODd.js → select-Bsy8eSBX.js} +1 -1
- package/dist/client/assets/{select-model-C-4u09OL.js → select-model-5u3oJAF_.js} +1 -1
- package/dist/client/assets/{self-tool-result-ChgZQIgo.js → self-tool-result-6tlPGqoR.js} +1 -1
- package/dist/client/assets/{seo-editor-DRJs1feG.js → seo-editor-Dio4bt2O.js} +1 -1
- package/dist/client/assets/settings-layout-Bl9P-PdR.js +1 -0
- package/dist/client/assets/{settings-sidebar-DJFDnnMa.js → settings-sidebar-CRSQB9ZK.js} +1 -1
- package/dist/client/assets/{shell-controls-Yk8ROsty.js → shell-controls-CzCZ2tY8.js} +1 -1
- package/dist/client/assets/{shell-layout-Br9ueDvg.js → shell-layout-D8I6l6uI.js} +1 -1
- package/dist/client/assets/{skill-preview-BQYtEl_u.js → skill-preview-BRUZglmF.js} +1 -1
- package/dist/client/assets/{skills-ozMh36Dc.js → skills-B-I968EP.js} +1 -1
- package/dist/client/assets/{sso-BuyrOWI4.js → sso-Bw7Z8lUo.js} +1 -1
- package/dist/client/assets/{store-DuZbfuzh.js → store-CVriNBJK.js} +1 -1
- package/dist/client/assets/store-registry-BikAIvmp.js +2 -0
- package/dist/client/assets/{switch-DeONqowb.js → switch-BNlvzO-e.js} +1 -1
- package/dist/client/assets/{synced-repos-BZ_ybGci.js → synced-repos-BlOsZ_53.js} +1 -1
- package/dist/client/assets/{table-MiatC5_T.js → table-DsvIRFrA.js} +1 -1
- package/dist/client/assets/{tabs-BXJZJKPj.js → tabs-DNhlE1bL.js} +1 -1
- package/dist/client/assets/{task-board-aCYQtoga.js → task-board-CW6cAmRQ.js} +1 -1
- package/dist/client/assets/{task-route-DafPgVKd.js → task-route-BH23dMGV.js} +1 -1
- package/dist/client/assets/{tasks-C3FOJYQo.js → tasks-D4b9nXfl.js} +1 -1
- package/dist/client/assets/{textarea-C5O0_rRN.js → textarea-r3XagL8-.js} +1 -1
- package/dist/client/assets/{thread-intent-BkrM66z0.js → thread-intent-7CsqxP8-.js} +1 -1
- package/dist/client/assets/{thread-route-BuRmXun_.js → thread-route-D9lc5X5V.js} +1 -1
- package/dist/client/assets/{toggle-group-DdBJg2QF.js → toggle-group-BX1lMOjo.js} +1 -1
- package/dist/client/assets/{toolbar-VpBkau6a.js → toolbar-DmNHpECu.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-15hNFUlh.js → toolbar-icon-button-Uv1zXo6T.js} +1 -1
- package/dist/client/assets/{track-ChYYFRhp.js → track-CE6253fG.js} +1 -1
- package/dist/client/assets/{types-DG92OS_h.js → types-4sSCjzTq.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Cic7h6cJ.js → use-ai-providers-Cpuy3TdM.js} +1 -1
- package/dist/client/assets/{use-automations-CdWYZzXj.js → use-automations-D4gmPZIJ.js} +1 -1
- package/dist/client/assets/{use-autosave-DVKTHulk.js → use-autosave-CpAJP728.js} +1 -1
- package/dist/client/assets/{use-connection-BBjM12PF.js → use-connection-CDB9hw5T.js} +1 -1
- package/dist/client/assets/{use-copy-CoXd6ya_.js → use-copy-Ba9R3fog.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CPijCyjn.js → use-create-virtual-mcp-Bcx3PFvV.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DyNUTobD.js → use-date-fns-locale-DG6dMW4j.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D-MMLFoK.js → use-debounced-autosave-UVCFVyzY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BmzqxGnl.js → use-debounced-value-C-4GeZ6O.js} +1 -1
- package/dist/client/assets/{use-decopilot-events--QY-N8k8.js → use-decopilot-events-gGN5aHaN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DfCAtSIb.js → use-delete-connection-P3VWQ0mJ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin--N8AMVb-.js → use-deployment-admin-i4yyU5cE.js} +1 -1
- package/dist/client/assets/{use-destination-route-BSU254-h.js → use-destination-route-B7okMERa.js} +1 -1
- package/dist/client/assets/{use-file-configs-BpTE3t3p.js → use-file-configs-GBQf8kCv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-1Y4RVvWH.js → use-infinite-scroll-BvDBqpDf.js} +1 -1
- package/dist/client/assets/{use-join-requests-DVxxmABR.js → use-join-requests-BGvlF7wG.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-rlWsUVW1.js → use-mcp-auth-status-C2n-2y9O.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CCmZ7t4L.js → use-mcp-client-Co9Owf2L.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B0gI8pc7.js → use-mcp-prompts-Bxuprunc.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DoHYWAVU.js → use-mcp-tools-CrEtvn-r.js} +1 -1
- package/dist/client/assets/{use-members-DREvD3Vo.js → use-members-C-Z2Qzvt.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-cyr-J7xg.js → use-navigate-to-agent-Q2KJVvG6.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DHKkMhcn.js → use-org-auth-client-DpEh871d.js} +1 -1
- package/dist/client/assets/{use-org-notice-DARPUIL7.js → use-org-notice-uXzKk9YU.js} +1 -1
- package/dist/client/assets/{use-org-sso-CxyqMg-T.js → use-org-sso-M9_7HiPm.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DUesIcFs.js → use-organization-roles-BgwN1aW8.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Dldl-Pq-.js → use-organization-settings-BpamzdT-.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-WbWvHgOj.js → use-panel-navigate-B1dRz6j0.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C0tR05he.js → use-registry-connections-CvgleqXK.js} +1 -1
- package/dist/client/assets/{use-secrets-Bh8Nv9LE.js → use-secrets-CAZhxFUo.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-_Pp_UHNG.js → use-section-preview-base-yznpji-i.js} +1 -1
- package/dist/client/assets/{use-status-sounds-TcSZrDUk.js → use-status-sounds-DKcdkQBS.js} +1 -1
- package/dist/client/assets/{use-tags-B2vXu9qC.js → use-tags-Dv39Kt64.js} +1 -1
- package/dist/client/assets/{use-view-mode-DTjDU18-.js → use-view-mode-BE20qroW.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CfTUcpNe.js → use-virtual-mcp-BYJtzivW.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B4KvVpWh.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Bh-SHQi9.js +1 -0
- package/dist/client/assets/{users-ERuG1vFl.js → users-B9PlBS6_.js} +1 -1
- package/dist/client/assets/{variant-calendar-CssmFfYy.js → variant-calendar-Db1dGasX.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CjgyRQxF.js → view-mode-toggle-C2fOEY-a.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/api-keys-R3pcFWNJ.js +0 -1
- package/dist/client/assets/app-editor-CC9im6bm.js +0 -1
- package/dist/client/assets/record-editor-BrgQZ7sJ.js +0 -1
- package/dist/client/assets/redirect-editor-BsDcI5xl.js +0 -1
- package/dist/client/assets/registry-CYKeNq1H.js +0 -2
- package/dist/client/assets/settings-layout-CM7Is76Q.js +0 -1
- package/dist/client/assets/store-registry-bsWVwQNr.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DyKaW5JA.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DTuMq-q_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ee,j as t,a1 as ss,B as Ie,a2 as ns,a4 as is,l as xt,b as Ae,b8 as dt,b6 as js,b1 as Ps,t as Pe,n as bt,r as Z,e as lt,m as ct,K as Ye,bm as vs,bl as ys,bn as Ss,bo as Ns,z as Kt,G as Cs,P as Wt,b5 as Ds}from"./index-CHLYwzdG.js";import{n as _t}from"./LinkExternal01-CYc-bJpZ.js";import{be as ws,bf as ls,aD as $s,aY as Ls,bg as _s,k as kt,C as Jt,av as Yt,aF as ks}from"./agent-icon-DTmpIuMC.js";import{B as Re}from"./badge-C2WoE480.js";import{E as Ze}from"./empty-state-gsNGdr_1.js";import{u as Es}from"./use-virtual-mcp-CfTUcpNe.js";import{r as Rs}from"./site-slug-uya6Wp4-.js";import{i as Fs}from"./AlertCircle-CdtdSQig.js";import{d as gt}from"./UserSquare-B7dos4Q0.js";import{i as As}from"./Zap-iz6Sr9Zm.js";import{c as as,d as os,b as rs,f as cs,g as ms,e as ds,a as fs,A as us}from"./alert-dialog-BsPnDtVm.js";import{d as zs,a as nt,T as Fe,c as Et,e as Rt,b as Ft}from"./table-MiatC5_T.js";import{i as hs}from"./ChevronRight-C30dh3Q9.js";import{a as Vs}from"./Copy01-BeDMVNpZ.js";import{am as Vt,an as Bt,al as Bs}from"./automation-runs-CrifgXMR.js";import{i as At}from"./Globe01-DdZU4lRb.js";import{s as Pt}from"./Plus-xsC4rta_.js";import{s as vt}from"./Trash01-nvYAyX_8.js";import{c as yt,d as St,e as Nt,b as Ct,D as Dt}from"./dialog-2jttB-KX.js";import{I as it}from"./input-Bor7FWk2.js";import{L as Xe}from"./label-B6W74l06.js";import{i as Hs}from"./Settings02-CfZasyPL.js";import{s as Os}from"./Eye-mJ7L05mA.js";import{a as Ht,b as Ot,c as ft,d as qt,S as Mt}from"./select-2RQKSODd.js";import{i as qs}from"./ArrowRight-NtiFMpcp.js";import"./Tool01-CNf-_No9.js";import"./ArrowUp-DGC5Ysun.js";import"./ArrowLeft-dqbBqIhW.js";import"./Tool02-CHwib-_Q.js";import"./TrendUp01-hJGiREai.js";import"./ZoomOut-LBFAX-2d.js";import"./Users03-CW2csHHv.js";import"./CheckCircle-9ZidWDkT.js";import"./Check-BNS9txQN.js";import"./ChevronUp-Bn_2AScF.js";import"./ChevronSelectorVertical-DUpFY0CP.js";import"./DotsVertical-DYacfr5R.js";import"./CreditCard01-Bcjbvush.js";import"./Download01-C8nV35i3.js";import"./Share07-FqMjFNzn.js";import"./GitBranch01-C4bNuLp7.js";import"./XClose-CW7Aosm2.js";import"./HardDrive-CQCLSLgd.js";import"./Image01-whwxbNfN.js";import"./Key01-CHvc20yr.js";import"./Link01-G-sA1km9.js";import"./Monitor01-BwrTu8m8.js";import"./Sun-DG9wzk9T.js";import"./Package-C0Uo1zbM.js";import"./Palette-BTAlw5uu.js";import"./Play-B1ibbngi.js";import"./SearchLg-Dh00DEpq.js";import"./SearchMd-DTNbT_Jp.js";import"./Shield01-DS94z539.js";import"./Stars01-DGM_bOpf.js";import"./Upload01-ChJHhip5.js";import"./User01-j821_8QG.js";import"./Users01-f_U-E4Da.js";import"./XCircle-ByT94gBW.js";import"./use-mcp-client-CCmZ7t4L.js";import"./auth-DH4v3z1c.js";import"./useInfiniteQuery-DyKaW5JA.js";import"./infiniteQueryObserver-BrVIUj-a.js";import"./use-connection-BBjM12PF.js";import"./empty-state-5GFv5LO_.js";import"./use-infinite-scroll-1Y4RVvWH.js";import"./use-members-DREvD3Vo.js";import"./use-org-auth-client-DHKkMhcn.js";import"./use-automations-CdWYZzXj.js";import"./useSuspenseInfiniteQuery-DTuMq-q_.js";import"./avatar-CPNsUn9l.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-CoXd6ya_.js";import"./markdown-D08okHMm.js";import"./use-panel-navigate-WbWvHgOj.js";import"./use-destination-route-BSU254-h.js";import"./hooks-BwLEGt_X.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Cyfcjtz2.js";import"./task-board-aCYQtoga.js";import"./schema-BrEmHGLr.js";import"./chat-context-DWo9Tu9r.js";import"./autosend-D5361h5J.js";import"./thread-intent-BkrM66z0.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-Cic7h6cJ.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events--QY-N8k8.js";import"./thread-route-BuRmXun_.js";import"./use-organization-settings-Dldl-Pq-.js";import"./monaco-editor-Q72XS9Vh.js";import"./editor-eTaXiljY.js";import"./mcp-app-renderer-Dpm55onW.js";import"./types-DG92OS_h.js";import"./shell-layout-Br9ueDvg.js";import"./project-icon-BieGWeu1.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-BPI8gOmi.js";import"./index-B_9W4UXC.js";import"./integration-icon-BxN3_HAp.js";import"./required-auth-layout-y3urEuqz.js";import"./use-org-sso-CxyqMg-T.js";import"./use-org-notice-DARPUIL7.js";import"./use-navigate-to-agent-cyr-J7xg.js";import"./use-mcp-prompts-B0gI8pc7.js";import"./form-_gWD2rxP.js";import"./file-type-icon-VgyPkUqz.js";function Lt(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function mt(r,e){if(Array.isArray(r))return r;if(r&&typeof r=="object"){const o=r[e];if(Array.isArray(o))return o}return[]}function zt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Ms(r){const e=(r??"").toLowerCase();return e.includes("ready")||e.includes("success")||e.includes("active")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("build")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Gt(r){if(!r)return"—";const e=new Date(r).getTime();if(Number.isNaN(e))return"—";const o=Math.round((Date.now()-e)/1e3),a=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),l=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,c]of l)if(Math.abs(o)>=c)return a.format(-Math.round(o/c),i);return a.format(-o,"second")}function Is(r){if(r==null||!Number.isFinite(r))return"—";if(r<1e3)return`${Math.round(r)}ms`;const e=r/1e3;if(e<60)return`${e.toFixed(e>=10?0:1)}s`;const o=Math.round(e);return`${Math.floor(o/60)}m ${o%60}s`}function jt(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function rt(r){return r instanceof Error?r.message:String(r)}function xs(r,e){return r&&typeof r=="object"&&"error"in r?String(r.error):`request failed (${e})`}async function It(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok)throw new Error(xs(o,e.status));return o}async function at(r,e,o){const a=await fetch(r,{method:e,headers:o!==void 0?{"Content-Type":"application/json"}:{},body:o!==void 0?JSON.stringify(o):void 0}),l=await a.json().catch(()=>({}));if(!a.ok)throw new Error(xs(l,a.status));return l}function et(r){const e=ee.c(19);let o,a,l,i,c,m;e[0]!==r?({label:a,tooltipSide:i,variant:c,size:m,children:o,...l}=r,e[0]=r,e[1]=o,e[2]=a,e[3]=l,e[4]=i,e[5]=c,e[6]=m):(o=e[1],a=e[2],l=e[3],i=e[4],c=e[5],m=e[6]);const s=i===void 0?"top":i,n=c===void 0?"ghost":c,h=m===void 0?"icon-sm":m;let g;e[7]!==o||e[8]!==a||e[9]!==l||e[10]!==h||e[11]!==n?(g=t.jsx(ss,{asChild:!0,children:t.jsx(Ie,{"data-slot":"icon-button","aria-label":a,variant:n,size:h,...l,children:o})}),e[7]=o,e[8]=a,e[9]=l,e[10]=h,e[11]=n,e[12]=g):g=e[12];let d;e[13]!==a||e[14]!==s?(d=t.jsx(ns,{side:s,children:a}),e[13]=a,e[14]=s,e[15]=d):d=e[15];let f;return e[16]!==g||e[17]!==d?(f=t.jsxs(is,{children:[g,d]}),e[16]=g,e[17]=d,e[18]=f):f=e[18],f}function ut(r){const e=ee.c(4),{title:o,actions:a,children:l}=r;let i;return e[0]!==a||e[1]!==l||e[2]!==o?(i=t.jsx(Ps,{title:o,actions:a,children:l}),e[0]=a,e[1]=l,e[2]=o,e[3]=i):i=e[3],i}function Qe(r){const e=ee.c(5),{className:o,children:a}=r;let l;e[0]!==o?(l=xt("gap-0 overflow-hidden p-0 divide-y divide-border",o),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==l?(i=t.jsx(js,{className:l,children:a}),e[2]=a,e[3]=l,e[4]=i):i=e[4],i}function pt(r){const e=ee.c(5),{className:o,children:a}=r;let l;e[0]!==o?(l=xt("flex min-h-12 items-center gap-3 px-4 py-2",o),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==l?(i=t.jsx("div",{className:l,children:a}),e[2]=a,e[3]=l,e[4]=i):i=e[4],i}function ot(r){const e=ee.c(2),{children:o}=r;let a;return e[0]!==o?(a=t.jsx("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=a):a=e[1],a}function ht(r){const e=ee.c(2),{rows:o}=r,a=o===void 0?3:o;let l;return e[0]!==a?(l=t.jsx(Qe,{children:Array.from({length:a},Qs)}),e[0]=a,e[1]=l):l=e[1],l}function Qs(r,e){return t.jsxs(pt,{children:[t.jsx(dt,{className:"h-4 w-40"}),t.jsx(dt,{className:"h-4 flex-1"}),t.jsx(dt,{className:"size-7 rounded-lg"})]},e)}function Me(r){const e=ee.c(5),{className:o,children:a}=r;let l;e[0]!==o?(l=xt("text-xs font-medium text-muted-foreground",o),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==l?(i=t.jsx(zs,{className:l,children:a}),e[2]=a,e[3]=l,e[4]=i):i=e[4],i}function Qt(r){const e=ee.c(12),{open:o,onClick:a}=r,l=Ae();let i;e[0]!==o||e[1]!==l?(i=l(o?"mainPanelTabs.hostingTab.hideDetails":"mainPanelTabs.hostingTab.showDetails"),e[0]=o,e[1]=l,e[2]=i):i=e[2];const c=o&&"rotate-90";let m;e[3]!==c?(m=xt("transition-transform duration-200 motion-reduce:transition-none",c),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==m?(s=t.jsx(hs,{className:m}),e[5]=m,e[6]=s):s=e[6];let n;return e[7]!==a||e[8]!==o||e[9]!==i||e[10]!==s?(n=t.jsx(et,{label:i,size:"icon-sm",className:"-ml-1.5 text-muted-foreground","aria-expanded":o,onClick:a,children:s}),e[7]=a,e[8]=o,e[9]=i,e[10]=s,e[11]=n):n=e[11],n}function Us(r){const e=ee.c(8),{open:o,colSpan:a,children:l}=r;let i;e[0]!==l?(i=t.jsx(Vt,{children:t.jsx("div",{className:"border-b border-border bg-muted/30 px-4 py-3",children:l})}),e[0]=l,e[1]=i):i=e[1];let c;e[2]!==o||e[3]!==i?(c=t.jsx(Bt,{open:o,children:i}),e[2]=o,e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=t.jsx(nt,{className:"border-0 hover:bg-transparent",children:t.jsx(Fe,{colSpan:a,className:"p-0 whitespace-normal",children:c})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function gs(r){const e=ee.c(5),{open:o,children:a}=r;let l;e[0]!==a?(l=t.jsx(Vt,{children:t.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:a})}),e[0]=a,e[1]=l):l=e[1];let i;return e[2]!==o||e[3]!==l?(i=t.jsx(Bt,{open:o,children:l}),e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function bs(r){const e=ee.c(6),{scope:o}=r,a=Ae(),l=o==="build"?"outline":"secondary";let i;e[0]!==o||e[1]!==a?(i=a(o==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime"),e[0]=o,e[1]=a,e[2]=i):i=e[2];let c;return e[3]!==l||e[4]!==i?(c=t.jsx(Re,{variant:l,children:i}),e[3]=l,e[4]=i,e[5]=c):c=e[5],c}function Ks(r){const e=ee.c(9),{value:o}=r,a=Ae();let l;e[0]!==a?(l=a("mainPanelTabs.hostingTab.dnsCopy"),e[0]=a,e[1]=l):l=e[1];let i;e[2]!==a||e[3]!==o?(i=()=>{navigator.clipboard?.writeText(o),Pe.success(a("mainPanelTabs.hostingTab.dnsCopied"))},e[2]=a,e[3]=o,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Vs,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==i?(m=t.jsx(et,{label:l,onClick:i,children:c}),e[6]=l,e[7]=i,e[8]=m):m=e[8],m}function wt(r){const e=ee.c(28),{open:o,onOpenChange:a,title:l,description:i,confirmLabel:c,pending:m,onConfirm:s}=r,n=Ae();let h;e[0]!==l?(h=t.jsx(as,{children:l}),e[0]=l,e[1]=h):h=e[1];let g;e[2]!==i?(g=t.jsx(os,{children:i}),e[2]=i,e[3]=g):g=e[3];let d;e[4]!==h||e[5]!==g?(d=t.jsxs(rs,{children:[h,g]}),e[4]=h,e[5]=g,e[6]=d):d=e[6];let f;e[7]!==n?(f=n("mainPanelTabs.hostingTab.cancel"),e[7]=n,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=t.jsx(cs,{disabled:m,children:f}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]!==s?(b=S=>{S.preventDefault(),s()},e[12]=s,e[13]=b):b=e[13];let x;e[14]!==c||e[15]!==m||e[16]!==b?(x=t.jsx(ms,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:b,disabled:m,children:c}),e[14]=c,e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==u||e[19]!==x?(N=t.jsxs(ds,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=N):N=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsxs(fs,{children:[d,N]}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let P;return e[24]!==a||e[25]!==o||e[26]!==C?(P=t.jsx(us,{open:o,onOpenChange:a,children:C}),e[24]=a,e[25]=o,e[26]=C,e[27]=P):P=e[27],P}const Ws=8;function Js(r){const e=ee.c(54),{base:o,orgSlug:a,site:l}=r,i=Ae(),c=bt(),[m,s]=Z.useState(!1);let n;e[0]!==o?(n=()=>at(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let h;e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==i?(h=()=>{c.invalidateQueries({queryKey:Ye.hostingDeployments(a,l)}),c.invalidateQueries({queryKey:Ye.hostingDeploymentHistory(a,l)}),Pe.success(i("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=a,e[3]=c,e[4]=l,e[5]=i,e[6]=h):h=e[6];let g;e[7]!==n||e[8]!==h?(g={mutationFn:n,onSuccess:h,onError:Ys},e[7]=n,e[8]=h,e[9]=g):g=e[9];const d=lt(g);let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>s(!0),e[10]=f):f=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(gt,{}),e[11]=u):u=e[11];let b;e[12]!==d.isPending||e[13]!==i?(b=d.isPending?i("mainPanelTabs.hostingTab.deploying"):i("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=i,e[14]=b):b=e[14];let x;e[15]!==d.isPending||e[16]!==b?(x=t.jsxs(Ie,{size:"sm",onClick:f,disabled:d.isPending,children:[u,b]}),e[15]=d.isPending,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i?(N=i("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=i,e[19]=N):N=e[19];let C;e[20]!==N?(C=t.jsx(as,{children:N}),e[20]=N,e[21]=C):C=e[21];let P;e[22]!==i?(P=i("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(os,{children:P}),e[24]=P,e[25]=S):S=e[25];let y;e[26]!==S||e[27]!==C?(y=t.jsxs(rs,{children:[C,S]}),e[26]=S,e[27]=C,e[28]=y):y=e[28];const R=d.isPending;let w;e[29]!==i?(w=i("mainPanelTabs.hostingTab.cancel"),e[29]=i,e[30]=w):w=e[30];let j;e[31]!==d.isPending||e[32]!==w?(j=t.jsx(cs,{disabled:R,children:w}),e[31]=d.isPending,e[32]=w,e[33]=j):j=e[33];let T;e[34]!==d?(T=_=>{_.preventDefault(),d.mutate()},e[34]=d,e[35]=T):T=e[35];const V=d.isPending;let q;e[36]!==i?(q=i("mainPanelTabs.hostingTab.deploy"),e[36]=i,e[37]=q):q=e[37];let F;e[38]!==d.isPending||e[39]!==T||e[40]!==q?(F=t.jsx(ms,{onClick:T,disabled:V,children:q}),e[38]=d.isPending,e[39]=T,e[40]=q,e[41]=F):F=e[41];let v;e[42]!==j||e[43]!==F?(v=t.jsxs(ds,{children:[j,F]}),e[42]=j,e[43]=F,e[44]=v):v=e[44];let B;e[45]!==y||e[46]!==v?(B=t.jsxs(fs,{children:[y,v]}),e[45]=y,e[46]=v,e[47]=B):B=e[47];let A;e[48]!==m||e[49]!==B?(A=t.jsx(us,{open:m,onOpenChange:s,children:B}),e[48]=m,e[49]=B,e[50]=A):A=e[50];let Q;return e[51]!==A||e[52]!==x?(Q=t.jsxs(t.Fragment,{children:[x,A]}),e[51]=A,e[52]=x,e[53]=Q):Q=e[53],Q}function Ys(r){return Pe.error(rt(r))}function Gs(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(Re,{variant:"warning",children:[t.jsx(Ls,{}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(Re,{variant:"secondary",children:[t.jsx(_s,{}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function Xs(r,e,o){const a=(r??"").toLowerCase();return a==="build"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(ls,{}),o("mainPanelTabs.hostingTab.typeBuild")]}):a==="fast-deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(As,{}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):a==="deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Gs(e,o)}function Zs(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(Re,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(Re,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(Re,{variant:"secondary",children:[t.jsx($s,{}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Xt(r){const e=ee.c(7),{commit:o,onClick:a}=r,l=Ae();let i;e[0]!==l?(i=l("mainPanelTabs.hostingTab.buildLogs"),e[0]=l,e[1]=i):i=e[1];const c=!o;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ls,{}),e[2]=m):m=e[2];let s;return e[3]!==a||e[4]!==i||e[5]!==c?(s=t.jsx(et,{label:i,onClick:a,disabled:c,children:m}),e[3]=a,e[4]=i,e[5]=c,e[6]=s):s=e[6],s}function en(r){const e=ee.c(37),{base:o,orgSlug:a,site:l,target:i,onOpenChange:c}=r,m=Ae(),s=i!=null,n=i?.commit??"",h=i?.env??"";let g;e[0]!==n||e[1]!==h||e[2]!==a||e[3]!==l?(g=Ye.hostingBuildLogs(a,l,n,h),e[0]=n,e[1]=h,e[2]=a,e[3]=l,e[4]=g):g=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==h?(d=()=>It(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(h)}`),e[5]=o,e[6]=n,e[7]=h,e[8]=d):d=e[8];const f=s&&!!n;let u;e[9]!==g||e[10]!==d||e[11]!==f?(u={queryKey:g,queryFn:d,enabled:f,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=g,e[10]=d,e[11]=f,e[12]=u):u=e[12];const b=ct(u),x=b.data;let N;e[13]!==m?(N=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=N):N=e[14];let C;e[15]!==N?(C=t.jsx(vs,{children:N}),e[15]=N,e[16]=C):C=e[16];let P;e[17]!==n||e[18]!==m?(P=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=P):P=e[19];let S;e[20]!==P?(S=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:P}),e[20]=P,e[21]=S):S=e[21];let y;e[22]!==C||e[23]!==S?(y=t.jsxs(ys,{className:"shrink-0 border-b border-border px-5 py-5 md:px-6",children:[C,S]}),e[22]=C,e[23]=S,e[24]=y):y=e[24];let R;e[25]!==x||e[26]!==b.error||e[27]!==b.isLoading||e[28]!==m?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 md:px-6",children:jt(b.error)?t.jsx(Ze,{icon:t.jsx(kt,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):b.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-2/3"})]}):b.error?t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):x&&x.configured===!1?t.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-muted/30 px-4 py-8 text-center",children:[t.jsx(Fs,{className:"size-5 text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:m("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:x.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):x?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"overflow-auto font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:x.text}),x.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),x.url&&t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(_t,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):x?.url?t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(_t,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")})}),e[25]=x,e[26]=b.error,e[27]=b.isLoading,e[28]=m,e[29]=R):R=e[29];let w;e[30]!==R||e[31]!==y?(w=t.jsxs(Ss,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:[y,R]}),e[30]=R,e[31]=y,e[32]=w):w=e[32];let j;return e[33]!==c||e[34]!==s||e[35]!==w?(j=t.jsx(Ns,{open:s,onOpenChange:c,children:w}),e[33]=c,e[34]=s,e[35]=w,e[36]=j):j=e[36],j}function tn(r){const e=ee.c(52),{base:o,orgSlug:a,site:l,enabled:i,deployments:c,isLoading:m,error:s}=r,n=Ae(),[h,g]=Z.useState(null),[d,f]=Z.useState(Ws),[u,b]=Z.useState(null);let x;e[0]!==a||e[1]!==l?(x=Ye.hostingDeploymentHistory(a,l),e[0]=a,e[1]=l,e[2]=x):x=e[2];let N;e[3]!==o?(N=()=>It(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=N):N=e[4];let C;e[5]!==i||e[6]!==x||e[7]!==N?(C={queryKey:x,queryFn:N,enabled:i,retry:!1,staleTime:3e4},e[5]=i,e[6]=x,e[7]=N,e[8]=C):C=e[8];const P=ct(C);let S,y,R,w;if(e[9]!==c||e[10]!==s||e[11]!==h||e[12]!==d||e[13]!==P.data||e[14]!==P.error||e[15]!==P.isLoading||e[16]!==m||e[17]!==n){const F=mt(P.data,"items"),v=F.slice(0,d),B=F.length-v.length;let A;e[22]!==c?(A=c.find(ln)?.commitSha??c.find(nn)?.commitSha??null,e[22]=c,e[23]=A):A=e[23];const Q=A;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=(p,I)=>{p&&b({commit:p,env:I??"production"})},e[24]=_):_=e[24];const W=_;let J;e[25]!==n?(J=n("mainPanelTabs.hostingTab.deployments"),e[25]=n,e[26]=J):J=e[26];let U;e[27]!==c||e[28]!==s||e[29]!==h||e[30]!==m||e[31]!==n?(U=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deploymentsError")})}):c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployments"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsx(Ft,{children:c.map(p=>{const I=!!p.buildMessage,Y=h===p.id;return t.jsxs(Z.Fragment,{children:[t.jsxs(nt,{className:xt(I&&"cursor-pointer hover:bg-muted/40"),onClick:I?()=>g(Y?null:p.id):void 0,children:[t.jsx(Fe,{className:"px-4",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[I?t.jsx(Qt,{open:Y,onClick:()=>g(Y?null:p.id)}):t.jsx(ws,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:p.shortCommit??p.commitSha?.slice(0,7)??"—"}),p.production===!0&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Re,{variant:Ms(p.phase),children:p.phase??"—"}),p.up===!0&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Is(p.durationMs)}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Gt(p.finishedAt??p.startedAt??p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",onClick:sn,children:t.jsx(Xt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]}),I&&t.jsx(Us,{open:Y,colSpan:6,children:t.jsx("p",{className:"whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:p.buildMessage})})]},p.id)})})]}),e[27]=c,e[28]=s,e[29]=h,e[30]=m,e[31]=n,e[32]=U):U=e[32],e[33]!==U||e[34]!==J?(w=t.jsx(ut,{title:J,children:U}),e[33]=U,e[34]=J,e[35]=w):w=e[35],S=ut,e[36]!==n?(y=n("mainPanelTabs.hostingTab.deployHistory"),e[36]=n,e[37]=y):y=e[37],R=P.isLoading?t.jsx(ht,{}):P.error?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deployHistoryError")})}):F.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsxs(Ft,{children:[v.map(p=>{const I=!!Q&&p.commitSha===Q;return t.jsxs(nt,{children:[t.jsx(Fe,{className:"pl-4",children:Xs(p.type,p.action,n)}),t.jsx(Fe,{children:Zs(p.outcome,n)}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:p.commitSha?.slice(0,7)??"—"}),I&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:p.actor??"—"}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Gt(p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",children:t.jsx(Xt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]},p.id)}),B>0&&t.jsx(nt,{className:"hover:bg-transparent",children:t.jsx(Fe,{colSpan:7,className:"p-2 text-center",children:t.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>f(F.length),children:n("mainPanelTabs.hostingTab.showMoreHistory",{count:String(B)})})})})]})]}),e[9]=c,e[10]=s,e[11]=h,e[12]=d,e[13]=P.data,e[14]=P.error,e[15]=P.isLoading,e[16]=m,e[17]=n,e[18]=S,e[19]=y,e[20]=R,e[21]=w}else S=e[18],y=e[19],R=e[20],w=e[21];let j;e[38]!==S||e[39]!==y||e[40]!==R?(j=t.jsx(S,{title:y,children:R}),e[38]=S,e[39]=y,e[40]=R,e[41]=j):j=e[41];let T;e[42]===Symbol.for("react.memo_cache_sentinel")?(T=F=>{F||b(null)},e[42]=T):T=e[42];let V;e[43]!==o||e[44]!==u||e[45]!==a||e[46]!==l?(V=t.jsx(en,{base:o,orgSlug:a,site:l,target:u,onOpenChange:T}),e[43]=o,e[44]=u,e[45]=a,e[46]=l,e[47]=V):V=e[47];let q;return e[48]!==w||e[49]!==j||e[50]!==V?(q=t.jsxs(t.Fragment,{children:[w,j,V]}),e[48]=w,e[49]=j,e[50]=V,e[51]=q):q=e[51],q}function sn(r){return r.stopPropagation()}function nn(r){return r.production===!0&&r.up}function ln(r){return r.up===!0}const an=["16.148.147.194","52.32.122.94","52.35.156.199"];function on(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function Zt(r){const e=r.trim();return e.length>0&&!e.startsWith("/")&&e.includes(".")}function ps(r){const e=ee.c(24),{records:o}=r,a=Ae();let l;e[0]!==a?(l=a("mainPanelTabs.hostingTab.dnsColType"),e[0]=a,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx(Me,{className:"w-16",children:l}),e[2]=l,e[3]=i):i=e[3];let c;e[4]!==a?(c=a("mainPanelTabs.hostingTab.dnsColName"),e[4]=a,e[5]=c):c=e[5];let m;e[6]!==c?(m=t.jsx(Me,{children:c}),e[6]=c,e[7]=m):m=e[7];let s;e[8]!==a?(s=a("mainPanelTabs.hostingTab.dnsColValue"),e[8]=a,e[9]=s):s=e[9];let n;e[10]!==s?(n=t.jsx(Me,{children:s}),e[10]=s,e[11]=n):n=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Me,{className:"w-10"}),e[12]=h):h=e[12];let g;e[13]!==i||e[14]!==m||e[15]!==n?(g=t.jsx(Rt,{children:t.jsxs(nt,{children:[i,m,n,h]})}),e[13]=i,e[14]=m,e[15]=n,e[16]=g):g=e[16];let d;e[17]!==o?(d=o.map(rn),e[17]=o,e[18]=d):d=e[18];let f;e[19]!==d?(f=t.jsx(Ft,{children:d}),e[19]=d,e[20]=f):f=e[20];let u;return e[21]!==f||e[22]!==g?(u=t.jsxs(Et,{className:"table-fixed",children:[g,f]}),e[21]=f,e[22]=g,e[23]=u):u=e[23],u}function rn(r){return t.jsxs(nt,{children:[t.jsx(Fe,{className:"font-mono text-xs",children:r.type}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs",children:r.name}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs text-muted-foreground",children:r.value}),t.jsx(Fe,{className:"text-right",children:t.jsx(Ks,{value:r.value})})]},`${r.type}-${r.name}-${r.value}`)}function Ts(r){const e=ee.c(14),{status:o,children:a}=r,l=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let c;e[1]!==l?(c=l("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=l,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==o||e[6]!==l?(s=o&&t.jsx(Re,{variant:o.active?"success":"outline",className:"ml-auto",children:o.active?l("mainPanelTabs.hostingTab.dnsActive"):l("mainPanelTabs.hostingTab.dnsAwaiting")}),e[5]=o,e[6]=l,e[7]=s):s=e[7];let n;e[8]!==m||e[9]!==s?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[i,m,s]}),e[8]=m,e[9]=s,e[10]=n):n=e[10];let h;return e[11]!==a||e[12]!==n?(h=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n,a]}),e[11]=a,e[12]=n,e[13]=h):h=e[13],h}function es(r){const e=ee.c(21),{from:o,source:a}=r,l=Ae();let i,c,m,s,n;if(e[0]!==o||e[1]!==a||e[2]!==l){const d=o.trim().replace(/\.$/,""),f=d?on(d)?"@":d:"@",u=a==="both";c=Ts,e[8]!==u?(s={active:u},e[8]=u,e[9]=s):s=e[9];let b;e[10]!==u||e[11]!==l?(b=l(u?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[10]=u,e[11]=l,e[12]=b):b=e[12],n=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[l("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:d||"—"})," ",b]}),i=ps,m=an.map(x=>({type:"A",name:f,value:x})),e[0]=o,e[1]=a,e[2]=l,e[3]=i,e[4]=c,e[5]=m,e[6]=s,e[7]=n}else i=e[3],c=e[4],m=e[5],s=e[6],n=e[7];let h;e[13]!==i||e[14]!==m?(h=t.jsx(i,{records:m}),e[13]=i,e[14]=m,e[15]=h):h=e[15];let g;return e[16]!==c||e[17]!==s||e[18]!==n||e[19]!==h?(g=t.jsxs(c,{status:s,children:[n,h]}),e[16]=c,e[17]=s,e[18]=n,e[19]=h,e[20]=g):g=e[20],g}function ts(r){const e=ee.c(2),{records:o}=r;if(o.length===0)return null;let a;return e[0]!==o?(a=t.jsx(Ts,{children:t.jsx(ps,{records:o})}),e[0]=o,e[1]=a):a=e[1],a}function cn(r){const e=ee.c(16),{domain:o}=r,a=Ae(),l=o.status??"pending";let i;e[0]!==l||e[1]!==a?(i=a(l==="active"?"mainPanelTabs.hostingTab.statusActive":l==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=l,e[1]=a,e[2]=i):i=e[2];const c=i;let m;e[3]!==o.detail||e[4]!==a?(m=o.detail==="zone-not-onboarded"?a("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=a,e[5]=m):m=e[5];const s=m,n=l==="active"?"success":l==="action-required"?"warning":"outline";let h;e[6]!==c||e[7]!==n?(h=t.jsx(Re,{variant:n,children:c}),e[6]=c,e[7]=n,e[8]=h):h=e[8];const g=h;if(!s)return g;let d;e[9]!==g?(d=t.jsx(ss,{asChild:!0,children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==s?(f=t.jsx(ns,{className:"max-w-xs",children:s}),e[11]=s,e[12]=f):f=e[12];let u;return e[13]!==d||e[14]!==f?(u=t.jsxs(is,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=u):u=e[15],u}function mn(r){const e=ee.c(121),{base:o,orgSlug:a,site:l,domains:i,dnsTemplate:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(null),[N,C]=Z.useState(null);let P;e[0]!==a||e[1]!==h||e[2]!==l?(P=()=>h.invalidateQueries({queryKey:Ye.hostingDomains(a,l)}),e[0]=a,e[1]=h,e[2]=l,e[3]=P):P=e[3];const S=P;let y;e[4]!==o?(y=$=>at(`${o}/domains`,"PUT",$),e[4]=o,e[5]=y):y=e[5];let R;e[6]!==S||e[7]!==n?(R=()=>{S(),Pe.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=S,e[7]=n,e[8]=R):R=e[8];let w;e[9]!==y||e[10]!==R?(w={mutationFn:y,onSuccess:R,onError:fn},e[9]=y,e[10]=R,e[11]=w):w=e[11];const j=lt(w);let T;e[12]!==o?(T=$=>at(`${o}/domains/${encodeURIComponent($)}`,"DELETE"),e[12]=o,e[13]=T):T=e[13];let V;e[14]!==S||e[15]!==n?(V=()=>{S(),Pe.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),x(null)},e[14]=S,e[15]=n,e[16]=V):V=e[16];let q;e[17]!==T||e[18]!==V?(q={mutationFn:T,onSuccess:V,onError:dn},e[17]=T,e[18]=V,e[19]=q):q=e[19];const F=lt(q);let v;e[20]!==f||e[21]!==j||e[22]!==n?(v=()=>{const $=f.trim().toLowerCase();if(!$){Pe.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}j.mutate({host:$})},e[20]=f,e[21]=j,e[22]=n,e[23]=v):v=e[23];const B=v;let A;if(e[24]!==c||e[25]!==f){let $;e[27]!==f?($=ge=>({...ge,name:f.trim().toLowerCase()||ge.name}),e[27]=f,e[28]=$):$=e[28],A=c.map($),e[24]=c,e[25]=f,e[26]=A}else A=e[26];const Q=A;let _,W;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(""),d(!0)},W=t.jsx(Pt,{}),e[29]=_,e[30]=W):(_=e[29],W=e[30]);let J;e[31]!==n?(J=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=J):J=e[32];let U;e[33]!==J?(U=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[W,J]}),e[33]=J,e[34]=U):U=e[34];const p=U;let I;e[35]!==n?(I=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=I):I=e[36];const Y=i.length>0?p:void 0;let D;e[37]!==p||e[38]!==F.isPending||e[39]!==N||e[40]!==i||e[41]!==s||e[42]!==m||e[43]!==n?(D=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.domainsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(At,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains"),className:"py-10",buttonComponent:p})}):t.jsx(Qe,{children:i.map(($,ge)=>{const Se=!$.canonical&&($.dns?.length??0)>0,Te=N===$.host;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Se?t.jsx(Qt,{open:Te,onClick:()=>C(Te?null:$.host)}):t.jsx(At,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:$.host}),$.canonical&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(cn,{domain:$}),!$.canonical&&t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>x($.host),disabled:F.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]}),Se&&t.jsx(gs,{open:Te,children:t.jsx(ts,{records:$.dns??[]})})]},`${$.host}-${ge}`)})}),e[37]=p,e[38]=F.isPending,e[39]=N,e[40]=i,e[41]=s,e[42]=m,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==n?(G=n("mainPanelTabs.hostingTab.addDomainTitle"),e[45]=n,e[46]=G):G=e[46];let O;e[47]!==G?(O=t.jsx(yt,{children:t.jsx(St,{children:G})}),e[47]=G,e[48]=O):O=e[48];let k;e[49]!==B?(k=$=>{$.preventDefault(),B()},e[49]=B,e[50]=k):k=e[50];let E;e[51]!==n?(E=n("mainPanelTabs.hostingTab.colHost"),e[51]=n,e[52]=E):E=e[52];let H;e[53]!==E?(H=t.jsx(Xe,{htmlFor:"domain-host",children:E}),e[53]=E,e[54]=H):H=e[54];let X;e[55]!==n?(X=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[55]=n,e[56]=X):X=e[56];let te;e[57]===Symbol.for("react.memo_cache_sentinel")?(te=$=>u($.target.value),e[57]=te):te=e[57];let K;e[58]!==f||e[59]!==j.isPending||e[60]!==X?(K=t.jsx(it,{id:"domain-host",placeholder:X,value:f,onChange:te,className:"font-mono text-xs",autoComplete:"off",disabled:j.isPending}),e[58]=f,e[59]=j.isPending,e[60]=X,e[61]=K):K=e[61];let se;e[62]!==H||e[63]!==K?(se=t.jsxs("div",{className:"flex flex-col gap-2",children:[H,K]}),e[62]=H,e[63]=K,e[64]=se):se=e[64];let ne;e[65]!==f||e[66]!==Q?(ne=f.trim()&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ts,{records:Q})}),e[65]=f,e[66]=Q,e[67]=ne):ne=e[67];let je;e[68]===Symbol.for("react.memo_cache_sentinel")?(je=()=>d(!1),e[68]=je):je=e[68];const Ce=j.isPending;let re;e[69]!==n?(re=n("mainPanelTabs.hostingTab.cancel"),e[69]=n,e[70]=re):re=e[70];let be;e[71]!==j.isPending||e[72]!==re?(be=t.jsx(Ie,{variant:"outline",type:"button",onClick:je,disabled:Ce,children:re}),e[71]=j.isPending,e[72]=re,e[73]=be):be=e[73];let ie;e[74]!==f||e[75]!==j.isPending?(ie=j.isPending||!f.trim(),e[74]=f,e[75]=j.isPending,e[76]=ie):ie=e[76];let le;e[77]!==j.isPending||e[78]!==n?(le=j.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[77]=j.isPending,e[78]=n,e[79]=le):le=e[79];let ce;e[80]!==ie||e[81]!==le?(ce=t.jsx(Ie,{type:"submit",disabled:ie,children:le}),e[80]=ie,e[81]=le,e[82]=ce):ce=e[82];let De;e[83]!==be||e[84]!==ce?(De=t.jsxs(Nt,{children:[be,ce]}),e[83]=be,e[84]=ce,e[85]=De):De=e[85];let me;e[86]!==k||e[87]!==se||e[88]!==ne||e[89]!==De?(me=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[se,ne,De]}),e[86]=k,e[87]=se,e[88]=ne,e[89]=De,e[90]=me):me=e[90];let de;e[91]!==O||e[92]!==me?(de=t.jsxs(Ct,{className:"sm:max-w-md",children:[O,me]}),e[91]=O,e[92]=me,e[93]=de):de=e[93];let ae;e[94]!==g||e[95]!==de?(ae=t.jsx(Dt,{open:g,onOpenChange:d,children:de}),e[94]=g,e[95]=de,e[96]=ae):ae=e[96];const pe=b!=null;let fe;e[97]===Symbol.for("react.memo_cache_sentinel")?(fe=$=>{$||x(null)},e[97]=fe):fe=e[97];let ue;e[98]!==n?(ue=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[98]=n,e[99]=ue):ue=e[99];const ve=b??"";let ye;e[100]!==n||e[101]!==ve?(ye=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:ve}),e[100]=n,e[101]=ve,e[102]=ye):ye=e[102];let he;e[103]!==n?(he=n("mainPanelTabs.hostingTab.deleteDomain"),e[103]=n,e[104]=he):he=e[104];let oe;e[105]!==F||e[106]!==b?(oe=()=>{b&&F.mutate(b)},e[105]=F,e[106]=b,e[107]=oe):oe=e[107];let xe;e[108]!==F.isPending||e[109]!==pe||e[110]!==ue||e[111]!==ye||e[112]!==he||e[113]!==oe?(xe=t.jsx(wt,{open:pe,onOpenChange:fe,title:ue,description:ye,confirmLabel:he,pending:F.isPending,onConfirm:oe}),e[108]=F.isPending,e[109]=pe,e[110]=ue,e[111]=ye,e[112]=he,e[113]=oe,e[114]=xe):xe=e[114];let we;return e[115]!==I||e[116]!==Y||e[117]!==D||e[118]!==ae||e[119]!==xe?(we=t.jsxs(ut,{title:I,actions:Y,children:[D,ae,xe]}),e[115]=I,e[116]=Y,e[117]=D,e[118]=ae,e[119]=xe,e[120]=we):we=e[120],we}function dn(r){return Pe.error(rt(r))}function fn(r){return Pe.error(rt(r))}function un(r){const e=ee.c(24),{value:o,onChange:a,disabled:l,className:i}=r,c=Ae();let m;e[0]!==a?(m=N=>a(N==="build"?"build":"runtime"),e[0]=a,e[1]=m):m=e[1];let s;e[2]!==i?(s=xt("h-8",i),e[2]=i,e[3]=s):s=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ht,{}),e[4]=n):n=e[4];let h;e[5]!==s?(h=t.jsx(Ot,{className:s,children:n}),e[5]=s,e[6]=h):h=e[6];let g;e[7]!==c?(g=c("mainPanelTabs.hostingTab.secretScopeRuntime"),e[7]=c,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ft,{value:"runtime",children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==c?(f=c("mainPanelTabs.hostingTab.secretScopeBuild"),e[11]=c,e[12]=f):f=e[12];let u;e[13]!==f?(u=t.jsx(ft,{value:"build",children:f}),e[13]=f,e[14]=u):u=e[14];let b;e[15]!==d||e[16]!==u?(b=t.jsxs(qt,{children:[d,u]}),e[15]=d,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==l||e[19]!==m||e[20]!==h||e[21]!==b||e[22]!==o?(x=t.jsxs(Mt,{value:o,onValueChange:m,disabled:l,children:[h,b]}),e[18]=l,e[19]=m,e[20]=h,e[21]=b,e[22]=o,e[23]=x):x=e[23],x}function hn(r){const e=ee.c(151),{base:o,orgSlug:a,site:l,envVars:i,codeVars:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(""),[N,C]=Z.useState("runtime"),[P,S]=Z.useState(null),[y,R]=Z.useState(""),[w,j]=Z.useState(null);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[V,q]=Z.useState(T);let F;e[1]===Symbol.for("react.memo_cache_sentinel")?(F=L=>{q(Ne=>{const We=new Set(Ne);return We.has(L)?We.delete(L):We.add(L),We})},e[1]=F):F=e[1];const v=F;let B;e[2]!==o?(B=L=>at(`${o}/env`,"PUT",{vars:L}),e[2]=o,e[3]=B):B=e[3];let A;e[4]!==a||e[5]!==h||e[6]!==l||e[7]!==n?(A=()=>{h.invalidateQueries({queryKey:Ye.hostingEnv(a,l)}),Pe.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[4]=a,e[5]=h,e[6]=l,e[7]=n,e[8]=A):A=e[8];let Q;e[9]!==B||e[10]!==A?(Q={mutationFn:B,onSuccess:A,onError:gn},e[9]=B,e[10]=A,e[11]=Q):Q=e[11];const _=lt(Q);let W;e[12]!==f||e[13]!==N||e[14]!==b||e[15]!==_||e[16]!==i||e[17]!==n?(W=()=>{const L=f.trim();if(!L){Pe.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(i.some(Ne=>Lt(Ne,{name:L,scope:N}))){Pe.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}_.mutate([...i,{name:L,value:b,scope:N}],{onSuccess:()=>{d(!1),u(""),x(""),C("runtime")}})},e[12]=f,e[13]=N,e[14]=b,e[15]=_,e[16]=i,e[17]=n,e[18]=W):W=e[18];const J=W;let U;e[19]!==y||e[20]!==_||e[21]!==i?(U=L=>{_.mutate(i.map(Ne=>Lt(Ne,L)?{name:L.name,value:y,scope:L.scope}:Ne),{onSuccess:()=>S(null)})},e[19]=y,e[20]=_,e[21]=i,e[22]=U):U=e[22];const p=U;let I;e[23]!==w||e[24]!==_||e[25]!==i?(I=()=>{w&&_.mutate(i.filter(L=>!Lt(L,w)),{onSuccess:()=>j(null)})},e[23]=w,e[24]=_,e[25]=i,e[26]=I):I=e[26];const Y=I,D=_.isPending;let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{u(""),x(""),C("runtime")},e[27]=G):G=e[27];const O=G;let k,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=()=>d(!0),E=t.jsx(Pt,{}),e[28]=k,e[29]=E):(k=e[28],E=e[29]);let H;e[30]!==n?(H=n("mainPanelTabs.hostingTab.addVariable"),e[30]=n,e[31]=H):H=e[31];let X;e[32]!==H?(X=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:k,children:[E,H]}),e[32]=H,e[33]=X):X=e[33];const te=X;let K;e[34]!==n?(K=n("mainPanelTabs.hostingTab.env"),e[34]=n,e[35]=K):K=e[35];const se=i.length>0||c.length>0?te:void 0;let ne;e[36]!==te||e[37]!==c||e[38]!==y||e[39]!==P?.name||e[40]!==P?.scope||e[41]!==i||e[42]!==s||e[43]!==p||e[44]!==m||e[45]!==D||e[46]!==V||e[47]!==n?(ne=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.envError")})}):i.length===0&&c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Jt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noEnv"),className:"py-10",buttonComponent:te})}):t.jsxs(Qe,{children:[i.map(L=>{const Ne=L.scope==="build"?"build":"runtime",We=`${L.name}:${Ne}`,tt=P?.name===L.name&&P?.scope===Ne,st=V.has(We);return t.jsxs(pt,{children:[t.jsxs("div",{className:"flex min-w-0 flex-1 basis-0 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(bs,{scope:Ne})}),t.jsx("span",{className:"truncate font-mono text-xs",children:L.name})]}),t.jsx("div",{className:"flex min-w-0 flex-1 basis-0 items-center justify-end gap-2",children:tt?t.jsxs(t.Fragment,{children:[t.jsx(it,{value:y,onChange:z=>R(z.target.value),onKeyDown:z=>{z.key==="Enter"&&p({name:L.name,scope:Ne}),z.key==="Escape"&&S(null)},autoFocus:!0,className:"h-8 font-mono text-xs"}),t.jsx(Ie,{size:"sm",onClick:()=>p({name:L.name,scope:Ne}),disabled:D,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(Ie,{size:"sm",variant:"ghost",onClick:()=>S(null),disabled:D,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsxs(t.Fragment,{children:[t.jsx(et,{label:n(st?"mainPanelTabs.hostingTab.hideValue":"mainPanelTabs.hostingTab.showValue"),onClick:()=>v(We),className:"text-muted-foreground",children:st?t.jsx(Hs,{}):t.jsx(Os,{})}),st?t.jsx("button",{type:"button",onClick:()=>{S({name:L.name,scope:Ne}),R(L.value)},title:n("mainPanelTabs.hostingTab.editValue"),className:"min-w-0 truncate rounded px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:L.value||"—"}):t.jsx("span",{className:"min-w-0 truncate px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground/60",children:L.value?"••••••••••":"—"})]})}),t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>j({name:L.name,scope:Ne}),disabled:D,className:"text-muted-foreground",children:t.jsx(vt,{})})]},We)}),c.length>0&&t.jsxs(Bt,{children:[t.jsx(Bs,{asChild:!0,children:t.jsxs("button",{type:"button",className:"group flex w-full items-center gap-2 px-4 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/40",children:[t.jsx(hs,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"}),t.jsx(Jt,{className:"size-4"}),n("mainPanelTabs.hostingTab.codeVarsToggle",{count:String(c.length)})]})}),t.jsx(Vt,{children:t.jsx("div",{className:"divide-y divide-border/60 border-t border-border bg-muted/30",children:c.map(xn)})})]})]}),e[36]=te,e[37]=c,e[38]=y,e[39]=P?.name,e[40]=P?.scope,e[41]=i,e[42]=s,e[43]=p,e[44]=m,e[45]=D,e[46]=V,e[47]=n,e[48]=ne):ne=e[48];let je;e[49]===Symbol.for("react.memo_cache_sentinel")?(je=L=>{d(L),L||O()},e[49]=je):je=e[49];let Ce;e[50]!==n?(Ce=n("mainPanelTabs.hostingTab.addVariable"),e[50]=n,e[51]=Ce):Ce=e[51];let re;e[52]!==Ce?(re=t.jsx(yt,{children:t.jsx(St,{children:Ce})}),e[52]=Ce,e[53]=re):re=e[53];let be;e[54]!==J?(be=L=>{L.preventDefault(),J()},e[54]=J,e[55]=be):be=e[55];let ie;e[56]!==n?(ie=n("mainPanelTabs.hostingTab.colName"),e[56]=n,e[57]=ie):ie=e[57];let le;e[58]!==ie?(le=t.jsx(Xe,{htmlFor:"env-name",children:ie}),e[58]=ie,e[59]=le):le=e[59];let ce;e[60]!==n?(ce=n("mainPanelTabs.hostingTab.envNamePlaceholder"),e[60]=n,e[61]=ce):ce=e[61];let De;e[62]===Symbol.for("react.memo_cache_sentinel")?(De=L=>u(L.target.value),e[62]=De):De=e[62];let me;e[63]!==f||e[64]!==D||e[65]!==ce?(me=t.jsx(it,{id:"env-name",placeholder:ce,value:f,onChange:De,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[63]=f,e[64]=D,e[65]=ce,e[66]=me):me=e[66];let de;e[67]!==le||e[68]!==me?(de=t.jsxs("div",{className:"flex flex-col gap-2",children:[le,me]}),e[67]=le,e[68]=me,e[69]=de):de=e[69];let ae;e[70]!==n?(ae=n("mainPanelTabs.hostingTab.colValue"),e[70]=n,e[71]=ae):ae=e[71];let pe;e[72]!==ae?(pe=t.jsx(Xe,{htmlFor:"env-value",children:ae}),e[72]=ae,e[73]=pe):pe=e[73];let fe;e[74]!==n?(fe=n("mainPanelTabs.hostingTab.envValuePlaceholder"),e[74]=n,e[75]=fe):fe=e[75];let ue;e[76]===Symbol.for("react.memo_cache_sentinel")?(ue=L=>x(L.target.value),e[76]=ue):ue=e[76];let ve;e[77]!==b||e[78]!==D||e[79]!==fe?(ve=t.jsx(it,{id:"env-value",placeholder:fe,value:b,onChange:ue,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[77]=b,e[78]=D,e[79]=fe,e[80]=ve):ve=e[80];let ye;e[81]!==pe||e[82]!==ve?(ye=t.jsxs("div",{className:"flex flex-col gap-2",children:[pe,ve]}),e[81]=pe,e[82]=ve,e[83]=ye):ye=e[83];let he;e[84]!==n?(he=n("mainPanelTabs.hostingTab.secretScope"),e[84]=n,e[85]=he):he=e[85];let oe;e[86]!==he?(oe=t.jsx(Xe,{children:he}),e[86]=he,e[87]=oe):oe=e[87];let xe;e[88]!==N||e[89]!==D?(xe=t.jsx(un,{value:N,onChange:C,disabled:D,className:"w-full"}),e[88]=N,e[89]=D,e[90]=xe):xe=e[90];let we;e[91]!==N||e[92]!==n?(we=n(N==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[91]=N,e[92]=n,e[93]=we):we=e[93];let $;e[94]!==we?($=t.jsx("p",{className:"text-xs text-muted-foreground",children:we}),e[94]=we,e[95]=$):$=e[95];let ge;e[96]!==oe||e[97]!==xe||e[98]!==$?(ge=t.jsxs("div",{className:"flex flex-col gap-2",children:[oe,xe,$]}),e[96]=oe,e[97]=xe,e[98]=$,e[99]=ge):ge=e[99];let Se;e[100]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{d(!1),O()},e[100]=Se):Se=e[100];let Te;e[101]!==n?(Te=n("mainPanelTabs.hostingTab.cancel"),e[101]=n,e[102]=Te):Te=e[102];let $e;e[103]!==D||e[104]!==Te?($e=t.jsx(Ie,{variant:"outline",type:"button",onClick:Se,disabled:D,children:Te}),e[103]=D,e[104]=Te,e[105]=$e):$e=e[105];let ze;e[106]!==f||e[107]!==D?(ze=D||!f.trim(),e[106]=f,e[107]=D,e[108]=ze):ze=e[108];let Ke;e[109]!==D||e[110]!==n?(Ke=n(D?"mainPanelTabs.hostingTab.saving":"mainPanelTabs.hostingTab.add"),e[109]=D,e[110]=n,e[111]=Ke):Ke=e[111];let Le;e[112]!==ze||e[113]!==Ke?(Le=t.jsx(Ie,{type:"submit",disabled:ze,children:Ke}),e[112]=ze,e[113]=Ke,e[114]=Le):Le=e[114];let _e;e[115]!==$e||e[116]!==Le?(_e=t.jsxs(Nt,{children:[$e,Le]}),e[115]=$e,e[116]=Le,e[117]=_e):_e=e[117];let He;e[118]!==be||e[119]!==de||e[120]!==ye||e[121]!==ge||e[122]!==_e?(He=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:be,children:[de,ye,ge,_e]}),e[118]=be,e[119]=de,e[120]=ye,e[121]=ge,e[122]=_e,e[123]=He):He=e[123];let Ve;e[124]!==re||e[125]!==He?(Ve=t.jsxs(Ct,{className:"sm:max-w-md",children:[re,He]}),e[124]=re,e[125]=He,e[126]=Ve):Ve=e[126];let ke;e[127]!==g||e[128]!==Ve?(ke=t.jsx(Dt,{open:g,onOpenChange:je,children:Ve}),e[127]=g,e[128]=Ve,e[129]=ke):ke=e[129];const Je=w!=null;let Be;e[130]===Symbol.for("react.memo_cache_sentinel")?(Be=L=>{L||j(null)},e[130]=Be):Be=e[130];let Ee;e[131]!==n?(Ee=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[131]=n,e[132]=Ee):Ee=e[132];const Oe=w?.name??"";let qe;e[133]!==n||e[134]!==Oe?(qe=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:Oe}),e[133]=n,e[134]=Oe,e[135]=qe):qe=e[135];let Ue;e[136]!==n?(Ue=n("mainPanelTabs.hostingTab.deleteVariable"),e[136]=n,e[137]=Ue):Ue=e[137];let M;e[138]!==Y||e[139]!==D||e[140]!==Je||e[141]!==Ee||e[142]!==qe||e[143]!==Ue?(M=t.jsx(wt,{open:Je,onOpenChange:Be,title:Ee,description:qe,confirmLabel:Ue,pending:D,onConfirm:Y}),e[138]=Y,e[139]=D,e[140]=Je,e[141]=Ee,e[142]=qe,e[143]=Ue,e[144]=M):M=e[144];let Ge;return e[145]!==K||e[146]!==se||e[147]!==ne||e[148]!==ke||e[149]!==M?(Ge=t.jsxs(ut,{title:K,actions:se,children:[ne,ke,M]}),e[145]=K,e[146]=se,e[147]=ne,e[148]=ke,e[149]=M,e[150]=Ge):Ge=e[150],Ge}function xn(r){return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 font-mono text-xs",children:[t.jsx("span",{className:"flex-1 basis-0 truncate",children:r.name}),t.jsx("span",{className:"flex-1 basis-0 truncate text-right text-muted-foreground",children:r.value})]},r.name)}function gn(r){return Pe.error(rt(r))}function bn(r){const e=ee.c(6),{type:o}=r,a=Ae(),l=o==="permanent"?"secondary":"outline";let i;e[0]!==a||e[1]!==o?(i=a(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=a,e[1]=o,e[2]=i):i=e[2];let c;return e[3]!==l||e[4]!==i?(c=t.jsx(Re,{variant:l,children:i}),e[3]=l,e[4]=i,e[5]=c):c=e[5],c}function pn(r){const e=ee.c(163),{base:o,orgSlug:a,site:l,redirects:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(null),[u,b]=Z.useState(""),[x,N]=Z.useState(""),[C,P]=Z.useState("permanent"),[S,y]=Z.useState(null),[R,w]=Z.useState(null);let j;e[0]!==a||e[1]!==n||e[2]!==l?(j=()=>n.invalidateQueries({queryKey:Ye.hostingRedirects(a,l)}),e[0]=a,e[1]=n,e[2]=l,e[3]=j):j=e[3];const T=j;let V;e[4]!==o?(V=z=>at(`${o}/redirects`,"PUT",z),e[4]=o,e[5]=V):V=e[5];let q;e[6]!==T||e[7]!==s?(q=()=>{T(),Pe.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),g(!1)},e[6]=T,e[7]=s,e[8]=q):q=e[8];let F;e[9]!==V||e[10]!==q?(F={mutationFn:V,onSuccess:q,onError:jn},e[9]=V,e[10]=q,e[11]=F):F=e[11];const v=lt(F);let B;e[12]!==o?(B=z=>at(`${o}/redirects/${encodeURIComponent(z)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==T||e[15]!==s?(A=()=>{T(),Pe.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),y(null)},e[14]=T,e[15]=s,e[16]=A):A=e[16];let Q;e[17]!==B||e[18]!==A?(Q={mutationFn:B,onSuccess:A,onError:Tn},e[17]=B,e[18]=A,e[19]=Q):Q=e[19];const _=lt(Q);let W;e[20]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{f(null),b(""),N(""),P("permanent"),g(!0)},e[20]=W):W=e[20];const J=W;let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=z=>{f(z.from),b(z.from),N(z.to),P(z.type==="temporary"?"temporary":"permanent"),g(!0)},e[21]=U):U=e[21];const p=U;let I;e[22]!==u||e[23]!==x||e[24]!==C||e[25]!==v||e[26]!==s?(I=()=>{const z=u.trim(),Tt=x.trim();if(!z||!Tt){Pe.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}v.mutate({from:z,to:Tt,type:C})},e[22]=u,e[23]=x,e[24]=C,e[25]=v,e[26]=s,e[27]=I):I=e[27];const Y=I;let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Pt,{}),e[28]=D):D=e[28];let G;e[29]!==s?(G=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=G):G=e[30];let O;e[31]!==G?(O=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:J,children:[D,G]}),e[31]=G,e[32]=O):O=e[32];const k=O;let E;e[33]!==s?(E=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=E):E=e[34];const H=i.length>0?k:void 0;let X;e[35]!==k||e[36]!==_.isPending||e[37]!==R||e[38]!==m||e[39]!==c||e[40]!==v.isPending||e[41]!==i||e[42]!==s?(X=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.redirectsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Yt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects"),className:"py-10",buttonComponent:k})}):t.jsx(Qe,{children:i.map((z,Tt)=>{const Ut=Zt(z.from),$t=R===z.from;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Ut?t.jsx(Qt,{open:$t,onClick:()=>w($t?null:z.from)}):t.jsx(Yt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-xs",children:[t.jsx("span",{className:"truncate",children:z.from}),t.jsx(qs,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"truncate text-muted-foreground",children:z.to})]}),t.jsx(bn,{type:z.type}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>p(z),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(ks,{})}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>y(z.from),disabled:_.isPending,className:"-ml-1 text-muted-foreground",children:t.jsx(vt,{})})]}),Ut&&t.jsx(gs,{open:$t,children:t.jsx(es,{from:z.from,source:z.source})})]},z.id??`${z.from}-${Tt}`)})}),e[35]=k,e[36]=_.isPending,e[37]=R,e[38]=m,e[39]=c,e[40]=v.isPending,e[41]=i,e[42]=s,e[43]=X):X=e[43];let te;e[44]!==d||e[45]!==s?(te=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[44]=d,e[45]=s,e[46]=te):te=e[46];let K;e[47]!==te?(K=t.jsx(yt,{children:t.jsx(St,{children:te})}),e[47]=te,e[48]=K):K=e[48];let se;e[49]!==Y?(se=z=>{z.preventDefault(),Y()},e[49]=Y,e[50]=se):se=e[50];let ne;e[51]!==s?(ne=s("mainPanelTabs.hostingTab.colFrom"),e[51]=s,e[52]=ne):ne=e[52];let je;e[53]!==ne?(je=t.jsx(Xe,{htmlFor:"redirect-from",children:ne}),e[53]=ne,e[54]=je):je=e[54];let Ce;e[55]!==s?(Ce=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[55]=s,e[56]=Ce):Ce=e[56];let re;e[57]===Symbol.for("react.memo_cache_sentinel")?(re=z=>b(z.target.value),e[57]=re):re=e[57];const be=d!=null||v.isPending;let ie;e[58]!==u||e[59]!==Ce||e[60]!==be?(ie=t.jsx(it,{id:"redirect-from",placeholder:Ce,value:u,onChange:re,className:"font-mono text-xs",disabled:be}),e[58]=u,e[59]=Ce,e[60]=be,e[61]=ie):ie=e[61];let le;e[62]!==je||e[63]!==ie?(le=t.jsxs("div",{className:"flex flex-col gap-2",children:[je,ie]}),e[62]=je,e[63]=ie,e[64]=le):le=e[64];let ce;e[65]!==s?(ce=s("mainPanelTabs.hostingTab.colTo"),e[65]=s,e[66]=ce):ce=e[66];let De;e[67]!==ce?(De=t.jsx(Xe,{htmlFor:"redirect-to",children:ce}),e[67]=ce,e[68]=De):De=e[68];let me;e[69]!==s?(me=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[69]=s,e[70]=me):me=e[70];let de;e[71]===Symbol.for("react.memo_cache_sentinel")?(de=z=>N(z.target.value),e[71]=de):de=e[71];let ae;e[72]!==x||e[73]!==v.isPending||e[74]!==me?(ae=t.jsx(it,{id:"redirect-to",placeholder:me,value:x,onChange:de,className:"font-mono text-xs",disabled:v.isPending}),e[72]=x,e[73]=v.isPending,e[74]=me,e[75]=ae):ae=e[75];let pe;e[76]!==De||e[77]!==ae?(pe=t.jsxs("div",{className:"flex flex-col gap-2",children:[De,ae]}),e[76]=De,e[77]=ae,e[78]=pe):pe=e[78];let fe;e[79]!==s?(fe=s("mainPanelTabs.hostingTab.colType"),e[79]=s,e[80]=fe):fe=e[80];let ue;e[81]!==fe?(ue=t.jsx(Xe,{children:fe}),e[81]=fe,e[82]=ue):ue=e[82];let ve;e[83]===Symbol.for("react.memo_cache_sentinel")?(ve=z=>P(z==="temporary"?"temporary":"permanent"),e[83]=ve):ve=e[83];const ye=v.isPending;let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Ot,{className:"w-full",children:t.jsx(Ht,{})}),e[84]=he):he=e[84];let oe;e[85]!==s?(oe=s("mainPanelTabs.hostingTab.permanent"),e[85]=s,e[86]=oe):oe=e[86];let xe;e[87]!==oe?(xe=t.jsx(ft,{value:"permanent",children:oe}),e[87]=oe,e[88]=xe):xe=e[88];let we;e[89]!==s?(we=s("mainPanelTabs.hostingTab.temporary"),e[89]=s,e[90]=we):we=e[90];let $;e[91]!==we?($=t.jsx(ft,{value:"temporary",children:we}),e[91]=we,e[92]=$):$=e[92];let ge;e[93]!==xe||e[94]!==$?(ge=t.jsxs(qt,{children:[xe,$]}),e[93]=xe,e[94]=$,e[95]=ge):ge=e[95];let Se;e[96]!==C||e[97]!==v.isPending||e[98]!==ge?(Se=t.jsxs(Mt,{value:C,onValueChange:ve,disabled:ye,children:[he,ge]}),e[96]=C,e[97]=v.isPending,e[98]=ge,e[99]=Se):Se=e[99];let Te;e[100]!==ue||e[101]!==Se?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[ue,Se]}),e[100]=ue,e[101]=Se,e[102]=Te):Te=e[102];let $e;e[103]!==d||e[104]!==u||e[105]!==i?($e=Zt(u)&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(es,{from:u,source:i.find(z=>z.from===d)?.source})}),e[103]=d,e[104]=u,e[105]=i,e[106]=$e):$e=e[106];let ze;e[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>g(!1),e[107]=ze):ze=e[107];const Ke=v.isPending;let Le;e[108]!==s?(Le=s("mainPanelTabs.hostingTab.cancel"),e[108]=s,e[109]=Le):Le=e[109];let _e;e[110]!==v.isPending||e[111]!==Le?(_e=t.jsx(Ie,{variant:"outline",type:"button",onClick:ze,disabled:Ke,children:Le}),e[110]=v.isPending,e[111]=Le,e[112]=_e):_e=e[112];let He;e[113]!==u||e[114]!==x||e[115]!==v.isPending?(He=v.isPending||!u.trim()||!x.trim(),e[113]=u,e[114]=x,e[115]=v.isPending,e[116]=He):He=e[116];let Ve;e[117]!==v.isPending||e[118]!==s?(Ve=v.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[117]=v.isPending,e[118]=s,e[119]=Ve):Ve=e[119];let ke;e[120]!==He||e[121]!==Ve?(ke=t.jsx(Ie,{type:"submit",disabled:He,children:Ve}),e[120]=He,e[121]=Ve,e[122]=ke):ke=e[122];let Je;e[123]!==_e||e[124]!==ke?(Je=t.jsxs(Nt,{children:[_e,ke]}),e[123]=_e,e[124]=ke,e[125]=Je):Je=e[125];let Be;e[126]!==se||e[127]!==le||e[128]!==pe||e[129]!==Te||e[130]!==$e||e[131]!==Je?(Be=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:se,children:[le,pe,Te,$e,Je]}),e[126]=se,e[127]=le,e[128]=pe,e[129]=Te,e[130]=$e,e[131]=Je,e[132]=Be):Be=e[132];let Ee;e[133]!==K||e[134]!==Be?(Ee=t.jsxs(Ct,{className:"sm:max-w-md",children:[K,Be]}),e[133]=K,e[134]=Be,e[135]=Ee):Ee=e[135];let Oe;e[136]!==h||e[137]!==Ee?(Oe=t.jsx(Dt,{open:h,onOpenChange:g,children:Ee}),e[136]=h,e[137]=Ee,e[138]=Oe):Oe=e[138];const qe=S!=null;let Ue;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>{z||y(null)},e[139]=Ue):Ue=e[139];let M;e[140]!==s?(M=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[140]=s,e[141]=M):M=e[141];const Ge=S??"";let L;e[142]!==s||e[143]!==Ge?(L=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:Ge}),e[142]=s,e[143]=Ge,e[144]=L):L=e[144];let Ne;e[145]!==s?(Ne=s("mainPanelTabs.hostingTab.deleteRedirect"),e[145]=s,e[146]=Ne):Ne=e[146];let We;e[147]!==_||e[148]!==S?(We=()=>{S&&_.mutate(S)},e[147]=_,e[148]=S,e[149]=We):We=e[149];let tt;e[150]!==_.isPending||e[151]!==qe||e[152]!==M||e[153]!==L||e[154]!==Ne||e[155]!==We?(tt=t.jsx(wt,{open:qe,onOpenChange:Ue,title:M,description:L,confirmLabel:Ne,pending:_.isPending,onConfirm:We}),e[150]=_.isPending,e[151]=qe,e[152]=M,e[153]=L,e[154]=Ne,e[155]=We,e[156]=tt):tt=e[156];let st;return e[157]!==E||e[158]!==H||e[159]!==X||e[160]!==Oe||e[161]!==tt?(st=t.jsxs(ut,{title:E,actions:H,children:[X,Oe,tt]}),e[157]=E,e[158]=H,e[159]=X,e[160]=Oe,e[161]=tt,e[162]=st):st=e[162],st}function Tn(r){return Pe.error(rt(r))}function jn(r){return Pe.error(rt(r))}function Pn(r){const e=ee.c(160),{base:o,orgSlug:a,site:l,secrets:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(""),[u,b]=Z.useState(""),[x,N]=Z.useState("runtime"),[C,P]=Z.useState(null);let S;e[0]!==a||e[1]!==n||e[2]!==l?(S=()=>n.invalidateQueries({queryKey:Ye.hostingSecrets(a,l)}),e[0]=a,e[1]=n,e[2]=l,e[3]=S):S=e[3];const y=S;let R;e[4]!==o?(R=M=>at(`${o}/secrets`,"PUT",M),e[4]=o,e[5]=R):R=e[5];let w;e[6]!==y||e[7]!==s?(w=()=>{y(),Pe.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),g(!1),f(""),b(""),N("runtime")},e[6]=y,e[7]=s,e[8]=w):w=e[8];let j;e[9]!==R||e[10]!==w?(j={mutationFn:R,onSuccess:w,onError:yn},e[9]=R,e[10]=w,e[11]=j):j=e[11];const T=lt(j);let V;e[12]!==o?(V=M=>at(`${o}/secrets/${encodeURIComponent(M.name)}?scope=${M.scope}`,"DELETE"),e[12]=o,e[13]=V):V=e[13];let q;e[14]!==y||e[15]!==s?(q=()=>{y(),Pe.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),P(null)},e[14]=y,e[15]=s,e[16]=q):q=e[16];let F;e[17]!==V||e[18]!==q?(F={mutationFn:V,onSuccess:q,onError:vn},e[17]=V,e[18]=q,e[19]=F):F=e[19];const v=lt(F);let B;e[20]!==d||e[21]!==x||e[22]!==u||e[23]!==T||e[24]!==s?(B=()=>{const M=d.trim();if(!M){Pe.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!u){Pe.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}T.mutate({name:M,value:u,scope:x})},e[20]=d,e[21]=x,e[22]=u,e[23]=T,e[24]=s,e[25]=B):B=e[25];const A=B;let Q,_;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=()=>g(!0),Q=t.jsx(Pt,{}),e[26]=Q,e[27]=_):(Q=e[26],_=e[27]);let W;e[28]!==s?(W=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=W):W=e[29];let J;e[30]!==W?(J=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[Q,W]}),e[30]=W,e[31]=J):J=e[31];const U=J;let p;e[32]!==s?(p=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=p):p=e[33];const I=i.length>0?U:void 0;let Y;e[34]!==U||e[35]!==v.isPending||e[36]!==m||e[37]!==c||e[38]!==i||e[39]!==s?(Y=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.secretsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Kt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noSecrets"),className:"py-10",buttonComponent:U})}):t.jsx(Qe,{children:i.map(M=>{const Ge=M.scope==="build"?"build":"runtime";return t.jsxs(pt,{children:[t.jsx(Kt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(bs,{scope:Ge})}),t.jsx("span",{className:"truncate font-mono text-xs",children:M.name}),M.origin==="worker"&&t.jsx(Re,{variant:"secondary",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]}),t.jsx("span",{className:"font-mono text-xs text-muted-foreground/60",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>P({name:M.name,scope:Ge}),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]},`${M.name}:${Ge}`)})}),e[34]=U,e[35]=v.isPending,e[36]=m,e[37]=c,e[38]=i,e[39]=s,e[40]=Y):Y=e[40];let D;e[41]!==s?(D=s("mainPanelTabs.hostingTab.addSecretTitle"),e[41]=s,e[42]=D):D=e[42];let G;e[43]!==D?(G=t.jsx(yt,{children:t.jsx(St,{children:D})}),e[43]=D,e[44]=G):G=e[44];let O;e[45]!==A?(O=M=>{M.preventDefault(),A()},e[45]=A,e[46]=O):O=e[46];let k;e[47]!==s?(k=s("mainPanelTabs.hostingTab.colName"),e[47]=s,e[48]=k):k=e[48];let E;e[49]!==k?(E=t.jsx(Xe,{htmlFor:"secret-name",children:k}),e[49]=k,e[50]=E):E=e[50];let H;e[51]!==s?(H=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[51]=s,e[52]=H):H=e[52];let X;e[53]===Symbol.for("react.memo_cache_sentinel")?(X=M=>f(M.target.value),e[53]=X):X=e[53];let te;e[54]!==d||e[55]!==T.isPending||e[56]!==H?(te=t.jsx(it,{id:"secret-name",placeholder:H,value:d,onChange:X,className:"font-mono text-xs",autoComplete:"off",disabled:T.isPending}),e[54]=d,e[55]=T.isPending,e[56]=H,e[57]=te):te=e[57];let K;e[58]!==E||e[59]!==te?(K=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,te]}),e[58]=E,e[59]=te,e[60]=K):K=e[60];let se;e[61]!==s?(se=s("mainPanelTabs.hostingTab.colValue"),e[61]=s,e[62]=se):se=e[62];let ne;e[63]!==se?(ne=t.jsx(Xe,{htmlFor:"secret-value",children:se}),e[63]=se,e[64]=ne):ne=e[64];let je;e[65]!==s?(je=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[65]=s,e[66]=je):je=e[66];let Ce;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ce=M=>b(M.target.value),e[67]=Ce):Ce=e[67];let re;e[68]!==u||e[69]!==T.isPending||e[70]!==je?(re=t.jsx(it,{id:"secret-value",type:"password",placeholder:je,value:u,onChange:Ce,className:"font-mono text-xs",autoComplete:"new-password",disabled:T.isPending}),e[68]=u,e[69]=T.isPending,e[70]=je,e[71]=re):re=e[71];let be;e[72]!==ne||e[73]!==re?(be=t.jsxs("div",{className:"flex flex-col gap-2",children:[ne,re]}),e[72]=ne,e[73]=re,e[74]=be):be=e[74];let ie;e[75]!==s?(ie=s("mainPanelTabs.hostingTab.secretScope"),e[75]=s,e[76]=ie):ie=e[76];let le;e[77]!==ie?(le=t.jsx(Xe,{children:ie}),e[77]=ie,e[78]=le):le=e[78];let ce;e[79]===Symbol.for("react.memo_cache_sentinel")?(ce=M=>N(M==="build"?"build":"runtime"),e[79]=ce):ce=e[79];const De=T.isPending;let me;e[80]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(Ot,{className:"w-full",children:t.jsx(Ht,{})}),e[80]=me):me=e[80];let de;e[81]!==s?(de=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[81]=s,e[82]=de):de=e[82];let ae;e[83]!==de?(ae=t.jsx(ft,{value:"runtime",children:de}),e[83]=de,e[84]=ae):ae=e[84];let pe;e[85]!==s?(pe=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[85]=s,e[86]=pe):pe=e[86];let fe;e[87]!==pe?(fe=t.jsx(ft,{value:"build",children:pe}),e[87]=pe,e[88]=fe):fe=e[88];let ue;e[89]!==ae||e[90]!==fe?(ue=t.jsxs(qt,{children:[ae,fe]}),e[89]=ae,e[90]=fe,e[91]=ue):ue=e[91];let ve;e[92]!==x||e[93]!==T.isPending||e[94]!==ue?(ve=t.jsxs(Mt,{value:x,onValueChange:ce,disabled:De,children:[me,ue]}),e[92]=x,e[93]=T.isPending,e[94]=ue,e[95]=ve):ve=e[95];let ye;e[96]!==x||e[97]!==s?(ye=s(x==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[96]=x,e[97]=s,e[98]=ye):ye=e[98];let he;e[99]!==ye?(he=t.jsx("p",{className:"text-xs text-muted-foreground",children:ye}),e[99]=ye,e[100]=he):he=e[100];let oe;e[101]!==le||e[102]!==ve||e[103]!==he?(oe=t.jsxs("div",{className:"flex flex-col gap-2",children:[le,ve,he]}),e[101]=le,e[102]=ve,e[103]=he,e[104]=oe):oe=e[104];let xe;e[105]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>g(!1),e[105]=xe):xe=e[105];const we=T.isPending;let $;e[106]!==s?($=s("mainPanelTabs.hostingTab.cancel"),e[106]=s,e[107]=$):$=e[107];let ge;e[108]!==T.isPending||e[109]!==$?(ge=t.jsx(Ie,{variant:"outline",type:"button",onClick:xe,disabled:we,children:$}),e[108]=T.isPending,e[109]=$,e[110]=ge):ge=e[110];let Se;e[111]!==d||e[112]!==u||e[113]!==T.isPending?(Se=T.isPending||!d.trim()||!u,e[111]=d,e[112]=u,e[113]=T.isPending,e[114]=Se):Se=e[114];let Te;e[115]!==T.isPending||e[116]!==s?(Te=T.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[115]=T.isPending,e[116]=s,e[117]=Te):Te=e[117];let $e;e[118]!==Se||e[119]!==Te?($e=t.jsx(Ie,{type:"submit",disabled:Se,children:Te}),e[118]=Se,e[119]=Te,e[120]=$e):$e=e[120];let ze;e[121]!==ge||e[122]!==$e?(ze=t.jsxs(Nt,{children:[ge,$e]}),e[121]=ge,e[122]=$e,e[123]=ze):ze=e[123];let Ke;e[124]!==O||e[125]!==K||e[126]!==be||e[127]!==oe||e[128]!==ze?(Ke=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:O,children:[K,be,oe,ze]}),e[124]=O,e[125]=K,e[126]=be,e[127]=oe,e[128]=ze,e[129]=Ke):Ke=e[129];let Le;e[130]!==G||e[131]!==Ke?(Le=t.jsxs(Ct,{className:"sm:max-w-md",children:[G,Ke]}),e[130]=G,e[131]=Ke,e[132]=Le):Le=e[132];let _e;e[133]!==h||e[134]!==Le?(_e=t.jsx(Dt,{open:h,onOpenChange:g,children:Le}),e[133]=h,e[134]=Le,e[135]=_e):_e=e[135];const He=C!=null;let Ve;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ve=M=>{M||P(null)},e[136]=Ve):Ve=e[136];let ke;e[137]!==s?(ke=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[137]=s,e[138]=ke):ke=e[138];const Je=C?.name??"";let Be;e[139]!==s||e[140]!==Je?(Be=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Je}),e[139]=s,e[140]=Je,e[141]=Be):Be=e[141];let Ee;e[142]!==s?(Ee=s("mainPanelTabs.hostingTab.deleteSecret"),e[142]=s,e[143]=Ee):Ee=e[143];let Oe;e[144]!==v||e[145]!==C?(Oe=()=>{C&&v.mutate(C)},e[144]=v,e[145]=C,e[146]=Oe):Oe=e[146];let qe;e[147]!==v.isPending||e[148]!==He||e[149]!==ke||e[150]!==Be||e[151]!==Ee||e[152]!==Oe?(qe=t.jsx(wt,{open:He,onOpenChange:Ve,title:ke,description:Be,confirmLabel:Ee,pending:v.isPending,onConfirm:Oe}),e[147]=v.isPending,e[148]=He,e[149]=ke,e[150]=Be,e[151]=Ee,e[152]=Oe,e[153]=qe):qe=e[153];let Ue;return e[154]!==p||e[155]!==I||e[156]!==Y||e[157]!==_e||e[158]!==qe?(Ue=t.jsxs(ut,{title:p,actions:I,children:[Y,_e,qe]}),e[154]=p,e[155]=I,e[156]=Y,e[157]=_e,e[158]=qe,e[159]=Ue):Ue=e[159],Ue}function vn(r){return Pe.error(rt(r))}function yn(r){return Pe.error(rt(r))}const Sn=3e4;function Ll(r){const e=ee.c(111),{virtualMcpId:o}=r,a=Ae(),{org:l}=Cs(),i=Es(o),c=Rs(i),m=!!c,s=c?`/api/${l.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s||e[1]!==m?(n=(O,k)=>({queryKey:O,queryFn:()=>It(`${s}${k}`),enabled:m,retry:!1,staleTime:Sn}),e[0]=s,e[1]=m,e[2]=n):n=e[2];const h=n,g=c??"",d=ct(h(Ye.hostingDeployments(l.slug,g),"/deployments")),f=ct(h(Ye.hostingEnv(l.slug,g),"/env")),u=ct(h(Ye.hostingSecrets(l.slug,g),"/secrets")),b=ct(h(Ye.hostingRedirects(l.slug,g),"/redirects")),x=ct(h(Ye.hostingDomains(l.slug,g),"/domains"));if(!c){let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[3]=O):O=e[3];let k;e[4]!==a?(k=a("mainPanelTabs.hostingTab.noSiteTitle"),e[4]=a,e[5]=k):k=e[5];let E;e[6]!==a?(E=a("mainPanelTabs.hostingTab.noSiteDescription"),e[6]=a,e[7]=E):E=e[7];let H;return e[8]!==k||e[9]!==E?(H=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[8]=k,e[9]=E,e[10]=H):H=e[10],H}if(jt(d.error)&&jt(f.error)&&jt(b.error)){let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[11]=O):O=e[11];let k;e[12]!==a?(k=a("mainPanelTabs.hostingTab.notConnectedTitle"),e[12]=a,e[13]=k):k=e[13];let E;e[14]!==a?(E=a("mainPanelTabs.hostingTab.notConnectedDescription"),e[14]=a,e[15]=E):E=e[15];let H;return e[16]!==k||e[17]!==E?(H=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[16]=k,e[17]=E,e[18]=H):H=e[18],H}let C,P,S,y,R,w,j,T,V,q;if(e[19]!==d.data||e[20]!==x.data||e[21]!==f.data||e[22]!==b.data||e[23]!==u.data){P=mt(d.data,"items");let O;e[34]!==f.data?(O=mt(f.data,"vars"),e[34]=f.data,e[35]=O):O=e[35],R=O;let k;e[36]!==f.data?(k=mt(f.data,"codeVars"),e[36]=f.data,e[37]=k):k=e[37],C=k;let E;e[38]!==u.data?(E=mt(u.data,"secrets"),e[38]=u.data,e[39]=E):E=e[39],V=E;let H;e[40]!==b.data?(H=mt(b.data,"items"),e[40]=b.data,e[41]=H):H=e[41],T=H;const X=x.data;let te;e[42]!==X?.items?(te=X?.items??[],e[42]=X?.items,e[43]=te):te=e[43],y=te;let K;e[44]!==X?.dnsTemplate?(K=X?.dnsTemplate??[],e[44]=X?.dnsTemplate,e[45]=K):K=e[45],S=K;const se=P.find(Cn);w=zt((se??P.find(Nn))?.framework),j=se?.servingUrl??null,q=j?j.replace(/^https?:\/\//,"").replace(/\/$/,""):null,e[19]=d.data,e[20]=x.data,e[21]=f.data,e[22]=b.data,e[23]=u.data,e[24]=C,e[25]=P,e[26]=S,e[27]=y,e[28]=R,e[29]=w,e[30]=j,e[31]=T,e[32]=V,e[33]=q}else C=e[24],P=e[25],S=e[26],y=e[27],R=e[28],w=e[29],j=e[30],T=e[31],V=e[32],q=e[33];const F=q;let v;e[46]!==s||e[47]!==l.slug||e[48]!==c?(v=t.jsx(Js,{base:s,orgSlug:l.slug,site:c}),e[46]=s,e[47]=l.slug,e[48]=c,e[49]=v):v=e[49];let B;e[50]!==a?(B=a("mainPanelTabs.hostingTab.title"),e[50]=a,e[51]=B):B=e[51];let A;e[52]!==w?(A=w&&t.jsx(Re,{variant:"secondary",children:w}),e[52]=w,e[53]=A):A=e[53];let Q;e[54]!==B||e[55]!==A?(Q=t.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[B,A]}),e[54]=B,e[55]=A,e[56]=Q):Q=e[56];let _;e[57]!==v||e[58]!==Q?(_=t.jsx(Wt.Title,{actions:v,children:Q}),e[57]=v,e[58]=Q,e[59]=_):_=e[59];let W;e[60]!==F||e[61]!==j?(W=j&&F&&t.jsx("p",{className:"flex flex-wrap items-center gap-x-1.5 text-sm text-muted-foreground",children:t.jsxs("a",{href:j,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-foreground hover:underline",children:[F,t.jsx(_t,{className:"size-3"})]})}),e[60]=F,e[61]=j,e[62]=W):W=e[62];let J;e[63]!==_||e[64]!==W?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[_,W]}),e[63]=_,e[64]=W,e[65]=J):J=e[65];let U;e[66]!==s||e[67]!==P||e[68]!==d.error||e[69]!==d.isLoading||e[70]!==m||e[71]!==l.slug||e[72]!==c?(U=t.jsx(tn,{base:s,orgSlug:l.slug,site:c,enabled:m,deployments:P,isLoading:d.isLoading,error:d.error}),e[66]=s,e[67]=P,e[68]=d.error,e[69]=d.isLoading,e[70]=m,e[71]=l.slug,e[72]=c,e[73]=U):U=e[73];let p;e[74]!==s||e[75]!==C||e[76]!==f.error||e[77]!==f.isLoading||e[78]!==R||e[79]!==l.slug||e[80]!==c?(p=t.jsx(hn,{base:s,orgSlug:l.slug,site:c,envVars:R,codeVars:C,isLoading:f.isLoading,error:f.error}),e[74]=s,e[75]=C,e[76]=f.error,e[77]=f.isLoading,e[78]=R,e[79]=l.slug,e[80]=c,e[81]=p):p=e[81];let I;e[82]!==s||e[83]!==l.slug||e[84]!==V||e[85]!==u.error||e[86]!==u.isLoading||e[87]!==c?(I=t.jsx(Pn,{base:s,orgSlug:l.slug,site:c,secrets:V,isLoading:u.isLoading,error:u.error}),e[82]=s,e[83]=l.slug,e[84]=V,e[85]=u.error,e[86]=u.isLoading,e[87]=c,e[88]=I):I=e[88];let Y;e[89]!==s||e[90]!==S||e[91]!==y||e[92]!==x.error||e[93]!==x.isLoading||e[94]!==l.slug||e[95]!==c?(Y=t.jsx(mn,{base:s,orgSlug:l.slug,site:c,domains:y,dnsTemplate:S,isLoading:x.isLoading,error:x.error}),e[89]=s,e[90]=S,e[91]=y,e[92]=x.error,e[93]=x.isLoading,e[94]=l.slug,e[95]=c,e[96]=Y):Y=e[96];let D;e[97]!==s||e[98]!==l.slug||e[99]!==T||e[100]!==b.error||e[101]!==b.isLoading||e[102]!==c?(D=t.jsx(pn,{base:s,orgSlug:l.slug,site:c,redirects:T,isLoading:b.isLoading,error:b.error}),e[97]=s,e[98]=l.slug,e[99]=T,e[100]=b.error,e[101]=b.isLoading,e[102]=c,e[103]=D):D=e[103];let G;return e[104]!==U||e[105]!==p||e[106]!==I||e[107]!==Y||e[108]!==D||e[109]!==J?(G=t.jsx("div",{className:"h-full min-h-0 overflow-y-auto",children:t.jsx(Wt.Body,{maxWidth:"max-w-5xl",children:t.jsxs(Ds,{children:[J,U,p,I,Y,D]})})}),e[104]=U,e[105]=p,e[106]=I,e[107]=Y,e[108]=D,e[109]=J,e[110]=G):G=e[110],G}function Nn(r){return r.framework}function Cn(r){return r.up===!0}export{Ll as HostingTab};
|
|
1
|
+
import{c as ee,j as t,a1 as ss,B as Ie,a2 as ns,a4 as is,l as xt,b as Ae,b8 as dt,b6 as js,b1 as Ps,t as Pe,n as bt,r as Z,e as lt,m as ct,K as Ye,bm as vs,bl as ys,bn as Ss,bo as Ns,z as Kt,G as Cs,P as Wt,b5 as Ds}from"./index-VAoEJtvI.js";import{n as _t}from"./LinkExternal01-B8GzK7ER.js";import{be as ws,bf as ls,aD as $s,aY as Ls,bg as _s,k as kt,C as Jt,av as Yt,aF as ks}from"./agent-icon-DLDeYH2t.js";import{B as Re}from"./badge-CCYpKX1i.js";import{E as Ze}from"./empty-state-BPA0C1qI.js";import{u as Es}from"./use-virtual-mcp-BYJtzivW.js";import{r as Rs}from"./site-slug-uya6Wp4-.js";import{i as Fs}from"./AlertCircle-DeXfw3DH.js";import{d as gt}from"./UserSquare-Brq8ZOAk.js";import{i as As}from"./Zap-DjgdzPMR.js";import{c as as,d as os,b as rs,f as cs,g as ms,e as ds,a as fs,A as us}from"./alert-dialog-WdxFSf6L.js";import{d as zs,a as nt,T as Fe,c as Et,e as Rt,b as Ft}from"./table-DsvIRFrA.js";import{i as hs}from"./ChevronRight-B22Moez_.js";import{a as Vs}from"./Copy01-Cc8n0Ba4.js";import{am as Vt,an as Bt,al as Bs}from"./automation-runs-lWWesVU8.js";import{i as At}from"./Globe01-D_tKhOLC.js";import{s as Pt}from"./Plus-C0NWoh9T.js";import{s as vt}from"./Trash01-BZPG63MT.js";import{c as yt,d as St,e as Nt,b as Ct,D as Dt}from"./dialog-Ukm5OPV3.js";import{I as it}from"./input-DV0zc4Ex.js";import{L as Xe}from"./label-phMabfYY.js";import{i as Hs}from"./Settings02-BgDAmtwC.js";import{s as Os}from"./Eye-BoL3xwzV.js";import{a as Ht,b as Ot,c as ft,d as qt,S as Mt}from"./select-Bsy8eSBX.js";import{i as qs}from"./ArrowRight-Br4r7pwg.js";import"./Tool01-36BH9Lfu.js";import"./ArrowUp-eSS406es.js";import"./ArrowLeft-BsRBcR7k.js";import"./Tool02-BB0DnTeE.js";import"./TrendUp01-CV5BO_Jc.js";import"./ZoomOut-CoETMI1M.js";import"./Users03-BSbySSqf.js";import"./CheckCircle-DQQm8ch4.js";import"./Check-BBi_O2LB.js";import"./ChevronUp-DSVxpGju.js";import"./ChevronSelectorVertical-DRZ4gkV3.js";import"./DotsVertical-CIP9Nl0k.js";import"./CreditCard01-Cv5ITpta.js";import"./Download01-BMiKF4vk.js";import"./Share07-cIietouI.js";import"./GitBranch01-CoEwe3ey.js";import"./XClose-DHKiEI8G.js";import"./HardDrive-CeTPrLdV.js";import"./Image01-D2YbNIYT.js";import"./Key01-DKCA1Tnq.js";import"./Link01-DQ70lFlQ.js";import"./Monitor01-Yeg984fl.js";import"./Sun-Bj1wxgQu.js";import"./Package-CxCTcL6L.js";import"./Palette-ajTtDJW6.js";import"./Play-0ktNAbPi.js";import"./SearchLg-BgA05EHK.js";import"./SearchMd-oWTKVUjk.js";import"./Shield01-DJKVjmYu.js";import"./Stars01-BtEjDnlJ.js";import"./Upload01-DP0vQQKt.js";import"./User01-xnVK2xE4.js";import"./Users01-DKKqtuHP.js";import"./XCircle-BUI7KQFj.js";import"./use-mcp-client-Co9Owf2L.js";import"./auth-4merKc2Y.js";import"./useInfiniteQuery-B4KvVpWh.js";import"./infiniteQueryObserver-6JlvsRry.js";import"./use-connection-CDB9hw5T.js";import"./empty-state-BZ-FN_XV.js";import"./use-infinite-scroll-BvDBqpDf.js";import"./use-members-C-Z2Qzvt.js";import"./use-org-auth-client-DpEh871d.js";import"./use-automations-D4gmPZIJ.js";import"./useSuspenseInfiniteQuery-Bh-SHQi9.js";import"./avatar-BtvgpUQu.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-copy-Ba9R3fog.js";import"./markdown-Dyz-XGHR.js";import"./use-panel-navigate-B1dRz6j0.js";import"./use-destination-route-B7okMERa.js";import"./hooks-DtmH-v5J.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-Dry_70zj.js";import"./task-board-CW6cAmRQ.js";import"./schema-DWDPSE-2.js";import"./chat-context-Clr-423u.js";import"./autosend-BFGLO-gB.js";import"./thread-intent-7CsqxP8-.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-Cpuy3TdM.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-gGN5aHaN.js";import"./thread-route-D9lc5X5V.js";import"./use-organization-settings-BpamzdT-.js";import"./monaco-editor-CpW797C4.js";import"./editor-DX3E4m2N.js";import"./mcp-app-renderer-D4iYl8Q6.js";import"./types-4sSCjzTq.js";import"./shell-layout-D8I6l6uI.js";import"./project-icon-CB1uAMSA.js";import"./github-repo-CTPv5ZM2.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-CBtKGmqK.js";import"./index-DXamwEeh.js";import"./integration-icon-BtFJcxte.js";import"./required-auth-layout-CyVuDQYT.js";import"./use-org-sso-M9_7HiPm.js";import"./use-org-notice-uXzKk9YU.js";import"./use-navigate-to-agent-Q2KJVvG6.js";import"./use-mcp-prompts-Bxuprunc.js";import"./form-Dmuwki82.js";import"./file-type-icon-C9IcryLg.js";function Lt(r,e){return r.name===e.name&&(r.scope??"runtime")===e.scope}function mt(r,e){if(Array.isArray(r))return r;if(r&&typeof r=="object"){const o=r[e];if(Array.isArray(o))return o}return[]}function zt(r){return r==="deco-deno"?"Deco Deno":r==="deco-tanstack"?"Deco TanStack":r??null}function Ms(r){const e=(r??"").toLowerCase();return e.includes("ready")||e.includes("success")||e.includes("active")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("build")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Gt(r){if(!r)return"—";const e=new Date(r).getTime();if(Number.isNaN(e))return"—";const o=Math.round((Date.now()-e)/1e3),a=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),l=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,c]of l)if(Math.abs(o)>=c)return a.format(-Math.round(o/c),i);return a.format(-o,"second")}function Is(r){if(r==null||!Number.isFinite(r))return"—";if(r<1e3)return`${Math.round(r)}ms`;const e=r/1e3;if(e<60)return`${e.toFixed(e>=10?0:1)}s`;const o=Math.round(e);return`${Math.floor(o/60)}m ${o%60}s`}function jt(r){const e=r instanceof Error?r.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function rt(r){return r instanceof Error?r.message:String(r)}function xs(r,e){return r&&typeof r=="object"&&"error"in r?String(r.error):`request failed (${e})`}async function It(r){const e=await fetch(r),o=await e.json().catch(()=>({}));if(!e.ok)throw new Error(xs(o,e.status));return o}async function at(r,e,o){const a=await fetch(r,{method:e,headers:o!==void 0?{"Content-Type":"application/json"}:{},body:o!==void 0?JSON.stringify(o):void 0}),l=await a.json().catch(()=>({}));if(!a.ok)throw new Error(xs(l,a.status));return l}function et(r){const e=ee.c(19);let o,a,l,i,c,m;e[0]!==r?({label:a,tooltipSide:i,variant:c,size:m,children:o,...l}=r,e[0]=r,e[1]=o,e[2]=a,e[3]=l,e[4]=i,e[5]=c,e[6]=m):(o=e[1],a=e[2],l=e[3],i=e[4],c=e[5],m=e[6]);const s=i===void 0?"top":i,n=c===void 0?"ghost":c,h=m===void 0?"icon-sm":m;let g;e[7]!==o||e[8]!==a||e[9]!==l||e[10]!==h||e[11]!==n?(g=t.jsx(ss,{asChild:!0,children:t.jsx(Ie,{"data-slot":"icon-button","aria-label":a,variant:n,size:h,...l,children:o})}),e[7]=o,e[8]=a,e[9]=l,e[10]=h,e[11]=n,e[12]=g):g=e[12];let d;e[13]!==a||e[14]!==s?(d=t.jsx(ns,{side:s,children:a}),e[13]=a,e[14]=s,e[15]=d):d=e[15];let f;return e[16]!==g||e[17]!==d?(f=t.jsxs(is,{children:[g,d]}),e[16]=g,e[17]=d,e[18]=f):f=e[18],f}function ut(r){const e=ee.c(4),{title:o,actions:a,children:l}=r;let i;return e[0]!==a||e[1]!==l||e[2]!==o?(i=t.jsx(Ps,{title:o,actions:a,children:l}),e[0]=a,e[1]=l,e[2]=o,e[3]=i):i=e[3],i}function Qe(r){const e=ee.c(5),{className:o,children:a}=r;let l;e[0]!==o?(l=xt("gap-0 overflow-hidden p-0 divide-y divide-border",o),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==l?(i=t.jsx(js,{className:l,children:a}),e[2]=a,e[3]=l,e[4]=i):i=e[4],i}function pt(r){const e=ee.c(5),{className:o,children:a}=r;let l;e[0]!==o?(l=xt("flex min-h-12 items-center gap-3 px-4 py-2",o),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==l?(i=t.jsx("div",{className:l,children:a}),e[2]=a,e[3]=l,e[4]=i):i=e[4],i}function ot(r){const e=ee.c(2),{children:o}=r;let a;return e[0]!==o?(a=t.jsx("p",{className:"px-4 py-6 text-sm text-muted-foreground",children:o}),e[0]=o,e[1]=a):a=e[1],a}function ht(r){const e=ee.c(2),{rows:o}=r,a=o===void 0?3:o;let l;return e[0]!==a?(l=t.jsx(Qe,{children:Array.from({length:a},Qs)}),e[0]=a,e[1]=l):l=e[1],l}function Qs(r,e){return t.jsxs(pt,{children:[t.jsx(dt,{className:"h-4 w-40"}),t.jsx(dt,{className:"h-4 flex-1"}),t.jsx(dt,{className:"size-7 rounded-lg"})]},e)}function Me(r){const e=ee.c(5),{className:o,children:a}=r;let l;e[0]!==o?(l=xt("text-xs font-medium text-muted-foreground",o),e[0]=o,e[1]=l):l=e[1];let i;return e[2]!==a||e[3]!==l?(i=t.jsx(zs,{className:l,children:a}),e[2]=a,e[3]=l,e[4]=i):i=e[4],i}function Qt(r){const e=ee.c(12),{open:o,onClick:a}=r,l=Ae();let i;e[0]!==o||e[1]!==l?(i=l(o?"mainPanelTabs.hostingTab.hideDetails":"mainPanelTabs.hostingTab.showDetails"),e[0]=o,e[1]=l,e[2]=i):i=e[2];const c=o&&"rotate-90";let m;e[3]!==c?(m=xt("transition-transform duration-200 motion-reduce:transition-none",c),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==m?(s=t.jsx(hs,{className:m}),e[5]=m,e[6]=s):s=e[6];let n;return e[7]!==a||e[8]!==o||e[9]!==i||e[10]!==s?(n=t.jsx(et,{label:i,size:"icon-sm",className:"-ml-1.5 text-muted-foreground","aria-expanded":o,onClick:a,children:s}),e[7]=a,e[8]=o,e[9]=i,e[10]=s,e[11]=n):n=e[11],n}function Us(r){const e=ee.c(8),{open:o,colSpan:a,children:l}=r;let i;e[0]!==l?(i=t.jsx(Vt,{children:t.jsx("div",{className:"border-b border-border bg-muted/30 px-4 py-3",children:l})}),e[0]=l,e[1]=i):i=e[1];let c;e[2]!==o||e[3]!==i?(c=t.jsx(Bt,{open:o,children:i}),e[2]=o,e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=t.jsx(nt,{className:"border-0 hover:bg-transparent",children:t.jsx(Fe,{colSpan:a,className:"p-0 whitespace-normal",children:c})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function gs(r){const e=ee.c(5),{open:o,children:a}=r;let l;e[0]!==a?(l=t.jsx(Vt,{children:t.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:a})}),e[0]=a,e[1]=l):l=e[1];let i;return e[2]!==o||e[3]!==l?(i=t.jsx(Bt,{open:o,children:l}),e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function bs(r){const e=ee.c(6),{scope:o}=r,a=Ae(),l=o==="build"?"outline":"secondary";let i;e[0]!==o||e[1]!==a?(i=a(o==="build"?"mainPanelTabs.hostingTab.secretScopeBuild":"mainPanelTabs.hostingTab.secretScopeRuntime"),e[0]=o,e[1]=a,e[2]=i):i=e[2];let c;return e[3]!==l||e[4]!==i?(c=t.jsx(Re,{variant:l,children:i}),e[3]=l,e[4]=i,e[5]=c):c=e[5],c}function Ks(r){const e=ee.c(9),{value:o}=r,a=Ae();let l;e[0]!==a?(l=a("mainPanelTabs.hostingTab.dnsCopy"),e[0]=a,e[1]=l):l=e[1];let i;e[2]!==a||e[3]!==o?(i=()=>{navigator.clipboard?.writeText(o),Pe.success(a("mainPanelTabs.hostingTab.dnsCopied"))},e[2]=a,e[3]=o,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Vs,{className:"size-3.5"}),e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==i?(m=t.jsx(et,{label:l,onClick:i,children:c}),e[6]=l,e[7]=i,e[8]=m):m=e[8],m}function wt(r){const e=ee.c(28),{open:o,onOpenChange:a,title:l,description:i,confirmLabel:c,pending:m,onConfirm:s}=r,n=Ae();let h;e[0]!==l?(h=t.jsx(as,{children:l}),e[0]=l,e[1]=h):h=e[1];let g;e[2]!==i?(g=t.jsx(os,{children:i}),e[2]=i,e[3]=g):g=e[3];let d;e[4]!==h||e[5]!==g?(d=t.jsxs(rs,{children:[h,g]}),e[4]=h,e[5]=g,e[6]=d):d=e[6];let f;e[7]!==n?(f=n("mainPanelTabs.hostingTab.cancel"),e[7]=n,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=t.jsx(cs,{disabled:m,children:f}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let b;e[12]!==s?(b=S=>{S.preventDefault(),s()},e[12]=s,e[13]=b):b=e[13];let x;e[14]!==c||e[15]!==m||e[16]!==b?(x=t.jsx(ms,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:b,disabled:m,children:c}),e[14]=c,e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==u||e[19]!==x?(N=t.jsxs(ds,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=N):N=e[20];let C;e[21]!==d||e[22]!==N?(C=t.jsxs(fs,{children:[d,N]}),e[21]=d,e[22]=N,e[23]=C):C=e[23];let P;return e[24]!==a||e[25]!==o||e[26]!==C?(P=t.jsx(us,{open:o,onOpenChange:a,children:C}),e[24]=a,e[25]=o,e[26]=C,e[27]=P):P=e[27],P}const Ws=8;function Js(r){const e=ee.c(54),{base:o,orgSlug:a,site:l}=r,i=Ae(),c=bt(),[m,s]=Z.useState(!1);let n;e[0]!==o?(n=()=>at(`${o}/deploy`,"POST",{mode:"current"}),e[0]=o,e[1]=n):n=e[1];let h;e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==i?(h=()=>{c.invalidateQueries({queryKey:Ye.hostingDeployments(a,l)}),c.invalidateQueries({queryKey:Ye.hostingDeploymentHistory(a,l)}),Pe.success(i("mainPanelTabs.hostingTab.toastDeployQueued")),s(!1)},e[2]=a,e[3]=c,e[4]=l,e[5]=i,e[6]=h):h=e[6];let g;e[7]!==n||e[8]!==h?(g={mutationFn:n,onSuccess:h,onError:Ys},e[7]=n,e[8]=h,e[9]=g):g=e[9];const d=lt(g);let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>s(!0),e[10]=f):f=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(gt,{}),e[11]=u):u=e[11];let b;e[12]!==d.isPending||e[13]!==i?(b=d.isPending?i("mainPanelTabs.hostingTab.deploying"):i("mainPanelTabs.hostingTab.deploy"),e[12]=d.isPending,e[13]=i,e[14]=b):b=e[14];let x;e[15]!==d.isPending||e[16]!==b?(x=t.jsxs(Ie,{size:"sm",onClick:f,disabled:d.isPending,children:[u,b]}),e[15]=d.isPending,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i?(N=i("mainPanelTabs.hostingTab.deployConfirmTitle"),e[18]=i,e[19]=N):N=e[19];let C;e[20]!==N?(C=t.jsx(as,{children:N}),e[20]=N,e[21]=C):C=e[21];let P;e[22]!==i?(P=i("mainPanelTabs.hostingTab.deployConfirmDescription"),e[22]=i,e[23]=P):P=e[23];let S;e[24]!==P?(S=t.jsx(os,{children:P}),e[24]=P,e[25]=S):S=e[25];let y;e[26]!==S||e[27]!==C?(y=t.jsxs(rs,{children:[C,S]}),e[26]=S,e[27]=C,e[28]=y):y=e[28];const R=d.isPending;let w;e[29]!==i?(w=i("mainPanelTabs.hostingTab.cancel"),e[29]=i,e[30]=w):w=e[30];let j;e[31]!==d.isPending||e[32]!==w?(j=t.jsx(cs,{disabled:R,children:w}),e[31]=d.isPending,e[32]=w,e[33]=j):j=e[33];let T;e[34]!==d?(T=_=>{_.preventDefault(),d.mutate()},e[34]=d,e[35]=T):T=e[35];const V=d.isPending;let q;e[36]!==i?(q=i("mainPanelTabs.hostingTab.deploy"),e[36]=i,e[37]=q):q=e[37];let F;e[38]!==d.isPending||e[39]!==T||e[40]!==q?(F=t.jsx(ms,{onClick:T,disabled:V,children:q}),e[38]=d.isPending,e[39]=T,e[40]=q,e[41]=F):F=e[41];let v;e[42]!==j||e[43]!==F?(v=t.jsxs(ds,{children:[j,F]}),e[42]=j,e[43]=F,e[44]=v):v=e[44];let B;e[45]!==y||e[46]!==v?(B=t.jsxs(fs,{children:[y,v]}),e[45]=y,e[46]=v,e[47]=B):B=e[47];let A;e[48]!==m||e[49]!==B?(A=t.jsx(us,{open:m,onOpenChange:s,children:B}),e[48]=m,e[49]=B,e[50]=A):A=e[50];let Q;return e[51]!==A||e[52]!==x?(Q=t.jsxs(t.Fragment,{children:[x,A]}),e[51]=A,e[52]=x,e[53]=Q):Q=e[53],Q}function Ys(r){return Pe.error(rt(r))}function Gs(r,e){const o=(r??"").toLowerCase();return o.includes("rollback")?t.jsxs(Re,{variant:"warning",children:[t.jsx(Ls,{}),e("mainPanelTabs.hostingTab.actionRollback")]}):o.includes("redeploy")?t.jsxs(Re,{variant:"secondary",children:[t.jsx(_s,{}),e("mainPanelTabs.hostingTab.actionRedeploy")]}):t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),e("mainPanelTabs.hostingTab.actionDeploy")]})}function Xs(r,e,o){const a=(r??"").toLowerCase();return a==="build"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(ls,{}),o("mainPanelTabs.hostingTab.typeBuild")]}):a==="fast-deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(As,{}),o("mainPanelTabs.hostingTab.typeFastDeploy")]}):a==="deploy"?t.jsxs(Re,{variant:"secondary",children:[t.jsx(gt,{}),o("mainPanelTabs.hostingTab.typeDeploy")]}):Gs(e,o)}function Zs(r,e){const o=(r??"").toLowerCase();return o==="success"?t.jsx(Re,{variant:"success",children:e("mainPanelTabs.hostingTab.outcomeSuccess")}):o==="failure"?t.jsx(Re,{variant:"destructive",children:e("mainPanelTabs.hostingTab.outcomeFailure")}):o==="pending"?t.jsxs(Re,{variant:"secondary",children:[t.jsx($s,{}),e("mainPanelTabs.hostingTab.outcomePending")]}):null}function Xt(r){const e=ee.c(7),{commit:o,onClick:a}=r,l=Ae();let i;e[0]!==l?(i=l("mainPanelTabs.hostingTab.buildLogs"),e[0]=l,e[1]=i):i=e[1];const c=!o;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ls,{}),e[2]=m):m=e[2];let s;return e[3]!==a||e[4]!==i||e[5]!==c?(s=t.jsx(et,{label:i,onClick:a,disabled:c,children:m}),e[3]=a,e[4]=i,e[5]=c,e[6]=s):s=e[6],s}function en(r){const e=ee.c(37),{base:o,orgSlug:a,site:l,target:i,onOpenChange:c}=r,m=Ae(),s=i!=null,n=i?.commit??"",h=i?.env??"";let g;e[0]!==n||e[1]!==h||e[2]!==a||e[3]!==l?(g=Ye.hostingBuildLogs(a,l,n,h),e[0]=n,e[1]=h,e[2]=a,e[3]=l,e[4]=g):g=e[4];let d;e[5]!==o||e[6]!==n||e[7]!==h?(d=()=>It(`${o}/deployments/logs?commit=${encodeURIComponent(n)}&env=${encodeURIComponent(h)}`),e[5]=o,e[6]=n,e[7]=h,e[8]=d):d=e[8];const f=s&&!!n;let u;e[9]!==g||e[10]!==d||e[11]!==f?(u={queryKey:g,queryFn:d,enabled:f,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[9]=g,e[10]=d,e[11]=f,e[12]=u):u=e[12];const b=ct(u),x=b.data;let N;e[13]!==m?(N=m("mainPanelTabs.hostingTab.buildLogsTitle"),e[13]=m,e[14]=N):N=e[14];let C;e[15]!==N?(C=t.jsx(vs,{children:N}),e[15]=N,e[16]=C):C=e[16];let P;e[17]!==n||e[18]!==m?(P=m("mainPanelTabs.hostingTab.buildLogsCommit",{commit:n.slice(0,7)}),e[17]=n,e[18]=m,e[19]=P):P=e[19];let S;e[20]!==P?(S=t.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:P}),e[20]=P,e[21]=S):S=e[21];let y;e[22]!==C||e[23]!==S?(y=t.jsxs(ys,{className:"shrink-0 border-b border-border px-5 py-5 md:px-6",children:[C,S]}),e[22]=C,e[23]=S,e[24]=y):y=e[24];let R;e[25]!==x||e[26]!==b.error||e[27]!==b.isLoading||e[28]!==m?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 md:px-6",children:jt(b.error)?t.jsx(Ze,{icon:t.jsx(kt,{className:"size-5"}),title:m("mainPanelTabs.hostingTab.notConnectedTitle"),description:m("mainPanelTabs.hostingTab.notConnectedDescription")}):b.isLoading?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-full"}),t.jsx(dt,{className:"h-4 w-2/3"})]}):b.error?t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsError")}):x&&x.configured===!1?t.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-lg border border-border bg-muted/30 px-4 py-8 text-center",children:[t.jsx(Fs,{className:"size-5 text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium text-foreground",children:m("mainPanelTabs.hostingTab.buildLogsNotWiredTitle")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:x.reason??m("mainPanelTabs.hostingTab.buildLogsNotWiredDescription")})]}):x?.text?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("pre",{className:"overflow-auto font-mono text-[11px] leading-relaxed text-foreground/80 whitespace-pre-wrap break-words",children:x.text}),x.truncated&&t.jsx("p",{className:"text-xs text-warning",children:m("mainPanelTabs.hostingTab.buildLogsTruncated")}),x.url&&t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-xs text-primary hover:underline",children:[t.jsx(_t,{className:"size-3.5"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]})]}):x?.url?t.jsxs("a",{href:x.url,target:"_blank",rel:"noreferrer",className:"inline-flex w-fit items-center gap-1.5 text-sm text-primary hover:underline",children:[t.jsx(_t,{className:"size-4"}),m("mainPanelTabs.hostingTab.buildLogsOpenFull")]}):t.jsx(ot,{children:m("mainPanelTabs.hostingTab.buildLogsEmpty")})}),e[25]=x,e[26]=b.error,e[27]=b.isLoading,e[28]=m,e[29]=R):R=e[29];let w;e[30]!==R||e[31]!==y?(w=t.jsxs(Ss,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:[y,R]}),e[30]=R,e[31]=y,e[32]=w):w=e[32];let j;return e[33]!==c||e[34]!==s||e[35]!==w?(j=t.jsx(Ns,{open:s,onOpenChange:c,children:w}),e[33]=c,e[34]=s,e[35]=w,e[36]=j):j=e[36],j}function tn(r){const e=ee.c(52),{base:o,orgSlug:a,site:l,enabled:i,deployments:c,isLoading:m,error:s}=r,n=Ae(),[h,g]=Z.useState(null),[d,f]=Z.useState(Ws),[u,b]=Z.useState(null);let x;e[0]!==a||e[1]!==l?(x=Ye.hostingDeploymentHistory(a,l),e[0]=a,e[1]=l,e[2]=x):x=e[2];let N;e[3]!==o?(N=()=>It(`${o}/deployments/history?limit=50`),e[3]=o,e[4]=N):N=e[4];let C;e[5]!==i||e[6]!==x||e[7]!==N?(C={queryKey:x,queryFn:N,enabled:i,retry:!1,staleTime:3e4},e[5]=i,e[6]=x,e[7]=N,e[8]=C):C=e[8];const P=ct(C);let S,y,R,w;if(e[9]!==c||e[10]!==s||e[11]!==h||e[12]!==d||e[13]!==P.data||e[14]!==P.error||e[15]!==P.isLoading||e[16]!==m||e[17]!==n){const F=mt(P.data,"items"),v=F.slice(0,d),B=F.length-v.length;let A;e[22]!==c?(A=c.find(ln)?.commitSha??c.find(nn)?.commitSha??null,e[22]=c,e[23]=A):A=e[23];const Q=A;let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=(p,I)=>{p&&b({commit:p,env:I??"production"})},e[24]=_):_=e[24];const W=_;let J;e[25]!==n?(J=n("mainPanelTabs.hostingTab.deployments"),e[25]=n,e[26]=J):J=e[26];let U;e[27]!==c||e[28]!==s||e[29]!==h||e[30]!==m||e[31]!==n?(U=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deploymentsError")})}):c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployments"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDuration")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colUpdated")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsx(Ft,{children:c.map(p=>{const I=!!p.buildMessage,Y=h===p.id;return t.jsxs(Z.Fragment,{children:[t.jsxs(nt,{className:xt(I&&"cursor-pointer hover:bg-muted/40"),onClick:I?()=>g(Y?null:p.id):void 0,children:[t.jsx(Fe,{className:"px-4",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[I?t.jsx(Qt,{open:Y,onClick:()=>g(Y?null:p.id)}):t.jsx(ws,{className:"size-4 text-muted-foreground/60"}),t.jsx("span",{className:"font-mono text-xs",children:p.shortCommit??p.commitSha?.slice(0,7)??"—"}),p.production===!0&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.production")})]})}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Re,{variant:Ms(p.phase),children:p.phase??"—"}),p.up===!0&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Is(p.durationMs)}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Gt(p.finishedAt??p.startedAt??p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",onClick:sn,children:t.jsx(Xt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]}),I&&t.jsx(Us,{open:Y,colSpan:6,children:t.jsx("p",{className:"whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:p.buildMessage})})]},p.id)})})]}),e[27]=c,e[28]=s,e[29]=h,e[30]=m,e[31]=n,e[32]=U):U=e[32],e[33]!==U||e[34]!==J?(w=t.jsx(ut,{title:J,children:U}),e[33]=U,e[34]=J,e[35]=w):w=e[35],S=ut,e[36]!==n?(y=n("mainPanelTabs.hostingTab.deployHistory"),e[36]=n,e[37]=y):y=e[37],R=P.isLoading?t.jsx(ht,{}):P.error?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.deployHistoryError")})}):F.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(gt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDeployHistory"),className:"py-10"})}):t.jsxs(Et,{children:[t.jsx(Rt,{children:t.jsxs(nt,{children:[t.jsx(Me,{className:"pl-4",children:n("mainPanelTabs.hostingTab.colAction")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colStatus")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colCommit")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colFramework")}),t.jsx(Me,{children:n("mainPanelTabs.hostingTab.colActor")}),t.jsx(Me,{className:"text-right",children:n("mainPanelTabs.hostingTab.colDate")}),t.jsx(Me,{className:"w-[1%]"})]})}),t.jsxs(Ft,{children:[v.map(p=>{const I=!!Q&&p.commitSha===Q;return t.jsxs(nt,{children:[t.jsx(Fe,{className:"pl-4",children:Xs(p.type,p.action,n)}),t.jsx(Fe,{children:Zs(p.outcome,n)}),t.jsx(Fe,{children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"font-mono text-xs",children:p.commitSha?.slice(0,7)??"—"}),I&&t.jsx(Re,{variant:"success",children:n("mainPanelTabs.hostingTab.live")})]})}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:zt(p.framework)??"—"}),t.jsx(Fe,{className:"text-xs text-muted-foreground",children:p.actor??"—"}),t.jsx(Fe,{className:"text-right text-xs text-muted-foreground",children:Gt(p.createdAt)}),t.jsx(Fe,{className:"pr-3 text-right",children:t.jsx(Xt,{commit:p.commitSha,onClick:()=>W(p.commitSha,p.env)})})]},p.id)}),B>0&&t.jsx(nt,{className:"hover:bg-transparent",children:t.jsx(Fe,{colSpan:7,className:"p-2 text-center",children:t.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>f(F.length),children:n("mainPanelTabs.hostingTab.showMoreHistory",{count:String(B)})})})})]})]}),e[9]=c,e[10]=s,e[11]=h,e[12]=d,e[13]=P.data,e[14]=P.error,e[15]=P.isLoading,e[16]=m,e[17]=n,e[18]=S,e[19]=y,e[20]=R,e[21]=w}else S=e[18],y=e[19],R=e[20],w=e[21];let j;e[38]!==S||e[39]!==y||e[40]!==R?(j=t.jsx(S,{title:y,children:R}),e[38]=S,e[39]=y,e[40]=R,e[41]=j):j=e[41];let T;e[42]===Symbol.for("react.memo_cache_sentinel")?(T=F=>{F||b(null)},e[42]=T):T=e[42];let V;e[43]!==o||e[44]!==u||e[45]!==a||e[46]!==l?(V=t.jsx(en,{base:o,orgSlug:a,site:l,target:u,onOpenChange:T}),e[43]=o,e[44]=u,e[45]=a,e[46]=l,e[47]=V):V=e[47];let q;return e[48]!==w||e[49]!==j||e[50]!==V?(q=t.jsxs(t.Fragment,{children:[w,j,V]}),e[48]=w,e[49]=j,e[50]=V,e[51]=q):q=e[51],q}function sn(r){return r.stopPropagation()}function nn(r){return r.production===!0&&r.up}function ln(r){return r.up===!0}const an=["16.148.147.194","52.32.122.94","52.35.156.199"];function on(r){return r.replace(/\.$/,"").split(".").filter(Boolean).length===2}function Zt(r){const e=r.trim();return e.length>0&&!e.startsWith("/")&&e.includes(".")}function ps(r){const e=ee.c(24),{records:o}=r,a=Ae();let l;e[0]!==a?(l=a("mainPanelTabs.hostingTab.dnsColType"),e[0]=a,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx(Me,{className:"w-16",children:l}),e[2]=l,e[3]=i):i=e[3];let c;e[4]!==a?(c=a("mainPanelTabs.hostingTab.dnsColName"),e[4]=a,e[5]=c):c=e[5];let m;e[6]!==c?(m=t.jsx(Me,{children:c}),e[6]=c,e[7]=m):m=e[7];let s;e[8]!==a?(s=a("mainPanelTabs.hostingTab.dnsColValue"),e[8]=a,e[9]=s):s=e[9];let n;e[10]!==s?(n=t.jsx(Me,{children:s}),e[10]=s,e[11]=n):n=e[11];let h;e[12]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Me,{className:"w-10"}),e[12]=h):h=e[12];let g;e[13]!==i||e[14]!==m||e[15]!==n?(g=t.jsx(Rt,{children:t.jsxs(nt,{children:[i,m,n,h]})}),e[13]=i,e[14]=m,e[15]=n,e[16]=g):g=e[16];let d;e[17]!==o?(d=o.map(rn),e[17]=o,e[18]=d):d=e[18];let f;e[19]!==d?(f=t.jsx(Ft,{children:d}),e[19]=d,e[20]=f):f=e[20];let u;return e[21]!==f||e[22]!==g?(u=t.jsxs(Et,{className:"table-fixed",children:[g,f]}),e[21]=f,e[22]=g,e[23]=u):u=e[23],u}function rn(r){return t.jsxs(nt,{children:[t.jsx(Fe,{className:"font-mono text-xs",children:r.type}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs",children:r.name}),t.jsx(Fe,{className:"break-all whitespace-normal font-mono text-xs text-muted-foreground",children:r.value}),t.jsx(Fe,{className:"text-right",children:t.jsx(Ks,{value:r.value})})]},`${r.type}-${r.name}-${r.value}`)}function Ts(r){const e=ee.c(14),{status:o,children:a}=r,l=Ae();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),e[0]=i):i=e[0];let c;e[1]!==l?(c=l("mainPanelTabs.hostingTab.dnsSetupTitle"),e[1]=l,e[2]=c):c=e[2];let m;e[3]!==c?(m=t.jsx("span",{className:"text-sm font-medium",children:c}),e[3]=c,e[4]=m):m=e[4];let s;e[5]!==o||e[6]!==l?(s=o&&t.jsx(Re,{variant:o.active?"success":"outline",className:"ml-auto",children:o.active?l("mainPanelTabs.hostingTab.dnsActive"):l("mainPanelTabs.hostingTab.dnsAwaiting")}),e[5]=o,e[6]=l,e[7]=s):s=e[7];let n;e[8]!==m||e[9]!==s?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[i,m,s]}),e[8]=m,e[9]=s,e[10]=n):n=e[10];let h;return e[11]!==a||e[12]!==n?(h=t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[n,a]}),e[11]=a,e[12]=n,e[13]=h):h=e[13],h}function es(r){const e=ee.c(21),{from:o,source:a}=r,l=Ae();let i,c,m,s,n;if(e[0]!==o||e[1]!==a||e[2]!==l){const d=o.trim().replace(/\.$/,""),f=d?on(d)?"@":d:"@",u=a==="both";c=Ts,e[8]!==u?(s={active:u},e[8]=u,e[9]=s):s=e[9];let b;e[10]!==u||e[11]!==l?(b=l(u?"mainPanelTabs.hostingTab.dnsActiveHint":"mainPanelTabs.hostingTab.dnsAwaitingHint"),e[10]=u,e[11]=l,e[12]=b):b=e[12],n=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[l("mainPanelTabs.hostingTab.dnsRedirectIntent",{from:d||"—"})," ",b]}),i=ps,m=an.map(x=>({type:"A",name:f,value:x})),e[0]=o,e[1]=a,e[2]=l,e[3]=i,e[4]=c,e[5]=m,e[6]=s,e[7]=n}else i=e[3],c=e[4],m=e[5],s=e[6],n=e[7];let h;e[13]!==i||e[14]!==m?(h=t.jsx(i,{records:m}),e[13]=i,e[14]=m,e[15]=h):h=e[15];let g;return e[16]!==c||e[17]!==s||e[18]!==n||e[19]!==h?(g=t.jsxs(c,{status:s,children:[n,h]}),e[16]=c,e[17]=s,e[18]=n,e[19]=h,e[20]=g):g=e[20],g}function ts(r){const e=ee.c(2),{records:o}=r;if(o.length===0)return null;let a;return e[0]!==o?(a=t.jsx(Ts,{children:t.jsx(ps,{records:o})}),e[0]=o,e[1]=a):a=e[1],a}function cn(r){const e=ee.c(16),{domain:o}=r,a=Ae(),l=o.status??"pending";let i;e[0]!==l||e[1]!==a?(i=a(l==="active"?"mainPanelTabs.hostingTab.statusActive":l==="action-required"?"mainPanelTabs.hostingTab.statusActionRequired":"mainPanelTabs.hostingTab.statusPending"),e[0]=l,e[1]=a,e[2]=i):i=e[2];const c=i;let m;e[3]!==o.detail||e[4]!==a?(m=o.detail==="zone-not-onboarded"?a("mainPanelTabs.hostingTab.detailZoneNotOnboarded"):void 0,e[3]=o.detail,e[4]=a,e[5]=m):m=e[5];const s=m,n=l==="active"?"success":l==="action-required"?"warning":"outline";let h;e[6]!==c||e[7]!==n?(h=t.jsx(Re,{variant:n,children:c}),e[6]=c,e[7]=n,e[8]=h):h=e[8];const g=h;if(!s)return g;let d;e[9]!==g?(d=t.jsx(ss,{asChild:!0,children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==s?(f=t.jsx(ns,{className:"max-w-xs",children:s}),e[11]=s,e[12]=f):f=e[12];let u;return e[13]!==d||e[14]!==f?(u=t.jsxs(is,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=u):u=e[15],u}function mn(r){const e=ee.c(121),{base:o,orgSlug:a,site:l,domains:i,dnsTemplate:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(null),[N,C]=Z.useState(null);let P;e[0]!==a||e[1]!==h||e[2]!==l?(P=()=>h.invalidateQueries({queryKey:Ye.hostingDomains(a,l)}),e[0]=a,e[1]=h,e[2]=l,e[3]=P):P=e[3];const S=P;let y;e[4]!==o?(y=$=>at(`${o}/domains`,"PUT",$),e[4]=o,e[5]=y):y=e[5];let R;e[6]!==S||e[7]!==n?(R=()=>{S(),Pe.success(n("mainPanelTabs.hostingTab.toastDomainSaved")),d(!1)},e[6]=S,e[7]=n,e[8]=R):R=e[8];let w;e[9]!==y||e[10]!==R?(w={mutationFn:y,onSuccess:R,onError:fn},e[9]=y,e[10]=R,e[11]=w):w=e[11];const j=lt(w);let T;e[12]!==o?(T=$=>at(`${o}/domains/${encodeURIComponent($)}`,"DELETE"),e[12]=o,e[13]=T):T=e[13];let V;e[14]!==S||e[15]!==n?(V=()=>{S(),Pe.success(n("mainPanelTabs.hostingTab.toastDomainDeleted")),x(null)},e[14]=S,e[15]=n,e[16]=V):V=e[16];let q;e[17]!==T||e[18]!==V?(q={mutationFn:T,onSuccess:V,onError:dn},e[17]=T,e[18]=V,e[19]=q):q=e[19];const F=lt(q);let v;e[20]!==f||e[21]!==j||e[22]!==n?(v=()=>{const $=f.trim().toLowerCase();if(!$){Pe.error(n("mainPanelTabs.hostingTab.errorDomainHostRequired"));return}j.mutate({host:$})},e[20]=f,e[21]=j,e[22]=n,e[23]=v):v=e[23];const B=v;let A;if(e[24]!==c||e[25]!==f){let $;e[27]!==f?($=ge=>({...ge,name:f.trim().toLowerCase()||ge.name}),e[27]=f,e[28]=$):$=e[28],A=c.map($),e[24]=c,e[25]=f,e[26]=A}else A=e[26];const Q=A;let _,W;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{u(""),d(!0)},W=t.jsx(Pt,{}),e[29]=_,e[30]=W):(_=e[29],W=e[30]);let J;e[31]!==n?(J=n("mainPanelTabs.hostingTab.addDomain"),e[31]=n,e[32]=J):J=e[32];let U;e[33]!==J?(U=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[W,J]}),e[33]=J,e[34]=U):U=e[34];const p=U;let I;e[35]!==n?(I=n("mainPanelTabs.hostingTab.domains"),e[35]=n,e[36]=I):I=e[36];const Y=i.length>0?p:void 0;let D;e[37]!==p||e[38]!==F.isPending||e[39]!==N||e[40]!==i||e[41]!==s||e[42]!==m||e[43]!==n?(D=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.domainsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(At,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noDomains"),className:"py-10",buttonComponent:p})}):t.jsx(Qe,{children:i.map(($,ge)=>{const Se=!$.canonical&&($.dns?.length??0)>0,Te=N===$.host;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Se?t.jsx(Qt,{open:Te,onClick:()=>C(Te?null:$.host)}):t.jsx(At,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:$.host}),$.canonical&&t.jsx(Re,{variant:"outline",children:n("mainPanelTabs.hostingTab.canonical")})]}),t.jsx(cn,{domain:$}),!$.canonical&&t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteDomain"),onClick:()=>x($.host),disabled:F.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]}),Se&&t.jsx(gs,{open:Te,children:t.jsx(ts,{records:$.dns??[]})})]},`${$.host}-${ge}`)})}),e[37]=p,e[38]=F.isPending,e[39]=N,e[40]=i,e[41]=s,e[42]=m,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==n?(G=n("mainPanelTabs.hostingTab.addDomainTitle"),e[45]=n,e[46]=G):G=e[46];let O;e[47]!==G?(O=t.jsx(yt,{children:t.jsx(St,{children:G})}),e[47]=G,e[48]=O):O=e[48];let k;e[49]!==B?(k=$=>{$.preventDefault(),B()},e[49]=B,e[50]=k):k=e[50];let E;e[51]!==n?(E=n("mainPanelTabs.hostingTab.colHost"),e[51]=n,e[52]=E):E=e[52];let H;e[53]!==E?(H=t.jsx(Xe,{htmlFor:"domain-host",children:E}),e[53]=E,e[54]=H):H=e[54];let X;e[55]!==n?(X=n("mainPanelTabs.hostingTab.domainHostPlaceholder"),e[55]=n,e[56]=X):X=e[56];let te;e[57]===Symbol.for("react.memo_cache_sentinel")?(te=$=>u($.target.value),e[57]=te):te=e[57];let K;e[58]!==f||e[59]!==j.isPending||e[60]!==X?(K=t.jsx(it,{id:"domain-host",placeholder:X,value:f,onChange:te,className:"font-mono text-xs",autoComplete:"off",disabled:j.isPending}),e[58]=f,e[59]=j.isPending,e[60]=X,e[61]=K):K=e[61];let se;e[62]!==H||e[63]!==K?(se=t.jsxs("div",{className:"flex flex-col gap-2",children:[H,K]}),e[62]=H,e[63]=K,e[64]=se):se=e[64];let ne;e[65]!==f||e[66]!==Q?(ne=f.trim()&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(ts,{records:Q})}),e[65]=f,e[66]=Q,e[67]=ne):ne=e[67];let je;e[68]===Symbol.for("react.memo_cache_sentinel")?(je=()=>d(!1),e[68]=je):je=e[68];const Ce=j.isPending;let re;e[69]!==n?(re=n("mainPanelTabs.hostingTab.cancel"),e[69]=n,e[70]=re):re=e[70];let be;e[71]!==j.isPending||e[72]!==re?(be=t.jsx(Ie,{variant:"outline",type:"button",onClick:je,disabled:Ce,children:re}),e[71]=j.isPending,e[72]=re,e[73]=be):be=e[73];let ie;e[74]!==f||e[75]!==j.isPending?(ie=j.isPending||!f.trim(),e[74]=f,e[75]=j.isPending,e[76]=ie):ie=e[76];let le;e[77]!==j.isPending||e[78]!==n?(le=j.isPending?n("mainPanelTabs.hostingTab.saving"):n("mainPanelTabs.hostingTab.save"),e[77]=j.isPending,e[78]=n,e[79]=le):le=e[79];let ce;e[80]!==ie||e[81]!==le?(ce=t.jsx(Ie,{type:"submit",disabled:ie,children:le}),e[80]=ie,e[81]=le,e[82]=ce):ce=e[82];let De;e[83]!==be||e[84]!==ce?(De=t.jsxs(Nt,{children:[be,ce]}),e[83]=be,e[84]=ce,e[85]=De):De=e[85];let me;e[86]!==k||e[87]!==se||e[88]!==ne||e[89]!==De?(me=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:k,children:[se,ne,De]}),e[86]=k,e[87]=se,e[88]=ne,e[89]=De,e[90]=me):me=e[90];let de;e[91]!==O||e[92]!==me?(de=t.jsxs(Ct,{className:"sm:max-w-md",children:[O,me]}),e[91]=O,e[92]=me,e[93]=de):de=e[93];let ae;e[94]!==g||e[95]!==de?(ae=t.jsx(Dt,{open:g,onOpenChange:d,children:de}),e[94]=g,e[95]=de,e[96]=ae):ae=e[96];const pe=b!=null;let fe;e[97]===Symbol.for("react.memo_cache_sentinel")?(fe=$=>{$||x(null)},e[97]=fe):fe=e[97];let ue;e[98]!==n?(ue=n("mainPanelTabs.hostingTab.confirmDeleteDomainTitle"),e[98]=n,e[99]=ue):ue=e[99];const ve=b??"";let ye;e[100]!==n||e[101]!==ve?(ye=n("mainPanelTabs.hostingTab.confirmDeleteDomainDescription",{host:ve}),e[100]=n,e[101]=ve,e[102]=ye):ye=e[102];let he;e[103]!==n?(he=n("mainPanelTabs.hostingTab.deleteDomain"),e[103]=n,e[104]=he):he=e[104];let oe;e[105]!==F||e[106]!==b?(oe=()=>{b&&F.mutate(b)},e[105]=F,e[106]=b,e[107]=oe):oe=e[107];let xe;e[108]!==F.isPending||e[109]!==pe||e[110]!==ue||e[111]!==ye||e[112]!==he||e[113]!==oe?(xe=t.jsx(wt,{open:pe,onOpenChange:fe,title:ue,description:ye,confirmLabel:he,pending:F.isPending,onConfirm:oe}),e[108]=F.isPending,e[109]=pe,e[110]=ue,e[111]=ye,e[112]=he,e[113]=oe,e[114]=xe):xe=e[114];let we;return e[115]!==I||e[116]!==Y||e[117]!==D||e[118]!==ae||e[119]!==xe?(we=t.jsxs(ut,{title:I,actions:Y,children:[D,ae,xe]}),e[115]=I,e[116]=Y,e[117]=D,e[118]=ae,e[119]=xe,e[120]=we):we=e[120],we}function dn(r){return Pe.error(rt(r))}function fn(r){return Pe.error(rt(r))}function un(r){const e=ee.c(24),{value:o,onChange:a,disabled:l,className:i}=r,c=Ae();let m;e[0]!==a?(m=N=>a(N==="build"?"build":"runtime"),e[0]=a,e[1]=m):m=e[1];let s;e[2]!==i?(s=xt("h-8",i),e[2]=i,e[3]=s):s=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ht,{}),e[4]=n):n=e[4];let h;e[5]!==s?(h=t.jsx(Ot,{className:s,children:n}),e[5]=s,e[6]=h):h=e[6];let g;e[7]!==c?(g=c("mainPanelTabs.hostingTab.secretScopeRuntime"),e[7]=c,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ft,{value:"runtime",children:g}),e[9]=g,e[10]=d):d=e[10];let f;e[11]!==c?(f=c("mainPanelTabs.hostingTab.secretScopeBuild"),e[11]=c,e[12]=f):f=e[12];let u;e[13]!==f?(u=t.jsx(ft,{value:"build",children:f}),e[13]=f,e[14]=u):u=e[14];let b;e[15]!==d||e[16]!==u?(b=t.jsxs(qt,{children:[d,u]}),e[15]=d,e[16]=u,e[17]=b):b=e[17];let x;return e[18]!==l||e[19]!==m||e[20]!==h||e[21]!==b||e[22]!==o?(x=t.jsxs(Mt,{value:o,onValueChange:m,disabled:l,children:[h,b]}),e[18]=l,e[19]=m,e[20]=h,e[21]=b,e[22]=o,e[23]=x):x=e[23],x}function hn(r){const e=ee.c(151),{base:o,orgSlug:a,site:l,envVars:i,codeVars:c,isLoading:m,error:s}=r,n=Ae(),h=bt(),[g,d]=Z.useState(!1),[f,u]=Z.useState(""),[b,x]=Z.useState(""),[N,C]=Z.useState("runtime"),[P,S]=Z.useState(null),[y,R]=Z.useState(""),[w,j]=Z.useState(null);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[V,q]=Z.useState(T);let F;e[1]===Symbol.for("react.memo_cache_sentinel")?(F=L=>{q(Ne=>{const We=new Set(Ne);return We.has(L)?We.delete(L):We.add(L),We})},e[1]=F):F=e[1];const v=F;let B;e[2]!==o?(B=L=>at(`${o}/env`,"PUT",{vars:L}),e[2]=o,e[3]=B):B=e[3];let A;e[4]!==a||e[5]!==h||e[6]!==l||e[7]!==n?(A=()=>{h.invalidateQueries({queryKey:Ye.hostingEnv(a,l)}),Pe.success(n("mainPanelTabs.hostingTab.toastEnvSaved"))},e[4]=a,e[5]=h,e[6]=l,e[7]=n,e[8]=A):A=e[8];let Q;e[9]!==B||e[10]!==A?(Q={mutationFn:B,onSuccess:A,onError:gn},e[9]=B,e[10]=A,e[11]=Q):Q=e[11];const _=lt(Q);let W;e[12]!==f||e[13]!==N||e[14]!==b||e[15]!==_||e[16]!==i||e[17]!==n?(W=()=>{const L=f.trim();if(!L){Pe.error(n("mainPanelTabs.hostingTab.errorEnvNameRequired"));return}if(i.some(Ne=>Lt(Ne,{name:L,scope:N}))){Pe.error(n("mainPanelTabs.hostingTab.errorEnvNameDuplicate"));return}_.mutate([...i,{name:L,value:b,scope:N}],{onSuccess:()=>{d(!1),u(""),x(""),C("runtime")}})},e[12]=f,e[13]=N,e[14]=b,e[15]=_,e[16]=i,e[17]=n,e[18]=W):W=e[18];const J=W;let U;e[19]!==y||e[20]!==_||e[21]!==i?(U=L=>{_.mutate(i.map(Ne=>Lt(Ne,L)?{name:L.name,value:y,scope:L.scope}:Ne),{onSuccess:()=>S(null)})},e[19]=y,e[20]=_,e[21]=i,e[22]=U):U=e[22];const p=U;let I;e[23]!==w||e[24]!==_||e[25]!==i?(I=()=>{w&&_.mutate(i.filter(L=>!Lt(L,w)),{onSuccess:()=>j(null)})},e[23]=w,e[24]=_,e[25]=i,e[26]=I):I=e[26];const Y=I,D=_.isPending;let G;e[27]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{u(""),x(""),C("runtime")},e[27]=G):G=e[27];const O=G;let k,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=()=>d(!0),E=t.jsx(Pt,{}),e[28]=k,e[29]=E):(k=e[28],E=e[29]);let H;e[30]!==n?(H=n("mainPanelTabs.hostingTab.addVariable"),e[30]=n,e[31]=H):H=e[31];let X;e[32]!==H?(X=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:k,children:[E,H]}),e[32]=H,e[33]=X):X=e[33];const te=X;let K;e[34]!==n?(K=n("mainPanelTabs.hostingTab.env"),e[34]=n,e[35]=K):K=e[35];const se=i.length>0||c.length>0?te:void 0;let ne;e[36]!==te||e[37]!==c||e[38]!==y||e[39]!==P?.name||e[40]!==P?.scope||e[41]!==i||e[42]!==s||e[43]!==p||e[44]!==m||e[45]!==D||e[46]!==V||e[47]!==n?(ne=m?t.jsx(ht,{}):s?t.jsx(Qe,{children:t.jsx(ot,{children:n("mainPanelTabs.hostingTab.envError")})}):i.length===0&&c.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Jt,{className:"size-5"}),title:n("mainPanelTabs.hostingTab.noEnv"),className:"py-10",buttonComponent:te})}):t.jsxs(Qe,{children:[i.map(L=>{const Ne=L.scope==="build"?"build":"runtime",We=`${L.name}:${Ne}`,tt=P?.name===L.name&&P?.scope===Ne,st=V.has(We);return t.jsxs(pt,{children:[t.jsxs("div",{className:"flex min-w-0 flex-1 basis-0 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(bs,{scope:Ne})}),t.jsx("span",{className:"truncate font-mono text-xs",children:L.name})]}),t.jsx("div",{className:"flex min-w-0 flex-1 basis-0 items-center justify-end gap-2",children:tt?t.jsxs(t.Fragment,{children:[t.jsx(it,{value:y,onChange:z=>R(z.target.value),onKeyDown:z=>{z.key==="Enter"&&p({name:L.name,scope:Ne}),z.key==="Escape"&&S(null)},autoFocus:!0,className:"h-8 font-mono text-xs"}),t.jsx(Ie,{size:"sm",onClick:()=>p({name:L.name,scope:Ne}),disabled:D,children:n("mainPanelTabs.hostingTab.save")}),t.jsx(Ie,{size:"sm",variant:"ghost",onClick:()=>S(null),disabled:D,children:n("mainPanelTabs.hostingTab.cancel")})]}):t.jsxs(t.Fragment,{children:[t.jsx(et,{label:n(st?"mainPanelTabs.hostingTab.hideValue":"mainPanelTabs.hostingTab.showValue"),onClick:()=>v(We),className:"text-muted-foreground",children:st?t.jsx(Hs,{}):t.jsx(Os,{})}),st?t.jsx("button",{type:"button",onClick:()=>{S({name:L.name,scope:Ne}),R(L.value)},title:n("mainPanelTabs.hostingTab.editValue"),className:"min-w-0 truncate rounded px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground hover:bg-muted hover:text-foreground",children:L.value||"—"}):t.jsx("span",{className:"min-w-0 truncate px-1.5 py-0.5 text-right font-mono text-xs text-muted-foreground/60",children:L.value?"••••••••••":"—"})]})}),t.jsx(et,{label:n("mainPanelTabs.hostingTab.deleteVariable"),onClick:()=>j({name:L.name,scope:Ne}),disabled:D,className:"text-muted-foreground",children:t.jsx(vt,{})})]},We)}),c.length>0&&t.jsxs(Bt,{children:[t.jsx(Bs,{asChild:!0,children:t.jsxs("button",{type:"button",className:"group flex w-full items-center gap-2 px-4 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/40",children:[t.jsx(hs,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"}),t.jsx(Jt,{className:"size-4"}),n("mainPanelTabs.hostingTab.codeVarsToggle",{count:String(c.length)})]})}),t.jsx(Vt,{children:t.jsx("div",{className:"divide-y divide-border/60 border-t border-border bg-muted/30",children:c.map(xn)})})]})]}),e[36]=te,e[37]=c,e[38]=y,e[39]=P?.name,e[40]=P?.scope,e[41]=i,e[42]=s,e[43]=p,e[44]=m,e[45]=D,e[46]=V,e[47]=n,e[48]=ne):ne=e[48];let je;e[49]===Symbol.for("react.memo_cache_sentinel")?(je=L=>{d(L),L||O()},e[49]=je):je=e[49];let Ce;e[50]!==n?(Ce=n("mainPanelTabs.hostingTab.addVariable"),e[50]=n,e[51]=Ce):Ce=e[51];let re;e[52]!==Ce?(re=t.jsx(yt,{children:t.jsx(St,{children:Ce})}),e[52]=Ce,e[53]=re):re=e[53];let be;e[54]!==J?(be=L=>{L.preventDefault(),J()},e[54]=J,e[55]=be):be=e[55];let ie;e[56]!==n?(ie=n("mainPanelTabs.hostingTab.colName"),e[56]=n,e[57]=ie):ie=e[57];let le;e[58]!==ie?(le=t.jsx(Xe,{htmlFor:"env-name",children:ie}),e[58]=ie,e[59]=le):le=e[59];let ce;e[60]!==n?(ce=n("mainPanelTabs.hostingTab.envNamePlaceholder"),e[60]=n,e[61]=ce):ce=e[61];let De;e[62]===Symbol.for("react.memo_cache_sentinel")?(De=L=>u(L.target.value),e[62]=De):De=e[62];let me;e[63]!==f||e[64]!==D||e[65]!==ce?(me=t.jsx(it,{id:"env-name",placeholder:ce,value:f,onChange:De,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[63]=f,e[64]=D,e[65]=ce,e[66]=me):me=e[66];let de;e[67]!==le||e[68]!==me?(de=t.jsxs("div",{className:"flex flex-col gap-2",children:[le,me]}),e[67]=le,e[68]=me,e[69]=de):de=e[69];let ae;e[70]!==n?(ae=n("mainPanelTabs.hostingTab.colValue"),e[70]=n,e[71]=ae):ae=e[71];let pe;e[72]!==ae?(pe=t.jsx(Xe,{htmlFor:"env-value",children:ae}),e[72]=ae,e[73]=pe):pe=e[73];let fe;e[74]!==n?(fe=n("mainPanelTabs.hostingTab.envValuePlaceholder"),e[74]=n,e[75]=fe):fe=e[75];let ue;e[76]===Symbol.for("react.memo_cache_sentinel")?(ue=L=>x(L.target.value),e[76]=ue):ue=e[76];let ve;e[77]!==b||e[78]!==D||e[79]!==fe?(ve=t.jsx(it,{id:"env-value",placeholder:fe,value:b,onChange:ue,className:"font-mono text-xs",autoComplete:"off",disabled:D}),e[77]=b,e[78]=D,e[79]=fe,e[80]=ve):ve=e[80];let ye;e[81]!==pe||e[82]!==ve?(ye=t.jsxs("div",{className:"flex flex-col gap-2",children:[pe,ve]}),e[81]=pe,e[82]=ve,e[83]=ye):ye=e[83];let he;e[84]!==n?(he=n("mainPanelTabs.hostingTab.secretScope"),e[84]=n,e[85]=he):he=e[85];let oe;e[86]!==he?(oe=t.jsx(Xe,{children:he}),e[86]=he,e[87]=oe):oe=e[87];let xe;e[88]!==N||e[89]!==D?(xe=t.jsx(un,{value:N,onChange:C,disabled:D,className:"w-full"}),e[88]=N,e[89]=D,e[90]=xe):xe=e[90];let we;e[91]!==N||e[92]!==n?(we=n(N==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[91]=N,e[92]=n,e[93]=we):we=e[93];let $;e[94]!==we?($=t.jsx("p",{className:"text-xs text-muted-foreground",children:we}),e[94]=we,e[95]=$):$=e[95];let ge;e[96]!==oe||e[97]!==xe||e[98]!==$?(ge=t.jsxs("div",{className:"flex flex-col gap-2",children:[oe,xe,$]}),e[96]=oe,e[97]=xe,e[98]=$,e[99]=ge):ge=e[99];let Se;e[100]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{d(!1),O()},e[100]=Se):Se=e[100];let Te;e[101]!==n?(Te=n("mainPanelTabs.hostingTab.cancel"),e[101]=n,e[102]=Te):Te=e[102];let $e;e[103]!==D||e[104]!==Te?($e=t.jsx(Ie,{variant:"outline",type:"button",onClick:Se,disabled:D,children:Te}),e[103]=D,e[104]=Te,e[105]=$e):$e=e[105];let ze;e[106]!==f||e[107]!==D?(ze=D||!f.trim(),e[106]=f,e[107]=D,e[108]=ze):ze=e[108];let Ke;e[109]!==D||e[110]!==n?(Ke=n(D?"mainPanelTabs.hostingTab.saving":"mainPanelTabs.hostingTab.add"),e[109]=D,e[110]=n,e[111]=Ke):Ke=e[111];let Le;e[112]!==ze||e[113]!==Ke?(Le=t.jsx(Ie,{type:"submit",disabled:ze,children:Ke}),e[112]=ze,e[113]=Ke,e[114]=Le):Le=e[114];let _e;e[115]!==$e||e[116]!==Le?(_e=t.jsxs(Nt,{children:[$e,Le]}),e[115]=$e,e[116]=Le,e[117]=_e):_e=e[117];let He;e[118]!==be||e[119]!==de||e[120]!==ye||e[121]!==ge||e[122]!==_e?(He=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:be,children:[de,ye,ge,_e]}),e[118]=be,e[119]=de,e[120]=ye,e[121]=ge,e[122]=_e,e[123]=He):He=e[123];let Ve;e[124]!==re||e[125]!==He?(Ve=t.jsxs(Ct,{className:"sm:max-w-md",children:[re,He]}),e[124]=re,e[125]=He,e[126]=Ve):Ve=e[126];let ke;e[127]!==g||e[128]!==Ve?(ke=t.jsx(Dt,{open:g,onOpenChange:je,children:Ve}),e[127]=g,e[128]=Ve,e[129]=ke):ke=e[129];const Je=w!=null;let Be;e[130]===Symbol.for("react.memo_cache_sentinel")?(Be=L=>{L||j(null)},e[130]=Be):Be=e[130];let Ee;e[131]!==n?(Ee=n("mainPanelTabs.hostingTab.confirmDeleteVariableTitle"),e[131]=n,e[132]=Ee):Ee=e[132];const Oe=w?.name??"";let qe;e[133]!==n||e[134]!==Oe?(qe=n("mainPanelTabs.hostingTab.confirmDeleteVariableDescription",{name:Oe}),e[133]=n,e[134]=Oe,e[135]=qe):qe=e[135];let Ue;e[136]!==n?(Ue=n("mainPanelTabs.hostingTab.deleteVariable"),e[136]=n,e[137]=Ue):Ue=e[137];let M;e[138]!==Y||e[139]!==D||e[140]!==Je||e[141]!==Ee||e[142]!==qe||e[143]!==Ue?(M=t.jsx(wt,{open:Je,onOpenChange:Be,title:Ee,description:qe,confirmLabel:Ue,pending:D,onConfirm:Y}),e[138]=Y,e[139]=D,e[140]=Je,e[141]=Ee,e[142]=qe,e[143]=Ue,e[144]=M):M=e[144];let Ge;return e[145]!==K||e[146]!==se||e[147]!==ne||e[148]!==ke||e[149]!==M?(Ge=t.jsxs(ut,{title:K,actions:se,children:[ne,ke,M]}),e[145]=K,e[146]=se,e[147]=ne,e[148]=ke,e[149]=M,e[150]=Ge):Ge=e[150],Ge}function xn(r){return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 font-mono text-xs",children:[t.jsx("span",{className:"flex-1 basis-0 truncate",children:r.name}),t.jsx("span",{className:"flex-1 basis-0 truncate text-right text-muted-foreground",children:r.value})]},r.name)}function gn(r){return Pe.error(rt(r))}function bn(r){const e=ee.c(6),{type:o}=r,a=Ae(),l=o==="permanent"?"secondary":"outline";let i;e[0]!==a||e[1]!==o?(i=a(o==="permanent"?"mainPanelTabs.hostingTab.permanent":"mainPanelTabs.hostingTab.temporary"),e[0]=a,e[1]=o,e[2]=i):i=e[2];let c;return e[3]!==l||e[4]!==i?(c=t.jsx(Re,{variant:l,children:i}),e[3]=l,e[4]=i,e[5]=c):c=e[5],c}function pn(r){const e=ee.c(163),{base:o,orgSlug:a,site:l,redirects:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(null),[u,b]=Z.useState(""),[x,N]=Z.useState(""),[C,P]=Z.useState("permanent"),[S,y]=Z.useState(null),[R,w]=Z.useState(null);let j;e[0]!==a||e[1]!==n||e[2]!==l?(j=()=>n.invalidateQueries({queryKey:Ye.hostingRedirects(a,l)}),e[0]=a,e[1]=n,e[2]=l,e[3]=j):j=e[3];const T=j;let V;e[4]!==o?(V=z=>at(`${o}/redirects`,"PUT",z),e[4]=o,e[5]=V):V=e[5];let q;e[6]!==T||e[7]!==s?(q=()=>{T(),Pe.success(s("mainPanelTabs.hostingTab.toastRedirectSaved")),g(!1)},e[6]=T,e[7]=s,e[8]=q):q=e[8];let F;e[9]!==V||e[10]!==q?(F={mutationFn:V,onSuccess:q,onError:jn},e[9]=V,e[10]=q,e[11]=F):F=e[11];const v=lt(F);let B;e[12]!==o?(B=z=>at(`${o}/redirects/${encodeURIComponent(z)}`,"DELETE"),e[12]=o,e[13]=B):B=e[13];let A;e[14]!==T||e[15]!==s?(A=()=>{T(),Pe.success(s("mainPanelTabs.hostingTab.toastRedirectDeleted")),y(null)},e[14]=T,e[15]=s,e[16]=A):A=e[16];let Q;e[17]!==B||e[18]!==A?(Q={mutationFn:B,onSuccess:A,onError:Tn},e[17]=B,e[18]=A,e[19]=Q):Q=e[19];const _=lt(Q);let W;e[20]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{f(null),b(""),N(""),P("permanent"),g(!0)},e[20]=W):W=e[20];const J=W;let U;e[21]===Symbol.for("react.memo_cache_sentinel")?(U=z=>{f(z.from),b(z.from),N(z.to),P(z.type==="temporary"?"temporary":"permanent"),g(!0)},e[21]=U):U=e[21];const p=U;let I;e[22]!==u||e[23]!==x||e[24]!==C||e[25]!==v||e[26]!==s?(I=()=>{const z=u.trim(),Tt=x.trim();if(!z||!Tt){Pe.error(s("mainPanelTabs.hostingTab.errorRedirectFieldsRequired"));return}v.mutate({from:z,to:Tt,type:C})},e[22]=u,e[23]=x,e[24]=C,e[25]=v,e[26]=s,e[27]=I):I=e[27];const Y=I;let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Pt,{}),e[28]=D):D=e[28];let G;e[29]!==s?(G=s("mainPanelTabs.hostingTab.addRedirect"),e[29]=s,e[30]=G):G=e[30];let O;e[31]!==G?(O=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:J,children:[D,G]}),e[31]=G,e[32]=O):O=e[32];const k=O;let E;e[33]!==s?(E=s("mainPanelTabs.hostingTab.redirects"),e[33]=s,e[34]=E):E=e[34];const H=i.length>0?k:void 0;let X;e[35]!==k||e[36]!==_.isPending||e[37]!==R||e[38]!==m||e[39]!==c||e[40]!==v.isPending||e[41]!==i||e[42]!==s?(X=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.redirectsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Yt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noRedirects"),className:"py-10",buttonComponent:k})}):t.jsx(Qe,{children:i.map((z,Tt)=>{const Ut=Zt(z.from),$t=R===z.from;return t.jsxs("div",{children:[t.jsxs(pt,{children:[Ut?t.jsx(Qt,{open:$t,onClick:()=>w($t?null:z.from)}):t.jsx(Yt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-xs",children:[t.jsx("span",{className:"truncate",children:z.from}),t.jsx(qs,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"truncate text-muted-foreground",children:z.to})]}),t.jsx(bn,{type:z.type}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.editRedirect"),onClick:()=>p(z),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(ks,{})}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteRedirect"),onClick:()=>y(z.from),disabled:_.isPending,className:"-ml-1 text-muted-foreground",children:t.jsx(vt,{})})]}),Ut&&t.jsx(gs,{open:$t,children:t.jsx(es,{from:z.from,source:z.source})})]},z.id??`${z.from}-${Tt}`)})}),e[35]=k,e[36]=_.isPending,e[37]=R,e[38]=m,e[39]=c,e[40]=v.isPending,e[41]=i,e[42]=s,e[43]=X):X=e[43];let te;e[44]!==d||e[45]!==s?(te=d!=null?s("mainPanelTabs.hostingTab.editRedirectTitle"):s("mainPanelTabs.hostingTab.addRedirectTitle"),e[44]=d,e[45]=s,e[46]=te):te=e[46];let K;e[47]!==te?(K=t.jsx(yt,{children:t.jsx(St,{children:te})}),e[47]=te,e[48]=K):K=e[48];let se;e[49]!==Y?(se=z=>{z.preventDefault(),Y()},e[49]=Y,e[50]=se):se=e[50];let ne;e[51]!==s?(ne=s("mainPanelTabs.hostingTab.colFrom"),e[51]=s,e[52]=ne):ne=e[52];let je;e[53]!==ne?(je=t.jsx(Xe,{htmlFor:"redirect-from",children:ne}),e[53]=ne,e[54]=je):je=e[54];let Ce;e[55]!==s?(Ce=s("mainPanelTabs.hostingTab.redirectFromPlaceholder"),e[55]=s,e[56]=Ce):Ce=e[56];let re;e[57]===Symbol.for("react.memo_cache_sentinel")?(re=z=>b(z.target.value),e[57]=re):re=e[57];const be=d!=null||v.isPending;let ie;e[58]!==u||e[59]!==Ce||e[60]!==be?(ie=t.jsx(it,{id:"redirect-from",placeholder:Ce,value:u,onChange:re,className:"font-mono text-xs",disabled:be}),e[58]=u,e[59]=Ce,e[60]=be,e[61]=ie):ie=e[61];let le;e[62]!==je||e[63]!==ie?(le=t.jsxs("div",{className:"flex flex-col gap-2",children:[je,ie]}),e[62]=je,e[63]=ie,e[64]=le):le=e[64];let ce;e[65]!==s?(ce=s("mainPanelTabs.hostingTab.colTo"),e[65]=s,e[66]=ce):ce=e[66];let De;e[67]!==ce?(De=t.jsx(Xe,{htmlFor:"redirect-to",children:ce}),e[67]=ce,e[68]=De):De=e[68];let me;e[69]!==s?(me=s("mainPanelTabs.hostingTab.redirectToPlaceholder"),e[69]=s,e[70]=me):me=e[70];let de;e[71]===Symbol.for("react.memo_cache_sentinel")?(de=z=>N(z.target.value),e[71]=de):de=e[71];let ae;e[72]!==x||e[73]!==v.isPending||e[74]!==me?(ae=t.jsx(it,{id:"redirect-to",placeholder:me,value:x,onChange:de,className:"font-mono text-xs",disabled:v.isPending}),e[72]=x,e[73]=v.isPending,e[74]=me,e[75]=ae):ae=e[75];let pe;e[76]!==De||e[77]!==ae?(pe=t.jsxs("div",{className:"flex flex-col gap-2",children:[De,ae]}),e[76]=De,e[77]=ae,e[78]=pe):pe=e[78];let fe;e[79]!==s?(fe=s("mainPanelTabs.hostingTab.colType"),e[79]=s,e[80]=fe):fe=e[80];let ue;e[81]!==fe?(ue=t.jsx(Xe,{children:fe}),e[81]=fe,e[82]=ue):ue=e[82];let ve;e[83]===Symbol.for("react.memo_cache_sentinel")?(ve=z=>P(z==="temporary"?"temporary":"permanent"),e[83]=ve):ve=e[83];const ye=v.isPending;let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Ot,{className:"w-full",children:t.jsx(Ht,{})}),e[84]=he):he=e[84];let oe;e[85]!==s?(oe=s("mainPanelTabs.hostingTab.permanent"),e[85]=s,e[86]=oe):oe=e[86];let xe;e[87]!==oe?(xe=t.jsx(ft,{value:"permanent",children:oe}),e[87]=oe,e[88]=xe):xe=e[88];let we;e[89]!==s?(we=s("mainPanelTabs.hostingTab.temporary"),e[89]=s,e[90]=we):we=e[90];let $;e[91]!==we?($=t.jsx(ft,{value:"temporary",children:we}),e[91]=we,e[92]=$):$=e[92];let ge;e[93]!==xe||e[94]!==$?(ge=t.jsxs(qt,{children:[xe,$]}),e[93]=xe,e[94]=$,e[95]=ge):ge=e[95];let Se;e[96]!==C||e[97]!==v.isPending||e[98]!==ge?(Se=t.jsxs(Mt,{value:C,onValueChange:ve,disabled:ye,children:[he,ge]}),e[96]=C,e[97]=v.isPending,e[98]=ge,e[99]=Se):Se=e[99];let Te;e[100]!==ue||e[101]!==Se?(Te=t.jsxs("div",{className:"flex flex-col gap-2",children:[ue,Se]}),e[100]=ue,e[101]=Se,e[102]=Te):Te=e[102];let $e;e[103]!==d||e[104]!==u||e[105]!==i?($e=Zt(u)&&t.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3",children:t.jsx(es,{from:u,source:i.find(z=>z.from===d)?.source})}),e[103]=d,e[104]=u,e[105]=i,e[106]=$e):$e=e[106];let ze;e[107]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>g(!1),e[107]=ze):ze=e[107];const Ke=v.isPending;let Le;e[108]!==s?(Le=s("mainPanelTabs.hostingTab.cancel"),e[108]=s,e[109]=Le):Le=e[109];let _e;e[110]!==v.isPending||e[111]!==Le?(_e=t.jsx(Ie,{variant:"outline",type:"button",onClick:ze,disabled:Ke,children:Le}),e[110]=v.isPending,e[111]=Le,e[112]=_e):_e=e[112];let He;e[113]!==u||e[114]!==x||e[115]!==v.isPending?(He=v.isPending||!u.trim()||!x.trim(),e[113]=u,e[114]=x,e[115]=v.isPending,e[116]=He):He=e[116];let Ve;e[117]!==v.isPending||e[118]!==s?(Ve=v.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.save"),e[117]=v.isPending,e[118]=s,e[119]=Ve):Ve=e[119];let ke;e[120]!==He||e[121]!==Ve?(ke=t.jsx(Ie,{type:"submit",disabled:He,children:Ve}),e[120]=He,e[121]=Ve,e[122]=ke):ke=e[122];let Je;e[123]!==_e||e[124]!==ke?(Je=t.jsxs(Nt,{children:[_e,ke]}),e[123]=_e,e[124]=ke,e[125]=Je):Je=e[125];let Be;e[126]!==se||e[127]!==le||e[128]!==pe||e[129]!==Te||e[130]!==$e||e[131]!==Je?(Be=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:se,children:[le,pe,Te,$e,Je]}),e[126]=se,e[127]=le,e[128]=pe,e[129]=Te,e[130]=$e,e[131]=Je,e[132]=Be):Be=e[132];let Ee;e[133]!==K||e[134]!==Be?(Ee=t.jsxs(Ct,{className:"sm:max-w-md",children:[K,Be]}),e[133]=K,e[134]=Be,e[135]=Ee):Ee=e[135];let Oe;e[136]!==h||e[137]!==Ee?(Oe=t.jsx(Dt,{open:h,onOpenChange:g,children:Ee}),e[136]=h,e[137]=Ee,e[138]=Oe):Oe=e[138];const qe=S!=null;let Ue;e[139]===Symbol.for("react.memo_cache_sentinel")?(Ue=z=>{z||y(null)},e[139]=Ue):Ue=e[139];let M;e[140]!==s?(M=s("mainPanelTabs.hostingTab.confirmDeleteRedirectTitle"),e[140]=s,e[141]=M):M=e[141];const Ge=S??"";let L;e[142]!==s||e[143]!==Ge?(L=s("mainPanelTabs.hostingTab.confirmDeleteRedirectDescription",{from:Ge}),e[142]=s,e[143]=Ge,e[144]=L):L=e[144];let Ne;e[145]!==s?(Ne=s("mainPanelTabs.hostingTab.deleteRedirect"),e[145]=s,e[146]=Ne):Ne=e[146];let We;e[147]!==_||e[148]!==S?(We=()=>{S&&_.mutate(S)},e[147]=_,e[148]=S,e[149]=We):We=e[149];let tt;e[150]!==_.isPending||e[151]!==qe||e[152]!==M||e[153]!==L||e[154]!==Ne||e[155]!==We?(tt=t.jsx(wt,{open:qe,onOpenChange:Ue,title:M,description:L,confirmLabel:Ne,pending:_.isPending,onConfirm:We}),e[150]=_.isPending,e[151]=qe,e[152]=M,e[153]=L,e[154]=Ne,e[155]=We,e[156]=tt):tt=e[156];let st;return e[157]!==E||e[158]!==H||e[159]!==X||e[160]!==Oe||e[161]!==tt?(st=t.jsxs(ut,{title:E,actions:H,children:[X,Oe,tt]}),e[157]=E,e[158]=H,e[159]=X,e[160]=Oe,e[161]=tt,e[162]=st):st=e[162],st}function Tn(r){return Pe.error(rt(r))}function jn(r){return Pe.error(rt(r))}function Pn(r){const e=ee.c(160),{base:o,orgSlug:a,site:l,secrets:i,isLoading:c,error:m}=r,s=Ae(),n=bt(),[h,g]=Z.useState(!1),[d,f]=Z.useState(""),[u,b]=Z.useState(""),[x,N]=Z.useState("runtime"),[C,P]=Z.useState(null);let S;e[0]!==a||e[1]!==n||e[2]!==l?(S=()=>n.invalidateQueries({queryKey:Ye.hostingSecrets(a,l)}),e[0]=a,e[1]=n,e[2]=l,e[3]=S):S=e[3];const y=S;let R;e[4]!==o?(R=M=>at(`${o}/secrets`,"PUT",M),e[4]=o,e[5]=R):R=e[5];let w;e[6]!==y||e[7]!==s?(w=()=>{y(),Pe.success(s("mainPanelTabs.hostingTab.toastSecretSaved")),g(!1),f(""),b(""),N("runtime")},e[6]=y,e[7]=s,e[8]=w):w=e[8];let j;e[9]!==R||e[10]!==w?(j={mutationFn:R,onSuccess:w,onError:yn},e[9]=R,e[10]=w,e[11]=j):j=e[11];const T=lt(j);let V;e[12]!==o?(V=M=>at(`${o}/secrets/${encodeURIComponent(M.name)}?scope=${M.scope}`,"DELETE"),e[12]=o,e[13]=V):V=e[13];let q;e[14]!==y||e[15]!==s?(q=()=>{y(),Pe.success(s("mainPanelTabs.hostingTab.toastSecretDeleted")),P(null)},e[14]=y,e[15]=s,e[16]=q):q=e[16];let F;e[17]!==V||e[18]!==q?(F={mutationFn:V,onSuccess:q,onError:vn},e[17]=V,e[18]=q,e[19]=F):F=e[19];const v=lt(F);let B;e[20]!==d||e[21]!==x||e[22]!==u||e[23]!==T||e[24]!==s?(B=()=>{const M=d.trim();if(!M){Pe.error(s("mainPanelTabs.hostingTab.errorSecretNameRequired"));return}if(!u){Pe.error(s("mainPanelTabs.hostingTab.errorSecretValueRequired"));return}T.mutate({name:M,value:u,scope:x})},e[20]=d,e[21]=x,e[22]=u,e[23]=T,e[24]=s,e[25]=B):B=e[25];const A=B;let Q,_;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=()=>g(!0),Q=t.jsx(Pt,{}),e[26]=Q,e[27]=_):(Q=e[26],_=e[27]);let W;e[28]!==s?(W=s("mainPanelTabs.hostingTab.addSecret"),e[28]=s,e[29]=W):W=e[29];let J;e[30]!==W?(J=t.jsxs(Ie,{size:"sm",variant:"outline",onClick:_,children:[Q,W]}),e[30]=W,e[31]=J):J=e[31];const U=J;let p;e[32]!==s?(p=s("mainPanelTabs.hostingTab.secrets"),e[32]=s,e[33]=p):p=e[33];const I=i.length>0?U:void 0;let Y;e[34]!==U||e[35]!==v.isPending||e[36]!==m||e[37]!==c||e[38]!==i||e[39]!==s?(Y=c?t.jsx(ht,{}):m?t.jsx(Qe,{children:t.jsx(ot,{children:s("mainPanelTabs.hostingTab.secretsError")})}):i.length===0?t.jsx(Qe,{children:t.jsx(Ze,{icon:t.jsx(Kt,{className:"size-5"}),title:s("mainPanelTabs.hostingTab.noSecrets"),className:"py-10",buttonComponent:U})}):t.jsx(Qe,{children:i.map(M=>{const Ge=M.scope==="build"?"build":"runtime";return t.jsxs(pt,{children:[t.jsx(Kt,{className:"size-4 shrink-0 text-muted-foreground/60"}),t.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("div",{className:"w-20 shrink-0",children:t.jsx(bs,{scope:Ge})}),t.jsx("span",{className:"truncate font-mono text-xs",children:M.name}),M.origin==="worker"&&t.jsx(Re,{variant:"secondary",children:s("mainPanelTabs.hostingTab.secretOnWorker")})]}),t.jsx("span",{className:"font-mono text-xs text-muted-foreground/60",children:s("mainPanelTabs.hostingTab.secretValueHidden")}),t.jsx(et,{label:s("mainPanelTabs.hostingTab.deleteSecret"),onClick:()=>P({name:M.name,scope:Ge}),disabled:v.isPending,className:"text-muted-foreground",children:t.jsx(vt,{})})]},`${M.name}:${Ge}`)})}),e[34]=U,e[35]=v.isPending,e[36]=m,e[37]=c,e[38]=i,e[39]=s,e[40]=Y):Y=e[40];let D;e[41]!==s?(D=s("mainPanelTabs.hostingTab.addSecretTitle"),e[41]=s,e[42]=D):D=e[42];let G;e[43]!==D?(G=t.jsx(yt,{children:t.jsx(St,{children:D})}),e[43]=D,e[44]=G):G=e[44];let O;e[45]!==A?(O=M=>{M.preventDefault(),A()},e[45]=A,e[46]=O):O=e[46];let k;e[47]!==s?(k=s("mainPanelTabs.hostingTab.colName"),e[47]=s,e[48]=k):k=e[48];let E;e[49]!==k?(E=t.jsx(Xe,{htmlFor:"secret-name",children:k}),e[49]=k,e[50]=E):E=e[50];let H;e[51]!==s?(H=s("mainPanelTabs.hostingTab.secretNamePlaceholder"),e[51]=s,e[52]=H):H=e[52];let X;e[53]===Symbol.for("react.memo_cache_sentinel")?(X=M=>f(M.target.value),e[53]=X):X=e[53];let te;e[54]!==d||e[55]!==T.isPending||e[56]!==H?(te=t.jsx(it,{id:"secret-name",placeholder:H,value:d,onChange:X,className:"font-mono text-xs",autoComplete:"off",disabled:T.isPending}),e[54]=d,e[55]=T.isPending,e[56]=H,e[57]=te):te=e[57];let K;e[58]!==E||e[59]!==te?(K=t.jsxs("div",{className:"flex flex-col gap-2",children:[E,te]}),e[58]=E,e[59]=te,e[60]=K):K=e[60];let se;e[61]!==s?(se=s("mainPanelTabs.hostingTab.colValue"),e[61]=s,e[62]=se):se=e[62];let ne;e[63]!==se?(ne=t.jsx(Xe,{htmlFor:"secret-value",children:se}),e[63]=se,e[64]=ne):ne=e[64];let je;e[65]!==s?(je=s("mainPanelTabs.hostingTab.secretValuePlaceholder"),e[65]=s,e[66]=je):je=e[66];let Ce;e[67]===Symbol.for("react.memo_cache_sentinel")?(Ce=M=>b(M.target.value),e[67]=Ce):Ce=e[67];let re;e[68]!==u||e[69]!==T.isPending||e[70]!==je?(re=t.jsx(it,{id:"secret-value",type:"password",placeholder:je,value:u,onChange:Ce,className:"font-mono text-xs",autoComplete:"new-password",disabled:T.isPending}),e[68]=u,e[69]=T.isPending,e[70]=je,e[71]=re):re=e[71];let be;e[72]!==ne||e[73]!==re?(be=t.jsxs("div",{className:"flex flex-col gap-2",children:[ne,re]}),e[72]=ne,e[73]=re,e[74]=be):be=e[74];let ie;e[75]!==s?(ie=s("mainPanelTabs.hostingTab.secretScope"),e[75]=s,e[76]=ie):ie=e[76];let le;e[77]!==ie?(le=t.jsx(Xe,{children:ie}),e[77]=ie,e[78]=le):le=e[78];let ce;e[79]===Symbol.for("react.memo_cache_sentinel")?(ce=M=>N(M==="build"?"build":"runtime"),e[79]=ce):ce=e[79];const De=T.isPending;let me;e[80]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(Ot,{className:"w-full",children:t.jsx(Ht,{})}),e[80]=me):me=e[80];let de;e[81]!==s?(de=s("mainPanelTabs.hostingTab.secretScopeRuntime"),e[81]=s,e[82]=de):de=e[82];let ae;e[83]!==de?(ae=t.jsx(ft,{value:"runtime",children:de}),e[83]=de,e[84]=ae):ae=e[84];let pe;e[85]!==s?(pe=s("mainPanelTabs.hostingTab.secretScopeBuild"),e[85]=s,e[86]=pe):pe=e[86];let fe;e[87]!==pe?(fe=t.jsx(ft,{value:"build",children:pe}),e[87]=pe,e[88]=fe):fe=e[88];let ue;e[89]!==ae||e[90]!==fe?(ue=t.jsxs(qt,{children:[ae,fe]}),e[89]=ae,e[90]=fe,e[91]=ue):ue=e[91];let ve;e[92]!==x||e[93]!==T.isPending||e[94]!==ue?(ve=t.jsxs(Mt,{value:x,onValueChange:ce,disabled:De,children:[me,ue]}),e[92]=x,e[93]=T.isPending,e[94]=ue,e[95]=ve):ve=e[95];let ye;e[96]!==x||e[97]!==s?(ye=s(x==="build"?"mainPanelTabs.hostingTab.secretScopeBuildHint":"mainPanelTabs.hostingTab.secretScopeRuntimeHint"),e[96]=x,e[97]=s,e[98]=ye):ye=e[98];let he;e[99]!==ye?(he=t.jsx("p",{className:"text-xs text-muted-foreground",children:ye}),e[99]=ye,e[100]=he):he=e[100];let oe;e[101]!==le||e[102]!==ve||e[103]!==he?(oe=t.jsxs("div",{className:"flex flex-col gap-2",children:[le,ve,he]}),e[101]=le,e[102]=ve,e[103]=he,e[104]=oe):oe=e[104];let xe;e[105]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>g(!1),e[105]=xe):xe=e[105];const we=T.isPending;let $;e[106]!==s?($=s("mainPanelTabs.hostingTab.cancel"),e[106]=s,e[107]=$):$=e[107];let ge;e[108]!==T.isPending||e[109]!==$?(ge=t.jsx(Ie,{variant:"outline",type:"button",onClick:xe,disabled:we,children:$}),e[108]=T.isPending,e[109]=$,e[110]=ge):ge=e[110];let Se;e[111]!==d||e[112]!==u||e[113]!==T.isPending?(Se=T.isPending||!d.trim()||!u,e[111]=d,e[112]=u,e[113]=T.isPending,e[114]=Se):Se=e[114];let Te;e[115]!==T.isPending||e[116]!==s?(Te=T.isPending?s("mainPanelTabs.hostingTab.saving"):s("mainPanelTabs.hostingTab.add"),e[115]=T.isPending,e[116]=s,e[117]=Te):Te=e[117];let $e;e[118]!==Se||e[119]!==Te?($e=t.jsx(Ie,{type:"submit",disabled:Se,children:Te}),e[118]=Se,e[119]=Te,e[120]=$e):$e=e[120];let ze;e[121]!==ge||e[122]!==$e?(ze=t.jsxs(Nt,{children:[ge,$e]}),e[121]=ge,e[122]=$e,e[123]=ze):ze=e[123];let Ke;e[124]!==O||e[125]!==K||e[126]!==be||e[127]!==oe||e[128]!==ze?(Ke=t.jsxs("form",{className:"flex flex-col gap-4",onSubmit:O,children:[K,be,oe,ze]}),e[124]=O,e[125]=K,e[126]=be,e[127]=oe,e[128]=ze,e[129]=Ke):Ke=e[129];let Le;e[130]!==G||e[131]!==Ke?(Le=t.jsxs(Ct,{className:"sm:max-w-md",children:[G,Ke]}),e[130]=G,e[131]=Ke,e[132]=Le):Le=e[132];let _e;e[133]!==h||e[134]!==Le?(_e=t.jsx(Dt,{open:h,onOpenChange:g,children:Le}),e[133]=h,e[134]=Le,e[135]=_e):_e=e[135];const He=C!=null;let Ve;e[136]===Symbol.for("react.memo_cache_sentinel")?(Ve=M=>{M||P(null)},e[136]=Ve):Ve=e[136];let ke;e[137]!==s?(ke=s("mainPanelTabs.hostingTab.confirmDeleteSecretTitle"),e[137]=s,e[138]=ke):ke=e[138];const Je=C?.name??"";let Be;e[139]!==s||e[140]!==Je?(Be=s("mainPanelTabs.hostingTab.confirmDeleteSecretDescription",{name:Je}),e[139]=s,e[140]=Je,e[141]=Be):Be=e[141];let Ee;e[142]!==s?(Ee=s("mainPanelTabs.hostingTab.deleteSecret"),e[142]=s,e[143]=Ee):Ee=e[143];let Oe;e[144]!==v||e[145]!==C?(Oe=()=>{C&&v.mutate(C)},e[144]=v,e[145]=C,e[146]=Oe):Oe=e[146];let qe;e[147]!==v.isPending||e[148]!==He||e[149]!==ke||e[150]!==Be||e[151]!==Ee||e[152]!==Oe?(qe=t.jsx(wt,{open:He,onOpenChange:Ve,title:ke,description:Be,confirmLabel:Ee,pending:v.isPending,onConfirm:Oe}),e[147]=v.isPending,e[148]=He,e[149]=ke,e[150]=Be,e[151]=Ee,e[152]=Oe,e[153]=qe):qe=e[153];let Ue;return e[154]!==p||e[155]!==I||e[156]!==Y||e[157]!==_e||e[158]!==qe?(Ue=t.jsxs(ut,{title:p,actions:I,children:[Y,_e,qe]}),e[154]=p,e[155]=I,e[156]=Y,e[157]=_e,e[158]=qe,e[159]=Ue):Ue=e[159],Ue}function vn(r){return Pe.error(rt(r))}function yn(r){return Pe.error(rt(r))}const Sn=3e4;function Ll(r){const e=ee.c(111),{virtualMcpId:o}=r,a=Ae(),{org:l}=Cs(),i=Es(o),c=Rs(i),m=!!c,s=c?`/api/${l.slug}/hosting/${encodeURIComponent(c)}`:"";let n;e[0]!==s||e[1]!==m?(n=(O,k)=>({queryKey:O,queryFn:()=>It(`${s}${k}`),enabled:m,retry:!1,staleTime:Sn}),e[0]=s,e[1]=m,e[2]=n):n=e[2];const h=n,g=c??"",d=ct(h(Ye.hostingDeployments(l.slug,g),"/deployments")),f=ct(h(Ye.hostingEnv(l.slug,g),"/env")),u=ct(h(Ye.hostingSecrets(l.slug,g),"/secrets")),b=ct(h(Ye.hostingRedirects(l.slug,g),"/redirects")),x=ct(h(Ye.hostingDomains(l.slug,g),"/domains"));if(!c){let O;e[3]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[3]=O):O=e[3];let k;e[4]!==a?(k=a("mainPanelTabs.hostingTab.noSiteTitle"),e[4]=a,e[5]=k):k=e[5];let E;e[6]!==a?(E=a("mainPanelTabs.hostingTab.noSiteDescription"),e[6]=a,e[7]=E):E=e[7];let H;return e[8]!==k||e[9]!==E?(H=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[8]=k,e[9]=E,e[10]=H):H=e[10],H}if(jt(d.error)&&jt(f.error)&&jt(b.error)){let O;e[11]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(kt,{className:"size-5"}),e[11]=O):O=e[11];let k;e[12]!==a?(k=a("mainPanelTabs.hostingTab.notConnectedTitle"),e[12]=a,e[13]=k):k=e[13];let E;e[14]!==a?(E=a("mainPanelTabs.hostingTab.notConnectedDescription"),e[14]=a,e[15]=E):E=e[15];let H;return e[16]!==k||e[17]!==E?(H=t.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:t.jsx(Ze,{icon:O,title:k,description:E})}),e[16]=k,e[17]=E,e[18]=H):H=e[18],H}let C,P,S,y,R,w,j,T,V,q;if(e[19]!==d.data||e[20]!==x.data||e[21]!==f.data||e[22]!==b.data||e[23]!==u.data){P=mt(d.data,"items");let O;e[34]!==f.data?(O=mt(f.data,"vars"),e[34]=f.data,e[35]=O):O=e[35],R=O;let k;e[36]!==f.data?(k=mt(f.data,"codeVars"),e[36]=f.data,e[37]=k):k=e[37],C=k;let E;e[38]!==u.data?(E=mt(u.data,"secrets"),e[38]=u.data,e[39]=E):E=e[39],V=E;let H;e[40]!==b.data?(H=mt(b.data,"items"),e[40]=b.data,e[41]=H):H=e[41],T=H;const X=x.data;let te;e[42]!==X?.items?(te=X?.items??[],e[42]=X?.items,e[43]=te):te=e[43],y=te;let K;e[44]!==X?.dnsTemplate?(K=X?.dnsTemplate??[],e[44]=X?.dnsTemplate,e[45]=K):K=e[45],S=K;const se=P.find(Cn);w=zt((se??P.find(Nn))?.framework),j=se?.servingUrl??null,q=j?j.replace(/^https?:\/\//,"").replace(/\/$/,""):null,e[19]=d.data,e[20]=x.data,e[21]=f.data,e[22]=b.data,e[23]=u.data,e[24]=C,e[25]=P,e[26]=S,e[27]=y,e[28]=R,e[29]=w,e[30]=j,e[31]=T,e[32]=V,e[33]=q}else C=e[24],P=e[25],S=e[26],y=e[27],R=e[28],w=e[29],j=e[30],T=e[31],V=e[32],q=e[33];const F=q;let v;e[46]!==s||e[47]!==l.slug||e[48]!==c?(v=t.jsx(Js,{base:s,orgSlug:l.slug,site:c}),e[46]=s,e[47]=l.slug,e[48]=c,e[49]=v):v=e[49];let B;e[50]!==a?(B=a("mainPanelTabs.hostingTab.title"),e[50]=a,e[51]=B):B=e[51];let A;e[52]!==w?(A=w&&t.jsx(Re,{variant:"secondary",children:w}),e[52]=w,e[53]=A):A=e[53];let Q;e[54]!==B||e[55]!==A?(Q=t.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[B,A]}),e[54]=B,e[55]=A,e[56]=Q):Q=e[56];let _;e[57]!==v||e[58]!==Q?(_=t.jsx(Wt.Title,{actions:v,children:Q}),e[57]=v,e[58]=Q,e[59]=_):_=e[59];let W;e[60]!==F||e[61]!==j?(W=j&&F&&t.jsx("p",{className:"flex flex-wrap items-center gap-x-1.5 text-sm text-muted-foreground",children:t.jsxs("a",{href:j,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 font-mono text-xs text-foreground hover:underline",children:[F,t.jsx(_t,{className:"size-3"})]})}),e[60]=F,e[61]=j,e[62]=W):W=e[62];let J;e[63]!==_||e[64]!==W?(J=t.jsxs("div",{className:"flex flex-col gap-2",children:[_,W]}),e[63]=_,e[64]=W,e[65]=J):J=e[65];let U;e[66]!==s||e[67]!==P||e[68]!==d.error||e[69]!==d.isLoading||e[70]!==m||e[71]!==l.slug||e[72]!==c?(U=t.jsx(tn,{base:s,orgSlug:l.slug,site:c,enabled:m,deployments:P,isLoading:d.isLoading,error:d.error}),e[66]=s,e[67]=P,e[68]=d.error,e[69]=d.isLoading,e[70]=m,e[71]=l.slug,e[72]=c,e[73]=U):U=e[73];let p;e[74]!==s||e[75]!==C||e[76]!==f.error||e[77]!==f.isLoading||e[78]!==R||e[79]!==l.slug||e[80]!==c?(p=t.jsx(hn,{base:s,orgSlug:l.slug,site:c,envVars:R,codeVars:C,isLoading:f.isLoading,error:f.error}),e[74]=s,e[75]=C,e[76]=f.error,e[77]=f.isLoading,e[78]=R,e[79]=l.slug,e[80]=c,e[81]=p):p=e[81];let I;e[82]!==s||e[83]!==l.slug||e[84]!==V||e[85]!==u.error||e[86]!==u.isLoading||e[87]!==c?(I=t.jsx(Pn,{base:s,orgSlug:l.slug,site:c,secrets:V,isLoading:u.isLoading,error:u.error}),e[82]=s,e[83]=l.slug,e[84]=V,e[85]=u.error,e[86]=u.isLoading,e[87]=c,e[88]=I):I=e[88];let Y;e[89]!==s||e[90]!==S||e[91]!==y||e[92]!==x.error||e[93]!==x.isLoading||e[94]!==l.slug||e[95]!==c?(Y=t.jsx(mn,{base:s,orgSlug:l.slug,site:c,domains:y,dnsTemplate:S,isLoading:x.isLoading,error:x.error}),e[89]=s,e[90]=S,e[91]=y,e[92]=x.error,e[93]=x.isLoading,e[94]=l.slug,e[95]=c,e[96]=Y):Y=e[96];let D;e[97]!==s||e[98]!==l.slug||e[99]!==T||e[100]!==b.error||e[101]!==b.isLoading||e[102]!==c?(D=t.jsx(pn,{base:s,orgSlug:l.slug,site:c,redirects:T,isLoading:b.isLoading,error:b.error}),e[97]=s,e[98]=l.slug,e[99]=T,e[100]=b.error,e[101]=b.isLoading,e[102]=c,e[103]=D):D=e[103];let G;return e[104]!==U||e[105]!==p||e[106]!==I||e[107]!==Y||e[108]!==D||e[109]!==J?(G=t.jsx("div",{className:"h-full min-h-0 overflow-y-auto",children:t.jsx(Wt.Body,{maxWidth:"max-w-5xl",children:t.jsxs(Ds,{children:[J,U,p,I,Y,D]})})}),e[104]=U,e[105]=p,e[106]=I,e[107]=Y,e[108]=D,e[109]=J,e[110]=G):G=e[110],G}function Nn(r){return r.framework}function Cn(r){return r.up===!0}export{Ll as HostingTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,d as U,G as N,b as w,M as k,j as o,B as R,r as y,E as P,X as z,x as F,K as L,e as O,o as _,J as A,u as B,Y,O as H}from"./index-CHLYwzdG.js";import{C as K,p as j,s as G,a as V,n as W}from"./self-tool-result-ChgZQIgo.js";import{f as Q,d as $,D as q,g as J}from"./dialog-2jttB-KX.js";import{c as X,C as Z,a as ee}from"./connect-layout-DkREAgO0.js";import{W as T,u as te,S as oe}from"./use-mcp-client-CCmZ7t4L.js";import{i as D}from"./ArrowRight-NtiFMpcp.js";import{u as re}from"./use-organization-settings-Dldl-Pq-.js";import{a as ie}from"./index-P2ZyWnSg.js";import{C as ne}from"./chat-context-DWo9Tu9r.js";import{T as ae}from"./hooks-BwLEGt_X.js";import{T as S}from"./toolbar-VpBkau6a.js";import{S as se,M as me}from"./shell-controls-Yk8ROsty.js";import"./integration-icon-BxN3_HAp.js";import"./Tool02-CHwib-_Q.js";import"./agent-icon-DTmpIuMC.js";import"./AlertCircle-CdtdSQig.js";import"./Tool01-CNf-_No9.js";import"./ArrowUp-DGC5Ysun.js";import"./ArrowLeft-dqbBqIhW.js";import"./TrendUp01-hJGiREai.js";import"./ZoomOut-LBFAX-2d.js";import"./Users03-CW2csHHv.js";import"./CheckCircle-9ZidWDkT.js";import"./Check-BNS9txQN.js";import"./ChevronUp-Bn_2AScF.js";import"./ChevronRight-C30dh3Q9.js";import"./ChevronSelectorVertical-DUpFY0CP.js";import"./DotsVertical-DYacfr5R.js";import"./UserSquare-B7dos4Q0.js";import"./Copy01-BeDMVNpZ.js";import"./CreditCard01-Bcjbvush.js";import"./Download01-C8nV35i3.js";import"./Settings02-CfZasyPL.js";import"./Eye-mJ7L05mA.js";import"./Share07-FqMjFNzn.js";import"./GitBranch01-C4bNuLp7.js";import"./Globe01-DdZU4lRb.js";import"./XClose-CW7Aosm2.js";import"./HardDrive-CQCLSLgd.js";import"./Image01-whwxbNfN.js";import"./Key01-CHvc20yr.js";import"./Link01-G-sA1km9.js";import"./LinkExternal01-CYc-bJpZ.js";import"./Monitor01-BwrTu8m8.js";import"./Sun-DG9wzk9T.js";import"./Package-C0Uo1zbM.js";import"./Palette-BTAlw5uu.js";import"./Play-B1ibbngi.js";import"./Plus-xsC4rta_.js";import"./SearchLg-Dh00DEpq.js";import"./SearchMd-DTNbT_Jp.js";import"./Shield01-DS94z539.js";import"./Stars01-DGM_bOpf.js";import"./Trash01-nvYAyX_8.js";import"./Upload01-ChJHhip5.js";import"./User01-j821_8QG.js";import"./Users01-f_U-E4Da.js";import"./XCircle-ByT94gBW.js";import"./Zap-iz6Sr9Zm.js";import"./extract-connection-data-D45FORRs.js";import"./metadata-dUsYcpuu.js";import"./connection-D8oXR41O.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./form-_gWD2rxP.js";import"./label-B6W74l06.js";import"./input-Bor7FWk2.js";import"./use-debounced-value-BmzqxGnl.js";import"./authenticate-and-persist-oauth-B97IaQ9E.js";import"./mcp-oauth-rC9izRug.js";import"./auth-DH4v3z1c.js";import"./track-ChYYFRhp.js";import"./use-destination-route-BSU254-h.js";import"./schema-BrEmHGLr.js";import"./task-board-aCYQtoga.js";import"./project-icon-BieGWeu1.js";import"./use-virtual-mcp-CfTUcpNe.js";import"./github-repo-CTPv5ZM2.js";import"./thread-route-BuRmXun_.js";import"./settings-sidebar-DJFDnnMa.js";import"./toolbar-icon-button-15hNFUlh.js";import"./command-BPI8gOmi.js";import"./index-B_9W4UXC.js";import"./drawer-BdyJoaFA.js";import"./popover-CoyhS0Zo.js";import"./create-organization-dialog-CPAuu521.js";import"./alert-dialog-BsPnDtVm.js";import"./use-join-requests-DVxxmABR.js";import"./avatar-CPNsUn9l.js";import"./use-deployment-admin--N8AMVb-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./invite-member-dialog-BYNS-LSy.js";import"./select-2RQKSODd.js";import"./textarea-C5O0_rRN.js";import"./use-org-auth-client-DHKkMhcn.js";import"./use-organization-roles-DUesIcFs.js";import"./task-route-DafPgVKd.js";import"./collection-search-CmxVMMgl.js";import"./connection-card-KMjZdOwe.js";import"./use-registry-connections-C0tR05he.js";import"./use-connection-BBjM12PF.js";import"./useInfiniteQuery-DyKaW5JA.js";import"./infiniteQueryObserver-BrVIUj-a.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./connection-form-helpers-BqsPs5qs.js";import"./collection-tabs-Divxg_x2.js";import"./badge-C2WoE480.js";import"./use-infinite-scroll-1Y4RVvWH.js";import"./useSuspenseInfiniteQuery-DTuMq-q_.js";import"./use-ai-providers-Cic7h6cJ.js";import"./use-file-configs-BpTE3t3p.js";import"./site-slug-uya6Wp4-.js";import"./decopilot-sse-pool-Cyfcjtz2.js";import"./use-decopilot-events--QY-N8k8.js";import"./dropdown-menu-C1fYSQGV.js";import"./github-icon-Cgt9rZs9.js";import"./get-initials-D-f_fDFw.js";import"./scroll-area-DNJBSl34.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-navigate-to-agent-cyr-J7xg.js";import"./thread-intent-BkrM66z0.js";import"./use-panel-navigate-WbWvHgOj.js";import"./source-system-tabs-CnEGUb4r.js";import"./autosend-D5361h5J.js";import"./location-oTTXFrSF.js";function le(t){const e=E.c(21),{siteUrl:c}=t,n=U(),{org:u}=N(),a=w();let h;e[0]!==n||e[1]!==u?(h=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=X(u,T.COMMERCE_DISCOVERY(u.id));n({...x,search:{...x.search,sidepanel:!1}})},e[0]=n,e[1]=u,e[2]=h):h=e[2];const p=h;let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Q,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=C):C=e[3];let s;e[4]!==a?(s=a("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=a,e[5]=s):s=e[5];let r;e[6]!==s?(r=o.jsx($,{className:"sr-only",children:s}),e[6]=s,e[7]=r):r=e[7];let m;e[8]!==p||e[9]!==a?(m=()=>o.jsxs("div",{className:"grid gap-4 p-6",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:a("routes.commerceOnboarding.connectModal.loadError")}),o.jsxs(R,{type:"button",size:"xl",className:"w-full",onClick:p,children:[a("routes.commerceOnboarding.connectModal.continueButton"),o.jsx(D,{size:18})]})]}),e[8]=p,e[9]=a,e[10]=m):m=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(K,{}),e[11]=d):d=e[11];let i;e[12]!==p||e[13]!==c?(i=o.jsx(y.Suspense,{fallback:d,children:o.jsx(ue,{siteUrlFromUrl:c,onComplete:p})}),e[12]=p,e[13]=c,e[14]=i):i=e[14];let l;e[15]!==m||e[16]!==i?(l=o.jsx(P,{fallback:m,children:i}),e[15]=m,e[16]=i,e[17]=l):l=e[17];let b;return e[18]!==r||e[19]!==l?(b=o.jsx(q,{open:!0,children:o.jsxs(J,{children:[C,o.jsxs(z,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:de,onPointerDownOutside:pe,onInteractOutside:ce,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[r,l]})]})}),e[18]=r,e[19]=l,e[20]=b):b=e[20],b}function ce(t){return t.preventDefault()}function pe(t){return t.preventDefault()}function de(t){return t.preventDefault()}function ue({siteUrlFromUrl:t,onComplete:e}){const c=w(),{org:n}=N(),u=T.COMMERCE_DISCOVERY(n.id),a=te({connectionId:oe,orgId:n.id,orgSlug:n.slug}),p=F({queryKey:L.commerceDiscoveryConnection(n.id,u),queryFn:async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:u}});return j(f)},retry:!1}).data.item,C=typeof p?.metadata?.siteUrl=="string"?p.metadata.siteUrl:void 0,s=t||C,r=G(s),[m,d]=y.useState(!0),[i,l]=y.useState(null),b=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}})),retry:!1}),x=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:f}})),retry:!1}),v=async()=>{l(null),_("commerce_onboarding_open_report_clicked",{domain:r??void 0,organization_id:n.id});const f=s?W(s):null;if(f?.ok)try{let g=await x.mutateAsync(f.value);if(g.triggered||(_("commerce_onboarding_run_reclaim",{domain:r??void 0,organization_id:n.id,reason:g.reason??"not_upgraded"}),await b.mutateAsync(f.value),g=await x.mutateAsync(f.value)),!g.triggered){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g.reason??"not_triggered"}),l(c("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g instanceof Error?g.message:String(g)}),l(c("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},I=re("demo_mode"),M=m||I;return o.jsx(Z,{siteHost:r,footer:o.jsxs(o.Fragment,{children:[i?o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}):null,o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(ee,{ready:M,pending:x.isPending,label:x.isPending?c("routes.commerceOnboarding.connectModal.openingReport"):c("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{v()},children:o.jsx(D,{size:18})})}),M?null:o.jsx(R,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{v()},children:c("routes.commerceOnboarding.connectModal.skip")})]})]}),children:o.jsx(V,{org:n,cdConnectionId:u,siteUrl:s,onReadinessChange:d})})}function zo(){const t=E.c(14),e=A();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const{connect:n,siteUrl:u}=B(c),a=n==="1",h=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(S.Header,{className:"grid-cols-1 px-1",children:o.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[o.jsx(se,{}),o.jsx(S.TogglesSlot,{}),o.jsx(S.TabsSlot,{className:"shrink-0"}),o.jsx(S.CenterSlot,{}),o.jsx(S.RightSlot,{})]})}),t[1]=p):p=t[1];const s=h&&p;let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(Y,{children:o.jsx(H,{})})}),t[2]=r):r=t[2];let m;t[3]!==s?(m=o.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s,r]}),t[3]=s,t[4]=m):m=t[4];let d;t[5]!==e?(d=e&&o.jsx(me,{renderSidebar:fe}),t[5]=e,t[6]=d):d=t[6];let i;t[7]!==u||t[8]!==a?(i=a&&o.jsx(le,{siteUrl:u}),t[7]=u,t[8]=a,t[9]=i):i=t[9];let l;return t[10]!==m||t[11]!==d||t[12]!==i?(l=o.jsx(ae,{children:o.jsx(S.Provider,{children:o.jsxs(ne,{children:[m,d,i]})})}),t[10]=m,t[11]=d,t[12]=i,t[13]=l):l=t[13],l}function fe(t){const{onClose:e}=t;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(ie,{onClose:e})})})}export{zo as default};
|
|
1
|
+
import{c as E,d as U,G as N,b as w,M as k,j as o,B as R,r as y,E as P,X as z,x as F,K as L,e as O,o as _,J as A,u as B,Y,O as H}from"./index-VAoEJtvI.js";import{C as K,p as j,s as G,a as V,n as W}from"./self-tool-result-6tlPGqoR.js";import{f as Q,d as $,D as q,g as J}from"./dialog-Ukm5OPV3.js";import{c as X,C as Z,a as ee}from"./connect-layout-CeFJG4VK.js";import{W as T,u as te,S as oe}from"./use-mcp-client-Co9Owf2L.js";import{i as D}from"./ArrowRight-Br4r7pwg.js";import{u as re}from"./use-organization-settings-BpamzdT-.js";import{a as ie}from"./index-CbVbTbTk.js";import{C as ne}from"./chat-context-Clr-423u.js";import{T as ae}from"./hooks-DtmH-v5J.js";import{T as S}from"./toolbar-DmNHpECu.js";import{S as se,M as me}from"./shell-controls-CzCZ2tY8.js";import"./integration-icon-BtFJcxte.js";import"./Tool02-BB0DnTeE.js";import"./agent-icon-DLDeYH2t.js";import"./AlertCircle-DeXfw3DH.js";import"./Tool01-36BH9Lfu.js";import"./ArrowUp-eSS406es.js";import"./ArrowLeft-BsRBcR7k.js";import"./TrendUp01-CV5BO_Jc.js";import"./ZoomOut-CoETMI1M.js";import"./Users03-BSbySSqf.js";import"./CheckCircle-DQQm8ch4.js";import"./Check-BBi_O2LB.js";import"./ChevronUp-DSVxpGju.js";import"./ChevronRight-B22Moez_.js";import"./ChevronSelectorVertical-DRZ4gkV3.js";import"./DotsVertical-CIP9Nl0k.js";import"./UserSquare-Brq8ZOAk.js";import"./Copy01-Cc8n0Ba4.js";import"./CreditCard01-Cv5ITpta.js";import"./Download01-BMiKF4vk.js";import"./Settings02-BgDAmtwC.js";import"./Eye-BoL3xwzV.js";import"./Share07-cIietouI.js";import"./GitBranch01-CoEwe3ey.js";import"./Globe01-D_tKhOLC.js";import"./XClose-DHKiEI8G.js";import"./HardDrive-CeTPrLdV.js";import"./Image01-D2YbNIYT.js";import"./Key01-DKCA1Tnq.js";import"./Link01-DQ70lFlQ.js";import"./LinkExternal01-B8GzK7ER.js";import"./Monitor01-Yeg984fl.js";import"./Sun-Bj1wxgQu.js";import"./Package-CxCTcL6L.js";import"./Palette-ajTtDJW6.js";import"./Play-0ktNAbPi.js";import"./Plus-C0NWoh9T.js";import"./SearchLg-BgA05EHK.js";import"./SearchMd-oWTKVUjk.js";import"./Shield01-DJKVjmYu.js";import"./Stars01-BtEjDnlJ.js";import"./Trash01-BZPG63MT.js";import"./Upload01-DP0vQQKt.js";import"./User01-xnVK2xE4.js";import"./Users01-DKKqtuHP.js";import"./XCircle-BUI7KQFj.js";import"./Zap-DjgdzPMR.js";import"./extract-connection-data-CsuagmF_.js";import"./metadata-dUsYcpuu.js";import"./connection-Dmw4Hb04.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./form-Dmuwki82.js";import"./label-phMabfYY.js";import"./input-DV0zc4Ex.js";import"./use-debounced-value-C-4GeZ6O.js";import"./authenticate-and-persist-oauth-C_0G8We7.js";import"./mcp-oauth-HGr7KetU.js";import"./auth-4merKc2Y.js";import"./track-CE6253fG.js";import"./use-destination-route-B7okMERa.js";import"./schema-DWDPSE-2.js";import"./task-board-CW6cAmRQ.js";import"./project-icon-CB1uAMSA.js";import"./use-virtual-mcp-BYJtzivW.js";import"./github-repo-CTPv5ZM2.js";import"./thread-route-D9lc5X5V.js";import"./settings-sidebar-CRSQB9ZK.js";import"./toolbar-icon-button-Uv1zXo6T.js";import"./command-CBtKGmqK.js";import"./index-DXamwEeh.js";import"./drawer-PQWkdkQv.js";import"./popover-BOH_aFJY.js";import"./create-organization-dialog-WxIvOpxq.js";import"./alert-dialog-WdxFSf6L.js";import"./use-join-requests-BGvlF7wG.js";import"./avatar-BtvgpUQu.js";import"./use-deployment-admin-i4yyU5cE.js";import"./use-is-desktop-app-BNujXJc_.js";import"./invite-member-dialog-DLcDeLv2.js";import"./select-Bsy8eSBX.js";import"./textarea-r3XagL8-.js";import"./use-org-auth-client-DpEh871d.js";import"./use-organization-roles-BgwN1aW8.js";import"./task-route-BH23dMGV.js";import"./collection-search-DeO0gmSf.js";import"./connection-card-BREXoLfM.js";import"./use-registry-connections-CvgleqXK.js";import"./use-connection-CDB9hw5T.js";import"./useInfiniteQuery-B4KvVpWh.js";import"./infiniteQueryObserver-6JlvsRry.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./connection-form-helpers-4XZDlMn9.js";import"./collection-tabs-CY5Bqhy2.js";import"./badge-CCYpKX1i.js";import"./use-infinite-scroll-BvDBqpDf.js";import"./useSuspenseInfiniteQuery-Bh-SHQi9.js";import"./use-ai-providers-Cpuy3TdM.js";import"./use-file-configs-GBQf8kCv.js";import"./site-slug-uya6Wp4-.js";import"./decopilot-sse-pool-Dry_70zj.js";import"./use-decopilot-events-gGN5aHaN.js";import"./dropdown-menu-D-LKq1Ty.js";import"./github-icon-ezyF0naS.js";import"./get-initials-D-f_fDFw.js";import"./scroll-area-BZJillcg.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-navigate-to-agent-Q2KJVvG6.js";import"./thread-intent-7CsqxP8-.js";import"./use-panel-navigate-B1dRz6j0.js";import"./source-system-tabs-CnEGUb4r.js";import"./autosend-BFGLO-gB.js";import"./location-oTTXFrSF.js";function le(t){const e=E.c(21),{siteUrl:c}=t,n=U(),{org:u}=N(),a=w();let h;e[0]!==n||e[1]!==u?(h=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=X(u,T.COMMERCE_DISCOVERY(u.id));n({...x,search:{...x.search,sidepanel:!1}})},e[0]=n,e[1]=u,e[2]=h):h=e[2];const p=h;let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Q,{className:"bg-black/15 backdrop-blur-sm"}),e[3]=C):C=e[3];let s;e[4]!==a?(s=a("routes.commerceOnboarding.connectModal.dialogTitle"),e[4]=a,e[5]=s):s=e[5];let r;e[6]!==s?(r=o.jsx($,{className:"sr-only",children:s}),e[6]=s,e[7]=r):r=e[7];let m;e[8]!==p||e[9]!==a?(m=()=>o.jsxs("div",{className:"grid gap-4 p-6",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:a("routes.commerceOnboarding.connectModal.loadError")}),o.jsxs(R,{type:"button",size:"xl",className:"w-full",onClick:p,children:[a("routes.commerceOnboarding.connectModal.continueButton"),o.jsx(D,{size:18})]})]}),e[8]=p,e[9]=a,e[10]=m):m=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(K,{}),e[11]=d):d=e[11];let i;e[12]!==p||e[13]!==c?(i=o.jsx(y.Suspense,{fallback:d,children:o.jsx(ue,{siteUrlFromUrl:c,onComplete:p})}),e[12]=p,e[13]=c,e[14]=i):i=e[14];let l;e[15]!==m||e[16]!==i?(l=o.jsx(P,{fallback:m,children:i}),e[15]=m,e[16]=i,e[17]=l):l=e[17];let b;return e[18]!==r||e[19]!==l?(b=o.jsx(q,{open:!0,children:o.jsxs(J,{children:[C,o.jsxs(z,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:de,onPointerDownOutside:pe,onInteractOutside:ce,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[r,l]})]})}),e[18]=r,e[19]=l,e[20]=b):b=e[20],b}function ce(t){return t.preventDefault()}function pe(t){return t.preventDefault()}function de(t){return t.preventDefault()}function ue({siteUrlFromUrl:t,onComplete:e}){const c=w(),{org:n}=N(),u=T.COMMERCE_DISCOVERY(n.id),a=te({connectionId:oe,orgId:n.id,orgSlug:n.slug}),p=F({queryKey:L.commerceDiscoveryConnection(n.id,u),queryFn:async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:u}});return j(f)},retry:!1}).data.item,C=typeof p?.metadata?.siteUrl=="string"?p.metadata.siteUrl:void 0,s=t||C,r=G(s),[m,d]=y.useState(!0),[i,l]=y.useState(null),b=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}})),retry:!1}),x=O({mutationFn:async f=>j(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:f}})),retry:!1}),v=async()=>{l(null),_("commerce_onboarding_open_report_clicked",{domain:r??void 0,organization_id:n.id});const f=s?W(s):null;if(f?.ok)try{let g=await x.mutateAsync(f.value);if(g.triggered||(_("commerce_onboarding_run_reclaim",{domain:r??void 0,organization_id:n.id,reason:g.reason??"not_upgraded"}),await b.mutateAsync(f.value),g=await x.mutateAsync(f.value)),!g.triggered){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g.reason??"not_triggered"}),l(c("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){_("commerce_onboarding_run_failed",{domain:r??void 0,organization_id:n.id,error:g instanceof Error?g.message:String(g)}),l(c("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},I=re("demo_mode"),M=m||I;return o.jsx(Z,{siteHost:r,footer:o.jsxs(o.Fragment,{children:[i?o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}):null,o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsx(ee,{ready:M,pending:x.isPending,label:x.isPending?c("routes.commerceOnboarding.connectModal.openingReport"):c("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{v()},children:o.jsx(D,{size:18})})}),M?null:o.jsx(R,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{v()},children:c("routes.commerceOnboarding.connectModal.skip")})]})]}),children:o.jsx(V,{org:n,cdConnectionId:u,siteUrl:s,onReadinessChange:d})})}function zo(){const t=E.c(14),e=A();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const{connect:n,siteUrl:u}=B(c),a=n==="1",h=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(S.Header,{className:"grid-cols-1 px-1",children:o.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[o.jsx(se,{}),o.jsx(S.TogglesSlot,{}),o.jsx(S.TabsSlot,{className:"shrink-0"}),o.jsx(S.CenterSlot,{}),o.jsx(S.RightSlot,{})]})}),t[1]=p):p=t[1];const s=h&&p;let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(Y,{children:o.jsx(H,{})})}),t[2]=r):r=t[2];let m;t[3]!==s?(m=o.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[s,r]}),t[3]=s,t[4]=m):m=t[4];let d;t[5]!==e?(d=e&&o.jsx(me,{renderSidebar:fe}),t[5]=e,t[6]=d):d=t[6];let i;t[7]!==u||t[8]!==a?(i=a&&o.jsx(le,{siteUrl:u}),t[7]=u,t[8]=a,t[9]=i):i=t[9];let l;return t[10]!==m||t[11]!==d||t[12]!==i?(l=o.jsx(ae,{children:o.jsx(S.Provider,{children:o.jsxs(ne,{children:[m,d,i]})})}),t[10]=m,t[11]=d,t[12]=i,t[13]=l):l=t[13],l}function fe(t){const{onClose:e}=t;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(ie,{onClose:e})})})}export{zo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cx as _}from"./index-
|
|
1
|
+
import{cx as _}from"./index-VAoEJtvI.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),v=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case v:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var x;function C(){return x||(x=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|