decocms 4.584.11 → 4.584.13

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 (429) hide show
  1. package/dist/client/assets/{AlertCircle-8ukcBvl4.js → AlertCircle-DA6gE5vw.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B6hqu-pW.js → AreaChart-Y5-RpSOt.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-D0b8Szk5.js → ArrowLeft-B8D7i2xh.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-uaCgEM_Q.js → ArrowRight-C1EmTlL-.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-K5jCRsZA.js → ArrowUp-DyF0Rx2O.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-5XPZR6TG.js → BookOpen01-UxGmri2e.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-C4hmdW3d.js → CartesianChart-Dv3UTRbp.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-BPZdBlVt.js → CategoricalChart-oGRIPAq4.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-u2h4KcPu.js → CheckCircle-Bh1gNJET.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-kKxnMd3L.js → ChevronDown-uPv2ScPr.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-DKxNhUwA.js → ChevronSelectorVertical-CiFyE2Pu.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-DQNUTs5_.js → ChevronUp-BkmRXggG.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DbaKJfT8.js → CreditCard01-C-H9qti1.js} +1 -1
  14. package/dist/client/assets/{Eye-_E24hwz9.js → Eye-DL5oRAI4.js} +1 -1
  15. package/dist/client/assets/{File02-DAf1emIR.js → File02-DEjt2PPW.js} +1 -1
  16. package/dist/client/assets/{Globe04-jdIYuCcn.js → Globe04-DD86hrsf.js} +1 -1
  17. package/dist/client/assets/{Image01-Cl7yRuHs.js → Image01-BCiDUkCm.js} +1 -1
  18. package/dist/client/assets/{Key01-DeYX7L_Z.js → Key01-CgRwsDr3.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-BQdYjjc6.js → LayoutLeft-DHg_jNr0.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-DBUc-42w.js → LinkBroken01-Ic71rSEU.js} +1 -1
  21. package/dist/client/assets/{MessageCircle01-D1JzchO_.js → MessageCircle01-CQjeMfQj.js} +1 -1
  22. package/dist/client/assets/{Minus-DBYcv290.js → Minus-BM2zRSMr.js} +1 -1
  23. package/dist/client/assets/{Monitor01-C_gVCCps.js → Monitor01-C4OHhcX6.js} +1 -1
  24. package/dist/client/assets/{Play-DWEq3LWP.js → Play-l838EjWq.js} +1 -1
  25. package/dist/client/assets/{Plus-n5KTXyCz.js → Plus-BzpqhVU8.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-DEVTnbj2.js → ReferenceLine-DmbAcSH6.js} +1 -1
  27. package/dist/client/assets/{SearchMd-B9v3gV_V.js → SearchMd-BhCfkG_O.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-C0IQtOHj.js → ShoppingBag01-KIefHp9K.js} +1 -1
  29. package/dist/client/assets/{Sun-CYLgqf2D.js → Sun-CoJn-J4w.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-B_WFRgSk.js → SwitchHorizontal01-BU8z7oT_.js} +1 -1
  31. package/dist/client/assets/{Tool01-C3qOO4-2.js → Tool01-ymE-fOFX.js} +1 -1
  32. package/dist/client/assets/{Tooltip-DvgWJ47t.js → Tooltip-D86_gjwu.js} +1 -1
  33. package/dist/client/assets/{Trash01-uKrzOq5g.js → Trash01-aSl--BGd.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-DpUK5xLp.js → TrendUp01-Cr4FP2fV.js} +1 -1
  35. package/dist/client/assets/{Upload01-B5by2C-2.js → Upload01-DozMUWEF.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-CI1951yc.js → UserCheck01-3D5hYz4C.js} +1 -1
  37. package/dist/client/assets/{UserSquare-BzGvxH2o.js → UserSquare-aJjYmjOR.js} +1 -1
  38. package/dist/client/assets/{Users01-hxkP_BcE.js → Users01-Cximoi8v.js} +1 -1
  39. package/dist/client/assets/{XClose-DGEX5GIv.js → XClose-Dq0BGBMq.js} +1 -1
  40. package/dist/client/assets/{Zap-VLndYrUw.js → Zap-NAfA60T9.js} +1 -1
  41. package/dist/client/assets/{access-gate-DlMcB91s.js → access-gate-Cnf06l1a.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-CkoGrQvX.js → add-connection-dialog-D1_0-J8t.js} +1 -1
  43. package/dist/client/assets/agent-app-B4NG-g7u.js +1 -0
  44. package/dist/client/assets/{agent-assets-CghbeNXC.js → agent-assets-DHnb5L5s.js} +1 -1
  45. package/dist/client/assets/{agent-automation-CBl5iYvS.js → agent-automation-DBCjX475.js} +1 -1
  46. package/dist/client/assets/{agent-automations-BP9k8H9Z.js → agent-automations-BPqk0cma.js} +1 -1
  47. package/dist/client/assets/{agent-blog-BMtDmL4D.js → agent-blog-C6OhwET5.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-CmrK5edA.js → agent-blog-post-BPTTHi05.js} +2 -2
  49. package/dist/client/assets/{agent-calendar--WuDzh4S.js → agent-calendar-n7d8kxeC.js} +1 -1
  50. package/dist/client/assets/{agent-capabilities-DgKJkoYc.js → agent-capabilities-MDN7TVuK.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-D0prFCyu.js → agent-connect-sources-BLX7S3Bt.js} +1 -1
  52. package/dist/client/assets/agent-deck-DbvnjqCy.js +1 -0
  53. package/dist/client/assets/{agent-e2e-BGCsWMH4.js → agent-e2e-C67cHNzK.js} +1 -1
  54. package/dist/client/assets/agent-experiments-D0KHYwLz.js +1 -0
  55. package/dist/client/assets/agent-file-DJr9f7Uu.js +1 -0
  56. package/dist/client/assets/{agent-hosting-BMlo6ztg.js → agent-hosting-DennpVxk.js} +1 -1
  57. package/dist/client/assets/{agent-icon-Cz4yRQtC.js → agent-icon-B9nZhdi2.js} +1 -1
  58. package/dist/client/assets/agent-library-Q1o2w1EA.js +1 -0
  59. package/dist/client/assets/agent-library-file-DeAgo7Oz.js +1 -0
  60. package/dist/client/assets/agent-overview-BzbDDcHv.js +1 -0
  61. package/dist/client/assets/{agent-releases-CRCs393n.js → agent-releases-DaI8RCLw.js} +1 -1
  62. package/dist/client/assets/agent-settings-CmbLkbQ3.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-Bu-Qng8e.js → agent-site-editor-BH7NFZLQ.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-mWem5GG6.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-Cxhwi79L.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-BTUTVJ5a.js +1 -0
  67. package/dist/client/assets/agent-view-ZyP4-VSz.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-AEHdl6py.js → agent-view-guard-DEo6nzlH.js} +1 -1
  69. package/dist/client/assets/{ai-providers-CEHdDjZY.js → ai-providers-x5-E0mng.js} +1 -1
  70. package/dist/client/assets/{alert-Cqlm2lSd.js → alert-N4205I9V.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-CeBlGvo4.js → analytics-sections-Bp_cD3eQ.js} +1 -1
  72. package/dist/client/assets/api-keys-DYGRMzXM.js +1 -0
  73. package/dist/client/assets/{api-keys-Cx90Lm6v.js → api-keys-F6uIkepe.js} +1 -1
  74. package/dist/client/assets/{app-editor-sWxVU-d1.js → app-editor-BPz6mU_a.js} +1 -1
  75. package/dist/client/assets/{asset-utils-F3cCrDoF.js → asset-utils-Lxwn3jp5.js} +1 -1
  76. package/dist/client/assets/{auth-B-QpuT1-.js → auth-D0WiD-6X.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-HAx7I2Dd.js → auth-catchall-BtM_92ON.js} +1 -1
  78. package/dist/client/assets/{auth-entry-D7bh5pIo.js → auth-entry-DGg6_6PX.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-DviWnr7K.js → auth-split-layout-BdlGf3S0.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-CiMJ5t7l.js → authenticate-and-persist-oauth-CjsXQJBc.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-DDKWZ6lq.js → automation-list-row-Bh6TsYyw.js} +1 -1
  82. package/dist/client/assets/{automation-runs-B94owQKr.js → automation-runs-F5hXkFSl.js} +1 -1
  83. package/dist/client/assets/{automations-Dw_bnzMp.js → automations-x3uj3Ydy.js} +1 -1
  84. package/dist/client/assets/{badge-DUPpSRXM.js → badge-BUkSpOXa.js} +1 -1
  85. package/dist/client/assets/{block-document-3zaS6DAL.js → block-document-Bkfi8LNG.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-BeQfZDpi.js → blocks-preview-workspace-context-CwXYQcg5.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-BTZOSl8o.js → blocks-tab-states-_faw29v2.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-DKHGrBOi.js → blog-preview-url-Bk8Ya8Ff.js} +1 -1
  89. package/dist/client/assets/{blog-schema-BUyE1j8J.js → blog-schema-D0iLRFhx.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-DHZ1-Rjz.js → blog-source-gate-CHqmG0fU.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-BePH2wng.js → blog-view-gate-CBYiW3a_.js} +1 -1
  92. package/dist/client/assets/{buckets-Bkf0sWtN.js → buckets-PPqMjJPU.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-_CM2PBtN.js → build-improve-prompt-doc-CQr1jYEn.js} +1 -1
  94. package/dist/client/assets/{calendar-4vmCSMCw.js → calendar-ByOFe-ir.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-BUnR6hyi.js → capability-load-error-DCMluNzB.js} +1 -1
  96. package/dist/client/assets/{category-editor-B8-7yEHX.js → category-editor-FMFHmdJ9.js} +1 -1
  97. package/dist/client/assets/{category-tree-mnbJJkLU.js → category-tree-DO91V9PE.js} +1 -1
  98. package/dist/client/assets/{chart-Bv5K7YpV.js → chart-B0F_JJb6.js} +1 -1
  99. package/dist/client/assets/{chat-context-CYn-8MTb.js → chat-context-BhwgXdxZ.js} +1 -1
  100. package/dist/client/assets/{chat-draft-D1hoDOE0.js → chat-draft-CG09JkEF.js} +1 -1
  101. package/dist/client/assets/{checkbox-CWfz72Eg.js → checkbox-BwlyfOui.js} +1 -1
  102. package/dist/client/assets/{choose-editor-B7q3YFz-.js → choose-editor-DMmUjki_.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-BrZiEms8.js → cli-auth-success-ChZ4KETS.js} +1 -1
  104. package/dist/client/assets/{cms-settings-editor-Yt7OZ5fA.js → cms-settings-editor-CIzKeqbY.js} +1 -1
  105. package/dist/client/assets/{cms-store-drafts-CY0_DNz9.js → cms-store-drafts-C3WBV5HM.js} +1 -1
  106. package/dist/client/assets/{collapsible-BpmZcmV-.js → collapsible-BILoWprp.js} +1 -1
  107. package/dist/client/assets/{collection-detail-DuNPhZH6.js → collection-detail-D6kEPWTW.js} +1 -1
  108. package/dist/client/assets/{collection-display-button-BE5cj63q.js → collection-display-button-BlEDYqVQ.js} +1 -1
  109. package/dist/client/assets/{collection-search-BpPD1cYG.js → collection-search-Dj3oO1qn.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-2bTQbSCd.js → collection-table-wrapper-C8_o4YW1.js} +1 -1
  111. package/dist/client/assets/{collection-tabs--r5IslTr.js → collection-tabs-Wktk7Bil.js} +1 -1
  112. package/dist/client/assets/{combobox-D0z8qltB.js → combobox-7VjvZkXU.js} +1 -1
  113. package/dist/client/assets/{command-B1uSCDOs.js → command-BcxQrgUK.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-Cw4vcMP2.js → companion-mcps-section-DQ1lC2cH.js} +1 -1
  115. package/dist/client/assets/{config-BzgM9JXs.js → config-Bn4oMb7y.js} +1 -1
  116. package/dist/client/assets/{connect-key-DcVDnMal.js → connect-key-BqwNSl8t.js} +1 -1
  117. package/dist/client/assets/{connect-layout-CBMngQi6.js → connect-layout-DqtlIJwT.js} +1 -1
  118. package/dist/client/assets/{connect-source-dialog-5QgQ5bbI.js → connect-source-dialog-HVNAw6m0.js} +1 -1
  119. package/dist/client/assets/{connect-BV05NolQ.js → connect-uQ-qw1JW.js} +1 -1
  120. package/dist/client/assets/{connection-IPXgFFkC.js → connection-CELF9xGk.js} +1 -1
  121. package/dist/client/assets/{connection-card-1xH7fsgG.js → connection-card-DqAevMOq.js} +1 -1
  122. package/dist/client/assets/{connection-detail-BVoggBqn.js → connection-detail-MGfXYK35.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-3MHQU6Sq.js → connection-form-helpers-egiEwtYz.js} +1 -1
  124. package/dist/client/assets/{connection-slug-CceJbleR.js → connection-slug-Dz7hwoVN.js} +1 -1
  125. package/dist/client/assets/{connections-Da3kc22q.js → connections-D2NvIFXC.js} +1 -1
  126. package/dist/client/assets/{content-tab-BGkRbQco.js → content-tab-BvT7P5lX.js} +3 -3
  127. package/dist/client/assets/{context-DXGbe4A7.js → context-CggBlD0z.js} +1 -1
  128. package/dist/client/assets/{context-menu-LfR7ib0U.js → context-menu-CXequwNl.js} +1 -1
  129. package/dist/client/assets/{context-shell-mG6S_SeS.js → context-shell-Bqoi0m2O.js} +3 -3
  130. package/dist/client/assets/{create-organization-dialog-Buynh2If.js → create-organization-dialog-BOcGysWt.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-ByBUq2mJ.js → daily-pulse-BA0ikU80.js} +1 -1
  132. package/dist/client/assets/{delete-copy-u7v8dBp-.js → delete-copy-CzwVZl8P.js} +1 -1
  133. package/dist/client/assets/{device-hint-CMXety2v.js → device-hint-CUh7MxFw.js} +1 -1
  134. package/dist/client/assets/{discover-h9og78Pc.js → discover-Bt0PjesU.js} +1 -1
  135. package/dist/client/assets/{domain-settings-D-1cMb0P.js → domain-settings-BamU0icI.js} +1 -1
  136. package/dist/client/assets/{drawer-yBtPHk5P.js → drawer-EGIO8vW1.js} +1 -1
  137. package/dist/client/assets/{editor-CAoNl87t.js → editor-B_YvqDEq.js} +1 -1
  138. package/dist/client/assets/{editor-classes-CMJUQ0q2.js → editor-classes-D2vt4K2z.js} +1 -1
  139. package/dist/client/assets/{empty-message-Cc9hR1qr.js → empty-message-BR97lu1R.js} +1 -1
  140. package/dist/client/assets/{empty-state-DR046JV4.js → empty-state-D--R_kh-.js} +1 -1
  141. package/dist/client/assets/{empty-state-DTiQvFTm.js → empty-state-DxGz72GL.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-BFJMX4A0.js → experiments-tab-choice-zR5-VX5L.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-CNr6phrB.js → extract-connection-data-DeUSUVIy.js} +1 -1
  144. package/dist/client/assets/{feature-gate-Ce8P1I_1.js → feature-gate-DK9IZjbG.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-BHeChQEf.js → feature-paywall-BQdFbBKY.js} +1 -1
  146. package/dist/client/assets/{file-explorer-C3qnOlL5.js → file-explorer-6XHpEO9J.js} +1 -1
  147. package/dist/client/assets/{file-preview-Dc0CULiD.js → file-preview-CXliAtvL.js} +1 -1
  148. package/dist/client/assets/{file-share-button-CLXLIxu_.js → file-share-button-BUHoICkf.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-B2pfAj_l.js → file-type-icon-Bhy3vcyl.js} +1 -1
  150. package/dist/client/assets/{folder-icon-D2FL6E99.js → folder-icon-BD8Yju3a.js} +1 -1
  151. package/dist/client/assets/{form-kDDI268e.js → form-Cb5OHNc9.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-DHCzYM6E.js → frame-navigation-D5yMy5Mm.js} +1 -1
  153. package/dist/client/assets/{gateway-client-Cjf9YZgG.js → gateway-client-t5s1Cm0x.js} +1 -1
  154. package/dist/client/assets/{general-CqhH_qnq.js → general-DfARJPaG.js} +1 -1
  155. package/dist/client/assets/{github-icon-DtM4VHDi.js → github-icon-BoZrKkV3.js} +1 -1
  156. package/dist/client/assets/{held-block-view--k2oql8p.js → held-block-view-Bm4hn8SE.js} +1 -1
  157. package/dist/client/assets/{home-c0Tkyf1M.js → home-COKBWHzA.js} +1 -1
  158. package/dist/client/assets/{home-overview-DL2TwzH8.js → home-overview-C0oKtq4c.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-DA19JQ88.js → hosted-reconcile-mSp200Ck.js} +1 -1
  160. package/dist/client/assets/{icon-button-_8DeXkO0.js → icon-button-CpBLMSxk.js} +1 -1
  161. package/dist/client/assets/{index-Cu4y6EEK.js → index-0AidFUUh.js} +1 -1
  162. package/dist/client/assets/{index-eanoJh42.js → index-A2_7RKep.js} +1 -1
  163. package/dist/client/assets/{index-C5opdymg.js → index-BED_VE7w.js} +1 -1
  164. package/dist/client/assets/{index-Bwq9ud4q.js → index-BQrnEOJ9.js} +1 -1
  165. package/dist/client/assets/{index-CeduNoaB.js → index-BTT5sL01.js} +1 -1
  166. package/dist/client/assets/{index-D2_PsRqT.js → index-Bi2fLJMb.js} +1 -1
  167. package/dist/client/assets/{index-D0JbJFfP.js → index-BsAwgxIf.js} +3 -3
  168. package/dist/client/assets/{index-BH57s8xx.js → index-CGQejmXu.js} +1 -1
  169. package/dist/client/assets/{index-BRuWUMBj.js → index-CM0d89Yv.js} +1 -1
  170. package/dist/client/assets/{index-A1s-ls4_.js → index-CT5cpmuw.js} +1 -1
  171. package/dist/client/assets/{index-Uvh2dd2d.js → index-D1alBOdU.js} +1 -1
  172. package/dist/client/assets/{index-hq5vMD7l.js → index-DEh8AOfP.js} +1 -1
  173. package/dist/client/assets/{index-B1Vzlz4U.js → index-DKlpvKuq.js} +1 -1
  174. package/dist/client/assets/index-DQWJotH-.js +1 -0
  175. package/dist/client/assets/{index-Ccvx4l8u.js → index-KBC7Pj7l.js} +1 -1
  176. package/dist/client/assets/{index-DuXh-o9C.js → index-KFEtz5HA.js} +1 -1
  177. package/dist/client/assets/{index-DkZhaGHi.js → index-Oc-4w-Ob.js} +1 -1
  178. package/dist/client/assets/{index-redirect-CugWLrBL.js → index-redirect-DWwBvPoP.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-DtEzALgC.js → infiniteQueryObserver-CnD94meO.js} +1 -1
  180. package/dist/client/assets/{infra-billing-CowfabqN.js → infra-billing-C7MnSX69.js} +1 -1
  181. package/dist/client/assets/{input-CEK73Sex.js → input--kphUWpn.js} +1 -1
  182. package/dist/client/assets/{input-DF1Y7U-T.js → input-Cy8KNDYA.js} +3 -3
  183. package/dist/client/assets/{integration-icon-BkEHXL5H.js → integration-icon-DbiCbrD7.js} +1 -1
  184. package/dist/client/assets/{item-actions-Dt2DwB56.js → item-actions-BR3Rk3pU.js} +1 -1
  185. package/dist/client/assets/{jira-icon-Cvf0iXMn.js → jira-icon-BJDzOHlp.js} +1 -1
  186. package/dist/client/assets/{label-Cz2ESzy4.js → label-D8u4gNcM.js} +1 -1
  187. package/dist/client/assets/{layout-BK-aj1WP.js → layout-Djcel6JN.js} +1 -1
  188. package/dist/client/assets/{legacy-admin-welcome-dialog-D7LEWnzk.js → legacy-admin-welcome-dialog-C4yFyjEg.js} +1 -1
  189. package/dist/client/assets/{legacy-agents-deep-BkohdIkY.js → legacy-agents-deep-BhezYC1Y.js} +1 -1
  190. package/dist/client/assets/{legacy-main-redirect-CQXqcwTr.js → legacy-main-redirect-B2LMkN9B.js} +1 -1
  191. package/dist/client/assets/library-i7u4D0nv.js +1 -0
  192. package/dist/client/assets/{library-tab-B7ct9qoc.js → library-tab-B6AGBITt.js} +1 -1
  193. package/dist/client/assets/{login-YWOyIcWn.js → login-D-FcOLf-.js} +1 -1
  194. package/dist/client/assets/{markdown-tL6sdqzq.js → markdown-SwM1Ir6g.js} +1 -1
  195. package/dist/client/assets/{mcp-app-renderer-BhIn7g4y.js → mcp-app-renderer-Jzrzu2q5.js} +1 -1
  196. package/dist/client/assets/{mcp-oauth-wEywaeew.js → mcp-oauth-DXUgkWSg.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-CJYJCIJk.js → mcp-oauth-nZa_TONF.js} +1 -1
  198. package/dist/client/assets/{members-COS0v4hA.js → members-pMC1bfqu.js} +1 -1
  199. package/dist/client/assets/{memory-BT9HM98O.js → memory-msRY8EWU.js} +1 -1
  200. package/dist/client/assets/{mock-board-DJcG8Pad.js → mock-board-4Dfd4bxV.js} +3 -3
  201. package/dist/client/assets/{monaco-editor-Durke4zw.js → monaco-editor-Dj-bs0sb.js} +1 -1
  202. package/dist/client/assets/{monitoring-DTUmrug3.js → monitoring-Db6Y9X_T.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-7dJGk5QN.js → monitoring-stats-row-9YaCFmpo.js} +1 -1
  204. package/dist/client/assets/{multi-select-3B0TZSKv.js → multi-select-Cp5gIPzv.js} +1 -1
  205. package/dist/client/assets/{mustache-B8dPn6lp.js → mustache-CyusQksc.js} +1 -1
  206. package/dist/client/assets/{named-rule-step-lmAbDDuM.js → named-rule-step-DbDjzYJn.js} +1 -1
  207. package/dist/client/assets/{named-rule-view-latij48D.js → named-rule-view-Dh3pa8Ix.js} +1 -1
  208. package/dist/client/assets/{new-project-dialog-DpI3oirN.js → new-project-dialog-CrDlez-N.js} +1 -1
  209. package/dist/client/assets/{new-project-store-CU2miSo6.js → new-project-store-DleT4y6U.js} +1 -1
  210. package/dist/client/assets/{oauth-callback-qJyQoaTr.js → oauth-callback-D-LN8o-r.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-Dy0T05tF.js → oauth-callback-ai-provider-BKOttmuU.js} +1 -1
  212. package/dist/client/assets/{oauth-consent-CsrgkVd2.js → oauth-consent-C0LB3lfZ.js} +1 -1
  213. package/dist/client/assets/{onboarding-BG67tfWh.js → onboarding-DRXH9Y7t.js} +1 -1
  214. package/dist/client/assets/{openai-conversation-qkOZuSP9.js → openai-conversation-BDQFSE01.js} +1 -1
  215. package/dist/client/assets/{optimistic-project-sidebar-views-DP6_xZnw.js → optimistic-project-sidebar-views-DpB-Kj9e.js} +1 -1
  216. package/dist/client/assets/{order-monitor-day-DCDAwCcy.js → order-monitor-day-7qmkUUGV.js} +1 -1
  217. package/dist/client/assets/{organization-choice-Di2R8L3I.js → organization-choice-Bs6uDF8C.js} +1 -1
  218. package/dist/client/assets/{orgs-Bl6bbwzN.js → orgs-CwaDyfCI.js} +1 -1
  219. package/dist/client/assets/{own-accounts-section-DdFjVQqe.js → own-accounts-section-wo48sm2j.js} +1 -1
  220. package/dist/client/assets/{pair-DyZ1K8WQ.js → pair-4JIJkNK2.js} +1 -1
  221. package/dist/client/assets/{parse-sections-D4rEtefR.js → parse-sections-3dpMP28-.js} +2 -2
  222. package/dist/client/assets/{plan-RJj-iCo4.js → plan-CgB_LoKO.js} +1 -1
  223. package/dist/client/assets/{plan-ladder-C4IQnf9g.js → plan-ladder-DAHXnxDP.js} +1 -1
  224. package/dist/client/assets/{plan-usage-card-CrMWJU-G.js → plan-usage-card-DKC1nkf_.js} +1 -1
  225. package/dist/client/assets/{popover-CHMhtCUs.js → popover-DogMO3pk.js} +1 -1
  226. package/dist/client/assets/{post-calendar-CN1diBak.js → post-calendar-CwmTBZkp.js} +1 -1
  227. package/dist/client/assets/{post-editor-BcwPJV8K.js → post-editor-CDKF4zje.js} +1 -1
  228. package/dist/client/assets/{preview-content-BOQns-lB.js → preview-content-D6MLtumX.js} +1 -1
  229. package/dist/client/assets/{preview-dialog-C7cBTnki.js → preview-dialog-Bc3kRUrq.js} +1 -1
  230. package/dist/client/assets/{preview-panel-Dj9mGout.js → preview-panel-BkNp3-My.js} +1 -1
  231. package/dist/client/assets/{preview-tab-DmV1MCqv.js → preview-tab-BLd_YM6q.js} +3 -3
  232. package/dist/client/assets/{product-picker-dialog-Byy9UJeP.js → product-picker-dialog-BEHWsHij.js} +1 -1
  233. package/dist/client/assets/{profile-WjwNygHC.js → profile-CxcB48LV.js} +1 -1
  234. package/dist/client/assets/{project-app-view-nn15XQnF.js → project-app-view-DThAV1rl.js} +1 -1
  235. package/dist/client/assets/{project-apps-8wVrHF3C.js → project-apps-B94DpdMu.js} +1 -1
  236. package/dist/client/assets/{project-icon-EAm2TPOd.js → project-icon-BHcF2TIr.js} +1 -1
  237. package/dist/client/assets/{project-index-n6zIw3HS.js → project-index-Be1RuOJ6.js} +1 -1
  238. package/dist/client/assets/project-reports-K8JRKUu4.js +1 -0
  239. package/dist/client/assets/project-tasks-CA5yJnAe.js +1 -0
  240. package/dist/client/assets/{projects-0A5PF_Ra.js → projects-C1GSJkUl.js} +1 -1
  241. package/dist/client/assets/{projects-empty-state-C-UOiCuP.js → projects-empty-state-DlLdfDdd.js} +1 -1
  242. package/dist/client/assets/{prompts-CILhcEu9.js → prompts-5zeVOrro.js} +1 -1
  243. package/dist/client/assets/record-editor-DayZB6HD.js +1 -0
  244. package/dist/client/assets/{redirect-editor-lI_kGmrc.js → redirect-editor-CEVbDPNz.js} +1 -1
  245. package/dist/client/assets/{reports-DR1rn8J7.js → reports-S46_cn_C.js} +1 -1
  246. package/dist/client/assets/{reports-onboarding-B66tPRvi.js → reports-onboarding-Bgx5Wbga.js} +1 -1
  247. package/dist/client/assets/{reports-tab-DKruN66x.js → reports-tab-CajwSXZt.js} +2 -2
  248. package/dist/client/assets/reports-vF-XIQTi.js +1 -0
  249. package/dist/client/assets/{repositories-Bbw0CrFR.js → repositories-B1gkEk-T.js} +1 -1
  250. package/dist/client/assets/repositories-CMSsRRv6.js +1 -0
  251. package/dist/client/assets/{repository-binding-BkeJ2CtJ.js → repository-binding-BS9v5Fe_.js} +1 -1
  252. package/dist/client/assets/{repository-picker-BjO-oJEQ.js → repository-picker-CXtPhUQx.js} +1 -1
  253. package/dist/client/assets/{require-capability-BgMHtUR9.js → require-capability-Db5kMZvY.js} +1 -1
  254. package/dist/client/assets/{required-auth-layout-DtC4GqSJ.js → required-auth-layout-C_8jBLMB.js} +1 -1
  255. package/dist/client/assets/{reset-password-DY5b2Erk.js → reset-password-DIVuqYKV.js} +1 -1
  256. package/dist/client/assets/{resizable-Cd2hDMdu.js → resizable-97tyuWCT.js} +1 -1
  257. package/dist/client/assets/{resolve-tab-icon-EXlDKnuK.js → resolve-tab-icon-CgO8Qihl.js} +1 -1
  258. package/dist/client/assets/{review-settings-CqBIGzNT.js → review-settings-CLgbnmq-.js} +1 -1
  259. package/dist/client/assets/{role-color-DFMPljwV.js → role-color-gTG8o13c.js} +1 -1
  260. package/dist/client/assets/{roles-Dw2sI3jk.js → roles-zI-Hk6fY.js} +1 -1
  261. package/dist/client/assets/{route-BCIzQ5q9.js → route-BVVvTINP.js} +1 -1
  262. package/dist/client/assets/route-DGTGR39c.js +1 -0
  263. package/dist/client/assets/{route-CZALPmji.js → route-JrcnSNgm.js} +1 -1
  264. package/dist/client/assets/{route-page-header-BPaA0qrQ.js → route-page-header-DFLx6qIf.js} +1 -1
  265. package/dist/client/assets/{sandbox-git-api-DY2JBwrb.js → sandbox-git-api-CbcKlTqF.js} +1 -1
  266. package/dist/client/assets/{sandbox-lifecycle-context-DwvoKy-z.js → sandbox-lifecycle-context-Ckk9fyCX.js} +1 -1
  267. package/dist/client/assets/{save-status-DXZEEhy7.js → save-status-DIv_w4LK.js} +1 -1
  268. package/dist/client/assets/{schema-ClQSeEkW.js → schema-CggWCz-G.js} +1 -1
  269. package/dist/client/assets/{schema-CZDH3n7J.js → schema-CsWev9Lq.js} +1 -1
  270. package/dist/client/assets/{scroll-area-D27AfOYB.js → scroll-area-KLc2042F.js} +1 -1
  271. package/dist/client/assets/{search-input-jt6Xgx4B.js → search-input-D6gGXIf1.js} +1 -1
  272. package/dist/client/assets/{search-toggle-D3HRB5Df.js → search-toggle-CMDWFPiy.js} +1 -1
  273. package/dist/client/assets/{secret-picker-XaaAcM5r.js → secret-picker-IFIVFm7w.js} +1 -1
  274. package/dist/client/assets/{secrets-BvHbzBRf.js → secrets-jBAw0ULO.js} +1 -1
  275. package/dist/client/assets/{section-array-field-whxy-DeQ.js → section-array-field-fkRL6dJN.js} +1 -1
  276. package/dist/client/assets/{sections-Cthuvf0M.js → sections-DH2lycfv.js} +1 -1
  277. package/dist/client/assets/{sections-editor-CCOVQk8_.js → sections-editor-BWiwMgid.js} +1 -1
  278. package/dist/client/assets/{select-CHNsjY6K.js → select-DPXDtN3F.js} +1 -1
  279. package/dist/client/assets/{select-model-CxmLGQ73.js → select-model-DL2dvL4e.js} +1 -1
  280. package/dist/client/assets/{seo-editor-gj6rND5b.js → seo-editor-Qsv4nJ3u.js} +1 -1
  281. package/dist/client/assets/{separator-BDf2J6cr.js → separator-CL-QJFBL.js} +1 -1
  282. package/dist/client/assets/{session-runtime-Af7XCW1y.js → session-runtime-BtkBTCEv.js} +1 -1
  283. package/dist/client/assets/settings-tab-9VStd703.js +1 -0
  284. package/dist/client/assets/{sheet-DQnddENA.js → sheet-DKmzxIAF.js} +1 -1
  285. package/dist/client/assets/{shell-layout-8n97Gfv2.js → shell-layout-DwJrXedk.js} +1 -1
  286. package/dist/client/assets/{site-draft-actions-f9v6MtCM.js → site-draft-actions-CKH_63G-.js} +1 -1
  287. package/dist/client/assets/{site-draft-view-DDIBbub5.js → site-draft-view-Cr2tGRpR.js} +1 -1
  288. package/dist/client/assets/site-editor-CVnLWuGP.js +1 -0
  289. package/dist/client/assets/{site-editor-toast-B7n4gXl4.js → site-editor-toast-BRXEnjic.js} +1 -1
  290. package/dist/client/assets/{skills-DFVK-W9z.js → skills-DJZ4NcoQ.js} +1 -1
  291. package/dist/client/assets/{slider-C2mk6liJ.js → slider-tajZdOy1.js} +1 -1
  292. package/dist/client/assets/{sortable.esm-D-Grx_BB.js → sortable.esm-xHKM0aSe.js} +1 -1
  293. package/dist/client/assets/{sso-CXnYKuTn.js → sso-CdgaAIgO.js} +1 -1
  294. package/dist/client/assets/{suggestion-hAQ8JrrP.js → suggestion-BapLR6AM.js} +1 -1
  295. package/dist/client/assets/{super-agent-icon-DLAa0E4b.js → super-agent-icon-DD9h5HSQ.js} +1 -1
  296. package/dist/client/assets/{switch-DLa18g9P.js → switch-DEje7fmz.js} +1 -1
  297. package/dist/client/assets/{synced-repos-CW0qt6Jp.js → synced-repos-p7TfojtZ.js} +1 -1
  298. package/dist/client/assets/{tab-icon-glyph-sPxJu63d.js → tab-icon-glyph-DlkpXRLw.js} +1 -1
  299. package/dist/client/assets/{table-DwE6kXVm.js → table-Cie3FI8M.js} +1 -1
  300. package/dist/client/assets/{tabs-Bpa2glNp.js → tabs-BMObVAFs.js} +1 -1
  301. package/dist/client/assets/{task-board-V6fHxbUs.js → task-board-CZuAKwkd.js} +1 -1
  302. package/dist/client/assets/{task-key-kJFx4e2o.js → task-key-Binbqohp.js} +1 -1
  303. package/dist/client/assets/{task-route-DFPlSt_R.js → task-route-IxeWFQf4.js} +1 -1
  304. package/dist/client/assets/{task-status-bSdxlxRQ.js → task-status-24VN3LnD.js} +1 -1
  305. package/dist/client/assets/{taskboard-analytics-ylcJh5LS.js → taskboard-analytics-TIghTMhL.js} +1 -1
  306. package/dist/client/assets/{tasks-D70ou02W.js → tasks-DnDVdrmF.js} +1 -1
  307. package/dist/client/assets/tasks-UA8LFybk.js +1 -0
  308. package/dist/client/assets/{textarea-DKKpu4j7.js → textarea-3iEFQij9.js} +1 -1
  309. package/dist/client/assets/{thread-analytics-BIEg-EM0.js → thread-analytics-DvdOTcnX.js} +1 -1
  310. package/dist/client/assets/{thread-button-C2TH27Tw.js → thread-button-ChRjFza7.js} +1 -1
  311. package/dist/client/assets/{thread-intent-dNVrC8sL.js → thread-intent-BNoxio0t.js} +1 -1
  312. package/dist/client/assets/{thread-route-DRUKUdDI.js → thread-route-DEzPmkpC.js} +1 -1
  313. package/dist/client/assets/{thread-route-yhTv7wYw.js → thread-route-sNjMl6Ie.js} +1 -1
  314. package/dist/client/assets/{thread-sheet-body-2n-7Buvv.js → thread-sheet-body-JBqWWQDi.js} +1 -1
  315. package/dist/client/assets/{time-range-picker-BL4eezN1.js → time-range-picker-DDjkoMQs.js} +1 -1
  316. package/dist/client/assets/{toggle-group-D9Y0fm-3.js → toggle-group-N0qYYn6W.js} +1 -1
  317. package/dist/client/assets/{tool-set-selector-Drp4qxhz.js → tool-set-selector-BE0R1AUj.js} +1 -1
  318. package/dist/client/assets/{toolbar-icon-button-BSNdxRRG.js → toolbar-icon-button-BSXImY57.js} +1 -1
  319. package/dist/client/assets/{tooltip-bcUJYhL_.js → tooltip-r0LfLYi3.js} +1 -1
  320. package/dist/client/assets/{tooltipContext-DEGZ2uVc.js → tooltipContext-DRtEpNZN.js} +1 -1
  321. package/dist/client/assets/{track-BBPO8uHZ.js → track-Ciq_Ag4i.js} +1 -1
  322. package/dist/client/assets/{types-BfjfZI1L.js → types-BhUJ3bOA.js} +1 -1
  323. package/dist/client/assets/{url-slug-DlaJQcf1.js → url-slug-CR2COLQn.js} +1 -1
  324. package/dist/client/assets/{usage-stats-D_d2D8Wj.js → usage-stats-BH8jlFhP.js} +1 -1
  325. package/dist/client/assets/{use-ai-providers-CA-khqag.js → use-ai-providers-CFArCH41.js} +1 -1
  326. package/dist/client/assets/{use-api-keys-DmoX8fkX.js → use-api-keys-lPXg3MPh.js} +1 -1
  327. package/dist/client/assets/{use-apply-named-rule-Df7T3xoC.js → use-apply-named-rule-C4A8N8Up.js} +1 -1
  328. package/dist/client/assets/use-ask-in-chat-DxfAfFUt.js +1 -0
  329. package/dist/client/assets/{use-automations-CkV07sTy.js → use-automations-DcCuqnYq.js} +1 -1
  330. package/dist/client/assets/{use-autosave-BI9FF_Nw.js → use-autosave-Cpi6qZoh.js} +1 -1
  331. package/dist/client/assets/use-blocks-v8-project-uH3tLJJX.js +1 -0
  332. package/dist/client/assets/use-blog-view-B-p1Bott.js +1 -0
  333. package/dist/client/assets/{use-chat-layout-state-SUAjqrxB.js → use-chat-layout-state-DjHcwQYx.js} +1 -1
  334. package/dist/client/assets/{use-cms-publish-actions-Dbj-FgCO.js → use-cms-publish-actions-BbXykL5B.js} +1 -1
  335. package/dist/client/assets/{use-connect-companion-BewE2n-r.js → use-connect-companion-CNj3wQey.js} +1 -1
  336. package/dist/client/assets/{use-connection-BlwEJ6QU.js → use-connection-DpuSfyHb.js} +1 -1
  337. package/dist/client/assets/{use-content-sync-fyaHiMZi.js → use-content-sync-C9laqqVB.js} +1 -1
  338. package/dist/client/assets/{use-copy-CLDbNfFh.js → use-copy-BFUDxfVH.js} +1 -1
  339. package/dist/client/assets/{use-current-view-BOFMyET9.js → use-current-view-C1-z4fIk.js} +1 -1
  340. package/dist/client/assets/{use-date-fns-locale-Bd2tfTTF.js → use-date-fns-locale-D6T1OHTy.js} +1 -1
  341. package/dist/client/assets/{use-debounced-autosave-w4z8emZZ.js → use-debounced-autosave-C5QlmVn0.js} +1 -1
  342. package/dist/client/assets/{use-debounced-value-CKJPodTI.js → use-debounced-value-BkJoL4uj.js} +1 -1
  343. package/dist/client/assets/{use-deco-credits-B3QsHbOs.js → use-deco-credits-zD_A42hI.js} +1 -1
  344. package/dist/client/assets/{use-decopilot-events-g19xYjLG.js → use-decopilot-events-CZR337Lj.js} +1 -1
  345. package/dist/client/assets/{use-delete-block-BM2EDDox.js → use-delete-block-BYw_7GRP.js} +1 -1
  346. package/dist/client/assets/{use-delete-connection-ChSMTPNG.js → use-delete-connection-B0ASWh3-.js} +1 -1
  347. package/dist/client/assets/{use-deployment-admin-D5oW79CT.js → use-deployment-admin-DGQGQZ6E.js} +1 -1
  348. package/dist/client/assets/{use-entitlements-hCyBXtuJ.js → use-entitlements-BRKIl3Rz.js} +1 -1
  349. package/dist/client/assets/{use-fast-preview-draft-url-EPskZgiI.js → use-fast-preview-draft-url-BTGBRNHr.js} +1 -1
  350. package/dist/client/assets/{use-file-configs-BHoa1WZE.js → use-file-configs-CMTQcHfJ.js} +1 -1
  351. package/dist/client/assets/{use-id-selection-pnESFlAH.js → use-id-selection-Bn7c-vY3.js} +1 -1
  352. package/dist/client/assets/{use-in-settings-1MICTjP9.js → use-in-settings-BT3nEhsO.js} +1 -1
  353. package/dist/client/assets/{use-inbox-feed-IJbAYVJ5.js → use-inbox-feed-DGj1Phk9.js} +1 -1
  354. package/dist/client/assets/{use-infinite-scroll-47R6Hyro.js → use-infinite-scroll-Dv1yBngZ.js} +1 -1
  355. package/dist/client/assets/{use-join-requests-BPAsPyx8.js → use-join-requests-DMRpQYlE.js} +1 -1
  356. package/dist/client/assets/{use-main-panel-tabs-Zy_d8HK3.js → use-main-panel-tabs-C0GJ35ov.js} +1 -1
  357. package/dist/client/assets/{use-mcp-auth-status-BDCbIbFE.js → use-mcp-auth-status-D9OBaQkq.js} +1 -1
  358. package/dist/client/assets/{use-mcp-client-Cnv47oK4.js → use-mcp-client-DXpTlXlJ.js} +1 -1
  359. package/dist/client/assets/{use-mcp-prompts-BEiCSVNE.js → use-mcp-prompts-B_BU9Jdl.js} +1 -1
  360. package/dist/client/assets/{use-mcp-tools-8aCXB58i.js → use-mcp-tools-B0m5-RR6.js} +1 -1
  361. package/dist/client/assets/{use-mobile-DXgcDHnH.js → use-mobile-BwxeIsTr.js} +1 -1
  362. package/dist/client/assets/{use-move-blocks-BzKtUTnP.js → use-move-blocks-D-OheBD-.js} +1 -1
  363. package/dist/client/assets/{use-navigate-to-agent-Jn9AHv5I.js → use-navigate-to-agent-DjeX7xEq.js} +1 -1
  364. package/dist/client/assets/{use-never-published-CS1sCoUt.js → use-never-published-CP8Hs4DE.js} +1 -1
  365. package/dist/client/assets/{use-org-fs-0zArVAMr.js → use-org-fs-D2bsNlGU.js} +1 -1
  366. package/dist/client/assets/{use-org-notice-DuKnnmVo.js → use-org-notice-BLcA1Iw0.js} +1 -1
  367. package/dist/client/assets/{use-org-repo-syncs-DteS2PPH.js → use-org-repo-syncs-Dfmuqlr1.js} +1 -1
  368. package/dist/client/assets/{use-org-sso-D1j0oTnH.js → use-org-sso-DhdCpzK5.js} +1 -1
  369. package/dist/client/assets/{use-organization-settings-PllK3r0i.js → use-organization-settings-BilLeNy9.js} +1 -1
  370. package/dist/client/assets/{use-panel-navigate-CAZIXqmL.js → use-panel-navigate-DpEZACCY.js} +1 -1
  371. package/dist/client/assets/{use-project-native-view-presence-BE1ptslQ.js → use-project-native-view-presence-D4zm5hDa.js} +1 -1
  372. package/dist/client/assets/{use-project-scope-DA6OZsHG.js → use-project-scope-C815BKEh.js} +1 -1
  373. package/dist/client/assets/{use-recent-apps-DeTsw193.js → use-recent-apps-Cr_xiDfS.js} +1 -1
  374. package/dist/client/assets/{use-reports-diagnostic-CDJkhX3Z.js → use-reports-diagnostic-Djz2mp7k.js} +1 -1
  375. package/dist/client/assets/{use-sandbox-events-BZR9Xvyj.js → use-sandbox-events-aK2a02aF.js} +1 -1
  376. package/dist/client/assets/{use-secrets-C9vyBfSH.js → use-secrets-CJ3hXlfU.js} +1 -1
  377. package/dist/client/assets/{use-section-preview-base-DcN4R2fZ.js → use-section-preview-base-Ve5g9dlJ.js} +1 -1
  378. package/dist/client/assets/{use-sidebar-collapsed-BoDydqEu.js → use-sidebar-collapsed-CSFUmB9m.js} +1 -1
  379. package/dist/client/assets/{use-tags-ta1jGy7k.js → use-tags-ZV0RDof-.js} +1 -1
  380. package/dist/client/assets/{use-task-board-analytics-BrO0ETlJ.js → use-task-board-analytics-4kD6ppwm.js} +1 -1
  381. package/dist/client/assets/{use-task-board-item-prs-CHUrrNd1.js → use-task-board-item-prs-Cwh80HEy.js} +1 -1
  382. package/dist/client/assets/{use-task-board-items-uhqh6PNR.js → use-task-board-items-DX_SyoB4.js} +1 -1
  383. package/dist/client/assets/{use-task-board-prompts-D43tghaN.js → use-task-board-prompts-Cf3d-x7e.js} +1 -1
  384. package/dist/client/assets/{use-task-metadata-BFdyyZRC.js → use-task-metadata-L7Sk1FlH.js} +1 -1
  385. package/dist/client/assets/{use-thread-outputs-D_-5CcDB.js → use-thread-outputs-HnCGzIoZ.js} +1 -1
  386. package/dist/client/assets/{use-view-draft-kind-2ZPvA4uU.js → use-view-draft-kind-1niLZJ6g.js} +1 -1
  387. package/dist/client/assets/{use-voice-input-BVDR_h76.js → use-voice-input-DYwW5R3c.js} +1 -1
  388. package/dist/client/assets/useInfiniteQuery-C5Fx0PfA.js +1 -0
  389. package/dist/client/assets/{useQueries-CmlQ5ude.js → useQueries-BNC8S8pQ.js} +1 -1
  390. package/dist/client/assets/useSuspenseInfiniteQuery-kmW-ybmd.js +1 -0
  391. package/dist/client/assets/{users-Dh7gdfol.js → users-DeIRsAGC.js} +1 -1
  392. package/dist/client/assets/{utils-T-xgwvu9.js → utils-DII4rh9V.js} +1 -1
  393. package/dist/client/assets/{variant-calendar-CDO68J7G.js → variant-calendar-ChRlrtIQ.js} +1 -1
  394. package/dist/client/assets/{variant-matcher-override-MqCM8vjD.js → variant-matcher-override-DQIPA96S.js} +1 -1
  395. package/dist/client/assets/{view-header-Bee_uEOf.js → view-header-CDV0Xu_P.js} +1 -1
  396. package/dist/client/assets/{virtual-mcp-BiyQxJGK.js → virtual-mcp-DrcP-MsH.js} +1 -1
  397. package/dist/client/assets/{watch-sse-pool-C4P_vqWF.js → watch-sse-pool-Bw3-M9_N.js} +1 -1
  398. package/dist/client/index.html +1 -1
  399. package/dist/server/server.js +3 -3
  400. package/package.json +1 -1
  401. package/dist/client/assets/agent-app-B7ftls3Z.js +0 -1
  402. package/dist/client/assets/agent-deck-CcvUJpH9.js +0 -1
  403. package/dist/client/assets/agent-experiments-DAhsmbhH.js +0 -1
  404. package/dist/client/assets/agent-file-B823n-5A.js +0 -1
  405. package/dist/client/assets/agent-library-CB8qIzKG.js +0 -1
  406. package/dist/client/assets/agent-library-file-BEOBDbky.js +0 -1
  407. package/dist/client/assets/agent-overview-OCPL70AX.js +0 -1
  408. package/dist/client/assets/agent-settings-ChpWIcjh.js +0 -1
  409. package/dist/client/assets/agent-site-editor-code-Bcw39VAL.js +0 -2
  410. package/dist/client/assets/agent-site-editor-content-Bi-VEbvX.js +0 -1
  411. package/dist/client/assets/agent-site-editor-preview-UtWuCm95.js +0 -1
  412. package/dist/client/assets/agent-view-wKu6zeUB.js +0 -1
  413. package/dist/client/assets/api-keys-CmxKXTZ8.js +0 -1
  414. package/dist/client/assets/index-C_RcX5na.js +0 -1
  415. package/dist/client/assets/library-5KTojEmZ.js +0 -1
  416. package/dist/client/assets/project-reports-BJG8cv_j.js +0 -1
  417. package/dist/client/assets/project-tasks-s96uaQBm.js +0 -1
  418. package/dist/client/assets/record-editor-BUTAoLlf.js +0 -1
  419. package/dist/client/assets/reports-Ci-ze_9x.js +0 -1
  420. package/dist/client/assets/repositories-BqfuO_cv.js +0 -1
  421. package/dist/client/assets/route-BJPaaD6u.js +0 -1
  422. package/dist/client/assets/settings-tab-DjqNp38m.js +0 -1
  423. package/dist/client/assets/site-editor-DZ3A-aYm.js +0 -1
  424. package/dist/client/assets/tasks-DcUnjS-o.js +0 -1
  425. package/dist/client/assets/use-ask-in-chat-KRmd65S3.js +0 -1
  426. package/dist/client/assets/use-blocks-v8-project-DM7tjD-Y.js +0 -1
  427. package/dist/client/assets/use-blog-view-DuP6av7s.js +0 -1
  428. package/dist/client/assets/useInfiniteQuery-fnTqEMy9.js +0 -1
  429. package/dist/client/assets/useSuspenseInfiniteQuery-CnPwOZuW.js +0 -1
@@ -1 +1 @@
1
- import{c as w,j as s,b as B,gT as Q,m as D,F as fe,r as Z,d as xe,hC as q,ax as pe}from"./index-D0JbJFfP.js";import{c as J,b as G,B as U,C as ee}from"./chart-Bv5K7YpV.js";import{e as he,a as ge,b as W,T as je,d as be,c as ye}from"./table-DwE6kXVm.js";import{i as ve}from"./AlertCircle-8ukcBvl4.js";import{i as ke,n as Ne}from"./ArrowUp-K5jCRsZA.js";import{n as Se,c as Ce,k as we,d as Te}from"./UserCheck01-CI1951yc.js";import{T as te,a as se}from"./toggle-group-D9Y0fm-3.js";import{B as Y}from"./badge-DUPpSRXM.js";import{l as ne,T as $e,P as De,S as Oe}from"./config-BzgM9JXs.js";import{C as H,X as P,Y as V}from"./CartesianChart-C4hmdW3d.js";import{A as Ie,a as Be}from"./AreaChart-B6hqu-pW.js";function le(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=xe();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,E="cursor-pointer text-left transition-colors hover:bg-accent focus-ring",F=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function ae(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?ae(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?ae(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const re=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Le=/^\d{4}-\d{2}-\d{2}$/;function Me(a,e){return typeof a=="number"?M(a,e):Le.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):re.test(a)?q(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&E;let m;e[0]!==u?(m=D("surface @container flex h-full w-full min-w-0 flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=m):m=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let f;e[4]!==d?(f=d!==void 0&&s.jsx("span",{className:"tnum whitespace-nowrap text-4xl font-normal text-foreground @max-xs:text-3xl @max-3xs:text-2xl",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==f?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,f,o]}),e[6]=o,e[7]=x,e[8]=f,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==m||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:m,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=m,e[18]=p,e[19]=j):j=e[19],j}function ie(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=ne(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function _e(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let m;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(m=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:D("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ke,{size:12}):s.jsx(Ne,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=m):m=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let f;e[16]!==x?(f=s.jsx("span",{children:x}),e[16]=x,e[17]=f):f=e[17];let h;return e[18]!==m||e[19]!==f?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[m,f]}),e[18]=m,e[19]=f,e[20]=h):h=e[20],h}const Re={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Ae(a){const e=w.c(10),{section:t,onDrill:d}=a,o=Re[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=D("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(_e,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ke(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Fe(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Ee(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function oe(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let m;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],m=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=m}else m=e[8];let x;e[12]!==m?(x=s.jsx("div",{className:"flex flex-col gap-1",children:m}),e[12]=m,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs("div",{className:"rounded-lg bg-popover px-3 py-2 shadow-soft",children:[u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function ze(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ke(t.points),i=r?Fe(t.points,n):n,u=y=>F[n.indexOf(y)%F.length],m=Object.fromEntries(i.map(y=>[y,{label:y,color:u(y)}])),f=(r&&d?Ee(t.points,n,d):t.points).map(Ge);let h;if(e[7]!==t.title){let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=/\W+/g,e[9]=y):y=e[9],h=t.title.replace(y,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const v=j;let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=k):k=e[11];const b=k;let T;e[12]!==c?(T=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=T):T=e[13];const S=c!==void 0;let g;e[14]!==c?(g=y=>X(y,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==T||e[17]!==S||e[18]!==g?(C=s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:T,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=T,e[17]=S,e[18]=g,e[19]=C):C=e[19];const O=C;let $;e[20]!==r?($=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=$):$=e[21];let I;e[22]!==c?(I=y=>{const{active:z,payload:me}=y;return s.jsx(oe,{active:z,payload:me,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==$?(N=s.jsx(ee,{cursor:$,content:I}),e[24]=I,e[25]=$,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(y=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(y)}}),y]},y))}),children:f.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(J,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:m,children:r?s.jsxs(G,{data:f,margin:{left:0,right:0,top:8},children:[v,b,O,K,i.map((y,z)=>s.jsx(U,{dataKey:y,stackId:"day",fill:u(y),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},y))]}):s.jsxs(Ie,{data:f,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),v,b,O,K,i.map(y=>s.jsx(Be,{type:"linear",dataKey:y,stroke:u(y),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:f.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},y))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function Ge(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function ce(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let m;e[0]!==n?(m=n&&D(E,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=m):m=e[1];let x;e[2]!==m?(x=D("flex h-10 w-full items-center gap-3",m),e[2]=m,e[3]=x):x=e[3];let f;e[4]!==d?(f=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==t||e[7]!==f?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,f]}),e[6]=t,e[7]=f,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let v;e[12]!==o?(v=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=v):v=e[13];let k;e[14]!==c?(k=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=k):k=e[15];let b;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==v||e[23]!==k?(b=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,v,k]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=v,e[23]=k,e[24]=b):b=e[24],b}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((m,x)=>{const f=t.stages[x-1]?.value,h=f===void 0?0:f-m.value;return s.jsx(ce,{label:m.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*m.value/c)}%`,value:m.value.toLocaleString(),fill:100*m.value/c,color:"var(--chart-2)",onClick:L(d,m.drill,m.label)},m.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function He(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(Pe)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(ce,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let m;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(m=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=m):m=e[18],m}function Pe(a){return a.value}function Ve(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Xe=new Set(["Org ID","Task ID"]),Ye=new Set(["Run outcome","Failure kind","Moved in by","State"]),Qe=new Set(["Error","Signature"]),We=new Set(["Org","Orgs"]);function Ze(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,m=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==m?(x=c&&m>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=m,e[7]=x):x=e[7];const f=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==f||e[18]!==c||e[19]!==m||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let v;e[23]!==o?(v=S=>{const{c:g}=S;return!Xe.has(g)&&(o!==!1||!We.has(g))},e[23]=o,e[24]=v):v=e[24];const k=h.map(st).filter(v).sort(tt);let b;e[25]!==t.rows?(b=S=>{const{j:g}=S,C=t.rows.map(O=>O[g]).filter(et);return C.length>0&&C.every(Je)},e[25]=t.rows,e[26]=b):b=e[26];const T=new Set(k.filter(b).map(qe));if(t.rows.length===1&&k.every(S=>{const{c:g}=S;return T.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=O=>{const{c:$,j:I}=O,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:$}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[$]):"—"})]},$)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:k.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(he,{variant:"flush",children:[s.jsx(ge,{children:s.jsx(W,{children:k.map(S=>{const{c:g}=S;return s.jsx(je,{className:D("whitespace-nowrap first:pl-4 last:pr-4",T.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(be,{children:t.rows.map((S,g)=>s.jsx(W,{children:k.map((C,O)=>{const{c:$,j:I}=C,N=S[I],K=f===I?S[m]:null,y=O===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(ye,{className:D("max-w-md truncate text-sm first:pl-4 last:pr-4",T.has($)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Ve(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):y?s.jsx("button",{type:"button",onClick:y,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(le,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):$==="Lane"&&typeof N=="string"?s.jsx(ie,{lane:N}):$==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(de,{drill:`priority:${N.toLowerCase()}`}),N]}):Ye.has($)?s.jsx(Y,{variant:"muted",children:String(N)}):Qe.has($)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:D("tnum",typeof N=="string"&&re.test(N)&&"text-muted-foreground"),children:Me(N,t.units?.[$])})},$)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=f,e[18]=c,e[19]=m,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function qe(a){const{c:e}=a;return e}function Je(a){return typeof a=="number"}function et(a){return a!==null}function tt(a,e){return+(e.c==="Task")-+(a.c==="Task")}function st(a,e){return{c:a,j:e}}function Tt(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const m=String(u[r("Task ID")]??""),x=u[r("Lane")],f=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof f=="string"?q(f):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),v=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(ve,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(ie,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(le,{href:d(m),className:D(E,"flex items-center gap-3 rounded-md p-2"),children:v}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:v})},m)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const nt={Type:Te,Priority:we,Tag:Ce,Sprint:Se,"Brief by":pe};function de(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries($e).find(x=>{const[f]=x;return f===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[f]=x;return f===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=D("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function lt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let m;return e[8]!==l||e[9]!==u?(m=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=m):m=e[10],m}function at(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(f=>f.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(te,{type:"single",variant:"segmented",size:"sm",value:n?.label??"",onValueChange:f=>f&&r(f),children:t.dimensions.map(it)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let m;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(m=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(rt)]}),n.rows.map(f=>{const h=L(d,f.drill,f.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:D("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&D(E,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(de,{drill:f.drill}),s.jsx("span",{className:"truncate",children:f.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:f.count.toLocaleString()}),t.metrics.map(j=>s.jsx(lt,{value:f.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},f.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=m):m=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==m?(x=s.jsx(_,{title:t.title,aside:u,children:m}),e[12]=t.title,e[13]=u,e[14]=m,e[15]=x):x=e[15],x}function rt(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function it(a){const e=nt[a.label];return s.jsxs(se,{value:a.label,children:[e&&s.jsx(e,{}),a.label]},a.label)}const ue=3;function ot(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(b=>b.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((b,T)=>t.cols[T]===b),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const m=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,f=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(ue)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(te,{type:"single",variant:"segmented",size:"sm",value:n.key,onValueChange:b=>b&&r(b),children:t.metrics.map(dt)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let v;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==m||e[18]!==o||e[19]!==i?(v=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ct),t.rows.map((b,T)=>s.jsx(ut,{row:b,section:t,metric:n,tint:i,onDrill:d,upTo:m?T:void 0},b))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=m,e[18]=o,e[19]=i,e[20]=v):v=e[20];let k;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==v?(k=s.jsx(_,{title:f,caption:p,aside:j,children:v}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=v,e[25]=k):k=e[25],k}function ct(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function dt(a){return s.jsx(se,{value:a.key,children:a.label},a.key)}function ut(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(f,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},f);const p=d.cells.find(b=>b.row===t&&b.col===f),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},f);const v=j===null?0:Math.min(100,o.unit==="%"?j:0),k=L(r,p.drill,t===f?t:`${t} · ${f}`);return s.jsxs("button",{type:"button",onClick:k,disabled:!k,className:D("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",k&&"cursor-pointer hover:opacity-80",p.count<ue&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+v*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},f)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let m;return e[19]!==i||e[20]!==u?(m=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=m):m=e[21],m}function mt(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?ne(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=mt(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),m=g=>g===t.baseline?"var(--border)":F[u.indexOf(g)%F.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:m(g)}]));let f;e[12]!==t.categories?(f=t.categories.map(pt),e[12]=t.categories,e[13]=f):f=e[13];const h=f;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,v=t.categories.some(xt)&&!!d,k=l?Math.max(120,t.categories.length*44+32):220;let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b={fill:"var(--muted)",opacity:.4},e[17]=b):b=e[17];let T;e[18]!==c||e[19]!==r?(T=s.jsx(ee,{cursor:b,content:g=>{const{active:C,payload:O}=g;return s.jsx(oe,{active:C,payload:O,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=T):T=e[20];const S=T;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:m(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(J,{role:"img","aria-label":t.title,className:"w-full",style:{height:k},config:x,children:l?s.jsxs(G,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(P,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(V,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(U,{dataKey:g,stackId:"all",fill:m(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(G,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(U,{dataKey:g,fill:m(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:D(v&&"cursor-pointer"),onClick:(C,O)=>j(O)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function xt(a){return a.drill}function pt(a){return{label:a.label,...a.values}}function $t(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function Dt(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Ae,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(ze,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(He,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(at,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(ot,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(Ze,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{A,Tt as D,_ as M,Dt as S,$t as s};
1
+ import{c as w,j as s,b as B,gT as Q,m as D,F as fe,r as Z,d as xe,hC as q,ax as pe}from"./index-BsAwgxIf.js";import{c as J,b as G,B as U,C as ee}from"./chart-B0F_JJb6.js";import{e as he,a as ge,b as W,T as je,d as be,c as ye}from"./table-Cie3FI8M.js";import{i as ve}from"./AlertCircle-DA6gE5vw.js";import{i as ke,n as Ne}from"./ArrowUp-DyF0Rx2O.js";import{n as Se,c as Ce,k as we,d as Te}from"./UserCheck01-3D5hYz4C.js";import{T as te,a as se}from"./toggle-group-N0qYYn6W.js";import{B as Y}from"./badge-BUkSpOXa.js";import{l as ne,T as $e,P as De,S as Oe}from"./config-Bn4oMb7y.js";import{C as H,X as P,Y as V}from"./CartesianChart-Dv3UTRbp.js";import{A as Ie,a as Be}from"./AreaChart-Y5-RpSOt.js";function le(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=xe();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,E="cursor-pointer text-left transition-colors hover:bg-accent focus-ring",F=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function ae(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?ae(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?ae(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const re=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Le=/^\d{4}-\d{2}-\d{2}$/;function Me(a,e){return typeof a=="number"?M(a,e):Le.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):re.test(a)?q(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&E;let m;e[0]!==u?(m=D("surface @container flex h-full w-full min-w-0 flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=m):m=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let f;e[4]!==d?(f=d!==void 0&&s.jsx("span",{className:"tnum whitespace-nowrap text-4xl font-normal text-foreground @max-xs:text-3xl @max-3xs:text-2xl",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==f?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,f,o]}),e[6]=o,e[7]=x,e[8]=f,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==m||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:m,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=m,e[18]=p,e[19]=j):j=e[19],j}function ie(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=ne(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function _e(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let m;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(m=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:D("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ke,{size:12}):s.jsx(Ne,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=m):m=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let f;e[16]!==x?(f=s.jsx("span",{children:x}),e[16]=x,e[17]=f):f=e[17];let h;return e[18]!==m||e[19]!==f?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[m,f]}),e[18]=m,e[19]=f,e[20]=h):h=e[20],h}const Re={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Ae(a){const e=w.c(10),{section:t,onDrill:d}=a,o=Re[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=D("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(_e,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ke(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Fe(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Ee(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function oe(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let m;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],m=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=m}else m=e[8];let x;e[12]!==m?(x=s.jsx("div",{className:"flex flex-col gap-1",children:m}),e[12]=m,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs("div",{className:"rounded-lg bg-popover px-3 py-2 shadow-soft",children:[u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function ze(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ke(t.points),i=r?Fe(t.points,n):n,u=y=>F[n.indexOf(y)%F.length],m=Object.fromEntries(i.map(y=>[y,{label:y,color:u(y)}])),f=(r&&d?Ee(t.points,n,d):t.points).map(Ge);let h;if(e[7]!==t.title){let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=/\W+/g,e[9]=y):y=e[9],h=t.title.replace(y,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const v=j;let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=k):k=e[11];const b=k;let T;e[12]!==c?(T=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=T):T=e[13];const S=c!==void 0;let g;e[14]!==c?(g=y=>X(y,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==T||e[17]!==S||e[18]!==g?(C=s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:T,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=T,e[17]=S,e[18]=g,e[19]=C):C=e[19];const O=C;let $;e[20]!==r?($=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=$):$=e[21];let I;e[22]!==c?(I=y=>{const{active:z,payload:me}=y;return s.jsx(oe,{active:z,payload:me,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==$?(N=s.jsx(ee,{cursor:$,content:I}),e[24]=I,e[25]=$,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(y=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(y)}}),y]},y))}),children:f.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(J,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:m,children:r?s.jsxs(G,{data:f,margin:{left:0,right:0,top:8},children:[v,b,O,K,i.map((y,z)=>s.jsx(U,{dataKey:y,stackId:"day",fill:u(y),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},y))]}):s.jsxs(Ie,{data:f,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),v,b,O,K,i.map(y=>s.jsx(Be,{type:"linear",dataKey:y,stroke:u(y),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:f.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},y))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function Ge(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function ce(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let m;e[0]!==n?(m=n&&D(E,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=m):m=e[1];let x;e[2]!==m?(x=D("flex h-10 w-full items-center gap-3",m),e[2]=m,e[3]=x):x=e[3];let f;e[4]!==d?(f=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==t||e[7]!==f?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,f]}),e[6]=t,e[7]=f,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let v;e[12]!==o?(v=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=v):v=e[13];let k;e[14]!==c?(k=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=k):k=e[15];let b;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==v||e[23]!==k?(b=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,v,k]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=v,e[23]=k,e[24]=b):b=e[24],b}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((m,x)=>{const f=t.stages[x-1]?.value,h=f===void 0?0:f-m.value;return s.jsx(ce,{label:m.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*m.value/c)}%`,value:m.value.toLocaleString(),fill:100*m.value/c,color:"var(--chart-2)",onClick:L(d,m.drill,m.label)},m.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function He(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(Pe)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(ce,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let m;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(m=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=m):m=e[18],m}function Pe(a){return a.value}function Ve(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Xe=new Set(["Org ID","Task ID"]),Ye=new Set(["Run outcome","Failure kind","Moved in by","State"]),Qe=new Set(["Error","Signature"]),We=new Set(["Org","Orgs"]);function Ze(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,m=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==m?(x=c&&m>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=m,e[7]=x):x=e[7];const f=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==f||e[18]!==c||e[19]!==m||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let v;e[23]!==o?(v=S=>{const{c:g}=S;return!Xe.has(g)&&(o!==!1||!We.has(g))},e[23]=o,e[24]=v):v=e[24];const k=h.map(st).filter(v).sort(tt);let b;e[25]!==t.rows?(b=S=>{const{j:g}=S,C=t.rows.map(O=>O[g]).filter(et);return C.length>0&&C.every(Je)},e[25]=t.rows,e[26]=b):b=e[26];const T=new Set(k.filter(b).map(qe));if(t.rows.length===1&&k.every(S=>{const{c:g}=S;return T.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=O=>{const{c:$,j:I}=O,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:$}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[$]):"—"})]},$)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:k.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(he,{variant:"flush",children:[s.jsx(ge,{children:s.jsx(W,{children:k.map(S=>{const{c:g}=S;return s.jsx(je,{className:D("whitespace-nowrap first:pl-4 last:pr-4",T.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(be,{children:t.rows.map((S,g)=>s.jsx(W,{children:k.map((C,O)=>{const{c:$,j:I}=C,N=S[I],K=f===I?S[m]:null,y=O===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(ye,{className:D("max-w-md truncate text-sm first:pl-4 last:pr-4",T.has($)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Ve(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):y?s.jsx("button",{type:"button",onClick:y,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(le,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):$==="Lane"&&typeof N=="string"?s.jsx(ie,{lane:N}):$==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(de,{drill:`priority:${N.toLowerCase()}`}),N]}):Ye.has($)?s.jsx(Y,{variant:"muted",children:String(N)}):Qe.has($)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:D("tnum",typeof N=="string"&&re.test(N)&&"text-muted-foreground"),children:Me(N,t.units?.[$])})},$)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=f,e[18]=c,e[19]=m,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function qe(a){const{c:e}=a;return e}function Je(a){return typeof a=="number"}function et(a){return a!==null}function tt(a,e){return+(e.c==="Task")-+(a.c==="Task")}function st(a,e){return{c:a,j:e}}function Tt(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const m=String(u[r("Task ID")]??""),x=u[r("Lane")],f=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof f=="string"?q(f):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),v=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(ve,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(ie,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(le,{href:d(m),className:D(E,"flex items-center gap-3 rounded-md p-2"),children:v}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:v})},m)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const nt={Type:Te,Priority:we,Tag:Ce,Sprint:Se,"Brief by":pe};function de(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries($e).find(x=>{const[f]=x;return f===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[f]=x;return f===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=D("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function lt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let m;return e[8]!==l||e[9]!==u?(m=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=m):m=e[10],m}function at(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(f=>f.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(te,{type:"single",variant:"segmented",size:"sm",value:n?.label??"",onValueChange:f=>f&&r(f),children:t.dimensions.map(it)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let m;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(m=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(rt)]}),n.rows.map(f=>{const h=L(d,f.drill,f.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:D("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&D(E,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(de,{drill:f.drill}),s.jsx("span",{className:"truncate",children:f.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:f.count.toLocaleString()}),t.metrics.map(j=>s.jsx(lt,{value:f.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},f.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=m):m=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==m?(x=s.jsx(_,{title:t.title,aside:u,children:m}),e[12]=t.title,e[13]=u,e[14]=m,e[15]=x):x=e[15],x}function rt(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function it(a){const e=nt[a.label];return s.jsxs(se,{value:a.label,children:[e&&s.jsx(e,{}),a.label]},a.label)}const ue=3;function ot(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(b=>b.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((b,T)=>t.cols[T]===b),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const m=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,f=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(ue)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(te,{type:"single",variant:"segmented",size:"sm",value:n.key,onValueChange:b=>b&&r(b),children:t.metrics.map(dt)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let v;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==m||e[18]!==o||e[19]!==i?(v=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ct),t.rows.map((b,T)=>s.jsx(ut,{row:b,section:t,metric:n,tint:i,onDrill:d,upTo:m?T:void 0},b))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=m,e[18]=o,e[19]=i,e[20]=v):v=e[20];let k;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==v?(k=s.jsx(_,{title:f,caption:p,aside:j,children:v}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=v,e[25]=k):k=e[25],k}function ct(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function dt(a){return s.jsx(se,{value:a.key,children:a.label},a.key)}function ut(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(f,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},f);const p=d.cells.find(b=>b.row===t&&b.col===f),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},f);const v=j===null?0:Math.min(100,o.unit==="%"?j:0),k=L(r,p.drill,t===f?t:`${t} · ${f}`);return s.jsxs("button",{type:"button",onClick:k,disabled:!k,className:D("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",k&&"cursor-pointer hover:opacity-80",p.count<ue&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+v*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},f)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let m;return e[19]!==i||e[20]!==u?(m=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=m):m=e[21],m}function mt(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?ne(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=mt(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),m=g=>g===t.baseline?"var(--border)":F[u.indexOf(g)%F.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:m(g)}]));let f;e[12]!==t.categories?(f=t.categories.map(pt),e[12]=t.categories,e[13]=f):f=e[13];const h=f;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,v=t.categories.some(xt)&&!!d,k=l?Math.max(120,t.categories.length*44+32):220;let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b={fill:"var(--muted)",opacity:.4},e[17]=b):b=e[17];let T;e[18]!==c||e[19]!==r?(T=s.jsx(ee,{cursor:b,content:g=>{const{active:C,payload:O}=g;return s.jsx(oe,{active:C,payload:O,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=T):T=e[20];const S=T;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:m(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(J,{role:"img","aria-label":t.title,className:"w-full",style:{height:k},config:x,children:l?s.jsxs(G,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(P,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(V,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(U,{dataKey:g,stackId:"all",fill:m(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(G,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(U,{dataKey:g,fill:m(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:D(v&&"cursor-pointer"),onClick:(C,O)=>j(O)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function xt(a){return a.drill}function pt(a){return{label:a.label,...a.values}}function $t(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function Dt(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Ae,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(ze,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(He,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(at,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(ot,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(Ze,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{A,Tt as D,_ as M,Dt as S,$t as s};
@@ -0,0 +1 @@
1
+ import{c as o,j as r}from"./index-BsAwgxIf.js";import{O as m}from"./api-keys-F6uIkepe.js";import{R as p}from"./require-capability-Db5kMZvY.js";import"./AlertCircle-DA6gE5vw.js";import"./agent-icon-B9nZhdi2.js";import"./UserCheck01-3D5hYz4C.js";import"./Tool01-ymE-fOFX.js";import"./ArrowUp-DyF0Rx2O.js";import"./ArrowLeft-B8D7i2xh.js";import"./ArrowRight-C1EmTlL-.js";import"./BookOpen01-UxGmri2e.js";import"./Globe04-DD86hrsf.js";import"./CheckCircle-Bh1gNJET.js";import"./TrendUp01-Cr4FP2fV.js";import"./ChevronDown-uPv2ScPr.js";import"./ChevronSelectorVertical-CiFyE2Pu.js";import"./ChevronUp-BkmRXggG.js";import"./UserSquare-aJjYmjOR.js";import"./LinkBroken01-Ic71rSEU.js";import"./CreditCard01-C-H9qti1.js";import"./File02-DEjt2PPW.js";import"./MessageCircle01-CQjeMfQj.js";import"./SwitchHorizontal01-BU8z7oT_.js";import"./Eye-DL5oRAI4.js";import"./Image01-BCiDUkCm.js";import"./Key01-CgRwsDr3.js";import"./LayoutLeft-DHg_jNr0.js";import"./Minus-BM2zRSMr.js";import"./Monitor01-C4OHhcX6.js";import"./Sun-CoJn-J4w.js";import"./Play-l838EjWq.js";import"./Plus-BzpqhVU8.js";import"./SearchMd-BhCfkG_O.js";import"./ShoppingBag01-KIefHp9K.js";import"./Trash01-aSl--BGd.js";import"./Upload01-DozMUWEF.js";import"./Users01-Cximoi8v.js";import"./XClose-Dq0BGBMq.js";import"./Zap-NAfA60T9.js";import"./empty-state-D--R_kh-.js";import"./label-D8u4gNcM.js";import"./badge-BUkSpOXa.js";import"./index-Oc-4w-Ob.js";import"./select-DPXDtN3F.js";import"./index-BdQq_4o_.js";import"./index-KBC7Pj7l.js";import"./use-mcp-client-DXpTlXlJ.js";import"./auth-D0WiD-6X.js";import"./use-mcp-tools-B0m5-RR6.js";import"./checkbox-BwlyfOui.js";import"./search-input-D6gGXIf1.js";import"./integration-icon-DbiCbrD7.js";import"./tool-set-selector-BE0R1AUj.js";import"./use-infinite-scroll-Dv1yBngZ.js";import"./useSuspenseInfiniteQuery-kmW-ybmd.js";import"./infiniteQueryObserver-CnD94meO.js";import"./collection-search-Dj3oO1qn.js";import"./connection-CELF9xGk.js";import"./url-slug-CR2COLQn.js";import"./use-connection-DpuSfyHb.js";import"./use-api-keys-lPXg3MPh.js";import"./access-gate-Cnf06l1a.js";import"./capability-load-error-DCMluNzB.js";function xi(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(p,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(m,{})}),t[0]=i):i=t[0],i}export{xi as default};
@@ -1 +1 @@
1
- import{c as L,m as Ie,j as s,b as G,r as P,h as Re,a4 as ze,W as tt,as as st,T as Fe,dO as it,i as lt,i2 as nt,gT as at,gE as Le,aN as ot,aM as rt,aJ as ct,aH as dt,aI as ut,aL as ft,aK as mt,b7 as pt,B as H,t as ke,gf as xt,x as Be,aS as Ge,w as qe,I as Me,y as He,v as Qe,D as Ve}from"./index-D0JbJFfP.js";import{i as gt}from"./AlertCircle-8ukcBvl4.js";import{e as yt}from"./agent-icon-Cz4yRQtC.js";import{i as Ye}from"./Key01-DeYX7L_Z.js";import{s as Ue}from"./Plus-n5KTXyCz.js";import{s as ht}from"./Trash01-uKrzOq5g.js";import{E as jt}from"./empty-state-DR046JV4.js";import{L as Ee}from"./label-Cz2ESzy4.js";import{B as Ae}from"./badge-DUPpSRXM.js";import{I as Kt,R as bt}from"./index-DkZhaGHi.js";import{c as vt,b as Ct,a as St,d as Nt,S as _t}from"./select-CHNsjY6K.js";import{u as We}from"./use-mcp-client-Cnv47oK4.js";import{u as Dt}from"./use-mcp-tools-8aCXB58i.js";import{t as wt}from"./ChevronDown-kKxnMd3L.js";import{C as At}from"./checkbox-CWfz72Eg.js";import{S as kt}from"./search-input-jt6Xgx4B.js";import{I as Tt}from"./integration-icon-BkEHXL5H.js";import{T as Ot}from"./tool-set-selector-Drp4qxhz.js";import{b as Et}from"./use-connection-BlwEJ6QU.js";import{u as It,b as zt,a as Pt}from"./use-api-keys-DmoX8fkX.js";function Lt(o){const e=L.c(8);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("grid gap-3",l),e[3]=l,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=s.jsx(bt,{"data-slot":"radio-group",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}function $t(o){const e=L.c(9);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("group relative inline-flex size-4 shrink-0 items-center justify-center rounded-full shadow-[inset_0_0_0_1.5px_var(--input)] transition-[background-color,box-shadow] duration-150 hover:shadow-[inset_0_0_0_1.5px_color-mix(in_oklch,var(--foreground)_30%,var(--input))] data-[state=checked]:bg-primary data-[state=checked]:shadow-[inset_0_0_0_1.5px_var(--primary)] aria-invalid:shadow-[inset_0_0_0_1.5px_var(--destructive)] focus-ring disabled:opacity-50 motion-reduce:transition-none",l),e[3]=l,e[4]=t):t=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"bg-primary-foreground size-1.5 scale-0 rounded-full transition-transform duration-200 ease-[cubic-bezier(0.34,1.56,0.64,1)] group-data-[state=checked]:scale-100 motion-reduce:transition-none"}),e[5]=a):a=e[5];let n;return e[6]!==i||e[7]!==t?(n=s.jsx(Kt,{"data-slot":"radio-group-item",className:t,...i,children:a}),e[6]=i,e[7]=t,e[8]=n):n=e[8],n}const $e=["7","30","90","365","never"],Rt=86400;function Ft(o){return o.filter(e=>e.annotations?.readOnlyHint===!0).map(e=>e.name)}const Ne="self";function Bt(o,e,l){return o==="full"?{"*":["*"]}:o==="read-only"?{[Ne]:e}:Object.fromEntries(Object.entries(l).filter(([,i])=>i.length>0))}function Je(o){return Object.values(o).reduce((e,l)=>e+l.length,0)}function Gt(o){return o==="never"?void 0:Number(o)*Rt}function qt(o){const e=i=>{const t=o[i];return Array.isArray(t)?t:[]};if(e("*").includes("*")||e("self").includes("*"))return{kind:"full"};const l=new Set;for(const i of Object.keys(o))for(const t of e(i))t.startsWith("!")||l.add(`${i}:${t}`);return{kind:"tools",count:l.size}}function Mt(o,e){return o.name.toLowerCase().includes(e)||(o.description?.toLowerCase().includes(e)??!1)}function Xe(o){const e=L.c(56),{resource:l,title:i,icon:t,tools:a,selected:n,onChange:m,query:c,onExpand:r}=o,d=G(),[p,x]=P.useState(!1);let u;e[0]!==c||e[1]!==i?(u=!c||i.toLowerCase().includes(c),e[0]=c,e[1]=i,e[2]=u):u=e[2];const f=u;let j;e[3]!==c||e[4]!==f||e[5]!==a?(j=a===null?null:f?a:a.filter(A=>Mt(A,c)),e[3]=c,e[4]=f,e[5]=a,e[6]=j):j=e[6];const y=j,g=p||!!c&&(y?.length??0)>0,S=!f&&!y?.length;let K;e[7]!==n?(K=new Set(n),e[7]=n,e[8]=K):K=e[8];const h=K,v=a!==null&&a.length>0&&n.length>=a.length;let b;e[9]!==r||e[10]!==p?(b=()=>{p||r?.(),x(!p)},e[9]=r,e[10]=p,e[11]=b):b=e[11];const C=b;let N;e[12]!==m||e[13]!==r||e[14]!==n.length||e[15]!==a?(N=()=>{if(n.length>0){m([]);return}if(a===null){r?.(),x(!0);return}m(a.map(Ht))},e[12]=m,e[13]=r,e[14]=n.length,e[15]=a,e[16]=N):N=e[16];const _=N;if(S)return null;let w;e[17]!==g?(w=g?s.jsx(wt,{size:16,className:"shrink-0 text-muted-foreground"}):s.jsx(st,{size:16,className:"shrink-0 text-muted-foreground"}),e[17]=g,e[18]=w):w=e[18];let D;e[19]!==t||e[20]!==i?(D=s.jsx(Tt,{icon:t,name:i,size:"xs"}),e[19]=t,e[20]=i,e[21]=D):D=e[21];let k;e[22]!==i?(k=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:i}),e[22]=i,e[23]=k):k=e[23];let T;e[24]!==n.length||e[25]!==d||e[26]!==a?(T=(a!==null||n.length>0)&&s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a===null?n.length:d("settings.apiKeys.toolsGroupCount",{count:n.length,total:a.length})}),e[24]=n.length,e[25]=d,e[26]=a,e[27]=T):T=e[27];let R;e[28]!==g||e[29]!==w||e[30]!==D||e[31]!==k||e[32]!==T||e[33]!==C?(R=s.jsxs("button",{type:"button",onClick:C,"aria-expanded":g,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-3 py-2.5 pl-3 text-left",children:[w,D,k,T]}),e[28]=g,e[29]=w,e[30]=D,e[31]=k,e[32]=T,e[33]=C,e[34]=R):R=e[34];const F=v?!0:n.length>0?"indeterminate":!1;let O;e[35]!==d||e[36]!==i?(O=d("settings.apiKeys.toolsSelectGroup",{name:i}),e[35]=d,e[36]=i,e[37]=O):O=e[37];let E;e[38]!==F||e[39]!==O||e[40]!==_?(E=s.jsx(At,{checked:F,onCheckedChange:_,"aria-label":O}),e[38]=F,e[39]=O,e[40]=_,e[41]=E):E=e[41];let I;e[42]!==R||e[43]!==E?(I=s.jsxs("div",{className:"flex items-center gap-3 pr-4 hover:bg-accent",children:[R,E]}),e[42]=R,e[43]=E,e[44]=I):I=e[44];let z;e[45]!==g||e[46]!==m||e[47]!==l||e[48]!==n||e[49]!==h||e[50]!==d||e[51]!==y?(z=g&&s.jsx("div",{className:"space-y-1 border-t border-border p-1",children:y===null?s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}):y.length===0?s.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:d("settings.apiKeys.toolsNone")}):y.map(A=>s.jsx(Ot,{connectionId:l,tool:A,isSelected:h.has(A.name),onToggle:()=>m(h.has(A.name)?n.filter(Q=>Q!==A.name):[...n,A.name]),badge:A.annotations?.readOnlyHint===!0&&s.jsx(Ae,{variant:"muted",size:"sm",children:d("settings.apiKeys.readOnlyBadge")})},A.name))}),e[45]=g,e[46]=m,e[47]=l,e[48]=n,e[49]=h,e[50]=d,e[51]=y,e[52]=z):z=e[52];let $;return e[53]!==I||e[54]!==z?($=s.jsxs("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:[I,z]}),e[53]=I,e[54]=z,e[55]=$):$=e[55],$}function Ht(o){return o.name}function Qt(o){const e=L.c(21),{connection:l,selected:i,onChange:t,query:a}=o,{org:n}=ze();let m;e[0]!==n.id||e[1]!==n.slug?(m={connectionId:Fe,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=m):m=e[2];const c=We(m),[r,d]=P.useState(!1);let p;e[3]!==c||e[4]!==l.id||e[5]!==n.id?(p=it(n.id,"CONNECTIONS",l.id,c),e[3]=c,e[4]=l.id,e[5]=n.id,e[6]=p):p=e[6];let x;e[7]!==r||e[8]!==p?(x={...p,enabled:r},e[7]=r,e[8]=p,e[9]=x):x=e[9];const{data:u}=lt(x);let f;e[10]!==u?(f=u?u.item?.tools??[]:null,e[10]=u,e[11]=f):f=e[11];const j=f;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=()=>d(!0),e[12]=y):y=e[12];let g;return e[13]!==l.icon||e[14]!==l.id||e[15]!==l.title||e[16]!==t||e[17]!==a||e[18]!==i||e[19]!==j?(g=s.jsx(Xe,{resource:l.id,title:l.title,icon:l.icon,tools:j,selected:i,onChange:t,query:a,onExpand:y}),e[13]=l.icon,e[14]=l.id,e[15]=l.title,e[16]=t,e[17]=a,e[18]=i,e[19]=j,e[20]=g):g=e[20],g}function Vt(o){const e=L.c(14),{toolSet:l,onChange:i,query:t}=o,{org:a}=ze();let n;e[0]!==a.id?(n=tt.SELF(a.id),e[0]=a.id,e[1]=n):n=e[1];const m=n,c=Et();let r;if(e[2]!==i||e[3]!==t||e[4]!==m||e[5]!==c||e[6]!==l){let d;e[8]!==m?(d=u=>u.id!==m,e[8]=m,e[9]=d):d=e[9];const p=c.filter(d);let x;e[10]!==i||e[11]!==t||e[12]!==l?(x=u=>s.jsx(Qt,{connection:u,selected:l[u.id]??[],onChange:f=>i(u.id,f),query:t},u.id),e[10]=i,e[11]=t,e[12]=l,e[13]=x):x=e[13],r=p.map(x),e[2]=i,e[3]=t,e[4]=m,e[5]=c,e[6]=l,e[7]=r}else r=e[7];return r}function Yt(o){const e=L.c(41),{studioTools:l,toolSet:i,onChange:t}=o,a=G(),[n,m]=P.useState("");let c;e[0]!==n?(c=n.trim().toLowerCase(),e[0]=n,e[1]=c):c=e[1];const r=P.useDeferredValue(c);let d;e[2]!==t||e[3]!==i?(d=(_,w)=>t({...i,[_]:w}),e[2]=t,e[3]=i,e[4]=d):d=e[4];const p=d;let x;e[5]!==a?(x=a("settings.apiKeys.toolsSearch"),e[5]=a,e[6]=x):x=e[6];let u;e[7]!==n||e[8]!==x?(u=s.jsx(kt,{value:n,onChange:m,placeholder:x,className:"flex-1"}),e[7]=n,e[8]=x,e[9]=u):u=e[9];let f;e[10]!==a||e[11]!==i?(f=a("settings.apiKeys.toolsSelected",{count:Je(i)}),e[10]=a,e[11]=i,e[12]=f):f=e[12];let j;e[13]!==f?(j=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=j):j=e[14];let y;e[15]!==u||e[16]!==j?(y=s.jsxs("div",{className:"flex items-center gap-3",children:[u,j]}),e[15]=u,e[16]=j,e[17]=y):y=e[17];let g;e[18]!==a?(g=a("settings.apiKeys.studioTools"),e[18]=a,e[19]=g):g=e[19];let S;e[20]!==i?(S=i[Ne]??[],e[20]=i,e[21]=S):S=e[21];let K;e[22]!==p?(K=_=>p(Ne,_),e[22]=p,e[23]=K):K=e[23];let h;e[24]!==r||e[25]!==l||e[26]!==K||e[27]!==g||e[28]!==S?(h=s.jsx(Xe,{resource:Ne,title:g,icon:"/favicon.svg",tools:l,selected:S,onChange:K,query:r}),e[24]=r,e[25]=l,e[26]=K,e[27]=g,e[28]=S,e[29]=h):h=e[29];let v;e[30]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}),e[30]=v):v=e[30];let b;e[31]!==r||e[32]!==p||e[33]!==i?(b=s.jsx(P.Suspense,{fallback:v,children:s.jsx(Vt,{toolSet:i,onChange:p,query:r})}),e[31]=r,e[32]=p,e[33]=i,e[34]=b):b=e[34];let C;e[35]!==h||e[36]!==b?(C=s.jsxs("div",{className:"max-h-80 space-y-2 overflow-y-auto",children:[h,b]}),e[35]=h,e[36]=b,e[37]=C):C=e[37];let N;return e[38]!==C||e[39]!==y?(N=s.jsxs("div",{className:"space-y-2",children:[y,C]}),e[38]=C,e[39]=y,e[40]=N):N=e[40],N}function Ze(o){const e=L.c(6),{error:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(gt,{size:16}),e[0]=t):t=e[0];let a;e[1]!==l.message||e[2]!==i?(a=i("settings.apiKeys.failedToLoadError",{error:l.message}),e[1]=l.message,e[2]=i,e[3]=a):a=e[3];let n;return e[4]!==a?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[t,s.jsx("span",{className:"text-sm font-medium",children:a})]}),e[4]=a,e[5]=n):n=e[5],n}function Ut(o){const e=L.c(31),{apiKey:l,onDelete:i}=o,t=G(),a=qt(l.permissions),n=l.expiresAt?new Date(l.expiresAt):null,[m]=P.useState(Wt),c=n!==null&&n.getTime()<=m,r=n?.toLocaleDateString()??"",d="flex items-center justify-between gap-4 px-4 py-3",p="flex items-center gap-3 min-w-0";let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(Ye,{size:16,className:"text-muted-foreground"})}),e[0]=x):x=e[0];const u="min-w-0";let f;e[1]!==l.name?(f=s.jsx("span",{className:"font-medium text-sm truncate",children:l.name}),e[1]=l.name,e[2]=f):f=e[2];const j=a.kind==="full"?s.jsx(Ae,{variant:"warning",size:"sm",children:t("settings.apiKeys.accessFull")}):s.jsx(Ae,{variant:"muted",size:"sm",children:t("settings.apiKeys.toolCount",{count:a.count})});let y;e[3]!==c||e[4]!==t?(y=c&&s.jsx(Ae,{variant:"destructive",size:"sm",children:t("settings.apiKeys.expired")}),e[3]=c,e[4]=t,e[5]=y):y=e[5];let g;e[6]!==f||e[7]!==j||e[8]!==y?(g=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f,j,y]}),e[6]=f,e[7]=j,e[8]=y,e[9]=g):g=e[9];const S="text-xs text-muted-foreground mt-0.5";let K;e[10]!==l.createdAt||e[11]!==t?(K=t("settings.apiKeys.createdAt",{date:new Date(l.createdAt).toLocaleDateString()}),e[10]=l.createdAt,e[11]=t,e[12]=K):K=e[12];const h=" · ",v=l.expiresAt?c?t("settings.apiKeys.expiredOn",{date:r}):t("settings.apiKeys.expiresOn",{date:r}):t("settings.apiKeys.neverExpires");let b;e[13]!==K||e[14]!==v?(b=s.jsxs("p",{className:S,children:[K,h,v]}),e[13]=K,e[14]=v,e[15]=b):b=e[15];let C;e[16]!==b||e[17]!==g?(C=s.jsxs("div",{className:u,children:[g,b]}),e[16]=b,e[17]=g,e[18]=C):C=e[18];let N;e[19]!==C||e[20]!==x?(N=s.jsxs("div",{className:p,children:[x,C]}),e[19]=C,e[20]=x,e[21]=N):N=e[21];let _;e[22]!==t?(_=t("settings.apiKeys.deleteKey"),e[22]=t,e[23]=_):_=e[23];let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ht,{size:14}),e[24]=w):w=e[24];let D;e[25]!==i||e[26]!==_?(D=s.jsx(H,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:i,"aria-label":_,children:w}),e[25]=i,e[26]=_,e[27]=D):D=e[27];let k;return e[28]!==N||e[29]!==D?(k=s.jsxs("li",{className:d,children:[N,D]}),e[28]=N,e[29]=D,e[30]=k):k=e[30],k}function Wt(){return Date.now()}function Jt(o){const e=L.c(15),{onCreate:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Ye,{}),e[0]=t):t=e[0];let a;e[1]!==i?(a=i("settings.apiKeys.emptyTitle"),e[1]=i,e[2]=a):a=e[2];let n;e[3]!==i?(n=i("settings.apiKeys.emptyDescription"),e[3]=i,e[4]=n):n=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ue,{size:14}),e[5]=m):m=e[5];let c;e[6]!==i?(c=i("settings.apiKeys.newKey"),e[6]=i,e[7]=c):c=e[7];let r;e[8]!==l||e[9]!==c?(r=s.jsxs(H,{onClick:l,size:"sm",children:[m,c]}),e[8]=l,e[9]=c,e[10]=r):r=e[10];let d;return e[11]!==a||e[12]!==n||e[13]!==r?(d=s.jsx(xt,{children:s.jsx(jt,{size:"inline",icon:t,title:a,description:n,children:r})}),e[11]=a,e[12]=n,e[13]=r,e[14]=d):d=e[14],d}function Xt(o){const e=L.c(40),{createdKey:l,onClose:i}=o,t=G(),a=l!==null;let n;e[0]!==i?(n=C=>!C&&i(),e[0]=i,e[1]=n):n=e[1];let m;e[2]!==t?(m=t("settings.apiKeys.createdTitle"),e[2]=t,e[3]=m):m=e[3];let c;e[4]!==m?(c=s.jsx(Be,{children:m}),e[4]=m,e[5]=c):c=e[5];let r;e[6]!==t?(r=t("settings.apiKeys.createdDescription"),e[6]=t,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx(Ge,{children:r}),e[8]=r,e[9]=d):d=e[9];let p;e[10]!==c||e[11]!==d?(p=s.jsxs(qe,{children:[c,d]}),e[10]=c,e[11]=d,e[12]=p):p=e[12];const x=l?.key??"";let u;e[13]!==x?(u=s.jsx(Me,{readOnly:!0,value:x,className:"font-mono text-xs"}),e[13]=x,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==t?(f=()=>{l&&(navigator.clipboard?.writeText(l.key),ke.success(t("settings.apiKeys.copied")))},e[15]=l,e[16]=t,e[17]=f):f=e[17];let j;e[18]!==t?(j=t("settings.apiKeys.copyKey"),e[18]=t,e[19]=j):j=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(yt,{size:14}),e[20]=y):y=e[20];let g;e[21]!==f||e[22]!==j?(g=s.jsx(H,{type:"button",variant:"outline",size:"icon",onClick:f,"aria-label":j,children:y}),e[21]=f,e[22]=j,e[23]=g):g=e[23];let S;e[24]!==g||e[25]!==u?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[u,g]}),e[24]=g,e[25]=u,e[26]=S):S=e[26];let K;e[27]!==t?(K=t("settings.apiKeys.done"),e[27]=t,e[28]=K):K=e[28];let h;e[29]!==i||e[30]!==K?(h=s.jsx(He,{children:s.jsx(H,{onClick:i,children:K})}),e[29]=i,e[30]=K,e[31]=h):h=e[31];let v;e[32]!==S||e[33]!==h||e[34]!==p?(v=s.jsxs(Qe,{className:"sm:max-w-lg",children:[p,S,h]}),e[32]=S,e[33]=h,e[34]=p,e[35]=v):v=e[35];let b;return e[36]!==a||e[37]!==v||e[38]!==n?(b=s.jsx(Ve,{open:a,onOpenChange:n,children:v}),e[36]=a,e[37]=v,e[38]=n,e[39]=b):b=e[39],b}function Zt(o){const e=L.c(131),{onClose:l,onCreated:i}=o,t=G(),{org:a}=ze();let n;e[0]!==a.id||e[1]!==a.slug?(n={connectionId:Fe,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=n):n=e[2];const m=We(n);let c;e[3]!==m?(c={client:m},e[3]=m,e[4]=c):c=e[4];const r=Dt(c),d=[...r.data?.tools??[]].sort(ts),p=Ft(d),[x,u]=P.useState(""),[f,j]=P.useState("read-only"),[y,g]=P.useState(null),[S,K]=P.useState("90"),h=Pt(),v=y??{[Ne]:p},b=f!=="full",C=!b||r.isSuccess,N=f==="full"||(f==="read-only"?p.length:Je(v))>0;let _;e[5]!==h.isPending||e[6]!==N||e[7]!==x||e[8]!==C?(_=!!x.trim()&&C&&N&&!h.isPending,e[5]=h.isPending,e[6]=N,e[7]=x,e[8]=C,e[9]=_):_=e[9];const w=_,D=async function(q){if(q.preventDefault(),!!w)try{const M=await h.mutateAsync({name:x.trim(),permissions:Bt(f,p,v),expiresIn:Gt(S)});l(),i(M)}catch(M){const Pe=M;ke.error(Pe instanceof Error?Pe.message:t("settings.apiKeys.failedToCreateKey"))}},k="read-only";let T;e[10]!==t?(T=t("settings.apiKeys.accessReadOnly"),e[10]=t,e[11]=T):T=e[11];const R=t("settings.apiKeys.accessReadOnlyDescription",{count:p.length});let F;e[12]!==T||e[13]!==R?(F={value:k,label:T,description:R},e[12]=T,e[13]=R,e[14]=F):F=e[14];let O;e[15]!==t?(O=t("settings.apiKeys.accessCustom"),e[15]=t,e[16]=O):O=e[16];let E;e[17]!==t?(E=t("settings.apiKeys.accessCustomDescription"),e[17]=t,e[18]=E):E=e[18];let I;e[19]!==E||e[20]!==O?(I={value:"custom",label:O,description:E},e[19]=E,e[20]=O,e[21]=I):I=e[21];let z;e[22]!==t?(z=t("settings.apiKeys.accessFull"),e[22]=t,e[23]=z):z=e[23];let $;e[24]!==t?($=t("settings.apiKeys.accessFullDescription"),e[24]=t,e[25]=$):$=e[25];let A;e[26]!==z||e[27]!==$?(A={value:"full",label:z,description:$},e[26]=z,e[27]=$,e[28]=A):A=e[28];let Q;e[29]!==I||e[30]!==A||e[31]!==F?(Q=[F,I,A],e[29]=I,e[30]=A,e[31]=F,e[32]=Q):Q=e[32];const V=Q;let Y;e[33]!==t?(Y=t("settings.apiKeys.expiryDays",{days:7}),e[33]=t,e[34]=Y):Y=e[34];let U;e[35]!==t?(U=t("settings.apiKeys.expiryDays",{days:30}),e[35]=t,e[36]=U):U=e[36];let W;e[37]!==t?(W=t("settings.apiKeys.expiryDays",{days:90}),e[37]=t,e[38]=W):W=e[38];let J;e[39]!==t?(J=t("settings.apiKeys.expiryYear"),e[39]=t,e[40]=J):J=e[40];let X;e[41]!==t?(X=t("settings.apiKeys.expiryNever"),e[41]=t,e[42]=X):X=e[42];let _e;e[43]!==Y||e[44]!==U||e[45]!==W||e[46]!==J||e[47]!==X?(_e={7:Y,30:U,90:W,365:J,never:X},e[43]=Y,e[44]=U,e[45]=W,e[46]=J,e[47]=X,e[48]=_e):_e=e[48];const Te=_e;let Z;e[49]!==t?(Z=t("settings.apiKeys.nameLabel"),e[49]=t,e[50]=Z):Z=e[50];let ee;e[51]!==Z?(ee=s.jsx(Ee,{htmlFor:"api-key-name",children:Z}),e[51]=Z,e[52]=ee):ee=e[52];let te;e[53]!==u?(te=B=>u(B.target.value),e[53]=u,e[54]=te):te=e[54];let se;e[55]!==t?(se=t("settings.apiKeys.namePlaceholder"),e[55]=t,e[56]=se):se=e[56];let ie;e[57]!==x||e[58]!==te||e[59]!==se?(ie=s.jsx(Me,{id:"api-key-name",value:x,onChange:te,placeholder:se,autoComplete:"off",required:!0}),e[57]=x,e[58]=te,e[59]=se,e[60]=ie):ie=e[60];let le;e[61]!==ee||e[62]!==ie?(le=s.jsxs("div",{className:"space-y-1.5",children:[ee,ie]}),e[61]=ee,e[62]=ie,e[63]=le):le=e[63];let ne;e[64]!==t?(ne=t("settings.apiKeys.accessLabel"),e[64]=t,e[65]=ne):ne=e[65];let ae;e[66]!==ne?(ae=s.jsx(Ee,{children:ne}),e[66]=ne,e[67]=ae):ae=e[67];let oe;e[68]!==V||e[69]!==j?(oe=B=>{const q=V.find(M=>M.value===B);q&&j(q.value)},e[68]=V,e[69]=j,e[70]=oe):oe=e[70];let re;e[71]!==V?(re=V.map(es),e[71]=V,e[72]=re):re=e[72];let ce;e[73]!==f||e[74]!==oe||e[75]!==re?(ce=s.jsx(Lt,{value:f,onValueChange:oe,className:"gap-2",children:re}),e[73]=f,e[74]=oe,e[75]=re,e[76]=ce):ce=e[76];let de;e[77]!==ae||e[78]!==ce?(de=s.jsxs("div",{className:"space-y-1.5",children:[ae,ce]}),e[77]=ae,e[78]=ce,e[79]=de):de=e[79];let ue;e[80]!==b||e[81]!==t||e[82]!==r.isError?(ue=b&&r.isError&&s.jsx("p",{className:"text-xs text-destructive",children:t("settings.apiKeys.toolsLoadFailed")}),e[80]=b,e[81]=t,e[82]=r.isError,e[83]=ue):ue=e[83];let fe;e[84]!==f||e[85]!==v||e[86]!==g||e[87]!==d||e[88]!==r.isSuccess?(fe=f==="custom"&&r.isSuccess&&s.jsx(Yt,{studioTools:d,toolSet:v,onChange:g}),e[84]=f,e[85]=v,e[86]=g,e[87]=d,e[88]=r.isSuccess,e[89]=fe):fe=e[89];let me;e[90]!==t?(me=t("settings.apiKeys.expiryLabel"),e[90]=t,e[91]=me):me=e[91];let pe;e[92]!==me?(pe=s.jsx(Ee,{htmlFor:"api-key-expiry",children:me}),e[92]=me,e[93]=pe):pe=e[93];let xe;e[94]!==K?(xe=B=>{const q=$e.find(M=>M===B);q&&K(q)},e[94]=K,e[95]=xe):xe=e[95];let De;e[96]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx(Ct,{id:"api-key-expiry",className:"w-full",children:s.jsx(St,{})}),e[96]=De):De=e[96];let ge;e[97]!==Te?(ge=$e.map(B=>s.jsx(vt,{value:B,children:Te[B]},B)),e[97]=Te,e[98]=ge):ge=e[98];let ye;e[99]!==ge?(ye=s.jsx(Nt,{children:ge}),e[99]=ge,e[100]=ye):ye=e[100];let he;e[101]!==S||e[102]!==xe||e[103]!==ye?(he=s.jsxs(_t,{value:S,onValueChange:xe,children:[De,ye]}),e[101]=S,e[102]=xe,e[103]=ye,e[104]=he):he=e[104];let je;e[105]!==pe||e[106]!==he?(je=s.jsxs("div",{className:"space-y-1.5",children:[pe,he]}),e[105]=pe,e[106]=he,e[107]=je):je=e[107];const et=h.isPending;let Ke;e[108]!==t?(Ke=t("settings.apiKeys.cancelButton"),e[108]=t,e[109]=Ke):Ke=e[109];let be;e[110]!==h.isPending||e[111]!==l||e[112]!==Ke?(be=s.jsx(H,{type:"button",variant:"outline",onClick:l,disabled:et,children:Ke}),e[110]=h.isPending,e[111]=l,e[112]=Ke,e[113]=be):be=e[113];const Oe=!w;let ve;e[114]!==h.isPending||e[115]!==t?(ve=h.isPending?t("settings.apiKeys.creatingButton"):t("settings.apiKeys.createButton"),e[114]=h.isPending,e[115]=t,e[116]=ve):ve=e[116];let Ce;e[117]!==Oe||e[118]!==ve?(Ce=s.jsx(H,{type:"submit",disabled:Oe,children:ve}),e[117]=Oe,e[118]=ve,e[119]=Ce):Ce=e[119];let Se;e[120]!==be||e[121]!==Ce?(Se=s.jsxs(He,{children:[be,Ce]}),e[120]=be,e[121]=Ce,e[122]=Se):Se=e[122];let we;return e[123]!==D||e[124]!==le||e[125]!==de||e[126]!==ue||e[127]!==fe||e[128]!==je||e[129]!==Se?(we=s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[le,de,ue,fe,je,Se]}),e[123]=D,e[124]=le,e[125]=de,e[126]=ue,e[127]=fe,e[128]=je,e[129]=Se,e[130]=we):we=e[130],we}function es(o){return s.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-md border border-border px-3 py-2.5 hover:bg-accent has-[[data-state=checked]]:border-primary",children:[s.jsx($t,{value:o.value,className:"mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-medium",children:o.label}),s.jsx("span",{className:Ie("block text-xs",o.value==="full"?"text-warning":"text-muted-foreground"),children:o.description})]})]},o.value)}function ts(o,e){return o.name.localeCompare(e.name)}function ss(o){const e=L.c(23),{open:l,onOpenChange:i,onCreated:t}=o,a=G();let n;e[0]!==a?(n=a("settings.apiKeys.newKeyTitle"),e[0]=a,e[1]=n):n=e[1];let m;e[2]!==n?(m=s.jsx(Be,{children:n}),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==a?(c=a("settings.apiKeys.newKeyDescription"),e[4]=a,e[5]=c):c=e[5];let r;e[6]!==c?(r=s.jsx(Ge,{children:c}),e[6]=c,e[7]=r):r=e[7];let d;e[8]!==m||e[9]!==r?(d=s.jsxs(qe,{children:[m,r]}),e[8]=m,e[9]=r,e[10]=d):d=e[10];let p;e[11]!==i?(p=()=>i(!1),e[11]=i,e[12]=p):p=e[12];let x;e[13]!==t||e[14]!==p?(x=s.jsx(Zt,{onClose:p,onCreated:t}),e[13]=t,e[14]=p,e[15]=x):x=e[15];let u;e[16]!==d||e[17]!==x?(u=s.jsxs(Qe,{className:"sm:max-w-xl",children:[d,x]}),e[16]=d,e[17]=x,e[18]=u):u=e[18];let f;return e[19]!==i||e[20]!==l||e[21]!==u?(f=s.jsx(Ve,{open:l,onOpenChange:i,children:u}),e[19]=i,e[20]=l,e[21]=u,e[22]=f):f=e[22],f}function is(){const o=G(),{data:e,isLoading:l,error:i}=It(),t=zt(),[a,n]=P.useState(!1),[m,c]=P.useState(null),[r,d]=P.useState(null),p=e??[];async function x(){if(r)try{await t.mutateAsync(r.id),ke.success(o("settings.apiKeys.keyDeleted",{name:r.name}))}catch(u){ke.error(u instanceof Error?u.message:o("settings.apiKeys.failedToDeleteKey"))}finally{d(null)}}return s.jsxs(at,{title:o("settings.apiKeys.sectionTitle"),description:o("settings.apiKeys.sectionDescription"),actions:p.length>0?s.jsxs(H,{onClick:()=>n(!0),size:"sm",children:[s.jsx(Ue,{size:14}),o("settings.apiKeys.newKey")]}):void 0,children:[l?s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:o("settings.apiKeys.loading")})}):i&&p.length===0?s.jsx(Ze,{error:i}):p.length===0?s.jsx(Jt,{onCreate:()=>n(!0)}):s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("ul",{className:"divide-y divide-border",children:p.map(u=>s.jsx(Ut,{apiKey:u,onDelete:()=>d(u)},u.id))})}),s.jsx(ss,{open:a,onOpenChange:n,onCreated:c}),s.jsx(Xt,{createdKey:m,onClose:()=>c(null)}),s.jsx(ot,{open:r!==null,onOpenChange:u=>{u||d(null)},children:s.jsxs(rt,{children:[s.jsxs(ct,{children:[s.jsx(dt,{children:o("settings.apiKeys.deleteTitle",{name:r?.name??""})}),s.jsx(ut,{children:o("settings.apiKeys.deleteDescription")})]}),s.jsxs(ft,{children:[s.jsx(mt,{children:o("settings.apiKeys.cancelButton")}),s.jsx(pt,{onClick:x,children:o("settings.apiKeys.deleteKey")})]})]})})]})}function Ns(){const o=L.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{group:"connect",errorFallback:ls,children:s.jsx(is,{})}),o[0]=e):e=o[0],e}function ls(o){const{error:e}=o;return s.jsx(Ze,{error:e??new Error("Failed to load API keys")})}export{is as A,Ns as O};
1
+ import{c as L,m as Ie,j as s,b as G,r as P,h as Re,a4 as ze,W as tt,as as st,T as Fe,dO as it,i as lt,i2 as nt,gT as at,gE as Le,aN as ot,aM as rt,aJ as ct,aH as dt,aI as ut,aL as ft,aK as mt,b7 as pt,B as H,t as ke,gf as xt,x as Be,aS as Ge,w as qe,I as Me,y as He,v as Qe,D as Ve}from"./index-BsAwgxIf.js";import{i as gt}from"./AlertCircle-DA6gE5vw.js";import{e as yt}from"./agent-icon-B9nZhdi2.js";import{i as Ye}from"./Key01-CgRwsDr3.js";import{s as Ue}from"./Plus-BzpqhVU8.js";import{s as ht}from"./Trash01-aSl--BGd.js";import{E as jt}from"./empty-state-D--R_kh-.js";import{L as Ee}from"./label-D8u4gNcM.js";import{B as Ae}from"./badge-BUkSpOXa.js";import{I as Kt,R as bt}from"./index-Oc-4w-Ob.js";import{c as vt,b as Ct,a as St,d as Nt,S as _t}from"./select-DPXDtN3F.js";import{u as We}from"./use-mcp-client-DXpTlXlJ.js";import{u as Dt}from"./use-mcp-tools-B0m5-RR6.js";import{t as wt}from"./ChevronDown-uPv2ScPr.js";import{C as At}from"./checkbox-BwlyfOui.js";import{S as kt}from"./search-input-D6gGXIf1.js";import{I as Tt}from"./integration-icon-DbiCbrD7.js";import{T as Ot}from"./tool-set-selector-BE0R1AUj.js";import{b as Et}from"./use-connection-DpuSfyHb.js";import{u as It,b as zt,a as Pt}from"./use-api-keys-lPXg3MPh.js";function Lt(o){const e=L.c(8);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("grid gap-3",l),e[3]=l,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=s.jsx(bt,{"data-slot":"radio-group",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}function $t(o){const e=L.c(9);let l,i;e[0]!==o?({className:l,...i}=o,e[0]=o,e[1]=l,e[2]=i):(l=e[1],i=e[2]);let t;e[3]!==l?(t=Ie("group relative inline-flex size-4 shrink-0 items-center justify-center rounded-full shadow-[inset_0_0_0_1.5px_var(--input)] transition-[background-color,box-shadow] duration-150 hover:shadow-[inset_0_0_0_1.5px_color-mix(in_oklch,var(--foreground)_30%,var(--input))] data-[state=checked]:bg-primary data-[state=checked]:shadow-[inset_0_0_0_1.5px_var(--primary)] aria-invalid:shadow-[inset_0_0_0_1.5px_var(--destructive)] focus-ring disabled:opacity-50 motion-reduce:transition-none",l),e[3]=l,e[4]=t):t=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"bg-primary-foreground size-1.5 scale-0 rounded-full transition-transform duration-200 ease-[cubic-bezier(0.34,1.56,0.64,1)] group-data-[state=checked]:scale-100 motion-reduce:transition-none"}),e[5]=a):a=e[5];let n;return e[6]!==i||e[7]!==t?(n=s.jsx(Kt,{"data-slot":"radio-group-item",className:t,...i,children:a}),e[6]=i,e[7]=t,e[8]=n):n=e[8],n}const $e=["7","30","90","365","never"],Rt=86400;function Ft(o){return o.filter(e=>e.annotations?.readOnlyHint===!0).map(e=>e.name)}const Ne="self";function Bt(o,e,l){return o==="full"?{"*":["*"]}:o==="read-only"?{[Ne]:e}:Object.fromEntries(Object.entries(l).filter(([,i])=>i.length>0))}function Je(o){return Object.values(o).reduce((e,l)=>e+l.length,0)}function Gt(o){return o==="never"?void 0:Number(o)*Rt}function qt(o){const e=i=>{const t=o[i];return Array.isArray(t)?t:[]};if(e("*").includes("*")||e("self").includes("*"))return{kind:"full"};const l=new Set;for(const i of Object.keys(o))for(const t of e(i))t.startsWith("!")||l.add(`${i}:${t}`);return{kind:"tools",count:l.size}}function Mt(o,e){return o.name.toLowerCase().includes(e)||(o.description?.toLowerCase().includes(e)??!1)}function Xe(o){const e=L.c(56),{resource:l,title:i,icon:t,tools:a,selected:n,onChange:m,query:c,onExpand:r}=o,d=G(),[p,x]=P.useState(!1);let u;e[0]!==c||e[1]!==i?(u=!c||i.toLowerCase().includes(c),e[0]=c,e[1]=i,e[2]=u):u=e[2];const f=u;let j;e[3]!==c||e[4]!==f||e[5]!==a?(j=a===null?null:f?a:a.filter(A=>Mt(A,c)),e[3]=c,e[4]=f,e[5]=a,e[6]=j):j=e[6];const y=j,g=p||!!c&&(y?.length??0)>0,S=!f&&!y?.length;let K;e[7]!==n?(K=new Set(n),e[7]=n,e[8]=K):K=e[8];const h=K,v=a!==null&&a.length>0&&n.length>=a.length;let b;e[9]!==r||e[10]!==p?(b=()=>{p||r?.(),x(!p)},e[9]=r,e[10]=p,e[11]=b):b=e[11];const C=b;let N;e[12]!==m||e[13]!==r||e[14]!==n.length||e[15]!==a?(N=()=>{if(n.length>0){m([]);return}if(a===null){r?.(),x(!0);return}m(a.map(Ht))},e[12]=m,e[13]=r,e[14]=n.length,e[15]=a,e[16]=N):N=e[16];const _=N;if(S)return null;let w;e[17]!==g?(w=g?s.jsx(wt,{size:16,className:"shrink-0 text-muted-foreground"}):s.jsx(st,{size:16,className:"shrink-0 text-muted-foreground"}),e[17]=g,e[18]=w):w=e[18];let D;e[19]!==t||e[20]!==i?(D=s.jsx(Tt,{icon:t,name:i,size:"xs"}),e[19]=t,e[20]=i,e[21]=D):D=e[21];let k;e[22]!==i?(k=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:i}),e[22]=i,e[23]=k):k=e[23];let T;e[24]!==n.length||e[25]!==d||e[26]!==a?(T=(a!==null||n.length>0)&&s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:a===null?n.length:d("settings.apiKeys.toolsGroupCount",{count:n.length,total:a.length})}),e[24]=n.length,e[25]=d,e[26]=a,e[27]=T):T=e[27];let R;e[28]!==g||e[29]!==w||e[30]!==D||e[31]!==k||e[32]!==T||e[33]!==C?(R=s.jsxs("button",{type:"button",onClick:C,"aria-expanded":g,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-3 py-2.5 pl-3 text-left",children:[w,D,k,T]}),e[28]=g,e[29]=w,e[30]=D,e[31]=k,e[32]=T,e[33]=C,e[34]=R):R=e[34];const F=v?!0:n.length>0?"indeterminate":!1;let O;e[35]!==d||e[36]!==i?(O=d("settings.apiKeys.toolsSelectGroup",{name:i}),e[35]=d,e[36]=i,e[37]=O):O=e[37];let E;e[38]!==F||e[39]!==O||e[40]!==_?(E=s.jsx(At,{checked:F,onCheckedChange:_,"aria-label":O}),e[38]=F,e[39]=O,e[40]=_,e[41]=E):E=e[41];let I;e[42]!==R||e[43]!==E?(I=s.jsxs("div",{className:"flex items-center gap-3 pr-4 hover:bg-accent",children:[R,E]}),e[42]=R,e[43]=E,e[44]=I):I=e[44];let z;e[45]!==g||e[46]!==m||e[47]!==l||e[48]!==n||e[49]!==h||e[50]!==d||e[51]!==y?(z=g&&s.jsx("div",{className:"space-y-1 border-t border-border p-1",children:y===null?s.jsx("div",{className:"flex justify-center py-4",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}):y.length===0?s.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:d("settings.apiKeys.toolsNone")}):y.map(A=>s.jsx(Ot,{connectionId:l,tool:A,isSelected:h.has(A.name),onToggle:()=>m(h.has(A.name)?n.filter(Q=>Q!==A.name):[...n,A.name]),badge:A.annotations?.readOnlyHint===!0&&s.jsx(Ae,{variant:"muted",size:"sm",children:d("settings.apiKeys.readOnlyBadge")})},A.name))}),e[45]=g,e[46]=m,e[47]=l,e[48]=n,e[49]=h,e[50]=d,e[51]=y,e[52]=z):z=e[52];let $;return e[53]!==I||e[54]!==z?($=s.jsxs("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:[I,z]}),e[53]=I,e[54]=z,e[55]=$):$=e[55],$}function Ht(o){return o.name}function Qt(o){const e=L.c(21),{connection:l,selected:i,onChange:t,query:a}=o,{org:n}=ze();let m;e[0]!==n.id||e[1]!==n.slug?(m={connectionId:Fe,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=m):m=e[2];const c=We(m),[r,d]=P.useState(!1);let p;e[3]!==c||e[4]!==l.id||e[5]!==n.id?(p=it(n.id,"CONNECTIONS",l.id,c),e[3]=c,e[4]=l.id,e[5]=n.id,e[6]=p):p=e[6];let x;e[7]!==r||e[8]!==p?(x={...p,enabled:r},e[7]=r,e[8]=p,e[9]=x):x=e[9];const{data:u}=lt(x);let f;e[10]!==u?(f=u?u.item?.tools??[]:null,e[10]=u,e[11]=f):f=e[11];const j=f;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=()=>d(!0),e[12]=y):y=e[12];let g;return e[13]!==l.icon||e[14]!==l.id||e[15]!==l.title||e[16]!==t||e[17]!==a||e[18]!==i||e[19]!==j?(g=s.jsx(Xe,{resource:l.id,title:l.title,icon:l.icon,tools:j,selected:i,onChange:t,query:a,onExpand:y}),e[13]=l.icon,e[14]=l.id,e[15]=l.title,e[16]=t,e[17]=a,e[18]=i,e[19]=j,e[20]=g):g=e[20],g}function Vt(o){const e=L.c(14),{toolSet:l,onChange:i,query:t}=o,{org:a}=ze();let n;e[0]!==a.id?(n=tt.SELF(a.id),e[0]=a.id,e[1]=n):n=e[1];const m=n,c=Et();let r;if(e[2]!==i||e[3]!==t||e[4]!==m||e[5]!==c||e[6]!==l){let d;e[8]!==m?(d=u=>u.id!==m,e[8]=m,e[9]=d):d=e[9];const p=c.filter(d);let x;e[10]!==i||e[11]!==t||e[12]!==l?(x=u=>s.jsx(Qt,{connection:u,selected:l[u.id]??[],onChange:f=>i(u.id,f),query:t},u.id),e[10]=i,e[11]=t,e[12]=l,e[13]=x):x=e[13],r=p.map(x),e[2]=i,e[3]=t,e[4]=m,e[5]=c,e[6]=l,e[7]=r}else r=e[7];return r}function Yt(o){const e=L.c(41),{studioTools:l,toolSet:i,onChange:t}=o,a=G(),[n,m]=P.useState("");let c;e[0]!==n?(c=n.trim().toLowerCase(),e[0]=n,e[1]=c):c=e[1];const r=P.useDeferredValue(c);let d;e[2]!==t||e[3]!==i?(d=(_,w)=>t({...i,[_]:w}),e[2]=t,e[3]=i,e[4]=d):d=e[4];const p=d;let x;e[5]!==a?(x=a("settings.apiKeys.toolsSearch"),e[5]=a,e[6]=x):x=e[6];let u;e[7]!==n||e[8]!==x?(u=s.jsx(kt,{value:n,onChange:m,placeholder:x,className:"flex-1"}),e[7]=n,e[8]=x,e[9]=u):u=e[9];let f;e[10]!==a||e[11]!==i?(f=a("settings.apiKeys.toolsSelected",{count:Je(i)}),e[10]=a,e[11]=i,e[12]=f):f=e[12];let j;e[13]!==f?(j=s.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:f}),e[13]=f,e[14]=j):j=e[14];let y;e[15]!==u||e[16]!==j?(y=s.jsxs("div",{className:"flex items-center gap-3",children:[u,j]}),e[15]=u,e[16]=j,e[17]=y):y=e[17];let g;e[18]!==a?(g=a("settings.apiKeys.studioTools"),e[18]=a,e[19]=g):g=e[19];let S;e[20]!==i?(S=i[Ne]??[],e[20]=i,e[21]=S):S=e[21];let K;e[22]!==p?(K=_=>p(Ne,_),e[22]=p,e[23]=K):K=e[23];let h;e[24]!==r||e[25]!==l||e[26]!==K||e[27]!==g||e[28]!==S?(h=s.jsx(Xe,{resource:Ne,title:g,icon:"/favicon.svg",tools:l,selected:S,onChange:K,query:r}),e[24]=r,e[25]=l,e[26]=K,e[27]=g,e[28]=S,e[29]=h):h=e[29];let v;e[30]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Re,{className:"size-4 text-muted-foreground"})}),e[30]=v):v=e[30];let b;e[31]!==r||e[32]!==p||e[33]!==i?(b=s.jsx(P.Suspense,{fallback:v,children:s.jsx(Vt,{toolSet:i,onChange:p,query:r})}),e[31]=r,e[32]=p,e[33]=i,e[34]=b):b=e[34];let C;e[35]!==h||e[36]!==b?(C=s.jsxs("div",{className:"max-h-80 space-y-2 overflow-y-auto",children:[h,b]}),e[35]=h,e[36]=b,e[37]=C):C=e[37];let N;return e[38]!==C||e[39]!==y?(N=s.jsxs("div",{className:"space-y-2",children:[y,C]}),e[38]=C,e[39]=y,e[40]=N):N=e[40],N}function Ze(o){const e=L.c(6),{error:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(gt,{size:16}),e[0]=t):t=e[0];let a;e[1]!==l.message||e[2]!==i?(a=i("settings.apiKeys.failedToLoadError",{error:l.message}),e[1]=l.message,e[2]=i,e[3]=a):a=e[3];let n;return e[4]!==a?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[t,s.jsx("span",{className:"text-sm font-medium",children:a})]}),e[4]=a,e[5]=n):n=e[5],n}function Ut(o){const e=L.c(31),{apiKey:l,onDelete:i}=o,t=G(),a=qt(l.permissions),n=l.expiresAt?new Date(l.expiresAt):null,[m]=P.useState(Wt),c=n!==null&&n.getTime()<=m,r=n?.toLocaleDateString()??"",d="flex items-center justify-between gap-4 px-4 py-3",p="flex items-center gap-3 min-w-0";let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(Ye,{size:16,className:"text-muted-foreground"})}),e[0]=x):x=e[0];const u="min-w-0";let f;e[1]!==l.name?(f=s.jsx("span",{className:"font-medium text-sm truncate",children:l.name}),e[1]=l.name,e[2]=f):f=e[2];const j=a.kind==="full"?s.jsx(Ae,{variant:"warning",size:"sm",children:t("settings.apiKeys.accessFull")}):s.jsx(Ae,{variant:"muted",size:"sm",children:t("settings.apiKeys.toolCount",{count:a.count})});let y;e[3]!==c||e[4]!==t?(y=c&&s.jsx(Ae,{variant:"destructive",size:"sm",children:t("settings.apiKeys.expired")}),e[3]=c,e[4]=t,e[5]=y):y=e[5];let g;e[6]!==f||e[7]!==j||e[8]!==y?(g=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f,j,y]}),e[6]=f,e[7]=j,e[8]=y,e[9]=g):g=e[9];const S="text-xs text-muted-foreground mt-0.5";let K;e[10]!==l.createdAt||e[11]!==t?(K=t("settings.apiKeys.createdAt",{date:new Date(l.createdAt).toLocaleDateString()}),e[10]=l.createdAt,e[11]=t,e[12]=K):K=e[12];const h=" · ",v=l.expiresAt?c?t("settings.apiKeys.expiredOn",{date:r}):t("settings.apiKeys.expiresOn",{date:r}):t("settings.apiKeys.neverExpires");let b;e[13]!==K||e[14]!==v?(b=s.jsxs("p",{className:S,children:[K,h,v]}),e[13]=K,e[14]=v,e[15]=b):b=e[15];let C;e[16]!==b||e[17]!==g?(C=s.jsxs("div",{className:u,children:[g,b]}),e[16]=b,e[17]=g,e[18]=C):C=e[18];let N;e[19]!==C||e[20]!==x?(N=s.jsxs("div",{className:p,children:[x,C]}),e[19]=C,e[20]=x,e[21]=N):N=e[21];let _;e[22]!==t?(_=t("settings.apiKeys.deleteKey"),e[22]=t,e[23]=_):_=e[23];let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ht,{size:14}),e[24]=w):w=e[24];let D;e[25]!==i||e[26]!==_?(D=s.jsx(H,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:i,"aria-label":_,children:w}),e[25]=i,e[26]=_,e[27]=D):D=e[27];let k;return e[28]!==N||e[29]!==D?(k=s.jsxs("li",{className:d,children:[N,D]}),e[28]=N,e[29]=D,e[30]=k):k=e[30],k}function Wt(){return Date.now()}function Jt(o){const e=L.c(15),{onCreate:l}=o,i=G();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Ye,{}),e[0]=t):t=e[0];let a;e[1]!==i?(a=i("settings.apiKeys.emptyTitle"),e[1]=i,e[2]=a):a=e[2];let n;e[3]!==i?(n=i("settings.apiKeys.emptyDescription"),e[3]=i,e[4]=n):n=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ue,{size:14}),e[5]=m):m=e[5];let c;e[6]!==i?(c=i("settings.apiKeys.newKey"),e[6]=i,e[7]=c):c=e[7];let r;e[8]!==l||e[9]!==c?(r=s.jsxs(H,{onClick:l,size:"sm",children:[m,c]}),e[8]=l,e[9]=c,e[10]=r):r=e[10];let d;return e[11]!==a||e[12]!==n||e[13]!==r?(d=s.jsx(xt,{children:s.jsx(jt,{size:"inline",icon:t,title:a,description:n,children:r})}),e[11]=a,e[12]=n,e[13]=r,e[14]=d):d=e[14],d}function Xt(o){const e=L.c(40),{createdKey:l,onClose:i}=o,t=G(),a=l!==null;let n;e[0]!==i?(n=C=>!C&&i(),e[0]=i,e[1]=n):n=e[1];let m;e[2]!==t?(m=t("settings.apiKeys.createdTitle"),e[2]=t,e[3]=m):m=e[3];let c;e[4]!==m?(c=s.jsx(Be,{children:m}),e[4]=m,e[5]=c):c=e[5];let r;e[6]!==t?(r=t("settings.apiKeys.createdDescription"),e[6]=t,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx(Ge,{children:r}),e[8]=r,e[9]=d):d=e[9];let p;e[10]!==c||e[11]!==d?(p=s.jsxs(qe,{children:[c,d]}),e[10]=c,e[11]=d,e[12]=p):p=e[12];const x=l?.key??"";let u;e[13]!==x?(u=s.jsx(Me,{readOnly:!0,value:x,className:"font-mono text-xs"}),e[13]=x,e[14]=u):u=e[14];let f;e[15]!==l||e[16]!==t?(f=()=>{l&&(navigator.clipboard?.writeText(l.key),ke.success(t("settings.apiKeys.copied")))},e[15]=l,e[16]=t,e[17]=f):f=e[17];let j;e[18]!==t?(j=t("settings.apiKeys.copyKey"),e[18]=t,e[19]=j):j=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(yt,{size:14}),e[20]=y):y=e[20];let g;e[21]!==f||e[22]!==j?(g=s.jsx(H,{type:"button",variant:"outline",size:"icon",onClick:f,"aria-label":j,children:y}),e[21]=f,e[22]=j,e[23]=g):g=e[23];let S;e[24]!==g||e[25]!==u?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[u,g]}),e[24]=g,e[25]=u,e[26]=S):S=e[26];let K;e[27]!==t?(K=t("settings.apiKeys.done"),e[27]=t,e[28]=K):K=e[28];let h;e[29]!==i||e[30]!==K?(h=s.jsx(He,{children:s.jsx(H,{onClick:i,children:K})}),e[29]=i,e[30]=K,e[31]=h):h=e[31];let v;e[32]!==S||e[33]!==h||e[34]!==p?(v=s.jsxs(Qe,{className:"sm:max-w-lg",children:[p,S,h]}),e[32]=S,e[33]=h,e[34]=p,e[35]=v):v=e[35];let b;return e[36]!==a||e[37]!==v||e[38]!==n?(b=s.jsx(Ve,{open:a,onOpenChange:n,children:v}),e[36]=a,e[37]=v,e[38]=n,e[39]=b):b=e[39],b}function Zt(o){const e=L.c(131),{onClose:l,onCreated:i}=o,t=G(),{org:a}=ze();let n;e[0]!==a.id||e[1]!==a.slug?(n={connectionId:Fe,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=n):n=e[2];const m=We(n);let c;e[3]!==m?(c={client:m},e[3]=m,e[4]=c):c=e[4];const r=Dt(c),d=[...r.data?.tools??[]].sort(ts),p=Ft(d),[x,u]=P.useState(""),[f,j]=P.useState("read-only"),[y,g]=P.useState(null),[S,K]=P.useState("90"),h=Pt(),v=y??{[Ne]:p},b=f!=="full",C=!b||r.isSuccess,N=f==="full"||(f==="read-only"?p.length:Je(v))>0;let _;e[5]!==h.isPending||e[6]!==N||e[7]!==x||e[8]!==C?(_=!!x.trim()&&C&&N&&!h.isPending,e[5]=h.isPending,e[6]=N,e[7]=x,e[8]=C,e[9]=_):_=e[9];const w=_,D=async function(q){if(q.preventDefault(),!!w)try{const M=await h.mutateAsync({name:x.trim(),permissions:Bt(f,p,v),expiresIn:Gt(S)});l(),i(M)}catch(M){const Pe=M;ke.error(Pe instanceof Error?Pe.message:t("settings.apiKeys.failedToCreateKey"))}},k="read-only";let T;e[10]!==t?(T=t("settings.apiKeys.accessReadOnly"),e[10]=t,e[11]=T):T=e[11];const R=t("settings.apiKeys.accessReadOnlyDescription",{count:p.length});let F;e[12]!==T||e[13]!==R?(F={value:k,label:T,description:R},e[12]=T,e[13]=R,e[14]=F):F=e[14];let O;e[15]!==t?(O=t("settings.apiKeys.accessCustom"),e[15]=t,e[16]=O):O=e[16];let E;e[17]!==t?(E=t("settings.apiKeys.accessCustomDescription"),e[17]=t,e[18]=E):E=e[18];let I;e[19]!==E||e[20]!==O?(I={value:"custom",label:O,description:E},e[19]=E,e[20]=O,e[21]=I):I=e[21];let z;e[22]!==t?(z=t("settings.apiKeys.accessFull"),e[22]=t,e[23]=z):z=e[23];let $;e[24]!==t?($=t("settings.apiKeys.accessFullDescription"),e[24]=t,e[25]=$):$=e[25];let A;e[26]!==z||e[27]!==$?(A={value:"full",label:z,description:$},e[26]=z,e[27]=$,e[28]=A):A=e[28];let Q;e[29]!==I||e[30]!==A||e[31]!==F?(Q=[F,I,A],e[29]=I,e[30]=A,e[31]=F,e[32]=Q):Q=e[32];const V=Q;let Y;e[33]!==t?(Y=t("settings.apiKeys.expiryDays",{days:7}),e[33]=t,e[34]=Y):Y=e[34];let U;e[35]!==t?(U=t("settings.apiKeys.expiryDays",{days:30}),e[35]=t,e[36]=U):U=e[36];let W;e[37]!==t?(W=t("settings.apiKeys.expiryDays",{days:90}),e[37]=t,e[38]=W):W=e[38];let J;e[39]!==t?(J=t("settings.apiKeys.expiryYear"),e[39]=t,e[40]=J):J=e[40];let X;e[41]!==t?(X=t("settings.apiKeys.expiryNever"),e[41]=t,e[42]=X):X=e[42];let _e;e[43]!==Y||e[44]!==U||e[45]!==W||e[46]!==J||e[47]!==X?(_e={7:Y,30:U,90:W,365:J,never:X},e[43]=Y,e[44]=U,e[45]=W,e[46]=J,e[47]=X,e[48]=_e):_e=e[48];const Te=_e;let Z;e[49]!==t?(Z=t("settings.apiKeys.nameLabel"),e[49]=t,e[50]=Z):Z=e[50];let ee;e[51]!==Z?(ee=s.jsx(Ee,{htmlFor:"api-key-name",children:Z}),e[51]=Z,e[52]=ee):ee=e[52];let te;e[53]!==u?(te=B=>u(B.target.value),e[53]=u,e[54]=te):te=e[54];let se;e[55]!==t?(se=t("settings.apiKeys.namePlaceholder"),e[55]=t,e[56]=se):se=e[56];let ie;e[57]!==x||e[58]!==te||e[59]!==se?(ie=s.jsx(Me,{id:"api-key-name",value:x,onChange:te,placeholder:se,autoComplete:"off",required:!0}),e[57]=x,e[58]=te,e[59]=se,e[60]=ie):ie=e[60];let le;e[61]!==ee||e[62]!==ie?(le=s.jsxs("div",{className:"space-y-1.5",children:[ee,ie]}),e[61]=ee,e[62]=ie,e[63]=le):le=e[63];let ne;e[64]!==t?(ne=t("settings.apiKeys.accessLabel"),e[64]=t,e[65]=ne):ne=e[65];let ae;e[66]!==ne?(ae=s.jsx(Ee,{children:ne}),e[66]=ne,e[67]=ae):ae=e[67];let oe;e[68]!==V||e[69]!==j?(oe=B=>{const q=V.find(M=>M.value===B);q&&j(q.value)},e[68]=V,e[69]=j,e[70]=oe):oe=e[70];let re;e[71]!==V?(re=V.map(es),e[71]=V,e[72]=re):re=e[72];let ce;e[73]!==f||e[74]!==oe||e[75]!==re?(ce=s.jsx(Lt,{value:f,onValueChange:oe,className:"gap-2",children:re}),e[73]=f,e[74]=oe,e[75]=re,e[76]=ce):ce=e[76];let de;e[77]!==ae||e[78]!==ce?(de=s.jsxs("div",{className:"space-y-1.5",children:[ae,ce]}),e[77]=ae,e[78]=ce,e[79]=de):de=e[79];let ue;e[80]!==b||e[81]!==t||e[82]!==r.isError?(ue=b&&r.isError&&s.jsx("p",{className:"text-xs text-destructive",children:t("settings.apiKeys.toolsLoadFailed")}),e[80]=b,e[81]=t,e[82]=r.isError,e[83]=ue):ue=e[83];let fe;e[84]!==f||e[85]!==v||e[86]!==g||e[87]!==d||e[88]!==r.isSuccess?(fe=f==="custom"&&r.isSuccess&&s.jsx(Yt,{studioTools:d,toolSet:v,onChange:g}),e[84]=f,e[85]=v,e[86]=g,e[87]=d,e[88]=r.isSuccess,e[89]=fe):fe=e[89];let me;e[90]!==t?(me=t("settings.apiKeys.expiryLabel"),e[90]=t,e[91]=me):me=e[91];let pe;e[92]!==me?(pe=s.jsx(Ee,{htmlFor:"api-key-expiry",children:me}),e[92]=me,e[93]=pe):pe=e[93];let xe;e[94]!==K?(xe=B=>{const q=$e.find(M=>M===B);q&&K(q)},e[94]=K,e[95]=xe):xe=e[95];let De;e[96]===Symbol.for("react.memo_cache_sentinel")?(De=s.jsx(Ct,{id:"api-key-expiry",className:"w-full",children:s.jsx(St,{})}),e[96]=De):De=e[96];let ge;e[97]!==Te?(ge=$e.map(B=>s.jsx(vt,{value:B,children:Te[B]},B)),e[97]=Te,e[98]=ge):ge=e[98];let ye;e[99]!==ge?(ye=s.jsx(Nt,{children:ge}),e[99]=ge,e[100]=ye):ye=e[100];let he;e[101]!==S||e[102]!==xe||e[103]!==ye?(he=s.jsxs(_t,{value:S,onValueChange:xe,children:[De,ye]}),e[101]=S,e[102]=xe,e[103]=ye,e[104]=he):he=e[104];let je;e[105]!==pe||e[106]!==he?(je=s.jsxs("div",{className:"space-y-1.5",children:[pe,he]}),e[105]=pe,e[106]=he,e[107]=je):je=e[107];const et=h.isPending;let Ke;e[108]!==t?(Ke=t("settings.apiKeys.cancelButton"),e[108]=t,e[109]=Ke):Ke=e[109];let be;e[110]!==h.isPending||e[111]!==l||e[112]!==Ke?(be=s.jsx(H,{type:"button",variant:"outline",onClick:l,disabled:et,children:Ke}),e[110]=h.isPending,e[111]=l,e[112]=Ke,e[113]=be):be=e[113];const Oe=!w;let ve;e[114]!==h.isPending||e[115]!==t?(ve=h.isPending?t("settings.apiKeys.creatingButton"):t("settings.apiKeys.createButton"),e[114]=h.isPending,e[115]=t,e[116]=ve):ve=e[116];let Ce;e[117]!==Oe||e[118]!==ve?(Ce=s.jsx(H,{type:"submit",disabled:Oe,children:ve}),e[117]=Oe,e[118]=ve,e[119]=Ce):Ce=e[119];let Se;e[120]!==be||e[121]!==Ce?(Se=s.jsxs(He,{children:[be,Ce]}),e[120]=be,e[121]=Ce,e[122]=Se):Se=e[122];let we;return e[123]!==D||e[124]!==le||e[125]!==de||e[126]!==ue||e[127]!==fe||e[128]!==je||e[129]!==Se?(we=s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[le,de,ue,fe,je,Se]}),e[123]=D,e[124]=le,e[125]=de,e[126]=ue,e[127]=fe,e[128]=je,e[129]=Se,e[130]=we):we=e[130],we}function es(o){return s.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-md border border-border px-3 py-2.5 hover:bg-accent has-[[data-state=checked]]:border-primary",children:[s.jsx($t,{value:o.value,className:"mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-medium",children:o.label}),s.jsx("span",{className:Ie("block text-xs",o.value==="full"?"text-warning":"text-muted-foreground"),children:o.description})]})]},o.value)}function ts(o,e){return o.name.localeCompare(e.name)}function ss(o){const e=L.c(23),{open:l,onOpenChange:i,onCreated:t}=o,a=G();let n;e[0]!==a?(n=a("settings.apiKeys.newKeyTitle"),e[0]=a,e[1]=n):n=e[1];let m;e[2]!==n?(m=s.jsx(Be,{children:n}),e[2]=n,e[3]=m):m=e[3];let c;e[4]!==a?(c=a("settings.apiKeys.newKeyDescription"),e[4]=a,e[5]=c):c=e[5];let r;e[6]!==c?(r=s.jsx(Ge,{children:c}),e[6]=c,e[7]=r):r=e[7];let d;e[8]!==m||e[9]!==r?(d=s.jsxs(qe,{children:[m,r]}),e[8]=m,e[9]=r,e[10]=d):d=e[10];let p;e[11]!==i?(p=()=>i(!1),e[11]=i,e[12]=p):p=e[12];let x;e[13]!==t||e[14]!==p?(x=s.jsx(Zt,{onClose:p,onCreated:t}),e[13]=t,e[14]=p,e[15]=x):x=e[15];let u;e[16]!==d||e[17]!==x?(u=s.jsxs(Qe,{className:"sm:max-w-xl",children:[d,x]}),e[16]=d,e[17]=x,e[18]=u):u=e[18];let f;return e[19]!==i||e[20]!==l||e[21]!==u?(f=s.jsx(Ve,{open:l,onOpenChange:i,children:u}),e[19]=i,e[20]=l,e[21]=u,e[22]=f):f=e[22],f}function is(){const o=G(),{data:e,isLoading:l,error:i}=It(),t=zt(),[a,n]=P.useState(!1),[m,c]=P.useState(null),[r,d]=P.useState(null),p=e??[];async function x(){if(r)try{await t.mutateAsync(r.id),ke.success(o("settings.apiKeys.keyDeleted",{name:r.name}))}catch(u){ke.error(u instanceof Error?u.message:o("settings.apiKeys.failedToDeleteKey"))}finally{d(null)}}return s.jsxs(at,{title:o("settings.apiKeys.sectionTitle"),description:o("settings.apiKeys.sectionDescription"),actions:p.length>0?s.jsxs(H,{onClick:()=>n(!0),size:"sm",children:[s.jsx(Ue,{size:14}),o("settings.apiKeys.newKey")]}):void 0,children:[l?s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:o("settings.apiKeys.loading")})}):i&&p.length===0?s.jsx(Ze,{error:i}):p.length===0?s.jsx(Jt,{onCreate:()=>n(!0)}):s.jsx(Le,{className:"gap-0 overflow-hidden p-0",children:s.jsx("ul",{className:"divide-y divide-border",children:p.map(u=>s.jsx(Ut,{apiKey:u,onDelete:()=>d(u)},u.id))})}),s.jsx(ss,{open:a,onOpenChange:n,onCreated:c}),s.jsx(Xt,{createdKey:m,onClose:()=>c(null)}),s.jsx(ot,{open:r!==null,onOpenChange:u=>{u||d(null)},children:s.jsxs(rt,{children:[s.jsxs(ct,{children:[s.jsx(dt,{children:o("settings.apiKeys.deleteTitle",{name:r?.name??""})}),s.jsx(ut,{children:o("settings.apiKeys.deleteDescription")})]}),s.jsxs(ft,{children:[s.jsx(mt,{children:o("settings.apiKeys.cancelButton")}),s.jsx(pt,{onClick:x,children:o("settings.apiKeys.deleteKey")})]})]})})]})}function Ns(){const o=L.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{group:"connect",errorFallback:ls,children:s.jsx(is,{})}),o[0]=e):e=o[0],e}function ls(o){const{error:e}=o;return s.jsx(Ze,{error:e??new Error("Failed to load API keys")})}export{is as A,Ns as O};
@@ -1 +1 @@
1
- import{c as _t,j as m,b as Ft,r as K,as as It,m as Ot,h as Mt,t as St}from"./index-D0JbJFfP.js";import{u as Pt}from"./chat-context-CYn-8MTb.js";import{u as $t}from"./use-voice-input-BVDR_h76.js";import{S as Ut}from"./scroll-area-D27AfOYB.js";import{u as Vt,A as zt}from"./use-section-preview-base-DcN4R2fZ.js";import{y as Lt,l as qt,t as Ht}from"./blocks-tab-states-BTZOSl8o.js";import{H as Dt,c as Gt,a as Wt,b as Zt,S as Jt}from"./held-block-view--k2oql8p.js";import{b as Qt,u as Xt,k as Yt}from"./use-never-published-CS1sCoUt.js";import{n as te}from"./content-tab-BGkRbQco.js";import{S as ee}from"./save-status-DXZEEhy7.js";import"./use-panel-navigate-CAZIXqmL.js";import"./thread-route-yhTv7wYw.js";import"./use-project-scope-DA6OZsHG.js";import"./repository-binding-BkeJ2CtJ.js";import"./use-mcp-client-Cnv47oK4.js";import"./auth-B-QpuT1-.js";import"./use-view-draft-kind-2ZPvA4uU.js";import"./use-blog-view-DuP6av7s.js";import"./use-organization-settings-PllK3r0i.js";import"./schema-ClQSeEkW.js";import"./task-board-V6fHxbUs.js";import"./thread-intent-dNVrC8sL.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C4P_vqWF.js";import"./session-runtime-Af7XCW1y.js";import"./use-entitlements-hCyBXtuJ.js";import"./use-ai-providers-CA-khqag.js";import"./use-current-view-BOFMyET9.js";import"./use-in-settings-1MICTjP9.js";import"./use-decopilot-events-g19xYjLG.js";import"./popover-CHMhtCUs.js";import"./drawer-yBtPHk5P.js";import"./tooltip-bcUJYhL_.js";import"./index-Ccvx4l8u.js";import"./use-mobile-DXgcDHnH.js";import"./agent-icon-Cz4yRQtC.js";import"./AlertCircle-8ukcBvl4.js";import"./UserCheck01-CI1951yc.js";import"./Tool01-C3qOO4-2.js";import"./ArrowUp-K5jCRsZA.js";import"./ArrowLeft-D0b8Szk5.js";import"./ArrowRight-uaCgEM_Q.js";import"./BookOpen01-5XPZR6TG.js";import"./Globe04-jdIYuCcn.js";import"./CheckCircle-u2h4KcPu.js";import"./TrendUp01-DpUK5xLp.js";import"./ChevronDown-kKxnMd3L.js";import"./ChevronSelectorVertical-DKxNhUwA.js";import"./ChevronUp-DQNUTs5_.js";import"./UserSquare-BzGvxH2o.js";import"./LinkBroken01-DBUc-42w.js";import"./CreditCard01-DbaKJfT8.js";import"./File02-DAf1emIR.js";import"./MessageCircle01-D1JzchO_.js";import"./SwitchHorizontal01-B_WFRgSk.js";import"./Eye-_E24hwz9.js";import"./Image01-Cl7yRuHs.js";import"./Key01-DeYX7L_Z.js";import"./LayoutLeft-BQdYjjc6.js";import"./Minus-DBYcv290.js";import"./Monitor01-C_gVCCps.js";import"./Sun-CYLgqf2D.js";import"./Play-DWEq3LWP.js";import"./Plus-n5KTXyCz.js";import"./SearchMd-B9v3gV_V.js";import"./ShoppingBag01-C0IQtOHj.js";import"./Trash01-uKrzOq5g.js";import"./Upload01-B5by2C-2.js";import"./Users01-hxkP_BcE.js";import"./XClose-DGEX5GIv.js";import"./Zap-VLndYrUw.js";import"./index-A1s-ls4_.js";import"./checkbox-CWfz72Eg.js";import"./select-CHNsjY6K.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./site-editor-toast-B7n4gXl4.js";import"./use-sandbox-events-BZR9Xvyj.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-DM7tjD-Y.js";import"./utils-T-xgwvu9.js";import"./sandbox-git-api-DY2JBwrb.js";import"./empty-state-DTiQvFTm.js";import"./calendar-4vmCSMCw.js";import"./textarea-DKKpu4j7.js";import"./usage-stats-D_d2D8Wj.js";import"./utils-CVEq3hMx.js";import"./markdown-tL6sdqzq.js";import"./use-copy-CLDbNfFh.js";import"./gateway-client-Cjf9YZgG.js";import"./form-kDDI268e.js";import"./label-Cz2ESzy4.js";import"./editor-classes-CMJUQ0q2.js";import"./switch-DLa18g9P.js";import"./task-key-kJFx4e2o.js";import"./sortable.esm-D-Grx_BB.js";import"./toggle-group-D9Y0fm-3.js";import"./active-indicator-CCMhAsc_.js";import"./empty-message-Cc9hR1qr.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DyZ1K8WQ.js";import"./collapsible-BpmZcmV-.js";import"./use-task-board-items-uhqh6PNR.js";import"./config-BzgM9JXs.js";import"./task-route-DFPlSt_R.js";import"./project-index-n6zIw3HS.js";import"./shell-layout-8n97Gfv2.js";import"./use-deployment-admin-D5oW79CT.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DuKnnmVo.js";import"./command-B1uSCDOs.js";import"./index-D2_PsRqT.js";import"./integration-icon-BkEHXL5H.js";import"./project-icon-EAm2TPOd.js";import"./use-navigate-to-agent-Jn9AHv5I.js";import"./use-debounced-value-CKJPodTI.js";import"./new-project-dialog-DpI3oirN.js";import"./repository-picker-BjO-oJEQ.js";import"./github-icon-DtM4VHDi.js";import"./useInfiniteQuery-fnTqEMy9.js";import"./infiniteQueryObserver-DtEzALgC.js";import"./collection-search-BpPD1cYG.js";import"./new-project-store-CU2miSo6.js";import"./legacy-admin-welcome-dialog-D7LEWnzk.js";import"./required-auth-layout-DtC4GqSJ.js";import"./use-org-sso-D1j0oTnH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BhIn7g4y.js";import"./types-BfjfZI1L.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-DQnddENA.js";import"./use-connection-BlwEJ6QU.js";import"./use-mcp-prompts-BEiCSVNE.js";import"./use-thread-outputs-D_-5CcDB.js";import"./file-type-icon-B2pfAj_l.js";import"./section-array-field-whxy-DeQ.js";import"./named-rule-step-lmAbDDuM.js";import"./slider-C2mk6liJ.js";import"./index-DuXh-o9C.js";import"./tooltipContext-DEGZ2uVc.js";import"./CategoricalChart-BPZdBlVt.js";import"./index-Uvh2dd2d.js";import"./combobox-D0z8qltB.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-BHoa1WZE.js";import"./asset-utils-F3cCrDoF.js";import"./hosted-reconcile-DA19JQ88.js";import"./search-input-jt6Xgx4B.js";import"./tabs-Bpa2glNp.js";import"./delete-copy-u7v8dBp-.js";import"./category-tree-mnbJJkLU.js";import"./use-move-blocks-BzKtUTnP.js";import"./index-Bwq9ud4q.js";import"./view-header-Bee_uEOf.js";import"./use-cms-publish-actions-Dbj-FgCO.js";import"./use-content-sync-fyaHiMZi.js";import"./use-delete-block-BM2EDDox.js";import"./item-actions-Dt2DwB56.js";import"./date-utils-CrvIKg-s.js";import"./badge-DUPpSRXM.js";import"./empty-state-DR046JV4.js";import"./monaco-editor-Durke4zw.js";import"./editor-CAoNl87t.js";import"./sandbox-lifecycle-context-DwvoKy-z.js";import"./parse-sections-D4rEtefR.js";import"./mustache-B8dPn6lp.js";import"./collection-table-wrapper-2bTQbSCd.js";import"./table-DwE6kXVm.js";import"./agent-capabilities-DgKJkoYc.js";function re(e,t){if(!e||!t?.length)return e;const o=Object.fromEntries(Object.entries(e.properties??{}).filter(([r])=>!t.includes(r)));return Object.keys(o).length>0?{...e,properties:o}:e}function At(e,t,o){return typeof e!="string"?null:re(Lt(e,t),o)}function oe(e,t,o){if(!t||typeof e!="string")return!1;const r=At(e,t,o);return!!r&&Object.keys(r.properties??{}).length>0}function ie(e,t){const o=(e.title||e.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),r=/^[A-Za-z]/.test(o)&&o.length>0?o:"Section",i=te(t,r);return{blockKey:i,data:{__resolveType:e.resolveType,name:i}}}function vi(e){const t=_t.c(10),o=e.saveGuard?void 0:e.block!==void 0;let r;t[0]!==e?(r=m.jsx(se,{...e}),t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==e.blockKey||t[3]!==e.branch||t[4]!==e.decofile||t[5]!==e.orgSlug||t[6]!==e.virtualMcpId||t[7]!==o||t[8]!==r?(i=m.jsx(Dt,{listing:e.decofile,orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch,blockKey:e.blockKey,present:o,children:r}),t[2]=e.blockKey,t[3]=e.branch,t[4]=e.decofile,t[5]=e.orgSlug,t[6]=e.virtualMcpId,t[7]=o,t[8]=r,t[9]=i):i=t[9],i}function se(e){const t=_t.c(98),{orgSlug:o,virtualMcpId:r,branch:i,blockKey:c,block:x,meta:n,decofile:p,title:Kt,excludeFields:g,previewBaseUrl:yt,notice:Q,saveGuard:X,persistDefaults:Y,schemaWaiting:kt}=e,tt=yt===void 0?null:yt,et=kt===void 0?!0:kt,rt=Pt()?.taskId??null,d=Ft(),N=$t(r);let C;t[0]!==i||t[1]!==tt||t[2]!==r?(C={virtualMcpId:r,branch:i,sandboxUrl:tt},t[0]=i,t[1]=tt,t[2]=r,t[3]=C):C=t[3];const v=Vt(C),a=typeof x?.__resolveType=="string"?x.__resolveType:"";let T;t[4]!==g||t[5]!==n||t[6]!==a?(T=At(a,n,g),t[4]=g,t[5]=n,t[6]=a,t[7]=T):T=t[7];const ot=T;let F;t[8]!==g||t[9]!==n||t[10]!==a?(F=oe(a,n,g),t[8]=g,t[9]=n,t[10]=a,t[11]=F):F=t[11];const it=F;let I;t[12]!==n||t[13]!==a||t[14]!==et||t[15]!==N?(I=et&&a!==""&&!(N.resolved&&N.runtime==="cms")&&!qt(a,n),t[12]=n,t[13]=a,t[14]=et,t[15]=N,t[16]=I):I=t[16];const O=I,jt=Kt??(x?Ht(c,x,n):c);let M;t[17]!==i||t[18]!==o||t[19]!==r?(M={orgSlug:o,virtualMcpId:r,branch:i},t[17]=i,t[18]=o,t[19]=r,t[20]=M):M=t[20];let P;t[21]!==X?(P={guard:X,holdsCopy:!0},t[21]=X,t[22]=P):P=t[22];const{save:st,flush:mt,isPending:nt}=Qt(M,P);let $;t[23]!==i||t[24]!==o||t[25]!==r?($={orgSlug:o,virtualMcpId:r,branch:i},t[23]=i,t[24]=o,t[25]=r,t[26]=$):$=t[26];const u=Xt($);let S;t[27]!==u||t[28]!==d?(S=s=>u.mutate(s,{onError:l=>St.error(d("sectionsEditor.sectionsEditor.saveFailed",{error:l.message}))}),t[27]=u,t[28]=d,t[29]=S):S=t[29];let U;t[30]!==p||t[31]!==u.v8||t[32]!==S?(U=Gt(S,p,u.v8),t[30]=p,t[31]=u.v8,t[32]=S,t[33]=U):U=t[33];const lt=U,[Rt,Nt]=K.useState(c),[at,Bt]=K.useState(null),[pt,Et]=K.useState(0);let V;t[34]===Symbol.for("react.memo_cache_sentinel")?(V=[],t[34]=V):V=t[34];const[y,wt]=K.useState(V),[ct,f]=K.useState(!1),z=K.useRef(null);Rt!==c&&(Nt(c),Bt(null),Et(ne),wt([]));let L;t[35]!==x?(L=x??{},t[35]=x,t[36]=L):L=t[36];const dt=L;let k;t[37]!==at?(k=at??{},t[37]=at,t[38]=k):k=t[38];let q;t[39]!==dt||t[40]!==k?(q={...dt,...k},t[39]=dt,t[40]=k,t[41]=q):q=t[41];const ut=q;let H;t[42]!==c||t[43]!==a||t[44]!==st?(H=s=>{const l=s;Bt(l),st(c,{...l,__resolveType:a})},t[42]=c,t[43]=a,t[44]=st,t[45]=H):H=t[45];const ft=H;let D;t[46]===Symbol.for("react.memo_cache_sentinel")?(D=s=>{wt(s)},t[46]=D):D=t[46];const R=D;let G;t[47]!==p||t[48]!==mt||t[49]!==u||t[50]!==d?(G=async(s,l)=>{try{const{blockKey:h,data:b}=ie(s,p),gt=await u.mutateAsync({blockKey:h,data:b});Yt(gt)||St.success(d("sandbox.appEditor.createdSection",{name:h})),l({__resolveType:h}),mt()}catch(h){const b=h,gt=b instanceof Error?b.message:d("sandbox.appEditor.failedAddSection");throw St.error(gt),b}},t[47]=p,t[48]=mt,t[49]=u,t[50]=d,t[51]=G):G=t[51];const j=G;let W;t[52]!==f?(W=s=>{z.current=s.append,f(!0)},t[52]=f,t[53]=W):W=t[53];const ht=W;let Z;t[54]!==j||t[55]!==f?(Z=async s=>{const l=z.current;if(l)try{await j(s,h=>{l(h),f(!1),z.current=null})}catch{}},t[54]=j,t[55]=f,t[56]=Z):Z=t[56];const bt=Z,xt=y.length>0?[jt,...y]:[],Ct="flex h-full flex-col",Tt="flex h-12 shrink-0 items-center justify-between border-b px-6",vt=xt.length>0?m.jsx("nav",{"aria-label":d("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:xt.map((s,l)=>{const h=l===xt.length-1,b=Wt(s);return m.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[l>0&&m.jsx(It,{className:"size-3 shrink-0 text-muted-foreground/60"}),m.jsx("button",{type:"button",onClick:()=>{R(l===0?[]:Zt(y,l)),Et(me)},title:b,className:Ot("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",h?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:b})]},`${b}-${l}`)})}):m.jsx("span",{className:"text-sm font-medium",children:jt});let B;t[57]!==nt?(B=m.jsx(ee,{isPending:nt,isError:!1}),t[57]=nt,t[58]=B):B=t[58];let E;t[59]!==vt||t[60]!==B?(E=m.jsxs("div",{className:Tt,children:[vt,B]}),t[59]=vt,t[60]=B,t[61]=E):E=t[61];let w;t[62]!==O||t[63]!==c||t[64]!==i||t[65]!==y||t[66]!==p||t[67]!==ut||t[68]!==pt||t[69]!==j||t[70]!==R||t[71]!==ft||t[72]!==ht||t[73]!==it||t[74]!==n||t[75]!==o||t[76]!==Y||t[77]!==lt||t[78]!==ot||t[79]!==v||t[80]!==d||t[81]!==rt||t[82]!==r?(w=it?m.jsx(Jt,{schema:ot,value:ut,onChange:ft,persistDefaults:Y,basePath:"",breadcrumbPath:y,onBreadcrumbChange:R,decofile:p,meta:n,onSaveReferencedBlock:lt,previewBaseUrl:v,onAddSectionItem:j,onRequestAddSection:ht,sandbox:{orgSlug:o,virtualMcpId:r,branch:i,threadId:rt}},`${c}:${pt}`):m.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center text-xs text-muted-foreground",children:[O&&m.jsx(Mt,{className:"size-4"}),m.jsx("p",{children:d(O?"sandbox.appEditor.schemaAwaitsBuild":"sandbox.appEditor.noEditableSchema")})]}),t[62]=O,t[63]=c,t[64]=i,t[65]=y,t[66]=p,t[67]=ut,t[68]=pt,t[69]=j,t[70]=R,t[71]=ft,t[72]=ht,t[73]=it,t[74]=n,t[75]=o,t[76]=Y,t[77]=lt,t[78]=ot,t[79]=v,t[80]=d,t[81]=rt,t[82]=r,t[83]=w):w=t[83];let _;t[84]!==Q||t[85]!==w?(_=m.jsx(Ut,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:m.jsx("div",{className:"px-6 py-6",children:m.jsxs("div",{className:"mx-auto max-w-xl",children:[Q,w]})})}),t[84]=Q,t[85]=w,t[86]=_):_=t[86];let A;t[87]!==ct||t[88]!==p||t[89]!==bt||t[90]!==n||t[91]!==v||t[92]!==f?(A=v&&m.jsx(zt,{open:ct,onOpenChange:s=>{f(s),s||(z.current=null)},meta:n,decofile:p,previewBaseUrl:v,onSelect:s=>{bt(s)}}),t[87]=ct,t[88]=p,t[89]=bt,t[90]=n,t[91]=v,t[92]=f,t[93]=A):A=t[93];let J;return t[94]!==E||t[95]!==_||t[96]!==A?(J=m.jsxs("div",{className:Ct,children:[E,_,A]}),t[94]=E,t[95]=_,t[96]=A,t[97]=J):J=t[97],J}function me(e){return e+1}function ne(e){return e+1}export{vi as AppEditor};
1
+ import{c as _t,j as m,b as Ft,r as K,as as It,m as Ot,h as Mt,t as St}from"./index-BsAwgxIf.js";import{u as Pt}from"./chat-context-BhwgXdxZ.js";import{u as $t}from"./use-voice-input-DYwW5R3c.js";import{S as Ut}from"./scroll-area-KLc2042F.js";import{u as Vt,A as zt}from"./use-section-preview-base-Ve5g9dlJ.js";import{y as Lt,l as qt,t as Ht}from"./blocks-tab-states-_faw29v2.js";import{H as Dt,c as Gt,a as Wt,b as Zt,S as Jt}from"./held-block-view-Bm4hn8SE.js";import{b as Qt,u as Xt,k as Yt}from"./use-never-published-CP8Hs4DE.js";import{n as te}from"./content-tab-BvT7P5lX.js";import{S as ee}from"./save-status-DIv_w4LK.js";import"./use-panel-navigate-DpEZACCY.js";import"./thread-route-sNjMl6Ie.js";import"./use-project-scope-C815BKEh.js";import"./repository-binding-BS9v5Fe_.js";import"./use-mcp-client-DXpTlXlJ.js";import"./auth-D0WiD-6X.js";import"./use-view-draft-kind-1niLZJ6g.js";import"./use-blog-view-B-p1Bott.js";import"./use-organization-settings-BilLeNy9.js";import"./schema-CggWCz-G.js";import"./task-board-CZuAKwkd.js";import"./thread-intent-BNoxio0t.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Bw3-M9_N.js";import"./session-runtime-BtkBTCEv.js";import"./use-entitlements-BRKIl3Rz.js";import"./use-ai-providers-CFArCH41.js";import"./use-current-view-C1-z4fIk.js";import"./use-in-settings-BT3nEhsO.js";import"./use-decopilot-events-CZR337Lj.js";import"./popover-DogMO3pk.js";import"./drawer-EGIO8vW1.js";import"./tooltip-r0LfLYi3.js";import"./index-KBC7Pj7l.js";import"./use-mobile-BwxeIsTr.js";import"./agent-icon-B9nZhdi2.js";import"./AlertCircle-DA6gE5vw.js";import"./UserCheck01-3D5hYz4C.js";import"./Tool01-ymE-fOFX.js";import"./ArrowUp-DyF0Rx2O.js";import"./ArrowLeft-B8D7i2xh.js";import"./ArrowRight-C1EmTlL-.js";import"./BookOpen01-UxGmri2e.js";import"./Globe04-DD86hrsf.js";import"./CheckCircle-Bh1gNJET.js";import"./TrendUp01-Cr4FP2fV.js";import"./ChevronDown-uPv2ScPr.js";import"./ChevronSelectorVertical-CiFyE2Pu.js";import"./ChevronUp-BkmRXggG.js";import"./UserSquare-aJjYmjOR.js";import"./LinkBroken01-Ic71rSEU.js";import"./CreditCard01-C-H9qti1.js";import"./File02-DEjt2PPW.js";import"./MessageCircle01-CQjeMfQj.js";import"./SwitchHorizontal01-BU8z7oT_.js";import"./Eye-DL5oRAI4.js";import"./Image01-BCiDUkCm.js";import"./Key01-CgRwsDr3.js";import"./LayoutLeft-DHg_jNr0.js";import"./Minus-BM2zRSMr.js";import"./Monitor01-C4OHhcX6.js";import"./Sun-CoJn-J4w.js";import"./Play-l838EjWq.js";import"./Plus-BzpqhVU8.js";import"./SearchMd-BhCfkG_O.js";import"./ShoppingBag01-KIefHp9K.js";import"./Trash01-aSl--BGd.js";import"./Upload01-DozMUWEF.js";import"./Users01-Cximoi8v.js";import"./XClose-Dq0BGBMq.js";import"./Zap-NAfA60T9.js";import"./index-CT5cpmuw.js";import"./checkbox-BwlyfOui.js";import"./select-DPXDtN3F.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./site-editor-toast-BRXEnjic.js";import"./use-sandbox-events-aK2a02aF.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-uH3tLJJX.js";import"./utils-DII4rh9V.js";import"./sandbox-git-api-CbcKlTqF.js";import"./empty-state-DxGz72GL.js";import"./calendar-ByOFe-ir.js";import"./textarea-3iEFQij9.js";import"./usage-stats-BH8jlFhP.js";import"./utils-CVEq3hMx.js";import"./markdown-SwM1Ir6g.js";import"./use-copy-BFUDxfVH.js";import"./gateway-client-t5s1Cm0x.js";import"./form-Cb5OHNc9.js";import"./label-D8u4gNcM.js";import"./editor-classes-D2vt4K2z.js";import"./switch-DEje7fmz.js";import"./task-key-Binbqohp.js";import"./sortable.esm-xHKM0aSe.js";import"./toggle-group-N0qYYn6W.js";import"./active-indicator-CCMhAsc_.js";import"./empty-message-BR97lu1R.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-4JIJkNK2.js";import"./collapsible-BILoWprp.js";import"./use-task-board-items-DX_SyoB4.js";import"./config-Bn4oMb7y.js";import"./task-route-IxeWFQf4.js";import"./project-index-Be1RuOJ6.js";import"./shell-layout-DwJrXedk.js";import"./use-deployment-admin-DGQGQZ6E.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-BLcA1Iw0.js";import"./command-BcxQrgUK.js";import"./index-Bi2fLJMb.js";import"./integration-icon-DbiCbrD7.js";import"./project-icon-BHcF2TIr.js";import"./use-navigate-to-agent-DjeX7xEq.js";import"./use-debounced-value-BkJoL4uj.js";import"./new-project-dialog-CrDlez-N.js";import"./repository-picker-CXtPhUQx.js";import"./github-icon-BoZrKkV3.js";import"./useInfiniteQuery-C5Fx0PfA.js";import"./infiniteQueryObserver-CnD94meO.js";import"./collection-search-Dj3oO1qn.js";import"./new-project-store-DleT4y6U.js";import"./legacy-admin-welcome-dialog-C4yFyjEg.js";import"./required-auth-layout-C_8jBLMB.js";import"./use-org-sso-DhdCpzK5.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Jzrzu2q5.js";import"./types-BhUJ3bOA.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-DKmzxIAF.js";import"./use-connection-DpuSfyHb.js";import"./use-mcp-prompts-B_BU9Jdl.js";import"./use-thread-outputs-HnCGzIoZ.js";import"./file-type-icon-Bhy3vcyl.js";import"./section-array-field-fkRL6dJN.js";import"./named-rule-step-DbDjzYJn.js";import"./slider-tajZdOy1.js";import"./index-KFEtz5HA.js";import"./tooltipContext-DRtEpNZN.js";import"./CategoricalChart-oGRIPAq4.js";import"./index-D1alBOdU.js";import"./combobox-7VjvZkXU.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-CMTQcHfJ.js";import"./asset-utils-Lxwn3jp5.js";import"./hosted-reconcile-mSp200Ck.js";import"./search-input-D6gGXIf1.js";import"./tabs-BMObVAFs.js";import"./delete-copy-CzwVZl8P.js";import"./category-tree-DO91V9PE.js";import"./use-move-blocks-D-OheBD-.js";import"./index-BQrnEOJ9.js";import"./view-header-CDV0Xu_P.js";import"./use-cms-publish-actions-BbXykL5B.js";import"./use-content-sync-C9laqqVB.js";import"./use-delete-block-BYw_7GRP.js";import"./item-actions-BR3Rk3pU.js";import"./date-utils-CrvIKg-s.js";import"./badge-BUkSpOXa.js";import"./empty-state-D--R_kh-.js";import"./monaco-editor-Dj-bs0sb.js";import"./editor-B_YvqDEq.js";import"./sandbox-lifecycle-context-Ckk9fyCX.js";import"./parse-sections-3dpMP28-.js";import"./mustache-CyusQksc.js";import"./collection-table-wrapper-C8_o4YW1.js";import"./table-Cie3FI8M.js";import"./agent-capabilities-MDN7TVuK.js";function re(e,t){if(!e||!t?.length)return e;const o=Object.fromEntries(Object.entries(e.properties??{}).filter(([r])=>!t.includes(r)));return Object.keys(o).length>0?{...e,properties:o}:e}function At(e,t,o){return typeof e!="string"?null:re(Lt(e,t),o)}function oe(e,t,o){if(!t||typeof e!="string")return!1;const r=At(e,t,o);return!!r&&Object.keys(r.properties??{}).length>0}function ie(e,t){const o=(e.title||e.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),r=/^[A-Za-z]/.test(o)&&o.length>0?o:"Section",i=te(t,r);return{blockKey:i,data:{__resolveType:e.resolveType,name:i}}}function vi(e){const t=_t.c(10),o=e.saveGuard?void 0:e.block!==void 0;let r;t[0]!==e?(r=m.jsx(se,{...e}),t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==e.blockKey||t[3]!==e.branch||t[4]!==e.decofile||t[5]!==e.orgSlug||t[6]!==e.virtualMcpId||t[7]!==o||t[8]!==r?(i=m.jsx(Dt,{listing:e.decofile,orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch,blockKey:e.blockKey,present:o,children:r}),t[2]=e.blockKey,t[3]=e.branch,t[4]=e.decofile,t[5]=e.orgSlug,t[6]=e.virtualMcpId,t[7]=o,t[8]=r,t[9]=i):i=t[9],i}function se(e){const t=_t.c(98),{orgSlug:o,virtualMcpId:r,branch:i,blockKey:c,block:x,meta:n,decofile:p,title:Kt,excludeFields:g,previewBaseUrl:yt,notice:Q,saveGuard:X,persistDefaults:Y,schemaWaiting:kt}=e,tt=yt===void 0?null:yt,et=kt===void 0?!0:kt,rt=Pt()?.taskId??null,d=Ft(),N=$t(r);let C;t[0]!==i||t[1]!==tt||t[2]!==r?(C={virtualMcpId:r,branch:i,sandboxUrl:tt},t[0]=i,t[1]=tt,t[2]=r,t[3]=C):C=t[3];const v=Vt(C),a=typeof x?.__resolveType=="string"?x.__resolveType:"";let T;t[4]!==g||t[5]!==n||t[6]!==a?(T=At(a,n,g),t[4]=g,t[5]=n,t[6]=a,t[7]=T):T=t[7];const ot=T;let F;t[8]!==g||t[9]!==n||t[10]!==a?(F=oe(a,n,g),t[8]=g,t[9]=n,t[10]=a,t[11]=F):F=t[11];const it=F;let I;t[12]!==n||t[13]!==a||t[14]!==et||t[15]!==N?(I=et&&a!==""&&!(N.resolved&&N.runtime==="cms")&&!qt(a,n),t[12]=n,t[13]=a,t[14]=et,t[15]=N,t[16]=I):I=t[16];const O=I,jt=Kt??(x?Ht(c,x,n):c);let M;t[17]!==i||t[18]!==o||t[19]!==r?(M={orgSlug:o,virtualMcpId:r,branch:i},t[17]=i,t[18]=o,t[19]=r,t[20]=M):M=t[20];let P;t[21]!==X?(P={guard:X,holdsCopy:!0},t[21]=X,t[22]=P):P=t[22];const{save:st,flush:mt,isPending:nt}=Qt(M,P);let $;t[23]!==i||t[24]!==o||t[25]!==r?($={orgSlug:o,virtualMcpId:r,branch:i},t[23]=i,t[24]=o,t[25]=r,t[26]=$):$=t[26];const u=Xt($);let S;t[27]!==u||t[28]!==d?(S=s=>u.mutate(s,{onError:l=>St.error(d("sectionsEditor.sectionsEditor.saveFailed",{error:l.message}))}),t[27]=u,t[28]=d,t[29]=S):S=t[29];let U;t[30]!==p||t[31]!==u.v8||t[32]!==S?(U=Gt(S,p,u.v8),t[30]=p,t[31]=u.v8,t[32]=S,t[33]=U):U=t[33];const lt=U,[Rt,Nt]=K.useState(c),[at,Bt]=K.useState(null),[pt,Et]=K.useState(0);let V;t[34]===Symbol.for("react.memo_cache_sentinel")?(V=[],t[34]=V):V=t[34];const[y,wt]=K.useState(V),[ct,f]=K.useState(!1),z=K.useRef(null);Rt!==c&&(Nt(c),Bt(null),Et(ne),wt([]));let L;t[35]!==x?(L=x??{},t[35]=x,t[36]=L):L=t[36];const dt=L;let k;t[37]!==at?(k=at??{},t[37]=at,t[38]=k):k=t[38];let q;t[39]!==dt||t[40]!==k?(q={...dt,...k},t[39]=dt,t[40]=k,t[41]=q):q=t[41];const ut=q;let H;t[42]!==c||t[43]!==a||t[44]!==st?(H=s=>{const l=s;Bt(l),st(c,{...l,__resolveType:a})},t[42]=c,t[43]=a,t[44]=st,t[45]=H):H=t[45];const ft=H;let D;t[46]===Symbol.for("react.memo_cache_sentinel")?(D=s=>{wt(s)},t[46]=D):D=t[46];const R=D;let G;t[47]!==p||t[48]!==mt||t[49]!==u||t[50]!==d?(G=async(s,l)=>{try{const{blockKey:h,data:b}=ie(s,p),gt=await u.mutateAsync({blockKey:h,data:b});Yt(gt)||St.success(d("sandbox.appEditor.createdSection",{name:h})),l({__resolveType:h}),mt()}catch(h){const b=h,gt=b instanceof Error?b.message:d("sandbox.appEditor.failedAddSection");throw St.error(gt),b}},t[47]=p,t[48]=mt,t[49]=u,t[50]=d,t[51]=G):G=t[51];const j=G;let W;t[52]!==f?(W=s=>{z.current=s.append,f(!0)},t[52]=f,t[53]=W):W=t[53];const ht=W;let Z;t[54]!==j||t[55]!==f?(Z=async s=>{const l=z.current;if(l)try{await j(s,h=>{l(h),f(!1),z.current=null})}catch{}},t[54]=j,t[55]=f,t[56]=Z):Z=t[56];const bt=Z,xt=y.length>0?[jt,...y]:[],Ct="flex h-full flex-col",Tt="flex h-12 shrink-0 items-center justify-between border-b px-6",vt=xt.length>0?m.jsx("nav",{"aria-label":d("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:xt.map((s,l)=>{const h=l===xt.length-1,b=Wt(s);return m.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[l>0&&m.jsx(It,{className:"size-3 shrink-0 text-muted-foreground/60"}),m.jsx("button",{type:"button",onClick:()=>{R(l===0?[]:Zt(y,l)),Et(me)},title:b,className:Ot("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",h?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:b})]},`${b}-${l}`)})}):m.jsx("span",{className:"text-sm font-medium",children:jt});let B;t[57]!==nt?(B=m.jsx(ee,{isPending:nt,isError:!1}),t[57]=nt,t[58]=B):B=t[58];let E;t[59]!==vt||t[60]!==B?(E=m.jsxs("div",{className:Tt,children:[vt,B]}),t[59]=vt,t[60]=B,t[61]=E):E=t[61];let w;t[62]!==O||t[63]!==c||t[64]!==i||t[65]!==y||t[66]!==p||t[67]!==ut||t[68]!==pt||t[69]!==j||t[70]!==R||t[71]!==ft||t[72]!==ht||t[73]!==it||t[74]!==n||t[75]!==o||t[76]!==Y||t[77]!==lt||t[78]!==ot||t[79]!==v||t[80]!==d||t[81]!==rt||t[82]!==r?(w=it?m.jsx(Jt,{schema:ot,value:ut,onChange:ft,persistDefaults:Y,basePath:"",breadcrumbPath:y,onBreadcrumbChange:R,decofile:p,meta:n,onSaveReferencedBlock:lt,previewBaseUrl:v,onAddSectionItem:j,onRequestAddSection:ht,sandbox:{orgSlug:o,virtualMcpId:r,branch:i,threadId:rt}},`${c}:${pt}`):m.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center text-xs text-muted-foreground",children:[O&&m.jsx(Mt,{className:"size-4"}),m.jsx("p",{children:d(O?"sandbox.appEditor.schemaAwaitsBuild":"sandbox.appEditor.noEditableSchema")})]}),t[62]=O,t[63]=c,t[64]=i,t[65]=y,t[66]=p,t[67]=ut,t[68]=pt,t[69]=j,t[70]=R,t[71]=ft,t[72]=ht,t[73]=it,t[74]=n,t[75]=o,t[76]=Y,t[77]=lt,t[78]=ot,t[79]=v,t[80]=d,t[81]=rt,t[82]=r,t[83]=w):w=t[83];let _;t[84]!==Q||t[85]!==w?(_=m.jsx(Ut,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:m.jsx("div",{className:"px-6 py-6",children:m.jsxs("div",{className:"mx-auto max-w-xl",children:[Q,w]})})}),t[84]=Q,t[85]=w,t[86]=_):_=t[86];let A;t[87]!==ct||t[88]!==p||t[89]!==bt||t[90]!==n||t[91]!==v||t[92]!==f?(A=v&&m.jsx(zt,{open:ct,onOpenChange:s=>{f(s),s||(z.current=null)},meta:n,decofile:p,previewBaseUrl:v,onSelect:s=>{bt(s)}}),t[87]=ct,t[88]=p,t[89]=bt,t[90]=n,t[91]=v,t[92]=f,t[93]=A):A=t[93];let J;return t[94]!==E||t[95]!==_||t[96]!==A?(J=m.jsxs("div",{className:Ct,children:[E,_,A]}),t[94]=E,t[95]=_,t[96]=A,t[97]=J):J=t[97],J}function me(e){return e+1}function ne(e){return e+1}export{vi as AppEditor};
@@ -1 +1 @@
1
- import{c as d,a4 as m,e as y,ak as x,K as I,q as P,b as h,j as g,B as $}from"./index-D0JbJFfP.js";import{u as C}from"./useInfiniteQuery-fnTqEMy9.js";function T(t){const e=d.c(17),{org:r}=m(),l=x();let n,i,o,s;e[0]!==r.id||e[1]!==t.configId||e[2]!==t.imageOnly||e[3]!==t.search?(i=t.search?.trim()||void 0,n=t.imageOnly??!1,s=C,o=I.filePickerObjects(r.id,t.configId,i,n),e[0]=r.id,e[1]=t.configId,e[2]=t.imageOnly,e[3]=t.search,e[4]=n,e[5]=i,e[6]=o,e[7]=s):(n=e[4],i=e[5],o=e[6],s=e[7]);const c=t.enabled!==!1&&!!t.configId;let a;e[8]!==n||e[9]!==t.configId||e[10]!==i||e[11]!==l?(a=async u=>{const{pageParam:p}=u;return await l.call("FILE_OBJECTS_LIST",{configId:t.configId,cursor:p??void 0,search:i,imageOnly:n||void 0})},e[8]=n,e[9]=t.configId,e[10]=i,e[11]=l,e[12]=a):a=e[12];let f;return e[13]!==o||e[14]!==c||e[15]!==a?(f={queryKey:o,enabled:c,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:O},e[13]=o,e[14]=c,e[15]=a,e[16]=f):f=e[16],s(f)}function O(t){return t.nextCursor??void 0}function j(){const t=d.c(2),{org:e}=m();let r;return t[0]!==e?(r={mutationFn:async l=>{const n=l.file.type||"application/octet-stream",i=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(l.configId)}/upload?filename=${encodeURIComponent(l.file.name)}`,{method:"POST",headers:{"Content-Type":n},body:l.file});if(!i.ok){const o=await i.text().catch(b);let s=`${i.status} ${i.statusText}`;try{const c=JSON.parse(o);c.message&&(s=c.message)}catch{o&&(s=o.slice(0,200))}throw new Error(`Upload failed: ${s}`)}return await i.json()}},t[0]=e,t[1]=r):r=t[1],y(r)}function b(){return""}function F(){const t=d.c(8),{org:e}=m(),r=x(),l=P();let n;t[0]!==r?(n=s=>r.call("FILE_OBJECT_DELETE",s),t[0]=r,t[1]=n):n=t[1];let i;t[2]!==e||t[3]!==l?(i=(s,c)=>{l.invalidateQueries({queryKey:I.filePickerObjectsByConfig(e.id,c.configId)})},t[2]=e,t[3]=l,t[4]=i):i=t[4];let o;return t[5]!==n||t[6]!==i?(o={mutationFn:n,onSuccess:i},t[5]=n,t[6]=i,t[7]=o):o=t[7],y(o)}function B(t){const e=d.c(14),{denied:r,retrying:l,onRetry:n}=t,i=h(),o=r?"filePicker.filePickerDialog.listingDenied":"filePicker.filePickerDialog.listingFailed";let s;e[0]!==i||e[1]!==o?(s=i(o),e[0]=i,e[1]=o,e[2]=s):s=e[2];let c;e[3]!==s?(c=g.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[3]=s,e[4]=c):c=e[4];let a;e[5]!==i?(a=i("filePicker.filePickerDialog.retryListing"),e[5]=i,e[6]=a):a=e[6];let f;e[7]!==n||e[8]!==l||e[9]!==a?(f=g.jsx($,{type:"button",variant:"outline",size:"sm",disabled:l,onClick:n,children:a}),e[7]=n,e[8]=l,e[9]=a,e[10]=f):f=e[10];let u;return e[11]!==c||e[12]!==f?(u=g.jsxs("div",{role:"alert",className:"rounded-lg border border-border p-4 space-y-3",children:[c,f]}),e[11]=c,e[12]=f,e[13]=u):u=e[13],u}function v(t){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(t)}function w(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"file":t.slice(e+1).toLowerCase()}function S(t){const e=t.split("/");return e[e.length-1]??t}function L(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}export{B,T as a,S as b,F as c,w as e,L as f,v as i,j as u};
1
+ import{c as d,a4 as m,e as y,ak as x,K as I,q as P,b as h,j as g,B as $}from"./index-BsAwgxIf.js";import{u as C}from"./useInfiniteQuery-C5Fx0PfA.js";function T(t){const e=d.c(17),{org:r}=m(),l=x();let n,i,o,s;e[0]!==r.id||e[1]!==t.configId||e[2]!==t.imageOnly||e[3]!==t.search?(i=t.search?.trim()||void 0,n=t.imageOnly??!1,s=C,o=I.filePickerObjects(r.id,t.configId,i,n),e[0]=r.id,e[1]=t.configId,e[2]=t.imageOnly,e[3]=t.search,e[4]=n,e[5]=i,e[6]=o,e[7]=s):(n=e[4],i=e[5],o=e[6],s=e[7]);const c=t.enabled!==!1&&!!t.configId;let a;e[8]!==n||e[9]!==t.configId||e[10]!==i||e[11]!==l?(a=async u=>{const{pageParam:p}=u;return await l.call("FILE_OBJECTS_LIST",{configId:t.configId,cursor:p??void 0,search:i,imageOnly:n||void 0})},e[8]=n,e[9]=t.configId,e[10]=i,e[11]=l,e[12]=a):a=e[12];let f;return e[13]!==o||e[14]!==c||e[15]!==a?(f={queryKey:o,enabled:c,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:O},e[13]=o,e[14]=c,e[15]=a,e[16]=f):f=e[16],s(f)}function O(t){return t.nextCursor??void 0}function j(){const t=d.c(2),{org:e}=m();let r;return t[0]!==e?(r={mutationFn:async l=>{const n=l.file.type||"application/octet-stream",i=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(l.configId)}/upload?filename=${encodeURIComponent(l.file.name)}`,{method:"POST",headers:{"Content-Type":n},body:l.file});if(!i.ok){const o=await i.text().catch(b);let s=`${i.status} ${i.statusText}`;try{const c=JSON.parse(o);c.message&&(s=c.message)}catch{o&&(s=o.slice(0,200))}throw new Error(`Upload failed: ${s}`)}return await i.json()}},t[0]=e,t[1]=r):r=t[1],y(r)}function b(){return""}function F(){const t=d.c(8),{org:e}=m(),r=x(),l=P();let n;t[0]!==r?(n=s=>r.call("FILE_OBJECT_DELETE",s),t[0]=r,t[1]=n):n=t[1];let i;t[2]!==e||t[3]!==l?(i=(s,c)=>{l.invalidateQueries({queryKey:I.filePickerObjectsByConfig(e.id,c.configId)})},t[2]=e,t[3]=l,t[4]=i):i=t[4];let o;return t[5]!==n||t[6]!==i?(o={mutationFn:n,onSuccess:i},t[5]=n,t[6]=i,t[7]=o):o=t[7],y(o)}function B(t){const e=d.c(14),{denied:r,retrying:l,onRetry:n}=t,i=h(),o=r?"filePicker.filePickerDialog.listingDenied":"filePicker.filePickerDialog.listingFailed";let s;e[0]!==i||e[1]!==o?(s=i(o),e[0]=i,e[1]=o,e[2]=s):s=e[2];let c;e[3]!==s?(c=g.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e[3]=s,e[4]=c):c=e[4];let a;e[5]!==i?(a=i("filePicker.filePickerDialog.retryListing"),e[5]=i,e[6]=a):a=e[6];let f;e[7]!==n||e[8]!==l||e[9]!==a?(f=g.jsx($,{type:"button",variant:"outline",size:"sm",disabled:l,onClick:n,children:a}),e[7]=n,e[8]=l,e[9]=a,e[10]=f):f=e[10];let u;return e[11]!==c||e[12]!==f?(u=g.jsxs("div",{role:"alert",className:"rounded-lg border border-border p-4 space-y-3",children:[c,f]}),e[11]=c,e[12]=f,e[13]=u):u=e[13],u}function v(t){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(t)}function w(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"file":t.slice(e+1).toLowerCase()}function S(t){const e=t.split("/");return e[e.length-1]??t}function L(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}export{B,T as a,S as b,F as c,w as e,L as f,v as i,j as u};
@@ -1 +1 @@
1
- import{bF as v,bG as $,bH as W,bI as H,bJ as D,bK as y,bL as V,bM as x,bN as E,bO as q,bP as j,bQ as N,bR as B,bS as F,bT as Z}from"./index-D0JbJFfP.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=F[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return q.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return Z.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return j.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
1
+ import{bF as v,bG as $,bH as W,bI as H,bJ as D,bK as y,bL as V,bM as x,bN as E,bO as q,bP as j,bQ as N,bR as B,bS as F,bT as Z}from"./index-BsAwgxIf.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function L(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=F[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await M(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const O=!e.redirectUrl;if(n!==void 0||O){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const C=e.state?await e.state():void 0,{authorizationUrl:z,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:C,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(z),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function M(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return q.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function b(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??E;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await b(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await b(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=E}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await M(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function P(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await L(u);return Z.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=P(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=P(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await L(s);return j.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,M as d,me as e};
@@ -1 +1 @@
1
- import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-D0JbJFfP.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
1
+ import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-BsAwgxIf.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
@@ -1 +1 @@
1
- import{a as $,a3 as Ne,r as b,e as ae,E as W,j as t,m as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-D0JbJFfP.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??t.jsxs("div",{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"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
1
+ import{a as $,a3 as Ne,r as b,e as ae,E as W,j as t,m as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-BsAwgxIf.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??t.jsxs("div",{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"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};