decocms 4.57.0 → 4.57.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-D3cnzdFl.js → AlertCircle-DQCGvut8.js} +1 -1
- package/dist/client/assets/{ArrowUp-BzN0CH-T.js → ArrowUp-D7T7n9iH.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B2cD_HE5.js → ArrowUpRight-BEFV2vkA.js} +1 -1
- package/dist/client/assets/{Check-BNJ1r_ZZ.js → Check-BEeJ8fxa.js} +1 -1
- package/dist/client/assets/{CheckCircle-CPOJ2Wp3.js → CheckCircle-CsSfP7Xf.js} +1 -1
- package/dist/client/assets/{ChevronDown-DsnzNuQT.js → ChevronDown-BVsraXi6.js} +1 -1
- package/dist/client/assets/{ChevronRight-BBhD0GlM.js → ChevronRight-D4jesAkw.js} +1 -1
- package/dist/client/assets/{ChevronUp-D6Q_nkfA.js → ChevronUp-G9frUDJZ.js} +1 -1
- package/dist/client/assets/{Circle-fGxkuuPA.js → Circle-D3nky9aw.js} +1 -1
- package/dist/client/assets/{Copy01-BAu4Xj0C.js → Copy01-DyXaUHnt.js} +1 -1
- package/dist/client/assets/{DotsVertical-Br5Af1Wu.js → DotsVertical-CkzUgpIb.js} +1 -1
- package/dist/client/assets/{Eye-wD3Z38PE.js → Eye-Z74BlA3H.js} +1 -1
- package/dist/client/assets/{FilterLines-C1ERT02r.js → FilterLines-Bu3ZCrw6.js} +1 -1
- package/dist/client/assets/{Globe01-V_BINrXN.js → Globe01-B0Trj5Ay.js} +1 -1
- package/dist/client/assets/{Globe04-DJkZKNzl.js → Globe04-oRfi9_O4.js} +1 -1
- package/dist/client/assets/{HardDrive-B6BAyJ6K.js → HardDrive-Dx7eQadd.js} +1 -1
- package/dist/client/assets/{Key01-BNxG1v7t.js → Key01-DlSVTdTy.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BPk_1GqZ.js → LayoutLeft-CPcvIk6j.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D-CtyHyW.js → LinkExternal01-8ULSUK9E.js} +1 -1
- package/dist/client/assets/{List-Dj203Ohe.js → List-BrdeiVAK.js} +1 -1
- package/dist/client/assets/{Loading02-C0IWV4cN.js → Loading02-CBukUc03.js} +1 -1
- package/dist/client/assets/{Monitor01-DssScNRk.js → Monitor01-YH69hLmg.js} +1 -1
- package/dist/client/assets/{Package-B-bqdvW9.js → Package-BC8j5O7T.js} +1 -1
- package/dist/client/assets/{Palette-BuGkGM46.js → Palette-COkzmwuD.js} +1 -1
- package/dist/client/assets/{Play-zCBN7tLX.js → Play-fRGAaRLr.js} +1 -1
- package/dist/client/assets/{Plus-Dt-omGh0.js → Plus-DZ8Y2lWX.js} +1 -1
- package/dist/client/assets/{SearchLg-BYQJRZCi.js → SearchLg-DCnLlGR7.js} +1 -1
- package/dist/client/assets/{SearchMd-B2Qjb6WW.js → SearchMd-BxmBL442.js} +1 -1
- package/dist/client/assets/{Settings02-Bz_0GS7s.js → Settings02-Bo6T9XLP.js} +1 -1
- package/dist/client/assets/{Shield01-ConpppPV.js → Shield01-CJ4mz5gK.js} +1 -1
- package/dist/client/assets/{Star01-B83Iv0lO.js → Star01-IZ68g_xa.js} +1 -1
- package/dist/client/assets/{Stars01-DJjxGHI-.js → Stars01-BBDTresZ.js} +1 -1
- package/dist/client/assets/{Stars02-BLMhiTWQ.js → Stars02-6a4XNIIU.js} +1 -1
- package/dist/client/assets/{Sun-De6X_9g6.js → Sun-CE4zZZrK.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CUV7FeTc.js → SwitchHorizontal01-60hw4Alk.js} +1 -1
- package/dist/client/assets/{Tool01-DLcYbuFj.js → Tool01-B4Z7JhlQ.js} +1 -1
- package/dist/client/assets/{Tool02-Dr0ehMyZ.js → Tool02-BY98RBMi.js} +1 -1
- package/dist/client/assets/{Trash01-mZHwgp1-.js → Trash01-B9pw3Dz-.js} +1 -1
- package/dist/client/assets/{TrendUp01-BNqORnzv.js → TrendUp01-C8HikdRN.js} +1 -1
- package/dist/client/assets/{Upload01-BuA9ot87.js → Upload01-DwHzJTDj.js} +1 -1
- package/dist/client/assets/{User01-MvOQlNju.js → User01-0_lYU3sr.js} +1 -1
- package/dist/client/assets/{Users01-BZSK_B1-.js → Users01-BA0tYZge.js} +1 -1
- package/dist/client/assets/{Users03-Y84iQse-.js → Users03-DGfmL8ng.js} +1 -1
- package/dist/client/assets/{X-YIvA-_pe.js → X-bCYPxEGT.js} +1 -1
- package/dist/client/assets/{XCircle-DKXe3k9J.js → XCircle-DP6KZoJI.js} +1 -1
- package/dist/client/assets/{XClose-D0NVkf_i.js → XClose-Cy2zn03A.js} +1 -1
- package/dist/client/assets/{Zap-CUvuhi9A.js → Zap-rVhVjFMk.js} +1 -1
- package/dist/client/assets/{ZapSquare-CY37Lf7c.js → ZapSquare-CojtzYzX.js} +1 -1
- package/dist/client/assets/{ZoomOut-r0vOUHRG.js → ZoomOut-HiEViCQt.js} +1 -1
- package/dist/client/assets/{access-gate-CKUqtBOJ.js → access-gate-CW4lpdxL.js} +1 -1
- package/dist/client/assets/{add-section-modal-DKsF7sSJ.js → add-section-modal-CKPdN6QS.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Cu56F_i8.js → agent-capabilities-Crp4S07c.js} +1 -1
- package/dist/client/assets/{agent-icon-Dr6P3HqV.js → agent-icon-B3Khwrxs.js} +1 -1
- package/dist/client/assets/{agents-list-DTSN7igj.js → agents-list-DwwU9Hnm.js} +1 -1
- package/dist/client/assets/{ai-providers-DxpvY8Xq.js → ai-providers-eeNsHUnH.js} +1 -1
- package/dist/client/assets/{alert-Co2xjw2G.js → alert-C5yvBlhG.js} +1 -1
- package/dist/client/assets/{alert-dialog-CUjDTN7-.js → alert-dialog-DDJF6hNh.js} +1 -1
- package/dist/client/assets/app-editor-DAsGG8dk.js +1 -0
- package/dist/client/assets/{auth-catchall-BhV9DtTq.js → auth-catchall-B6qliEa1.js} +1 -1
- package/dist/client/assets/{auth-entry-diN8AkVl.js → auth-entry-mmqAi7ho.js} +1 -1
- package/dist/client/assets/{auth-C9iIe2kv.js → auth-iC_q9BIr.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CTIiCZNr.js → auth-split-layout-CLn74vff.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Vd9vmHjz.js → authenticate-and-persist-oauth-BNnoe036.js} +1 -1
- package/dist/client/assets/{automation-list-row-BKO_piDp.js → automation-list-row-LFCTBiwF.js} +1 -1
- package/dist/client/assets/{automation-runs-BkFFieCy.js → automation-runs-Dx0I1hOP.js} +1 -1
- package/dist/client/assets/{automations-CG3sc3oG.js → automations-BjKfIDQh.js} +1 -1
- package/dist/client/assets/{autosend-C2rU-44v.js → autosend-BRQL6Rcu.js} +1 -1
- package/dist/client/assets/{avatar-ByOhaJol.js → avatar-Y-6cgdhP.js} +1 -1
- package/dist/client/assets/{badge-CRy062gb.js → badge-CDBU7Jnw.js} +1 -1
- package/dist/client/assets/{block-document-D6kqegv0.js → block-document-C3ckqHj2.js} +1 -1
- package/dist/client/assets/{brand-context-ClcJkWx2.js → brand-context-DAj-SFs1.js} +1 -1
- package/dist/client/assets/{breadcrumb-CCgTXuTu.js → breadcrumb-BcIGB1Or.js} +1 -1
- package/dist/client/assets/{buckets-D0CsHwti.js → buckets-BKE9WN4t.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-B7T2KgQ4.js → bulk-category-panel-B-LV8g2E.js} +1 -1
- package/dist/client/assets/{calendar-D1PPhgCr.js → calendar-D1uldZAa.js} +1 -1
- package/dist/client/assets/{capability-load-error-DyrDJ9Cw.js → capability-load-error-DJ84c_wk.js} +1 -1
- package/dist/client/assets/{card-D2Pvx0lh.js → card-PDwkjkZo.js} +1 -1
- package/dist/client/assets/{category-editor-BLJq84ha.js → category-editor-CRZnesMJ.js} +1 -1
- package/dist/client/assets/{chat-context-DBk23W1i.js → chat-context-DHTaLNyE.js} +1 -1
- package/dist/client/assets/{checkbox-CsimGysH.js → checkbox-Gk-F98s7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-wyohFT9U.js → cli-auth-success-Bf_4v7L8.js} +1 -1
- package/dist/client/assets/{collection-detail-AhzR3rVc.js → collection-detail-B_n2rihW.js} +1 -1
- package/dist/client/assets/{collection-display-button-DnJY6tXW.js → collection-display-button-BHXd0hJ0.js} +1 -1
- package/dist/client/assets/{collection-search-Lq-ombG1.js → collection-search-C94-PhCw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CICgrqaH.js → collection-table-wrapper-Bu0j3VFq.js} +1 -1
- package/dist/client/assets/{collection-tabs-CBCFNXb9.js → collection-tabs-BM-YDljB.js} +1 -1
- package/dist/client/assets/{command-CRwBEulT.js → command-D4Q48wPz.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-8Q9MJv_V.js → commerce-onboarding-nAX-PPzc.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-FisDgCiZ.js → connect-desktop-dialog-C-AzZ9uU.js} +1 -1
- package/dist/client/assets/{connection-card-B8REmMqc.js → connection-card-CmtTMlc6.js} +1 -1
- package/dist/client/assets/{connection-detail-Isvs_Mog.js → connection-detail-BxkxPzQa.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DDxVRT5Y.js → connection-form-helpers-ChroeVON.js} +1 -1
- package/dist/client/assets/{connections-Bnb7ogOq.js → connections-1FquVkUb.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DNkKga7o.js → decopilot-sse-pool-Cb8qqxEJ.js} +1 -1
- package/dist/client/assets/{dialog-B61dhXu_.js → dialog-mPkr-RRK.js} +1 -1
- package/dist/client/assets/{domain-settings-DG8SxlKF.js → domain-settings-Bxn6YUIN.js} +1 -1
- package/dist/client/assets/{drawer-aoaMk7z8.js → drawer-B8TNUPgG.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DLTuMo7E.js → dropdown-menu-B0v0032v.js} +1 -1
- package/dist/client/assets/{empty-state-Bq1aBwMS.js → empty-state-DpnHm9Ff.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dq1PTvcO.js → extract-connection-data-CrDh9fRV.js} +1 -1
- package/dist/client/assets/{file-explorer-CdNKEVa3.js → file-explorer-BdaIcZQu.js} +1 -1
- package/dist/client/assets/{file-type-icon-D1JH2mH0.js → file-type-icon-C6k5FmYJ.js} +1 -1
- package/dist/client/assets/{files-BV0jOFsW.js → files-DpxNGuGX.js} +1 -1
- package/dist/client/assets/{form-DfX3fOo3.js → form-h_6je5dw.js} +1 -1
- package/dist/client/assets/{general-Cdbz_ZZT.js → general-CzAYaKfe.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BjJCs2f7.js → github-repo-picker-tThpI_5I.js} +1 -1
- package/dist/client/assets/{hooks-8jy8m2s-.js → hooks-Cb3Qy_Dc.js} +1 -1
- package/dist/client/assets/{index-BcVIiR-x.js → index-BeENLzbG.js} +1 -1
- package/dist/client/assets/{index-B5RXHgAk.js → index-BjHyzbtR.js} +1 -1
- package/dist/client/assets/{index-BYmL_rjk.js → index-Bl_XoHF-.js} +1 -1
- package/dist/client/assets/{index-DAhGVBZA.js → index-BtB12M4y.js} +1 -1
- package/dist/client/assets/{index-Db52B_Op.js → index-C0SPe6C9.js} +1 -1
- package/dist/client/assets/{index-DpV-oaZ2.js → index-D75hG9Mx.js} +1 -1
- package/dist/client/assets/{index-u-LoOG2E.js → index-D7lYswsa.js} +1 -1
- package/dist/client/assets/{index-JUbP3UvY.js → index-D8u7pwON.js} +1 -1
- package/dist/client/assets/{index-DY-Vjty1.js → index-DD5ljKuD.js} +5 -5
- package/dist/client/assets/{index-Xcp-N_U6.js → index-DSn_1D7b.js} +3 -3
- package/dist/client/assets/{index-Bc9IH_Rj.js → index-D_Pdja_K.js} +1 -1
- package/dist/client/assets/{index-CTnB5U8a.js → index-Dgo5nlaH.js} +1 -1
- package/dist/client/assets/{index-DjL-FWQx.js → index-el6kTH3I.js} +1 -1
- package/dist/client/assets/{index-C66OI8d8.js → index-icYCRExU.js} +1 -1
- package/dist/client/assets/{index-redirect-CzsTcMv8.js → index-redirect-6phzSyPm.js} +1 -1
- package/dist/client/assets/{input-DI99t5q0.js → input-nFXBUvLG.js} +1 -1
- package/dist/client/assets/{integration-icon-Bl-snMvi.js → integration-icon-CsT4Vm35.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C8cOnhH8.js → invite-member-dialog-HImcbPYG.js} +1 -1
- package/dist/client/assets/{label-CJdiB8qx.js → label-BBor9OYw.js} +1 -1
- package/dist/client/assets/{layout-ChU0sWsc.js → layout-HBls_j3M.js} +1 -1
- package/dist/client/assets/{login-Chwnk_2V.js → login-C1z8WfZx.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D7VV70lM.js → mcp-oauth-Cx2xXJpN.js} +1 -1
- package/dist/client/assets/{members-BiFgSS2L.js → members-DqxuSRlg.js} +1 -1
- package/dist/client/assets/{monaco-editor-CUw7ibll.js → monaco-editor-Xh2wk8Tp.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DPBzm0EO.js → monitoring-stats-row-DOoEOmXM.js} +1 -1
- package/dist/client/assets/{oauth-callback-B8YqWEuy.js → oauth-callback-D6VCxkRw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CIfQW-Dv.js → oauth-callback-ai-provider-DYyPEDo4.js} +1 -1
- package/dist/client/assets/{onboarding-C2CmyZ-H.js → onboarding-DVl-fCKX.js} +1 -1
- package/dist/client/assets/{org-install-vh7tDZs5.js → org-install-BzILOYuY.js} +1 -1
- package/dist/client/assets/{org-layout-B3ZCbcLS.js → org-layout-laXMj9ba.js} +1 -1
- package/dist/client/assets/{organization-choice-dLEhT2u4.js → organization-choice-C1pQcp6T.js} +1 -1
- package/dist/client/assets/{orgs-DIH0d4UJ.js → orgs-Bc8QR1cA.js} +1 -1
- package/dist/client/assets/{page-seo-form-Bk60FWOG.js → page-seo-form-C6Pv2Hrd.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Bug-S7y6.js +1 -0
- package/dist/client/assets/{popover-a3AYr8FM.js → popover-CgzT12BA.js} +1 -1
- package/dist/client/assets/{post-editor-XKYKP_M-.js → post-editor-BoWGvi2D.js} +1 -1
- package/dist/client/assets/{primitives-DVzORHOZ.js → primitives-CVV5R_ix.js} +1 -1
- package/dist/client/assets/{profile-kUHgERT8.js → profile-B7SVI-oN.js} +1 -1
- package/dist/client/assets/project-app-view-CKjkrpiR.js +1 -0
- package/dist/client/assets/record-editor-_6aJOrjd.js +1 -0
- package/dist/client/assets/registry-Ci8iRoo4.js +2 -0
- package/dist/client/assets/{registry-layout-FTw6ygVD.js → registry-layout-BSextZQo.js} +1 -1
- package/dist/client/assets/{reports-Dp7f1t1V.js → reports-BPMxCBex.js} +1 -1
- package/dist/client/assets/{require-capability-Dog37Thz.js → require-capability-DvnraaMn.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DQu1LPap.js → required-auth-layout-D9qojMWR.js} +1 -1
- package/dist/client/assets/{reset-password-pxHxHgwr.js → reset-password-ClkV8uQd.js} +1 -1
- package/dist/client/assets/{roles-COf1M9cU.js → roles-BeLiefT1.js} +1 -1
- package/dist/client/assets/{search-input-DxSVOaMg.js → search-input-Dn0hSWZ5.js} +1 -1
- package/dist/client/assets/{secrets-WR9Wna8x.js → secrets-e4SIb0hm.js} +1 -1
- package/dist/client/assets/{sections-editor-D6a8uYU8.js → sections-editor-BxFAXK53.js} +1 -1
- package/dist/client/assets/{select-dRnqHBn4.js → select-CviXI9ki.js} +1 -1
- package/dist/client/assets/{select-model-DFDDErp_.js → select-model-BVeB6qMz.js} +1 -1
- package/dist/client/assets/{seo-editor-S7GOJ4X5.js → seo-editor-C2cy6kyj.js} +1 -1
- package/dist/client/assets/{settings-layout-BoMrG_Nj.js → settings-layout-iJMVXYnp.js} +1 -1
- package/dist/client/assets/{settings-section-a7bswDu8.js → settings-section-VSZi6AlU.js} +1 -1
- package/dist/client/assets/{shell-controls-BQne2jTL.js → shell-controls-D0LeXgkd.js} +1 -1
- package/dist/client/assets/{shell-layout-OOUrPqwN.js → shell-layout-CVOU9xRB.js} +1 -1
- package/dist/client/assets/{sidebar-C7Kgs7d6.js → sidebar-CmQSAjPL.js} +1 -1
- package/dist/client/assets/{skeleton-C0UA8wWi.js → skeleton-CcEQud32.js} +1 -1
- package/dist/client/assets/{sso-C6Qb0LPv.js → sso-C5qh7UXa.js} +1 -1
- package/dist/client/assets/{store-BcnLCCVE.js → store-f-uGRwHZ.js} +1 -1
- package/dist/client/assets/store-registry-3gItvs85.js +2 -0
- package/dist/client/assets/{studio-tools-wyYbyuHj.js → studio-tools-E9yDf3_0.js} +1 -1
- package/dist/client/assets/{switch-Cy9SN-e4.js → switch-QOV1_3MP.js} +1 -1
- package/dist/client/assets/{table-CenyJvQz.js → table-B6d_9e6u.js} +1 -1
- package/dist/client/assets/{tabs-YZu7Beta.js → tabs-BEnBthXe.js} +1 -1
- package/dist/client/assets/{textarea-QB4oL1jQ.js → textarea-Dl16KMAC.js} +1 -1
- package/dist/client/assets/{toggle-group-BXW4LXue.js → toggle-group-lOSgrtpS.js} +1 -1
- package/dist/client/assets/{toolbar-DEi9uqBh.js → toolbar-CC2Wp6FF.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-LzSRezP8.js → toolbar-icon-button-Dxmr2sEF.js} +1 -1
- package/dist/client/assets/{tools-list-BHNz7u8m.js → tools-list-C9rz13Xx.js} +1 -1
- package/dist/client/assets/{tooltip-DtvF0ixx.js → tooltip-M_e_krSv.js} +1 -1
- package/dist/client/assets/{types-DQj5nGgp.js → types-CqK4Iemy.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B2Fv-cW3.js → use-ai-providers-CSQgALBc.js} +1 -1
- package/dist/client/assets/{use-automations-BY62J7aO.js → use-automations-B73FT1wm.js} +1 -1
- package/dist/client/assets/{use-capability-BaDqUcBw.js → use-capability-aTF0AI3e.js} +1 -1
- package/dist/client/assets/{use-clock-tick-4f6maey2.js → use-clock-tick-CCTl5Yxu.js} +1 -1
- package/dist/client/assets/{use-collections-CM6JRAhl.js → use-collections-Ce-cuEBy.js} +1 -1
- package/dist/client/assets/{use-connection-cd2aaVLL.js → use-connection-hkUuQBrT.js} +1 -1
- package/dist/client/assets/{use-copy-aTYwTsgd.js → use-copy-Dijkn7yI.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BKaSFnSh.js → use-create-virtual-mcp-GoXz08-t.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BTZkbhnw.js → use-debounced-autosave-jg3g3c9r.js} +1 -1
- package/dist/client/assets/{use-debounced-value-lP8dZ8tm.js → use-debounced-value-DaMxSpzh.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C1Ney9sB.js → use-decopilot-events-Cxs4WDOZ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BE3nGK36.js → use-delete-connection-BlA3-BWP.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DSWfyGE0.js → use-deployment-admin-D-vSLeTr.js} +1 -1
- package/dist/client/assets/{use-file-configs-DdY_qwh8.js → use-file-configs-CQ4BSXsE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D3nTGgD9.js → use-infinite-scroll-D7VcwF5k.js} +1 -1
- package/dist/client/assets/{use-join-requests-qL0je9Tl.js → use-join-requests-BjfgTura.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DWIZK6tn.js → use-mcp-client-B9awT5X_.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-ne91rAIM.js → use-mcp-prompts-EOAbT9yX.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-fijJgXqm.js → use-mcp-tools-BzGw36c7.js} +1 -1
- package/dist/client/assets/{use-members-YYmJGXuB.js → use-members-NrGwwdtD.js} +1 -1
- package/dist/client/assets/{use-mobile-Dkgnu8T2.js → use-mobile-CkmVE_-7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-cuyKflga.js → use-navigate-to-agent-B5-47yrA.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C6wlTiiN.js → use-org-auth-client-BaKQjOSf.js} +1 -1
- package/dist/client/assets/{use-org-sso-CwDM8XwI.js → use-org-sso-By_u0hEv.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D5Ne1xhN.js → use-organization-roles-izeSBzjT.js} +1 -1
- package/dist/client/assets/{use-organization-settings-GpvuXm8t.js → use-organization-settings-C5RS8nea.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BpBy3AfC.js → use-registry-connections-BqTrjEc0.js} +1 -1
- package/dist/client/assets/{use-secrets-Ba-Du0WQ.js → use-secrets-BXostql4.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DkD3mqOb.js → use-status-sounds-CqFkTrqw.js} +1 -1
- package/dist/client/assets/{use-view-mode-BIP_tFk9.js → use-view-mode-CcTBUhei.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-h-le_2wx.js → use-virtual-mcp-CymLeNR8.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BqDEFx1l.js +1 -0
- package/dist/client/assets/{useRouterState-PFsDpT15.js → useRouterState-DMxFySuU.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BnQw-mx8.js +1 -0
- package/dist/client/assets/{users-DUnaq5DP.js → users-KcJjBogC.js} +1 -1
- package/dist/client/assets/{variant-calendar-CfPHHrSP.js → variant-calendar-B64RcPST.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C4rBrCyP.js → view-mode-toggle-GEAV0tV-.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +446 -446
- package/dist/server/server.js +301 -301
- package/package.json +1 -1
- package/dist/client/assets/app-editor-9svW_gNG.js +0 -1
- package/dist/client/assets/page-seo-sheet-DiheWa_Y.js +0 -1
- package/dist/client/assets/project-app-view-CXA00X47.js +0 -1
- package/dist/client/assets/record-editor-D93p_T3n.js +0 -1
- package/dist/client/assets/registry-BqANW9QR.js +0 -2
- package/dist/client/assets/store-registry-DvN3Y3Us.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BZ_T8fFy.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DVOYJu_p.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,a5 as st,m as pt,n as bt,d as Je,K as lt,r as z,j as s,l as B,B as Ze,i as ht}from"./index-Xcp-N_U6.js";import{g as $e}from"./get-initials-D-f_fDFw.js";import{A as Be}from"./avatar-ByOhaJol.js";import{B as Nt}from"./badge-CRy062gb.js";import{i as jt,a as at,b as vt}from"./Loading02-C0IWV4cN.js";import{i as yt}from"./List-Dj203Ohe.js";import{s as Dt}from"./Plus-Dt-omGh0.js";import{u as nt}from"./use-members-YYmJGXuB.js";import{u as ot}from"./studio-tools-wyYbyuHj.js";import{a as Ct}from"./format-time-BnbuEtat.js";import{i as St}from"./AlertCircle-D3cnzdFl.js";import{i as Tt}from"./CheckCircle-CPOJ2Wp3.js";import{i as It}from"./Circle-fGxkuuPA.js";import{s as wt}from"./Eye-wD3Z38PE.js";import{d as _t,e as kt,a as zt}from"./dialog-B61dhXu_.js";import{a as Ve,c as We,d as Ee,D as Xe}from"./dropdown-menu-DLTuMo7E.js";import{a as Ot,b as Et,P as At}from"./popover-a3AYr8FM.js";import{C as $t}from"./calendar-D1PPhgCr.js";import{t as Ae}from"./ChevronDown-DsnzNuQT.js";import{s as Bt}from"./Trash01-mZHwgp1-.js";import{s as Mt}from"./User01-MvOQlNju.js";import{i as Lt}from"./X-YIvA-_pe.js";function Pt(){const t=M.c(13),{locator:e}=st(),l=ot();let n;t[0]!==e?(n=lt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];let a;t[2]!==l?(a=async()=>(await l.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==n||t[5]!==a?(i={queryKey:n,queryFn:a},t[4]=n,t[5]=a,t[6]=i):i=t[6];const c=pt(i);let o;t[7]!==c.data?(o=c.data??[],t[7]=c.data,t[8]=o):o=t[8];let r;return t[9]!==c.error||t[10]!==c.isLoading||t[11]!==o?(r={items:o,isLoading:c.isLoading,error:c.error},t[9]=c.error,t[10]=c.isLoading,t[11]=o,t[12]=r):r=t[12],r}function Ft(){const t=M.c(30),{locator:e}=st(),l=ot(),n=bt();let a;t[0]!==e?(a=lt.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const i=a;let c;t[2]!==n||t[3]!==i?(c=()=>n.invalidateQueries({queryKey:i}),t[2]=n,t[3]=i,t[4]=c):c=t[4];const o=c;let r;t[5]!==l?(r=v=>l.call("TASK_BOARD_ITEM_CREATE",v),t[5]=l,t[6]=r):r=t[6];let d;t[7]!==o||t[8]!==r?(d={mutationFn:r,onSuccess:o},t[7]=o,t[8]=r,t[9]=d):d=t[9];const u=Je(d);let f;t[10]!==l?(f=v=>l.call("TASK_BOARD_ITEM_UPDATE",v),t[10]=l,t[11]=f):f=t[11];let p,g;t[12]!==n||t[13]!==i?(p=async v=>{await n.cancelQueries({queryKey:i});const T=n.getQueryData(i);return n.setQueryData(i,y=>y?.map(C=>C.id===v.id?{...C,...v}:C)),{previous:T}},g=(v,T,y)=>{y?.previous&&n.setQueryData(i,y.previous)},t[12]=n,t[13]=i,t[14]=p,t[15]=g):(p=t[14],g=t[15]);let m;t[16]!==o||t[17]!==f||t[18]!==p||t[19]!==g?(m={mutationFn:f,onMutate:p,onError:g,onSettled:o},t[16]=o,t[17]=f,t[18]=p,t[19]=g,t[20]=m):m=t[20];const h=Je(m);let b;t[21]!==l?(b=v=>l.call("TASK_BOARD_ITEM_DELETE",{id:v}),t[21]=l,t[22]=b):b=t[22];let D;t[23]!==o||t[24]!==b?(D={mutationFn:b,onSuccess:o},t[23]=o,t[24]=b,t[25]=D):D=t[25];const j=Je(D);let N;return t[26]!==u||t[27]!==j||t[28]!==h?(N={create:u,update:h,remove:j},t[26]=u,t[27]=j,t[28]=h,t[29]=N):N=t[29],N}const rt=["triage","todo","in_progress","in_review","done"],U={triage:{label:"Triage",icon:St,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:It,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:jt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:wt,iconClassName:"text-amber-500"},done:{label:"Done",icon:Tt,iconClassName:"text-green-600"}},Rt=["low","medium","high","urgent"],ye={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};function Kt(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function et(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ut=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Qt(t){const e=M.c(133),{open:l,onClose:n,item:a,onSubmit:i,onDelete:c,isSaving:o}=t,{data:r}=nt(),d=r?.data?.members??[],[u,f]=z.useState(a?.title??""),[p,g]=z.useState(a?.description??""),[m,h]=z.useState(a?.status??"triage"),[b,D]=z.useState(a?.priority??"medium"),[j,N]=z.useState(a?.assigneeId??null),v=a?.dueDate;let T;e[0]!==v?(T=et(v),e[0]=v,e[1]=T):T=e[1];const[y,C]=z.useState(T),[Q,w]=z.useState(!1);let _;e[2]!==a?.assigneeId||e[3]!==a?.description||e[4]!==a?.dueDate||e[5]!==a?.priority||e[6]!==a?.status||e[7]!==a?.title||e[8]!==N||e[9]!==g||e[10]!==C?(_=()=>{f(a?.title??""),g(a?.description??""),h(a?.status??"triage"),D(a?.priority??"medium"),N(a?.assigneeId??null),C(et(a?.dueDate))},e[2]=a?.assigneeId,e[3]=a?.description,e[4]=a?.dueDate,e[5]=a?.priority,e[6]=a?.status,e[7]=a?.title,e[8]=N,e[9]=g,e[10]=C,e[11]=_):_=e[11];const O=_;let k;e[12]!==n||e[13]!==O?(k=()=>{n(),O()},e[12]=n,e[13]=O,e[14]=k):k=e[14];const E=k;let L;e[15]!==j||e[16]!==p||e[17]!==y||e[18]!==i||e[19]!==b||e[20]!==m||e[21]!==u?(L=()=>{const x=u.trim();x&&i({title:x,description:p.trim()||null,status:m,priority:b,assigneeId:j,dueDate:y?Kt(y):null})},e[15]=j,e[16]=p,e[17]=y,e[18]=i,e[19]=b,e[20]=m,e[21]=u,e[22]=L):L=e[22];const P=L;let F;e[23]!==j?(F=x=>x.userId===j,e[23]=j,e[24]=F):F=e[24];const R=d.find(F),A=kt;let I;e[25]!==E?(I=x=>!x&&E(),e[25]=E,e[26]=I):I=e[26];const $=_t,q="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",S="hidden",De=a?"Edit task":"New task";let Y;e[27]!==De?(Y=s.jsx(zt,{className:"sr-only",children:De}),e[27]=De,e[28]=Y):Y=e[28];const dt="flex min-h-0 flex-1 flex-col overflow-y-auto",mt="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=x=>f(x.target.value),e[29]=Ce):Ce=e[29];let G;e[30]!==u?(G=s.jsx("input",{value:u,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=u,e[31]=G):G=e[31];const ut="flex flex-wrap items-center gap-2",Me=U[m].icon,Le=U[m];let Se;e[32]!==Me||e[33]!==Le.iconClassName?(Se=s.jsx(Me,{size:13,className:Le.iconClassName}),e[32]=Me,e[33]=Le.iconClassName,e[34]=Se):Se=e[34];const Pe=Se,Fe=U[m];let Te;e[35]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[35]=Te):Te=e[35];let H;e[36]!==Pe||e[37]!==Fe.label?(H=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Pe,Fe.label,Te]})}),e[36]=Pe,e[37]=Fe.label,e[38]=H):H=e[38];let Ie;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(We,{align:"start",className:"w-44",children:rt.map(x=>{const K=U[x].icon;return s.jsxs(Ee,{onSelect:()=>h(x),className:"gap-2",children:[s.jsx(K,{size:13,className:U[x].iconClassName}),U[x].label]},x)})}),e[39]=Ie):Ie=e[39];let J;e[40]!==H?(J=s.jsxs(Xe,{children:[H,Ie]}),e[40]=H,e[41]=J):J=e[41];const Re=ye[b];let V;e[42]!==Re.badgeClassName?(V=B("size-2 rounded-full",Re.badgeClassName),e[42]=Re.badgeClassName,e[43]=V):V=e[43];let W;e[44]!==V?(W=s.jsx("span",{className:V}),e[44]=V,e[45]=W):W=e[45];const Ke=ye[b];let we;e[46]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[46]=we):we=e[46];let X;e[47]!==W||e[48]!==Ke.label?(X=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[W,Ke.label,we]})}),e[47]=W,e[48]=Ke.label,e[49]=X):X=e[49];let _e;e[50]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(We,{align:"start",className:"w-40",children:Rt.map(x=>s.jsx(Ee,{onSelect:()=>D(x),children:ye[x].label},x))}),e[50]=_e):_e=e[50];let Z;e[51]!==X?(Z=s.jsxs(Xe,{children:[X,_e]}),e[51]=X,e[52]=Z):Z=e[52];const Ue=Xe,Qe=Ve,ft=!0,xt="button",gt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",qe=R?s.jsx(Be,{url:R.user?.image??void 0,fallback:$e(R.user?.name),shape:"circle",size:"2xs"}):s.jsx(Mt,{size:13,className:"text-muted-foreground"}),Ye=R?.user?.name??"Unassigned";let ke;e[53]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[53]=ke):ke=e[53];let ee;e[54]!==qe||e[55]!==Ye?(ee=s.jsxs("button",{type:xt,className:gt,children:[qe,Ye,ke]}),e[54]=qe,e[55]=Ye,e[56]=ee):ee=e[56];let te;e[57]!==Qe||e[58]!==ee?(te=s.jsx(Qe,{asChild:ft,children:ee}),e[57]=Qe,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==N?(se=s.jsx(Ee,{onSelect:()=>N(null),children:"Unassigned"}),e[60]=N,e[61]=se):se=e[61];let le;if(e[62]!==d||e[63]!==N){let x;e[65]!==N?(x=K=>s.jsxs(Ee,{onSelect:()=>N(K.userId),className:"gap-2",children:[s.jsx(Be,{url:K.user?.image??void 0,fallback:$e(K.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:K.user?.name??K.userId})]},K.userId),e[65]=N,e[66]=x):x=e[66],le=d.map(x),e[62]=d,e[63]=N,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(We,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let ne;e[70]!==Ue||e[71]!==te||e[72]!==ae?(ne=s.jsxs(Ue,{children:[te,ae]}),e[70]=Ue,e[71]=te,e[72]=ae,e[73]=ne):ne=e[73];let ze;e[74]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(at,{size:13,className:"text-muted-foreground"}),e[74]=ze):ze=e[74];let oe;e[75]!==y?(oe=y?Ut.format(y):"Due date",e[75]=y,e[76]=oe):oe=e[76];let re;e[77]!==y||e[78]!==C?(re=y?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:x=>{x.stopPropagation(),C(null)},onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),C(null))},children:s.jsx(Lt,{size:12})}):s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[77]=y,e[78]=C,e[79]=re):re=e[79];let ie;e[80]!==oe||e[81]!==re?(ie=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[ze,oe,re]})}),e[80]=oe,e[81]=re,e[82]=ie):ie=e[82];const Ge=y??void 0;let ce;e[83]!==C||e[84]!==w?(ce=x=>{C(x??null),x&&w(!1)},e[83]=C,e[84]=w,e[85]=ce):ce=e[85];let de;e[86]!==Ge||e[87]!==ce?(de=s.jsx(Et,{className:"w-auto p-0",align:"start",children:s.jsx($t,{mode:"single",selected:Ge,onSelect:ce,initialFocus:!0})}),e[86]=Ge,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==Q||e[90]!==w||e[91]!==ie||e[92]!==de?(me=s.jsxs(At,{open:Q,onOpenChange:w,children:[ie,de]}),e[89]=Q,e[90]=w,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==J||e[95]!==Z||e[96]!==ne||e[97]!==me?(ue=s.jsxs("div",{className:ut,children:[J,Z,ne,me]}),e[94]=J,e[95]=Z,e[96]=ne,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==G||e[100]!==ue?(fe=s.jsxs("div",{className:mt,children:[G,ue]}),e[99]=G,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==g?(xe=x=>g(x.target.value),e[102]=g,e[103]=xe):xe=e[103];let ge;e[104]!==p||e[105]!==xe?(ge=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:p,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=p,e[105]=xe,e[106]=ge):ge=e[106];let pe;e[107]!==fe||e[108]!==ge?(pe=s.jsxs("div",{className:dt,children:[fe,ge]}),e[107]=fe,e[108]=ge,e[109]=pe):pe=e[109];let be;e[110]!==a||e[111]!==c?(be=a&&c&&s.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(Bt,{size:14})}),e[110]=a,e[111]=c,e[112]=be):be=e[112];let he;e[113]!==o||e[114]!==u?(he=!u.trim()||o,e[113]=o,e[114]=u,e[115]=he):he=e[115];const He=a?"Save":"Create task";let Ne;e[116]!==P||e[117]!==he||e[118]!==He?(Ne=s.jsx(Ze,{size:"sm",className:"ml-auto",disabled:he,onClick:P,children:He}),e[116]=P,e[117]=he,e[118]=He,e[119]=Ne):Ne=e[119];let je;e[120]!==be||e[121]!==Ne?(je=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,Ne]}),e[120]=be,e[121]=Ne,e[122]=je):je=e[122];let ve;e[123]!==$||e[124]!==Y||e[125]!==pe||e[126]!==je?(ve=s.jsxs($,{className:q,closeButtonClassName:S,children:[Y,pe,je]}),e[123]=$,e[124]=Y,e[125]=pe,e[126]=je,e[127]=ve):ve=e[127];let Oe;return e[128]!==A||e[129]!==l||e[130]!==ve||e[131]!==I?(Oe=s.jsx(A,{open:l,onOpenChange:I,children:ve}),e[128]=A,e[129]=l,e[130]=ve,e[131]=I,e[132]=Oe):Oe=e[132],Oe}function qt(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ct,{})})})}),t[0]=e):e=t[0],e}const Yt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function it(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Yt.format(e),overdue:l}}function Gt(t){const e=M.c(8),{iso:l}=t;let n;e[0]!==l?(n=it(l),e[0]=l,e[1]=n):n=e[1];const{label:a,overdue:i}=n,c=i?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let o;e[2]!==c?(o=B("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",c),e[2]=c,e[3]=o):o=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{size:10}),e[4]=r):r=e[4];let d;return e[5]!==a||e[6]!==o?(d=s.jsxs("span",{className:o,children:[r,a]}),e[5]=a,e[6]=o,e[7]=d):d=e[7],d}function ct(){const t=M.c(45),{items:e,isLoading:l}=Pt(),n=Ft(),{data:a}=nt();let i;if(t[0]!==a?.data?.members){const S=a?.data?.members??[];i=new Map(S.map(Ht)),t[0]=a?.data?.members,t[1]=i}else i=t[1];const c=i,[o,r]=z.useState("board"),[d,u]=z.useState(!1),[f,p]=z.useState(null);let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{p(null),u(!0)},t[2]=g):g=t[2];const m=g;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=S=>{p(S),u(!0)},t[3]=h):h=t[3];const b=h;if(l&&e.length===0){let S;return t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(ht,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=S):S=t[4],S}const D=o==="board"?"max-w-[1400px]":"max-w-[900px]";let j;t[5]!==D?(j=B("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",D),t[5]=D,t[6]=j):j=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[7]=N):N=t[7];let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ze,{size:"sm",onClick:m,children:[s.jsx(Dt,{size:16}),"New task"]}),t[8]=v):v=t[8];const T=o==="list";let y;t[9]===Symbol.for("react.memo_cache_sentinel")?(y=()=>r("list"),t[9]=y):y=t[9];let C;t[10]!==T?(C=s.jsx(tt,{active:T,onClick:y,icon:yt,label:"List"}),t[10]=T,t[11]=C):C=t[11];const Q=o==="board";let w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=()=>r("board"),t[12]=w):w=t[12];let _;t[13]!==Q?(_=s.jsx(tt,{active:Q,onClick:w,icon:vt,label:"Board"}),t[13]=Q,t[14]=_):_=t[14];let O;t[15]!==_||t[16]!==C?(O=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[C,_]})]}),t[15]=_,t[16]=C,t[17]=O):O=t[17];let k;t[18]!==n.update||t[19]!==e||t[20]!==o||t[21]!==c?(k=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):o==="board"?s.jsx(Jt,{items:e,memberByUserId:c,onOpen:b,onMove:(S,De)=>n.update.mutate({id:S,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(S=>s.jsx(Wt,{item:S,assignee:S.assigneeId?c.get(S.assigneeId):void 0,onOpen:()=>b(S)},S.id))}),t[18]=n.update,t[19]=e,t[20]=o,t[21]=c,t[22]=k):k=t[22];let E;t[23]!==O||t[24]!==k||t[25]!==j?(E=s.jsxs("div",{className:j,children:[N,O,k]}),t[23]=O,t[24]=k,t[25]=j,t[26]=E):E=t[26];const L=d?f?.id??"new":"closed";let P;t[27]===Symbol.for("react.memo_cache_sentinel")?(P=()=>u(!1),t[27]=P):P=t[27];const F=f??void 0,R=n.create.isPending||n.update.isPending;let A;t[28]!==n.create||t[29]!==n.update||t[30]!==f?(A=S=>{f?n.update.mutate({id:f.id,...S}):n.create.mutate(S),u(!1)},t[28]=n.create,t[29]=n.update,t[30]=f,t[31]=A):A=t[31];let I;t[32]!==n.remove||t[33]!==f?(I=f?()=>{n.remove.mutate(f.id),u(!1)}:void 0,t[32]=n.remove,t[33]=f,t[34]=I):I=t[34];let $;t[35]!==d||t[36]!==L||t[37]!==F||t[38]!==R||t[39]!==A||t[40]!==I?($=s.jsx(Qt,{open:d,onClose:P,item:F,isSaving:R,onSubmit:A,onDelete:I},L),t[35]=d,t[36]=L,t[37]=F,t[38]=R,t[39]=A,t[40]=I,t[41]=$):$=t[41];let q;return t[42]!==E||t[43]!==$?(q=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[E,$]}),t[42]=E,t[43]=$,t[44]=q):q=t[44],q}function Ht(t){return[t.userId,t]}function tt(t){const e=M.c(11),{active:l,onClick:n,icon:a,label:i}=t,c=`${i} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let r;e[0]!==o?(r=B("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=r):r=e[1];let d;e[2]!==a?(d=s.jsx(a,{size:14}),e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==l||e[5]!==i||e[6]!==n||e[7]!==c||e[8]!==r||e[9]!==d?(u=s.jsxs("button",{type:"button",onClick:n,"aria-label":c,"aria-pressed":l,className:r,children:[d,i]}),e[4]=l,e[5]=i,e[6]=n,e[7]=c,e[8]=r,e[9]=d,e[10]=u):u=e[10],u}function Jt(t){const e=M.c(8),{items:l,memberByUserId:n,onOpen:a,onMove:i}=t,[c,o]=z.useState(null);let r;e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==a||e[4]!==c?(r=rt.map(u=>{const f=l.filter(m=>m.status===u),p=U[u],g=p.icon;return s.jsxs("div",{onDragOver:m=>{m.preventDefault(),o(u)},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||o(null)},onDrop:m=>{m.preventDefault();const h=m.dataTransfer.getData("text/plain");h&&i(h,u),o(null)},className:B("flex flex-col rounded-xl p-1 transition-colors",c===u&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(g,{size:14,className:B("shrink-0",p.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:p.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:f.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:f.map(m=>s.jsx(Vt,{item:m,assignee:m.assigneeId?n.get(m.assigneeId):void 0,onOpen:()=>a(m)},m.id))})]},u)}),e[0]=l,e[1]=n,e[2]=i,e[3]=a,e[4]=c,e[5]=r):r=e[5];let d;return e[6]!==r?(d=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:r}),e[6]=r,e[7]=d):d=e[7],d}function Vt(t){const e=M.c(44),{item:l,assignee:n,onOpen:a}=t,i=ye[l.priority];let c,o,r,d,u,f,p,g,m,h;if(e[0]!==n||e[1]!==l.dueDate||e[2]!==l.id||e[3]!==l.title||e[4]!==a||e[5]!==i.badgeClassName||e[6]!==i.label){const j=l.dueDate?it(l.dueDate):null;u="button",f=!0,e[17]!==l.id?(p=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[17]=l.id,e[18]=p):p=e[18],g=a,m="flex cursor-grab flex-col gap-1.5 rounded-[10px] border border-border bg-card px-3 py-2.5 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",h=l.title;let N;e[19]!==l.title?(N=s.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium leading-snug text-foreground",children:l.title}),e[19]=l.title,e[20]=N):N=e[20];let v;e[21]!==n?(v=n&&s.jsx(Be,{url:n.user?.image??void 0,fallback:$e(n.user?.name),shape:"circle",size:"2xs"}),e[21]=n,e[22]=v):v=e[22],e[23]!==N||e[24]!==v?(o=s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[N,v]}),e[23]=N,e[24]=v,e[25]=o):o=e[25],c="flex items-center justify-between gap-2";let T;e[26]!==i.badgeClassName?(T=B("inline-flex items-center rounded-md px-1.5 py-0.5 text-[10px] font-medium",i.badgeClassName),e[26]=i.badgeClassName,e[27]=T):T=e[27],e[28]!==i.label||e[29]!==T?(r=s.jsx("span",{className:T,children:i.label}),e[28]=i.label,e[29]=T,e[30]=r):r=e[30],d=j&&s.jsx("span",{className:B("text-[11px] text-muted-foreground",j.overdue&&"text-red-600"),children:j.label}),e[0]=n,e[1]=l.dueDate,e[2]=l.id,e[3]=l.title,e[4]=a,e[5]=i.badgeClassName,e[6]=i.label,e[7]=c,e[8]=o,e[9]=r,e[10]=d,e[11]=u,e[12]=f,e[13]=p,e[14]=g,e[15]=m,e[16]=h}else c=e[7],o=e[8],r=e[9],d=e[10],u=e[11],f=e[12],p=e[13],g=e[14],m=e[15],h=e[16];let b;e[31]!==c||e[32]!==r||e[33]!==d?(b=s.jsxs("div",{className:c,children:[r,d]}),e[31]=c,e[32]=r,e[33]=d,e[34]=b):b=e[34];let D;return e[35]!==o||e[36]!==b||e[37]!==u||e[38]!==f||e[39]!==p||e[40]!==g||e[41]!==m||e[42]!==h?(D=s.jsxs("button",{type:u,draggable:f,onDragStart:p,onClick:g,className:m,title:h,children:[o,b]}),e[35]=o,e[36]=b,e[37]=u,e[38]=f,e[39]=p,e[40]=g,e[41]=m,e[42]=h,e[43]=D):D=e[43],D}function Wt(t){const e=M.c(28),{item:l,assignee:n,onOpen:a}=t,i=U[l.status],c=i.icon;let o;e[0]!==i.iconClassName?(o=B("shrink-0",i.iconClassName),e[0]=i.iconClassName,e[1]=o):o=e[1];let r;e[2]!==c||e[3]!==o?(r=s.jsx(c,{size:15,className:o}),e[2]=c,e[3]=o,e[4]=r):r=e[4];let d;e[5]!==l.title?(d=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=d):d=e[6];const u=ye[l.priority];let f;e[7]!==u.badgeClassName?(f=B("shrink-0 text-[10px]",u.badgeClassName),e[7]=u.badgeClassName,e[8]=f):f=e[8];const p=ye[l.priority];let g;e[9]!==f||e[10]!==p.label?(g=s.jsx(Nt,{className:f,children:p.label}),e[9]=f,e[10]=p.label,e[11]=g):g=e[11];let m;e[12]!==l.dueDate?(m=l.dueDate&&s.jsx(Gt,{iso:l.dueDate}),e[12]=l.dueDate,e[13]=m):m=e[13];let h;e[14]!==n?(h=n&&s.jsx(Be,{url:n.user?.image??void 0,fallback:$e(n.user?.name),shape:"circle",size:"2xs"}),e[14]=n,e[15]=h):h=e[15];let b;e[16]!==l.createdAt?(b=Ct(new Date(l.createdAt)),e[16]=l.createdAt,e[17]=b):b=e[17];let D;e[18]!==b?(D=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:b}),e[18]=b,e[19]=D):D=e[19];let j;return e[20]!==a||e[21]!==D||e[22]!==r||e[23]!==d||e[24]!==g||e[25]!==m||e[26]!==h?(j=s.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[r,d,g,m,h,D]}),e[20]=a,e[21]=D,e[22]=r,e[23]=d,e[24]=g,e[25]=m,e[26]=h,e[27]=j):j=e[27],j}const js=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ct,default:qt},Symbol.toStringTag,{value:"Module"}));export{U as S,ct as T,js as i,Pt as u};
|
|
1
|
+
import{c as M,a5 as st,m as pt,n as bt,d as Je,K as lt,r as z,j as s,l as B,B as Ze,i as ht}from"./index-DSn_1D7b.js";import{g as $e}from"./get-initials-D-f_fDFw.js";import{A as Be}from"./avatar-Y-6cgdhP.js";import{B as Nt}from"./badge-CDBU7Jnw.js";import{i as jt,a as at,b as vt}from"./Loading02-CBukUc03.js";import{i as yt}from"./List-BrdeiVAK.js";import{s as Dt}from"./Plus-DZ8Y2lWX.js";import{u as nt}from"./use-members-NrGwwdtD.js";import{u as ot}from"./studio-tools-E9yDf3_0.js";import{a as Ct}from"./format-time-BnbuEtat.js";import{i as St}from"./AlertCircle-DQCGvut8.js";import{i as Tt}from"./CheckCircle-CsSfP7Xf.js";import{i as It}from"./Circle-D3nky9aw.js";import{s as wt}from"./Eye-Z74BlA3H.js";import{d as _t,e as kt,a as zt}from"./dialog-mPkr-RRK.js";import{a as Ve,c as We,d as Ee,D as Xe}from"./dropdown-menu-B0v0032v.js";import{a as Ot,b as Et,P as At}from"./popover-CgzT12BA.js";import{C as $t}from"./calendar-D1uldZAa.js";import{t as Ae}from"./ChevronDown-BVsraXi6.js";import{s as Bt}from"./Trash01-B9pw3Dz-.js";import{s as Mt}from"./User01-0_lYU3sr.js";import{i as Lt}from"./X-bCYPxEGT.js";function Pt(){const t=M.c(13),{locator:e}=st(),l=ot();let n;t[0]!==e?(n=lt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];let a;t[2]!==l?(a=async()=>(await l.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==n||t[5]!==a?(i={queryKey:n,queryFn:a},t[4]=n,t[5]=a,t[6]=i):i=t[6];const c=pt(i);let o;t[7]!==c.data?(o=c.data??[],t[7]=c.data,t[8]=o):o=t[8];let r;return t[9]!==c.error||t[10]!==c.isLoading||t[11]!==o?(r={items:o,isLoading:c.isLoading,error:c.error},t[9]=c.error,t[10]=c.isLoading,t[11]=o,t[12]=r):r=t[12],r}function Ft(){const t=M.c(30),{locator:e}=st(),l=ot(),n=bt();let a;t[0]!==e?(a=lt.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const i=a;let c;t[2]!==n||t[3]!==i?(c=()=>n.invalidateQueries({queryKey:i}),t[2]=n,t[3]=i,t[4]=c):c=t[4];const o=c;let r;t[5]!==l?(r=v=>l.call("TASK_BOARD_ITEM_CREATE",v),t[5]=l,t[6]=r):r=t[6];let d;t[7]!==o||t[8]!==r?(d={mutationFn:r,onSuccess:o},t[7]=o,t[8]=r,t[9]=d):d=t[9];const u=Je(d);let f;t[10]!==l?(f=v=>l.call("TASK_BOARD_ITEM_UPDATE",v),t[10]=l,t[11]=f):f=t[11];let p,g;t[12]!==n||t[13]!==i?(p=async v=>{await n.cancelQueries({queryKey:i});const T=n.getQueryData(i);return n.setQueryData(i,y=>y?.map(C=>C.id===v.id?{...C,...v}:C)),{previous:T}},g=(v,T,y)=>{y?.previous&&n.setQueryData(i,y.previous)},t[12]=n,t[13]=i,t[14]=p,t[15]=g):(p=t[14],g=t[15]);let m;t[16]!==o||t[17]!==f||t[18]!==p||t[19]!==g?(m={mutationFn:f,onMutate:p,onError:g,onSettled:o},t[16]=o,t[17]=f,t[18]=p,t[19]=g,t[20]=m):m=t[20];const h=Je(m);let b;t[21]!==l?(b=v=>l.call("TASK_BOARD_ITEM_DELETE",{id:v}),t[21]=l,t[22]=b):b=t[22];let D;t[23]!==o||t[24]!==b?(D={mutationFn:b,onSuccess:o},t[23]=o,t[24]=b,t[25]=D):D=t[25];const j=Je(D);let N;return t[26]!==u||t[27]!==j||t[28]!==h?(N={create:u,update:h,remove:j},t[26]=u,t[27]=j,t[28]=h,t[29]=N):N=t[29],N}const rt=["triage","todo","in_progress","in_review","done"],U={triage:{label:"Triage",icon:St,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:It,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:jt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:wt,iconClassName:"text-amber-500"},done:{label:"Done",icon:Tt,iconClassName:"text-green-600"}},Rt=["low","medium","high","urgent"],ye={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};function Kt(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function et(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ut=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Qt(t){const e=M.c(133),{open:l,onClose:n,item:a,onSubmit:i,onDelete:c,isSaving:o}=t,{data:r}=nt(),d=r?.data?.members??[],[u,f]=z.useState(a?.title??""),[p,g]=z.useState(a?.description??""),[m,h]=z.useState(a?.status??"triage"),[b,D]=z.useState(a?.priority??"medium"),[j,N]=z.useState(a?.assigneeId??null),v=a?.dueDate;let T;e[0]!==v?(T=et(v),e[0]=v,e[1]=T):T=e[1];const[y,C]=z.useState(T),[Q,w]=z.useState(!1);let _;e[2]!==a?.assigneeId||e[3]!==a?.description||e[4]!==a?.dueDate||e[5]!==a?.priority||e[6]!==a?.status||e[7]!==a?.title||e[8]!==N||e[9]!==g||e[10]!==C?(_=()=>{f(a?.title??""),g(a?.description??""),h(a?.status??"triage"),D(a?.priority??"medium"),N(a?.assigneeId??null),C(et(a?.dueDate))},e[2]=a?.assigneeId,e[3]=a?.description,e[4]=a?.dueDate,e[5]=a?.priority,e[6]=a?.status,e[7]=a?.title,e[8]=N,e[9]=g,e[10]=C,e[11]=_):_=e[11];const O=_;let k;e[12]!==n||e[13]!==O?(k=()=>{n(),O()},e[12]=n,e[13]=O,e[14]=k):k=e[14];const E=k;let L;e[15]!==j||e[16]!==p||e[17]!==y||e[18]!==i||e[19]!==b||e[20]!==m||e[21]!==u?(L=()=>{const x=u.trim();x&&i({title:x,description:p.trim()||null,status:m,priority:b,assigneeId:j,dueDate:y?Kt(y):null})},e[15]=j,e[16]=p,e[17]=y,e[18]=i,e[19]=b,e[20]=m,e[21]=u,e[22]=L):L=e[22];const P=L;let F;e[23]!==j?(F=x=>x.userId===j,e[23]=j,e[24]=F):F=e[24];const R=d.find(F),A=kt;let I;e[25]!==E?(I=x=>!x&&E(),e[25]=E,e[26]=I):I=e[26];const $=_t,q="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",S="hidden",De=a?"Edit task":"New task";let Y;e[27]!==De?(Y=s.jsx(zt,{className:"sr-only",children:De}),e[27]=De,e[28]=Y):Y=e[28];const dt="flex min-h-0 flex-1 flex-col overflow-y-auto",mt="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=x=>f(x.target.value),e[29]=Ce):Ce=e[29];let G;e[30]!==u?(G=s.jsx("input",{value:u,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=u,e[31]=G):G=e[31];const ut="flex flex-wrap items-center gap-2",Me=U[m].icon,Le=U[m];let Se;e[32]!==Me||e[33]!==Le.iconClassName?(Se=s.jsx(Me,{size:13,className:Le.iconClassName}),e[32]=Me,e[33]=Le.iconClassName,e[34]=Se):Se=e[34];const Pe=Se,Fe=U[m];let Te;e[35]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[35]=Te):Te=e[35];let H;e[36]!==Pe||e[37]!==Fe.label?(H=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Pe,Fe.label,Te]})}),e[36]=Pe,e[37]=Fe.label,e[38]=H):H=e[38];let Ie;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(We,{align:"start",className:"w-44",children:rt.map(x=>{const K=U[x].icon;return s.jsxs(Ee,{onSelect:()=>h(x),className:"gap-2",children:[s.jsx(K,{size:13,className:U[x].iconClassName}),U[x].label]},x)})}),e[39]=Ie):Ie=e[39];let J;e[40]!==H?(J=s.jsxs(Xe,{children:[H,Ie]}),e[40]=H,e[41]=J):J=e[41];const Re=ye[b];let V;e[42]!==Re.badgeClassName?(V=B("size-2 rounded-full",Re.badgeClassName),e[42]=Re.badgeClassName,e[43]=V):V=e[43];let W;e[44]!==V?(W=s.jsx("span",{className:V}),e[44]=V,e[45]=W):W=e[45];const Ke=ye[b];let we;e[46]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[46]=we):we=e[46];let X;e[47]!==W||e[48]!==Ke.label?(X=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[W,Ke.label,we]})}),e[47]=W,e[48]=Ke.label,e[49]=X):X=e[49];let _e;e[50]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(We,{align:"start",className:"w-40",children:Rt.map(x=>s.jsx(Ee,{onSelect:()=>D(x),children:ye[x].label},x))}),e[50]=_e):_e=e[50];let Z;e[51]!==X?(Z=s.jsxs(Xe,{children:[X,_e]}),e[51]=X,e[52]=Z):Z=e[52];const Ue=Xe,Qe=Ve,ft=!0,xt="button",gt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",qe=R?s.jsx(Be,{url:R.user?.image??void 0,fallback:$e(R.user?.name),shape:"circle",size:"2xs"}):s.jsx(Mt,{size:13,className:"text-muted-foreground"}),Ye=R?.user?.name??"Unassigned";let ke;e[53]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[53]=ke):ke=e[53];let ee;e[54]!==qe||e[55]!==Ye?(ee=s.jsxs("button",{type:xt,className:gt,children:[qe,Ye,ke]}),e[54]=qe,e[55]=Ye,e[56]=ee):ee=e[56];let te;e[57]!==Qe||e[58]!==ee?(te=s.jsx(Qe,{asChild:ft,children:ee}),e[57]=Qe,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==N?(se=s.jsx(Ee,{onSelect:()=>N(null),children:"Unassigned"}),e[60]=N,e[61]=se):se=e[61];let le;if(e[62]!==d||e[63]!==N){let x;e[65]!==N?(x=K=>s.jsxs(Ee,{onSelect:()=>N(K.userId),className:"gap-2",children:[s.jsx(Be,{url:K.user?.image??void 0,fallback:$e(K.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:K.user?.name??K.userId})]},K.userId),e[65]=N,e[66]=x):x=e[66],le=d.map(x),e[62]=d,e[63]=N,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(We,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let ne;e[70]!==Ue||e[71]!==te||e[72]!==ae?(ne=s.jsxs(Ue,{children:[te,ae]}),e[70]=Ue,e[71]=te,e[72]=ae,e[73]=ne):ne=e[73];let ze;e[74]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(at,{size:13,className:"text-muted-foreground"}),e[74]=ze):ze=e[74];let oe;e[75]!==y?(oe=y?Ut.format(y):"Due date",e[75]=y,e[76]=oe):oe=e[76];let re;e[77]!==y||e[78]!==C?(re=y?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:x=>{x.stopPropagation(),C(null)},onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),C(null))},children:s.jsx(Lt,{size:12})}):s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[77]=y,e[78]=C,e[79]=re):re=e[79];let ie;e[80]!==oe||e[81]!==re?(ie=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[ze,oe,re]})}),e[80]=oe,e[81]=re,e[82]=ie):ie=e[82];const Ge=y??void 0;let ce;e[83]!==C||e[84]!==w?(ce=x=>{C(x??null),x&&w(!1)},e[83]=C,e[84]=w,e[85]=ce):ce=e[85];let de;e[86]!==Ge||e[87]!==ce?(de=s.jsx(Et,{className:"w-auto p-0",align:"start",children:s.jsx($t,{mode:"single",selected:Ge,onSelect:ce,initialFocus:!0})}),e[86]=Ge,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==Q||e[90]!==w||e[91]!==ie||e[92]!==de?(me=s.jsxs(At,{open:Q,onOpenChange:w,children:[ie,de]}),e[89]=Q,e[90]=w,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==J||e[95]!==Z||e[96]!==ne||e[97]!==me?(ue=s.jsxs("div",{className:ut,children:[J,Z,ne,me]}),e[94]=J,e[95]=Z,e[96]=ne,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==G||e[100]!==ue?(fe=s.jsxs("div",{className:mt,children:[G,ue]}),e[99]=G,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==g?(xe=x=>g(x.target.value),e[102]=g,e[103]=xe):xe=e[103];let ge;e[104]!==p||e[105]!==xe?(ge=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:p,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=p,e[105]=xe,e[106]=ge):ge=e[106];let pe;e[107]!==fe||e[108]!==ge?(pe=s.jsxs("div",{className:dt,children:[fe,ge]}),e[107]=fe,e[108]=ge,e[109]=pe):pe=e[109];let be;e[110]!==a||e[111]!==c?(be=a&&c&&s.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(Bt,{size:14})}),e[110]=a,e[111]=c,e[112]=be):be=e[112];let he;e[113]!==o||e[114]!==u?(he=!u.trim()||o,e[113]=o,e[114]=u,e[115]=he):he=e[115];const He=a?"Save":"Create task";let Ne;e[116]!==P||e[117]!==he||e[118]!==He?(Ne=s.jsx(Ze,{size:"sm",className:"ml-auto",disabled:he,onClick:P,children:He}),e[116]=P,e[117]=he,e[118]=He,e[119]=Ne):Ne=e[119];let je;e[120]!==be||e[121]!==Ne?(je=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,Ne]}),e[120]=be,e[121]=Ne,e[122]=je):je=e[122];let ve;e[123]!==$||e[124]!==Y||e[125]!==pe||e[126]!==je?(ve=s.jsxs($,{className:q,closeButtonClassName:S,children:[Y,pe,je]}),e[123]=$,e[124]=Y,e[125]=pe,e[126]=je,e[127]=ve):ve=e[127];let Oe;return e[128]!==A||e[129]!==l||e[130]!==ve||e[131]!==I?(Oe=s.jsx(A,{open:l,onOpenChange:I,children:ve}),e[128]=A,e[129]=l,e[130]=ve,e[131]=I,e[132]=Oe):Oe=e[132],Oe}function qt(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ct,{})})})}),t[0]=e):e=t[0],e}const Yt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function it(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Yt.format(e),overdue:l}}function Gt(t){const e=M.c(8),{iso:l}=t;let n;e[0]!==l?(n=it(l),e[0]=l,e[1]=n):n=e[1];const{label:a,overdue:i}=n,c=i?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let o;e[2]!==c?(o=B("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",c),e[2]=c,e[3]=o):o=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{size:10}),e[4]=r):r=e[4];let d;return e[5]!==a||e[6]!==o?(d=s.jsxs("span",{className:o,children:[r,a]}),e[5]=a,e[6]=o,e[7]=d):d=e[7],d}function ct(){const t=M.c(45),{items:e,isLoading:l}=Pt(),n=Ft(),{data:a}=nt();let i;if(t[0]!==a?.data?.members){const S=a?.data?.members??[];i=new Map(S.map(Ht)),t[0]=a?.data?.members,t[1]=i}else i=t[1];const c=i,[o,r]=z.useState("board"),[d,u]=z.useState(!1),[f,p]=z.useState(null);let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{p(null),u(!0)},t[2]=g):g=t[2];const m=g;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=S=>{p(S),u(!0)},t[3]=h):h=t[3];const b=h;if(l&&e.length===0){let S;return t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(ht,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=S):S=t[4],S}const D=o==="board"?"max-w-[1400px]":"max-w-[900px]";let j;t[5]!==D?(j=B("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",D),t[5]=D,t[6]=j):j=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[7]=N):N=t[7];let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ze,{size:"sm",onClick:m,children:[s.jsx(Dt,{size:16}),"New task"]}),t[8]=v):v=t[8];const T=o==="list";let y;t[9]===Symbol.for("react.memo_cache_sentinel")?(y=()=>r("list"),t[9]=y):y=t[9];let C;t[10]!==T?(C=s.jsx(tt,{active:T,onClick:y,icon:yt,label:"List"}),t[10]=T,t[11]=C):C=t[11];const Q=o==="board";let w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=()=>r("board"),t[12]=w):w=t[12];let _;t[13]!==Q?(_=s.jsx(tt,{active:Q,onClick:w,icon:vt,label:"Board"}),t[13]=Q,t[14]=_):_=t[14];let O;t[15]!==_||t[16]!==C?(O=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[C,_]})]}),t[15]=_,t[16]=C,t[17]=O):O=t[17];let k;t[18]!==n.update||t[19]!==e||t[20]!==o||t[21]!==c?(k=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):o==="board"?s.jsx(Jt,{items:e,memberByUserId:c,onOpen:b,onMove:(S,De)=>n.update.mutate({id:S,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(S=>s.jsx(Wt,{item:S,assignee:S.assigneeId?c.get(S.assigneeId):void 0,onOpen:()=>b(S)},S.id))}),t[18]=n.update,t[19]=e,t[20]=o,t[21]=c,t[22]=k):k=t[22];let E;t[23]!==O||t[24]!==k||t[25]!==j?(E=s.jsxs("div",{className:j,children:[N,O,k]}),t[23]=O,t[24]=k,t[25]=j,t[26]=E):E=t[26];const L=d?f?.id??"new":"closed";let P;t[27]===Symbol.for("react.memo_cache_sentinel")?(P=()=>u(!1),t[27]=P):P=t[27];const F=f??void 0,R=n.create.isPending||n.update.isPending;let A;t[28]!==n.create||t[29]!==n.update||t[30]!==f?(A=S=>{f?n.update.mutate({id:f.id,...S}):n.create.mutate(S),u(!1)},t[28]=n.create,t[29]=n.update,t[30]=f,t[31]=A):A=t[31];let I;t[32]!==n.remove||t[33]!==f?(I=f?()=>{n.remove.mutate(f.id),u(!1)}:void 0,t[32]=n.remove,t[33]=f,t[34]=I):I=t[34];let $;t[35]!==d||t[36]!==L||t[37]!==F||t[38]!==R||t[39]!==A||t[40]!==I?($=s.jsx(Qt,{open:d,onClose:P,item:F,isSaving:R,onSubmit:A,onDelete:I},L),t[35]=d,t[36]=L,t[37]=F,t[38]=R,t[39]=A,t[40]=I,t[41]=$):$=t[41];let q;return t[42]!==E||t[43]!==$?(q=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[E,$]}),t[42]=E,t[43]=$,t[44]=q):q=t[44],q}function Ht(t){return[t.userId,t]}function tt(t){const e=M.c(11),{active:l,onClick:n,icon:a,label:i}=t,c=`${i} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let r;e[0]!==o?(r=B("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=r):r=e[1];let d;e[2]!==a?(d=s.jsx(a,{size:14}),e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==l||e[5]!==i||e[6]!==n||e[7]!==c||e[8]!==r||e[9]!==d?(u=s.jsxs("button",{type:"button",onClick:n,"aria-label":c,"aria-pressed":l,className:r,children:[d,i]}),e[4]=l,e[5]=i,e[6]=n,e[7]=c,e[8]=r,e[9]=d,e[10]=u):u=e[10],u}function Jt(t){const e=M.c(8),{items:l,memberByUserId:n,onOpen:a,onMove:i}=t,[c,o]=z.useState(null);let r;e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==a||e[4]!==c?(r=rt.map(u=>{const f=l.filter(m=>m.status===u),p=U[u],g=p.icon;return s.jsxs("div",{onDragOver:m=>{m.preventDefault(),o(u)},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||o(null)},onDrop:m=>{m.preventDefault();const h=m.dataTransfer.getData("text/plain");h&&i(h,u),o(null)},className:B("flex flex-col rounded-xl p-1 transition-colors",c===u&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(g,{size:14,className:B("shrink-0",p.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:p.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:f.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:f.map(m=>s.jsx(Vt,{item:m,assignee:m.assigneeId?n.get(m.assigneeId):void 0,onOpen:()=>a(m)},m.id))})]},u)}),e[0]=l,e[1]=n,e[2]=i,e[3]=a,e[4]=c,e[5]=r):r=e[5];let d;return e[6]!==r?(d=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:r}),e[6]=r,e[7]=d):d=e[7],d}function Vt(t){const e=M.c(44),{item:l,assignee:n,onOpen:a}=t,i=ye[l.priority];let c,o,r,d,u,f,p,g,m,h;if(e[0]!==n||e[1]!==l.dueDate||e[2]!==l.id||e[3]!==l.title||e[4]!==a||e[5]!==i.badgeClassName||e[6]!==i.label){const j=l.dueDate?it(l.dueDate):null;u="button",f=!0,e[17]!==l.id?(p=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[17]=l.id,e[18]=p):p=e[18],g=a,m="flex cursor-grab flex-col gap-1.5 rounded-[10px] border border-border bg-card px-3 py-2.5 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",h=l.title;let N;e[19]!==l.title?(N=s.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium leading-snug text-foreground",children:l.title}),e[19]=l.title,e[20]=N):N=e[20];let v;e[21]!==n?(v=n&&s.jsx(Be,{url:n.user?.image??void 0,fallback:$e(n.user?.name),shape:"circle",size:"2xs"}),e[21]=n,e[22]=v):v=e[22],e[23]!==N||e[24]!==v?(o=s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[N,v]}),e[23]=N,e[24]=v,e[25]=o):o=e[25],c="flex items-center justify-between gap-2";let T;e[26]!==i.badgeClassName?(T=B("inline-flex items-center rounded-md px-1.5 py-0.5 text-[10px] font-medium",i.badgeClassName),e[26]=i.badgeClassName,e[27]=T):T=e[27],e[28]!==i.label||e[29]!==T?(r=s.jsx("span",{className:T,children:i.label}),e[28]=i.label,e[29]=T,e[30]=r):r=e[30],d=j&&s.jsx("span",{className:B("text-[11px] text-muted-foreground",j.overdue&&"text-red-600"),children:j.label}),e[0]=n,e[1]=l.dueDate,e[2]=l.id,e[3]=l.title,e[4]=a,e[5]=i.badgeClassName,e[6]=i.label,e[7]=c,e[8]=o,e[9]=r,e[10]=d,e[11]=u,e[12]=f,e[13]=p,e[14]=g,e[15]=m,e[16]=h}else c=e[7],o=e[8],r=e[9],d=e[10],u=e[11],f=e[12],p=e[13],g=e[14],m=e[15],h=e[16];let b;e[31]!==c||e[32]!==r||e[33]!==d?(b=s.jsxs("div",{className:c,children:[r,d]}),e[31]=c,e[32]=r,e[33]=d,e[34]=b):b=e[34];let D;return e[35]!==o||e[36]!==b||e[37]!==u||e[38]!==f||e[39]!==p||e[40]!==g||e[41]!==m||e[42]!==h?(D=s.jsxs("button",{type:u,draggable:f,onDragStart:p,onClick:g,className:m,title:h,children:[o,b]}),e[35]=o,e[36]=b,e[37]=u,e[38]=f,e[39]=p,e[40]=g,e[41]=m,e[42]=h,e[43]=D):D=e[43],D}function Wt(t){const e=M.c(28),{item:l,assignee:n,onOpen:a}=t,i=U[l.status],c=i.icon;let o;e[0]!==i.iconClassName?(o=B("shrink-0",i.iconClassName),e[0]=i.iconClassName,e[1]=o):o=e[1];let r;e[2]!==c||e[3]!==o?(r=s.jsx(c,{size:15,className:o}),e[2]=c,e[3]=o,e[4]=r):r=e[4];let d;e[5]!==l.title?(d=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=d):d=e[6];const u=ye[l.priority];let f;e[7]!==u.badgeClassName?(f=B("shrink-0 text-[10px]",u.badgeClassName),e[7]=u.badgeClassName,e[8]=f):f=e[8];const p=ye[l.priority];let g;e[9]!==f||e[10]!==p.label?(g=s.jsx(Nt,{className:f,children:p.label}),e[9]=f,e[10]=p.label,e[11]=g):g=e[11];let m;e[12]!==l.dueDate?(m=l.dueDate&&s.jsx(Gt,{iso:l.dueDate}),e[12]=l.dueDate,e[13]=m):m=e[13];let h;e[14]!==n?(h=n&&s.jsx(Be,{url:n.user?.image??void 0,fallback:$e(n.user?.name),shape:"circle",size:"2xs"}),e[14]=n,e[15]=h):h=e[15];let b;e[16]!==l.createdAt?(b=Ct(new Date(l.createdAt)),e[16]=l.createdAt,e[17]=b):b=e[17];let D;e[18]!==b?(D=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:b}),e[18]=b,e[19]=D):D=e[19];let j;return e[20]!==a||e[21]!==D||e[22]!==r||e[23]!==d||e[24]!==g||e[25]!==m||e[26]!==h?(j=s.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[r,d,g,m,h,D]}),e[20]=a,e[21]=D,e[22]=r,e[23]=d,e[24]=g,e[25]=m,e[26]=h,e[27]=j):j=e[27],j}const js=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ct,default:qt},Symbol.toStringTag,{value:"Module"}));export{U as S,ct as T,js as i,Pt as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,a5 as ce,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as de,j as l,a7 as Ns,i as zs,B as Z,aL as Sn,t as ue,$ as Cs,L as $s,e as Ps,b as Nn,u as zn,U as Tt}from"./index-Xcp-N_U6.js";import{i as Es}from"./ChevronRight-BBhD0GlM.js";import{s as Cn}from"./Eye-wD3Z38PE.js";import{n as Ve,i as yt}from"./Globe01-V_BINrXN.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-r0vOUHRG.js";import{a as ht}from"./Palette-BuGkGM46.js";import{s as Os}from"./Plus-Dt-omGh0.js";import{i as Rs}from"./SearchLg-BYQJRZCi.js";import{t as As}from"./Stars01-DJjxGHI-.js";import{i as mt}from"./Upload01-BuA9ot87.js";import{s as Pn}from"./XClose-D0NVkf_i.js";import{i as qt}from"./Zap-CUvuhi9A.js";import{u as En}from"./use-mobile-Dkgnu8T2.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-CUjDTN7-.js";import{D as Dn,a as Ue,d as Je,e as et,g as Tn,f as Vs,c as Xs}from"./dialog-B61dhXu_.js";import{I as Xe}from"./input-DI99t5q0.js";import{S as ae}from"./skeleton-C0UA8wWi.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-D1JH2mH0.js";import{T as Qs}from"./toolbar-DEi9uqBh.js";import{a as Ys}from"./Package-B-bqdvW9.js";import{u as Zs}from"./use-debounced-value-lP8dZ8tm.js";import{i as vt}from"./DotsVertical-Br5Af1Wu.js";import{i as Mn}from"./Key01-BNxG1v7t.js";import{s as wt}from"./Trash01-mZHwgp1-.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-DLTuMo7E.js";import{T as Js}from"./textarea-QB4oL1jQ.js";import{t as el}from"./ChevronDown-DsnzNuQT.js";import{n as tl}from"./ChevronUp-D6Q_nkfA.js";import{i as pt}from"./X-YIvA-_pe.js";import{a as nl,P as sl,b as ll}from"./popover-a3AYr8FM.js";import{T as ye,a as ve,b as we}from"./tooltip-DtvF0ixx.js";import{i as rl}from"./Check-BNJ1r_ZZ.js";import{a as il}from"./Copy01-BAu4Xj0C.js";import{n as In}from"./LinkExternal01-D-CtyHyW.js";import{l as ol,F as al}from"./index-u-LoOG2E.js";import{i as cl}from"./LayoutLeft-BPk_1GqZ.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=ce();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=ce();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=ce();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=ce();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=ce();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=ce();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=ce();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=ce();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
|
|
1
|
+
import{c as $,a5 as ce,n as Ze,d as We,K as Q,m as ie,aY as kn,r as k,ap as Ss,l as de,j as l,a7 as Ns,i as zs,B as Z,aL as Sn,t as ue,$ as Cs,L as $s,e as Ps,b as Nn,u as zn,U as Tt}from"./index-DSn_1D7b.js";import{i as Es}from"./ChevronRight-D4jesAkw.js";import{s as Cn}from"./Eye-Z74BlA3H.js";import{n as Ve,i as yt}from"./Globe01-B0Trj5Ay.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,d as Ls}from"./ZoomOut-HiEViCQt.js";import{a as ht}from"./Palette-COkzmwuD.js";import{s as Os}from"./Plus-DZ8Y2lWX.js";import{i as Rs}from"./SearchLg-DCnLlGR7.js";import{t as As}from"./Stars01-BBDTresZ.js";import{i as mt}from"./Upload01-DwHzJTDj.js";import{s as Pn}from"./XClose-Cy2zn03A.js";import{i as qt}from"./Zap-rVhVjFMk.js";import{u as En}from"./use-mobile-CkmVE_-7.js";import{f as _s,a as Us,b as Bs,c as Hs,d as qs,e as Ks,A as Ws,g as Gs}from"./alert-dialog-DDJF6hNh.js";import{D as Dn,a as Ue,d as Je,e as et,g as Tn,f as Vs,c as Xs}from"./dialog-mPkr-RRK.js";import{I as Xe}from"./input-nFXBUvLG.js";import{S as ae}from"./skeleton-CcEQud32.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-C6k5FmYJ.js";import{T as Qs}from"./toolbar-CC2Wp6FF.js";import{a as Ys}from"./Package-BC8j5O7T.js";import{u as Zs}from"./use-debounced-value-DaMxSpzh.js";import{i as vt}from"./DotsVertical-CkzUgpIb.js";import{i as Mn}from"./Key01-DlSVTdTy.js";import{s as wt}from"./Trash01-B9pw3Dz-.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-B0v0032v.js";import{T as Js}from"./textarea-Dl16KMAC.js";import{t as el}from"./ChevronDown-BVsraXi6.js";import{n as tl}from"./ChevronUp-G9frUDJZ.js";import{i as pt}from"./X-bCYPxEGT.js";import{a as nl,P as sl,b as ll}from"./popover-CgzT12BA.js";import{T as ye,a as ve,b as we}from"./tooltip-M_e_krSv.js";import{i as rl}from"./Check-BEeJ8fxa.js";import{a as il}from"./Copy01-DyXaUHnt.js";import{n as In}from"./LinkExternal01-8ULSUK9E.js";import{l as ol,F as al}from"./index-D7lYswsa.js";import{i as cl}from"./LayoutLeft-CPcvIk6j.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=ce();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=ce();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=ce();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=ce();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=ce();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:kn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Fo(n){const e=$.c(8),{org:t}=ce();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function ml(n){return{volume:n.volume,path:n.path}}async function Mo(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Io(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&a.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function Rn(){const n=$.c(7),{org:e}=ce();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=ce();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Gt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Vt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Vt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Gn)!==0,r=(e&Vn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:on(n),b:on(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function on(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Gn=2,Vn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Ml?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Gt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Gt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Gt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=Jn(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function an(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Gl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},o=ns(e);return(r=i[o])!==null&&r!==void 0?r:null}function Vl(n,e,t,s,r){var i;const o=ts(n),a=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Vt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});an(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Vl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return V(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Gl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});an(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let oe=Hl(T,S,Y,te,E,H);const at=Y==="horizontal";at&&O&&(oe=-oe);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Lt(S,oe<0?Wn:Gn):Lt(S,oe<0?Vn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Yn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Vt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Lo(n){return`/${sr(n)}`}const Oo=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ro(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Ao(n,e){return e==="directory"?n:rr(n)}function _o(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Uo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Bo(n,e){return ir(n)>=lr&&!e.has(n)}function Ho(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function qo(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function or(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ko(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Wo(n,e=[]){const t={children:[]},s=i=>{const a=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Ut(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function ar(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...ar(r.children,e,t+1)));return s}function Go(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}ol.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=Ns(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=or(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(zs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==o||e[8]!==a||e[9]!==t?(h=l.jsx(al,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function os(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const dr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),ur=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),hn=2*1024*1024;function fr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return dr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=hn?"markdown":"download":ur.has(t)&&e<=hn?"text":"download"}function as(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ae,{className:"h-3 w-full"}),l.jsx(ae,{className:"h-3 w-5/6"}),l.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function cs(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=os(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ve,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function mn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==r||e[5]!==i?(o={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(as,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=l.jsx(cs,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==a||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Kt,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=l.jsx(cr,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function ds(n){const e=$.c(15),{file:t}=n;switch(fr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(mn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(mn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(cs,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function hr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(cl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=l.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:a,children:f}),e[8]=a,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Sn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:de(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Ts,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==a||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ve,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[l.jsx(Fs,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:a,download:r,children:[l.jsx(Ms,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:a,download:r,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(In,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function mr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function us(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function pr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?us(t).length:null}function xr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=us(s),i=e.kind==="move"?e.from:e.at,o=r[i];if(!o)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|