decocms 4.91.11 → 4.91.12

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.
Files changed (231) hide show
  1. package/dist/client/assets/{AlertCircle-YTnC8afg.js → AlertCircle-MiSPXNM6.js} +1 -1
  2. package/dist/client/assets/{AreaChart-r1F-84pn.js → AreaChart-LO_FyVEE.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-CsHPcA9e.js → ArrowUp-CYp-fH3b.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-Cz4lk-G7.js → ArrowUpRight-BKWmlm-S.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-msR6mCMy.js → CheckCircle-CAS4qDUe.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-BxiHFmLr.js → ChevronDown-DX5Tgk2V.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-DLwXGp3J.js → ChevronRight-BtPKpVmg.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-Bga41moq.js → ChevronUp-aSduSXZP.js} +1 -1
  9. package/dist/client/assets/{Copy01-DARrnqyO.js → Copy01-B8XCt5Zb.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-Bym0eepo.js → DotsVertical-CbVNRQTJ.js} +1 -1
  11. package/dist/client/assets/{Eye-Q93iqzOQ.js → Eye-CqAIUvR9.js} +1 -1
  12. package/dist/client/assets/{FilterLines-D_2Uzy3T.js → FilterLines--YHdOfYC.js} +1 -1
  13. package/dist/client/assets/{Globe01-CHaqz7lY.js → Globe01-B1n4lMzM.js} +1 -1
  14. package/dist/client/assets/{Globe04-CsR3hp-R.js → Globe04-CpcrEsco.js} +1 -1
  15. package/dist/client/assets/{HardDrive-CifwuQMq.js → HardDrive-CBMVcXrD.js} +1 -1
  16. package/dist/client/assets/{Image01-LZ6tNZCh.js → Image01-BFJWA7zB.js} +1 -1
  17. package/dist/client/assets/{Key01-DxBlOWSP.js → Key01-1lxi5YQi.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-PG1Qj8HR.js → LayoutLeft-yM1pyLkw.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-Cs8W9Hry.js → LinkExternal01-DlZXS744.js} +1 -1
  20. package/dist/client/assets/{Monitor01-DNXO5Xap.js → Monitor01-D9tr7pGV.js} +1 -1
  21. package/dist/client/assets/{Package-CDgO9FJo.js → Package-B15um8UB.js} +1 -1
  22. package/dist/client/assets/{Palette-DZ-mRtqH.js → Palette-CYu9EeqY.js} +1 -1
  23. package/dist/client/assets/{Play-D_gsJbBN.js → Play-BKYeFdfo.js} +1 -1
  24. package/dist/client/assets/{Plus-BQNlkQW1.js → Plus-xyC5kVx_.js} +1 -1
  25. package/dist/client/assets/{SearchLg-DecRz7CF.js → SearchLg-Bvhw6tXa.js} +1 -1
  26. package/dist/client/assets/{SearchMd-DlQrvAOj.js → SearchMd-8QLR6foG.js} +1 -1
  27. package/dist/client/assets/{Settings02-C5QKkVyV.js → Settings02-Bk_p4b4f.js} +1 -1
  28. package/dist/client/assets/{Shield01-DsqpIdPl.js → Shield01-CapY8w0F.js} +1 -1
  29. package/dist/client/assets/{Star01-BA5icFDw.js → Star01-t1ebJ4NM.js} +1 -1
  30. package/dist/client/assets/{Stars01-sFKBel8a.js → Stars01-CzwHMMGV.js} +1 -1
  31. package/dist/client/assets/{Stars02-DT4DCiSm.js → Stars02-DVkXvQJE.js} +1 -1
  32. package/dist/client/assets/{Sun-BaW8iMzc.js → Sun-CJn0L0BD.js} +1 -1
  33. package/dist/client/assets/{SwitchHorizontal01-CF9jPebn.js → SwitchHorizontal01-83gXOmJr.js} +1 -1
  34. package/dist/client/assets/{Tool01-Cv1CkSYA.js → Tool01-DPFYhxQw.js} +1 -1
  35. package/dist/client/assets/{Tool02-BpdaUfQm.js → Tool02-BZ4d3qZ4.js} +1 -1
  36. package/dist/client/assets/{Trash01-DCAfzqJq.js → Trash01-BZWy8uav.js} +1 -1
  37. package/dist/client/assets/{TrendUp01-Do2A0b1V.js → TrendUp01-DZ3NZVPO.js} +1 -1
  38. package/dist/client/assets/{Upload01-BkSfT9PJ.js → Upload01-CQv4QkPs.js} +1 -1
  39. package/dist/client/assets/{User01-BFiYGCaZ.js → User01-DHhJ9Efj.js} +1 -1
  40. package/dist/client/assets/{Users01-1er0h3V-.js → Users01-BDzOY7VS.js} +1 -1
  41. package/dist/client/assets/{Users03-DtnR2O5U.js → Users03-DfBzNWCj.js} +1 -1
  42. package/dist/client/assets/{X-DXB1dhTC.js → X-BE13dUVX.js} +1 -1
  43. package/dist/client/assets/{XCircle-ru8_z274.js → XCircle-DBu_5MRx.js} +1 -1
  44. package/dist/client/assets/{XClose-CoJnbAb8.js → XClose-B6C-UBKb.js} +1 -1
  45. package/dist/client/assets/{Zap-E8p7rYFy.js → Zap-DfliSzHo.js} +1 -1
  46. package/dist/client/assets/{ZapSquare-BzcFU97i.js → ZapSquare-DjeDqWhA.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-5R0ZYe_g.js → ZoomOut-Cfc1dYbx.js} +1 -1
  48. package/dist/client/assets/{access-gate-BPlY-Y1J.js → access-gate-DbPqK0_K.js} +1 -1
  49. package/dist/client/assets/{add-section-modal-CpdpSu9R.js → add-section-modal-3xbWjEER.js} +1 -1
  50. package/dist/client/assets/{agent-icon-YtqF2nfc.js → agent-icon-mosHW1Wm.js} +1 -1
  51. package/dist/client/assets/{agents-list-BVHtxC6T.js → agents-list-vIhax4yb.js} +1 -1
  52. package/dist/client/assets/{ai-providers-CFnMMVc4.js → ai-providers-CLKfEF55.js} +1 -1
  53. package/dist/client/assets/{alert-0JJ8EN_-.js → alert-XU0hMS-y.js} +1 -1
  54. package/dist/client/assets/{alert-dialog-B2HLXbcZ.js → alert-dialog-0iCg_Dy8.js} +1 -1
  55. package/dist/client/assets/{app-editor-DLGS9bxS.js → app-editor-3YgoQYY_.js} +1 -1
  56. package/dist/client/assets/{auth-upuRD_Ra.js → auth-Fypm4NkM.js} +1 -1
  57. package/dist/client/assets/{auth-catchall-RVJFFjO3.js → auth-catchall-PP-1pdNx.js} +1 -1
  58. package/dist/client/assets/{auth-entry-Dx0c5C-O.js → auth-entry-84tV5M7Z.js} +1 -1
  59. package/dist/client/assets/{auth-split-layout-By_6XZA_.js → auth-split-layout-DRcnmbOk.js} +1 -1
  60. package/dist/client/assets/{authenticate-and-persist-oauth-IFB7ccAP.js → authenticate-and-persist-oauth-B2msnFcH.js} +1 -1
  61. package/dist/client/assets/{automation-list-row-DrxN0DJn.js → automation-list-row-BQOMvlC2.js} +1 -1
  62. package/dist/client/assets/{automation-runs-DsF8E4ym.js → automation-runs-BnrgVUSd.js} +1 -1
  63. package/dist/client/assets/{automations-CPCTLWz7.js → automations-Ct6ExTiE.js} +1 -1
  64. package/dist/client/assets/{autosend-CgK0T1el.js → autosend-NDbr__lx.js} +1 -1
  65. package/dist/client/assets/{avatar-ZVqnpQ5L.js → avatar-CYb8sgBh.js} +1 -1
  66. package/dist/client/assets/{badge-C87ClbXM.js → badge-CusDamT1.js} +1 -1
  67. package/dist/client/assets/{block-document-Bi40-54p.js → block-document-BuU9VrUR.js} +1 -1
  68. package/dist/client/assets/{brand-context-rE1prJbi.js → brand-context-fJCzudVZ.js} +1 -1
  69. package/dist/client/assets/{buckets-dWQpBccQ.js → buckets-CbU-5hM4.js} +1 -1
  70. package/dist/client/assets/{bulk-category-panel-DFZuQ2iG.js → bulk-category-panel-YjoW0sXc.js} +1 -1
  71. package/dist/client/assets/{calendar-AptmavaL.js → calendar-Dwd1mrtZ.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-Dv7kyxUO.js → capability-load-error-B2q-Thd5.js} +1 -1
  73. package/dist/client/assets/{card-l_QjAxij.js → card-WylyHbwK.js} +1 -1
  74. package/dist/client/assets/{category-editor-Se9AlVSY.js → category-editor-CsV4gvYg.js} +1 -1
  75. package/dist/client/assets/{chat-context-DTjr0Dbi.js → chat-context-BxxYRsfc.js} +1 -1
  76. package/dist/client/assets/{checkbox-CeSxNCqq.js → checkbox-CalBxksB.js} +1 -1
  77. package/dist/client/assets/{cli-auth-success-BPtqZb5J.js → cli-auth-success-eLMd1Y_3.js} +1 -1
  78. package/dist/client/assets/{collection-detail-18MEEH7S.js → collection-detail-Cna-Oere.js} +1 -1
  79. package/dist/client/assets/{collection-display-button-BfD4uhKP.js → collection-display-button-B__bndzp.js} +1 -1
  80. package/dist/client/assets/{collection-search-f7Ru4qfg.js → collection-search-DT85R55j.js} +1 -1
  81. package/dist/client/assets/{collection-table-wrapper-DLMKd85x.js → collection-table-wrapper-BciwJHp1.js} +1 -1
  82. package/dist/client/assets/{collection-tabs-p5cUCtS8.js → collection-tabs-B4HCiR6C.js} +1 -1
  83. package/dist/client/assets/{command-BFxbzakL.js → command-BUpgxLnZ.js} +1 -1
  84. package/dist/client/assets/{commerce-onboarding-f_pP7oZp.js → commerce-onboarding-CdxJylN6.js} +1 -1
  85. package/dist/client/assets/{companions-core-CMcgv8ia.js → companions-core-DJw87u__.js} +1 -1
  86. package/dist/client/assets/{connect-desktop-dialog-CKzM8gkD.js → connect-desktop-dialog-D5ifrfV1.js} +1 -1
  87. package/dist/client/assets/{connection-card-DH3iT98s.js → connection-card-DR_O5uZl.js} +1 -1
  88. package/dist/client/assets/{connection-detail-Bc18y7fV.js → connection-detail-ZrNfRujb.js} +1 -1
  89. package/dist/client/assets/{connection-form-helpers-CBuwXrmH.js → connection-form-helpers-3AkHW_P5.js} +1 -1
  90. package/dist/client/assets/{connections-995S4ms5.js → connections-CBFa5yX-.js} +1 -1
  91. package/dist/client/assets/{decopilot-sse-pool-BmlS6-Nb.js → decopilot-sse-pool-aNfj8Q7u.js} +1 -1
  92. package/dist/client/assets/{dialog-CG3DUz7s.js → dialog-BFEhZp6A.js} +1 -1
  93. package/dist/client/assets/{domain-settings-TdoSG2yJ.js → domain-settings-SuLCS4rq.js} +1 -1
  94. package/dist/client/assets/{drawer-Dt9mWC4s.js → drawer-Cg-ser7v.js} +1 -1
  95. package/dist/client/assets/{dropdown-menu-tljvyOZC.js → dropdown-menu-C1ojGxZa.js} +1 -1
  96. package/dist/client/assets/{empty-state-CDPR6N5z.js → empty-state-CY2Mh10-.js} +1 -1
  97. package/dist/client/assets/{extract-connection-data-B6BkC0Qi.js → extract-connection-data-eD6jRJ-R.js} +1 -1
  98. package/dist/client/assets/{file-explorer-BxVOn9te.js → file-explorer-B5yAIPx8.js} +1 -1
  99. package/dist/client/assets/{file-type-icon-WXISwa9J.js → file-type-icon-CqvPRhZz.js} +1 -1
  100. package/dist/client/assets/{files-Caer-sGX.js → files-CJHNBbYI.js} +1 -1
  101. package/dist/client/assets/{form-DYE3hpCm.js → form-Du6A_UHt.js} +1 -1
  102. package/dist/client/assets/{general-B4LATrRX.js → general-BWgcDqvs.js} +1 -1
  103. package/dist/client/assets/{github-repo-picker-CCc_BK8m.js → github-repo-picker-D0k_58eA.js} +1 -1
  104. package/dist/client/assets/{hooks-D6g_xzzz.js → hooks-DuvOlhew.js} +1 -1
  105. package/dist/client/assets/{index-Ctu9THdb.js → index-ArAggKqv.js} +1 -1
  106. package/dist/client/assets/{index-CoWtXqSh.js → index-BEMBybQS.js} +1 -1
  107. package/dist/client/assets/{index-Dr1ekyf5.js → index-BNnarL09.js} +1 -1
  108. package/dist/client/assets/{index-DNynZfJw.js → index-C1-w91sI.js} +1 -1
  109. package/dist/client/assets/{index-FxbvscrH.js → index-C3kB1WBh.js} +1 -1
  110. package/dist/client/assets/{index-CPG668bW.js → index-CIr2stgr.js} +5 -5
  111. package/dist/client/assets/{index-k_A1H4m6.js → index-CKVu-2WY.js} +2 -2
  112. package/dist/client/assets/{index-CwBrj8E9.js → index-CRpcM2qG.js} +1 -1
  113. package/dist/client/assets/{index-LoDEgrVX.js → index-CmGFMd5y.js} +1 -1
  114. package/dist/client/assets/{index-B7P9L1Cb.js → index-DNcmUp59.js} +3 -3
  115. package/dist/client/assets/{index-B9MaZ5Q2.js → index-DrZwGRlZ.js} +1 -1
  116. package/dist/client/assets/{index-Bb9atgOb.js → index-FoCyv0Sm.js} +1 -1
  117. package/dist/client/assets/{index-Cl1ecNpO.js → index-SGRevHaa.js} +1 -1
  118. package/dist/client/assets/{index-Cqfo9Bs1.js → index-fVc1EX-x.js} +1 -1
  119. package/dist/client/assets/{index-redirect-bMVrgNkk.js → index-redirect-Ba24lW1z.js} +1 -1
  120. package/dist/client/assets/{input-ijcl7nEP.js → input-DDSyA2F6.js} +1 -1
  121. package/dist/client/assets/{integration-icon-Bs2sf2JV.js → integration-icon-BHTX5a7j.js} +1 -1
  122. package/dist/client/assets/{invite-member-dialog-BG79j3SS.js → invite-member-dialog-DQpZ0yZV.js} +1 -1
  123. package/dist/client/assets/{label-9EwRfhPm.js → label-CCdy2D-Q.js} +1 -1
  124. package/dist/client/assets/{layout-CoFIzs5y.js → layout-Dl3uVTaN.js} +1 -1
  125. package/dist/client/assets/{login-CTRvbVhT.js → login-DqIQDTJA.js} +1 -1
  126. package/dist/client/assets/{mcp-oauth-CH3qppcA.js → mcp-oauth-yniCAgpj.js} +1 -1
  127. package/dist/client/assets/{members-DtMJTdgX.js → members-Cs4YqwLD.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-BZaLhjRg.js → monaco-editor--HzZeIWV.js} +1 -1
  129. package/dist/client/assets/{monitoring-stats-row-CDsDJwrt.js → monitoring-stats-row-C5LM7UJr.js} +1 -1
  130. package/dist/client/assets/{multi-select-BGWrQ48I.js → multi-select-BGcQG_lB.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-DM-7poTT.js → oauth-callback-D-kdjDOv.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-ai-provider-C4p0eWCN.js → oauth-callback-ai-provider-B0DFO8fm.js} +1 -1
  133. package/dist/client/assets/{onboarding-DY1OhJLH.js → onboarding-DpHJ7w-r.js} +1 -1
  134. package/dist/client/assets/{org-install-0z9ZNczQ.js → org-install-CxpS9gLo.js} +1 -1
  135. package/dist/client/assets/{org-layout-DmogS3SJ.js → org-layout-3bSXbaog.js} +1 -1
  136. package/dist/client/assets/{organization-choice-DAeKb5Zw.js → organization-choice-B-ZHCNtO.js} +1 -1
  137. package/dist/client/assets/{orgs-CW3vZ2sV.js → orgs-C5l678eN.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-C6Ph0y-Y.js → page-seo-form-DqfLsPX0.js} +1 -1
  139. package/dist/client/assets/page-seo-sheet-8MLpK_D_.js +1 -0
  140. package/dist/client/assets/{popover-T38vYiZh.js → popover-DIFPu1Xc.js} +1 -1
  141. package/dist/client/assets/{post-editor-B-4J2cfY.js → post-editor-B_vVsr1R.js} +1 -1
  142. package/dist/client/assets/{primitives-6GMsWgg4.js → primitives-DUUf88_v.js} +1 -1
  143. package/dist/client/assets/{profile-B9X0sBeA.js → profile-m7EwVGGJ.js} +1 -1
  144. package/dist/client/assets/project-app-view-C06Q3gHP.js +1 -0
  145. package/dist/client/assets/record-editor-CneW0aNh.js +1 -0
  146. package/dist/client/assets/redirect-editor-BM0Dz1wp.js +1 -0
  147. package/dist/client/assets/registry-DUpM8igX.js +2 -0
  148. package/dist/client/assets/{registry-layout-QkvH4Iko.js → registry-layout-DgAAeCt4.js} +1 -1
  149. package/dist/client/assets/{reports-BesfUyZi.js → reports-DMtXyxn-.js} +1 -1
  150. package/dist/client/assets/{require-capability-Dn1UZZlf.js → require-capability-BV_lddCN.js} +1 -1
  151. package/dist/client/assets/{required-auth-layout-lFMnY-UF.js → required-auth-layout-Bo8cZozY.js} +1 -1
  152. package/dist/client/assets/{reset-password-CY4XiNiU.js → reset-password-DnCXkc3E.js} +1 -1
  153. package/dist/client/assets/{roles-CBUHSLpn.js → roles-vcDpbe-t.js} +1 -1
  154. package/dist/client/assets/{search-input-DyxEg05L.js → search-input-DaPZylE4.js} +1 -1
  155. package/dist/client/assets/{secrets-BxHlZk3d.js → secrets-vi6xKg2f.js} +1 -1
  156. package/dist/client/assets/{sections-editor-C_izdspB.js → sections-editor-BRcKO3kf.js} +1 -1
  157. package/dist/client/assets/{select-jpq2sMjS.js → select-ekdvRgqD.js} +1 -1
  158. package/dist/client/assets/{select-model-CFdq_S_o.js → select-model-BY-QBGvY.js} +1 -1
  159. package/dist/client/assets/{self-tool-result-CRyN2bhn.js → self-tool-result-OkB9X-VR.js} +1 -1
  160. package/dist/client/assets/{seo-editor-C46eHaAF.js → seo-editor-BeBOVN0j.js} +1 -1
  161. package/dist/client/assets/{settings-layout-DxZVAEGZ.js → settings-layout-BpXE2LD2.js} +1 -1
  162. package/dist/client/assets/{settings-section-BYOwHA7v.js → settings-section-Q2P_qubH.js} +1 -1
  163. package/dist/client/assets/{shell-controls-Cx4l-G0K.js → shell-controls-Bgui1PgN.js} +1 -1
  164. package/dist/client/assets/{shell-layout-CzqPzueH.js → shell-layout-CQ6ltpQl.js} +1 -1
  165. package/dist/client/assets/{sidebar-DMP6qx_d.js → sidebar-DDK4qW6D.js} +1 -1
  166. package/dist/client/assets/{skeleton-BoztpE77.js → skeleton-6cCuJZrU.js} +1 -1
  167. package/dist/client/assets/{sso-wdUuQpds.js → sso-xRbarIPf.js} +1 -1
  168. package/dist/client/assets/{store-v9DNwQ8I.js → store-cgCqLduL.js} +1 -1
  169. package/dist/client/assets/store-registry-Z_BUzLtq.js +2 -0
  170. package/dist/client/assets/{studio-tools-C9ARrYBL.js → studio-tools-WPp0LYJS.js} +1 -1
  171. package/dist/client/assets/{switch-CtD3Qolf.js → switch-BlqfjViK.js} +1 -1
  172. package/dist/client/assets/{table-NZu1_-b5.js → table-DeKx66kZ.js} +1 -1
  173. package/dist/client/assets/{tabs-DKFaLepz.js → tabs-BPdfqZi2.js} +1 -1
  174. package/dist/client/assets/{textarea-C_uRm2JY.js → textarea-CNjMDqlK.js} +1 -1
  175. package/dist/client/assets/{toggle-group-DmguQTgj.js → toggle-group-ppOZTb8V.js} +1 -1
  176. package/dist/client/assets/{toolbar-B86IfpSP.js → toolbar-flT__B79.js} +1 -1
  177. package/dist/client/assets/{toolbar-icon-button-DRxPDpTN.js → toolbar-icon-button-CDgOWAO8.js} +1 -1
  178. package/dist/client/assets/{tooltip-CnYyAlKq.js → tooltip-DQLZzXJB.js} +1 -1
  179. package/dist/client/assets/{use-ai-providers-BRWjkOZS.js → use-ai-providers-DnwQLbXU.js} +1 -1
  180. package/dist/client/assets/{use-automations-BOwp0Ljv.js → use-automations-DHtFgmxU.js} +1 -1
  181. package/dist/client/assets/{use-autosave-y8W9Kw5f.js → use-autosave-BlvLM2-d.js} +1 -1
  182. package/dist/client/assets/{use-capability-uuWJKK6o.js → use-capability-B-0Wa4-2.js} +1 -1
  183. package/dist/client/assets/{use-clock-tick-CEBh96YJ.js → use-clock-tick-CBlyuXH9.js} +1 -1
  184. package/dist/client/assets/{use-collections-CmKRIAjf.js → use-collections-CGy1V_t9.js} +1 -1
  185. package/dist/client/assets/{use-connection-0zoba2rw.js → use-connection-axeygVvB.js} +1 -1
  186. package/dist/client/assets/{use-copy-DMtwPA-6.js → use-copy-LZ_imZVK.js} +1 -1
  187. package/dist/client/assets/{use-create-virtual-mcp-DUr2zkfr.js → use-create-virtual-mcp-CWtChbE0.js} +1 -1
  188. package/dist/client/assets/{use-debounced-autosave-CoaXX8r3.js → use-debounced-autosave-wfWymBSV.js} +1 -1
  189. package/dist/client/assets/{use-debounced-value-BUQ43bVg.js → use-debounced-value-CzZtnfG7.js} +1 -1
  190. package/dist/client/assets/{use-deco-credits-DNevOr5z.js → use-deco-credits-ndGlyzP0.js} +1 -1
  191. package/dist/client/assets/{use-decopilot-events-DnuUXtfc.js → use-decopilot-events-DPxVgd9c.js} +1 -1
  192. package/dist/client/assets/{use-delete-connection-BmQIm0M5.js → use-delete-connection-B3y7UIDp.js} +1 -1
  193. package/dist/client/assets/{use-deployment-admin--CuCM251.js → use-deployment-admin-DyueCQ_g.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-Bok_4-BR.js → use-file-configs-Bc5xSoNA.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-U-AFCkvY.js → use-infinite-scroll-Ci4rO-EC.js} +1 -1
  196. package/dist/client/assets/{use-join-requests-DvMc9Cv5.js → use-join-requests-DIPGr6fh.js} +1 -1
  197. package/dist/client/assets/{use-mcp-auth-status-BIkbUDPa.js → use-mcp-auth-status-BA-qrTSs.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-C_pdV6jn.js → use-mcp-client-D36DD3hp.js} +1 -1
  199. package/dist/client/assets/{use-mcp-tools-LZPhuCV-.js → use-mcp-tools-DsOswbCa.js} +1 -1
  200. package/dist/client/assets/{use-members-B8qEqUk4.js → use-members-B0Qnra6P.js} +1 -1
  201. package/dist/client/assets/{use-mobile-DbAQzyDT.js → use-mobile-C7gDKZvn.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-CMgclBRY.js → use-navigate-to-agent-lZlBuBHo.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-DI2haDb4.js → use-org-auth-client-CTuAh9l1.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-C0aWoC2y.js → use-org-sso-Deo4Br8l.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-SOl4aVm4.js → use-organization-roles-CxxgW_Y9.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-BqvY7w8Y.js → use-organization-settings-qGG--pic.js} +1 -1
  207. package/dist/client/assets/{use-registry-app-DELF31ZQ.js → use-registry-app-wuhdI0AX.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-BXi8EgPf.js → use-registry-connections-CmJKnJO4.js} +1 -1
  209. package/dist/client/assets/{use-secrets-BQ4MA-8c.js → use-secrets-BwXqRBu3.js} +1 -1
  210. package/dist/client/assets/{use-status-sounds-DxeYG164.js → use-status-sounds-CVj3zpTq.js} +1 -1
  211. package/dist/client/assets/{use-t-PEFPXiWR.js → use-t-CX9UNock.js} +1 -1
  212. package/dist/client/assets/{use-view-mode-C3_A6re_.js → use-view-mode-D3h-_YED.js} +1 -1
  213. package/dist/client/assets/{use-virtual-mcp-DCm-Xozi.js → use-virtual-mcp-DWAHiTJI.js} +1 -1
  214. package/dist/client/assets/useInfiniteQuery-DxqaPoxE.js +1 -0
  215. package/dist/client/assets/{useRouterState-CWk9XgjR.js → useRouterState-Be-3ZIf9.js} +1 -1
  216. package/dist/client/assets/useSuspenseInfiniteQuery-C-ppQ5Ml.js +1 -0
  217. package/dist/client/assets/{users-OcUlcCx0.js → users-DL6-b6f1.js} +1 -1
  218. package/dist/client/assets/{variant-calendar-lGbDft8h.js → variant-calendar-DfG0Byg3.js} +1 -1
  219. package/dist/client/assets/{view-mode-toggle-DfeJ1FpB.js → view-mode-toggle-C3wie4a8.js} +1 -1
  220. package/dist/client/index.html +1 -1
  221. package/dist/server/cli.js +263 -263
  222. package/dist/server/server.js +186 -186
  223. package/package.json +1 -1
  224. package/dist/client/assets/page-seo-sheet-D9B8neKW.js +0 -1
  225. package/dist/client/assets/project-app-view-zQqd_KrQ.js +0 -1
  226. package/dist/client/assets/record-editor-YHhKfSlI.js +0 -1
  227. package/dist/client/assets/redirect-editor-DX72bV7o.js +0 -1
  228. package/dist/client/assets/registry-B1SHlSFp.js +0 -2
  229. package/dist/client/assets/store-registry-DIM1e1x-.js +0 -2
  230. package/dist/client/assets/useInfiniteQuery-B9seebWc.js +0 -1
  231. package/dist/client/assets/useSuspenseInfiniteQuery-C25zLgs8.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as m,j as p,c as V,aX as v}from"./index-B7P9L1Cb.js";import{l as I,F as $}from"./index-CoWtXqSh.js";import{S as N}from"./chat-context-DTjr0Dbi.js";import{d as D}from"./delay-CnY5UFtP.js";function C(t){return Math.ceil(t.length*3/4)}function X(t){const e=[];for(const r of t)switch(r.type){case"text":r.text?.trim()&&e.push({type:"paragraph",content:[{type:"text",text:r.text}]});break;case"image":case"audio":r.data&&r.mimeType&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:`${r.type}.${r.mimeType.split("/")[1]??"bin"}`,mimeType:r.mimeType,size:C(r.data),data:r.data}}]});break;case"resource":{const n=r.resource;"text"in n&&n.text?e.push({type:"paragraph",content:[{type:"text",text:n.text}]}):"blob"in n&&n.blob&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:String(n.uri),mimeType:n.mimeType??"application/octet-stream",size:C(n.blob),data:n.blob}}]});break}case"resource_link":e.push({type:"paragraph",content:[{type:"text",text:r.name??r.uri}]});break}return{type:"doc",content:e}}async function L(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.replace(/export default (async )?function/,"export default $1function __default")+`
1
+ import{r as m,j as p,c as V,aX as v}from"./index-DNcmUp59.js";import{l as I,F as $}from"./index-BEMBybQS.js";import{S as N}from"./chat-context-BxxYRsfc.js";import{d as D}from"./delay-CnY5UFtP.js";function C(t){return Math.ceil(t.length*3/4)}function X(t){const e=[];for(const r of t)switch(r.type){case"text":r.text?.trim()&&e.push({type:"paragraph",content:[{type:"text",text:r.text}]});break;case"image":case"audio":r.data&&r.mimeType&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:`${r.type}.${r.mimeType.split("/")[1]??"bin"}`,mimeType:r.mimeType,size:C(r.data),data:r.data}}]});break;case"resource":{const n=r.resource;"text"in n&&n.text?e.push({type:"paragraph",content:[{type:"text",text:n.text}]}):"blob"in n&&n.blob&&e.push({type:"paragraph",content:[{type:"file",attrs:{id:crypto.randomUUID(),name:String(n.uri),mimeType:n.mimeType??"application/octet-stream",size:C(n.blob),data:n.blob}}]});break}case"resource_link":e.push({type:"paragraph",content:[{type:"text",text:r.name??r.uri}]});break}return{type:"doc",content:e}}async function L(t){const e=t.getModel();if(!e)throw new Error("[Monaco] No model found in editor");const r=e.getValue(),i=r.replace(/export default (async )?function/,"export default $1function __default")+`
2
2
  type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
3
3
  ? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
4
4
  : T extends object
@@ -1,4 +1,4 @@
1
- import{r as f,bB as he,bx as Yr,c as ur,l as ct,j as w}from"./index-B7P9L1Cb.js";import{w as Hr,e as ke,s as ve,i as V,f as fr,r as ge,h as nt,j as dr,J as it,k as M,m as L,n as de,o as Se,p as Ee,q as re,R as ut,L as pe,t as Vr,v as Pe,x as qr,y as Ur,z as Zr,B as Xr,D as Ne,E as Ve,F as Jr,G as Qr,H as ea,I as ta,K as ze,M as Ke,N as q,O as ft,P as dt,Z as We,Q as vr,S as pr,T as mr,U as Oe,V as yr,W as ee,Y as ra,_ as hr,$ as be,a0 as aa,a1 as ie,a2 as me,a3 as oe,a4 as ye,a5 as gr,a6 as br,a7 as xr,a8 as na,a9 as ia,aa as vt,ab as oa,ac as pt,ad as la,ae as sa,af as ca,ag as ua,ah as fa,ai as Or,aj as da,ak as va,al as pa,am as ma,an as ya,ao as Pr,ap as ha,aq as jr,ar as ga,as as Ar,at as ba,au as xa,av as mt,aw as Oa,ax as Pa,ay as ja,az as Aa,aA as $,aB as ka,aC as Ia,aD as wa,aE as Sa,aF as Ea,aG as Ta,aH as Ca,aI as Da,aJ as Ma,aK as Ba,aL as $a,aM as La,aN as _a,aO as Na,aP as za,X as yt,C as ht,A as Ka,b as Wa,c as gt}from"./AreaChart-r1F-84pn.js";const kr=Math.cos,Te=Math.sin,U=Math.sqrt,Ce=Math.PI,Re=2*Ce,ot={draw(t,e){const r=U(e/Ce);t.moveTo(r,0),t.arc(0,0,r,0,Re)}},Ra={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Ir=U(1/3),Fa=Ir*2,Ga={draw(t,e){const r=U(e/Fa),a=r*Ir;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ya={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ha=.8908130915292852,wr=Te(Ce/10)/Te(7*Ce/10),Va=Te(Re/10)*wr,qa=-kr(Re/10)*wr,Ua={draw(t,e){const r=U(e*Ha),a=Va*r,n=qa*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=Re*i/5,s=kr(l),d=Te(l);t.lineTo(d*r,-s*r),t.lineTo(s*a-d*n,d*a+s*n)}t.closePath()}},Ge=U(3),Za={draw(t,e){const r=-U(e/(Ge*3));t.moveTo(0,r*2),t.lineTo(-Ge*r,-r),t.lineTo(Ge*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,qe=1/U(12),Xa=(qe/2+1)*3,Ja={draw(t,e){const r=U(e/Xa),a=r/2,n=r*qe,i=a,l=r*qe+r,s=-i,d=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(s,d),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*s-Y*d,Y*s+G*d),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*s+Y*d,G*d-Y*s),t.closePath()}};function Qa(t,e){let r=null,a=Hr(n);t=typeof t=="function"?t:ke(t||ot),e=typeof e=="function"?e:ke(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:ke(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:ke(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var en="Invariant failed";function tn(t,e){throw new Error(en)}var rn=["type","size","sizeType"];function Ue(){return Ue=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ue.apply(null,arguments)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bt(Object(r),!0).forEach(function(a){an(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function an(t,e,r){return(e=nn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nn(t){var e=on(t,"string");return typeof e=="symbol"?e:e+""}function on(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ln(t,e){if(t==null)return{};var r,a,n=sn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function sn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Sr={symbolCircle:ot,symbolCross:Ra,symbolDiamond:Ga,symbolSquare:Ya,symbolStar:Ua,symbolTriangle:Za,symbolWye:Ja},cn=Math.PI/180,un=t=>{var e="symbol".concat(fr(t));return Sr[e]||ot},fn=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*cn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},dn=(t,e)=>{Sr["symbol".concat(fr(t))]=e},Er=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=ln(t,rn),i=xt(xt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var s=()=>{var v=un(l),m=Qa().type(v).size(fn(r,a,l)),y=m();if(y!==null)return y},{className:d,cx:o,cy:c}=i,u=ve(i);return V(o)&&V(c)&&V(r)?f.createElement("path",Ue({},u,{className:he("recharts-symbols",d),transform:"translate(".concat(o,", ").concat(c,")"),d:s()})):null};Er.registerSymbol=dn;var Ot=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},vn=["radius"],pn=["radius"],Pt,jt,At,kt,It,wt,St,Et,Tt,Ct;function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(a){mn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function mn(t,e,r){return(e=yn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yn(t){var e=hn(t,"string");return typeof e=="symbol"?e:e+""}function hn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},De.apply(null,arguments)}function Bt(t,e){if(t==null)return{};var r,a,n=gn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function X(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var $t=(t,e,r,a,n)=>{var i=de(r),l=de(a),s=Math.min(Math.abs(i)/2,Math.abs(l)/2),d=l>=0?1:-1,o=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(s>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>s?s:b}u=M(Pt||(Pt=X(["M",",",""])),t,e+d*v[0]),v[0]>0&&(u+=M(jt||(jt=X(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+o*v[0],e)),u+=M(At||(At=X(["L ",",",""])),t+r-o*v[1],e),v[1]>0&&(u+=M(kt||(kt=X(["A ",",",",0,0,",`,
1
+ import{r as f,bB as he,bx as Yr,c as ur,l as ct,j as w}from"./index-DNcmUp59.js";import{w as Hr,e as ke,s as ve,i as V,f as fr,r as ge,h as nt,j as dr,J as it,k as M,m as L,n as de,o as Se,p as Ee,q as re,R as ut,L as pe,t as Vr,v as Pe,x as qr,y as Ur,z as Zr,B as Xr,D as Ne,E as Ve,F as Jr,G as Qr,H as ea,I as ta,K as ze,M as Ke,N as q,O as ft,P as dt,Z as We,Q as vr,S as pr,T as mr,U as Oe,V as yr,W as ee,Y as ra,_ as hr,$ as be,a0 as aa,a1 as ie,a2 as me,a3 as oe,a4 as ye,a5 as gr,a6 as br,a7 as xr,a8 as na,a9 as ia,aa as vt,ab as oa,ac as pt,ad as la,ae as sa,af as ca,ag as ua,ah as fa,ai as Or,aj as da,ak as va,al as pa,am as ma,an as ya,ao as Pr,ap as ha,aq as jr,ar as ga,as as Ar,at as ba,au as xa,av as mt,aw as Oa,ax as Pa,ay as ja,az as Aa,aA as $,aB as ka,aC as Ia,aD as wa,aE as Sa,aF as Ea,aG as Ta,aH as Ca,aI as Da,aJ as Ma,aK as Ba,aL as $a,aM as La,aN as _a,aO as Na,aP as za,X as yt,C as ht,A as Ka,b as Wa,c as gt}from"./AreaChart-LO_FyVEE.js";const kr=Math.cos,Te=Math.sin,U=Math.sqrt,Ce=Math.PI,Re=2*Ce,ot={draw(t,e){const r=U(e/Ce);t.moveTo(r,0),t.arc(0,0,r,0,Re)}},Ra={draw(t,e){const r=U(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Ir=U(1/3),Fa=Ir*2,Ga={draw(t,e){const r=U(e/Fa),a=r*Ir;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Ya={draw(t,e){const r=U(e),a=-r/2;t.rect(a,a,r,r)}},Ha=.8908130915292852,wr=Te(Ce/10)/Te(7*Ce/10),Va=Te(Re/10)*wr,qa=-kr(Re/10)*wr,Ua={draw(t,e){const r=U(e*Ha),a=Va*r,n=qa*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=Re*i/5,s=kr(l),d=Te(l);t.lineTo(d*r,-s*r),t.lineTo(s*a-d*n,d*a+s*n)}t.closePath()}},Ge=U(3),Za={draw(t,e){const r=-U(e/(Ge*3));t.moveTo(0,r*2),t.lineTo(-Ge*r,-r),t.lineTo(Ge*r,-r),t.closePath()}},G=-.5,Y=U(3)/2,qe=1/U(12),Xa=(qe/2+1)*3,Ja={draw(t,e){const r=U(e/Xa),a=r/2,n=r*qe,i=a,l=r*qe+r,s=-i,d=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(s,d),t.lineTo(G*a-Y*n,Y*a+G*n),t.lineTo(G*i-Y*l,Y*i+G*l),t.lineTo(G*s-Y*d,Y*s+G*d),t.lineTo(G*a+Y*n,G*n-Y*a),t.lineTo(G*i+Y*l,G*l-Y*i),t.lineTo(G*s+Y*d,G*d-Y*s),t.closePath()}};function Qa(t,e){let r=null,a=Hr(n);t=typeof t=="function"?t:ke(t||ot),e=typeof e=="function"?e:ke(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:ke(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:ke(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}var en="Invariant failed";function tn(t,e){throw new Error(en)}var rn=["type","size","sizeType"];function Ue(){return Ue=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ue.apply(null,arguments)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bt(Object(r),!0).forEach(function(a){an(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function an(t,e,r){return(e=nn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nn(t){var e=on(t,"string");return typeof e=="symbol"?e:e+""}function on(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ln(t,e){if(t==null)return{};var r,a,n=sn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function sn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Sr={symbolCircle:ot,symbolCross:Ra,symbolDiamond:Ga,symbolSquare:Ya,symbolStar:Ua,symbolTriangle:Za,symbolWye:Ja},cn=Math.PI/180,un=t=>{var e="symbol".concat(fr(t));return Sr[e]||ot},fn=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*cn;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},dn=(t,e)=>{Sr["symbol".concat(fr(t))]=e},Er=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=ln(t,rn),i=xt(xt({},n),{},{type:e,size:r,sizeType:a}),l="circle";typeof e=="string"&&(l=e);var s=()=>{var v=un(l),m=Qa().type(v).size(fn(r,a,l)),y=m();if(y!==null)return y},{className:d,cx:o,cy:c}=i,u=ve(i);return V(o)&&V(c)&&V(r)?f.createElement("path",Ue({},u,{className:he("recharts-symbols",d),transform:"translate(".concat(o,", ").concat(c,")"),d:s()})):null};Er.registerSymbol=dn;var Ot=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>n[l++]))}},vn=["radius"],pn=["radius"],Pt,jt,At,kt,It,wt,St,Et,Tt,Ct;function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(a){mn(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function mn(t,e,r){return(e=yn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yn(t){var e=hn(t,"string");return typeof e=="symbol"?e:e+""}function hn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},De.apply(null,arguments)}function Bt(t,e){if(t==null)return{};var r,a,n=gn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gn(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function X(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var $t=(t,e,r,a,n)=>{var i=de(r),l=de(a),s=Math.min(Math.abs(i)/2,Math.abs(l)/2),d=l>=0?1:-1,o=i>=0?1:-1,c=l>=0&&i>=0||l<0&&i<0?1:0,u;if(s>0&&Array.isArray(n)){for(var v=[0,0,0,0],m=0,y=4;m<y;m++){var h,b=(h=n[m])!==null&&h!==void 0?h:0;v[m]=b>s?s:b}u=M(Pt||(Pt=X(["M",",",""])),t,e+d*v[0]),v[0]>0&&(u+=M(jt||(jt=X(["A ",",",",0,0,",",",",",""])),v[0],v[0],c,t+o*v[0],e)),u+=M(At||(At=X(["L ",",",""])),t+r-o*v[1],e),v[1]>0&&(u+=M(kt||(kt=X(["A ",",",",0,0,",`,
2
2
  `,",",""])),v[1],v[1],c,t+r,e+d*v[1])),u+=M(It||(It=X(["L ",",",""])),t+r,e+a-d*v[2]),v[2]>0&&(u+=M(wt||(wt=X(["A ",",",",0,0,",`,
3
3
  `,",",""])),v[2],v[2],c,t+r-o*v[2],e+a)),u+=M(St||(St=X(["L ",",",""])),t+o*v[3],e+a),v[3]>0&&(u+=M(Et||(Et=X(["A ",",",",0,0,",`,
4
4
  `,",",""])),v[3],v[3],c,t,e+a-d*v[3])),u+="Z"}else if(s>0&&n===+n&&n>0){var p=Math.min(s,n);u=M(Tt||(Tt=X(["M ",",",`
@@ -1 +1 @@
1
- import{c as he,r as te,l as xe,j as t,B as pe}from"./index-B7P9L1Cb.js";import{B as ce}from"./badge-C87ClbXM.js";import{C as de}from"./checkbox-CeSxNCqq.js";import{t as me}from"./ChevronDown-BxiHFmLr.js";import{b as ge,C as ve,a as ue,c as je,e as Ce,d as be}from"./command-BFxbzakL.js";import{P as Ne,a as ye,b as we}from"./popover-T38vYiZh.js";function Ke(o){const e=he.c(74),{options:n,onValueChange:i,defaultValue:P,placeholder:se,variant:le,animation:ae,maxCount:ne,modalPopover:ie,asChild:oe,className:G,disabled:re,onSearchChange:V}=o;let _;e[0]!==P?(_=P===void 0?[]:P,e[0]=P,e[1]=_):_=e[1];const d=_,L=se===void 0?"Select items":se,E=le===void 0?"default":le,O=ae===void 0?0:ae,k=ne===void 0?3:ne,q=ie===void 0?!1:ie,H=oe===void 0?!1:oe,Q=re===void 0?!1:re,[s,S]=te.useState(d),[U,B]=te.useState(!1);let D,I;e[2]!==d||e[3]!==s?(D=()=>{JSON.stringify(s)!==JSON.stringify(d)&&S(d)},I=[d,s],e[2]=d,e[3]=s,e[4]=D,e[5]=I):(D=e[4],I=e[5]),te.useEffect(D,I);let K;e[6]!==i||e[7]!==s?(K=l=>{if(l.key==="Enter")B(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const a=[...s];a.pop(),S(a),i(a)}},e[6]=i,e[7]=s,e[8]=K):K=e[8];const W=K;let T;e[9]!==i||e[10]!==s?(T=l=>{const a=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];S(a),i(a)},e[9]=i,e[10]=s,e[11]=T):T=e[11];const c=T;let $;e[12]!==i?($=()=>{S([]),i([])},e[12]=i,e[13]=$):$=e[13];const X=$;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{B(Ve)},e[14]=z):z=e[14];const fe=z;let A;e[15]!==X||e[16]!==i||e[17]!==n||e[18]!==s.length?(A=()=>{if(s.length===n.length)X();else{const l=n.map(Pe);S(l),i(l)}},e[15]=X,e[16]=i,e[17]=n,e[18]=s.length,e[19]=A):A=e[19];const r=A;let m;e[20]!==H?(m=H?{}:{variant:"outline"},e[20]=H,e[21]=m):m=e[21];let u;e[22]!==G?(u=xe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",G),e[22]=G,e[23]=u):u=e[23];let f;e[24]!==O||e[25]!==k||e[26]!==n||e[27]!==L||e[28]!==s||e[29]!==E?(f=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const a=n.find(ee=>ee.value===l),w=a?.icon;return t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${O}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:a?.label})]},l)}),s.length>k&&t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${O}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(me,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:L}),t.jsx(me,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=O,e[25]=k,e[26]=n,e[27]=L,e[28]=s,e[29]=E,e[30]=f):f=e[30];let h;e[31]!==Q||e[32]!==m||e[33]!==u||e[34]!==f?(h=t.jsx(Ne,{asChild:!0,children:t.jsx(pe,{ref:null,...m,onClick:fe,className:u,disabled:Q,children:f})}),e[31]=Q,e[32]=m,e[33]=u,e[34]=f,e[35]=h):h=e[35];let J;e[36]===Symbol.for("react.memo_cache_sentinel")?(J=()=>B(!1),e[36]=J):J=e[36];const Y=!V;let x;e[37]!==W||e[38]!==V?(x=t.jsx(ge,{placeholder:"Search...",onKeyDown:W,onValueChange:V,className:"rounded-t-xl"}),e[37]=W,e[38]=V,e[39]=x):x=e[39];let M;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ve,{children:"No results found."}),e[40]=M):M=e[40];let p;e[41]!==r?(p=()=>{r()},e[41]=r,e[42]=p):p=e[42];let g;e[43]!==r?(g=l=>{l.stopPropagation(),r()},e[43]=r,e[44]=g):g=e[44];const Z=s.length===n.length&&n.length>0;let v;e[45]!==Z||e[46]!==r?(v=t.jsx(de,{checked:Z,onCheckedChange:r,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Se}),e[45]=Z,e[46]=r,e[47]=v):v=e[47];let R;e[48]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{children:"(Select All)"}),e[48]=R):R=e[48];let j;e[49]!==g||e[50]!==v?(j=t.jsxs("div",{className:"flex items-center w-full",onClick:g,children:[v,R]}),e[49]=g,e[50]=v,e[51]=j):j=e[51];let C;e[52]!==p||e[53]!==j?(C=t.jsx(ue,{onSelect:p,className:"cursor-pointer",children:j},"all"),e[52]=p,e[53]=j,e[54]=C):C=e[54];let b;if(e[55]!==n||e[56]!==s||e[57]!==c){let l;e[59]!==s||e[60]!==c?(l=a=>{const w=s.includes(a.value);return t.jsx(ue,{onSelect:()=>{c(a)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ee=>{ee.stopPropagation(),c(a)},children:[t.jsx(de,{checked:w,onCheckedChange:()=>{c(a)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:ke}),a.icon&&t.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:a.label})]})},a.value)},e[59]=s,e[60]=c,e[61]=l):l=e[61],b=n.map(l),e[55]=n,e[56]=s,e[57]=c,e[58]=b}else b=e[58];let N;e[62]!==C||e[63]!==b?(N=t.jsxs(je,{className:"rounded-b-xl",children:[M,t.jsxs(Ce,{children:[C,b]})]}),e[62]=C,e[63]=b,e[64]=N):N=e[64];let y;e[65]!==Y||e[66]!==x||e[67]!==N?(y=t.jsx(ye,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:J,children:t.jsxs(be,{shouldFilter:Y,className:"rounded-xl",children:[x,N]})}),e[65]=Y,e[66]=x,e[67]=N,e[68]=y):y=e[68];let F;return e[69]!==U||e[70]!==q||e[71]!==h||e[72]!==y?(F=t.jsxs(we,{open:U,onOpenChange:B,modal:q,children:[h,y]}),e[69]=U,e[70]=q,e[71]=h,e[72]=y,e[73]=F):F=e[73],F}function ke(o){return o.stopPropagation()}function Se(o){return o.stopPropagation()}function Pe(o){return o.value}function Ve(o){return!o}export{Ke as M};
1
+ import{c as he,r as te,l as xe,j as t,B as pe}from"./index-DNcmUp59.js";import{B as ce}from"./badge-CusDamT1.js";import{C as de}from"./checkbox-CalBxksB.js";import{t as me}from"./ChevronDown-DX5Tgk2V.js";import{b as ge,C as ve,a as ue,c as je,e as Ce,d as be}from"./command-BUpgxLnZ.js";import{P as Ne,a as ye,b as we}from"./popover-DIFPu1Xc.js";function Ke(o){const e=he.c(74),{options:n,onValueChange:i,defaultValue:P,placeholder:se,variant:le,animation:ae,maxCount:ne,modalPopover:ie,asChild:oe,className:G,disabled:re,onSearchChange:V}=o;let _;e[0]!==P?(_=P===void 0?[]:P,e[0]=P,e[1]=_):_=e[1];const d=_,L=se===void 0?"Select items":se,E=le===void 0?"default":le,O=ae===void 0?0:ae,k=ne===void 0?3:ne,q=ie===void 0?!1:ie,H=oe===void 0?!1:oe,Q=re===void 0?!1:re,[s,S]=te.useState(d),[U,B]=te.useState(!1);let D,I;e[2]!==d||e[3]!==s?(D=()=>{JSON.stringify(s)!==JSON.stringify(d)&&S(d)},I=[d,s],e[2]=d,e[3]=s,e[4]=D,e[5]=I):(D=e[4],I=e[5]),te.useEffect(D,I);let K;e[6]!==i||e[7]!==s?(K=l=>{if(l.key==="Enter")B(!0);else if(l.key==="Backspace"&&!l.currentTarget.value){const a=[...s];a.pop(),S(a),i(a)}},e[6]=i,e[7]=s,e[8]=K):K=e[8];const W=K;let T;e[9]!==i||e[10]!==s?(T=l=>{const a=s.includes(l.value)?s.filter(w=>w!==l.value):[...s,l.value];S(a),i(a)},e[9]=i,e[10]=s,e[11]=T):T=e[11];const c=T;let $;e[12]!==i?($=()=>{S([]),i([])},e[12]=i,e[13]=$):$=e[13];const X=$;let z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{B(Ve)},e[14]=z):z=e[14];const fe=z;let A;e[15]!==X||e[16]!==i||e[17]!==n||e[18]!==s.length?(A=()=>{if(s.length===n.length)X();else{const l=n.map(Pe);S(l),i(l)}},e[15]=X,e[16]=i,e[17]=n,e[18]=s.length,e[19]=A):A=e[19];const r=A;let m;e[20]!==H?(m=H?{}:{variant:"outline"},e[20]=H,e[21]=m):m=e[21];let u;e[22]!==G?(u=xe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",G),e[22]=G,e[23]=u):u=e[23];let f;e[24]!==O||e[25]!==k||e[26]!==n||e[27]!==L||e[28]!==s||e[29]!==E?(f=s.length>0?t.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[s.slice(0,k).map(l=>{const a=n.find(ee=>ee.value===l),w=a?.icon;return t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${O}s`},children:[w&&t.jsx(w,{className:"h-3 w-3 shrink-0"}),t.jsx("span",{className:"truncate",children:a?.label})]},l)}),s.length>k&&t.jsxs(ce,{variant:E==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${O}s`},children:["+",s.length-k]})]}),t.jsx("div",{className:"flex items-center shrink-0 ml-2",children:t.jsx(me,{size:20,className:"shrink-0 opacity-50"})})]}):t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:L}),t.jsx(me,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=O,e[25]=k,e[26]=n,e[27]=L,e[28]=s,e[29]=E,e[30]=f):f=e[30];let h;e[31]!==Q||e[32]!==m||e[33]!==u||e[34]!==f?(h=t.jsx(Ne,{asChild:!0,children:t.jsx(pe,{ref:null,...m,onClick:fe,className:u,disabled:Q,children:f})}),e[31]=Q,e[32]=m,e[33]=u,e[34]=f,e[35]=h):h=e[35];let J;e[36]===Symbol.for("react.memo_cache_sentinel")?(J=()=>B(!1),e[36]=J):J=e[36];const Y=!V;let x;e[37]!==W||e[38]!==V?(x=t.jsx(ge,{placeholder:"Search...",onKeyDown:W,onValueChange:V,className:"rounded-t-xl"}),e[37]=W,e[38]=V,e[39]=x):x=e[39];let M;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ve,{children:"No results found."}),e[40]=M):M=e[40];let p;e[41]!==r?(p=()=>{r()},e[41]=r,e[42]=p):p=e[42];let g;e[43]!==r?(g=l=>{l.stopPropagation(),r()},e[43]=r,e[44]=g):g=e[44];const Z=s.length===n.length&&n.length>0;let v;e[45]!==Z||e[46]!==r?(v=t.jsx(de,{checked:Z,onCheckedChange:r,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:Se}),e[45]=Z,e[46]=r,e[47]=v):v=e[47];let R;e[48]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{children:"(Select All)"}),e[48]=R):R=e[48];let j;e[49]!==g||e[50]!==v?(j=t.jsxs("div",{className:"flex items-center w-full",onClick:g,children:[v,R]}),e[49]=g,e[50]=v,e[51]=j):j=e[51];let C;e[52]!==p||e[53]!==j?(C=t.jsx(ue,{onSelect:p,className:"cursor-pointer",children:j},"all"),e[52]=p,e[53]=j,e[54]=C):C=e[54];let b;if(e[55]!==n||e[56]!==s||e[57]!==c){let l;e[59]!==s||e[60]!==c?(l=a=>{const w=s.includes(a.value);return t.jsx(ue,{onSelect:()=>{c(a)},className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center w-full",onClick:ee=>{ee.stopPropagation(),c(a)},children:[t.jsx(de,{checked:w,onCheckedChange:()=>{c(a)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:ke}),a.icon&&t.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),t.jsx("span",{children:a.label})]})},a.value)},e[59]=s,e[60]=c,e[61]=l):l=e[61],b=n.map(l),e[55]=n,e[56]=s,e[57]=c,e[58]=b}else b=e[58];let N;e[62]!==C||e[63]!==b?(N=t.jsxs(je,{className:"rounded-b-xl",children:[M,t.jsxs(Ce,{children:[C,b]})]}),e[62]=C,e[63]=b,e[64]=N):N=e[64];let y;e[65]!==Y||e[66]!==x||e[67]!==N?(y=t.jsx(ye,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:J,children:t.jsxs(be,{shouldFilter:Y,className:"rounded-xl",children:[x,N]})}),e[65]=Y,e[66]=x,e[67]=N,e[68]=y):y=e[68];let F;return e[69]!==U||e[70]!==q||e[71]!==h||e[72]!==y?(F=t.jsxs(we,{open:U,onOpenChange:B,modal:q,children:[h,y]}),e[69]=U,e[70]=q,e[71]=h,e[72]=y,e[73]=F):F=e[73],F}function ke(o){return o.stopPropagation()}function Se(o){return o.stopPropagation()}function Pe(o){return o.value}function Ve(o){return!o}export{Ke as M};
@@ -1 +1 @@
1
- import{r,j as e,i as n}from"./index-B7P9L1Cb.js";import{h as l}from"./mcp-oauth-CH3qppcA.js";import"./auth-upuRD_Ra.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
1
+ import{r,j as e,i as n}from"./index-DNcmUp59.js";import{h as l}from"./mcp-oauth-yniCAgpj.js";import"./auth-Fypm4NkM.js";function h(){const[s,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
@@ -1 +1 @@
1
- import{r,j as e,i as d}from"./index-B7P9L1Cb.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
1
+ import{r,j as e,i as d}from"./index-DNcmUp59.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
@@ -1 +1 @@
1
- import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-B7P9L1Cb.js";import{R as xe}from"./required-auth-layout-lFMnY-UF.js";import{A as J}from"./auth-split-layout-By_6XZA_.js";import{O as be}from"./organization-choice-DAeKb5Zw.js";import{A as de}from"./avatar-ZVqnpQ5L.js";import{I as je}from"./input-ijcl7nEP.js";import{L as ye}from"./label-9EwRfhPm.js";import{S as ve}from"./switch-CtD3Qolf.js";import{t as Ne,a as Se}from"./Users03-DtnR2O5U.js";import{i as we}from"./CheckCircle-msR6mCMy.js";import{t as ze}from"./Globe04-CsR3hp-R.js";import{a as ke}from"./Palette-DZ-mRtqH.js";import{i as Ce}from"./Upload01-BkSfT9PJ.js";import"./User01-BFiYGCaZ.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
1
+ import{c as K,j as t,a as re,i as X,r as E,m as pe,K as he,B as ce,d as oe,l as W,t as me}from"./index-DNcmUp59.js";import{R as xe}from"./required-auth-layout-Bo8cZozY.js";import{A as J}from"./auth-split-layout-DRcnmbOk.js";import{O as be}from"./organization-choice-B-ZHCNtO.js";import{A as de}from"./avatar-CYb8sgBh.js";import{I as je}from"./input-DDSyA2F6.js";import{L as ye}from"./label-CCdy2D-Q.js";import{S as ve}from"./switch-BlqfjViK.js";import{t as Ne,a as Se}from"./Users03-DfBzNWCj.js";import{i as we}from"./CheckCircle-CAS4qDUe.js";import{t as ze}from"./Globe04-CpcrEsco.js";import{a as ke}from"./Palette-CYu9EeqY.js";import{i as Ce}from"./Upload01-CQv4QkPs.js";import"./User01-DHhJ9Efj.js";const _e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function se(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xe(){const i=K.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(Oe,{})}),i[0]=e):e=i[0],e}function ie(i){const e=K.c(13),{title:g,description:c,logoUrl:u,logoFallback:o}=i;let a;e[0]!==o||e[1]!==u?(a=t.jsx("div",{children:u?t.jsx(de,{url:u,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=u,e[2]=a):a=e[2];let r;e[3]!==g?(r=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=r):r=e[4];let n;e[5]!==c?(n=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:c}),e[5]=c,e[6]=n):n=e[6];let f;e[7]!==r||e[8]!==n?(f=t.jsxs("div",{className:"space-y-2",children:[r,n]}),e[7]=r,e[8]=n,e[9]=f):f=e[9];let s;return e[10]!==a||e[11]!==f?(s=t.jsxs("div",{className:"grid gap-10",children:[a,f]}),e[10]=a,e[11]=f,e[12]=s):s=e[12],s}function Oe(){const i=K.c(4),{data:e,isPending:g}=re.useSession();if(g){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(J,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"})})}),i[0]=a):a=i[0],a}const c=e?.user?.email??"",u=e?.user?.name;let o;return i[1]!==u||i[2]!==c?(o=t.jsx(Ee,{email:c,userName:u}),i[1]=u,i[2]=c,i[3]=o):o=i[3],o}function Ee(i){const e=K.c(54),{email:g,userName:c}=i;let u,o,a,r,n,f;if(e[0]!==g||e[1]!==c){a=g.split("@")[1]?.toLowerCase()??"",r=!!a&&!_e.has(a);const l=a.split(".")[0]??"";o=l.charAt(0).toUpperCase()+l.slice(1);let m;e[8]!==o||e[9]!==r||e[10]!==c?(m=r?o:c?.split(" ")[0]??"",e[8]=o,e[9]=r,e[10]=c,e[11]=m):m=e[11],u=m,f=pe,n=he.domainLookup(a),e[0]=g,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=n,e[7]=f}else u=e[2],o=e[3],a=e[4],r=e[5],n=e[6],f=e[7];let s;e[12]!==r||e[13]!==n?(s={queryKey:n,queryFn:Re,enabled:r},e[12]=r,e[13]=n,e[14]=s):s=e[14];const{data:j,isLoading:d,isError:N,refetch:p}=f(s);let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=new Set,e[15]=L):L=e[15];const[k,C]=E.useState(L),[A,_]=E.useState(!1);if(d){let l;e[16]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=l):l=e[16];let m;return e[17]!==a?(m=t.jsx(J,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[l,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=m):m=e[18],m}if(N){let l;e[19]!==a?(l=t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Couldn't check ",a," for an existing organization."]}),e[19]=a,e[20]=l):l=e[20];let m;e[21]!==p?(m=t.jsx(ce,{variant:"outline",size:"sm",onClick:()=>p(),children:"Retry"}),e[21]=p,e[22]=m):m=e[22];let h;return e[23]!==l||e[24]!==m?(h=t.jsx(J,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[l,m]})}),e[23]=l,e[24]=m,e[25]=h):h=e[25],h}let y,b;e[26]!==j?.organizations?(y=(j?.organizations??[]).flatMap(Pe),b=y.some(Ae),e[26]=j?.organizations,e[27]=y,e[28]=b):(y=e[27],b=e[28]);const $=b;if(A){let l;e[29]!==c?(l=c?.split(" ")[0]??"",e[29]=c,e[30]=l):l=e[30];let m;e[31]===Symbol.for("react.memo_cache_sentinel")?(m=()=>_(!1),e[31]=m):m=e[31];let h;return e[32]!==o||e[33]!==a||e[34]!==r||e[35]!==l?(h=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:l,allowDomainClaim:!1,onBack:m}),e[32]=o,e[33]=a,e[34]=r,e[35]=l,e[36]=h):h=e[36],h}if(y.length>0){const l=$?y.length===1?"You have access to an organization":"You have access to multiple organizations":"Request access to an organization",m=$?"Your email domain matches an existing organization.":"Your email domain matches an organization that requires admin approval to join.";let h;e[37]!==l||e[38]!==m?(h=t.jsx(ie,{title:l,description:m}),e[37]=l,e[38]=m,e[39]=h):h=e[39];let z;e[40]===Symbol.for("react.memo_cache_sentinel")?(z=D=>C(R=>new Set(R).add(D)),e[40]=z):z=e[40];let S;e[41]!==y||e[42]!==a||e[43]!==k?(S=t.jsx(be,{organizations:y,domain:a,requestedSlugs:k,onRequestedSlug:z,onJoined:Le}),e[41]=y,e[42]=a,e[43]=k,e[44]=S):S=e[44];let P;e[45]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>_(!0),children:"Create a new organization instead"}),e[45]=P):P=e[45];let O;return e[46]!==S||e[47]!==h?(O=t.jsx(J,{children:t.jsxs("div",{className:"grid gap-10",children:[h,S,P]})}),e[46]=S,e[47]=h,e[48]=O):O=e[48],O}let w;return e[49]!==u||e[50]!==o||e[51]!==a||e[52]!==r?(w=t.jsx(ne,{isCorporateEmail:r,emailDomain:a,domainLabel:o,defaultName:u}),e[49]=u,e[50]=o,e[51]=a,e[52]=r,e[53]=w):w=e[53],w}function Le(i,e){window.location.href=`/${e}`}function Ae(i){return i.joinMode==="auto"}function Pe(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Re(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function ne(i){const e=K.c(70),{isCorporateEmail:g,emailDomain:c,domainLabel:u,defaultName:o,allowDomainClaim:a,onBack:r}=i,n=a===void 0?!0:a,f=g&&n?`https://www.google.com/s2/favicons?domain=${c}&sz=128`:null,[s,j]=E.useState(o),[d,N]=E.useState(f),[p,L]=E.useState(!0),[k,C]=E.useState(null);let A;e[0]!==p||e[1]!==d||e[2]!==s?(A=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.trim()||void 0,logo:d??void 0,claimDomain:p})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error||"Failed to set up organization");return v},e[0]=p,e[1]=d,e[2]=s,e[3]=A):A=e[3];let _;e[4]!==p?(_=x=>{if(!x.slug)return;const v=ue.filter(ge=>p||!ge.claimOnly).length,G=fe*(v-1)+800;C(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},G)},e[4]=p,e[5]=_):_=e[5];let y;e[6]!==A||e[7]!==_?(y={mutationFn:A,onSuccess:_},e[6]=A,e[7]=_,e[8]=y):y=e[8];const b=oe(y);let $;e[9]!==d||e[10]!==s?($={mutationFn:async()=>{const x=s.trim(),v=se(x);if(!v)throw new Error("Invalid organization name");const G=await re.organization.create({name:x,slug:v,...d?{logo:d}:{}});if(G?.error)throw new Error(G.error.message||"Failed to create organization");window.location.href=`/${G?.data?.slug??v}`}},e[9]=d,e[10]=s,e[11]=$):$=e[11];const w=oe($);if(b.isPending||k){let x;e[12]!==u||e[13]!==s?(x=s.trim()||u,e[12]=u,e[13]=s,e[14]=x):x=e[14];let v;return e[15]!==p||e[16]!==c||e[17]!==d||e[18]!==x?(v=t.jsx(J,{children:t.jsx(Fe,{orgName:x,domain:c,claimDomain:p,logoUrl:d})}),e[15]=p,e[16]=c,e[17]=d,e[18]=x,e[19]=v):v=e[19],v}const l=w.isPending;let m;e[20]!==s?(m=se(s.trim()),e[20]=s,e[21]=m):m=e[21];const h=!!m,z=b.error||w.error||null;let S;e[22]!==n||e[23]!==h||e[24]!==w||e[25]!==b||e[26]!==g?(S=x=>{x.preventDefault(),h&&(g&&n?b.mutate():w.mutate())},e[22]=n,e[23]=h,e[24]=w,e[25]=b,e[26]=g,e[27]=S):S=e[27];const P=S;let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ie,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=O):O=e[28];let D;e[29]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=D):D=e[29];let R;e[30]!==o||e[31]!==s?(R=(s.trim()||o||"?").charAt(0).toUpperCase(),e[30]=o,e[31]=s,e[32]=R):R=e[32];const Z=l||b.isPending;let F;e[33]!==d||e[34]!==R||e[35]!==Z?(F=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[D,t.jsx($e,{value:d,fallback:R,onChange:N,disabled:Z})]}),e[33]=d,e[34]=R,e[35]=Z,e[36]=F):F=e[36];let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(ye,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=H):H=e[37];let Q;e[38]===Symbol.for("react.memo_cache_sentinel")?(Q=x=>j(x.target.value),e[38]=Q):Q=e[38];const ee=o||"My Organization",te=l||b.isPending;let M;e[39]!==s||e[40]!==ee||e[41]!==te?(M=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[H,t.jsx(je,{id:"org-name",value:s,onChange:Q,placeholder:ee,disabled:te,className:"h-10 max-w-[220px]"})]}),e[39]=s,e[40]=ee,e[41]=te,e[42]=M):M=e[42];let q;e[43]!==n||e[44]!==p||e[45]!==b.isPending||e[46]!==c||e[47]!==g||e[48]!==l?(q=g&&n&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",c," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",c," email can join this org"]})]}),t.jsx(ve,{checked:p,onCheckedChange:L,disabled:l||b.isPending})]}),e[43]=n,e[44]=p,e[45]=b.isPending,e[46]=c,e[47]=g,e[48]=l,e[49]=q):q=e[49];let U;e[50]!==F||e[51]!==M||e[52]!==q?(U=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[F,M,q]}),e[50]=F,e[51]=M,e[52]=q,e[53]=U):U=e[53];let T;e[54]!==z?(T=z&&t.jsx("p",{className:"text-xs text-destructive",children:z instanceof Error?z.message:"Failed to create organization"}),e[54]=z,e[55]=T):T=e[55];const ae=!h||l||b.isPending;let I;e[56]!==b.isPending||e[57]!==l?(I=l||b.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(X,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=b.isPending,e[57]=l,e[58]=I):I=e[58];let B;e[59]!==ae||e[60]!==I?(B=t.jsx(ce,{type:"submit",size:"xl",className:"w-full",disabled:ae,children:I}),e[59]=ae,e[60]=I,e[61]=B):B=e[61];let Y;e[62]!==r?(Y=r&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:r,children:"See available organizations"}),e[62]=r,e[63]=Y):Y=e[63];let V;return e[64]!==P||e[65]!==U||e[66]!==T||e[67]!==B||e[68]!==Y?(V=t.jsx(J,{children:t.jsxs("form",{onSubmit:P,className:"grid gap-10",children:[O,U,T,B,Y]})}),e[64]=P,e[65]=U,e[66]=T,e[67]=B,e[68]=Y,e[69]=V):V=e[69],V}function $e(i){const e=K.c(14),{value:g,fallback:c,onChange:u,disabled:o}=i,a=E.useRef(null);let r;e[0]!==u?(r=L=>{const k=L.target.files?.[0];if(!k)return;if(k.size>2097152){me.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const C=new FileReader;C.onerror=De,C.onloadend=()=>{C.result&&u(C.result),a.current&&(a.current.value="")},C.readAsDataURL(k)},e[0]=u,e[1]=r):r=e[1];const n=r;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=()=>a.current?.click(),e[2]=f):f=e[2];let s;e[3]!==o||e[4]!==n?(s=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];const j=g??void 0;let d;e[6]!==c||e[7]!==j?(d=t.jsx(de,{url:j,fallback:c,shape:"square",size:"base"}),e[6]=c,e[7]=j,e[8]=d):d=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Ce,{size:14,className:"text-white"})}),e[9]=N):N=e[9];let p;return e[10]!==o||e[11]!==s||e[12]!==d?(p=t.jsxs("button",{type:"button",onClick:f,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[s,d,N]}),e[10]=o,e[11]=s,e[12]=d,e[13]=p):p=e[13],p}function De(){return me.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:ze,label:"Claiming email domain",claimOnly:!0},{icon:Se,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,le=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:i,domain:e,claimDomain:g,logoUrl:c}){const u=ue.filter(n=>g||!n.claimOnly),[o,a]=E.useState(0),r=E.useRef(!1);if(!r.current){r.current=!0;for(let n=1;n<u.length;n++)setTimeout(()=>a(n),fe*n)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(ie,{title:`Setting up ${i}`,description:`Getting everything ready from ${e}`,logoUrl:c??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:u.map((n,f)=>{const s=n.icon,j=f===o,d=f<o,N=le[f%le.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||j?1:.4},children:[t.jsxs("span",{className:W("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(j?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:N.bg,color:N.fg}:void 0,children:[t.jsx(we,{size:16,className:W("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(X,{size:16,className:W("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",j?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(s,{size:16,className:W("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!j?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:W("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",j||d?"text-foreground":"text-muted-foreground"),children:n.label})]},n.label)})})]})}export{Xe as default};
@@ -1 +1 @@
1
- import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-B7P9L1Cb.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
1
+ import{c as k,r as z,b1 as S,e as _,q as E,b2 as T,j as o,L as $}from"./index-DNcmUp59.js";const L="#f6f4ed",P="#ffffff",H=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function R(e,n){const t=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...H],l={id:t,name:e.name,short_name:e.name,start_url:t,scope:t,display:"standalone",display_override:["window-controls-overlay"],background_color:P,theme_color:L,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(l))}`}function O(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const t=document.createElement("link");return t.rel=e,document.head.appendChild(t),t}function U(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const t=document.createElement("meta");return t.name=e,document.head.appendChild(t),t}function M(e){const n=k.c(5),t=e?.name??"",i=e?.slug??"",l=e?.logo??"";let a,c;n[0]!==l||n[1]!==t||n[2]!==i?(a=()=>{if(!i||!t||typeof document>"u"||typeof window>"u")return;const d=O("manifest"),m=O("apple-touch-icon"),u=U("apple-mobile-web-app-title"),r={manifest:d.getAttribute("href"),appleIcon:m.getAttribute("href"),appleTitle:u.getAttribute("content"),title:document.title};return d.setAttribute("href",R({name:t,slug:i,logo:l||null},window.location.origin)),l&&m.setAttribute("href",l),u.setAttribute("content",t),document.title=t,S(),()=>{r.manifest!==null&&d.setAttribute("href",r.manifest),r.appleIcon!==null&&m.setAttribute("href",r.appleIcon),r.appleTitle!==null&&u.setAttribute("content",r.appleTitle),document.title=r.title,S()}},c=[t,i,l],n[0]=l,n[1]=t,n[2]=i,n[3]=a,n[4]=c):(a=n[3],c=n[4]),z.useLayoutEffect(a,c)}function D(){const e=k.c(31);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:t}=_(n),{data:i}=E();let l;e[1]!==i||e[2]!==t?(l=i?.find(N=>N.slug===t),e[1]=i,e[2]=t,e[3]=l):l=e[3];const a=l;let c;e[4]!==a?(c=a?{name:a.name,slug:a.slug,logo:a.logo??null}:null,e[4]=a,e[5]=c):c=e[5],M(c);const{canPrompt:d,installed:m,ios:u,promptInstall:r}=T(),[y,w]=z.useState(null),s=a?.name??"this organization",C=a?.logo;let b;e[6]!==s||e[7]!==r?(b=async()=>{const N=await r();w(N==="accepted"?`Installing ${s}…`:N==="dismissed"?"Install dismissed.":null)},e[6]=s,e[7]=r,e[8]=b):b=e[8];const A=b,I=C||"/icons/icon-192.png";let p;e[9]!==s||e[10]!==I?(p=o.jsx("img",{src:I,alt:s,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[9]=s,e[10]=I,e[11]=p):p=e[11];let f;e[12]!==s?(f=o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("h1",{className:"text-xl font-semibold text-foreground",children:["Add ",s," to your Home Screen"]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Install ",s," as its own app — a standalone window that opens straight into this organization. To install the full deco Studio app instead, use your browser's “Add to Home Screen” from any other page."]})]}),e[12]=s,e[13]=f):f=e[13];let g;e[14]!==d||e[15]!==A||e[16]!==m||e[17]!==u||e[18]!==s||e[19]!==y?(g=m?o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[s," is already installed on this device."]}):u?o.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[o.jsx("p",{className:"font-medium",children:"Install on iOS"}),o.jsxs("p",{className:"text-muted-foreground",children:["Tap the ",o.jsx("span",{className:"font-medium",children:"Share"})," button, then choose ",o.jsx("span",{className:"font-medium",children:"Add to Home Screen"}),"."]})]}):d?o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:A,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:["Add ",s," to Home Screen"]}),y&&o.jsx("p",{className:"text-sm text-muted-foreground",children:y})]}):o.jsxs("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:["To install, open your browser's menu and choose"," ",o.jsxs("span",{className:"font-medium text-foreground",children:["Install ",s]})," ","(or “Add to Home Screen”). If you don't see it yet, interact with the app for a moment and try again."]}),e[14]=d,e[15]=A,e[16]=m,e[17]=u,e[18]=s,e[19]=y,e[20]=g):g=e[20];const v=t??"";let x;e[21]!==v?(x={org:v},e[21]=v,e[22]=x):x=e[22];let h;e[23]!==s||e[24]!==x?(h=o.jsxs($,{to:"/$org",params:x,className:"text-sm text-primary hover:underline",replace:!0,children:["Back to ",s]}),e[23]=s,e[24]=x,e[25]=h):h=e[25];let j;return e[26]!==h||e[27]!==p||e[28]!==f||e[29]!==g?(j=o.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:o.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[p,f,g,h]})}),e[26]=h,e[27]=p,e[28]=f,e[29]=g,e[30]=j):j=e[30],j}export{D as default};
@@ -1 +1 @@
1
- import{c as o,j as r,O as s}from"./index-B7P9L1Cb.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
1
+ import{c as o,j as r,O as s}from"./index-DNcmUp59.js";function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{c as default};
@@ -1 +1 @@
1
- import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-B7P9L1Cb.js";import{A as $}from"./avatar-ZVqnpQ5L.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
1
+ import{c as T,r as U,d as F,j as t,B as J,i as O}from"./index-DNcmUp59.js";import{A as $}from"./avatar-CYb8sgBh.js";async function P(l,e,f){const i=await fetch(l,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),r=await i.json();if(!i.ok||!r.success)throw new Error(r.error||f);return r}function K(l){const e=T.c(41),{organizations:f,domain:i,requestedSlugs:r,onRequestedSlug:k,onSelected:p,onJoined:c,onRequestCompleted:y,selectLabel:E}=l,h=E===void 0?"Select":E;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=new Set,e[0]=b):b=e[0];const[M,A]=U.useState(b);let w;e[1]!==k?(w=o=>{A(s=>new Set(s).add(o)),k?.(o)},e[1]=k,e[2]=w):w=e[2];const _=w;let N;e[3]!==c?(N={mutationFn:G,onSuccess:o=>{const{organization:s,slug:x}=o;c?.(s,x)}},e[3]=c,e[4]=N):N=e[4];const n=F(N);let R;e[5]!==_||e[6]!==c||e[7]!==y?(R={mutationFn:D,onSuccess:o=>{const{organization:s,slug:x,alreadyMember:C}=o;if(C&&x){c?.(s,x);return}_(s.slug),y?.(s)}},e[5]=_,e[6]=c,e[7]=y,e[8]=R):R=e[8];const a=F(R);let u;e[9]!==r?(u=r??[],e[9]=r,e[10]=u):u=e[10];let v;e[11]!==M||e[12]!==u?(v=new Set([...u,...M]),e[11]=M,e[12]=u,e[13]=v):v=e[13];const j=v,q=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==i||e[15]!==j||e[16]!==n||e[17]!==p||e[18]!==f||e[19]!==q||e[20]!==S||e[21]!==a||e[22]!==h){let o;e[24]!==i||e[25]!==j||e[26]!==n||e[27]!==p||e[28]!==q||e[29]!==S||e[30]!==a||e[31]!==h?(o=s=>{const x=n.isPending&&q===s.slug,C=a.isPending&&S===s.slug,L=j.has(s.slug),B=s.logo??(i?`https://www.google.com/s2/favicons?domain=${i}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx($,{url:B??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),i&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",i]})]}),s.joinMode==="auto"?t.jsx(J,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:x?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?L?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(J,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:C?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(O,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(J,{size:"default",onClick:()=>p?.(s),children:h})]},s.id)},e[24]=i,e[25]=j,e[26]=n,e[27]=p,e[28]=q,e[29]=S,e[30]=a,e[31]=h,e[32]=o):o=e[32],d=f.map(o),e[14]=i,e[15]=j,e[16]=n,e[17]=p,e[18]=f,e[19]=q,e[20]=S,e[21]=a,e[22]=h,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let z;return e[37]!==g||e[38]!==d||e[39]!==m?(z=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=z):z=e[40],z}async function D(l){const e=await P("/api/auth/custom/domain-request-join",l.slug,"Failed to request access");return{organization:l,slug:e.slug,alreadyMember:e.alreadyMember}}async function G(l){const e=await P("/api/auth/custom/domain-join",l.slug,"Failed to join organization");return{organization:l,slug:e.slug??l.slug}}export{K as O};
@@ -1 +1 @@
1
- import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-B7P9L1Cb.js";import{P as T}from"./index-CwBrj8E9.js";import{C as V}from"./collection-table-wrapper-DLMKd85x.js";import{E as $}from"./empty-state-CDPR6N5z.js";import{S as U}from"./search-input-DyxEg05L.js";import{I as H}from"./input-ijcl7nEP.js";import{L as J}from"./label-9EwRfhPm.js";import{u as W}from"./use-debounced-value-BUQ43bVg.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-CG3DUz7s.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-jpq2sMjS.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-DMP6qx_d.js";import"./LayoutLeft-PG1Qj8HR.js";import"./use-mobile-DbAQzyDT.js";import"./X-DXB1dhTC.js";import"./tooltip-CnYyAlKq.js";import"./table-NZu1_-b5.js";import"./ArrowUp-CsHPcA9e.js";import"./SearchMd-DlQrvAOj.js";import"./ChevronUp-Bga41moq.js";import"./ChevronDown-BxiHFmLr.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function ke(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{ke as default};
1
+ import{c as I,r as O,m as K,j as s,K as R,n as M,d as Q,B as L,t as k}from"./index-DNcmUp59.js";import{P as T}from"./index-CRpcM2qG.js";import{C as V}from"./collection-table-wrapper-BciwJHp1.js";import{E as $}from"./empty-state-CY2Mh10-.js";import{S as U}from"./search-input-DaPZylE4.js";import{I as H}from"./input-DDSyA2F6.js";import{L as J}from"./label-CCdy2D-Q.js";import{u as W}from"./use-debounced-value-CzZtnfG7.js";import{D as Y,a as G,b as X,c as Z,d as ee,e as te}from"./dialog-BFEhZp6A.js";import{S as se,a as ie,b as ae,c as ne,d as re}from"./select-ekdvRgqD.js";import{a as q}from"./admin-fetch-CCSvjTk1.js";import{f as le}from"./format-time-BnbuEtat.js";import"./sidebar-DDK4qW6D.js";import"./LayoutLeft-yM1pyLkw.js";import"./use-mobile-C7gDKZvn.js";import"./X-BE13dUVX.js";import"./tooltip-DQLZzXJB.js";import"./table-DeKx66kZ.js";import"./ArrowUp-CYp-fH3b.js";import"./SearchMd-8QLR6foG.js";import"./ChevronUp-aSduSXZP.js";import"./ChevronDown-DX5Tgk2V.js";import"./differenceInSeconds-NQ4PDo0z.js";const oe=["owner","admin","user"];function me(t){const e=I.c(49),{org:l}=t,[g,n]=O.useState(!1),[a,p]=O.useState(""),[o,S]=O.useState("user"),x=M();let u;e[0]!==a||e[1]!==l.id||e[2]!==o?(u=()=>q(`/api/_admin/orgs/${l.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a.trim(),role:o})}),e[0]=a,e[1]=l.id,e[2]=o,e[3]=u):u=e[3];let m;e[4]!==a||e[5]!==l.name||e[6]!==x?(m=()=>{k.success(`Added ${a.trim()} to ${l.name}`),x.invalidateQueries({queryKey:R.deploymentAdminOrgsList()}),n(!1),p(""),S("user")},e[4]=a,e[5]=l.name,e[6]=x,e[7]=m):m=e[7];let h;e[8]!==u||e[9]!==m?(h={mutationFn:u,onSuccess:m,onError:de},e[8]=u,e[9]=m,e[10]=h):h=e[10];const i=Q(h);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(X,{asChild:!0,children:s.jsx(L,{variant:"outline",size:"sm",children:"Add member"})}),e[11]=b):b=e[11];let r;e[12]!==l.name?(r=s.jsx(Y,{children:s.jsxs(G,{children:["Add member to ",l.name]})}),e[12]=l.name,e[13]=r):r=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(J,{htmlFor:"admin-add-member-email",children:"Email"}),e[14]=c):c=e[14];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=B=>p(B.target.value),e[15]=d):d=e[15];let f;e[16]!==a||e[17]!==i.isPending?(f=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx(H,{id:"admin-add-member-email",type:"email",value:a,onChange:d,placeholder:"user@example.com",disabled:i.isPending})]}),e[16]=a,e[17]=i.isPending,e[18]=f):f=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ie,{className:"w-full",children:s.jsx(ae,{})}),e[19]=j):j=e[19];let z;e[20]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ne,{children:oe.map(ce)}),e[20]=z):z=e[20];let y;e[21]!==i.isPending||e[22]!==o?(y=s.jsxs(se,{value:o,onValueChange:S,disabled:i.isPending,children:[j,z]}),e[21]=i.isPending,e[22]=o,e[23]=y):y=e[23];let _;e[24]!==y||e[25]!==f?(_=s.jsxs("div",{className:"space-y-4",children:[f,y]}),e[24]=y,e[25]=f,e[26]=_):_=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=()=>n(!1),e[27]=A):A=e[27];let C;e[28]!==i.isPending?(C=s.jsx(L,{variant:"outline",onClick:A,disabled:i.isPending,children:"Cancel"}),e[28]=i.isPending,e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i.mutate(),e[30]=i,e[31]=N):N=e[31];let P;e[32]!==a||e[33]!==i.isPending?(P=!a.trim()||i.isPending,e[32]=a,e[33]=i.isPending,e[34]=P):P=e[34];const F=i.isPending?"Adding...":"Add member";let v;e[35]!==N||e[36]!==P||e[37]!==F?(v=s.jsx(L,{onClick:N,disabled:P,children:F}),e[35]=N,e[36]=P,e[37]=F,e[38]=v):v=e[38];let w;e[39]!==C||e[40]!==v?(w=s.jsxs(Z,{children:[C,v]}),e[39]=C,e[40]=v,e[41]=w):w=e[41];let E;e[42]!==_||e[43]!==w||e[44]!==r?(E=s.jsxs(ee,{className:"sm:max-w-md",children:[r,_,w]}),e[42]=_,e[43]=w,e[44]=r,e[45]=E):E=e[45];let D;return e[46]!==g||e[47]!==E?(D=s.jsxs(te,{open:g,onOpenChange:n,children:[b,E]}),e[46]=g,e[47]=E,e[48]=D):D=e[48],D}function ce(t){return s.jsx(re,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function de(t){k.error(t instanceof Error?t.message:"Failed to add member")}function ke(){const t=I.c(24),[e,l]=O.useState("");let g;t[0]!==e?(g=e.trim(),t[0]=e,t[1]=g):g=t[1];const n=W(g,300);let a;t[2]!==n?(a=R.deploymentAdminOrgs(n),t[2]=n,t[3]=a):a=t[3];let p;t[4]!==n?(p=()=>{const j=new URLSearchParams({limit:"100"});return n&&j.set("search",n),q(`/api/_admin/orgs?${j}`)},t[4]=n,t[5]=p):p=t[5];let o;t[6]!==a||t[7]!==p?(o={queryKey:a,queryFn:p},t[6]=a,t[7]=p,t[8]=o):o=t[8];const{data:S,isLoading:x,isError:u}=K(o);let m;t[9]!==S?.organizations?(m=S?.organizations??[],t[9]=S?.organizations,t[10]=m):m=t[10];const h=m;let i;t[11]===Symbol.for("react.memo_cache_sentinel")?(i=[{id:"name",header:"Organization",render:ge,cellClassName:"flex-1 min-w-0"},{id:"members",header:"Members",render:pe,cellClassName:"w-24 shrink-0"},{id:"created",header:"Created",render:ue,cellClassName:"w-48 shrink-0"},{id:"actions",header:"",render:fe,cellClassName:"w-32 shrink-0"}],t[11]=i):i=t[11];const b=i;let r;t[12]!==e?(r=s.jsx(U,{value:e,onChange:l,placeholder:"Search organizations by name or slug...",className:"w-full md:w-[375px]"}),t[12]=e,t[13]=r):r=t[13];let c;t[14]!==n||t[15]!==u?(c=u?s.jsx($,{title:"Failed to load organizations",description:"Something went wrong. Refresh to try again."}):s.jsx($,{title:"No organizations found",description:n?`No organizations match "${n}"`:"No organizations exist yet."}),t[14]=n,t[15]=u,t[16]=c):c=t[16];let d;t[17]!==x||t[18]!==h||t[19]!==c?(d=s.jsx(V,{columns:b,data:h,isLoading:x,emptyState:c}),t[17]=x,t[18]=h,t[19]=c,t[20]=d):d=t[20];let f;return t[21]!==r||t[22]!==d?(f=s.jsx(T,{children:s.jsx(T.Content,{children:s.jsx(T.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[r,d]})})})}),t[21]=r,t[22]=d,t[23]=f):f=t[23],f}function fe(t){return s.jsx(me,{org:t})}function ue(t){return s.jsx("span",{className:"text-sm text-foreground",children:le(t.createdAt)})}function pe(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.memberCount})}function ge(t){return s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.slug})]})}export{ke as default};
@@ -1 +1 @@
1
- import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-B7P9L1Cb.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-CPG668bW.js";import{L as Y}from"./label-9EwRfhPm.js";import{S as $}from"./switch-CtD3Qolf.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-jpq2sMjS.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
1
+ import{c as L,n as te,K as U,j as a,r as M,l as ne}from"./index-DNcmUp59.js";import{i as oe,b as se,r as z,c as re,d as ie,e as le,g as ce,S as ae}from"./index-CIr2stgr.js";import{L as Y}from"./label-CCdy2D-Q.js";import{S as $}from"./switch-BlqfjViK.js";import{d as ue,a as fe,b as pe,c as de,S as ye}from"./select-ekdvRgqD.js";const he="website/sections/Rendering/Lazy.tsx";function K(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function N(t){if(!K(t))return!1;const e=t.__resolveType;return typeof e=="string"&&oe(e)}function k(t){return t!=null}function w(t){if(t==null)return t;if(N(t)){const e=t.section;return e==null?null:K(e)?e:{}}return K(t)?t:void 0}function G(t,e){return t===null?null:N(e)?{...e,section:t}:t}function me(t){return{__resolveType:t}}function Se(t,e){if(!k(e))return null;if(t){const n=w(e)??{};return{__resolveType:he,section:n}}return N(e)?w(e)??null:K(e)?e:null}const ge="General";function O(t){return/\/Seo(V\d+)?\.tsx$/i.test(t)||t.includes("/sections/Seo")}function Q(t,e){return t===C?ge:e}function W(t){const e=re(t),n=new Set,o=[];for(const s of e)O(s.resolveType)&&(ie(s.resolveType)||n.has(s.resolveType)||(n.add(s.resolveType),o.push({resolveType:s.resolveType,title:Q(s.resolveType,s.title),description:s.description})));return o}function V(t){const e=se(t),n=z(e,t),o=W(n?.properties?.seo);return o.length>0?o:ve(t)}function ve(t){const e=t.manifest?.blocks??{},n=[];for(const[o,s]of Object.entries(e))if(o.includes("sections"))for(const r of Object.keys(s)){if(!O(r))continue;const i=r.split("/").pop()?.replace(/\.tsx?$/,"")??r;n.push({resolveType:r,title:Q(r,i)})}return n}function Z(t){const e=V(t),n=e.find(o=>o.resolveType===C);return n?n.resolveType:e[0]?.resolveType??C}function q(t,e){const n=e.__resolveType;if(typeof n=="string"){const o=z(n,t),s=W(o?.properties?.seo);if(s.length>0)return s}return V(t)}function be(t,e){const n=q(t,e),o=n.find(s=>s.resolveType===C);return o?o.resolveType:n[0]?.resolveType??Z(t)}function Te(t,e){const n=e?.__resolveType;return typeof n=="string"&&n.length>0?n:Z(t)}function xe(t,e,n){const o=n.__resolveType;return typeof o=="string"&&O(o)?o:be(t,e)}const _e=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),C="website/sections/Seo/SeoV2.tsx",Re=["title","titleTemplate","description","descriptionTemplate","image","favicon","type","noIndexing"];function F(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ee(t){return typeof t.__resolveType=="string"&&O(t.__resolveType)?!0:Re.some(e=>e in t)}function je(t,e){for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o,r=s.__resolveType;if(typeof r=="string"&&_e.has(r))continue;const i=s.seo;if(F(i)){const c=i;if(Ee(c))return{blockKey:n,kind:"nested",seoData:c,blockData:s,seoResolveType:e?xe(e,s,c):typeof c.__resolveType=="string"&&O(c.__resolveType)?c.__resolveType:C}}}for(const[n,o]of Object.entries(t)){if(!F(o))continue;const s=o;if(typeof s.__resolveType=="string"&&O(s.__resolveType))return{blockKey:n,kind:"block",seoData:s,blockData:s,seoResolveType:s.__resolveType}}return null}function De(t,e){return t.kind==="block"?e:{...t.blockData,seo:e}}function Ze(t,e,n){if(e.kind==="site"){const l=je(t,n);return l?{blockKey:l.blockKey,seoData:l.seoData,seoResolveType:l.seoResolveType,siteKind:l.kind,seoTypeOptions:n?q(n,l.blockData):void 0,build:d=>De(l,d)}:null}const o=t[e.pageKey];if(!F(o))return null;const s=o,r=s.seo,i=w(r),c=i&&F(i)?i:void 0;return{blockKey:e.pageKey,seoData:c,rawSeoData:r,seoResolveType:n?Te(n,c):typeof c?.__resolveType=="string"?c.__resolveType:C,seoTypeOptions:n?V(n):void 0,build:l=>({...s,seo:l===null?null:G(l,r)})}}function I(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Ce(t,e,n,o){if(t.kind==="page"){if(!I(n))return null;const s=n.seo!==void 0?n.seo:e.rawSeoData;return{...n,seo:o===null?null:G(o,s)}}return I(n)?e.siteKind==="block"?o:{...n,seo:o}:null}function qe(t,e){const n=t.__resolveType;return typeof n=="string"&&n.length>0?n:e.seoResolveType}function He(t){const e=L.c(23),{orgSlug:n,virtualMcpId:o,branch:s,target:r,resolved:i,onSaved:c}=t,l=te(),d=`${n}/${o}/${s}`;let y;e[0]!==s||e[1]!==n||e[2]!==o?(y={orgSlug:n,virtualMcpId:o,branch:s},e[0]=s,e[1]=n,e[2]=o,e[3]=y):y=e[3];let p;e[4]!==c?(p={onSaved:c},e[4]=c,e[5]=p):p=e[5];const{save:f,flush:S,isPending:h}=le(y,p);let m;e[6]!==d||e[7]!==l||e[8]!==i||e[9]!==f||e[10]!==r?(m=E=>{i&&f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return Ce(r,i,b,E)})},e[6]=d,e[7]=l,e[8]=i,e[9]=f,e[10]=r,e[11]=m):m=e[11];const g=m;let v;e[12]!==d||e[13]!==l||e[14]!==i||e[15]!==f||e[16]!==r?(v=E=>{!i||r.kind!=="page"||f(i.blockKey,()=>{const b=l.getQueryData(U.decofile(d))?.[i.blockKey];return I(b)?{...b,seo:E}:null})},e[12]=d,e[13]=l,e[14]=i,e[15]=f,e[16]=r,e[17]=v):v=e[17];const R=v;let x;return e[18]!==S||e[19]!==h||e[20]!==R||e[21]!==g?(x={persistSeo:g,persistRawSeo:R,flush:S,isPending:h},e[18]=S,e[19]=h,e[20]=R,e[21]=g,e[22]=x):x=e[22],x}const Pe="https://deco.cx/docs/en/performance/edge-async-render";function Oe(t){const e=L.c(16),{rawSeo:n,onEnableChange:o,onAsyncRenderChange:s,children:r}=t;let i;e[0]!==n?(i=k(n),e[0]=n,e[1]=i):i=e[1];const c=i;let l;e[2]!==n?(l=N(n),e[2]=n,e[3]=l):l=e[3];const d=l;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Y,{htmlFor:"seo-enable",className:"text-sm font-medium",children:"Enable SEO"}),e[4]=y):y=e[4];let p;e[5]!==c||e[6]!==o?(p=a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y,a.jsx($,{id:"seo-enable",checked:c,onCheckedChange:o})]}),e[5]=c,e[6]=o,e[7]=p):p=e[7];let f;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==s?(f=c&&a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[a.jsxs("div",{className:"min-w-0 space-y-1",children:[a.jsx("p",{className:"text-sm font-medium",children:"Async render"}),a.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",a.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:"documentation"}),"."]})]}),a.jsx($,{id:"seo-async-render",checked:d,onCheckedChange:s,className:"shrink-0"})]})]}),e[8]=d,e[9]=r,e[10]=c,e[11]=s,e[12]=f):f=e[12];let S;return e[13]!==p||e[14]!==f?(S=a.jsxs("div",{className:"space-y-4",children:[p,f]}),e[13]=p,e[14]=f,e[15]=S):S=e[15],S}const B=["type","title","description","canonical","favicon","image","themeColor"],Le=["jsonLD","omitVariants","title","description","noIndexing","ignoreStructuredData"],Fe=["jsonLD","title","description","noIndexing","configJsonLD"];function H(t){return t===C||/\/Seo\/SeoV2\.tsx$/i.test(t)?"general":/\/Seo\/SeoPDP/i.test(t)?"pdp":/\/Seo\/SeoPLP/i.test(t)?"plp":"full"}function Ke(t){switch(t){case"general":return B;case"pdp":return Le;case"plp":return Fe;default:return null}}function J(t,e){const n=Ke(H(e));if(!n||!t.properties)return t;const o={};for(const s of n){const r=t.properties[s];r&&(o[s]=r)}return{...t,properties:o}}function ke(){return B.filter(t=>t!=="type")}function Ne(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim()}function Ae(t,e){return t[e]===void 0}function $e(t){const e=L.c(13),{schema:n,value:o,onChange:s,siteDefaultSeo:r,formResetKey:i}=t,l=J(n,C).properties??{},d=ke();let y;e[0]!==r?(y=!!r&&Object.keys(r).length>0,e[0]=r,e[1]=y):y=e[1];const p=y,[f,S]=M.useState(i);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={},e[2]=h):h=e[2];const[m,g]=M.useState(h);f!==i&&(S(i),g({}));let v;e[3]!==m||e[4]!==o?(v=u=>m[u]!==void 0?m[u]:Ae(o,u),e[3]=m,e[4]=o,e[5]=v):v=e[5];const R=v;let x;e[6]!==s||e[7]!==r||e[8]!==o?(x=(u,T)=>{g(D=>({...D,[u]:T}));const j={...o};if(T)delete j[u];else{const D=r?.[u];j[u]=D??(u==="type"?"website":"")}s(j)},e[6]=s,e[7]=r,e[8]=o,e[9]=x):x=e[9];const E=x,P="min-w-0 space-y-6",b=B.map(u=>{const T=l[u];if(!T)return null;const j=p&&d.includes(u),D=j&&R(u),X=D?r?.[u]??o[u]:o[u],ee=T.title??Ne(u);return a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:ne(D&&"pointer-events-none opacity-60"),children:ce({schema:T,value:X,onChange:A=>{D||s({...o,[u]:A})},path:u,label:ee,breadcrumbPath:[],onBreadcrumbChange:we})}),j&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($,{id:`seo-use-default-${u}`,checked:D,onCheckedChange:A=>E(u,A)}),a.jsx(Y,{htmlFor:`seo-use-default-${u}`,className:"text-xs font-normal text-muted-foreground",children:"Use default"})]})]},u)});let _;return e[10]!==i||e[11]!==b?(_=a.jsx("div",{className:P,children:b},i),e[10]=i,e[11]=b,e[12]=_):_=e[12],_}function we(){}function Ie(t){const e=L.c(18),{schema:n,resolveType:o,value:s,formResetKey:r,onChange:i,onBreadcrumbChange:c,siteDefaultSeo:l}=t;if(H(o)==="general"){let m;e[0]!==i?(m=v=>i(v),e[0]=i,e[1]=m):m=e[1];let g;return e[2]!==r||e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==s?(g=a.jsx($e,{schema:n,value:s,onChange:m,siteDefaultSeo:l,formResetKey:r}),e[2]=r,e[3]=n,e[4]=l,e[5]=m,e[6]=s,e[7]=g):g=e[7],g}let y;e[8]!==o||e[9]!==n?(y=J(n,o),e[8]=o,e[9]=n,e[10]=y):y=e[10];const p=y;let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[11]=f):f=e[11];const S=c??Ye;let h;return e[12]!==p||e[13]!==r||e[14]!==i||e[15]!==S||e[16]!==s?(h=a.jsx(ae,{schema:p,value:s,onChange:i,basePath:"",breadcrumbPath:f,onBreadcrumbChange:S},r),e[12]=p,e[13]=r,e[14]=i,e[15]=S,e[16]=s,e[17]=h):h=e[17],h}function Ye(){}function Ve(t){const e=L.c(10),{options:n,value:o,onChange:s}=t;if(n.length<=1)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(Y,{className:"text-xs text-muted-foreground",children:"SEO type"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(fe,{className:"w-full",children:a.jsx(pe,{placeholder:"Select SEO type"})}),e[1]=i):i=e[1];let c;e[2]!==n?(c=n.filter(Ue).map(Be),e[2]=n,e[3]=c):c=e[3];let l;e[4]!==c?(l=a.jsx(de,{children:c}),e[4]=c,e[5]=l):l=e[5];let d;return e[6]!==s||e[7]!==l||e[8]!==o?(d=a.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[r,a.jsxs(ye,{value:o,onValueChange:s,children:[i,l]})]}),e[6]=s,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}function Be(t){return a.jsx(ue,{value:t.resolveType,children:t.title},t.resolveType)}function Ue(t){return t.resolveType.length>0}function Je(t){const e=L.c(33),{rawSeo:n,innerSeo:o,defaultResolveType:s,seoSchema:r,activeResolveType:i,seoTypeOptions:c,formResetKey:l,siteDefaultSeo:d,onBreadcrumbChange:y,onPersistRaw:p,onInnerChange:f,onClearForm:S,onBumpFormKey:h,beforeFields:m}=t;let g;e[0]!==s||e[1]!==h||e[2]!==S||e[3]!==p?(g=T=>{if(T){const j=me(s);p(j),S(),h();return}p(null),S(),h()},e[0]=s,e[1]=h,e[2]=S,e[3]=p,e[4]=g):g=e[4];const v=g;let R;e[5]!==p||e[6]!==n?(R=T=>{const j=Se(T,n);p(j)},e[5]=p,e[6]=n,e[7]=R):R=e[7];const x=R;let E;e[8]!==h||e[9]!==f?(E=T=>{f({__resolveType:T}),h()},e[8]=h,e[9]=f,e[10]=E):E=e[10];const P=E;let b;e[11]!==i||e[12]!==P||e[13]!==n||e[14]!==r||e[15]!==c?(b=k(n)&&r&&i&&c&&c.length>0&&a.jsx(Ve,{options:c,value:i,onChange:P}),e[11]=i,e[12]=P,e[13]=n,e[14]=r,e[15]=c,e[16]=b):b=e[16];let _;e[17]!==i||e[18]!==l||e[19]!==o||e[20]!==y||e[21]!==f||e[22]!==n||e[23]!==r||e[24]!==d?(_=k(n)&&r&&i&&a.jsx(Ie,{schema:r,resolveType:i,value:o,formResetKey:l,onChange:T=>f(T),onBreadcrumbChange:y,siteDefaultSeo:d}),e[17]=i,e[18]=l,e[19]=o,e[20]=y,e[21]=f,e[22]=n,e[23]=r,e[24]=d,e[25]=_):_=e[25];let u;return e[26]!==m||e[27]!==x||e[28]!==v||e[29]!==n||e[30]!==b||e[31]!==_?(u=a.jsxs(Oe,{rawSeo:n,onEnableChange:v,onAsyncRenderChange:x,children:[m,b,_]}),e[26]=m,e[27]=x,e[28]=v,e[29]=n,e[30]=b,e[31]=_,e[32]=u):u=e[32],u}export{Je as P,Ie as S,w as a,qe as b,Ce as c,Z as d,je as f,k as i,Ze as r,He as u};
@@ -0,0 +1 @@
1
+ import{c as it,r as E,j as e,i as rt}from"./index-DNcmUp59.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-DDK4qW6D.js";import{m as nt}from"./automation-runs-BnrgVUSd.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DqfLsPX0.js";import{r as xt}from"./index-CIr2stgr.js";import"./LayoutLeft-yM1pyLkw.js";import"./use-mobile-C7gDKZvn.js";import"./X-BE13dUVX.js";import"./tooltip-DQLZzXJB.js";import"./select-ekdvRgqD.js";import"./ChevronUp-aSduSXZP.js";import"./ChevronDown-DX5Tgk2V.js";import"./useInfiniteQuery-DxqaPoxE.js";import"./use-infinite-scroll-Ci4rO-EC.js";import"./use-connection-axeygVvB.js";import"./use-collections-CGy1V_t9.js";import"./use-mcp-client-D36DD3hp.js";import"./auth-Fypm4NkM.js";import"./use-virtual-mcp-DWAHiTJI.js";import"./card-WylyHbwK.js";import"./table-DeKx66kZ.js";import"./empty-state-CY2Mh10-.js";import"./use-members-B0Qnra6P.js";import"./use-org-auth-client-CTuAh9l1.js";import"./use-clock-tick-CBlyuXH9.js";import"./AlertCircle-MiSPXNM6.js";import"./CheckCircle-CAS4qDUe.js";import"./DotsVertical-CbVNRQTJ.js";import"./agent-icon-mosHW1Wm.js";import"./Tool01-DPFYhxQw.js";import"./ArrowUp-CYp-fH3b.js";import"./Settings02-Bk_p4b4f.js";import"./Tool02-BZ4d3qZ4.js";import"./XCircle-DBu_5MRx.js";import"./ArrowUpRight-BKWmlm-S.js";import"./TrendUp01-DZ3NZVPO.js";import"./ZapSquare-DjeDqWhA.js";import"./ZoomOut-Cfc1dYbx.js";import"./Users03-DfBzNWCj.js";import"./ChevronRight-BtPKpVmg.js";import"./Stars02-DVkXvQJE.js";import"./Copy01-B8XCt5Zb.js";import"./Globe01-B1n4lMzM.js";import"./Eye-CqAIUvR9.js";import"./FilterLines--YHdOfYC.js";import"./Star01-t1ebJ4NM.js";import"./Globe04-CpcrEsco.js";import"./SwitchHorizontal01-83gXOmJr.js";import"./HardDrive-CBMVcXrD.js";import"./Image01-BFJWA7zB.js";import"./Key01-1lxi5YQi.js";import"./LinkExternal01-DlZXS744.js";import"./Monitor01-D9tr7pGV.js";import"./Sun-CJn0L0BD.js";import"./Package-B15um8UB.js";import"./Palette-CYu9EeqY.js";import"./Play-BKYeFdfo.js";import"./Plus-xyC5kVx_.js";import"./SearchLg-Bvhw6tXa.js";import"./SearchMd-8QLR6foG.js";import"./Shield01-CapY8w0F.js";import"./Stars01-CzwHMMGV.js";import"./Trash01-BZWy8uav.js";import"./Upload01-CQv4QkPs.js";import"./User01-DHhJ9Efj.js";import"./Users01-BDzOY7VS.js";import"./XClose-B6C-UBKb.js";import"./Zap-DfliSzHo.js";import"./use-automations-DHtFgmxU.js";import"./studio-tools-WPp0LYJS.js";import"./useSuspenseInfiniteQuery-C-ppQ5Ml.js";import"./avatar-CYb8sgBh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-LZ_imZVK.js";import"./file-type-icon-CqvPRhZz.js";import"./dialog-BFEhZp6A.js";import"./tab-id-BijBBRwE.js";import"./hooks-DuvOlhew.js";import"./decopilot-sse-pool-aNfj8Q7u.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-BxxYRsfc.js";import"./autosend-NDbr__lx.js";import"./use-ai-providers-DnwQLbXU.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-DPxVgd9c.js";import"./use-organization-settings-qGG--pic.js";import"./monaco-editor--HzZeIWV.js";import"./index-BEMBybQS.js";import"./index-CmGFMd5y.js";import"./calendar-Dwd1mrtZ.js";import"./shell-layout-CQ6ltpQl.js";import"./use-t-CX9UNock.js";import"./required-auth-layout-Bo8cZozY.js";import"./use-org-sso-Deo4Br8l.js";import"./integration-icon-BHTX5a7j.js";import"./use-navigate-to-agent-lZlBuBHo.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-LO_FyVEE.js";import"./form-Du6A_UHt.js";import"./label-CCdy2D-Q.js";import"./input-DDSyA2F6.js";import"./switch-BlqfjViK.js";import"./drawer-Cg-ser7v.js";import"./collection-search-DT85R55j.js";import"./index-CKVu-2WY.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-wuhdI0AX.js";import"./use-mcp-tools-DsOswbCa.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-B2msnFcH.js";import"./mcp-oauth-yniCAgpj.js";import"./extract-connection-data-eD6jRJ-R.js";import"./dropdown-menu-C1ojGxZa.js";import"./popover-DIFPu1Xc.js";import"./command-BUpgxLnZ.js";import"./index-C3kB1WBh.js";import"./companions-core-DJw87u__.js";import"./tabs-BPdfqZi2.js";import"./toggle-group-ppOZTb8V.js";import"./use-deco-credits-ndGlyzP0.js";import"./connection-card-DR_O5uZl.js";import"./use-registry-connections-CmJKnJO4.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CNjMDqlK.js";import"./connection-form-helpers-3AkHW_P5.js";import"./collection-tabs-B4HCiR6C.js";import"./badge-CusDamT1.js";import"./connect-desktop-dialog-D5ifrfV1.js";import"./select-model-BY-QBGvY.js";import"./checkbox-CalBxksB.js";import"./skeleton-6cCuJZrU.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Q2P_qubH.js";import"./index-fVc1EX-x.js";import"./alert-dialog-0iCg_Dy8.js";import"./toolbar-flT__B79.js";import"./use-debounced-value-CzZtnfG7.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CVj3zpTq.js";import"./use-capability-B-0Wa4-2.js";import"./toolbar-icon-button-CDgOWAO8.js";import"./use-debounced-autosave-wfWymBSV.js";import"./index-CRpcM2qG.js";import"./search-input-DaPZylE4.js";import"./use-mcp-auth-status-BA-qrTSs.js";import"./github-repo-picker-D0k_58eA.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BwXqRBu3.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-Bc5xSoNA.js";import"./automation-list-row-BQOMvlC2.js";function ui(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const q=F,z=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,A=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==z?(l=e.jsx(mt,{className:"text-sm font-semibold",children:z}),t[13]=z,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==A||t[37]!==_?(S=!o||!T&&!A?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=M,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=A,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==q||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:q,children:f}),t[42]=q,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{ui as SeoSheet};
@@ -1 +1 @@
1
- import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-B7P9L1Cb.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
1
+ import{r as i,aR as $,j as c,cR as L,aV as z,aS as A,aO as _,aU as g,cS as j,ba as w,cT as G,cU as E,c_ as H,d0 as U,aQ as V,d2 as K,c$ as W,d1 as Q,cV as Y,cW as Z,cY as q,c as R,l as B}from"./index-DNcmUp59.js";var C="Popover",[b]=V(C,[E]),P=E(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var S="PopoverAnchor",X=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(j,{...s,...r,ref:e})});X.displayName=S;var F="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(j,{asChild:!0,...s,children:p})});y.displayName=F;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=K("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Q,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Y,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(Z,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
@@ -1 +1 @@
1
- import{c as Y,j as t,B as le}from"./index-B7P9L1Cb.js";import{i as ae}from"./AlertCircle-YTnC8afg.js";import{n as me}from"./LinkExternal01-Cs8W9Hry.js";import{aM as pe,h as ne}from"./agent-icon-YtqF2nfc.js";import{I as te}from"./input-ijcl7nEP.js";import{L as X}from"./label-9EwRfhPm.js";import{M as ce}from"./multi-select-BGWrQ48I.js";import{b as ie,c as de,T as se,a as fe}from"./tabs-DKFaLepz.js";import{T as ue}from"./textarea-C_uRm2JY.js";import{v as xe,w as he,x as ge,o as ve,y as je,z as be,I as ye,A as Ce,B as Ne,C as ke}from"./index-CPG668bW.js";import{b as Se,T as Pe,a as we}from"./tooltip-CnYyAlKq.js";import{b as _e,a as Be,B as Te}from"./block-document-Bi40-54p.js";import{u as Ee}from"./use-autosave-y8W9Kw5f.js";import{s as T,E as Fe,R as Re,A as Ae}from"./primitives-6GMsWgg4.js";import"./Tool01-Cv1CkSYA.js";import"./ArrowUp-CsHPcA9e.js";import"./Settings02-C5QKkVyV.js";import"./Tool02-BpdaUfQm.js";import"./XCircle-ru8_z274.js";import"./ArrowUpRight-Cz4lk-G7.js";import"./TrendUp01-Do2A0b1V.js";import"./ZapSquare-BzcFU97i.js";import"./ZoomOut-5R0ZYe_g.js";import"./Users03-DtnR2O5U.js";import"./CheckCircle-msR6mCMy.js";import"./ChevronUp-Bga41moq.js";import"./ChevronDown-BxiHFmLr.js";import"./ChevronRight-DLwXGp3J.js";import"./DotsVertical-Bym0eepo.js";import"./Stars02-DT4DCiSm.js";import"./Copy01-DARrnqyO.js";import"./Globe01-CHaqz7lY.js";import"./Eye-Q93iqzOQ.js";import"./FilterLines-D_2Uzy3T.js";import"./Star01-BA5icFDw.js";import"./Globe04-CsR3hp-R.js";import"./SwitchHorizontal01-CF9jPebn.js";import"./HardDrive-CifwuQMq.js";import"./Image01-LZ6tNZCh.js";import"./Key01-DxBlOWSP.js";import"./LayoutLeft-PG1Qj8HR.js";import"./Monitor01-DNXO5Xap.js";import"./Sun-BaW8iMzc.js";import"./Package-CDgO9FJo.js";import"./Palette-DZ-mRtqH.js";import"./Play-D_gsJbBN.js";import"./Plus-BQNlkQW1.js";import"./SearchLg-DecRz7CF.js";import"./SearchMd-DlQrvAOj.js";import"./Shield01-DsqpIdPl.js";import"./Stars01-sFKBel8a.js";import"./Trash01-DCAfzqJq.js";import"./Upload01-BkSfT9PJ.js";import"./User01-BFiYGCaZ.js";import"./Users01-1er0h3V-.js";import"./XClose-CoJnbAb8.js";import"./X-DXB1dhTC.js";import"./Zap-E8p7rYFy.js";import"./badge-C87ClbXM.js";import"./checkbox-CeSxNCqq.js";import"./command-BFxbzakL.js";import"./index-FxbvscrH.js";import"./dialog-CG3DUz7s.js";import"./popover-T38vYiZh.js";import"./chat-context-DTjr0Dbi.js";import"./autosend-CgK0T1el.js";import"./hooks-D6g_xzzz.js";import"./use-mcp-client-C_pdV6jn.js";import"./auth-upuRD_Ra.js";import"./decopilot-sse-pool-BmlS6-Nb.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-C9ARrYBL.js";import"./use-virtual-mcp-DCm-Xozi.js";import"./use-collections-CmKRIAjf.js";import"./use-ai-providers-BRWjkOZS.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-DnuUXtfc.js";import"./use-organization-settings-BqvY7w8Y.js";import"./automation-runs-DsF8E4ym.js";import"./select-jpq2sMjS.js";import"./useInfiniteQuery-B9seebWc.js";import"./use-infinite-scroll-U-AFCkvY.js";import"./use-connection-0zoba2rw.js";import"./card-l_QjAxij.js";import"./sidebar-DMP6qx_d.js";import"./use-mobile-DbAQzyDT.js";import"./table-NZu1_-b5.js";import"./empty-state-CDPR6N5z.js";import"./use-members-B8qEqUk4.js";import"./use-org-auth-client-DI2haDb4.js";import"./use-clock-tick-CEBh96YJ.js";import"./use-automations-BOwp0Ljv.js";import"./useSuspenseInfiniteQuery-C25zLgs8.js";import"./avatar-ZVqnpQ5L.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DMtwPA-6.js";import"./file-type-icon-WXISwa9J.js";import"./monaco-editor-BZaLhjRg.js";import"./index-CoWtXqSh.js";import"./index-LoDEgrVX.js";import"./calendar-AptmavaL.js";import"./shell-layout-CzqPzueH.js";import"./use-t-PEFPXiWR.js";import"./required-auth-layout-lFMnY-UF.js";import"./use-org-sso-C0aWoC2y.js";import"./integration-icon-Bs2sf2JV.js";import"./use-navigate-to-agent-CMgclBRY.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-r1F-84pn.js";import"./form-DYE3hpCm.js";import"./drawer-Dt9mWC4s.js";import"./collection-search-f7Ru4qfg.js";import"./index-k_A1H4m6.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-DELF31ZQ.js";import"./use-mcp-tools-LZPhuCV-.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-IFB7ccAP.js";import"./mcp-oauth-CH3qppcA.js";import"./extract-connection-data-B6BkC0Qi.js";import"./dropdown-menu-tljvyOZC.js";import"./companions-core-CMcgv8ia.js";import"./toggle-group-DmguQTgj.js";import"./use-deco-credits-DNevOr5z.js";import"./connection-card-DH3iT98s.js";import"./use-registry-connections-BXi8EgPf.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-CBuwXrmH.js";import"./collection-tabs-p5cUCtS8.js";import"./connect-desktop-dialog-CKzM8gkD.js";import"./select-model-CFdq_S_o.js";import"./skeleton-BoztpE77.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BYOwHA7v.js";import"./index-Cqfo9Bs1.js";import"./alert-dialog-B2HLXbcZ.js";import"./toolbar-B86IfpSP.js";import"./use-debounced-value-BUQ43bVg.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DxeYG164.js";import"./use-capability-uuWJKK6o.js";import"./toolbar-icon-button-DRxPDpTN.js";import"./use-debounced-autosave-CoaXX8r3.js";import"./index-CwBrj8E9.js";import"./search-input-DyxEg05L.js";import"./use-mcp-auth-status-BIkbUDPa.js";import"./switch-CtD3Qolf.js";import"./github-repo-picker-CCc_BK8m.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BQ4MA-8c.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-Bok_4-BR.js";import"./automation-list-row-DrxN0DJn.js";function $e(j){return Array.isArray(j)?j.map(e=>({key:T(e?.key),value:T(e?.value)})):[]}function $s(j){const e=Y.c(82),{orgSlug:s,virtualMcpId:r,branch:i,blockKey:f,block:m,decofile:a,meta:c,previewBaseUrl:h}=j;let x;e[0]!==i||e[1]!==s||e[2]!==r?(x={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=x):x=e[3];const l=xe(x);let p;e[4]!==m?(p=he(m,"posts"),e[4]=m,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==l?(n=E=>{l.mutate({blockKey:f,data:je(f,"posts",be(E))})},e[6]=f,e[7]=l,e[8]=n):n=e[8];const[o,N]=Ee(d,n);let k;e[9]!==o||e[10]!==N?(k=(E,re)=>N({...o,[E]:re}),e[9]=o,e[10]=N,e[11]=k):k=e[11];const b=k;let S;e[12]!==a||e[13]!==o||e[14]!==h?(S=_e({decofile:a,post:o,previewBaseUrl:h}),e[12]=a,e[13]=o,e[14]=h,e[15]=S):S=e[15];const y=S;let g,v,P,w;e[16]!==o?(v=ge(o),g=v.length>0,P=v.length===1?"field":"fields",w=v.join(", "),e[16]=o,e[17]=g,e[18]=v,e[19]=P,e[20]=w):(g=e[17],v=e[18],P=e[19],w=e[20]);const _=`Missing required ${P}: ${w}`;let C;e[21]!==o.title?(C=T(o.title)||"Untitled post",e[21]=o.title,e[22]=C):C=e[22];let B;e[23]!==C?(B=t.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[23]=C,e[24]=B):B=e[24];let u;e[25]!==g||e[26]!==v||e[27]!==_?(u=g&&t.jsxs(Se,{children:[t.jsx(Pe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(ae,{size:14}),v.length," ",v.length===1?"issue":"issues"]})}),t.jsx(we,{side:"bottom",children:_})]}),e[25]=g,e[26]=v,e[27]=_,e[28]=u):u=e[28];let F;e[29]!==l.isError||e[30]!==l.isPending?(F=t.jsx(ve,{isPending:l.isPending,isError:l.isError}),e[29]=l.isError,e[30]=l.isPending,e[31]=F):F=e[31];const Z=!y||g,ee=g?_:y?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let R;e[32]!==g||e[33]!==y?(R=()=>{y&&!g&&window.open(y,"_blank","noopener,noreferrer")},e[32]=g,e[33]=y,e[34]=R):R=e[34];let H;e[35]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(me,{size:14}),e[35]=H):H=e[35];let A;e[36]!==Z||e[37]!==ee||e[38]!==R?(A=t.jsxs(le,{type:"button",variant:"outline",size:"sm",disabled:Z,title:ee,onClick:R,children:[H,"See preview"]}),e[36]=Z,e[37]=ee,e[38]=R,e[39]=A):A=e[39];let $;e[40]!==u||e[41]!==F||e[42]!==A?($=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[u,F,A]}),e[40]=u,e[41]=F,e[42]=A,e[43]=$):$=e[43];let L;e[44]!==$||e[45]!==B?(L=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[B,$]}),e[44]=$,e[45]=B,e[46]=L):L=e[46];let M;e[47]!==o.title?(M=T(o.title),e[47]=o.title,e[48]=M):M=e[48];let I;e[49]!==b?(I=E=>b("title",E),e[49]=b,e[50]=I):I=e[50];let U;e[51]!==M||e[52]!==I?(U=t.jsx(Fe,{value:M,onChange:I,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[51]=M,e[52]=I,e[53]=U):U=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsxs(ie,{value:"content",children:[t.jsx(pe,{}),"Content"]}),e[54]=J):J=e[54];let Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsxs(de,{children:[J,t.jsxs(ie,{value:"settings",children:[t.jsx(ne,{}),"Settings"]})]}),e[55]=Q):Q=e[55];let V;e[56]!==o.sections?(V=Be(o.sections),e[56]=o.sections,e[57]=V):V=e[57];let z;e[58]!==b?(z=E=>b("sections",E),e[58]=b,e[59]=z):z=e[59];let D;e[60]!==i||e[61]!==s||e[62]!==r?(D={orgSlug:s,virtualMcpId:r,branch:i},e[60]=i,e[61]=s,e[62]=r,e[63]=D):D=e[63];let q;e[64]!==c||e[65]!==V||e[66]!==z||e[67]!==D?(q=t.jsx(se,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Te,{value:V,onChange:z,meta:c,sandboxRef:D,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[64]=c,e[65]=V,e[66]=z,e[67]=D,e[68]=q):q=e[68];let K;e[69]!==a||e[70]!==o||e[71]!==b?(K=t.jsx(se,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Le,{post:o,decofile:a,onChange:b})})}),e[69]=a,e[70]=o,e[71]=b,e[72]=K):K=e[72];let O;e[73]!==q||e[74]!==K?(O=t.jsxs(fe,{defaultValue:"content",className:"mt-6 gap-4",children:[Q,q,K]}),e[73]=q,e[74]=K,e[75]=O):O=e[75];let G;e[76]!==U||e[77]!==O?(G=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,O]})}),e[76]=U,e[77]=O,e[78]=G):G=e[78];let W;return e[79]!==L||e[80]!==G?(W=t.jsxs("div",{className:"flex h-full flex-col",children:[L,G]}),e[79]=L,e[80]=G,e[81]=W):W=e[81],W}function Le(j){const e=Y.c(57),{post:s,decofile:r,onChange:i}=j;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let m;e[1]!==s.excerpt?(m=T(s.excerpt),e[1]=s.excerpt,e[2]=m):m=e[2];let a;e[3]!==i?(a=u=>i("excerpt",u.target.value),e[3]=i,e[4]=a):a=e[4];let c;e[5]!==m||e[6]!==a?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(ue,{id:"post-excerpt",value:m,onChange:a,rows:2})]}),e[5]=m,e[6]=a,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(X,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==s.slug?(x=T(s.slug),e[9]=s.slug,e[10]=x):x=e[10];let l;e[11]!==i?(l=u=>i("slug",u.target.value),e[11]=i,e[12]=l):l=e[12];let p;e[13]!==x||e[14]!==l?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(te,{id:"post-slug",value:x,onChange:l,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=l,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==s.date?(n=T(s.date),e[17]=s.date,e[18]=n):n=e[18];let o;e[19]!==i?(o=u=>i("date",u),e[19]=i,e[20]=o):o=e[20];let N;e[21]!==n||e[22]!==o?(N=t.jsx(ke,{schema:d,value:n,onChange:o,path:"post-date",label:"Date"}),e[21]=n,e[22]=o,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==p?(k=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=k):k=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={type:"string",format:"image-uri",title:"Cover image"},e[27]=b):b=e[27];let S;e[28]!==i?(S=u=>i("image",u),e[28]=i,e[29]=S):S=e[29];let y;e[30]!==s.image||e[31]!==S?(y=t.jsx(ye,{schema:b,value:s.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=s.image,e[31]=S,e[32]=y):y=e[32];let g;e[33]!==i?(g=u=>i("authors",u),e[33]=i,e[34]=g):g=e[34];let v;e[35]!==r||e[36]!==s.authors||e[37]!==g?(v=t.jsx(oe,{label:"Authors",decofile:r,kind:"authors",valueField:"email",toRef:Ie,selected:s.authors,onChange:g}),e[35]=r,e[36]=s.authors,e[37]=g,e[38]=v):v=e[38];let P;e[39]!==i?(P=u=>i("categories",u),e[39]=i,e[40]=P):P=e[40];let w;e[41]!==r||e[42]!==s.categories||e[43]!==P?(w=t.jsx(oe,{label:"Categories",decofile:r,kind:"categories",valueField:"slug",toRef:Me,selected:s.categories,onChange:P}),e[41]=r,e[42]=s.categories,e[43]=P,e[44]=w):w=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let C;e[47]!==s.extraProps||e[48]!==_?(C=t.jsx(Ue,{value:s.extraProps,onChange:_}),e[47]=s.extraProps,e[48]=_,e[49]=C):C=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==v||e[53]!==w||e[54]!==C||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,k,y,v,w,C]}),e[50]=k,e[51]=y,e[52]=v,e[53]=w,e[54]=C,e[55]=c,e[56]=B):B=e[56],B}function Me(j){return{name:T(j.name),slug:T(j.slug)}}function Ie(j){return{...j}}function Ue(j){const e=Y.c(15),{value:s,onChange:r}=j;let i,f,m,a;if(e[0]!==r||e[1]!==s){i=$e(s);const x=(l,p)=>r(i.map((d,n)=>n===l?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(X,{children:"Extra props"}),e[6]=m):m=e[6],a=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((l,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(te,{value:l.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(te,{value:l.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(Re,{label:"Remove prop",onClick:()=>r(i.filter((d,n)=>n!==p))})]},p))}),e[0]=r,e[1]=s,e[2]=i,e[3]=f,e[4]=m,e[5]=a}else i=e[2],f=e[3],m=e[4],a=e[5];let c;e[7]!==i||e[8]!==r?(c=t.jsx(Ae,{label:"Add prop",onClick:()=>r([...i,{key:"",value:""}])}),e[7]=i,e[8]=r,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==m||e[12]!==a||e[13]!==c?(h=t.jsxs("div",{className:f,children:[m,a,c]}),e[10]=f,e[11]=m,e[12]=a,e[13]=c,e[14]=h):h=e[14],h}function oe(j){const e=Y.c(17),{label:s,decofile:r,kind:i,valueField:f,toRef:m,selected:a,onChange:c}=j;let h;e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==m||e[4]!==f?(h=Ce({records:Ne(r,i),selected:a,valueField:f,toRef:m}),e[0]=r,e[1]=i,e[2]=a,e[3]=m,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:l,refsForValues:p}=h;let d;e[6]!==s?(d=t.jsx(X,{children:s}),e[6]=s,e[7]=d):d=e[7];let n;e[8]!==s||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==l?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",s.toLowerCase()," yet — create some in the"," ",s.toLowerCase()," collection."]}):t.jsx(ce,{options:x,defaultValue:l,onValueChange:N=>c(p(N)),placeholder:`Select ${s.toLowerCase()}`,maxCount:4}),e[8]=s,e[9]=c,e[10]=x,e[11]=p,e[12]=l,e[13]=n):n=e[13];let o;return e[14]!==d||e[15]!==n?(o=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=o):o=e[16],o}export{$s as PostEditor};
1
+ import{c as Y,j as t,B as le}from"./index-DNcmUp59.js";import{i as ae}from"./AlertCircle-MiSPXNM6.js";import{n as me}from"./LinkExternal01-DlZXS744.js";import{aM as pe,h as ne}from"./agent-icon-mosHW1Wm.js";import{I as te}from"./input-DDSyA2F6.js";import{L as X}from"./label-CCdy2D-Q.js";import{M as ce}from"./multi-select-BGcQG_lB.js";import{b as ie,c as de,T as se,a as fe}from"./tabs-BPdfqZi2.js";import{T as ue}from"./textarea-CNjMDqlK.js";import{v as xe,w as he,x as ge,o as ve,y as je,z as be,I as ye,A as Ce,B as Ne,C as ke}from"./index-CIr2stgr.js";import{b as Se,T as Pe,a as we}from"./tooltip-DQLZzXJB.js";import{b as _e,a as Be,B as Te}from"./block-document-BuU9VrUR.js";import{u as Ee}from"./use-autosave-BlvLM2-d.js";import{s as T,E as Fe,R as Re,A as Ae}from"./primitives-DUUf88_v.js";import"./Tool01-DPFYhxQw.js";import"./ArrowUp-CYp-fH3b.js";import"./Settings02-Bk_p4b4f.js";import"./Tool02-BZ4d3qZ4.js";import"./XCircle-DBu_5MRx.js";import"./ArrowUpRight-BKWmlm-S.js";import"./TrendUp01-DZ3NZVPO.js";import"./ZapSquare-DjeDqWhA.js";import"./ZoomOut-Cfc1dYbx.js";import"./Users03-DfBzNWCj.js";import"./CheckCircle-CAS4qDUe.js";import"./ChevronUp-aSduSXZP.js";import"./ChevronDown-DX5Tgk2V.js";import"./ChevronRight-BtPKpVmg.js";import"./DotsVertical-CbVNRQTJ.js";import"./Stars02-DVkXvQJE.js";import"./Copy01-B8XCt5Zb.js";import"./Globe01-B1n4lMzM.js";import"./Eye-CqAIUvR9.js";import"./FilterLines--YHdOfYC.js";import"./Star01-t1ebJ4NM.js";import"./Globe04-CpcrEsco.js";import"./SwitchHorizontal01-83gXOmJr.js";import"./HardDrive-CBMVcXrD.js";import"./Image01-BFJWA7zB.js";import"./Key01-1lxi5YQi.js";import"./LayoutLeft-yM1pyLkw.js";import"./Monitor01-D9tr7pGV.js";import"./Sun-CJn0L0BD.js";import"./Package-B15um8UB.js";import"./Palette-CYu9EeqY.js";import"./Play-BKYeFdfo.js";import"./Plus-xyC5kVx_.js";import"./SearchLg-Bvhw6tXa.js";import"./SearchMd-8QLR6foG.js";import"./Shield01-CapY8w0F.js";import"./Stars01-CzwHMMGV.js";import"./Trash01-BZWy8uav.js";import"./Upload01-CQv4QkPs.js";import"./User01-DHhJ9Efj.js";import"./Users01-BDzOY7VS.js";import"./XClose-B6C-UBKb.js";import"./X-BE13dUVX.js";import"./Zap-DfliSzHo.js";import"./badge-CusDamT1.js";import"./checkbox-CalBxksB.js";import"./command-BUpgxLnZ.js";import"./index-C3kB1WBh.js";import"./dialog-BFEhZp6A.js";import"./popover-DIFPu1Xc.js";import"./chat-context-BxxYRsfc.js";import"./autosend-NDbr__lx.js";import"./hooks-DuvOlhew.js";import"./use-mcp-client-D36DD3hp.js";import"./auth-Fypm4NkM.js";import"./decopilot-sse-pool-aNfj8Q7u.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-WPp0LYJS.js";import"./use-virtual-mcp-DWAHiTJI.js";import"./use-collections-CGy1V_t9.js";import"./use-ai-providers-DnwQLbXU.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-DPxVgd9c.js";import"./use-organization-settings-qGG--pic.js";import"./automation-runs-BnrgVUSd.js";import"./select-ekdvRgqD.js";import"./useInfiniteQuery-DxqaPoxE.js";import"./use-infinite-scroll-Ci4rO-EC.js";import"./use-connection-axeygVvB.js";import"./card-WylyHbwK.js";import"./sidebar-DDK4qW6D.js";import"./use-mobile-C7gDKZvn.js";import"./table-DeKx66kZ.js";import"./empty-state-CY2Mh10-.js";import"./use-members-B0Qnra6P.js";import"./use-org-auth-client-CTuAh9l1.js";import"./use-clock-tick-CBlyuXH9.js";import"./use-automations-DHtFgmxU.js";import"./useSuspenseInfiniteQuery-C-ppQ5Ml.js";import"./avatar-CYb8sgBh.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-LZ_imZVK.js";import"./file-type-icon-CqvPRhZz.js";import"./monaco-editor--HzZeIWV.js";import"./index-BEMBybQS.js";import"./index-CmGFMd5y.js";import"./calendar-Dwd1mrtZ.js";import"./shell-layout-CQ6ltpQl.js";import"./use-t-CX9UNock.js";import"./required-auth-layout-Bo8cZozY.js";import"./use-org-sso-Deo4Br8l.js";import"./integration-icon-BHTX5a7j.js";import"./use-navigate-to-agent-lZlBuBHo.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-LO_FyVEE.js";import"./form-Du6A_UHt.js";import"./drawer-Cg-ser7v.js";import"./collection-search-DT85R55j.js";import"./index-CKVu-2WY.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-wuhdI0AX.js";import"./use-mcp-tools-DsOswbCa.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-B2msnFcH.js";import"./mcp-oauth-yniCAgpj.js";import"./extract-connection-data-eD6jRJ-R.js";import"./dropdown-menu-C1ojGxZa.js";import"./companions-core-DJw87u__.js";import"./toggle-group-ppOZTb8V.js";import"./use-deco-credits-ndGlyzP0.js";import"./connection-card-DR_O5uZl.js";import"./use-registry-connections-CmJKnJO4.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-3AkHW_P5.js";import"./collection-tabs-B4HCiR6C.js";import"./connect-desktop-dialog-D5ifrfV1.js";import"./select-model-BY-QBGvY.js";import"./skeleton-6cCuJZrU.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Q2P_qubH.js";import"./index-fVc1EX-x.js";import"./alert-dialog-0iCg_Dy8.js";import"./toolbar-flT__B79.js";import"./use-debounced-value-CzZtnfG7.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CVj3zpTq.js";import"./use-capability-B-0Wa4-2.js";import"./toolbar-icon-button-CDgOWAO8.js";import"./use-debounced-autosave-wfWymBSV.js";import"./index-CRpcM2qG.js";import"./search-input-DaPZylE4.js";import"./use-mcp-auth-status-BA-qrTSs.js";import"./switch-BlqfjViK.js";import"./github-repo-picker-D0k_58eA.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BwXqRBu3.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-Bc5xSoNA.js";import"./automation-list-row-BQOMvlC2.js";function $e(j){return Array.isArray(j)?j.map(e=>({key:T(e?.key),value:T(e?.value)})):[]}function $s(j){const e=Y.c(82),{orgSlug:s,virtualMcpId:r,branch:i,blockKey:f,block:m,decofile:a,meta:c,previewBaseUrl:h}=j;let x;e[0]!==i||e[1]!==s||e[2]!==r?(x={orgSlug:s,virtualMcpId:r,branch:i},e[0]=i,e[1]=s,e[2]=r,e[3]=x):x=e[3];const l=xe(x);let p;e[4]!==m?(p=he(m,"posts"),e[4]=m,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==l?(n=E=>{l.mutate({blockKey:f,data:je(f,"posts",be(E))})},e[6]=f,e[7]=l,e[8]=n):n=e[8];const[o,N]=Ee(d,n);let k;e[9]!==o||e[10]!==N?(k=(E,re)=>N({...o,[E]:re}),e[9]=o,e[10]=N,e[11]=k):k=e[11];const b=k;let S;e[12]!==a||e[13]!==o||e[14]!==h?(S=_e({decofile:a,post:o,previewBaseUrl:h}),e[12]=a,e[13]=o,e[14]=h,e[15]=S):S=e[15];const y=S;let g,v,P,w;e[16]!==o?(v=ge(o),g=v.length>0,P=v.length===1?"field":"fields",w=v.join(", "),e[16]=o,e[17]=g,e[18]=v,e[19]=P,e[20]=w):(g=e[17],v=e[18],P=e[19],w=e[20]);const _=`Missing required ${P}: ${w}`;let C;e[21]!==o.title?(C=T(o.title)||"Untitled post",e[21]=o.title,e[22]=C):C=e[22];let B;e[23]!==C?(B=t.jsx("span",{className:"truncate text-sm font-medium",children:C}),e[23]=C,e[24]=B):B=e[24];let u;e[25]!==g||e[26]!==v||e[27]!==_?(u=g&&t.jsxs(Se,{children:[t.jsx(Pe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(ae,{size:14}),v.length," ",v.length===1?"issue":"issues"]})}),t.jsx(we,{side:"bottom",children:_})]}),e[25]=g,e[26]=v,e[27]=_,e[28]=u):u=e[28];let F;e[29]!==l.isError||e[30]!==l.isPending?(F=t.jsx(ve,{isPending:l.isPending,isError:l.isError}),e[29]=l.isError,e[30]=l.isPending,e[31]=F):F=e[31];const Z=!y||g,ee=g?_:y?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let R;e[32]!==g||e[33]!==y?(R=()=>{y&&!g&&window.open(y,"_blank","noopener,noreferrer")},e[32]=g,e[33]=y,e[34]=R):R=e[34];let H;e[35]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(me,{size:14}),e[35]=H):H=e[35];let A;e[36]!==Z||e[37]!==ee||e[38]!==R?(A=t.jsxs(le,{type:"button",variant:"outline",size:"sm",disabled:Z,title:ee,onClick:R,children:[H,"See preview"]}),e[36]=Z,e[37]=ee,e[38]=R,e[39]=A):A=e[39];let $;e[40]!==u||e[41]!==F||e[42]!==A?($=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[u,F,A]}),e[40]=u,e[41]=F,e[42]=A,e[43]=$):$=e[43];let L;e[44]!==$||e[45]!==B?(L=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[B,$]}),e[44]=$,e[45]=B,e[46]=L):L=e[46];let M;e[47]!==o.title?(M=T(o.title),e[47]=o.title,e[48]=M):M=e[48];let I;e[49]!==b?(I=E=>b("title",E),e[49]=b,e[50]=I):I=e[50];let U;e[51]!==M||e[52]!==I?(U=t.jsx(Fe,{value:M,onChange:I,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[51]=M,e[52]=I,e[53]=U):U=e[53];let J;e[54]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsxs(ie,{value:"content",children:[t.jsx(pe,{}),"Content"]}),e[54]=J):J=e[54];let Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsxs(de,{children:[J,t.jsxs(ie,{value:"settings",children:[t.jsx(ne,{}),"Settings"]})]}),e[55]=Q):Q=e[55];let V;e[56]!==o.sections?(V=Be(o.sections),e[56]=o.sections,e[57]=V):V=e[57];let z;e[58]!==b?(z=E=>b("sections",E),e[58]=b,e[59]=z):z=e[59];let D;e[60]!==i||e[61]!==s||e[62]!==r?(D={orgSlug:s,virtualMcpId:r,branch:i},e[60]=i,e[61]=s,e[62]=r,e[63]=D):D=e[63];let q;e[64]!==c||e[65]!==V||e[66]!==z||e[67]!==D?(q=t.jsx(se,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(Te,{value:V,onChange:z,meta:c,sandboxRef:D,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[64]=c,e[65]=V,e[66]=z,e[67]=D,e[68]=q):q=e[68];let K;e[69]!==a||e[70]!==o||e[71]!==b?(K=t.jsx(se,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Le,{post:o,decofile:a,onChange:b})})}),e[69]=a,e[70]=o,e[71]=b,e[72]=K):K=e[72];let O;e[73]!==q||e[74]!==K?(O=t.jsxs(fe,{defaultValue:"content",className:"mt-6 gap-4",children:[Q,q,K]}),e[73]=q,e[74]=K,e[75]=O):O=e[75];let G;e[76]!==U||e[77]!==O?(G=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,O]})}),e[76]=U,e[77]=O,e[78]=G):G=e[78];let W;return e[79]!==L||e[80]!==G?(W=t.jsxs("div",{className:"flex h-full flex-col",children:[L,G]}),e[79]=L,e[80]=G,e[81]=W):W=e[81],W}function Le(j){const e=Y.c(57),{post:s,decofile:r,onChange:i}=j;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let m;e[1]!==s.excerpt?(m=T(s.excerpt),e[1]=s.excerpt,e[2]=m):m=e[2];let a;e[3]!==i?(a=u=>i("excerpt",u.target.value),e[3]=i,e[4]=a):a=e[4];let c;e[5]!==m||e[6]!==a?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(ue,{id:"post-excerpt",value:m,onChange:a,rows:2})]}),e[5]=m,e[6]=a,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(X,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==s.slug?(x=T(s.slug),e[9]=s.slug,e[10]=x):x=e[10];let l;e[11]!==i?(l=u=>i("slug",u.target.value),e[11]=i,e[12]=l):l=e[12];let p;e[13]!==x||e[14]!==l?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(te,{id:"post-slug",value:x,onChange:l,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=l,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==s.date?(n=T(s.date),e[17]=s.date,e[18]=n):n=e[18];let o;e[19]!==i?(o=u=>i("date",u),e[19]=i,e[20]=o):o=e[20];let N;e[21]!==n||e[22]!==o?(N=t.jsx(ke,{schema:d,value:n,onChange:o,path:"post-date",label:"Date"}),e[21]=n,e[22]=o,e[23]=N):N=e[23];let k;e[24]!==N||e[25]!==p?(k=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=k):k=e[26];let b;e[27]===Symbol.for("react.memo_cache_sentinel")?(b={type:"string",format:"image-uri",title:"Cover image"},e[27]=b):b=e[27];let S;e[28]!==i?(S=u=>i("image",u),e[28]=i,e[29]=S):S=e[29];let y;e[30]!==s.image||e[31]!==S?(y=t.jsx(ye,{schema:b,value:s.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=s.image,e[31]=S,e[32]=y):y=e[32];let g;e[33]!==i?(g=u=>i("authors",u),e[33]=i,e[34]=g):g=e[34];let v;e[35]!==r||e[36]!==s.authors||e[37]!==g?(v=t.jsx(oe,{label:"Authors",decofile:r,kind:"authors",valueField:"email",toRef:Ie,selected:s.authors,onChange:g}),e[35]=r,e[36]=s.authors,e[37]=g,e[38]=v):v=e[38];let P;e[39]!==i?(P=u=>i("categories",u),e[39]=i,e[40]=P):P=e[40];let w;e[41]!==r||e[42]!==s.categories||e[43]!==P?(w=t.jsx(oe,{label:"Categories",decofile:r,kind:"categories",valueField:"slug",toRef:Me,selected:s.categories,onChange:P}),e[41]=r,e[42]=s.categories,e[43]=P,e[44]=w):w=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let C;e[47]!==s.extraProps||e[48]!==_?(C=t.jsx(Ue,{value:s.extraProps,onChange:_}),e[47]=s.extraProps,e[48]=_,e[49]=C):C=e[49];let B;return e[50]!==k||e[51]!==y||e[52]!==v||e[53]!==w||e[54]!==C||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,k,y,v,w,C]}),e[50]=k,e[51]=y,e[52]=v,e[53]=w,e[54]=C,e[55]=c,e[56]=B):B=e[56],B}function Me(j){return{name:T(j.name),slug:T(j.slug)}}function Ie(j){return{...j}}function Ue(j){const e=Y.c(15),{value:s,onChange:r}=j;let i,f,m,a;if(e[0]!==r||e[1]!==s){i=$e(s);const x=(l,p)=>r(i.map((d,n)=>n===l?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(X,{children:"Extra props"}),e[6]=m):m=e[6],a=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((l,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(te,{value:l.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(te,{value:l.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(Re,{label:"Remove prop",onClick:()=>r(i.filter((d,n)=>n!==p))})]},p))}),e[0]=r,e[1]=s,e[2]=i,e[3]=f,e[4]=m,e[5]=a}else i=e[2],f=e[3],m=e[4],a=e[5];let c;e[7]!==i||e[8]!==r?(c=t.jsx(Ae,{label:"Add prop",onClick:()=>r([...i,{key:"",value:""}])}),e[7]=i,e[8]=r,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==m||e[12]!==a||e[13]!==c?(h=t.jsxs("div",{className:f,children:[m,a,c]}),e[10]=f,e[11]=m,e[12]=a,e[13]=c,e[14]=h):h=e[14],h}function oe(j){const e=Y.c(17),{label:s,decofile:r,kind:i,valueField:f,toRef:m,selected:a,onChange:c}=j;let h;e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==m||e[4]!==f?(h=Ce({records:Ne(r,i),selected:a,valueField:f,toRef:m}),e[0]=r,e[1]=i,e[2]=a,e[3]=m,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:l,refsForValues:p}=h;let d;e[6]!==s?(d=t.jsx(X,{children:s}),e[6]=s,e[7]=d):d=e[7];let n;e[8]!==s||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==l?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",s.toLowerCase()," yet — create some in the"," ",s.toLowerCase()," collection."]}):t.jsx(ce,{options:x,defaultValue:l,onValueChange:N=>c(p(N)),placeholder:`Select ${s.toLowerCase()}`,maxCount:4}),e[8]=s,e[9]=c,e[10]=x,e[11]=p,e[12]=l,e[13]=n):n=e[13];let o;return e[14]!==d||e[15]!==n?(o=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=o):o=e[16],o}export{$s as PostEditor};
@@ -1 +1 @@
1
- import{c as f,l as h,j as a}from"./index-B7P9L1Cb.js";import{k as y}from"./agent-icon-YtqF2nfc.js";import{s as v}from"./Plus-BQNlkQW1.js";import{s as j}from"./Trash01-DCAfzqJq.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};
1
+ import{c as f,l as h,j as a}from"./index-DNcmUp59.js";import{k as y}from"./agent-icon-mosHW1Wm.js";import{s as v}from"./Plus-xyC5kVx_.js";import{s as j}from"./Trash01-BZWy8uav.js";function N(o){const e=f.c(14),{value:t,onChange:r,placeholder:s,className:n,onFocus:i,onBlur:l,onKeyDown:c,spellCheck:b,inputRef:p}=o,x=b===void 0?!0:b;let u;e[0]!==r?(u=g=>r(g.target.value),e[0]=r,e[1]=u):u=e[1];let d;e[2]!==n?(d=h("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==i||e[7]!==c||e[8]!==s||e[9]!==x||e[10]!==u||e[11]!==d||e[12]!==t?(m=a.jsx("textarea",{ref:p,value:t,onChange:u,onInput:w,onFocus:i,onBlur:l,onKeyDown:c,placeholder:s,spellCheck:x,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=i,e[7]=c,e[8]=s,e[9]=x,e[10]=u,e[11]=d,e[12]=t,e[13]=m):m=e[13],m}function w(o){const e=o.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function z(o){return typeof o=="string"?o:""}function T(o){const e=f.c(11);let t,r;e[0]!==o?({className:t,...r}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=h(t,"pr-9"),e[3]=t,e[4]=s):s=e[4];let n;e[5]!==r||e[6]!==s?(n=a.jsx(N,{...r,className:s}),e[5]=r,e[6]=s,e[7]=n):n=e[7];let i;e[8]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(y,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=i):i=e[8];let l;return e[9]!==n?(l=a.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,i]}),e[9]=n,e[10]=l):l=e[10],l}function R(o){const e=f.c(5),{label:t,onClick:r,disabled:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(v,{size:13}),e[0]=n):n=e[0];let i;return e[1]!==s||e[2]!==t||e[3]!==r?(i=a.jsxs("button",{type:"button",onClick:r,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,t]}),e[1]=s,e[2]=t,e[3]=r,e[4]=i):i=e[4],i}function B(o){const e=f.c(4),{label:t,onClick:r}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(j,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==t||e[2]!==r?(n=a.jsx("button",{type:"button","aria-label":t,onClick:r,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=t,e[2]=r,e[3]=n):n=e[3],n}function E(o){const e=f.c(2),{children:t}=o;let r;return e[0]!==t?(r=a.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:t}),e[0]=t,e[1]=r):r=e[1],r}function S(o){const e=f.c(8),{active:t,label:r,onClick:s,children:n}=o,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==i?(l=h("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",i),e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==t||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==l?(c=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:_,onClick:s,className:l,children:n}),e[2]=t,e[3]=n,e[4]=r,e[5]=s,e[6]=l,e[7]=c):c=e[7],c}function _(o){return o.preventDefault()}function D(o){if(Array.isArray(o))return o;if(typeof o!="string"||o.trim()==="")return[];try{const e=JSON.parse(o);return Array.isArray(e)?e:[]}catch{return[]}}export{R as A,T as E,E as F,N as I,B as R,S as T,D as p,z as s};